Knowledge Base Article
Why does Nios® V/g processor experiences data corruption when it is enabled with TCM and ECC?
Description
Due to a problem in the Quartus® Prime Pro Edition Software version 26.1, data corruption might occur in Nios® V/g processor designs with tightly coupled memory (TCM) and error correction code (ECC).
Both features must be enabled to observe this problem.
It is caused by an RTL bug in the processor, which renders failure when the processor executes sw (store word), followed by sh (store halfword) or sb (store byte) instructions.
For example,
# Initially, value of Y is 0x0001CCCC.
li t0, 0x12345678
li t1, 0x200A
sw t0, 0(Z) # Store 0x12345678 word into Z
sh t1, 0(Y) # Store 0x200A into lower half of Y
|
Result |
Final value of Y |
Description |
|---|---|---|
|
Expected |
0x0001200A |
Upper-half of Y is preserved as 0x0001, while lower-half of Y is changed to 0x200A. |
|
Actual (Data Corruption) |
0x1234200A |
Upper-half of Y is corrupted to 0x1234, while lower-half of Y is changed to 0x200A. The 0x1234 is from the previous Store Word (sw) instruction. |
Resolution
To work around this problem in the Quartus® Prime Pro Edition Software version 26.1, apply either one of the solutions below:
- Disable TCM.
- Disable ECC.
This problem is scheduled to be fixed in a future release of the Quartus® Prime Pro Edition Software.