Nios® V Processor: Lockstep Implementation

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

3.3.3. Downloading the CPU Software

By default, the Lockstep solution begins operating under the environment when the CPU application boots from a memory-initialized On-Chip Memory or Tightly Coupled Memory.

If the Nios® V processor waits for a CPU software download before running, Altera recommends configuring the fRSmartComp to support the CPU software download. Nios® V processor supports three ways to download the CPU software onto the target memory.

Table 24.  Downloading the CPU Software
CPU Software Download Description fRSmartComp Configuration
JTAG Download 1

Using the Host CPU in Debug mode and download the CPU software onto the memory

  • Using Ashling RiscFree* IDE for Intel® FPGA, or
  • niosv-download executable

Altera recommends you to put the fRSmartComp in SILENT mode. As such, the timeout alarm is automatically masked. Note that the comparator is also stopped.

Or,

If the download times are slower than the Timeout, Altera recommends to configure and synthesize fRSmartComp with timeout OFF after reset (setting Default Timeout Period = 0).

JTAG Download 2

Use a dedicated JTAG-to- Avalon® Master bridge and download the CPU software onto the memory. This download typically lasts a few seconds to a few minutes.

During the download, the CPU runs whatever code is in its memory (from the reset vector). Therefore, for safety reasons, this case should only be used for development, not production.

Nios® V Bootloader

A simple software bootloader transfers code from the Flash memory (on-chip or off-chip) to internal SRAM during runtime.

If the boot times are slower than the Timeout, you can configure and synthesize fRSmartComp with timeout OFF after reset (setting Default Timeout Period = 0).

As these phases are not safety-relevant, there is no safety issue. After the boot/download phases complete, according to the system-level safety analysis (e.g., if no other timeout/watchdog mechanisms are present), the software must reactivate the Timeout with the desired deadline through the Configuration Interface.

Note that with timeout OFF, there is no automatic timeout in the DISABLED state. To activate it, you need a specific write to the ERRCTRL_TIMEOUT register.
Figure 17. Safety Considerations During the Nios V Boot/Download/Run Phase