Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 4/01/2024
Public
Document Table of Contents

5.5.6.6. Read Data Path

The read path captures DQ outputs from the NAND/SD/eMMC devices and passes the data back to the clk_phy domain. Here, the incoming DQS strobe used to capture the data is delayed so the rising and falling edges are located right in the middle of the valid data window. For the SD/eMMC interface, the read path for data is replicated for the CMD signal.

When the DQS signal is not generated from the device (NAND SDR mode or SD/eMMC slow mode), the RE# control signal is used to generate the phony_dqs signal under software programmable control to mimic DQS so the read path used for DDR also can be used. The assertion time of the phony_dqs signal can be controlled with the phony_dqs_timing field in the phy_ctrl_reg register. The selection of the DQS signal from the device or the phony_dqs signal is controlled by the use_phony_dqs field in the phy_dqs_timing_reg register.

For SD/eMMC interfaces, the incoming data also can be latched by a loopbacked version of the SDCLK. This loopbacked sampling signal uses the same path as the phony_dqs signal. The mux that switches between the loopback and phony_dqs signals is controlled through the use_lpbk_dqs field in the programmable phy_dqs_timing_reg register. The recommended approach for SD/eMMC is to use the loopback version of the device clock. The DQS signal can be delayed to adjust the data sampling position. This delay is controlled by the read_dqs_delay field for the DQ path and the read_dqs_cmd_delay field for the CMD path, both fields are located in the phy_dll_slave_ctrl_reg register.

The DDR data for a particular entry is clock cycled every 8 DQS clock cycles. Data is transferred from the entry flops to the PHY clock cycle domain after the program delay which allows for the falling edge data to be received, and sufficient setup time for the PHY clock cycle to parameter both rising and falling edge data. The delay in each of the DQ bits is controlled by the phy_rd_deskew_reg register. For CMD path, the delay is controlled by the rd_cmd_deskew_delay field in the phy_wr_rd_deskew_cmd_reg register.

The data recovery is done using an internal FIFO which transfers the DDR data into the datain_h and datain_l signals in the clk_phy clock domain. The FIFO read control advances the read pointer based on a signal that consists of a programmable delay version of either the dfi_rddata_en pulse from the DFI interface or a FIFO empty signal generated in the FIFO. The read capture mechanism updates the write pointers when valid DQS strobes arrive and reads out the data from this FIFO using the read pointers after a set delay. The sync_method field in the phy_gate_lpbk_ctrl_reg register defines the signal use to enable FIFO reading (the delayed version of the dfi_rddata_en signal or the delayed version of the FIFO empty signal). The delay on each of the delayed signals is programmable using the rd_del_sel and rd_del_sel_empty fields in the same register and depends on the board flight times as well as the worst-case timing of the connected Flash device to return valid data. The FIFO depth is 8 deep and the latency between DQS arriving from the device to data being read out of the FIFO can be 8 clock cycles.

Once data is in the clk_phy domain, data goes through the frequency ratio module which synchronizes data to the clk_ctrl clock before being sent the controller.

The block diagram for the read path in the PHY is shown below.

Figure 164. Read Data Path Block Diagram
Table 229.  Read Data Path Operations
Operation Data Command
Controls DQS delay phy_dll_slave_ctrl_reg [read_dqs_delay] phy_dll_slave_ctrl_reg[read_dqs_cmd_delay]
Controls the read incoming data deskew phy_rd_deskew_reg[rd_dqx_deskew_delay] (1 field per data line) rd_cmd_deskew_delay[rd_cmd_deskew_delay]
Controls assertion time of phony_dqs signal phy_ctrl_reg[phony_dqs_timing] N/A
Controls selection of DQS from device or phony_DQS signal. phy_dqs_timing_reg [use_phony_dqs] phy_dqs_timing_reg [use_phony_dqs_cmd]
Controls selection of DQS signal between phony signal or clock loopback signal. phy_dqs_timing_reg[use_lpbk_dqs] N/A
Controls selection of DQS signal between internal or external loopback signal. phy_dqs_timing_reg [use_ext_lpbk_dqs] N/A
Controls if the DQS phony_dqs is sampled in the rising or falling edge of the clk_phy clock. phy_dqs_timing_reg [phony_dqs_sel] N/A
Controls the delay to open the DQS gate after the dfi_rddata_en gets set. phy_gate_lpbk_ctrl_reg[gate_cfg] N/A
Controls the delay to close the DQS gate after dfi_rd_pre_post_amble and dfi_rebar get set. phy_gate_lpbk_ctrl_reg[gate_cfg_close] N/A
Controls assertion and clearing of the DQ dynamic termination signal (TSEL)

phy_dqs_timing_reg[data_select_tsel_start]

phy_dqs_timing_reg[data_select_tsel_end]

N/A

Controls assertion and clearing of the DQS dynamic termination signal (TSEL)

phy_dqs_timing_reg[dqs_select_tsel_start]

phy_dqs_timing_reg[dqs_select_tsel_end]

N/A
Controls the termination value of TSEL for DQ and DQS when TSEL is high and low. phy_tsel_reg register N/A
Controls the number of delay cycles that the dfi_rddata_en signal is delayed (input to some functional blocks). phy_ie_timing_reg[rddata_en_ie_dly] N/A
Controls the input enable signal (on/off) for DQ.

phy_ie_timing_reg[dq_ie_start]

phy_ie_timing_reg[dq_ie_stop]

N/A
Controls the input enable signal (on/off) for DQS.

phy_ie_timing_reg[dqs_ie_start]

phy_ie_timing_reg[dqs_ie_stop]

N/A
Controls the starting and ending point off input mask enable for DATA and CMD.

phy_dq_timing_reg[io_mask_start]

phy_dq_timing_reg[io_mask_end]

phy_dq_timing_reg[io_mask_always_on]

N/A
Control if the read pointers in the FIFO are updated using the delayed version of the dfi_rddata_en signal or a delayed version from FIFO empty signal. phy_gate_lpbk_ctrl_regp[sync_method] N/A
Control delay between assertion of dfi_rddata_en and enabling of read pointer increment in the FIFO when sync_method field select this signal. phy_gate_lpbk_ctrl_reg[rd_del_sel] N/A
Control delay between assertion of FIFO emptysignal and enabling of read pointer increment in the FIFO when sync_method field select this signal. phy_gate_lpbk_ctrl_reg[rd_del_sel_empty] N/A

The internal DQS_gate signal in the previous diagram is used to control the opening and closing of the reading gate allowing or blocking the assertion of the DQS signal. The assertion of this signal is controlled by the gate_cfg field in the phy_gate_lpbk_ctrl_reg register and determines the delay to open the gate (allowing DQS assertion) after the dfi_rddata_en signal is set. The gate close (blocking DQS assertion) occurs after the dfi_rd_pre_post_amble and dfi_rebar signals are high. The gate close can be delayed with the gate_cfg_close field. The delay resolution is clk_phy clock cycle for both. The waveform diagram shown in the Generation of Dynamic Termination Signal section shows the signals involved in the control of the reading gate mechanism.