This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > FPGA Technical Tutorials > The Zynq Book Tutorials > Next Steps in Zynq SoC Design > Creating a Zynq System with Interrupts in Vivado

Creating a Zynq System with Interrupts in Vivado

FONT SIZE : AAA

In this exercise we will create a simple Zynq embedded system which implements two General Purpose Input/Output (GPIO) controllers in the PL of the Zynq device on the ZedBoard, one of which uses the push buttons to generate interrupts. The other GPIO controller will connect to the LEDs. Both will also be connected to the Zynq processor via an AXI bus connection, allowing the LEDs to be controlled by a software application which we will create in Exercise 2C.

(a) In the Flow Navigator window, select Create Block Design from the IP Integrator section, as in Figure 2.4:

Creating a new Block Design in Flow Navigator.png

The Create Block Design dialogue will open.

(b) Enter zynq_interrupt_system in the Design name box, as in Figure 2.5:

Create Block Design dialogue.png

Click OK. The Vivado IP Integrator Diagram canvas will open in the Workspace.

The first block that we will add to our design will be a Zynq Processing System.

Exercise 2B: Creating a Zynq System with Interrupts in Vivado

(c) In the Vivado IP Integrator Diagram canvas, right-click anywhere and select Add IP, as in Figure 2.6.

Add IP option.png

Alternatively, select the Add IP option from the information message at the top of the canvas, shown in Figure 2.7.

Add IP option in IP Integrator canvas information message.png

The pop-up IP Catalog window will open, as in Figure 2.8.

Pop-up IP Catalog window.png

(d) Enter zynq in the search field and select the ZYNQ7 Processing System, ensuring that you select the option for Version 5.4, as shown in Figure 2.9, and press the Enter key on your keyboard.

Adding ZYNQ7 Processing System from IP Catalog.png

As in the previous tutorial, the next step is to connect the DDR and FIXED_IO interface ports on the Zynq PS to the top-level interface ports on the design.

(e) Select the Run Block Automation option from the Designer Assistance message at the top of the Diagram window. Select OK, ensuring that the option to Apply Board Preset is selected, to generate the external connections for both the DDR and FIXED_IO interfaces, and apply the relevant board presets.

Your block diagram should now resemble Figure 2.10.

ZYNQ7 Processing System external connections-.png

Now that the main Zynq PS has been added to our design and configured, we can now add further blocks which will be placed in the PL to add functionality to the system. In this case we require an AXI GPIO block for the LEDs and another for the push buttons.


(f) Right-click in an empty area of the Diagram window and select Add IP. Enter GPIO in the search field and add an instance of the AXI GPIO IP. Repeat this procedure to add a second AXI GPIO block to the design.

We will now use the IP Integrator Designer Assistance tool to automate the connection of the AXI GPIO blocks to the ZYNQ7 Processing System.

(g) Click Run Connection Automation from the Designer Assistance message at the top of the Diagram window and select /axi_gpio_0/S_AXI, as shown Figure 2.11.

Run Block Automation - GPIOinstance 1.png

Click OK to ensure automatic clock connection, which adds the Processor System Reset Module and the AXI Interconnect blocks.

(h) Click Run Connection Automation from the Designer Automation message at the top of the Diagram window and select /axi_gpio_0/GPIO.  The Run Connection Automation dialogue will open, as in Figure 2.12. Select btns_5bits from the drop-down menu, and click OK.

Run Connection Automation dialogue — GPIO.png

(i) Repeat steps (g) and (h) for the second GPIO block, this time selecting leds_8bits for / axi_gpio_1/GPIO.

Zynq processor system.png

You will now have a system that is similar to Figure 2.13. We now need to configure the system to utilise hardware interrupts from the push buttons to trigger functions in the Zynq PS.

(j) Double--click on the GPIO block connected to the push buttons, axi_gpio_0, to open the Recustomize IP window,.

Enabling GPIO interrupts.png

Click the IP Configuration tab and enable interrupts from the push buttons by clicking in the box highlighted in Figure 2.14 and click OK. This will add an additional output port for the interrupt request to the GPIO block as in Figure 2.15.

GPIO block with interrupt port.png

Now we must configure the Zynq PS to accept interrupt requests.

