Configuration CRC check (Arria V GX)
This is related to my other thread. Much of the background info is the same, but I thought separate threads would help avoid confusion.
Our design (5AGXMB3G4) has a Nios II with an EPCS controller (altera_avalon_epcs_flash_controller) to interface to our configuration device (MT25QL256, using AS x1). Using quartus standard 18.1.1
We have noticed that the configuration in flash becomes corrupted over time. If we "examine" the flash with the quartus programmer, and compare the resulting jic file against the original jic used to program the flash, we generally see that the differences are very sparse, usually a few groups of four bytes set to zero near the start of the image. I've attached a screenshot where the diffs are highlighted (this is all the diffs in the entire 256Mb file).
We are investigating the reason for the corruption, but I also had questions about the behavior of the FPGAs when the configuration is corrupt. Depending on what specific parts of the configuration are cleared, we observe two different results:
Case 1: CONF_DONE stays low, nSTATUS repeatedly pulses low.
Case 2: CONF_DONE and nSTATUS release high, as if it is in user mode. But the FPGA is clearly not functioning properly. Not responding to or generating any IO signals.
So my first question is: how is case 2 possible? I was under the impression that the entire configuration bitstream is checked via CRC, so it should not enter user mode. Unfortunately, the INIT_DONE and CRC_ERROR pins are used for other functions so I can't easily use those signals to troubleshoot.
Another observation we made is that in case 1, JTAG can be used to recover the flash easily. However in case 2, JTAG does not function (the JTAG chain debug tool reports "Error: JTAG problem detected" and "Error: no device detected").
So my second question is: how is it that the (mis)configuration of the FPGA can cause JTAG to not function? After a lot of searching, the only mechanism I can find that could explain this is the Design Security Feature, but this sounds quite far fetched. I've verified that all supply voltages remain normal in all scenarios. If I hold nCONFIG low, I can detect the JTAG chain normally again. So it's not a hardware issue.