SlideShare a Scribd company logo
1 of 39
FPGA Workshop
Part 1: basics
Agenda
• What is FPGA and what inside FPGA
• What are the major differences between firmware development for
MCU and FPGA
• Some very basics of Verilog HDL language (by similarities with C/C++)
• Testbench approach and Icarus simulator demonstration
• Altera Quartus IDE demonstration -- creating project, compilation,
and download
• Signal-Tap internal logic analyzer demonstration
Situation on Embedded Market
From UBM Tech / EETimes Embedded Market 2015 survey
Situation on Embedded Market
From UBM Tech Embedded Market 2014 survey
Some history
• Creative logic designers realized
that small, fast PROMs could also
be configured to perform simple
logic functions.
• Semiconductor vendors began to
develop devices specifically
intended for logic applications. In
June 1975 Intersil Corp. introduced
the IM5200 PLA (Programmable
Logic Array).
Even in Russia (USSR)!
• Full reverse-engineered copy of Signetics's N82S101 PAL (December 1985)
From PROM to PAL
Macrocell / LE evolution
What is FPGA
• Ocean of interconnections, where islands are macrocells
(Cyclone IV GX)
Variety of Altera Cyclone family
Cyclone I Cyclone II Cyclone III
Cyclone III
LS
Cyclone IV
E
Cyclone IV
GX Cyclone V E
Cyclone V SE
(SoC)
Logic elements
2,910-
20,060
4,608-
68,416
5,136-
119,088
70,208-
198,464
6,272-
114,480
14,400-
149,760 25k-301k 25k-110k
Embedded Memory,
Kbits 59-288 117-1,125 414-3,888 2,997-8,019 270-3,888 540-6,480
1,760-
12,200 1,400-5,570
PLLs 1-2 2-4 2-4 4 2-4 3-8 4-8 5-9 (+3 in SoC)
Differential channels 34-129 58-262 70-233 113-181 66-230 25-216 112-240 74-144
18bit multipliers 23-288 200-396 15-266 0-360 50-684 72-224
Pins 100-400 144-896 144-780 484-780 144-780 169-896 383-896 484-896
Package TQFP, BGA TQFP, BGA EQFP, BGA BGA EQFP, BGA BGA BGA BGA
Additional functions
PCIe, 3.125 DDR
Gbps LVDS
DDR, Cortex-
A9 +
periphery
Core voltage 1.5V 1.2V 1.2V 1.2V 1V 1.2V 1.1V 1.1V
Price (digikey) $12-$124 $14-$353 $16-$483 $532-$1200 $11-$512 $25-$586 $34-$428 $60-$246
Process technology,
nm 130nm 90nm 65nm 65nm 60nm 28nm
Year introduced 2002 2004 2007 2007 2009 2011 ~2013
MCU vs FPGA from Hardware Engineer’s
perspective
How to program FPGA
• Draw logic circuit (using logic elements, flip-flops, counters, etc) – old
style, good control of results
• VHDL (first appeared 1980s) – developed by US Department of
Defense – has quite cumbersome syntax (imho)
• Verilog HDL (first appeared 1984) – developed by Cadence
• Using C/C++, Java, Python, etc libraries to describe and model digital
logic circuits – esoteric (not a state of the art)
• OpenCL – language for GPU programming, constrained by specific
hardware architecture
Anatomy of Hardware description languages
(HDL)
C vs Verilog
C/C++ Verilog
case sensitive case sensitive
{ … } begin … end (like in Pascal)
if (...) else if (...) else
type var; type var;
a = b; a = b;
==, <, > ==, <, >
&, |, ^ &, |, ^
+, -, *, / +, -, *, /
= (..) ? (..) : (..)= (..) ? (..) : (..) (ternary operator)
for (.., …, …) for (.., …, …)
while (…) while (…)
"bla-bla" "bla-bla"
// comment // comment
C vs Verilog
• C/C++ is for sequential computational model
• Verilog is for truly parallel computational model, i.e. your program is
executing completely in parallel unless you implement synchronization to
events
• Base unit in C – is a function, with input variables and return
• Base unit in Verilog – is a device, with input and output signals
(I.e. coding in Verilog and any other HDL requires changing a little bit
your way of thinking about program execution, you should think in
parallel way) => best analogs are interrupts or callback handlers in C
MCU firmware development cycle
FPGA firmware development cycle
The running light example
The running light example (cont.)
How to improve cycling shift?
Sequential assignments Parallel assignments
e
v
a
l
evaluation
Take subrange of vector
and concatenate
Parametrization by constant value
No more hodgie code!
Simple testbench (just for running our
module)
Simple testbench (just for running our
module) cont.
Icarus Verilog: freeware simulator
• Official site: http://iverilog.icarus.com/
• Download for Windows: http://bleyer.org/icarus/
• Online (not waveform viewer) http://www.iverilog.com/index.php
Simple .bat batch file: compile, run, view
Click for sources:
Altera Quartus II
Programmable logic device design software suite by Altera. The Web Edition is free, but only limited number of
FPGA families is supported. Updating every year (major version = year). Supported families set is changing also
for Web Edition every year (you should check supported families carefully before download).
Features:
• Analysis and synthesis of HDL designs (Verilog, VHDL, AHDL, circuit diagrams)
• RTL diagram viewer
• Timing analyzer, timing-driven synthesis
• ModelSim simulator (HDL pre-synthesis and post-fitting simulation)
• Qsys, a system-integration tool to generate FPGA-specific code pieces (PLLs, DRAM controllers, etc) or build
complete system with soft or hard processor core and peripherals
• SoC EDS, a set of development tools, utility programs, run-time software, and application examples to help
you develop software for SoC FPGA embedded systems.
• DSP Builder, a tool that creates a seamless bridge between the MATLAB/Simulink tool and Quartus II
software
• Firmware programming tool and SignalTap, the internal logic analyzer
(ps: we will use Quartus 11 because it supports Cyclone I)
FPGA logic compilation flow (in Quartus)
Quartus – starting new project
menu:
File >
New Project Wizard…
Next page #2:
add
RunningLight.v source file
Quartus – selecting FPGA chip
then press Finish
Project created!
Double click to open code
Top level entity code
Click to compile
Compilation messages
Logic compilation finished!
RTL Viewer
menu:
Tools >
Viewers >
RTL Viewer
Physical assignments: pins
Assigning pins
menu:
Assignments >
Pin Planner
Then compile!
Download firmware
menu:
Tools >
Programmer
Setup programming
hardware tool Specify what
you want
Will be download
directly to FPGA (not
in configuration
memory)
SignalTap II logic analyzer
• Full featured logic analyzer to see what inside FPGA
• One of the main debug tool
• Attaching to your design special part, no additional hardware needed
• Warning: it uses internal memory of FPGA and sometimes reducing
speed of your circuit
How to add SignalTap and signals to view
menu:
Tools >
SignalTap II
Logic analyzer
Setup programming
hardware tool
Specify recording
clock
Add signals
- Close, save and say
all Yes
- Recompile and
download to FPGA
again!
How to view
menu:
Tools >
SignalTap II
Logic analyzer
Press Run (one
shoot or
continuously)
Quartus Project (archived)
To open menu:
Project >
Restore Archived Project
Read more
• Verilog tutorial and reference: http://www.asic-
world.com/verilog/veritut.html
• Quartus tutorial: https://www.altera.com/content/dam/altera-
www/global/en_US/pdfs/literature/tt/tt_my_first_fpga.pdf
• Follow closely tutorial “DE0-Nano-SoC_My_First_FPGA.pdf“ for our
board: https://github.com/dwesterg/atlas-soc-
webcontent/blob/master/Documents/DE0-Nano-
SoC_My_First_FPGA.pdf

