Chapter 3 PL reads and writes DDR4 experiment through NoC#

The experimental VIvado project is “pl_rw_ddr”.

Hardware introduction#

The PL side of the development board has 4 16bit ddr4

../_images/image87.png

Vivado project set up#

Versal’s DDR4 is accessed through NoC, so NoC IP needs to be added for configuration.

Create a Block design and configure the NoC#

  1. Select Create Block Design

../_images/image54.png ../_images/image88.png
  1. Add CIPS

../_images/image56.png ../_images/image57.png
  1. Double-click CIPS, select PL_Subsystem, only the logic on the PL side

../_images/image58.png
  1. Add NoC IP

../_images/image89.png
  1. Configure NoC

Select an AXI Slave and AXI Clock, select “Single Memory Controller”

../_images/image90.png

Select Inputs as PL

../_images/image911.png

connection port

../_images/image92.png

DDR4 configuration

../_images/image93.png ../_images/image94.png

Configuration is complete, click OK

  1. Configure CIPS and add reset

../_images/image95.png ../_images/image96.png ../_images/image97.png ../_images/image98.png

Click Finish

  1. Add Clocking Wizard and configure the output clock to 150MHz as the PL side read and write clock

../_images/image99.png ../_images/image100.png

8) Add IBUFDS for NoC and Clocking Wizard provides a reference clock and exports S00_AXI, CH0_DDR4_0 and other buses, and adds axi_clk and axi_resetn to provide clock and reset for the PL side.

../_images/image1011.png

Double-click the reference clock pin and configure the frequency to 200MHz

../_images/image102.png

Double-click the AXI bus and configure

../_images/image103.png ../_images/image104.png
  1. Assign address

../_images/image105.png ../_images/image106.png
  1. Create HDL

../_images/image107.png

Add additional test code#

The main function of other codes is to read and write ddr4 and compare whether the data is consistent. I will not introduce it in detail here. You can refer to the engineering code.

../_images/image108.png
  1. Add mark_debug debugging in mem_test.v

../_images/image109.png
  1. Pin binding

../_images/image110.png
  1. Comprehensive

../_images/image1111.png
  1. After the synthesis is completed, click Set up debug

../_images/image112.png ../_images/image113.png ../_images/image114.png

Set the number of sampling points according to needs

../_images/image115.png ../_images/image116.png

Then save and generate pdi file

../_images/image511.png

Download debugging#

After generating the pdi file, use JTAG to download it to the development board, and DDR4 calibration and other information will be displayed in the MIG_1 window.

../_images/image117.png

Debug signals can be viewed in hw_ila_1

../_images/image118.png

Experiment summary#

This experiment directly reads and writes ddr4 through the PL side Verilog code. It mainly understands the configuration method of NoC and how to access DDR4 through NoC. This configuration will be used in subsequent experiments.