Embedded Design Handbook

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

5.3.7.2. Creating a Suitable Hardware Design

In the following steps, you open, modify, and generate a Nios® II system on which you can run the small boot copier example.

To open the example project and add on-chip ROM to the system:

  1. Verify that you have downloaded and unzipped the file described in “Hardware Design Files” on page 2 to your <project> directory on your computer.
  2. In the Intel® Quartus® Prime software, on the File menu, click Open Project, and open the <project> \niosii_ethernet_standard_<board> .qpf project file.
  3. On the Tools menu, click Platform Designer to start Platform Designer.
  4. In Platform Designer, on the System Contents tab, expand Memories and Memory Controllers, and select On-Chip Memory (RAM or ROM).
  5. Click Add to add the component to the system. Specify the following memory settings:
    1. Memory Type: ROM (Read-only)
    2. Data width: 32 bits
    3. Total memory size: 512 Bytes
      Note: The specified on-chip memory size ensures that no memory space is wasted. The smallest usable block of memory in a Cyclone III FPGA is 512 bytes (one M9K block). Although the small boot copier example requires only 200 bytes of memory, the remainder of the M9K block can be used only after you enable it. Therefore, Intel® recommends that you enable the entire block, rather than waste it.
  6. Right-click the new On-Chip Memory and click Rename. Specify a descriptive name such as boot_rom.
  7. In the Platform Designer connection matrix, ensure that the slave port of the on-chip memory is connected to the Nios® II instruction master and to the Nios® II data master, and that the reset port of the on-chip memory is connected to the reset output of the clock source.
  8. If Platform Designer reports an error in the bottom window caused by the address of the new on-chip memory overlapping another peripheral, select a suitable base address for the on-chip memory that does not overlap anything else.
  9. Modify the clock entry for the new on-chip memory to ensure that this memory is clocked by the same clock as the cpu component.
  10. To enable running the boot copier from on-chip memory, right-click the cpu component in your system and click Edit.
  11. In the Nios® II Processor settings window, set the Reset Vector Memory to boot_rom.s1 with an offset of 0x00000000.
  12. Click Finish to exit the Nios® II Processor settings window.
  13. Click Generate to generate the Platform Designer system.