Skip to content

Latest commit

 

History

History

slow_clock_tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Innova2 XCKU15P XDMA Clocking Wizard Testing

PCIe XDMA demo with various Clocking Wizard tests for the Innova-2 using Vivado 2022.2. The goal is a slow clock that works with AXI peripherals.

Block Design

PCIe XDMA and Clocking Wizard Block Diagram

Note each AXI GPIO peripheral clocked by a slow clock needs its own Processor System Reset module to generate a clock-domain crossing reset signal based on the XDMA axi_aresetn signal.

Bitstream

Recreate the bitstream. Download slow_clock_tests.tcl and constraints.xdc and source the Tcl script in the Vivado 2022.2 Tcl Console then run Generate Bitstream.

pwd
cd PROJECT_NAME
dir
source slow_clock_tests.tcl

Vivado Source Tcl Project Script

Load the bitstream into your Innova-2. It should work with every variant of the Innova-2. Refer to innova2_flex_xcku15p_notes for system setup.

FPGA Resources Used

FPGA Resources Used

AXI Addresses

PCIe XDMA and Clocking Wizard AXI Addresses

Design Overview

The Clocking Wizard is set up to generate the slowest clock possible.

The first method is courtesy markg@prosensing from this discussion thread. Using a 250MHz XDMA axi_aclk as input, the slowest possible clock output is about 76kHz.

Clocking Wizard Setup - Clocking Options. Set the Primitive to MMCM and the Source of the Primary Clock to Global Buffer.

Clocking Wizard Clocking Options

Clocking Wizard Setup - MMCM Settings. Set Allow Override Mode and CLKOUT4_CASCADE. Set Divide values for the clk_out? ports to 10, 10, 10, 100, 128, 128, and 128.

Clocking Wizard MMCM Settings

Clocking Wizard Setup - Output Clocks. clk_out5 will be qual to (250MHz*10)/DIVCLK_DIVIDE/CLKOUT4_Divide/CLKOUT6_Divide=0.076MHz=76294Hz

Clocking Wizard Output Clocks

Clocking Wizard Setup - Summary:

Clocking Wizard Summary

The second method uses a BUFG Utility Buffer to route a binary counter output onto the global clock network. Slice is used to cut out the most significant bit (MSb). The clock input to the 18-bit counter is 250MHz so the output should be about (250000000/(2^18))=954Hz.

Counter as Global Clock Source

Testing

slow_clock_test.c is a simple C program to test the XDMA interface, communicate with AXI peripherals clocked by the slow clocks, and estimate the slow clock periods.

gcc  slow_clock_test.c  -g  -Wall  -o slow_clock_test
sudo ./slow_clock_test  /dev/xdma0_c2h_0 /dev/xdma0_h2c_0

slow_clock_test.c running