This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS4357 "transaction ECC" and "transaction parity" test.

Hello forum team,

it is highly recommended in Section 5.11.5 and 5.11.6 of TMS570LS4357 safety manual (SPNU574) to use "transaction ECC" and "transaction parity".

According to the answer to the previous question I asked, transaction parity is not covered by the CPU interconnect self test (described in TRM SPNU563, Section 3.3.2 "How to Initiate Self-test Sequence").

http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/359048/1260592.aspx

Question 1: Is Transaction ECC tested by the CPU interconnect self test? If not, how to test this feature?

Question 2: I have started the transaction parity test by setting SCMCNTRL to 0x0A050505 as described in section 3.3.1 in the TRM. After the store instruction, I see that 4 flags in ESM are set: ESM1.52, ESM1.70, ESM2.7, ESM2.17. Why is ESM1.53 (Global parity error) not set?

Question 3: Extract from TRM section 3.3.1:

"The interconnect also output an inverted polarity for output control and address signals. Thus, master and slave IP connected to interconnect could potentially generate parity error as well. ... You should clear all parity error status bits residing in master IP, slave IP, or interconnect status registers."

How can I make sure that all master and slave status registers are cleared? Is it enough to check the status registers of the masters and slaves which are shown in the ESM flags? For example, ESM1.52 implies that I shall clear the status register SDC_STATUS, ESM1.70 ---> DMA, ESM2.7 --> L2RAMW, and ESM2.17 --> Flash. Is there any IPs which may store parity status but is not reflected in ESM flags? Usually a new error or error address can't be stored/flagged if an old error is not cleared. Therefore I must ensure all flags triggered by the transaction parity self test are cleared. That's the reason I ask this question.

 

Thank you and best regards,

 

Libo

  • Hi Libo,

      I'm terribly sorry that this post was assigned to me for two weeks and I totally missed it. Please find my answers inline.

    Question 1: Is Transaction ECC tested by the CPU interconnect self test? If not, how to test this feature?

    Charles>> There are two ECC blocks inside the CPU interconnect. But these two ECC blocks are not covered by the self test. Let me explain a bit. To make it simple for you to understand I will just say that there is the inner CPU interconnect which is further wrapped around by additional logic. This outer wrapper includes also the two ECC blocks. However, the selftest is only done on the inner CPU interconnect. The logic at the wrapper side is not subject to the interconnect selftest. You can first write mismatched data and ECC pair to the L2SRAM first and then use the DMA PortA to read from the test address. It should result in ECC error that you can observe in the ESM. 

    Question 2: I have started the transaction parity test by setting SCMCNTRL to 0x0A050505 as described in section 3.3.1 in the TRM. After the store instruction, I see that 4 flags in ESM are set: ESM1.52, ESM1.70, ESM2.7, ESM2.17. Why is ESM1.53 (Global parity error) not set?

    Charles>> As mentioned, the selftest does not involve the parity and ECC diagnostic that are present in the wrapper logic around the interconnect and therefore the global parity error is not asserted.

    Question 3: Extract from TRM section 3.3.1:

    "The interconnect also output an inverted polarity for output control and address signals. Thus, master and slave IP connected to interconnect could potentially generate parity error as well. ... You should clear all parity error status bits residing in master IP, slave IP, or interconnect status registers."

    How can I make sure that all master and slave status registers are cleared? Is it enough to check the status registers of the masters and slaves which are shown in the ESM flags? For example, ESM1.52 implies that I shall clear the status register SDC_STATUS, ESM1.70 ---> DMA, ESM2.7 --> L2RAMW, and ESM2.17 --> Flash. Is there any IPs which may store parity status but is not reflected in ESM flags? Usually a new error or error address can't be stored/flagged if an old error is not cleared. Therefore I must ensure all flags triggered by the transaction parity self test are cleared. That's the reason I ask this question.

    Charles>> Yes, please clear these parity error flags in DMA, L2FMC and L2RAMW. There are no other modules on the CPU interconnect that will set parity error flags. 

  • Hi Charles,

    thanks for following up this thread.

    Q2 and Q3 are clear now.

    Q1: As RAM ECC in 4357 device can't be disabled. I assume you meant to set the diagnostic registers. I set the register DIAG_DATGA_VECTOR_H and DIAG_DATGA_VECTOR_L both to 0x0, and DIAG_ECC to 0xF (double bit error in ECC value), RAM_TEST to 0x4A (test mode, inequality), then I configured a DMA transaction to read from RAM. I supposed that the read access will be redirected to the diagnostic register since RAM is in test mode. But after the transaction, I don't see any ESM flag is asserted. Any comment here?

    Thank you!

    Libo

  • Hi Libo,

      I'm  looking into this. I will get back to you.

  • Hi Libo,

      To test the ECC logic (built inside the CPU interconnect) for the DMA master or the PS_SCR_M master, below are the steps I recommend.

    1. Write 0x0A0A to the IP1ECCERREN register in the SYS2 frame; This will enable error detected by the interconnect ECC logic to be routed to the EPC module.

     2. Enable write to the L2RAM ECC space by writing a 1 to the bit 8 of the RAMCTRL register in the L2RAMW module

     3. Use the CPU to write some value (i.e. 0x12345678) to the L2SRAM. Note that the CPU will write the corresponding ECC to the L2RAMW as well.

     4. Perform an XOR on any of the two bits of the ECC value and write to the ECC space starting at 0x08400000. This is to create an uncorrectable condition. If you want to test for single bit error then you will only flip one of the bits.

     5. Setup your DMA to transfer from L2RAM at 0x08000000 to another L2RAM location.

     6. Use the s/w trigger to start the transfer.

     After the transfer you can check the EPC module. You should see the UERR flag set in the UERRSTAT register in the EPC module. You can also check the ESM GP2.21 which is the EPC uncorrectable error.

  • Hi Libo,
    Do you have a chance to follow the listed steps to test the ECC logic inside the CPU interconnect?
  • Hi Charles,

    sorry that I was busy with other tasks and came back later to this topic. Yes, I just tested the solution you have suggested. I can see ESM2.3 and ESM2.21 are both asserted. EPC.UerrStat is 0x1. So this issue is solved and I will close this thread.

    Thank you and best regards,

    Libo
  • Hi Libo, Glad that the solution works for you.