Streaming DMA Accelerator Functional Unit User Guide: Intel FPGA Programmable Acceleration Card D5005

ID 683424
Date 11/04/2019
Public

7. Simulating the AFU Example

Intel recommends you refer to the Intel Accelerator Functional Unit (AFU) Simulation Environment (ASE) Quick Start Guide for your Intel® PAC to be familiar with simulating similar examples and to setup your environment. Before you proceed through the following steps, verify that the OPAE_PLATFORM_ROOT environment variable is set to the OPAE SDK installation directory.

Complete the following steps to setup the hardware simulator for the streaming DMA AFU:

  1. Change to the streaming DMA AFU sample directory:
    cd $OPAE_PLATFORM_ROOT/hw/samples/streaming_dma_afu
  2. Create an ASE environment in a new directory and configure it for simulating an AFU:
    afu_sim_setup --source hw/rtl/filelist.txt build_ase_dir
  3. Change to the ASE build directory:
    cd build_ase_dir
  4. Build the driver and application:
    make
  5. Make simulation:
    make sim
Sample output from the hardware simulator:
[SIM]  ** ATTENTION : BEFORE running the software application **
[SIM]  Set env(ASE_WORKDIR) in terminal where application will run (copy-and-paste) =>
[SIM]  $SHELL   | Run:
[SIM]  ---------+---------------------------------------------------
[SIM]  bash/zsh | export ASE_WORKDIR=/mnt/Tools/ias/hw/samples/streaming_dma_afu/build_ase_dir/work
[SIM]  tcsh/csh | setenv ASE_WORKDIR /mnt/Tools/ias/hw/samples/streaming_dma_afu/build_ase_dir/work
[SIM]  For any other $SHELL, consult your Linux administrator
[SIM]  
[SIM]  Ready for simulation...
[SIM]  Press CTRL-C to close simulator...
Complete the following steps to compile and execute the streaming DMA AFU software in the simulation environment:
  1. Open a new terminal window.
  2. Change directory to:
    cd $OPAE_PLATFORM_ROOT/hw/samples/streaming_dma_afu/sw
  3. Copy the environment setup string (choose string appropriate for your shell) from the steps above in the hardware simulation to the terminal window. See the following lines in the sample output from the hardware simulator.
    [SIM]  bash/zsh | export ASE_WORKDIR=/mnt/Tools/ias/hw/samples/streaming_dma_afu/build_ase_dir/work
    [SIM]  tcsh/csh | setenv ASE_WORKDIR /mnt/Tools/ias/hw/samples/streaming_dma_afu/build_ase_dir/work
    
  4. Compile the software:
    make USE_ASE=1
  5. Execute the host application to transfer 4 KB in 1 KB portions from the host memory to the FPGA pattern checker:
    ./fpga_dma_st_test -l off -s 4096 -p 1024 -r mtos -t fixed
  6. Execute the host application to transfer 4 KB in 1 KB portions from the FPGA pattern checker to the host memory:
    ./fpga_dma_st_test -l off -s 4096 -p 1024 -r stom -t fixed
  7. Execute the host application to transfer 4 KB in 1 KB portions from the host memory back to host memory in the loopback mode:
    ./fpga_dma_st_test -l on -s 4096 -p 1024 -t fixed