![]() |
This lab describes the process of generating a AMD Versal™ adaptive SoC XDMA design with AXI4 Memory Mapped interface connecting to DDR memory. This lab explains a step by step procedure to configure a Control, Interfaces and Processing System (CIPS) XDMA design and network on chip (NoC) IP. The following figure shows the AXI4 Memory Mapped (AXI-MM) interface to DDR using the NoC IP. At the end of this lab, you can synthesize and implement the design, and generate a Programmable Device Image (PDI) file. The PDI file is used to program the AMD Versal adaptive SoC and run data traffic on a system. For host to chip (H2C) transfers, data is read from Host, and sent to DDR memory. For chip to host (C2H) transfers, data is read from DDR memory and written to Host. Transfer can be initiated on all 4 channels.
This lab targets a VCK190 Evaluation board. This lab connects to DDR found outside the AMD Versal adaptive SoC.
AXI-MM Default Example Design
-
Open the AMD Vivado™ Design Suite.
-
Click Create Project from the Quick Start Menu.
-
Step through the popup menus to access the Default Part page.
-
In the Default Part page, select Boards options, and locate and select the Versal VCK190 Evaluation Platform option.
-
Continue to the Finish stage to create the new project and open AMD Vivado.
-
In the AMD Vivado Flow Navigator, click IP Integrator → Create Block Design. A popup dialog displays to create the block design.
-
Click OK. An empty block design diagram canvas opens.
-
Right-click on the block design canvas, and select Add IP.
-
The IP catalog pops up. In the Search field type CIPS to filter to the list of IP.
-
From the filtered list, double-click the Control, Interface, and Processing System IP core to instantiate the IP on the block design canvas.
-
This adds the AMD Versal adaptive SoC CIPS IP to the canvas. Double-click the Versal CIPS IP.
-
In the CIPS configuration page, make sure Design flow has Full System selected and click Next.
-
CPM4 Configuration dialog box will appear. Select the CPM4 Basic Configuration option.
-
Set the PCIe® Controller 0 Modes to DMA, and set the lane width to X16. Available lane widths are X1, X2, X4, X8 and X16.
Because the Board option is selected, there is no need to select a pin for PCIe Reset. However, if the Evaluation Board option is not selected, and the user application has a AMD Versal adaptive SoC part, then the PCIe Reset pin must be set correctly. Follow the steps below to set the PCIe Reset pin.
-
In the CIPS PS CPM Configuration page, select PS-PMC, and click IO Configuration.
The IO Configuration page displays with a list of options to configure the CPM-PCIe functional mode.
-
In the Peripheral column, select the PCIe Reset checkbox.
Notice that only A0 End Point is selectable in the I/O column.
Notice also that the multi-use I/O (MIO) pin selected in PCIe reset is automatically connected to the PCIe Reset I/O, in this case MIO 38.
-
Next to A0 End Point, select PS MIO 38, which is the MIO pin that matches the MIO pin is connected in your board.
Available MIO pin selections are PS MIO 18, PMC MIO 24, and PMC MIO 38.
-
In the Configuration Options pane, select CPM4 PCIE Controller 0 Configuration to customize the DMA.
-
In the Basic tab, set the following options:
-
In the Capabilities tab, set the following option:
- MSI-X- Options: MSI-X Internal
This option enables the CPM XDMA in MSI-X internal mode.
-
In the PCIe: BARs tab, set the following options:
First row (for BAR0):
- Select the Bar checkbox.
- Set type to DMA.
- Set size to 128 Kilobytes.
Second row (for BAR1):
- Select the Bar checkbox.
- Set type to AXI Bridge Master.
- Set size to 4 Kilobytes.
-
In the PCIe: DMA tab, set the following options:
- Number of DMA Read Channel (H2C): 4 (for 4 channels).
- Number of DMA Write Channel (C2H): 4 (for 4 channels).
-
In all other tabs, keep the default settings.
-
Click OK and click Finish in the CIPS configuration page to generate the CIPS XDMA IP. The generated IP core displays in the Diagram tab.
Next you will add and configure a Network on Chip (NoC) IP core for the DDR connection.
-
Right-click the block design canvas and from the context menu select Add IP.
-
The IP catalog pops up. In the Search field type AXI NoC to filter a list of IP.
-
From the filtered list, double-click the AXI NoC IP core to instantiate the IP on the block design canvas. Customize the IP as follows:
-
In the General tab, set the following options:
- Number of AXI Slave Interfaces: 2.
- Number of AXI Master Interfaces: 0.
- Number of AXI Clocks: 2.
The number of AXI clocks is set to two because there are two clocks needed for the AXI Slave input, and none needed for AXI Master output.
-
In the Inputs tab, set the following options.
First row (for S00_AXI):
- Connected To: PS PCIe.
- Clock: aclk0 (input clock).
- All other options use default settings.
Second row (for S01_AXI):
-
In the Connectivity tab, set the NoC connectivity as follows:
- For S00_AXI, select the MC Port 0 checkbox.
- For S01_AXI, select the MC Port 0 checkbox.
- All others options use the default settings.
-
In the DDR Basic tab, set the following options:
- Input System clock period (ps): 5000 (200.000 MHz).
- Select the Enable Internal Responder checkbox.
- All other options use the default settings.
Note: This is a sample configuration. Your DDR configuration and frequencies should be based on your design requirements.
-
In the DDR Memory tab, set the following options:
-
Click OK to generate a NoC IP with DDR.
Next, generate a clock source for the NoC module. To do this, you will configure and generate the Simulation Clock and Reset Generator IP core.
-
Click Add IP, and search for Simulation Clock and Reset Generator.
-
From the filtered list, double-click the Simulation Clock and Reset Generator IP core to instantiate the IP on the block design canvas. Configure the core as follows:
-
For Number of SYS clocks, select 1.
-
For Sys Clock 0 Frequency (MHz), enter 200.
-
For Number of AXI Clocks, select 0.
-
For Number of Resets Ports, select 0.
-
Click OK to generate IP.
Next, add signal connections between the IP in the AMD Vivado IP integrator.
-
Make the connections between the IP cores as shown in following figure.
-
Set GT_REFCLK_D, GT_PCIEA0_RX, GT_PCIEA0_TX, SYS_CLK0_IN and CH0_DDR4_0 as primary ports. To do so:
a. Select pins GT_REFCLK_D, GT_PCIEA0_RXand GT_PCIEA0_TX of versal_cips_0, SYS_CLK0_IN of clk_gen_sim_0, and CH0_DDR4_0 of axi_noc_0 by pressing Ctrl+click.
b. Click the Make External (Ctrl + T) icon in the toolbar at the top of the canvas.
Next, set the necessary address settings for the NoC IP.
-
Open the Address Editor tab as shown in the following figure. Expand the tree by clicking the down-arrow on versal_cips_0. Expand DATA_PCIE0, and expand DATA_PCIE1.
-
For S00_AXI, right-click in the Master Base Address cell, and select Assign from the context menu.
-
And similarly, for S01_AXI, right-click in the Master Base Address cell, and select Assign from the context menu.
Note: The address 0x00000 is assigned to the DDR.
-
To validate the design, open the Diagram tab, and click the Validate Design icon
, or right- click anywhere in the canvas and, from the context menu, select Validate Design.
After validation, confirmation of the successful validation displays in a pop up window.
After validation, create a design wrapper. A design wrapper file enables you to add any needed logic. For this lab, additional logic is not needed.
-
In the AMD Vivado IDE Sources window, right-click on design_1 (design_1.bd).
-
From the context menu, select Create HDL Wrapper to generate a wrapper file.
A design_1_wrapper file is added to the Sources window as shown in the following figure.
The IP package includes the DDR pin placement for the evaluation board. To implement the project design, and generate a Programmable Device Image (PDI) file:
- In the Flow Navigator, click Synthesis and Implementation.
Copyright © 2020–2023 Advanced Micro Devices, Inc