Forum Discussion
Hi,
I use the following JAM code in order to simulate CRC error on MAX10:
'EDCRC_ERROR_INJECT
ACTION ERROR_INJECT = EXECUTE;
DATA DEVICE_DATA;
BOOLEAN out[32]= $00000000;
BOOLEAN in[32] = $FFFFFFFF; 'shift in any wrong CRC value
ENDDATA;
PROCEDURE EXECUTE USES DEVICE_DATA;
BOOLEAN X = 0;
DRSTOP IDLE;
IRSTOP IDLE;
STATE IDLE;
IRSCAN 16, $015; 'shift in CHANGE_EDREG instruction
WAIT IDLE, 10 CYCLES, 50 USEC, IDLE;
DRSCAN 32, in[31..0], CAPTURE out[31..0];
WAIT IDLE, 10 CYCLES, 50 USEC, IDLE;
PRINT " ";
PRINT "Data read out from the Storage Register: ",out[31], out[30], out[29], out[28], out[27],out[26], out[25], out[24], out[23], out[22], out[21], out[20], out[19], out[18], out[17], out[16], out[15], out[14], out[13], out[12], out[11], out[10], out[9], out[8], out[7], out[6], out[5], out[4], out[3],out[2], out[1], out[0]; 'Read out correct precomputed CRC value
PRINT " ";
STATE IDLE;
EXIT 0;
ENDPROC;
The IRSCAN value is 16 because I have 2 components on JTAG chain (XIlinx + MAX10)
The error is corectly detected but if i do the same code twice, I not read the CRC that i Write the previous iteration.
If I write 0xFFFFFFFF, I read 0xFFFFFFFE during the next iteration.
In fact, I just want the write the correct CRC, the CRC read at the first time after power on in order to return in good state without CRC error.
Can you help me please.