SlideShare a Scribd company logo
1 of 42
Download to read offline
Digital Design & Computer Arch.
Lecture 3b: Introduction to the Labs and FPGAs
Prof. Onur Mutlu
(Lecture by Hasan Hassan)
ETH Zurich
Spring 2020
27 February 2020
1
Lab Sessions
◼ Where?
❑ HG E 19, HG E 26.1, HG E 26.3, HG E 27, HG D 11, HG D 12
◼ When?
❑ Tuesday 15:15-17:00 (E 26.1, E 26.3, E 27)
❑ Wednesday 15:15-17:00 (E 26.1, E 26.3)
❑ Friday 08:15-10:00 (D 11, D 12, E 26.3, E 27)
❑ Friday 10:15-12:00 (E 26.1, E 26.3, E 27)
2
Grading
◼ 10 labs, 30 points in total
◼ We will put the lab manuals online
❑ https://safari.ethz.ch/digitaltechnik/doku.php?id=labs
◼ Grading Policy
❑ In-class evaluation (70%) and mandatory lab reports (30%)
◼ 1-point penalty for late submission of the report
❑ You can use your grades for labs from past years
◼ You can find your grades in last year’s Moodle page: https://moodle-
app2.let.ethz.ch/course/view.php?id=10483
You should finish the labs within 1 week after they are announced
◼ For questions
❑ Piazza (preferred)
❑ digitaltechnik@lists.inf.ethz.ch
3
Agenda
◼ Logistics
◼ What We Will learn?
◼ FPGAs in Today’s Systems
◼ Overview of the Lab Exercises
◼ What is an FPGA?
◼ Programming an FPGA
◼ Tutorial and Demo
4
What We Will Learn?
5
Micro-architecture
SW/HW Interface
Program/Language
Algorithm
Problem
Logic
Devices
System Software
Electrons
The Transformation Hierarchy
Touch upon
implementation
details
Hands-on experience
in digital circuit design
and implementation
Understanding how a processor works
underneath the software layer
What We Will Learn? (2)
6
◼ Considering the trade-offs between performance and area/complexity in your
hardware implementation
◼ Hands-on experience on:
❑ Hardware Prototyping on FPGA
❑ Debugging Your Hardware Implementation
❑ Hardware Description Language (HDL)
❑ Hardware Design Flow
❑ Computer-Aided Design (CAD) Tools
Agenda
7
◼ Logistics
◼ What We Will learn?
◼ FPGAs in Today’s Systems
◼ Overview of the Lab Exercises
◼ What is an FPGA?
◼ Programming an FPGA
◼ Tutorial and Demo
FPGAs in Today’s Systems: Project Brainwave
◼ “Microsoft’s Project Brainwave is a deep learning platform for real-time AI inference in the
cloud and on the edge. A soft Neural Processing Unit (NPU), based on a high-performance
field-programmable gate array (FPGA), accelerates deep neural network (DNN) inferencing,
with applications in computer vision and natural language processing. Project Brainwave is
transforming computing by augmenting CPUs with an interconnected and configurable compute
layer composed of programmable silicon.”
8
https://www.microsoft.com/en-us/research/project/project-brainwave/
https://www.microsoft.com/en-us/research/blog/microsoft-unveils-project-brainwave/
FPGAs in Today’s Systems: Amazon EC2 F1
◼ “Amazon EC2 F1 instances use FPGAs to enable delivery of custom hardware
accelerations. F1 instances are easy to program and come with everything you
need to develop, simulate, debug, and compile your hardware acceleration code,
including an FPGA Developer AMI and supporting hardware level development on
the cloud. Using F1 instances to deploy hardware accelerations can be useful in
many applications to solve complex science, engineering, and business
problems that require high bandwidth, enhanced networking, and very
high compute capabilities.”
9
https://aws.amazon.com/ec2/instance-types/f1/
FPGAs in Today’s Systems: DNA Sequencing
◼ DRAGEN’s suite of analysis pipelines are engineered to run on FPGAs, offering
hardware-accelerated implementations of genomic analysis algorithms, including
BCL conversion, mapping and alignment, sorting, duplicate marking and
haplotype variant calling.
10
https://www.illumina.com/products/by-type/informatics-products/dragen-bio-it-platform.html
Illumina NextSeq 2000
Illumina DRAGEN (Dynamic Read Analysis for GENomics) Bio-IT Platform
FPGAs in Today’s Systems: GateKeeper
11
Alser+, "GateKeeper: A New Hardware Architecture for Accelerating
Pre-Alignment in DNA Short Read Mapping”, Bioinformatics, 2017.
FPGAs in Today’s Systems: SoftMC
12
◼ An open-source FPGA-based infrastructure for
experimental studies on DRAM
◼ Flexible
◼ Easy to Use (C++ API)
◼ Open-source
github.com/CMU-SAFARI/SoftMC
Hassan+, “SoftMC: A Flexible and Practical Open-Source Infrastructure for Enabling Experimental DRAM Studies,”
HPCA 2017.
FPGAs in Today’s Systems: Characterizing Flash Memories
13
Cai+, “Error Characterization, Mitigation, and Recovery in Flash Memory Based Solid State Drives,” Proc. IEEE 2017.
USB Jack
Virtex-II Pro
(USB controller)
Virtex-V FPGA
(NAND Controller)
HAPS-52 Mother Board
USB Daughter Board
NAND Daughter Board
1x-nm
NAND Flash
[DATE 2012, ICCD 2012, DATE 2013, ITJ 2013, ICCD 2013, SIGMETRICS 2014,
HPCA 2015, DSN 2015, MSST 2015, JSAC 2016, HPCA 2017, DFRWS 2017,
PIEEE 2017, HPCA 2018, SIGMETRICS 2018]
Agenda
14
◼ Logistics
◼ What We Will learn?
◼ FPGAs in Today’s Systems
◼ Overview of the Lab Exercises
◼ What is an FPGA?
◼ Programming an FPGA
◼ Tutorial and Demo
Basys 3: Our FPGA Board
Switches
LEDs
Seven-segment
displays
microUSB
(power/programming)
Power switch
Video out (VGA)
FPGA chip
Push-buttons
USB
15
https://reference.digilentinc.com/reference/programmable-logic/basys-3/start
High Level Labs Summary
◼ At the end of the exercises, we will have built a 32-bit microprocessor running on
the FPGA board
❑ It will be a small processor, but it will be able to execute pretty much any program
◼ Each week we will have a new exercise
❑ Not all exercises will require the FPGA board
◼ You are encouraged to experiment with the board on your own
❑ We may have some extra boards for those who are interested
❑ It is not possible
to destroy the board by programming!
16
Lab 1: Drawing a Basic Circuit
◼ Comparison is a common operation in
software programming
❑ We usually want to know the relation between two variables (e.g., <, >, ==, …)
◼ We will compare two electrical signals (inputs), and find whether they are same
❑ The result (output) is also an electrical signal
◼ No FPGA programming involved
❑ We encourage you to try later
17
Lab 2: Mapping Your Circuit to FPGA
◼ Another common operation in software programming?
❑ Addition
◼ Design a circuit that adds two 1-bit numbers
◼ Reuse the 1-bit adder multiple times to perform 4-bit addition
◼ Implement the design on the FPGA board
❑ Input: switches
❑ Output: LEDs
18
Lab 3: Verilog for Combinatorial Circuits
◼ Show your results from Lab 2 on a Seven Segment Display
19
https://reference.digilentinc.com/reference/programmable-
logic/basys-3/reference-manual
Lab 4: Finite State Machines
◼ Blinking LEDs for a car’s turn signals
❑ Implement and use memories
❑ Change the blinking speed
20
Lab 5: Implementing an ALU
◼ Towards implementing your very first processor
◼ Implement your own Arithmetic and Logic Unit (ALU)
◼ An ALU is an important part of the CPU
❑ Arithmetic operations: add, subtract, multiply, compare, …
❑ Logic operations: AND, OR, …
21
Lab 6: Testing the ALU
◼ Simulate your design from Lab 5
◼ Learn how to debug your implementation to resolve problems
22
Lab 7: Writing Assembly Code
◼ Programming in assembly language
❑ MIPS
◼ Implement a program which you will later use to run on your processor
◼ Image manipulation
23
Lab 8: Full System Integration
◼ Will be covered in two weeks
◼ Learn how a processor is built
◼ Complete your first design of a MIPS processor
◼ Run a “snake” program
24
Lab 9: The Performance of MIPS
◼ Improve the performance of your processor
from Lab 8 by adding new instructions
❑ Multiplication
❑ Bit shifting
25
Agenda
26
◼ Logistics
◼ What We Will learn?
◼ FPGAs in Today’s Systems
◼ Overview of the Lab Exercises
◼ What is an FPGA?
◼ Programming an FPGA
◼ Tutorial and Demo
Basys 3: Our FPGA Board
Switches
LEDs
Seven-segment
displays
microUSB
(power/programming)
Power switch
Video out (VGA)
FPGA chip
Push-buttons
USB
27
https://reference.digilentinc.com/reference/programmable-logic/basys-3/start
What is an FPGA?
◼ Field Programmable Gate Array
◼ FPGA is a reconfigurable substrate
❑ Reconfigurable functions
❑ Reconfigurable interconnection of functions
❑ Reconfigurable input/output (IO)
❑ …
◼ FPGAs fill the gap between software and hardware
❑ Achieves higher performance than software
❑ Maintains more flexibility than hardware
28
FPGA Architecture - Looking Inside an FPGA
29
◼ Two main building blocks:
❑ Look-Up Tables (LUT) and Switches
Andre DeHon, “The Density Advantage of Configurable Computing”, Computer, 2000
◼ 3-bit input LUT (3-LUT)
How Do We Program LUTs?
30
input (3 bits)
output (1 bit)
Data Input
Multiplexer (Mux):
Selects one of the data input
corresponding to select input
3
Select Input
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
3-LUT can implement
any 3-bit input function
◼ Let’s implement a function that outputs ‘1’ when there are
more than one ‘1’ in select inputs
An Example of Programming a LUT
31
input (3 bits)
output (1 bit)
Data Input
3
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Configuration Memory
0
0
0
1
0
1
1
1
How to Implement Complex Functions?
32
Andre DeHon, “The Density Advantage of Configurable Computing”, Computer, 2000
◼ FPGAs are composed of many LUTs and switches
FPGA Chip
Modern FPGA Architectures
◼ Typically 6-LUTs
❑ Thousands of them
◼ MBs of distributed on-chip memory
◼ Hard-coded special-purpose hardware blocks for high-performance operations
❑ Memory interface
❑ Low latency and high bandwidth off-chip I/O
❑ …
◼ Even a processor embedded within the FPGA chip
33
Xilinx Zynq Ultrascale+
34
https://www.xilinx.com/products/silicon-devices/soc/zynq-ultrascale-mpsoc.html
Advantages & Disadvantages of FPGAs
◼ Advantages
❑ Low development cost
❑ Short time to market
❑ Reconfigurable in the field
❑ Reusability
❑ An algorithm can be implemented directly in hardware
◼ No ISA, high specialization
◼ Disadvantages
❑ Not as fast and power efficient as application specific hardware
❑ Reconfigurability adds significant area overhead
35
Agenda
36
◼ Logistics
◼ What We Will learn?
◼ FPGAs in Today’s Systems
◼ Overview of the Lab Exercises
◼ What is an FPGA?
◼ Programming an FPGA
◼ Tutorial and Demo
Computer-Aided Design (CAD) Tools
◼ FPGAs have many resources (e.g., LUTs, switches)
◼ They are hard to program manually
◼ How can we
❑ represent a high-level functional description of our hardware circuit using the FPGA
resources?
❑ select the resources to map our circuit to?
❑ optimally configure the interconnect between the selected resources?
❑ generate a final configuration file to properly configure an FPGA?
37
FPGA Design Flow
38
Problem Definition
Hardware Description
Language (HDL)
Verilog, VHDL
Your task!
Logic Synthesis
Placement and Routing
Bitstream Generation Programming the FPGA
Xilinx Vivado
Vivado
◼ IDE-like software that helps us throughout the FPGA design flow
◼ Provides tools to simulate our designs
❑ Validate the correctness of the implementation
❑ Debugging
◼ Provides drivers and graphical interface to easily program the FPGA using a USB
cable
◼ Installed in computer rooms in HG (E 19, E 26.1, E 26.3, E 27)
39
Tutorial and Demo
◼ We will see how to
❑ use Vivado to write Verilog code
❑ follow the FPGA design flow steps
❑ download the bitstream into the FPGA
◼ Simple Keyboard Demo
❑ An example for a simple hardware that you can easily develop by the end of semester
40
https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-keyboard-demo/start
Today We Covered:
41
◼ Logistics
◼ What We Will learn?
◼ FPGAs in Today’s Systems
◼ Overview of the Lab Exercises
◼ What is an FPGA?
◼ Programming an FPGA
◼ Tutorial and Demo
Digital Design & Computer Arch.
Lecture 3b: Introduction to the Labs and FPGAs
Prof. Onur Mutlu
(Lecture by Hasan Hassan)
ETH Zurich
Spring 2020
27 February 2020
42

