Other Parts Discussed in Thread: HALCOGEN
I'm using the HalCoGen code that runs PBIST on the CPU RAM. I have two problems. The first problem is that if the test should fail, there's no way to record the status and then continue running. It calls memoryPort1TestFailNotification, but then the RAM is completely overwritten and any status is lost. Since PBIST is run agian on different memories, even the status registers are lost.
I think I solved the first problem by re-arranging the HalCoGen code so that the CPU RAM test is run, then memoryInit(0x1) is called, and then __cmain is called. After that, the results of the RAM test should still be in the PBIST registers, so pbistIsTestPassed should return the result. Finally, the rest of the initialization code (and POST) is called from main(). Does that sound like a reasonable way to re-arrange the code?
The second problem is that I don't have a way to verify that the PBIST is actually testing the CPU RAM. The pbistSelfCheck function verifies that the PBIST controller can generate a failure, but I need to force a CPU RAM test failure to verify that the code works properly and the PBIST is doing its job. Is there a way to do that? I tried changing the code that waits for PBIST to complete to this:
/* Wait for PBIST for CPU RAM to be completed */
while((!pbistIsTestCompleted()) == TRUE)
{
MyVolatileVariable++;
}/* Wait */
But that doesn't cause the PBIST RAM test to fail even though MyVolatileVariable is clearly overwritten by the test.