Nios® V Processor: Lockstep Implementation

ID 833274
Date 10/07/2024
Public
Document Table of Contents

6.6. Detecting Faults

The fRSmartComp enters the FCS state after it detects a fault and generates responses. Two different mechanisms communicate the fRSmartComp responses to the System Supervisor: polling or interrupt.

  • Polling involves the System Supervisor continually checking the status of fRSmartComp.
  • Interrupt allows fRSmartComp to signal when it needs immediate attention from the System Supervisor (i.e. fRSmartComp detects a fault).

Altera recommends applying the interrupt mechanism for better execution efficiency in the System Supervisor. Alternatively, you can opt for the polling mechanism for simplicity.

Table 65.   fRSmartComp Response to Faults
Response Description Implementation Mechanism
Generate ALARMS Generates sticky alarms in the ERRCTRL_FNGIALARMS register.
  • Always enabled
  • Can be masked using ERRCTRL_MASK registers.
Polling
Generate signals in the System Interface (Alarm) Delivers a summary of Error-type, Warning-type, and Info-type alarms.
  • Always enabled
  • ERRCTRL_ROUT registers determine the type of each alarm.
Polling
Generate interrupt in System Interface Generates interrupt under a specific condition.
  • Disabled at default
  • ERRCTRL_INTREQ_CONF registers determine the type of alarm to trigger the interrupt.
Interrupt

Depending on the alarm, the System Supervisor may perform further fault identification action to decide dedicated failure control actions.

Table 66.  Identify Faults based on Alarms
Alarm Status Identification Action
ALARM0 Mismatch detected. Read the ERRCTRL_FNGICMPCTXT0 register to identify the affected slices.
ALARM1 Mismatch detected.
ALARM2

Mismatch detected. But there is a conflict between the Main and Second comparators.

Starts Self-diagnostic comparator, and pending ALARM3 or ALARM4.

ALARM3

Self-diagnostic compactor determines that the fault is from fRSmartComp. It is a false positive fault.

ALARM4

Self-diagnostic compactor determines that the fault is from the CPU. It is true positive fault.

ALARM16 Timeout alarm

You can identify the fault as:

  • Either no timeout acknowledgement from System Supervisor, or
  • fRSmartComp unable to receive the acknowledgement.
ALARM17 ENABLE commands exceed counter threshold

You can identify the fault as fRSmartComp frequently enters DISABLED and is enabled by the System Supervisor. It may be caused by a lenient failure control action.

ALARM19
  • Usage rules violation (e.g. wrong key)
  • Self-Diagnostic (internal diagnostics)
Read the ERRCTRL_FNGICTXT4 register to identify the internal errors.

Others

No alarms are active. No action is needed.