Skip to content

Commit 550f30d

Browse files
Update documentation for AXI-Lite peripheral design and integration, enhancing image descriptions for clarity and context.
1 parent 4f912fc commit 550f30d

4 files changed

Lines changed: 23 additions & 21 deletions

File tree

content/learning-paths/embedded-and-microcontrollers/advanced_soc/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Design an AXI-Lite peripheral to control GPIOs
33

44
minutes_to_complete: 60
55

6+
description: Learn how to design and integrate a custom AXI-Lite peripheral with a Cortex-A9 processor on the Zybo Z7-10 board using Vivado, configuring GPIOs to control LEDs based on switch inputs.
7+
68
who_is_this_for: This is an introductory topic for software developers interested in System on Chip Design.
79

810
learning_objectives:

content/learning-paths/embedded-and-microcontrollers/advanced_soc/connecting_peripheral.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ Follow the steps outline below to connect the AXI4 peripheral you created in the
1212

1313
1. Right-click on the empty space again in the diagram and choose “Create Port...” (Ctrl+K). Create 2 ports with the following settings and names:
1414

15-
![Creating output port](images/picture15.png)
15+
![Screenshot of Vivado Create Port dialog showing settings for creating an led output port with Direction set to Output and Type set to Data, width 4 bits to connect to external LEDs on the Zybo board](images/picture15.png)
1616

1717
*Figure 3.1. Creating output port*
1818

19-
![Creating input port](images/picture16.png)
19+
![Screenshot of Vivado Create Port dialog showing settings for creating an sw input port with Direction set to Input and Type set to Data, width 4 bits to read switch states from the Zybo board](images/picture16.png)
2020

2121
*Figure 3.2. Creating input port*
2222

2323
2. Wire the “sw[3:0]” input to the “sw[3:0]” port of the “axi_gpio_asoc_0” block and the same for the “led[3:0]” output to the equivalent port of the block as shown in the diagram below. This connects them to external ports of the ZYNQ chip:
2424

25-
![Vivado block diagram](images/picture17.png)
25+
![Screenshot of Vivado block design showing the complete system with ZYNQ Processing System, AXI Interconnect, custom GPIO peripheral, and external sw and led ports wired together for switch input and LED output control](images/picture17.png)
2626

2727
*Figure 3.3. Vivado block diagram*
2828

2929
3. Two IP blocks will be generated automatically. The “Processor System Reset” IP is used to generate reset signals for different peripherals. The “AXI Interconnect” IP here is used to interconnect AXI4-Lite Subordinate and AXI Manager. Select the “Address Editor” tab next to “Diagram” and change the “64K” to “4K”. Save all your progress.
3030

31-
![Changing peripheral address settings](images/picture18.png)
31+
![Screenshot of Vivado Address Editor tab showing the axi_gpio_asoc_0 peripheral address range field where you change the default 64K allocation to 4K to efficiently use memory address space](images/picture18.png)
3232

3333
*Figure 3.4. Changing peripheral address settings*
3434