More Related Content

What's hot

FPGA in outer space seminar report
FPGA in outer space seminar reportFPGA in outer space seminar report
FPGA in outer space seminar report
rahul kumar verma
 
FPGA_Overview_Ibr_2014
FPGA_Overview_Ibr_2014FPGA_Overview_Ibr_2014
FPGA_Overview_Ibr_2014
Ibrahim Hejab
 

What's hot (20)

FPGA in outer space seminar report
FPGA in outer space seminar reportFPGA in outer space seminar report
FPGA in outer space seminar report
 
FPGA
FPGAFPGA
FPGA
 
Programmable logic device (PLD)
Programmable logic device (PLD)Programmable logic device (PLD)
Programmable logic device (PLD)
 
Fpga
FpgaFpga
Fpga
 
FPGA
FPGAFPGA
FPGA
 
Fundamentals of FPGA
Fundamentals of FPGAFundamentals of FPGA
Fundamentals of FPGA
 
FPGA Introduction
FPGA IntroductionFPGA Introduction
FPGA Introduction
 
Field programable gate array
Field programable gate arrayField programable gate array
Field programable gate array
 
FPGA Overview
FPGA OverviewFPGA Overview
FPGA Overview
 
FPGA_Overview_Ibr_2014
FPGA_Overview_Ibr_2014FPGA_Overview_Ibr_2014
FPGA_Overview_Ibr_2014
 
