Visible to Intel only — GUID: wqk1498751766354
Ixiasoft
Visible to Intel only — GUID: wqk1498751766354
Ixiasoft
1.4. Simulating the hello_afu AFU using the ASE (Client-Server Mode)
- Change directory to:
$ cd $DCP_LOC/hw/common/scripts
- General command syntax:
$ sh setup_sim.sh -a <afu dir> -s <vcs|modelsim|questa> -b <opae base dir> [-r <rtl simulation dir>] [-m <EMIF_MODEL_BASIC|EMIF_MODEL_ADVANCED> memory model]
To run the simulation using Modelsim:$ sh setup_sim.sh -a $DCP_LOC/hw/samples/hello_afu -s modelsim -b $OPAE_LOC
Table 2. Flag Descriptions Flag Description Legal Values Default Required -a Path to AFU source Example: $DCP_LOC/hw/samples/hello_afu - Yes -s Simulator type vcs, modelsim, questa - Yes -b $OPAE_LOC $OPAE_LOC - Yes -r Optional directory to build the simulation. If specified, AFU source and ASE work directory is copied here. If not, simulation is built in $OPAE_LOC/rtl_sim
- $OPAE_LOC/rtl_sim No -m Local Memory Model: selects the simulation model for FPGA private memory. Supported values are EMIF_MODEL_BASIC and EMIF_MODEL_ADVANCED. EMIF_MODEL_BASIC uses a simple system-verilog array to model dual banks of DRAM.
EMIF_MODEL_ADVANCED uses an advanced cycle accurate model of the EMIF memory controller.
EMIF_MODEL_BASIC is recommended for faster simulations.
EMIF_MODEL_BASIC, EMIF_MODEL_ADVANCED EMIF_MODEL_BASIC No Sample output:
Figure 5. Messages from Simulation Environment Initialization - Open a new terminal to run simulation of your application using the $run_app.sh script.
- Set $DCP_LOC and $OPAE_LOC environment variables in new terminal.
- Change directory to:
$ cd $DCP_LOC/hw/common/scripts
- General command syntax::
$ sh run_app.sh -a <afu dir> -b <opae base dir> [-i <opae install path>] [-r <rtl simulation dir>]
To run the simulation using Modelsim:$ sh run_app.sh -a $DCP_LOC/hw/samples/hello_afu -b $OPAE_LOC
Table 3. Flag Descriptions Flag Description Legal Values Default Required -a Path to AFU source Example: $DCP_LOC/hw/samples/hello_afu - Yes -b $OPAE_LOC $OPAE_LOC - Yes -r Optional directory to build the simulation. If specified, AFU source, log files (including waveforms), and ASE work directory are copied here. If not, simulation is built in $OPAE_LOC/rtl_sim
Note: If you specified -r in setup_sim.sh, you must specify -r in run_app.sh- $OPAE_LOC/rtl_sim No -i Optional path to OPAE installation1. You must specify the install path if you don’t use the RPM flow. If you are using the RPM flow, the install path is not required. <custom opae_loc directory> Example: /home/john/opaeinstall
- No Sample output:
Figure 6. Print Statements from the hello_afu Simulation - Type CTRL-C from the Simulation Environment Initialization terminal window to close the simulation. You can run the application multiple times while the simulator is still running.
- You can stop the simulation using command $ pkill ase_simv.