More Related Content

Similar to digitaldesign-s20-lecture3b-fpga-afterlecture.pdf

Unified Computing System - PC Without CPU
Unified Computing System - PC Without CPUUnified Computing System - PC Without CPU
Unified Computing System - PC Without CPUErAnalSalshingikar
 
PGI Compilers & Tools Update- March 2018
PGI Compilers & Tools Update- March 2018PGI Compilers & Tools Update- March 2018
PGI Compilers & Tools Update- March 2018NVIDIA
 
Transparent GPU Exploitation for Java
Transparent GPU Exploitation for JavaTransparent GPU Exploitation for Java
Transparent GPU Exploitation for JavaKazuaki Ishizaki
 
Design of Software for Embedded Systems
Design of Software for Embedded SystemsDesign of Software for Embedded Systems
Design of Software for Embedded SystemsPeter Tröger
 
DATE 2020: Design, Automation and Test in Europe Conference
DATE 2020: Design, Automation and Test in Europe ConferenceDATE 2020: Design, Automation and Test in Europe Conference
DATE 2020: Design, Automation and Test in Europe ConferenceLEGATO project
 
An In-Depth Look Into Microcontrollers
An In-Depth Look Into MicrocontrollersAn In-Depth Look Into Microcontrollers
An In-Depth Look Into MicrocontrollersICS
 
