In the standard ECC mode (EN_ECC_READ = TRUE and EN_ECC_WRITE = TRUE), both encoder and decoder are enabled. During a write, 64-bit data and 8-bit ECC generated parity are stored in the array. The external parity bits are ignored. During a read, the 72-bit decoded data and parity (64-bit data and 8-bit parity) are read out, and the parity is checked against the data on DOUT.
The encoder and decoder can be accessed separately (independently) for external use in RAMB36E2 in simple dual-port mode and by extension in the FIFO36E2, both in 72-bit mode. To use the encoder by itself, the data needs to be sent through the DIN port, and the ECCPARITY output port can be sampled. To use the decoder by itself, the encoder is disabled, the data is written into the block RAM, and the corrected data and status bits are read out of the block RAM. See Block RAM and FIFO ECC Attributes.
The decoder can be used in two ways:
- To use the decoder in standard ECC mode, set (EN_ECC_WRITE = TRUE and EN_ECC_READ = TRUE).
- To use the decoder-only mode, set (EN_ECC_WRITE = FALSE and EN_ECC_READ = TRUE). The DIN data along with a user-generated parity is presented on the eight DINP ports. The data is not encoded. The read operation reads back the data on DOUT and performs the decoder parity check on the data.
The encoder can be used in two ways:
- To use the encoder in standard ECC mode, set (EN_ECC_WRITE = TRUE and EN_ECC_READ = TRUE).
- To use the encoder-only mode, set (EN_ECC_WRITE = TRUE and EN_ECC_READ = FALSE). The DIN data is presented, and the ECC encoded value of the DIN data is stored in the parity bits for every write operation. The read operation reads those eight bits without performing the encode function.
The functionality of the block RAM when using the ECC mode is described as follows:
- The block RAM ports still have independent address, clocks, and enable inputs, but one port is a dedicated write port, and the other is a dedicated read port (simple dual-port).
- DOUT represents the read data after correction.
- DOUT stays valid until the next active read operation.
- Simultaneous decoding and encoding of different read/write addresses is allowed. However, simultaneous decoding and encoding of the same read/write address is not allowed.
- In ECC configuration, the block RAM can be in either READ_FIRST, WRITE_FIRST, and NO_CHANGE mode. See also Address Collision.
AMD UltraScale™ architecture-based devices have an ECC pipeline mode. This is in addition to the optional registers on the outputs. These registers effectively pipeline the decoder for further improvement in maximum performance (FMAX ) and clock-to-out in latch mode. If turned on, the latency increases by one clock cycle because while the current address is read from the block RAM, the previous address is being decoded. The ECC pipeline register has a user accessible ENABLE control but does not have a reset control. Asserting the block RAM reset pins RSTRAM and RSTREG has no impact on this register, and the previously registered data remains in the register. When using EN_ECC_PIPE = TRUE with the FIFO, the FIFO controller always automatically manages the ECC pipeline register and the associated ECCPIPECE pin. The effective read depth of the FIFO is increase by one word, and the read clock to write flags EMPTY/PROGEMPTY deassertion latency also increase by one. However, the read to DOUT latency does not change.