Sei sulla pagina 1di 2

Table of Contents ================= 1. Build images 2. IP Driver Example 3. Application Example 1.

Build images =============== In the release package, there are pre-built images (ready to run) and source patches (allow rebuilt). sdimage.bin - The complete SD card image altera_pcierp_driver.patch - PCI Express Root Port IP Driver altera_pciede_config.patch - CONFIG_PCI CONFIG_ALTERA_PCIE_RP CONFIG_E1000E altera_pciediag_driver.patch - Root Port Design Example Driver End Point Deisng Example Driver altera_pcie_yocto.patch - The complete patch (all above) to yocto build extract from GSRD development kit Additional to above patches - Design Example socfpga.dts - Application Example dmaxfer Overview steps for rebuilt: a. Extract self extracting file (BSX) from CV SOCFPGA dev kit http://www.altera.com/products/devkits/altera/kit-cyclone-v-soc.html b. Apply altera_pcie_yocto.patch c. Build with bitbake altera-ed-pcierp d. Files different from GSRD development kit: uImage, socfpga.dtb, altera_rpde.ko, altera_epde.ko, dmaxfer 2. IP Driver Example ==================== PCI Express Root Port Design Example drivers for PCI Express Root Port IP and PCI Express Hard IP in the FPGA domain serves as a reference for writing a simple driver in Linux. The source code are released as patches to be applied on Linux source code from the extraction of self extracting file (BSX) found in GSRD development kit installation, the Linux tarball (<BSX_extract_path>/sources/linux-altera-3.7.tgz). The source code of these drivers are located in Linux source directory under the folder drivers/misc/altera_rpde.c and drivers/misc/altera_epde.c. The specification of PCI Express IP can be found in PCI Express User Guide - Altera (http://www.altera.com/literature/ug/ug_c5_pcie.pdf ). NOTE: This example does not serve as a full guideline on how to write a Linux Device Driver. For full guidelines, please refer to Linux Device Driver reference book (http://lwn.net/Kernel/LDD3/ ) In this example design, PCI Express Design Example kernel module are not modprobe by default when boot into Linux. User will need to modprobe the modules via command below. Modprobe of these modules are prerequisite to run any applications in section 2. modprobe altera_rpde modprobe altera_epde NOTE: altera_rpde - PCI Express Root Port Design Example on Cyclone V SoC altera_epde - PCI Express End Point Design Example on Cyclone V FPGA

3. Application Example ====================== Users may run application (PCI Express transfer throughput) built into Linux file system on the board from Linux console over ssh or serial connection. These examples serve as references for users to write their own applications to interact with PCI Express IP through driver developed. The source codes of these applications can be found from the installation path of BSX (<Yocto_install_path>/meta-altera/recipes-ed-pcierp). The binaries of these applications can be found in /home/root/altera/. Please 'cd' to /home/root/altera to execute these applications. Example applications usages are shown below, the example applications are based on PCI Express Design Example drivers described in Section 1. Applications to exercise PCI Express transfer throughput -------------------------------------------------------Demo PCI Express throughput via DMA transfer: ./dmaxfer

Potrebbero piacerti anche