Dynamic sorting algorithm vizualizer.pdf
Dynamic sorting algorithm vizualizer.pdfDynamic sorting algorithm vizualizer.pdf
Dynamic sorting algorithm vizualizer.pdfAgneshShetty
 
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudExploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudRyousei Takano
 
Physical computing and iot programming final with cp sycs sem 3
Physical computing and iot programming final with cp sycs sem 3Physical computing and iot programming final with cp sycs sem 3
Physical computing and iot programming final with cp sycs sem 3WE-IT TUTORIALS
 
GPU and Deep learning best practices
GPU and Deep learning best practicesGPU and Deep learning best practices
GPU and Deep learning best practicesLior Sidi
 
Cuda meetup presentation 5
Cuda meetup presentation 5Cuda meetup presentation 5
Cuda meetup presentation 5Rihards Gailums
 
GPGPU Accelerates PostgreSQL (English)
GPGPU Accelerates PostgreSQL (English)GPGPU Accelerates PostgreSQL (English)
GPGPU Accelerates PostgreSQL (English)Kohei KaiGai
 
Python-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptxPython-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptxTuynLCh
 
Mauricio breteernitiz hpc-exascale-iscte
Mauricio breteernitiz hpc-exascale-iscteMauricio breteernitiz hpc-exascale-iscte
Mauricio breteernitiz hpc-exascale-isctembreternitz
 
