We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 24559

MIG 007 rel 6 - DDR SDRAM controller reads a first value of 'XXXX' from the Read FIFO during behavioral simulation but works correctly in hardware


Keywords: MIG 007, Virtex-II, Virtex-II Pro, Spartan-3, memory, controllers, rst_dqs_div, dqs_delayed_col, simulation, behavioral, DDR

When doing a behavioral simulation of a MIG 007 DDR SDRAM interface, it appears that data is being written into the read FIFOs one cycle too early during a read operation by the controller. This causes "XXXX" values to be written into the read FIFOs. When looking at the user_output_data signal of the FIFO, the invalid "XXXX" values appear on the output of the data read FIFO during a read operation. This happens during behavioral simulation, but the design works perfectly in hardware.

Why does this happen and is there a way to work around the problem?


The reason this happens is because the rst_dqs_div, dqs0_delayed_col0(n), and dqs0_delayed_col1(n) signals must be delayed by the user during behavioral simulation to match the delays on these signals in hardware.

Firstly, rst_dqs_div must be delayed to account for the external PCB loop back. In hardware, rst_dqs_div_out is output from the FPGA, loops back on the PCB, and is then input to the FPGA as rst_dqs_div_in. In behavioral simulation, the user should add this delay during behavioral simulation.

Secondly, the dqs0_delayed_col0(n) and dqs0_delayed_col1(n) signals should be delayed to account for the LUT delays placed on the DQS bits in the design's data capture technique. In hardware, the LUT delays properly delay these signals, however, these delays are not included in a behavioral simulation, so the user must manually add the delay. NOTE:This causes issues in some versions of simulators but it might also work in many simulators.

To delay these signals manually to account for both PCB loopback and LUT delay, the following modifications are needed within the data_read_controller_16bit_rl.vhd file:

signal rst_dqs_div_tmp : std_logic; -- Add this line to add temporary rst_dqs_div signal


dqs0_delayed_col0 <= dqs_delayed_col0(0) after 200 ps; -- Add delay to dqs0_delayed_col0
dqs1_delayed_col0 <= dqs_delayed_col0(1) after 200 ps; -- Add delay to dqs1_delayed_col0

dqs0_delayed_col1 <= dqs_delayed_col1(0) after 200 ps; -- Add delay to dqs0_delayed_col1
dqs1_delayed_col1 <= dqs_delayed_col1(1) after 200 ps; -- Add delay to dqs1_delayed_col1

-- dqsx_delayed_col0 negated signals

dqs0_delayed_col0_n <= not dqs0_delayed_col0;
dqs1_delayed_col0_n <= not dqs1_delayed_col0;

-- dqsx_delayed_col1 negated signals

dqs0_delayed_col1_n <= not dqs0_delayed_col1;
dqs1_delayed_col1_n <= not dqs1_delayed_col1;

rst_dqs_div_delayed : dqs_delay port map (
clk_in => rst_dqs_div_in,
sel_in => delay_sel,
clk_out => rst_dqs_div_tmp -- Add this line

rst_dqs_div <= rst_dqs_div_tmp after 300 ps; -- Add delay to rst_dqs_div
AR# 24559
Date 04/06/2009
Status Archive
Type General Article
Page Bookmarked