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.

TMS320F28377D: Simultaneous reads of the two IPC counter registers by separate CPUs during a counter wrap

Part Number: TMS320F28377D

This question is related to my previous question concerning the latching of IPCCOUNTERH when IPCCOUNTERL is being read by two processors.

What happens when CPU1 reads IPCCOUNTERH and CPU2 reads IPCCOUNTERL in the same clock cycle in the situation where IPCCOUNTERL has wrapped, and therefore IPCCOUNTERH increments?

  1. CPU1 reads IPCCOUNTERL as 0xFFFFFFFF when {IPCCOUNTERH, IPCCOUNTERL} is {0xFFFFFFFF, 0xFFFFFFFF}. IPCCOUNTERH is latched as 0xFFFFFFFF.
  2. IN THE NEXT CLOCK CYCLE
    1. CPU2 reads IPCCOUNTERL as 0x00000000 when {IPCCOUNTERH, IPCCOUNTERL} is {0x00000000, 0x00000000}. IPCCOUNTERH is latched as 0x00000000.
    2. AND CPU1 reads IPCCOUNTERH.

There is both a read (by CPU1) and an update (triggered by CPU2) of the IPCCOUNTERH register in the same clock cycle. What is the value of the read returned to CPU1? Is it the original latched value, the new latched value, or garbage?

Thanks in advance,

Iain

  • Hi,

    [/quote] What happens when CPU1 reads IPCCOUNTERH and CPU2 reads IPCCOUNTERL in the same clock cycle in the situation where IPCCOUNTERL has wrapped, and therefore IPCCOUNTERH increments? [/quote]

    Before reading IPCCOUNTERH one need to read IPCCOUNTERL and when IPCCOUNTERL is read, snapshot of IPCCOUNTERH is stored. So in this case CPU1 will read the snapshot value and not the current value which will get incremented due to CPU2 reading the IPCCOUNTERL.

    Regards,

    Vivek Singh