1. About the Nios® V Processor Lockstep
2. Overview
3. Controlling the Nios® V Processor Lockstep
4. Programming Model
5. Signals, Interfaces, and Build Parameters
6. Using Nios® V Processor Lock Step
A. Document Revision History for the Nios® V Processor: Lockstep Implementation User Guide
B. Appendix
4.4.1. CPUs’ Reset Control Register - DCLSM_CPURC
4.4.2. DCLSM Basic Control Register - DCLSM_CTRL
4.4.3. DCLSM Blind Window Control Register - DCLSM_BWCR
4.4.4. All Alarms’ Prior Alarms’ Fault Injection Register - ERRCTRL_ALL_ALARMS_PRIOR_AFI
4.4.5. INTREQ Configuration Register - ERRCTRL_INTREQ_CONF
4.4.6. Timeout Deadline and Status Register - ERRCTRL_TIMEOUT
4.4.7. Timeout Acknowledgment Register - ERRCTRL_TIMEOUT_ACK
4.4.8. Enable Key fRSmartComp Control Register - ERRCTRL_ENABLE_KEY
4.4.9. Root Fault Injection Control register - ERRCTRL_ROOT_INJ
4.4.10. Alarm Fault Injection Control register - ERRCTRL_ALARM_INJ
4.4.11. Event Mask Configuration register - ERRCTRL_MASKA and ERRCTRL_MASKB
4.4.12. Alarm Routing Configuration register - ERRCTRL_ROUTA and ERRCTRL_ROUTB
4.4.13. Error Controller PGO LOG Reset Control register - ERRCTRL_PGOLOGRST
4.4.14. PGO0 and PGO4 Configuration registers - ERRCTRL_PGO0 and ERRCTRL_PGO4
4.4.15. FN_MODEIN Control Register - ERRCTRL_FNMODEIN
4.4.16. FN_MODEOUT register - ERRCTRL_FNMODEOUT
4.4.17. All Alarms After Fault Injection - ERRCTRL_FNGIALARMS
4.4.18. Error Controller Context Register - ERRCTRL_FNGICTXT4
4.4.19. CMP Mismatch CONTEXT Registers - ERRCTRL_FNGICMPCTXT0 … ERRCTRL_FNGICMPCTXT3
4.4.20. STATISTICS registers: ERRCTRL_FNGISTAT0 and ERRCTRL_FNGISTAT4
4.4.21. State register - ERRCTRL_FNPERIPHGI4
6.7.4. UC_04: Fail Safe after Fault Discrimination
You can adopt this scenario to achieve a specific level of system availability as an alternative to basic UC_01.
When the fRSmartComp comparator detects a fault, it attempts to restart the system to differentiate between a permanent and a transient fault using Extended Reset Control. This process assesses whether the system can smoothly resume operations after the reset, assuming a transient fault has occurred.
This use case outlines the following steps:
- The comparator flags a mismatch due to a fault in one of the two CPUs.
- The fault is categorized as WARNING by fRSmartComp.
- The System Supervisor uses the WARNING information to put the system in a temporary safe state.
- fRSmartComp generates the first CPU reset request to Reset Controller.
- Reset Controller triggers a warm reset to the two CPUs (restarting them).
- If it is a transient fault, the following steps occur:
- The fault disappears.
- The processor application restarts to normal execution.
- If it is a permanent fault, the following steps occur:
- The fault is detected again, causing second reset.
- The programmable Reset counter threshold (configured as 1) is met.
- The fault is categorized as ERROR by fRSmartComp.
- fRSmartComp sets the primary OKNOK output to NOT_OK.
- System Supervisor uses the NOT_OK status to put the system in safe state.
- The system is permanently kept in safe state mode.
The following Flow Diagram shows UC_04's detailed behaviour. For this UC_04 example, it implements the Extended Reset Control and RS_05. To simplify the flow diagram, the fRSmartComp configurations are labeled as CONF_2:
- Configure ALARM severity.
- Set ALARM1 to WARNING
- Set ALARM16 to ERROR
- Set ALARM18 to ERROR
- Set RST_COUNT as 1 to generate alarms after two resets.
- Transient fault results in one reset.
- Permanent fault results in two resets.
- Set RRACM as 2’b10 to enable CPUs reset request after mismatch.
- If INTREQ signal is used, set INTREQ configuration as 6’b011001 to generate an interrupt upon WARNING.
Figure 27. Fail Safe after Fault Discrimination Flowchart Diagram
Note: Clear the LOG information before enabling fRSmartComp, because the LOGS information is sticky. Optionally, System Supervisor can take precautionary actions, such as record system information after the Host CPU is back online.