Alto Desempenho com Java
Alto Desempenho com JavaAlto Desempenho com Java
Alto Desempenho com Javacodebits
 

Similar to digitaldesign-s20-lecture3b-fpga-afterlecture.pdf (20)

Introduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSPIntroduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSP
 
Unified Computing System - PC Without CPU
Unified Computing System - PC Without CPUUnified Computing System - PC Without CPU
Unified Computing System - PC Without CPU
 
IoT Session Thomas More
IoT Session Thomas MoreIoT Session Thomas More
IoT Session Thomas More
 
Cc internet of things @ Thomas More
Cc internet of things @ Thomas MoreCc internet of things @ Thomas More
Cc internet of things @ Thomas More
 
PGI Compilers & Tools Update- March 2018
PGI Compilers & Tools Update- March 2018PGI Compilers & Tools Update- March 2018
PGI Compilers & Tools Update- March 2018
 
Transparent GPU Exploitation for Java
Transparent GPU Exploitation for JavaTransparent GPU Exploitation for Java
Transparent GPU Exploitation for Java
 
Design of Software for Embedded Systems
Design of Software for Embedded SystemsDesign of Software for Embedded Systems
Design of Software for Embedded Systems
 
DATE 2020: Design, Automation and Test in Europe Conference
DATE 2020: Design, Automation and Test in Europe ConferenceDATE 2020: Design, Automation and Test in Europe Conference
DATE 2020: Design, Automation and Test in Europe Conference
 
