Adding other Peripherals - ArrowElectronics/arrow-soc-workshops GitHub Wiki

Peripherals in the GHRD are added in this section and the finishing touches are done to the Platform Designer build.

The peripherals that will be added:
Avalon MM Pipeline Bridge
Push Button IP
DIP Switch IP
LED IP
Onchip Memory
JTAG UART
Interrupt Latency Counter
System ID
JTAG to Avalon Master Bridges
Interrupt Capture Module
In-System Sources and Probes
Assign Base Addresses and Interrupt Numbers

All of the peripherals will be added before any connections are made. Because they are not connected, errors in red will appear in the Messages window. Ignore these for now, they will all go away after the connections, addresses, and interrupts are assigned at the end of this section.

Add Avalon MM Pipeline Bridge

  • Type "pipeline" in the IP Catalog search bar to filter the component library
  • In the IP Catalog under Basic Functions > Bridges and Adaptors > Memory Mapped find the Avlaon-MM Pipeline Bridge
  • Double-click it to add it to the System Contents
  • The dialog box for the component settings will be displayed
  • Check the box for Use automatically-determined address width
  • Leave the rest of the setting at their default
  • Click Finish
  • Leave the default name mm_bridge_0

Add Push Button IP

-Find the PIO (Parallel I/O) Intel FPGA IP in the IP Catalog.

  • Double-click it to add it to the System Contents.
  • Set the Width to 4 and the Direction to Input
  • In the Edge capture register section check the Synchronously capture box and set the Edge Type to FALLING
  • Check the Generate IRQ box and set the IRQ Type to EDGE
  • Click Finish
  • Rename it button_pio. To do this, highlight the peripheral and either hit F2 or right-click and select Rename.
  • Double-Click in the Export column of external_connections and press the enter key to accept the default export name.

Add DIP Switch IP

  • Type "pio" in the IP Catalog search bar to filter the component library.
  • In the IP Catalog under Processors and Peripherals > Peripherals find the PIO (Parallel I/O) Intel FPGA IP
  • Double-click it to add it to the System Contents.
  • Set the Width to 4 and the Direction to Input
  • Check both boxes in the Edge capture register section and set the Edge Typ: to ANY
  • Check the Generate IRQ box and set the IRQ Type: to EDGE
  • Click Finish.
  • Rename it dipsw_pio.
  • Double-Click in the Export column of external_connections and press the enter key to accept the default export name.

Add LED IP

-Find the PIO (Parallel I/O) Intel FPGA IP in the IP Catalog.

  • Double-click it to add it to the System Contents.
  • Set the Width to 4 and the Direction to Output
  • Click Finish
  • Rename it led_pio
  • Double-Click in the Export column of external_connections and press the enter key to accept the default export name.

Add Onchip Memory

  • Type "onchip" in the IP Catalog search bar to filter the component library.
  • In the IP Catalog under Basic Functions > On Chip Memory find the On Chip Memory (RAM or ROM) Intel FPGA IP
  • Double-click it to add it to the System Contents
  • Set the S1 Data width to 64 and the Total memory size to 65536 bytes
  • Leave the rest of the setting at their default
  • Click Finish
  • Leave the default name onchip_memory2_0

Add JTAG UART

  • Type "jtag_uart" in the IP Catalog search bar to filter the component library.
  • In the IP Catalog under Interface Protocols > Serial find the JTAG UART Intel FPGA IP
  • Double-click it to add it to the System Contents
  • Leave the default settings
  • Click Finish
  • Rename it jtag_uart

Add Interrupt Latency Counter

  • Type "interrupt" in the IP Catalog search bar to filter the component library
  • In the IP Catalog under Processors and Peripherals > Inter-Process Communication find the Interrupt Latency Counter Intel FPGA IP
  • Double-click it to add it to the System Contents
  • Change the IRQ_PORT_COUNT to 3
  • Leave the rest of the setting at their default
  • Click Finish
  • Rename it ILC

Add the System ID Peripheral

  • Type "system id" in the IP Catalog search bar to filter the component library.
  • In the IP Catalog under Basic Functions > Simulation; Debug and Verfication > Debug and Performance find the System ID Peripheral Intel FPGA IP
  • Double-click it to add it to the System Contents.
  • In the wizard, make the following settings and change the 32 bit System ID parameter to 0x000015d0
  • Click Finish.
  • Rename the peripheral to sysid_qsys.

