Processor-FPGA Communication: Processor Part
- Date:
14 Aug 2019
Corresponding Project Folder
Dependency
Edit the system environment variables
Processor Part
Step 1 Add quartussopc_builderbin to PATH environment variable, in my case D:QUARTUSquartussopc_builderbin
Step 2 Install Intel SoC FPGA Embedded Development Suite
Search program SoC EDS command shell in your computer and run it
Step 3 Generate necessary C header file
In SoC EDS command shell go to your Quartus project folder and execute
./generate_hps_qsys_header.sh. This automatically generateshps_0.hC header file based onsoc_system.sopcinfofile.hps_0.hcontains address infomation we set earlier in FPGA part: e.g.#define LED_PIO_BASE 0x3000is in itWe can then use the macro
LED_PIO_BASElater in our main C program conveniently
Step 4 Write the main C program, refer to main.c and read the comments there
Step 5 Compile the C program
In SoC EDS command shell go to the project folder and execute
make
Step 6 Copy the file to DE10-Nano Board and execute it
Connect your computer with DE10-Nano board using Ethernet over USB , this corresponds to
IP Address: 192.168.7.1In SoC EDS command shell go to the project folder and execute
scp HPS_FPGA_LED root@192.168.7.1:/home/root, then type “yes” and press “Enter”
Step 7 Enter the Linux System of your DE10-Nano board. I use VNC Viewer introduced in Ethernet over USB. Then open Linux console (Applications >> Terminal Emulator in VNC Viewer). Go to /home/root and execute ./HPS_FPGA_LED
We are done!