CPLDs
CPLDsCPLDs
CPLDs
 
Session 2,3 FPGAs
Session 2,3 FPGAsSession 2,3 FPGAs
Session 2,3 FPGAs
 
Lecture syn 024.cpld-fpga
Lecture syn 024.cpld-fpgaLecture syn 024.cpld-fpga
Lecture syn 024.cpld-fpga
 
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking TechnologyDesign of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
 
FPGA TECHNOLOGY AND FAMILIES
FPGA TECHNOLOGY AND FAMILIESFPGA TECHNOLOGY AND FAMILIES
FPGA TECHNOLOGY AND FAMILIES
 
Introduction to FPGAs
Introduction to FPGAsIntroduction to FPGAs
Introduction to FPGAs
 
FPGA In a Nutshell
FPGA In a NutshellFPGA In a Nutshell
FPGA In a Nutshell
 
What is FPGA?
What is FPGA?What is FPGA?
What is FPGA?
 
SoC~FPGA~ASIC~Embedded
SoC~FPGA~ASIC~EmbeddedSoC~FPGA~ASIC~Embedded
SoC~FPGA~ASIC~Embedded
 
Security issues in FPGA based systems.
Security issues in FPGA based systems.Security issues in FPGA based systems.
Security issues in FPGA based systems.
 

Viewers also liked

Classic Model Checking Algorithms
Classic Model Checking AlgorithmsClassic Model Checking Algorithms
Classic Model Checking Algorithms
tyramisu
 
Alu design-project
Alu design-projectAlu design-project
Alu design-project
alphankg1
 
Design of Elevator Controller using Verilog HDL
Design of Elevator Controller using Verilog HDLDesign of Elevator Controller using Verilog HDL
Design of Elevator Controller using Verilog HDL
Vishesh Thakur
 
Fundamental analysis
Fundamental analysisFundamental analysis
Fundamental analysis
eshabhatia
 
automated teller machines
automated teller  machinesautomated teller  machines
automated teller machines
tejinderubs
 

Viewers also liked (20)

Lec13
Lec13Lec13
Lec13
 
Classic Model Checking Algorithms
Classic Model Checking AlgorithmsClassic Model Checking Algorithms
Classic Model Checking Algorithms
 
Verilog Tasks and functions
Verilog Tasks and functionsVerilog Tasks and functions
Verilog Tasks and functions
 
Calculator design with lcd using fpga
Calculator design with lcd using fpgaCalculator design with lcd using fpga
Calculator design with lcd using fpga
 
Four elevator controller
Four elevator controllerFour elevator controller
Four elevator controller
 
Controller Implementation in Verilog
Controller Implementation in VerilogController Implementation in Verilog
Controller Implementation in Verilog
 
Fpga programming
Fpga programmingFpga programming
Fpga programming
 
Verilog
VerilogVerilog
Verilog
 
