vortex/hw/syn/opae
2022-02-01 22:51:33 -05:00
..
.gitignore minor update 2021-07-20 21:42:22 -07:00
fpga_prog.sh cache area optimization by disabling BRAM read-during-write bypassing for tag/data stores 2021-08-26 12:27:38 -07:00
gen_sources.sh minor fixes 2021-10-11 19:02:13 -07:00
Makefile minor updates 2022-02-01 22:51:33 -05:00
README minor fixes 2021-10-11 19:02:13 -07:00
run_ase.sh simulation framework refactoring 2021-10-09 10:20:42 -04:00
setup.cfg fpga build refactoring 2021-04-29 06:17:28 -07:00
vortex_afu.json instr_sched => ibuffer 2021-06-27 19:36:43 -07:00
vortex_afu.qsf LKG Build (reset network update -fmax=236 mhz 4c) 2021-08-23 01:59:22 -07:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

use the following step to build vortex and run it on fpga on intel cloud server using OPAE. 
This script is also present at ~/dev/runVortex

## To configure quartus and opae. Run this after logging in.
source /export/fpga/bin/setup-fpga-env fpga-pac-a10
#########################
## Vortex Run commands ##
#########################

#
## Synthesis
#

cd /driver/hw/opae

# Configure a Quartus build area
afu_synth_setup -s sources.txt build_fpga

# Run Quartus in the vLab batch queue
cd build_fpga && qsub-synth

# check last 10 lines in build log for possible errors
tail -n 10 ./build_fpga_1c/build.log

# Check if the job is submitted to the queue and running. Status should be R 
qstat | grep <user>

# Constantly monitoring the job submitted to the queue. Stop this using Ctrl+C 
watch qstat | grep <user>

#
## Executing on FPGA
#

# From the build_fpga directory acquire a fpga node
qsub-fpga

# Go to the directory whree qsub-synth was run above
cd $PBS_O_WORKDIR

# Load the image onto an FPGA
fpgaconf vortex_afu.gbs

# If this says Multiple ports. Then use --bus with fpgaconf. #bus info can be found by fpgainfo port
fpgaconf --bus 0xaf vortex_afu.gbs

# get portid
fpgainfo port

# Running the Test case 
cd /driver/tests/basic
make run-fpga

#
## ASE build instructions
#
source /export/fpga/bin/setup-fpga-env fpga-pac-a10

# Acquire a sever node for running ASE simulations
qsub-sim

# build
make ase

# tests
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/basic/basic -n1 -t0
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/basic/basic -n1 -t1
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/basic/basic -n16
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/demo/demo -n16
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/dogfood/dogfood -n16
./run_ase.sh build_arria10_ase_1c ../../../tests/opencl/vecadd/vecadd
./run_ase.sh build_arria10_ase_1c ../../../tests/opencl/sgemm/sgemm -n4

# modify "vsim_run.tcl" to dump VCD trace
vcd file trace.vcd
vcd add -r /*/Vortex/hw/rtl/* 
run -all

# compress FPGA output files
tar -zcvf output_files_1c.tar.gz `find ./build_fpga_1c -type f \( -iname \*.rpt -o -iname \*.txt -o -iname \*summary -o -iname \*.log \)`

# compress log trace
tar -zcvf run.log.tar.gz run.log
tar -cvjf trace.vcd.tar.bz2 trace.vcd run.log
tar -cvjf trace.vcd.tar.bz2 build_arria10_ase_1c/work/run.log build_arria10_ase_1c/work/trace.vcd

# decompress log trace
tar -zxvf vortex.vcd.tar.gz
tar -xvf vortex.vcd.tar.bz2

# quick off synthesis
make core