The V++ linker can automatically link the clock signals between kernel and platform. The available clock signals in the platform are exported by PFM.CLK property.
For simple designs, interrupt signals can be sourced by the processor’s pl_clk. The limitation is that the processor has a maximum of four pl_clks
and their phase is not aligned.
To provide more interrupt signals, or to provide phase-aligned clocks, use the Clocking Wizard.
To add the Clocking Wizard to the block diagram and enable clock signals for the platform, follow these steps:
Add the clocking wizard block to generate three clocks:
Right-click Diagram view and select Add IP.
Search for and add a Clocking Wizard from the IP Search dialog box.
Double-click the clk_wiz_0 IP block to open the Re-Customize IP dialog box.
Click the Output Clocks tab.
Enable
clk_out1
throughclk_out3
in the Output Clock column. Set the Requested Output Freq as follows:clk_out1 to 100 MHz.
clk_out2 to 200 MHz.
clk_out3 to 400 MHz.
At the bottom of the dialog box set the Reset Type to Active Low.
Click OK to close the dialog box.
Note: So now you have set up the clock system for your design. This clock wizard uses the
pl_clk
as input clock and generates clocks needed for the whole logic design. In this simple design, use a 100 MHz clock as theaxi_lite
control bus clock. 200 MHz and 400 MHz clocks are reserved for the DPU AXI interface clock and the DPU core clock during the design linking phase. You can modify the clock quantities and frequency to fit your target design. Before exporting the clock, you must create reset signals for each clock because they are needed in clock export setup.**
Add three Processor System Reset blocks corresponding to the three clocks:
Right-click Diagram view and select Add IP.
Search for and add a Processor System Reset from the IP Search dialog box.
Rename the reset block to proc_sys_reset_1 so that it is easy to understand the relationship between reset modules and clock signals.
Select the proc_sys_reset_1 block, type Ctrl-C and Ctrl-V to replicate two modules. They are named as proc_sys_reset_2 and proc_sys_reset_3, by default.
Connect Clocks and Resets:
Click Run Connection Automation to open a dialog box to connect the
proc_sys_reset
blocks to the clocking wizard clock outputs.Enable All Automation on the left side of the Run Connection Automation dialog box.
Select clk_in1 on
clk_wiz_0
, and set the Clock Source to /zynq_ultra_ps_e_0/pl_clk0.For each proc_sys_reset instance, select the slowest_sync_clk, and set the Clock Source as follows:
proc_sys_reset_1 with /clk_wiz_0/clk_out1
proc_sys_reset_2 with /clk_wiz_0/clk_out2
proc_sys_reset_3 with /clk_wiz_0/clk_out3
On each
proc_sys_reset
instance, select ext_reset_in, set Board Part Interface to Custom and set the Select Manual Source to /zynq_ultra_ps_e_0/pl_resetn0.Make sure all checkboxes are enabled, and click OK to close the dialog and create the connections.
Connect all the dcm_locked signals on each
proc_sys_reset
instance to the locked signal on clk_wiz_0.
Enable clocks for the platform
Go to the Platform Setup tab.
If it does not open, use menu Window -> Platform Setup to open it.
Click the Clock tab.
Enable all clocks under
clk_wiz_0
: clk_out1, clk_out2, clk_out3.Change their ID to 1, 2, and 3.
Set a default clock, and click Is Default for clk_out2.
After everything is set up, it should report
Info: No problem with Clock interface
.Note: There should be one and only one default clock in the platform. During the v++ linking stage, the linker uses the default clock to connect the IP blocks if there are no user assignments for link configuration.