SPRADS4 October   2025 TDA4VM

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Instructions
    1. 2.1 Scope
    2. 2.2 HWA Instruction Definition
    3. 2.3 Fault Injection Procedure
      1. 2.3.1 Block Diagram
      2. 2.3.2 Fault Injection: Steps
        1. 2.3.2.1 Underflow Error
        2. 2.3.2.2 Overflow Error
        3. 2.3.2.3 Offset Parity Error
        4. 2.3.2.4 Config Parity Error
          1. 2.3.2.4.1 A FSM Config Parity Error
          2. 2.3.2.4.2 B FSM Config Parity Error
          3. 2.3.2.4.3 C FSM Config Parity Error
          4. 2.3.2.4.4 X FSM Config Parity Error
        5. 2.3.2.5 C READ Error
        6. 2.3.2.6 C Write Error
  6. 3Flow Diagram
    1. 3.1 Code Changes
      1. 3.1.1 Return Hook Definition
      2. 3.1.2 Clear MMA Function
      3. 3.1.3 Sequence Test
  7. 4Summary
  8. 5References

C Write Error

A C write error occurs when there are multiple simultaneous write access to the same C matrix bank, which leads to a conflict. Use the following steps to inject this error.
  1. The HWAOPEN instruction is used to write HWA_CONFIG and HWA_OFFSET by configuring the operation as MULPLUS.
  2. Execute HWAOP and HWALDC operation in parallel.
  3. Short and frequent read and writes to c matrix bank triggers an error.
  4. The HWARCV instruction is executed to observe the error.
void c_write_error(void)
{
   int switch_period=0; 
    int repeat_op_count = 0;
    for( ;switch_period<2;switch_period++)
    {
        __HWA_CONFIG_REG_v1 config_reg = __gen_HWA_CONFIG_REG_v1();
        config_reg.C_OPERATION0 = __MMA_C_CONFIG_MULPLUS;
        config_reg.C_OPERATION1 = __MMA_C_CONFIG_MULPLUS;
        config_reg.C_CRSWPER = switch_period; //different switching period
        config_reg.C_CWSWPER  = switch_period+10000;
        __HWA_OFFSET_REG offset_reg;
        offset_reg = __gen_HWA_OFFSET_REG(); //This generates the offset register.  
        __HWAOPEN(config_reg,offset_reg,__MMA_OPEN_FSM_RESET); //This opens theHWAOPEN
        repeat_op_count = 0;
        for(;repeat_op_count<10;repeat_op_count++)
        {
        __asm(" HWALDC .L2 VB0"); //Earlier SE0++
        __asm(" ||HWAOP.S1 SA0"); //This should run them in parallel
        __HWAADV();
        __HWAADV();
        __HWAADV();
        __HWAADV();
        } 
    }
    __HWARCV(0);  //Calls the error
    __asm(" NOP");
    __asm(" NOP");
}