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 reportrahul kumar verma
 
Programmable logic device (PLD)
Programmable logic device (PLD)Programmable logic device (PLD)
Programmable logic device (PLD)Sɐɐp ɐɥɯǝp
 
Fundamentals of FPGA
Fundamentals of FPGAFundamentals of FPGA
Fundamentals of FPGAvelamakuri
 
Field programable gate array
Field programable gate arrayField programable gate array
Field programable gate arrayNeha Agarwal
 
FPGA Overview
FPGA OverviewFPGA Overview
FPGA OverviewMetalMath
 
FPGA_Overview_Ibr_2014
FPGA_Overview_Ibr_2014FPGA_Overview_Ibr_2014
FPGA_Overview_Ibr_2014Ibrahim Hejab
 
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 TechnologyTELKOMNIKA JOURNAL
 
FPGA TECHNOLOGY AND FAMILIES
FPGA TECHNOLOGY AND FAMILIESFPGA TECHNOLOGY AND FAMILIES
FPGA TECHNOLOGY AND FAMILIESrevathilakshmi2
 
SoC~FPGA~ASIC~Embedded
SoC~FPGA~ASIC~EmbeddedSoC~FPGA~ASIC~Embedded
SoC~FPGA~ASIC~EmbeddedChili.CHIPS
 
Security issues in FPGA based systems.
Security issues in FPGA based systems.Security issues in FPGA based systems.
Security issues in FPGA based systems.Rajeev Verma
 

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 Algorithmstyramisu
 
Calculator design with lcd using fpga
Calculator design with lcd using fpgaCalculator design with lcd using fpga
Calculator design with lcd using fpgaHossam Hassan
 
Controller Implementation in Verilog
Controller Implementation in VerilogController Implementation in Verilog
Controller Implementation in VerilogAnees Akhtar
 
Alu design-project
Alu design-projectAlu design-project
Alu design-projectalphankg1
 
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 verilogSTEPHEN MOIRANGTHEM
 
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-2015E2MATRIX
 
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 HDLVishesh Thakur
 
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...Rahul Borthakur
 
Fundamental analysis
Fundamental analysisFundamental analysis
Fundamental analysiseshabhatia
 
UNIT-I DIGITAL SYSTEM DESIGN
UNIT-I DIGITAL SYSTEM DESIGN UNIT-I DIGITAL SYSTEM DESIGN
UNIT-I DIGITAL SYSTEM DESIGN Dr.YNM
 
automated teller machines
automated teller  machinesautomated teller  machines
automated teller machinestejinderubs
 

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

FPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusionFPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusionPersiPersi1
 
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 ArraysUsha Mehta
 
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).pptL12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).pptMikeTango5
 
L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)NAGASAI547
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
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 overviewVaibhav R
 
OliverStoneSWResume2015-05
OliverStoneSWResume2015-05OliverStoneSWResume2015-05
OliverStoneSWResume2015-05Oliver 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.pdfkanyaakiran
 
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 ElixirHideki Takase
 
Digital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationDigital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationAmber Bhaumik
 
0.FPGA for dummies: Historical introduction
0.FPGA for dummies: Historical introduction0.FPGA for dummies: Historical introduction
0.FPGA for dummies: Historical introductionMaurizio Donna
 
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 ModelsSpace Codesign
 

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

Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptbibisarnayak0
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectErbil Polytechnic University
 
Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxachiever3003
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 

Recently uploaded (20)

Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.ppt
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction Project
 
Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptx
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 

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