@@ -40,26 +40,26 @@ Follow the steps outline below to connect the AXI4 peripheral you created in the
4040
4141
5. Right-click the “Generate Bitstream” option in the “Flow Navigator” on the left and select “Bitstream settings”. Click the three dots next to “tcl.pre”:
4242
43-
![Changing bitstream settings](images/picture19.png)
43+
![Screenshot of Vivado Bitstream Settings dialog showing the tcl.pre field with a browse button where you specify the pins.tcl script to suppress I/O pin warnings during bitstream generation](images/picture19.png)
4444
4545
*Figure 3.5. Changing bitstream settings*
4646
4747
6. Select the “New Script” option, click the three dots next to the empty box, choose the “pins.tcl” file you created earlier and click “Ok” on all windows.
4848
Right-click the “Constraints” under the sources tab and select “Add sources”:
4949
50-
![Adding sources](images/picture20.png)
50+
![Screenshot of Vivado Sources panel showing the right-click context menu on Constraints with Add Sources option highlighted to add physical pin constraint files for the FPGA](images/picture20.png)
5151
5252
*Figure 3.6. Adding sources*
5353
5454
7. Select “Add or create constraints” and click “Next”. Select “Create File”, give any name to the file for example pin_constraints, and click “Finish”:
5555
56-
![Creating a constraints file](images/picture21.png)
56+
![Screenshot of Vivado Add or Create Constraints dialog showing the Create File option where you specify the constraint file name that will map GPIO signals to physical FPGA pins on the Zybo board](images/picture21.png)
5757
5858
*Figure 3.7. Creating a constraints file*
5959
6060
8. Expand the “Constraints” folder within the “Sources” tab and double-click the file you just created to open it. Add the following constraints from [Digilent/Zybo-Z7-10-Pmod-VGA/blob/master/src/constraints/Zybo-Z7-Master.xdc](https://github.com/Digilent/Zybo-Z7-10-Pmod-VGA/blob/master/src/constraints/Zybo-Z7-Master.xdc), and save the file:
6161
62-
![Editing constraints file](images/picture22.png)
62+
![Screenshot of Vivado XDC constraints file editor showing the PACKAGE_PIN and IOSTANDARD settings for switch and LED pins, which map the sw and led signals to specific physical pins on the Zybo Z7-10 FPGA](images/picture22.png)
6363
6464
*Figure 3.8. Editing constraints file*
6565

content/learning-paths/embedded-and-microcontrollers/advanced_soc/creating_peripheral.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ The Xilinx Vivado tools provide a simplified way to create an AXI4 peripheral. Y
1212

1313
1. Start by clicking “Tools” -> “Create and Package New IP”. Click “Next” and choose the following option:
1414

15-
![Creating AXI4 peripheral](images/picture7.png)
15+
![Screenshot of Vivado's Create and Package New IP wizard showing the Create a new AXI4 peripheral option selected, which generates template files for an AXI-compliant custom IP block](images/picture7.png)
1616

1717
*Figure 2.1. Creating AXI4 peripheral*
1818

1919
2. Give the following name to the IP (you may keep the IP location path as provided by default):
2020

21-
![Adding peripheral details](images/picture8.jpg)
21+
![Screenshot of the peripheral details dialog showing the Name field set to AUP_advanced_SoC and fields for Version, Display name, and Description where you configure the custom IP metadata](images/picture8.jpg)
2222

2323
*Figure 2.2. Adding peripheral details*
2424

2525
3. You need a Subordinate interface and four 32-bit registers for the switches and LEDs.
2626

27-
![Peripheral settings for Subordinate interface](images/picture9.png)
27+
![Screenshot of the Add Interfaces wizard showing the Subordinate interface type selected with Number of Registers set to 4 and Data Width set to 32, configuring the AXI-Lite register bank for GPIO control](images/picture9.png)
2828

2929
*Figure 2.3. Peripheral settings for Subordinate interface*
3030

@@ -36,7 +36,7 @@ These are the basic template files generated for an AXI-Lite peripheral. You can
3636

3737
5. Double-click to open the top-level Verilog file called “AUP_advanced_SoC_v1_0.v”:
3838

39-
![Editing top-level Verilog file](images/picture10.png)
39+
![Screenshot of Vivado Sources panel showing the Design Sources hierarchy with AUP_advanced_SoC_v1_0.v file highlighted, which is the top-level module that needs custom GPIO port declarations added](images/picture10.png)
4040

4141
*Figure 2.4. Editing top-level Verilog file*
4242

@@ -64,7 +64,7 @@ These are the basic template files generated for an AXI-Lite peripheral. You can
6464
```
6565
8. Save the changes in the file (Ctrl+S). Next, expand and open the other Verilog file (AUP_advanced_SoC_v1_0_S00_AXI.v) shown below:
6666
67-
![Edit the second Verilog file](images/picture11.png)
67+
![Screenshot of Vivado Sources panel showing the AUP_advanced_SoC_v1_0_S00_AXI.v file which implements the AXI-Lite slave interface logic and needs modifications for GPIO register mapping](images/picture11.png)
6868
6969
*Figure 2.5. Edit the second Verilog file*
7070
@@ -127,15 +127,15 @@ These are the basic template files generated for an AXI-Lite peripheral. You can
127127
```
128128
15. Then, click on “Settings” (under “Project Manager”) in the “Flow Navigator” menu on the left. Expand the “IP” section in the new window that appears and choose the “Repository” option.
129129
130-
![Adding IP Repository](images/picture13.png)
130+
![Screenshot of Vivado Project Settings showing the IP section expanded with Repository selected, where you add the custom IP location so Vivado can find and use the AXI peripheral you created](images/picture13.png)
131131
132132
*Figure 2.7. Adding IP Repository*
133133
134134
16. Click the “+” option under “IP Repositories” on the right and choose the AXI4 peripheral folder you created earlier (if it hasn’t already appeared) and click “Ok”. Right-click in the empty space of the “Diagram” box again and choose “Add IP”. Type “custom” in the search box and choose “custom_axi_gpio_asoc_v1_0” from the options.
135135
136136
17. Click “Run Connection Automation” and then click “OK” to connect the AXI-Lite Subordinate interface on GPIO peripheral to the AXI Manager interface on Arm processor.
137137
138-
![Connect AXI-Lite Subordinate interface (Custom IP) to AXI Manager interface](images/picture14.png)
138+
![Screenshot of Vivado block diagram showing the Run Connection Automation dialog with the S_AXI interface of the custom GPIO peripheral ready to be automatically connected to the Zynq processing system's M_AXI_GP0 master port](images/picture14.png)
139139
140140
*Figure 2.8. Connect AXI-Lite Subordinate interface (Custom IP) to AXI Manager interface*
141141

content/learning-paths/embedded-and-microcontrollers/advanced_soc/generating_bitstream.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,37 @@ In this section you will generate the bitstream for this project and write a C p
1212

1313
1. Under the “Sources” tab on the left, expand the “Design Sources” folder, right-click the design1.bd file, choose the “Create HDL Wrapper” and select all default options.
1414

15-
![Creating HDL Wrapper](images/picture23.png)
15+
![Screenshot of Vivado Sources panel showing the right-click context menu on design1.bd with Create HDL Wrapper option highlighted, which generates the top-level Verilog wrapper needed for synthesis](images/picture23.png)
1616

1717
*Figure 3.1. Creating HDL Wrapper*
1818

1919
2. Save any other changes and click “Generate Bitstream” on the left and click “Ok” for all pop-ups. This process takes some time. Once the process is done, select “Open Hardware Manager”:
2020

21-
![Generating bitstream and uploading to board](images/picture24.png)
21+
![Screenshot of Vivado Bitstream Generation Completed dialog showing the Open Hardware Manager option selected, which you use to program the FPGA with the generated bitstream file](images/picture24.png)
2222

2323
*Figure 3.2. Generating bitstream and uploading to board*
2424

2525
3. Connect the board and make sure the jumper (JP3) above the red LED on the Zybo board is in JTAG mode. Then, in Vivado, click “Auto Connect” in the Hardware Manager as shown below:
2626

27-
![Connecting the board](images/picture25.png)
27+
![Screenshot of Vivado Hardware Manager showing the Auto Connect button which detects and connects to the Zybo board via JTAG for programming](images/picture25.png)
2828

2929
*Figure 3.3. Connecting the board*
3030

3131
4. Right-click on the board, select “Program Device” as shown below and click “Program” on the pop-up window.
3232

33-
![Programming the board](images/picture26.png)
33+
![Screenshot of Vivado Hardware Manager showing the right-click context menu on the detected FPGA device with Program Device option highlighted to upload the bitstream to the Zybo board](images/picture26.png)
3434

3535
*Figure 3.4. Programming the board*
3636

3737
5. Once the board is programmed, the green LED labeled “LD12” should light up on the board. Click “File” on the main menu bar and select “Export” -> “Export Hardware” and click “Next” on the pop-up window. Choose the following option on the next page:
3838

39-
![Exporting hardware and bitstream file](images/picture27.png)
39+
![Screenshot of Vivado Export Hardware dialog showing the Include bitstream option selected, which packages the hardware design and bitstream into an XSA file for use in Vitis IDE software development](images/picture27.png)
4040

4141
*Figure 3.5. Exporting hardware and bitstream file*
4242

4343
6. Choose the “export to” location as the project folder and save the file. Then click “Finish”. Next, click “Tools” on the main menu bar and select “Launch Vitis IDE”. Choose the same project folder as your workspace. Click “File” -> “New” -> “Application Project”.
4444

45-
![Creating a new application project](images/picture28.png)
45+
![Screenshot of Vitis IDE showing the File menu with New > Application Project option selected to create a new embedded software project for the Cortex-A9 processor](images/picture28.png)
4646

4747
*Figure 3.6. Creating a new application project*
4848

0 commit comments

Comments
 (0)