For more information about the cl_dram_dma example, read the following information CL DRAM DMA CL Example
export CLOCK_A_RECIPE=0
export CLOCK_B_RECIPE=0
export CLOCK_C_RECIPE=0
export device_id=0xF001
export vendor_id=0x1D0F
export subsystem_id=0x1D51
export subsystem_vendor_id=0xFEDC
Change directories to the cl/examples/cl_dram_dma_hlx directory.
Invoke vivado by typing vivado in the console.
In the TCL console type in the following to create the cl_dram_dma example. The example will be generated in cl/examples/cl_dram_dma_hlx/example_projects. The vivado project is examples_projects/cl_dram_dma.xpr.
aws::make_rtl -examples cl_dram_dma
Click on Simulation->Run Simulation->Run Behavioral Simulation
Add signals needed in the simulation.
Type in the following in the TCL console.
run -all
cl_dram_dma has several simulation sources that can be used for simulation (test_ddr, test_dram_dma, test_int, test_peek_poke, test_peek_poke_pcis_axsize).
By default the test_dram_dma is used in the project. To switch tests, right click on SIMULATION in the Project Manager and select Simulation Settings…
For Verilog options select the … box and change the following name. Below is an example.
TEST_NAME=test_ddr
Click OK, Click Apply, Click OK to back into the Vivado project.
In the Design Runs tab, right click on impl_1 and select Launch Runs… . Click OK in the Launch Runs Dialog Box. Click OK in the Missing Synthesis Results Dialog Box.
This will run both synthesis and implementation.
The completed .tar file is located in example_projects/cl_dram_dma.runs/faas_1/build/checkpoints/to_aws/.Developer_CL.tar. For information on how to create a AFI/GAFI with .tar from the design, following to the How To Create an Amazon FPGA Image (AFI) From One of The CL Examples: Step-by-Step Guide documentation.
The runtime software must be complied for the AFI to run on F1. Note the EDMA driver must be installed before running on F1.
Use the software in cl/examples/cl_dram_dma
$ cd cl/cl_dram_dma/software/runtime/
$ make all
$ sudo ./test_dram_dma