atom-fpga communication using ubuntu 13.10 communication using... · atom-fpga communication using...

28
Atom-FPGA Communication using Ubuntu 13.10 on Development Machine by Emmanuel Ademuwagun EECE 494: Computer Bus and SoC Interfacing Department of Electrical and Computer Engineering Howard University Instructor: Dr. Charles Kim

Upload: others

Post on 31-Jul-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

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

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

ckim
Typewritten Text
WWW.MWFTR.COM
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thank you for your time!