HAN Pilot Platform
Demonstration Manual
95
www.terasic.com
September 6, 2019
export QUARTUS_ROOTDIR=/home/centos/intelFPGA/18.0/quartus
7.
Execute "sudo -E sh test.sh" command to configure the FPGA
8.
Restart Linux operation system. In Linux, open a terminal and use “cd” command to goto the
PCIe_Driver folder.
9.
Type the following commands to compile and install the driver altera_pcie.ko, and make sure
driver is loaded successfully and FPGA is detected by the driver as shown in
make
sudo sh load_driver
dmesg | tail -n 15
Figure 6-4 Screenshot of install PCIe driver
Create a Software Application
All the files needed to create a PCIe software application are located in the directory
CDROM/Demonstrations/PCIe_SW_KIT/Linux/PCIe_Library. It includes the following files:
TERASIC_PCIE_AVMM.h
terasic_pcie_qsys.so (64-bit library)
Below list the procedures to use the library in users’ C/C++ project:
1.
Create a 64-bit C/C++ project.
2.
Include TERASIC_PCIE_AVMM.h in the C/C++ project.
3.
Copy terasic_pcie_qsys.so to the folder where project execution file is located.
4.
Dynamically load terasic_pcie_qsys.so in C/C++ program. To load the terasic_pcie_qsys.so,
please refer to the PCIe fundamental example below.
5.
Call the library API to implement the desired application.
Users can easily communicate with the FPGA through the PCIe bus through the
terasic_pcie_qsys.so API. The details of API are described below.
Содержание HAN Pilot Platform
Страница 1: ......
Страница 92: ...HAN Pilot Platform Demonstration Manual 91 www terasic com September 6 2019...