(k) Double-click on the Zynq PS block, processing_system7_0, to open the Re-Customize IP window.

(l) Select Interrupts from the Page Navigator on the left-hand side and expand the menu on the right as in Figure 2.16. Since we want to allow interrupts from the programmable logic to the processing system, tick the box to enable Fabric Interrupts, then click to enable the shared interrupt port as in Figure 2.16. This means interrupts from the PL can be connected to the interrupt controller within the Zynq PS. Click OK.

Configuring Zynq PS to utilise interrupts.png

(m) Make a connection between the interrupt request of the GPIO block and the newly created interrupt port of the Zynq PS, highlighted in Figure 2.17.

Zynq PS with interrupt port.png

Your final design should resemble Figure 2.18, although the positioning of your blocks may be different.

Zynq processor system with interrupts.png

(n) Save your design by selecting File > Save Block Design from the Menu Bar. 

(o) Validate the design by selecting Tools > Validate Design from the Menu Bar. This will run a Design-Rule-Check (DRC).  Alternatively, select the Validate Design button, , from the Main Toolbar. 

(p) A Validate Design dialogue should appear to confirm that validation of the design was successful. Click OK, to dismiss the message.

With the design successfully validated, we can now move on to generating the HDL design files for the system. The procedure here is identical to the previous tutorial, First Designs on Zynq.

(q) In the Sources window of the Data Windows pane, select the Sources tab. 

(r) Right-click on the top-level system design, which in this case is zynq_interrupt_system, and select Create HDL Wrapper

The Create HDL Wrapper dialogue window will open. Accept the default option specifying that VIvado should manage the wrapper and click OK.

With all HDL design files generated, the next step in Vivado is to implement our design and generate a bitstream file.

(s) In Flow Navigator, click Generate Bitstream from the Program and Debug section.

If a dialogue window appears prompting you to save your design, click Save. The combination of running the synthesis, implementation and bitstream generation processes back-to-back may take a few minutes, depending on the power of your computer system.

(t) Once the bitstream generation is complete a dialogue window will open to inform you that the process has been completed successfully, as in Figure 2.19.

Bitstream Generation completion dialogue window.png

Select Open Implemented Design, and click OK.

At this point you will be presented with the Device view, where you can see the PL resources which are utilised by the design.

With the bitstream generation complete, the final step in Vivado is to export the design to the SDK, where we will create the software application that will allow the Zynq PS to control the LEDs on the ZedBoard.

(u) Select File > Export > Export Hardware for SDK. from the Menu Bar. 

(v) The Export Hardware for SDK dialogue window will open. Ensure that the options to Include bitstream and Launch SDK are selected, and Click OK.

This concludes the steps that are required in Vivado IDE. All hardware components of the system have been configured and generated. In the next exercise we will create the software application that utilises this hardware system.








  • XC4VLX60-12FF668C

    Manufacturer:Xilinx

  • FPGA Virtex-4 LX Family 59904 Cells 90nm Technology 1.2V 668-Pin FCBGA
  • Product Categories: FPGAs

    Lifecycle:Active Active

    RoHS: No RoHS

  • XC18V04PC44BRT

    Manufacturer:Xilinx

  • In-System Programmable Configuration PROMs
  • Product Categories: SCM, board

    Lifecycle:Active Active

    RoHS: -

  • XC18V04PCG44BRT

    Manufacturer:Xilinx

  • Xilinx PLCC44
  • Product Categories:

    Lifecycle:Active Active

    RoHS: -

  • XC40150XV-09BG560C

    Manufacturer:Xilinx

  • FPGA XC4000XV Family 150K Gates 12312 Cells 0.25um Technology 2.5V 560-Pin Metal BGA
  • Product Categories: FPGAs

    Lifecycle:Obsolete -

    RoHS: No RoHS

  • XC18V04VQ44I

    Manufacturer:Xilinx

  • PROM Parallel/Serial 4M-bit 3.3V 44-Pin VQFP
  • Product Categories: Memory - Configuration Proms for FPGA's

    Lifecycle:Obsolete -

    RoHS: No RoHS

Need Help?

Support

If you have any questions about the product and related issues, Please contact us.