Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 7/19/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.1.7.18. Programming the GCL and GCL Linked Registers

Follow these steps to program the gate control list (GCL) and the four other registers that you can implement for the GCL.

  1. The GCL and the four other GCL-linked registers must be accessed through indirect addressing using the MTL_GCL_Control and MTL_EST_GCL_Data registers. The GCLS field of the MTL_GCL_Control register indicates whether the EST feature or the PSF feature gets access to the GCL memory/register. The SWOL field of the MTL_SGF_Status register and MTL_EST_Status register indicates if GCL0 or GCL1 is owned by software.
  2. To program the GCL, write the 32-bit write data to the MTL_EST_GCL_Data register. Then program the MTL_GCL_Control register with the write address and other control information.
  3. In the MTL_EST_GCL_Data register, write data consists of up to 8 bits (configurable) of gate controls and up to 24 bits (configurable) of time interval. Gate close is indicated by programming a 0 and gate open is indicated by programming a 1. For a 4-gate ID/TC and 24-bit time interval configuration, the data width is 28 bits and the remaining 4 bits are reserved/read-only. The data must be written in the following format: {8'h0, Gate ID3/TC3, Gate ID2/TC2, Gate ID1/TC1, Gate ID0/TC0, 24-bit Time Interval}.
  4. Program the SRWO field to 1 (to start a write operation) and program the address and read/write fields of the MTL_GCL_Control register appropriately.
  5. Poll and check for the SRWO field to be cleared by hardware to indicate the completion of the previous operation before initiating a new read/write operation through the same indirect addressing mode.
  6. Repeat steps 3, 4, and 5 until you complete the GCL programming.
  7. Using the same indirect addressing method, program the BTR, CTR, TER and LLR registers. Set the GCRR field in the MTL_GCL_Control register which indicates that the read/write access is for GCL related registers (BTR, CTR, TER, LLR).
After programming of the GCL and the related registers, program the MTL_SGF_Control register or MTL_EST_Control register for the EMAC to own and process the GCL. When the list length (as indicated in LLR) is 1, the associated time interval must be greater than the value of the cycle time register. Otherwise, an error is reported (as detailed in the error handling section) as a single set of gate controls adds no value in the TSN context.
Note:
  • The time unit in all the GCL related registers is seconds and nano-seconds. If internally generated PTP system time is used, the nano-seconds field must be programmed to use the digital rollover mode. (TSCTRLSSR field of MAC_Timestamp_Control must be set to 1).
  • When GCL gating is not active, all the stream gate instance states are considered open as BTR is not reached.