There is no restriction on the complexity of an intellectual property (IP) that can be added in fabric to be tightly coupled with the Zynq™ SoC PS. This section covers a simple example with an AXI GPIO, an AXI Timer with interrupt, and a PS section GPIO pin connected to a PL side pin using the EMIO interface. The block diagram for the system is as shown in the following figure.
You can use the system created in Using the Zynq SoC Processing System and continue with the following examples.
In the examples provided within this chapter, we will expand on the design with the following design changes:
The fabric-side AXI GPIO is assigned a 1-bit channel width and is connected to the SW5 push-button switch on the ZC702 board.
The PS GPIO ports are modified to include a 1-bit interface that routes a fabric pin (using the EMIO interface) to the SW7 push-button switch on the board.
In the PS section, another 1-bit GPIO is connected to the DS23 LED on the board, which is on the MIO port.
The AXI timer interrupt is connected from the fabric to the PS section interrupt controller. The timer starts when you press any of the selected push buttons on the board. After the timer expires, the timer interrupt is triggered.
Along with making the above hardware changes, you will write the application software code. The code will function as follows:
A message appears in the serial terminal and asks you to select the push button switch to use on the board (either SW7 or SW5).
When the appropriate button is pressed, the timer automatically starts, switches LED DS23 OFF, and waits for the timer interrupt to happen.
After the timer interrupt, LED DS23 switches ON and execution starts again and waits for you to select the push button switch in the serial terminal again.