Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using...
Transcript of Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using...
![Page 1: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/1.jpg)
Atom-FPGA Communication using Ubuntu 13.10 on Development Machine
byEmmanuel Ademuwagun
EECE 494: Computer Bus and SoC InterfacingDepartment of Electrical and Computer Engineering
Howard University
Instructor: Dr. Charles Kim
![Page 2: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/2.jpg)
Presentation• Quartus 12.1 Installation• USB-Blaster Configuration• Task Execution• Configuring FPGA using Qsys• Loading SRAM Object File (.sof) on Board• Setting Up TFTP• PCIe Driver• User Application• Assignment Execution
![Page 3: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/3.jpg)
Quartus 12.1 Installation (Ubuntu)
![Page 4: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/4.jpg)
Quartus 12.1 Installation (Ubuntu)Extract folder from compressed download (.tar.gz) in chosen directory
Navigate through directory and launch installer
![Page 5: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/5.jpg)
Quartus 12.1 Installation (Ubuntu)Complete Installation using a Graphical User Interface
![Page 6: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/6.jpg)
USB-Blaster Configuration (Ubuntu)
Create a new rules file for USB Blaster
Copy the content below in the file
Feed the new rule into the OS by reloading all rules
![Page 7: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/7.jpg)
USB-Blaster Configuration (Ubuntu)
Test Configuration
![Page 8: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/8.jpg)
Task - Description
• Use 16 switches on the DE2i-150 to control 4 hexadecimal switches on the board.
• 4 switches 1 Hexadecimal Value (0 – F)• Download Source Files from:
– http://rijndael.ece.vt.edu/de2i150/designs/hellopci.tgz
![Page 9: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/9.jpg)
Task - SourcesExtract Folder and View Contents
![Page 10: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/10.jpg)
Configuring FPGA using Qsys
Launch Quartus
For convenience, add bin directory to your PATH variable in order to run your commands from anywhere in the terminal
![Page 11: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/11.jpg)
Configuring FPGA using QsysOpen Quarts II Archive File (.qar) from FPGA source folder
![Page 12: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/12.jpg)
Configuring FPGA using Qsys
Click Okay for Quartus to restore project files using the archive file (.qar)
![Page 13: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/13.jpg)
Configuring FPGA using QsysLaunch Qsys: Tools > Qsys
![Page 14: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/14.jpg)
Configuring FPGA using Qsys
![Page 15: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/15.jpg)
Configuring FPGA using Qsys
View Memory Map. Used in PCIe Driver for Atom
![Page 16: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/16.jpg)
Configuring FPGA using QsysGenerate Verilog Code for Compilation and close Qsys
![Page 17: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/17.jpg)
Configuring FPGA using Qsys
Auto-generated Pin Assignments. No worries
![Page 18: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/18.jpg)
Configuring FPGA using Qsys
View Verilog Generated Code and Start Compilation
![Page 19: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/19.jpg)
Loading SRAM Object File (.sof) on Board
![Page 20: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/20.jpg)
Setting Up TFTPInstall Packages
Add TFTP entry
![Page 21: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/21.jpg)
PCIe Driver - SourcesMakefile
![Page 22: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/22.jpg)
PCIe Driver - SourcesSome Important Functions in Driver Code
![Page 23: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/23.jpg)
PCI Driver - BuildYocto Version
Build Kernel for .ko file
If you have v3.0.32, you do not have to do this step. You can do use the kernel object in the quick folder
![Page 24: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/24.jpg)
User Application - Sources
Makefile
App Source Code
![Page 25: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/25.jpg)
User Application - Build
Again, if you have Yocto v3.0.32, you do not have to do this step. You can do use the app in the quick folder
![Page 26: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/26.jpg)
Task ExecutionCopy PCIe Driver and Application Code via TFTP
![Page 27: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/27.jpg)
Task Execution
Kernel Debug Messages
Insert Module into Yocto Kernel and run app
![Page 28: Atom-FPGA Communication using Ubuntu 13.10 Communication using... · Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus](https://reader033.fdocuments.in/reader033/viewer/2022042807/5f8292f8330bcb530914b874/html5/thumbnails/28.jpg)
Thank you for your time!