An In-Depth Look Into Microcontrollers
An In-Depth Look Into MicrocontrollersAn In-Depth Look Into Microcontrollers
An In-Depth Look Into Microcontrollers
 
Dynamic sorting algorithm vizualizer.pdf
Dynamic sorting algorithm vizualizer.pdfDynamic sorting algorithm vizualizer.pdf
Dynamic sorting algorithm vizualizer.pdf
 
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudExploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC Cloud
 
Physical computing and iot programming final with cp sycs sem 3
Physical computing and iot programming final with cp sycs sem 3Physical computing and iot programming final with cp sycs sem 3
Physical computing and iot programming final with cp sycs sem 3
 
GPU and Deep learning best practices
GPU and Deep learning best practicesGPU and Deep learning best practices
GPU and Deep learning best practices
 
Cuda meetup presentation 5
Cuda meetup presentation 5Cuda meetup presentation 5
Cuda meetup presentation 5
 
GPGPU Accelerates PostgreSQL (English)
GPGPU Accelerates PostgreSQL (English)GPGPU Accelerates PostgreSQL (English)
GPGPU Accelerates PostgreSQL (English)
 
Python-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptxPython-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptx
 
Dsp lab manual 15 11-2016
Dsp lab manual 15 11-2016Dsp lab manual 15 11-2016
Dsp lab manual 15 11-2016
 
Mauricio breteernitiz hpc-exascale-iscte
Mauricio breteernitiz hpc-exascale-iscteMauricio breteernitiz hpc-exascale-iscte
Mauricio breteernitiz hpc-exascale-iscte
 
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGSA STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
 
Alto Desempenho com Java
Alto Desempenho com JavaAlto Desempenho com Java
Alto Desempenho com Java
 

Recently uploaded

Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts Servicejennyeacort
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...ttt fff
 
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一ss ss
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRdollysharma2066
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一Fi sss
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
威廉玛丽学院毕业证学位证成绩单-安全学历认证
威廉玛丽学院毕业证学位证成绩单-安全学历认证威廉玛丽学院毕业证学位证成绩单-安全学历认证
威廉玛丽学院毕业证学位证成绩单-安全学历认证kbdhl05e
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程1k98h0e1
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)861c7ca49a02
 
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...Authentic No 1 Amil Baba In Pakistan
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一ss ss
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...Amil baba
 
