Zynq-7000 AP SoC and 7 Series FPGAs MIS v4.1
130
UG586 November 30, 2016
Chapter 1:
DDR3 and DDR2 SDRAM Memory Interface Solution
ECC Self-Test Functionality
Under normal operating conditions, the ECC part of the data written to the DRAM array is
not visible at the user interface. This can be problematic for system self-test because there
is no way to test the bits in the DRAM array corresponding to the ECC bits. There is also no
way to send errors to test the ECC generation and correction logic.
Controlled by the top-level parameter ECC_TEST, a DRAM array test mode can be
generated. When the ECC_TEST parameter is “ON,” the entire width of the DQ data bus is
extended through the read and write buffers in the user interface. When ECC_TEST is “ON,”
the ECC correct enable is deasserted.
To write arbitrary data into both the data and ECC parts of the DRAM array, write the desired
data into the extended-width write data FIFO, and assert the corresponding
app_raw_not_ecc_i
bit with the data. The
app_raw_not_ecc_i
is seven bits wide (four
bits in 2:1 mode), allowing individual ECC blocks to be written with raw data in the ECC bits,
or the normal computed ECC bits. In this way, any arbitrary pattern can be written into the
DRAM array.
In the read interface, the extended data appears with the normal data. However, the
corrector might be trying to “correct” the read data. This is probably not desired during
array pattern test, and hence the
app_correct_en_i
should be set to zero to disable
correction.
With the above two features, array pattern test can be achieved. ECC generation logic can
be tested by writing data patterns but not asserting
app_raw_not_ecc_i
and deasserting
app_correct_en_i
. The data along with the computed ECC bits can be read out and
compared. ECC decode correct logic can be tested by asserting
app_correct_en_i
and
writing the desired raw pattern as described above. When the data is read back, the
operation of decode correct can be observed.
app_ecc_single_err[7:0]
Output
This signal is applicable when ECC is enabled and is
valid along with app_rd_data_vali. The
app_ecc_single_err signal is non-zero if the read data
from the external memory has a single bit error per
beat of the read burst.
app_raw_not_ecc_i[7:0]
Input
This signal is applicable when ECC_TEST is enabled
(“ON”). It is valid along with app_rd_data_valid. This
signal is asserted to control the individual blocks to be
written with raw data in the ECC bits.
This signal is four bits wide in 2:1 mode.
app_wdf_mask[APP_MASK_WIDTH – 1:0]
Input
This signal provides the mask for app_wdf_data[].
Note:
The MIG generated sim_tb_top.v module has error injection logic on DQ[0] bit. Whenever ECC is enabled, the DQ[0] bit
is corrupted with error injection. This results in app_ecc_single_err bits toggling for each read data transaction.
Table 1-56:
User Interface for ECC Operation
(Cont’d)
Signal
Direction
Description