Alu design-project
Alu design-projectAlu design-project
Alu design-project
 
Design and implementation of 32 bit alu using verilog
Design and implementation of 32 bit alu using verilogDesign and implementation of 32 bit alu using verilog
Design and implementation of 32 bit alu using verilog
 
vlsi projects using verilog code 2014-2015
vlsi projects using verilog code 2014-2015vlsi projects using verilog code 2014-2015
vlsi projects using verilog code 2014-2015
 
Design of Elevator Controller using Verilog HDL
Design of Elevator Controller using Verilog HDLDesign of Elevator Controller using Verilog HDL
Design of Elevator Controller using Verilog HDL
 
VERILOG CODE
VERILOG CODEVERILOG CODE
VERILOG CODE
 
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
 
Atm.ppt
Atm.pptAtm.ppt
Atm.ppt
 
FPGA
FPGAFPGA
FPGA
 
Fundamental analysis
Fundamental analysisFundamental analysis
Fundamental analysis
 
UNIT-I DIGITAL SYSTEM DESIGN
UNIT-I DIGITAL SYSTEM DESIGN UNIT-I DIGITAL SYSTEM DESIGN
UNIT-I DIGITAL SYSTEM DESIGN
 
automated teller machines
automated teller  machinesautomated teller  machines
automated teller machines
 
The 2016 Economic Outlook in 17 Slides
The 2016 Economic Outlook in 17 SlidesThe 2016 Economic Outlook in 17 Slides
The 2016 Economic Outlook in 17 Slides
 

Similar to FPGA workshop

L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)
NAGASAI547
 
Open source tools for logic synthesis and soc design an overview
Open source tools for logic synthesis and soc design  an overviewOpen source tools for logic synthesis and soc design  an overview
Open source tools for logic synthesis and soc design an overview
Vaibhav R
 
OliverStoneSWResume2015-05
OliverStoneSWResume2015-05OliverStoneSWResume2015-05
OliverStoneSWResume2015-05
Oliver Stone
 
Unit 5_Realizing Applications in FPGA.pdf
Unit 5_Realizing Applications in FPGA.pdfUnit 5_Realizing Applications in FPGA.pdf
Unit 5_Realizing Applications in FPGA.pdf
kanyaakiran
 
Digital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationDigital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA Implementation
Amber Bhaumik
 

Similar to FPGA workshop (20)

FPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusionFPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusion
 
FPGA @ UPB-BGA
FPGA @ UPB-BGAFPGA @ UPB-BGA
FPGA @ UPB-BGA
 
Basic Design Flow for Field Programmable Gate Arrays
Basic Design Flow for Field Programmable Gate ArraysBasic Design Flow for Field Programmable Gate Arrays
Basic Design Flow for Field Programmable Gate Arrays
 
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).pptL12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
 
L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Open source tools for logic synthesis and soc design an overview
Open source tools for logic synthesis and soc design  an overviewOpen source tools for logic synthesis and soc design  an overview
Open source tools for logic synthesis and soc design an overview
 
nios.ppt
nios.pptnios.ppt
nios.ppt
 
OliverStoneSWResume2015-05
OliverStoneSWResume2015-05OliverStoneSWResume2015-05
OliverStoneSWResume2015-05
 
Unit 5_Realizing Applications in FPGA.pdf
Unit 5_Realizing Applications in FPGA.pdfUnit 5_Realizing Applications in FPGA.pdf
Unit 5_Realizing Applications in FPGA.pdf
 
Cockatrice: A Hardware Design Environment with Elixir
Cockatrice: A Hardware Design Environment with ElixirCockatrice: A Hardware Design Environment with Elixir
Cockatrice: A Hardware Design Environment with Elixir
 
TeksunLab Pegasus Program Details 2014
TeksunLab Pegasus Program Details 2014TeksunLab Pegasus Program Details 2014
TeksunLab Pegasus Program Details 2014
 
Digital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationDigital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA Implementation
 
SoC Design
SoC DesignSoC Design
SoC Design
 