Add JTAG to Avalon Master Bridges

  • Type "jtag" in the IP Catalog search bar to filter the component library.
  • In the IP Catalog under Basic Functions > Bridges and Adaptors > Memory Mapped find the JTAG to Avalon Master Bridge
  • Double-click it to add it to the System Contents.
  • Click Finish
  • Repeat this two more time to create a total of three JTAG to Avalon Master Bridges
  • Rename them as follows: fpga_only_master, f2sdram_only_master, and hps_only_master

Add Interrupt Capture Module

  • In the IP Catalog under Other find the Interrupt Capture Module
  • Double-click it to add it to the System Contents
  • Leave the settings at their default
  • Click Finish
  • Leave the default name intr_capturer_0

Add In-System Sources and Probes

  • Type "probes" in the IP Catalog search bar to filter the component library
  • In the IP Catalog under Basic Functions > Simulation; Debug and Verification > Debug and Performance > Intel FPGA In-System Sources & Probes find the Intel FPGA In-System Sources & Probes
  • Double-click it to add it to the System Contents
  • Change the The 'Instance ID' of this instance (optional) to RST
  • Change the Probe Port Width[0..512] to 0
  • Change the Source Port Width[0..512] to 3
  • Check the box for Use Source Clock
  • Leave the rest of the setting at their default
  • Click Finish
  • Leave the default name in_system_sources_probes_0
  • Double-Click in the Export column of sources, type "issp_hps_resets", then press the enter

Make System Connections

  • At this point all the peripherals have been added to the system. The next step is to connect the clock, reset, master, and slave buses
  • There are two methods for establishing a connection:
    1. By clicking the small circle that intersects the horizontal and vertical bus lines.
    2. Right-clicking the component, select Connections, and then select the bus(es) desired.
  • As an example, for the sysid_qsys peripheral:
    • Connect the clk port to clk_0/clk spine
    • Connect the reset port to the clk_0/clk_reset spine.
    • Connect the control_slave bus to both the fpga_only_master.master and mm_bridge_0.m0 buses.
  • Use the diagram below to make these system connections
  • There are many connections, and for an orderly process of going about this it is recommended that the user start with the left-most vertical spine (clk_0.clk), go down making all connections, then go to the next vertical spine. Note that there are several master buses that have no connections: hps_0.hsf_reset, hps_0.hsf_axi_master, and hps_0.f2h_irq1.

Assign Base Addresses and Interrupt Numbers

Normally, IP base addresses are assigned by performing this step: From the Platform Designer menu bar, select System -> Assign Base Addresses.
BUT in this case, we need to assign the base addresses manually and lock them because the Linux device tree is expecting them to be assigned at specific addresses. To do this double-click the address in the Base column and modify it, then click the open lock icon to the left of it to lock the address.

Make the following assignments

Port Base Address Interrupt (if applicable)
mm_bridge_0 0x0000_0000 N/A
button_pio 0x0001_00c0 IRQ #1
dipsw_pio 0x0001_0080 IRQ #0
led_pio 0x0001_0040 N/A
onchip_memory2_0 0x0000_0000 N/A
jtag_uart 0x0002_0000 IRQ #2
ILC 0x0004_0000 N/A
sysid_qsys 0x0001_0000 N/A
intr_capturer_0 0x0003_0000 N/A

Specify Interconnect Requirements

There are a few directives that Platform Designer requires in order to generate the design.

  • Click on the Interconnect Requirements tab
  • Change the Limit interconnect pipeline stages to to 3
  • Change the last requirement to reflect that shown in the image below. This will allow the hps_only_master secure access to the hps memory map

Conclude settings in Platform Designer

If there are no messages in red color (or error messages), do the following:

  • Click the Generate HDL button in the bottom right of the window
  • Click Generate in the Generation window that pops up
  • Click Close in the Save System window
  • Click Close when the Generate window finishes
  • Optionally, close the Platform Designer by clicking Finish

If there are error messages in red then you very likely made a mistake or missed something. Read the message to understand the location and nature of the problem to help figure how to fix.


Next - Creating Top-Level Design
Back to Creating Processor System
Back to GHRD top