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

# 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_ase_1c ../../../driver/tests/basic/basic -n16
./run_ase.sh build_ase_1c ../../../driver/tests/demo/demo -n16
./run_ase.sh build_ase_1c ../../../driver/tests/dogfood/dogfood -n16
./run_ase.sh build_ase_1c ../../../benchmarks/opencl/vecadd/vecadd
./run_ase.sh build_ase_1c ../../../benchmarks/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 VCD trace
tar -zcvf vortex.vcd.tar.gz ./build_ase_1c/work/vortex.vcd
tar -zcvf trace.vcd.tar.gz obj_dir/trace.vcd
tar -zcvf trace.fst.tar.gz trace.fst run.log
tar -zcvf run.log.tar.gz run.log
tar -cvjf vortex.vcd.tar.bz2 build_ase_1c/work/vortex.vcd
tar -zcvf vortex.vcd.tar.gz build_ase_1c/work/vortex.vcd
tar -zcvf run.log.tar.gz build_ase_1c/work/run.log
tar -zcvf vx_scope.vcd.tar.gz vx_scope.vcd
tar -cvjf vx_scope.vcd.tar.bz2 vx_scope.vcd
tar -cvjf trace.fst.tar.bz2 trace.fst run.log
tar -cvjf trace.vcd.tar.bz2 trace.vcd run.log

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

# fixing device resource busy issue when deleting /build_ase_1c/
lsof +D build_ase_1c

# quick off synthesis
make -C unittest clean && make -C unittest > unittest/build.log 2>&1 &
make -C pipeline clean && make -C pipeline > pipeline/build.log 2>&1 &
make -C cache clean && make -C cache > cache/build.log 2>&1 &
make -C core clean && make -C core > core/build.log 2>&1 &
make -C vortex clean && make -C vortex > vortex/build.log 2>&1 &
make -C top1 clean && make -C top1 > top1/build.log 2>&1 &
make -C top2 clean && make -C top2 > top2/build.log 2>&1 &
make -C top4 clean && make -C top4 > top4/build.log 2>&1 &
make -C top8 clean && make -C top8 > top8/build.log 2>&1 &
make -C top16 clean && make -C top16 > top16/build.log 2>&1 &
make -C top32 clean && make -C top32 > top32/build.log 2>&1 &
make -C top64 clean && make -C top64 > top64/build.log 2>&1 &