This repository documents my usage of the FOOD repository for my own FPGA and emulation purposes. In the README I have included some common example usage, which may provide useful. However, if you do not require the use of my code, I reccommend a fresh start in the FOOD Repository.
- Complete the Setup stage first
- Assume the docker container we created is called
food_container
Start the container:
sudo docker start -ai food_containerExit the container:
exitDelete the container:
sudo docker rm food_containerView report from remote (I am working on a virtual machine which I ssh into):
# Assume ./vector_add.report.prj/ is where the report is located in docker
# Assume 12.345.678.90 is your machine
# Assume
make report # or equivalent
mv ./vector_add.report.prj/ /workspace
exit # exit docker
exit # exit vm
scp -r 12.345.678.90:/home/thomasjohnson/COFFEE/container_assets/vector_add.report.prj/ .
open ./vector_add.report.prj/reports/report.html
'Upload' file to Docker container on remote from local: n.b. Currently not able to run git push on VM - TODO : fixing this would make this step more flexible
# Prerequisites: COFFEE repo is on local and on remote
# Start on local
git push
# Enter remote
cd COFFEE
git pull
# Start container
cd /workspace
Source variables:
source /opt/intel/oneapi/setvars.sh --forceEmulate (the kernel executes on the CPU):
# Framework:
icpx -fintelfpga -DFPGA_EMULATOR -I../../../../include vector_add.cpp -o vector_add.fpga_emu
./vector_add.fpga_emu
# Example:
icpx -fintelfpga -DFPGA_EMULATOR direct_lingam_fpga.cpp -o direct_lingam_emu
./direct_lingam_emuOptimisation Report:
# Framework:
icpx -fintelfpga -DFPGA_HARDWARE -I../../../../include vector_add.cpp -Xshardware -fsycl-link=early -Xstarget=Agilex7 -o vector_add_report.a
# Example:
icpx -fintelfpga -DFPGA_HARDWARE direct_lingam_fpga.cpp -Xshardware -fsycl-link=early -Xstarget=Agilex7 -o report.aSimulator (the kernel executes in a simulator):
# Framework:
icpx -fintelfpga -DFPGA_SIMULATOR -I../../../../include vector_add.cpp -Xssimulation -Xstarget=Agilex7 -Xsghdl -o vector_add_sim.fpga_sim
CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1 ./vector_add.fpga_simFPGA Hardware:
# Framework:
icpx -fintelfpga -DFPGA_HARDWARE -I../../../../include vector_add.cpp -Xshardware -Xstarget=Agilex7 -o vector_add.fpga
vector_add.fpga.exe1. Clone the repo
git clone --recurse-submodules https://github.com/thomas-dsl-johnson/COFFEE.git2. Use the FOOD repo to complete setup
cd COFFEEFollow instructions in the FOOD README.md or go to the repository's webpage.
IMPORTANT: Before running the container cd ../.. we will be working in the COFFEE/ directory and want our container_assets/ folder to be outside the FOOD directory.