Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

6.3.2.3. Minimal Test System

Whether you are creating your first embedded system in a FPGA, or are debugging a complex issue, you should always begin with a minimal system. To minimize the probability of signal integrity issues, reduce the pincount of your system to the absolute minimal number of required pins. In an embedded design that includes the Nios® II processor, the minimal pincount might be clock and reset signals. Such a system might include the following the following components:

  • Nios® II processor (with a level 1 debug core)
  • On-chip memory
  • JTAG UART
  • System ID core

Using these four components you can create a functioning embedded system including debug and terminal access. To simplify your debug process, you should use a Nios® II processor that does not contain a data cache. The Nios® II/e core does not include data caches. The Nios® II/f core can also be configured without a data cache. The figure below illustrates a minimal system. In this system, you have to route only the clock pin and reset pins, because the JTAG signals are automatically connected by the Intel® Quartus® Prime software.

Figure 263. Simple Test System

You can use the Nios® II JTAG debug module to download software to the processor. Before testing any additional interfaces you should execute a small program that prints a message to the terminal to verify that your minimal system is functioning properly.

After you verify that the simple test system functions properly, archive the design. This design provides a stable starting point to which to add additional components as verification proceeds. In this system, you can use any of the following for testing:

  • A Nios® II processor
  • The Signal Tap II embedded logic analyzer
  • An external logic interface
  • Signal Probe
  • A direct memory access (DMA) engine
  • In-system updating of memory and constants

The Nios® II processor is not capable of stress testing high speed memory devices. Intel recommends that you use a DMA engine to stress test memories. A stress test should access memory as frequently as possible, performing continuous reads or writes. Typically, the most problematic access sequence for high-speed memory involves the bus turnaround between read and write accesses. You can test these cases by connecting the DMA read and write masters to the same memory and transferring the contents from one location to another, as shown below.

Figure 264. Using a DMA to Stress Test Memory Devices

By modifying the arbitration share values for each master to memory connection, you can control the sequence. To alternate reads and writes, you can use an arbitration share of one for each DMA master port. To perform two reads followed by two writes, use an arbitration value of two for each DMA master port. To create more complicated access sequences you can create a custom master.