(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一C SSS
 
Presentation.pptxjnfoigneoifnvoeifnvklfnvf
Presentation.pptxjnfoigneoifnvoeifnvklfnvfPresentation.pptxjnfoigneoifnvoeifnvklfnvf
Presentation.pptxjnfoigneoifnvoeifnvklfnvfchapmanellie27
 
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证gwhohjj
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberMs Riya
 

Recently uploaded (20)

Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
 
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
 
威廉玛丽学院毕业证学位证成绩单-安全学历认证
威廉玛丽学院毕业证学位证成绩单-安全学历认证威廉玛丽学院毕业证学位证成绩单-安全学历认证
威廉玛丽学院毕业证学位证成绩单-安全学历认证
 
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
young call girls in  Khanpur,🔝 9953056974 🔝 escort Serviceyoung call girls in  Khanpur,🔝 9953056974 🔝 escort Service
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
 
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
 
(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一
 
Presentation.pptxjnfoigneoifnvoeifnvklfnvf
Presentation.pptxjnfoigneoifnvoeifnvklfnvfPresentation.pptxjnfoigneoifnvoeifnvklfnvf
Presentation.pptxjnfoigneoifnvoeifnvklfnvf
 
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
 
CIVIL ENGINEERING
CIVIL ENGINEERINGCIVIL ENGINEERING
CIVIL ENGINEERING
 

digitaldesign-s20-lecture3b-fpga-afterlecture.pdf

  • 1. Digital Design & Computer Arch. Lecture 3b: Introduction to the Labs and FPGAs Prof. Onur Mutlu (Lecture by Hasan Hassan) ETH Zurich Spring 2020 27 February 2020 1
  • 2. Lab Sessions ◼ Where? ❑ HG E 19, HG E 26.1, HG E 26.3, HG E 27, HG D 11, HG D 12 ◼ When? ❑ Tuesday 15:15-17:00 (E 26.1, E 26.3, E 27) ❑ Wednesday 15:15-17:00 (E 26.1, E 26.3) ❑ Friday 08:15-10:00 (D 11, D 12, E 26.3, E 27) ❑ Friday 10:15-12:00 (E 26.1, E 26.3, E 27) 2
  • 3. Grading ◼ 10 labs, 30 points in total ◼ We will put the lab manuals online ❑ https://safari.ethz.ch/digitaltechnik/doku.php?id=labs ◼ Grading Policy ❑ In-class evaluation (70%) and mandatory lab reports (30%) ◼ 1-point penalty for late submission of the report ❑ You can use your grades for labs from past years ◼ You can find your grades in last year’s Moodle page: https://moodle- app2.let.ethz.ch/course/view.php?id=10483 You should finish the labs within 1 week after they are announced ◼ For questions ❑ Piazza (preferred) ❑ digitaltechnik@lists.inf.ethz.ch 3
  • 4. Agenda ◼ Logistics ◼ What We Will learn? ◼ FPGAs in Today’s Systems ◼ Overview of the Lab Exercises ◼ What is an FPGA? ◼ Programming an FPGA ◼ Tutorial and Demo 4
  • 5. What We Will Learn? 5 Micro-architecture SW/HW Interface Program/Language Algorithm Problem Logic Devices System Software Electrons The Transformation Hierarchy Touch upon implementation details Hands-on experience in digital circuit design and implementation Understanding how a processor works underneath the software layer
  • 6. What We Will Learn? (2) 6 ◼ Considering the trade-offs between performance and area/complexity in your hardware implementation ◼ Hands-on experience on: ❑ Hardware Prototyping on FPGA ❑ Debugging Your Hardware Implementation ❑ Hardware Description Language (HDL) ❑ Hardware Design Flow ❑ Computer-Aided Design (CAD) Tools
  • 7. Agenda 7 ◼ Logistics ◼ What We Will learn? ◼ FPGAs in Today’s Systems ◼ Overview of the Lab Exercises ◼ What is an FPGA? ◼ Programming an FPGA ◼ Tutorial and Demo
  • 8. FPGAs in Today’s Systems: Project Brainwave ◼ “Microsoft’s Project Brainwave is a deep learning platform for real-time AI inference in the cloud and on the edge. A soft Neural Processing Unit (NPU), based on a high-performance field-programmable gate array (FPGA), accelerates deep neural network (DNN) inferencing, with applications in computer vision and natural language processing. Project Brainwave is transforming computing by augmenting CPUs with an interconnected and configurable compute layer composed of programmable silicon.” 8 https://www.microsoft.com/en-us/research/project/project-brainwave/ https://www.microsoft.com/en-us/research/blog/microsoft-unveils-project-brainwave/
  • 9. FPGAs in Today’s Systems: Amazon EC2 F1 ◼ “Amazon EC2 F1 instances use FPGAs to enable delivery of custom hardware accelerations. F1 instances are easy to program and come with everything you need to develop, simulate, debug, and compile your hardware acceleration code, including an FPGA Developer AMI and supporting hardware level development on the cloud. Using F1 instances to deploy hardware accelerations can be useful in many applications to solve complex science, engineering, and business problems that require high bandwidth, enhanced networking, and very high compute capabilities.” 9 https://aws.amazon.com/ec2/instance-types/f1/
  • 10. FPGAs in Today’s Systems: DNA Sequencing ◼ DRAGEN’s suite of analysis pipelines are engineered to run on FPGAs, offering hardware-accelerated implementations of genomic analysis algorithms, including BCL conversion, mapping and alignment, sorting, duplicate marking and haplotype variant calling. 10 https://www.illumina.com/products/by-type/informatics-products/dragen-bio-it-platform.html Illumina NextSeq 2000 Illumina DRAGEN (Dynamic Read Analysis for GENomics) Bio-IT Platform
  • 11. FPGAs in Today’s Systems: GateKeeper 11 Alser+, "GateKeeper: A New Hardware Architecture for Accelerating Pre-Alignment in DNA Short Read Mapping”, Bioinformatics, 2017.
  • 12. FPGAs in Today’s Systems: SoftMC 12 ◼ An open-source FPGA-based infrastructure for experimental studies on DRAM ◼ Flexible ◼ Easy to Use (C++ API) ◼ Open-source github.com/CMU-SAFARI/SoftMC Hassan+, “SoftMC: A Flexible and Practical Open-Source Infrastructure for Enabling Experimental DRAM Studies,” HPCA 2017.
  • 13. FPGAs in Today’s Systems: Characterizing Flash Memories 13 Cai+, “Error Characterization, Mitigation, and Recovery in Flash Memory Based Solid State Drives,” Proc. IEEE 2017. USB Jack Virtex-II Pro (USB controller) Virtex-V FPGA (NAND Controller) HAPS-52 Mother Board USB Daughter Board NAND Daughter Board 1x-nm NAND Flash [DATE 2012, ICCD 2012, DATE 2013, ITJ 2013, ICCD 2013, SIGMETRICS 2014, HPCA 2015, DSN 2015, MSST 2015, JSAC 2016, HPCA 2017, DFRWS 2017, PIEEE 2017, HPCA 2018, SIGMETRICS 2018]
  • 14. Agenda 14 ◼ Logistics ◼ What We Will learn? ◼ FPGAs in Today’s Systems ◼ Overview of the Lab Exercises ◼ What is an FPGA? ◼ Programming an FPGA ◼ Tutorial and Demo
  • 15. Basys 3: Our FPGA Board Switches LEDs Seven-segment displays microUSB (power/programming) Power switch Video out (VGA) FPGA chip Push-buttons USB 15 https://reference.digilentinc.com/reference/programmable-logic/basys-3/start
  • 16. High Level Labs Summary ◼ At the end of the exercises, we will have built a 32-bit microprocessor running on the FPGA board ❑ It will be a small processor, but it will be able to execute pretty much any program ◼ Each week we will have a new exercise ❑ Not all exercises will require the FPGA board ◼ You are encouraged to experiment with the board on your own ❑ We may have some extra boards for those who are interested ❑ It is not possible to destroy the board by programming! 16
  • 17. Lab 1: Drawing a Basic Circuit ◼ Comparison is a common operation in software programming ❑ We usually want to know the relation between two variables (e.g., <, >, ==, …) ◼ We will compare two electrical signals (inputs), and find whether they are same ❑ The result (output) is also an electrical signal ◼ No FPGA programming involved ❑ We encourage you to try later 17
  • 18. Lab 2: Mapping Your Circuit to FPGA ◼ Another common operation in software programming? ❑ Addition ◼ Design a circuit that adds two 1-bit numbers ◼ Reuse the 1-bit adder multiple times to perform 4-bit addition ◼ Implement the design on the FPGA board ❑ Input: switches ❑ Output: LEDs 18
  • 19. Lab 3: Verilog for Combinatorial Circuits ◼ Show your results from Lab 2 on a Seven Segment Display 19 https://reference.digilentinc.com/reference/programmable- logic/basys-3/reference-manual
  • 20. Lab 4: Finite State Machines ◼ Blinking LEDs for a car’s turn signals ❑ Implement and use memories ❑ Change the blinking speed 20
  • 21. Lab 5: Implementing an ALU ◼ Towards implementing your very first processor ◼ Implement your own Arithmetic and Logic Unit (ALU) ◼ An ALU is an important part of the CPU ❑ Arithmetic operations: add, subtract, multiply, compare, … ❑ Logic operations: AND, OR, … 21
  • 22. Lab 6: Testing the ALU ◼ Simulate your design from Lab 5 ◼ Learn how to debug your implementation to resolve problems 22
  • 23. Lab 7: Writing Assembly Code ◼ Programming in assembly language ❑ MIPS ◼ Implement a program which you will later use to run on your processor ◼ Image manipulation 23
  • 24. Lab 8: Full System Integration ◼ Will be covered in two weeks ◼ Learn how a processor is built ◼ Complete your first design of a MIPS processor ◼ Run a “snake” program 24
  • 25. Lab 9: The Performance of MIPS ◼ Improve the performance of your processor from Lab 8 by adding new instructions ❑ Multiplication ❑ Bit shifting 25
  • 26. Agenda 26 ◼ Logistics ◼ What We Will learn? ◼ FPGAs in Today’s Systems ◼ Overview of the Lab Exercises ◼ What is an FPGA? ◼ Programming an FPGA ◼ Tutorial and Demo
  • 27. Basys 3: Our FPGA Board Switches LEDs Seven-segment displays microUSB (power/programming) Power switch Video out (VGA) FPGA chip Push-buttons USB 27 https://reference.digilentinc.com/reference/programmable-logic/basys-3/start
  • 28. What is an FPGA? ◼ Field Programmable Gate Array ◼ FPGA is a reconfigurable substrate ❑ Reconfigurable functions ❑ Reconfigurable interconnection of functions ❑ Reconfigurable input/output (IO) ❑ … ◼ FPGAs fill the gap between software and hardware ❑ Achieves higher performance than software ❑ Maintains more flexibility than hardware 28
  • 29. FPGA Architecture - Looking Inside an FPGA 29 ◼ Two main building blocks: ❑ Look-Up Tables (LUT) and Switches Andre DeHon, “The Density Advantage of Configurable Computing”, Computer, 2000
  • 30. ◼ 3-bit input LUT (3-LUT) How Do We Program LUTs? 30 input (3 bits) output (1 bit) Data Input Multiplexer (Mux): Selects one of the data input corresponding to select input 3 Select Input 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 3-LUT can implement any 3-bit input function
  • 31. ◼ Let’s implement a function that outputs ‘1’ when there are more than one ‘1’ in select inputs An Example of Programming a LUT 31 input (3 bits) output (1 bit) Data Input 3 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Configuration Memory 0 0 0 1 0 1 1 1
  • 32. How to Implement Complex Functions? 32 Andre DeHon, “The Density Advantage of Configurable Computing”, Computer, 2000 ◼ FPGAs are composed of many LUTs and switches FPGA Chip
  • 33. Modern FPGA Architectures ◼ Typically 6-LUTs ❑ Thousands of them ◼ MBs of distributed on-chip memory ◼ Hard-coded special-purpose hardware blocks for high-performance operations ❑ Memory interface ❑ Low latency and high bandwidth off-chip I/O ❑ … ◼ Even a processor embedded within the FPGA chip 33
  • 35. Advantages & Disadvantages of FPGAs ◼ Advantages ❑ Low development cost ❑ Short time to market ❑ Reconfigurable in the field ❑ Reusability ❑ An algorithm can be implemented directly in hardware ◼ No ISA, high specialization ◼ Disadvantages ❑ Not as fast and power efficient as application specific hardware ❑ Reconfigurability adds significant area overhead 35
  • 36. Agenda 36 ◼ Logistics ◼ What We Will learn? ◼ FPGAs in Today’s Systems ◼ Overview of the Lab Exercises ◼ What is an FPGA? ◼ Programming an FPGA ◼ Tutorial and Demo
  • 37. Computer-Aided Design (CAD) Tools ◼ FPGAs have many resources (e.g., LUTs, switches) ◼ They are hard to program manually ◼ How can we ❑ represent a high-level functional description of our hardware circuit using the FPGA resources? ❑ select the resources to map our circuit to? ❑ optimally configure the interconnect between the selected resources? ❑ generate a final configuration file to properly configure an FPGA? 37
  • 38. FPGA Design Flow 38 Problem Definition Hardware Description Language (HDL) Verilog, VHDL Your task! Logic Synthesis Placement and Routing Bitstream Generation Programming the FPGA Xilinx Vivado
  • 39. Vivado ◼ IDE-like software that helps us throughout the FPGA design flow ◼ Provides tools to simulate our designs ❑ Validate the correctness of the implementation ❑ Debugging ◼ Provides drivers and graphical interface to easily program the FPGA using a USB cable ◼ Installed in computer rooms in HG (E 19, E 26.1, E 26.3, E 27) 39
  • 40. Tutorial and Demo ◼ We will see how to ❑ use Vivado to write Verilog code ❑ follow the FPGA design flow steps ❑ download the bitstream into the FPGA ◼ Simple Keyboard Demo ❑ An example for a simple hardware that you can easily develop by the end of semester 40 https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-keyboard-demo/start
  • 41. Today We Covered: 41 ◼ Logistics ◼ What We Will learn? ◼ FPGAs in Today’s Systems ◼ Overview of the Lab Exercises ◼ What is an FPGA? ◼ Programming an FPGA ◼ Tutorial and Demo
  • 42. Digital Design & Computer Arch. Lecture 3b: Introduction to the Labs and FPGAs Prof. Onur Mutlu (Lecture by Hasan Hassan) ETH Zurich Spring 2020 27 February 2020 42