29.12.2013 Views

Functional Description -- HPC II Controller, External Memory ... - Altera

Functional Description -- HPC II Controller, External Memory ... - Altera

Functional Description -- HPC II Controller, External Memory ... - Altera

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

emi_rm_004<br />

2013.12.16<br />

Note:<br />

Partial Writes<br />

When using ECC, you must initialize your entire memory content to zero before beginning to write<br />

to the memory. If you do not initialize the content to zero, and if you read from uninitialized memory<br />

locations without having first written to them, you will see junk data which will trigger an ECC<br />

interrupt.<br />

5-11<br />

When a single-bit or double-bit error occurs, the ECC logic triggers the ecc_interrupt signal to inform<br />

you that an ECC error has occurred. When a single-bit error occurs, the ECC logic reads the error address,<br />

and writes back the corrected data. When a double-bit error occurs, the ECC logic does not do any error<br />

correction but it asserts the avl_rdata_error signal to indicate that the data is incorrect. The<br />

avl_rdata_error signal follows the same timing as the avl_rdata_valid signal.<br />

Enabling autocorrection allows the ECC logic to delay all controller pending activities until the correction<br />

completes. You can disable autocorrection and schedule the correction manually when the controller is idle<br />

to ensure better system efficiency. To manually correct ECC errors, follow these steps:<br />

1. When an interrupt occurs, read out the SBE_ERROR register. When a single-bit error occurs, the<br />

SBE_ERROR register is equal to one.<br />

2. Read out the ERR_ADDR register.<br />

3. Correct the single-bit error by issuing a dummy write to the memory address stored in the ERR_ADDR<br />

register. A dummy write is a write request with the local_be signal zero, that triggers a partial write<br />

which is effectively a read-modify-write event. The partial write corrects the data at that address and<br />

writes it back.<br />

Partial Writes<br />

The ECC logic supports partial writes.<br />

Along with the address, data, and burst signals, the Avalon-MM interface also supports a signal vector,<br />

local_be, that is responsible for byte-enable. Every bit of this signal vector represents a byte on the databus.<br />

Thus, a logic low on any of these bits instructs the controller not to write to that particular byte, resulting<br />

in a partial write. The ECC code is calculated on all bytes of the data-bus. If any bytes are changed, the IP<br />

core must recalculate the ECC code and write the new code back to the memory.<br />

For partial writes, the ECC logic performs the following steps:<br />

1. The ECC logic sends a read command to the partial write address.<br />

2. Upon receiving a return data from the memory for the particular address, the ECC logic decodes the<br />

data, checks for errors, and then merges the corrected or correct dataword with the incoming information.<br />

3. The ECC logic issues a write to write back the updated data and the new ECC code.<br />

The following corner cases can occur:<br />

• A single-bit error during the read phase of the read-modify-write process. In this case, the IP core corrects<br />

the single-bit error first, increments the single-bit error counter and then performs a partial write to this<br />

corrected decoded data word.<br />

• A double-bit error during the read phase of the read-modify-write process. In this case, the IP core<br />

increments the double-bit error counter and issues an interrupt. The IP core writes a new write word to<br />

the location of the error. The ECC status register keeps track of the error information.<br />

The following figures show partial write operations for the controller, for full and half rate configurations,<br />

respectively.<br />

<strong>Functional</strong> <strong>Description</strong>—<strong>HPC</strong> <strong>II</strong> <strong>Controller</strong><br />

<strong>Altera</strong> Corporation<br />

Send Feedback

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!