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.

What is the comapare in Lockstep

Hello, This is ChaeHong Yi.

I think that the Heracules includes a lockstep processor.

I know that when Lockstep is enabled, after executing the same input signal, the results of two cores will be compared together. 
If those results are different then alarm flags in ESM module will be set. 
But the problem is that I don't know which values (registers in each cores) will be compared together. 
Is Lockstep replication to core0 from core1?
Or we have to coding each other core?

It compares each other. when consist of other code about core0 and core1(other functions, variables)??
otherwise, logic of core0 has to replicate the core1. it means ignoring current hand coding about core1??

Thank you.
Best regards.
  • Hello,

    The lockstep implementation is composed of a functional core and a checker core.  Software is written with a single core programmer's model.  The two cores are fed same input signals and the outputs are compared.

    The lockstep comparator compares the output signals of the functional core and the checker core in addition to a number of internal signals which ARM identified as critical to CPU state.  Roughly 1000 signals are compared on each core.

    Regards,

    Karl

  • Dear Karl,

    As you explained, I understand like this: If we have three cores 0, 1, 2, where core 0 is a functional core (master), core 1 and core 2 are checker cores. When we enable Lockstep in core 1 and disable lockstep in core 2 we will have a pair of functional and checker cores 0 and 1.

    To check lockstep comparator, we just need to write a program in single core style on master core (core 0), compile and execute it on core 0. We dont need to copy source code of that program to core 1. Every jobs related to checking outputs is done automatically by checker core 1. Is my thinking correct?

    Thank you very much for your help.

    Best regards,
    ChaeHong Yi

  • Hello,

    It seems there is some confusion.  There are only two CPU cores.  One is always the functional core.  The second is always the checker core.  The lockstep is hardwired and always on.  The comparator is not a CPU but a separate logic block specifically designed for this use.  

    From a debug and development perspective, you are writing software for a single CPU system.  The lockstep diagnostic is "free" other than a small amount of code for init and test of the comparator.

    Regards,

    Karl

  • Hello, Karl.

    Thank you for your kindness.

    I would like to verify this lockstep for processing error.
    There is a Fault Injection bit in some MCUs of other companies (such as Infineon), so that we can check if the operation of cores is incorrrect.


    For error processing, we would like to inject (create) faults by programming. Is it possible?

    Please tell me how to implement fault-injection for lockstep.

    Regards,

    ChaeHong Yi

  • Hello,

    The CCM (core compare module or lockstep comparator) supports a self test mode in which compare match and compare mis-match tests can be executed to check for proper comparator operation.  Error forcing is also possible on comparator inputs (error forcing mode) and outputs (self-test error forcing mode).  

    For more information, please refer to the technical reference manual for the device you are using, such as SPNU499B for the TMS570LS31x/21x products.  The CCM is described in Chapter 9 of SPNU499B.

    Regards,

    Karl