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

Overflow Error

An overflow error is caused when a transfer buffer read is attempted but an earlier HWA instruction caused the FIFO to overflow (programming error). Follow the steps listed to inject the error.
  1. The HWAOPEN instruction is used to write HWA_CONFIG and HWA_OFFSET.
  2. Execute HWAXFER to transfer the content of HWA_STATUS, to internal buffer.
  3. Repeat Step 2 until buffer is overflowed.
  4. The HWARCV instruction is executed to observe the error.
void overflow_exception(void)
{
  __HWA_CONFIG_REG_v1 mma_config_reg;
  mma_config_reg = __gen_HWA_CONFIG_REG_v1();
  __HWA_OFFSET_REG offset_reg;
  offset_reg = __gen_HWA_OFFSET_REG();
  __HWAOPEN(mma_config_reg,offset_reg,__MMA_OPEN_FSM_RESET);
  int loop_begin = 1;
  int loop_end  = 30;
  for(;loop_begin<=loop_end;loop_begin++)
  {
    __HWAXFER(__MMA_XFER_SRC_HWA_STATUS);
    __HWAADV();
    __HWAADV();
    __HWAADV();
    __HWAADV();
  }
  __HWARCV(0);
}