Providing the Zynq PS clock and reset signals to the PL

Pages List
List view
Home
Portfolio
HW
FW
SW
FPGA / Adaptive SoC
Daily
Photo
Etc
 
Adaptive SoC

Providing the Zynq PS clock and reset signals to the PL


notion image

Create a Vivado project to receive clock and reset signals from ZYNQ-PS and then, Package it to IP


Create a Vivado project and complete the PL design as follows.
notion image
 
Select “Tools – Create and Package New IP”.
notion image
 
Since the current project will be made into Package IP, Choose the Packaging Option “Package your current project”.
notion image
 
Specify where the IP will be created, and press Next.
notion image
 
Then, the packaging steps required for the IP Package appear.
Of these, only the necessary parts need to be set.
notion image
 
(1) Identification
notion image
Change ‘Vendor to a different name on “xilinx.com”.
(There’s nothing else to set.)
 
(2) Compatibility
notion image
Compatibility establishes an FPGA family that can be supported by that IP.
Make sure that ZYNQ is included in the family.
 
(3) File Groups
notion image
If you check the Synthesis and Simulation items in File Groups and package IP, the IP will include Synthesis and Simulation, which the current project includes.
However, in an another project, the IP is included as a component, and it would be Synthesized, Simulated, along with other components,
You don’t have to check the items above.
 
(4) Ports and Interfaces
notion image
You can check the clock, reset signals, and ports currently held by the IP project.
The IP is connected to other modules or IPs through the above signals and ports.
 
(5) Customization GUI
notion image
When the IP Packaging operation is completed, it can be confirmed that IP is generated with the above preview.
 
(6) Review and Package
notion image
Once you have finished setting up the IP Package, you can click “Package IP” to create the IP.
 
Create a separate Vivado project with the IP generated above as a component.
Then select “IP INTEGRATOR” – “Create Block Design” to create a block design.
notion image
 
The newly created IP will be called to Block Design and used, so you will need to add it in “Settings”.
notion image
 
Add IP in “Settings – IP – Repository” as follows.
notion image
 
If you specify a path where IP exists, a list of IPs in the path appears as follows.
notion image
It can be confirmed that the IP generated above exists in the specified path, and this IP can be added.
 
Then, you can call IP from the “Diagram” window of Block Design as follows.
notion image
 
The GUI of the called IP appears as follows.
notion image
 
IP’s “led[3:0]”, “sw[3:0]” ports are made External by selecting “Mouse R-click – Make External”.
(This is to connect with the MIO of ZYNQ specified by the XDC file.)
notion image
 
The IP’s “led[3:0]” port is then connected to an external port called “led_0[3:0]”,
notion image
 
If you look at Digilent’s Zybo Z7 XDC file, the Pin to which the LED element of the Zybo Z7 board is physically connected is M14, M15, G14, D18,
The names of the external ports are “led[0]”, “led[1]”, “led[2]”, and “led[3]”, respectively.
notion image
 
Therefore, the external port for the LED should be renamed from “led_0” to “led”.
(SW should be changed as well.)
notion image
 
notion image
 
Now, call ZYNQ IP (PS) to be used to supply clock and reset signals to IP.
notion image
 
And click Run Block Automation,
notion image
 
Create a Fixed_io and DDR.
notion image
 
notion image
 
Double-click on ZYNQ IP (PS), and uncheck things that are not used in this project.
notion image
 
notion image
 
The clock to be supplied to the LED Toggle IP (PL) is set as follows. (100MHz)
notion image
 
The clock and reset signals of the ZYNQ IP (PS) are then connected to the LED Toggle IP (PL).
notion image
 
Click Validate Design to verify that the block design you have worked on so far is valid.
notion image
 
notion image
 
When Design is valid, Integrate ZYNQ IP (PS) and LED Toggle IP (PL) into one wrapper file.
notion image
 
notion image
 
It can be seen that the wrapper file was created as follows.
notion image
 
Create a Bitstream of the corresponding Wrapper file.
notion image
 
When the Bit Stream generation is completed, resources used may be identified as follows.
notion image
 
It would be nice to program this BitStream directly into the FPGA, but ZYNQ-PS requires minimal Dummy Code to generate Clock, Reset signals.
Therefore, Export the Bit Stream to Vitis.
notion image
 
Select “Include bitstream” from the Export Hardware Platfrom.
notion image
 
Set the name and location of the Hardware Platform file to be exported to Vitis.
notion image
 
Once the hardware platform file has been exported, run Vitis IDE directly from Vivado.
notion image
 
In Vitis, click “Create Application Project” to create a Vistis project.
notion image
 
The following shows how to create a Vitis Application Project.
Press Next.
notion image
 
We will create a Vitis Application Project based on the Vivado project, So Add an XSA file (Hardware Platform).
notion image
 
Set the name of the Vitis Application Project, and press Next.
notion image
 
Press Next without setting it up.
notion image
 
For the Application Template, select “Empty Application(C)” and press Finish.
notion image
 
Add the C Source file to the generated Vitis Project.
notion image
 
The C Source file is named “main.c”.
notion image
 
For the operation of ZYNQ-PS, a minimum Dummy Code was written as follows.
notion image
 
Now, build that C project,
notion image
 
Launch to Hardware.
notion image
 
Then, it can be seen that Hardware Logic designed in ZYNQ PL receives a clock from PS and toggles the LED as follows.
notion image
 
 
 

notion image