Introduction to EDA Tools
Introduction to EDA ToolsIntroduction to EDA Tools
Introduction to EDA Tools
 
FPGA.ppt
FPGA.pptFPGA.ppt
FPGA.ppt
 
0.FPGA for dummies: Historical introduction
0.FPGA for dummies: Historical introduction0.FPGA for dummies: Historical introduction
0.FPGA for dummies: Historical introduction
 
Performance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL ModelsPerformance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL Models
 

Recently uploaded

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Recently uploaded (20)

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 

FPGA workshop

  • 2. Agenda • What is FPGA and what inside FPGA • What are the major differences between firmware development for MCU and FPGA • Some very basics of Verilog HDL language (by similarities with C/C++) • Testbench approach and Icarus simulator demonstration • Altera Quartus IDE demonstration -- creating project, compilation, and download • Signal-Tap internal logic analyzer demonstration
  • 3. Situation on Embedded Market From UBM Tech / EETimes Embedded Market 2015 survey
  • 4. Situation on Embedded Market From UBM Tech Embedded Market 2014 survey
  • 5. Some history • Creative logic designers realized that small, fast PROMs could also be configured to perform simple logic functions. • Semiconductor vendors began to develop devices specifically intended for logic applications. In June 1975 Intersil Corp. introduced the IM5200 PLA (Programmable Logic Array).
  • 6. Even in Russia (USSR)! • Full reverse-engineered copy of Signetics's N82S101 PAL (December 1985)
  • 8. Macrocell / LE evolution
  • 9. What is FPGA • Ocean of interconnections, where islands are macrocells (Cyclone IV GX)
  • 10. Variety of Altera Cyclone family Cyclone I Cyclone II Cyclone III Cyclone III LS Cyclone IV E Cyclone IV GX Cyclone V E Cyclone V SE (SoC) Logic elements 2,910- 20,060 4,608- 68,416 5,136- 119,088 70,208- 198,464 6,272- 114,480 14,400- 149,760 25k-301k 25k-110k Embedded Memory, Kbits 59-288 117-1,125 414-3,888 2,997-8,019 270-3,888 540-6,480 1,760- 12,200 1,400-5,570 PLLs 1-2 2-4 2-4 4 2-4 3-8 4-8 5-9 (+3 in SoC) Differential channels 34-129 58-262 70-233 113-181 66-230 25-216 112-240 74-144 18bit multipliers 23-288 200-396 15-266 0-360 50-684 72-224 Pins 100-400 144-896 144-780 484-780 144-780 169-896 383-896 484-896 Package TQFP, BGA TQFP, BGA EQFP, BGA BGA EQFP, BGA BGA BGA BGA Additional functions PCIe, 3.125 DDR Gbps LVDS DDR, Cortex- A9 + periphery Core voltage 1.5V 1.2V 1.2V 1.2V 1V 1.2V 1.1V 1.1V Price (digikey) $12-$124 $14-$353 $16-$483 $532-$1200 $11-$512 $25-$586 $34-$428 $60-$246 Process technology, nm 130nm 90nm 65nm 65nm 60nm 28nm Year introduced 2002 2004 2007 2007 2009 2011 ~2013
  • 11. MCU vs FPGA from Hardware Engineer’s perspective
  • 12. How to program FPGA • Draw logic circuit (using logic elements, flip-flops, counters, etc) – old style, good control of results • VHDL (first appeared 1980s) – developed by US Department of Defense – has quite cumbersome syntax (imho) • Verilog HDL (first appeared 1984) – developed by Cadence • Using C/C++, Java, Python, etc libraries to describe and model digital logic circuits – esoteric (not a state of the art) • OpenCL – language for GPU programming, constrained by specific hardware architecture
  • 13. Anatomy of Hardware description languages (HDL)
  • 14. C vs Verilog C/C++ Verilog case sensitive case sensitive { … } begin … end (like in Pascal) if (...) else if (...) else type var; type var; a = b; a = b; ==, <, > ==, <, > &, |, ^ &, |, ^ +, -, *, / +, -, *, / = (..) ? (..) : (..)= (..) ? (..) : (..) (ternary operator) for (.., …, …) for (.., …, …) while (…) while (…) "bla-bla" "bla-bla" // comment // comment
  • 15. C vs Verilog • C/C++ is for sequential computational model • Verilog is for truly parallel computational model, i.e. your program is executing completely in parallel unless you implement synchronization to events • Base unit in C – is a function, with input variables and return • Base unit in Verilog – is a device, with input and output signals (I.e. coding in Verilog and any other HDL requires changing a little bit your way of thinking about program execution, you should think in parallel way) => best analogs are interrupts or callback handlers in C
  • 18. The running light example
  • 19. The running light example (cont.)
  • 20. How to improve cycling shift? Sequential assignments Parallel assignments e v a l evaluation Take subrange of vector and concatenate Parametrization by constant value No more hodgie code!
  • 21. Simple testbench (just for running our module)
  • 22. Simple testbench (just for running our module) cont.
  • 23. Icarus Verilog: freeware simulator • Official site: http://iverilog.icarus.com/ • Download for Windows: http://bleyer.org/icarus/ • Online (not waveform viewer) http://www.iverilog.com/index.php
  • 24. Simple .bat batch file: compile, run, view Click for sources:
  • 25. Altera Quartus II Programmable logic device design software suite by Altera. The Web Edition is free, but only limited number of FPGA families is supported. Updating every year (major version = year). Supported families set is changing also for Web Edition every year (you should check supported families carefully before download). Features: • Analysis and synthesis of HDL designs (Verilog, VHDL, AHDL, circuit diagrams) • RTL diagram viewer • Timing analyzer, timing-driven synthesis • ModelSim simulator (HDL pre-synthesis and post-fitting simulation) • Qsys, a system-integration tool to generate FPGA-specific code pieces (PLLs, DRAM controllers, etc) or build complete system with soft or hard processor core and peripherals • SoC EDS, a set of development tools, utility programs, run-time software, and application examples to help you develop software for SoC FPGA embedded systems. • DSP Builder, a tool that creates a seamless bridge between the MATLAB/Simulink tool and Quartus II software • Firmware programming tool and SignalTap, the internal logic analyzer (ps: we will use Quartus 11 because it supports Cyclone I)
  • 26. FPGA logic compilation flow (in Quartus)
  • 27. Quartus – starting new project menu: File > New Project Wizard… Next page #2: add RunningLight.v source file
  • 28. Quartus – selecting FPGA chip then press Finish
  • 29. Project created! Double click to open code Top level entity code Click to compile Compilation messages
  • 33. Assigning pins menu: Assignments > Pin Planner Then compile!
  • 34. Download firmware menu: Tools > Programmer Setup programming hardware tool Specify what you want Will be download directly to FPGA (not in configuration memory)
  • 35. SignalTap II logic analyzer • Full featured logic analyzer to see what inside FPGA • One of the main debug tool • Attaching to your design special part, no additional hardware needed • Warning: it uses internal memory of FPGA and sometimes reducing speed of your circuit
  • 36. How to add SignalTap and signals to view menu: Tools > SignalTap II Logic analyzer Setup programming hardware tool Specify recording clock Add signals - Close, save and say all Yes - Recompile and download to FPGA again!
  • 37. How to view menu: Tools > SignalTap II Logic analyzer Press Run (one shoot or continuously)
  • 38. Quartus Project (archived) To open menu: Project > Restore Archived Project
  • 39. Read more • Verilog tutorial and reference: http://www.asic- world.com/verilog/veritut.html • Quartus tutorial: https://www.altera.com/content/dam/altera- www/global/en_US/pdfs/literature/tt/tt_my_first_fpga.pdf • Follow closely tutorial “DE0-Nano-SoC_My_First_FPGA.pdf“ for our board: https://github.com/dwesterg/atlas-soc- webcontent/blob/master/Documents/DE0-Nano- SoC_My_First_FPGA.pdf