Short Term Training Program on
“FPGA Based Digital Systems with Application
to SDR in Cognitive Environment”
Introduction to Digital Design with FPGAs
Prof. Anish Goel
What’s in the Programme
 Theory/Knowledge
 Experiments
 Hands-On Sessions
 Case Studies
 Quizzes
 Key contacts
 Query Sessions
 Beyond the course
 Nutcrackers
 Teaching/Learning
2 Digital Design with FPGAs Prof.Anish Goel
Schedule of the Programme
3 Digital Design with FPGAs Prof.Anish Goel
Monday 5th Oct STTP Module Venue
9 -9.30 Registration Room No 304
9.30- 11.30 Introduction to topic Room No 304
11.30-12.00 Formal Inaugural & Tea Break Room No 304
12.00 - 1.00 Lab I Room No 405 & 406
1.00 - 2.00 Lunch
2.00 - 4.00 Lab II Room No 405 & 406
4.00 - 8.00 Extra Sessions/Discussions Room No 405 & 406
Tuesday 6th Oct
9.00 - 10.30 FPGA Based Comm. Systems Room No 304
10.30 - 11. 00 Tea Break Room No 304
11.00 - 12.00 Lab III Room No 405 & 406
12.00-1.00 Lab IV Room No 405 & 406
1.00 - 2.00 Lunch
2.00 - 4.00 Lab V Room No 405 & 406
4.00 - 8.00 Extra Sessions/Discussions Room No 405 & 406
Learning Cycle in our STTP
Lectures
Case
Studies
Lab
Sessions
Extra
Classes
Assignm
ents
Software
Leaning
System
Design
4 Digital Design with FPGAs Prof.Anish Goel
Possible Outcomes of STTP
Knowledge
Practice
Attitude &
Aptitude
Wave of Interest and
Fun learning
Stay Happy! Stay Blessed!
Danger
Bouncer, Hectic,
Bla Bla Bla
WARNING !!!
DO NOT PROCEED
Proper Attitude
5 Digital Design with FPGAs Prof.Anish Goel
Head-start Here
Digital Design using FPGA’s
 Any circuit capable of processing Digital Data is termed
as a digital system.
 A system is a black box with inputs and outputs and a
relation between them.
Human Brain
(processing data for Participants
not listening to my lecture)
Inputs (Senses) Outputs (Actions)
Start Singing ?
Make them Sleep?
Walk Away?
6 Digital Design with FPGAs Prof.Anish Goel
Anyways Examples in Our World for
systems
 Automobile Engine
 VCD player
 Computer
 Smartphone
 Audio System
 Pen Drive
 Internet
 Whatever else
7 Digital Design with FPGAs Prof.Anish Goel
Digital and Analog
A
m
p
l
i
t
u
d
e
TimeT1 T2 T3
8 Digital Design with FPGAs Prof.Anish Goel
Realistic & Non-Realistic Signal
9 Digital Design with FPGAs Prof.Anish Goel
A little Push Helps
10 Digital Design with FPGAs Prof.Anish Goel
Digital Systems
 So digital systems are the ones that understand and process
digital/discrete data.
 We use only binary digital systems.
 Lot of research on Ternary and Quaternary Systems is being
carried out.
 But if you try to increase the number of discrete levels then
ultimately you would arrive at analog systems.
 In short binary digital systems are simple to understand,
analyze and design.
11 Digital Design with FPGAs Prof.Anish Goel
HDL (Hardware Description Language)
Digital Systems
Digital Systems
A
B C <= A.B
Digital Systems
B
A
C
Binary OutputBinary Inputs
12 Digital Design with FPGAs Prof.Anish Goel
Describe the Hardware
Digital Systems
Library ieee;
Use ieee.std_logic_1164.all;
EntityEntity DigitalSystemDigitalSystem isis
13 Digital Design with FPGAs Prof.Anish Goel
B
A
C
Digital Systems
Binary OutputBinary Inputs
Port (Port (a,ba,b: in bit;: in bit;
c: out bit);c: out bit);
end DigitalSystem;
Architecture behav of DigitalSystem is
A
B
Digital Systems
C <= A.B
Begin
C <= a and b;C <= a and b;
end behav;
Microprocessors and ASIC’s
 A microprocessor is a general purpose Digital System that can be
programmed for any functionality.
 For Eg.To implement
For I = 1;I < 10; I ++
X(I) =Y(I) + Z(I)
End
 So the above code requires following in terms of hardware:
 Adder
 Counter
 Registers
 But the microprocessor will have lots of additional circuitry like
arithmetic and logical circuits, memory interfaces, communication
interfaces etc.
 These circuits are required for implementing other functions
depending on the code, but not required for our small code as
above.
14 Digital Design with FPGAs Prof.Anish Goel
Microprocessors and ASIC’s
 In case where the circuit only needs to run the above
code only, having a microprocessor would be like wastage
of resources as most of its hardware remains unused.
 Instead if we are able to design only required circuit that
works efficiently then the system performance will
increase.
 Such a kind of circuit can be termed as Application
Specific Integrated Circuit or ASIC in short.
 FPGAs are the most common platform to implement
ASIC due to their re-configurability and ease of use.
15 Digital Design with FPGAs Prof.Anish Goel
Clear Difference!
Microprocessors FPGAs
Hardware is Already Present
Program it !
Theirs no Hardware
Create it !
16 Digital Design with FPGAs Prof.Anish Goel
Design Flow for ASIC (VLSI/CHIP)
17 Digital Design with FPGAs Prof.Anish Goel
FPGA Design Flow
18 Digital Design with FPGAs Prof.Anish Goel
Advantages of FPGA based Design
 Rapid prototyping.
 Real time results.
 Simulation and design up-gradation possible.
 Time to market reduces.
 Re-configurability at any time.
 Hardware updates possible in future.
19 Digital Design with FPGAs Prof.Anish Goel
Case Study – Full adder design
Full AdderB
A
C
S
Cout
S = A xor B xor C
S = (A and B) or (A and C) or (B and C)
A B C S Cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
20 Digital Design with FPGAs Prof.Anish Goel
Nutcracker I
99 X 99 = ?
21 Digital Design with FPGAs Prof.Anish Goel
Full adder Physical design flow
22 Digital Design with FPGAs Prof.Anish Goel
Full Adder Circuit
23 Digital Design with FPGAs Prof.Anish Goel
Full Adder Layout
24 Digital Design with FPGAs Prof.Anish Goel
Nutcracker II
2 x 2 = ?
25 Digital Design with FPGAs Prof.Anish Goel
Memory Based Digital Design
Digital Design with FPGAs Prof.Anish Goel26
A B C
0 0 0
0 1 1
1 0 1
1 1 0
What’s in the Black Box ?
Black Box
A
B
C
Memory Based Digital Design
Digital Design with FPGAs Prof.Anish Goel27
A B C
0 0 1
0 1 0
1 0 1
1 1 1
What’s in the Black Box ?
Black Box
A
B
C
Answer: Its memory (ROM)
Digital Design with FPGAs Prof.Anish Goel28
0
1
1
0
A
B
C
2 Bit Address
1 bit Data
Full Adder Design - FPGA
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity fa is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
cin : in STD_LOGIC;
s : out STD_LOGIC;
cout : out STD_LOGIC);
end fa;
architecture Behavioral of fa is
begin
s <= a xor b xor cin;
cout <= (a and b) or (a and cin) or (b and cin);
end Behavioral;
29 Digital Design with FPGAs Prof.Anish Goel
Full Adder Synthesis (RTL)
30 Digital Design with FPGAs Prof.Anish Goel
Full Adder Technology View
31 Digital Design with FPGAs Prof.Anish Goel
FPGA already knows the output. It doesn’t
calculate.
 Consider a multiplier
circuit that can be fed
with 2 numbers in the
range 1-4.
 Thus there can be 16
combinations of the
inputs.
 For each combination
the output is know as we
know it’s a multiplier.
A B A*B
1 1 1
1 2 2
1 3 3
1 4 4
2 1 2
2 2 4
2 3 6
2 4 8
3 1 3
3 2 6
3 3 9
3 4 12
4 1 4
4 2 8
4 3 12
4 4 16
32 Digital Design with FPGAs Prof.Anish Goel
FPGA Highlights
 A field-programmable gate array (FPGA) is an
integrated circuit designed to be configured by a
customer or a designer after manufacturing – hence
“field-programmable".
 Technically speaking, an FPGA can be used to solve any
problem which is computable.
 Another trend on the usage of FPGAs is hardware
acceleration, where one can use the FPGA to accelerate
certain parts of an algorithm and share part of the
computation between the FPGA and a generic processor.
33 Digital Design with FPGAs Prof.Anish Goel
Common FPGA Applications
34 Digital Design with FPGAs Prof.Anish Goel
•Aerospace and Defense
•Avionics/DO-254
•Communications
•Missiles & Munitions
•Secure Solutions
•Space
•Medical Electronics
•ASIC Prototyping
•Audio
•Connectivity Solutions
•Portable Electronics
•Radio
•Digital Signal Processing (DSP)
•Automotive
•High Resolution Video
•Image Processing
•Vehicle Networking and Connectivity
•Automotive Infotainment
•Broadcast
•Real-TimeVideo Engine
•EdgeQAM
•Encoders
•Displays
•Switches and Routers
•Consumer Electronics
•Digital Displays
•Digital Cameras
•Multi-function Printers
•Portable Electronics
•Set-top Boxes
•Data Center
•Servers
•Security
•Routers
•Switches
More Applications
35 Digital Design with FPGAs Prof.Anish Goel
•High Performance Computing
•Servers
•Super Computers
•SIGINT Systems
•High-end RADARs
•High-end Beam Forming Systems
•Data Mining Systems
•Industrial
•Industrial Imaging
•Industrial Networking
•Motor Control
•Medical
•Ultrasound
•CT Scanner
•MRI
•X-ray
•PET
•Surgical Systems
•Scientific Instruments
•Lock-in amplifiers
•Phase-locked loops
•Security
•Industrial Imaging
•Secure Solutions
•Video & Image Processing
•High Resolution Video
•Video Over IP Gateway
•Digital Displays
•Wired Communications
•OpticalTransport Networks
•Network Processing
•Connectivity Interfaces
•Wireless Communications
•Baseband
•Connectivity Interfaces
•Mobile Backhaul
•Radio
FPGA – Products and Market
 http://www.electronicsweekly.com/news/products/fpga-
pld/fpgas-big-space-satellites-2015-04/
 http://www.element14.com/community/docs/DOC-
13492/l/simplify-analog-channel-design-in-fpga-based-dso
 http://www.marketsandmarkets.com/PressReleases/fpga.as
p
36 Digital Design with FPGAs Prof.Anish Goel
Conclusion
 Digital Design using FPGAs required knowledge of Digital
Logic to design but ultimately implemented in generic
logic like memory or LUT.
 FPGA is a reconfigurable hardware that can be updated
just like OS (Android/Windows) provides software
updates.
 VLSI technology is already on the verge of saturation in
terms of Frequency of Operation and Device Size, hence
industry has started focusing more on Architecture based
enhancements.
37 Digital Design with FPGAs Prof.Anish Goel
Disclaimer !
38 Digital Design with FPGAs Prof.Anish Goel
Disclaimer !
 The data/material/information presented here are based
on learning from books, internet, experience and studies.
This programme aims to guide you along the lines of
learning and provides you with the same environment for
a short span. Please read the study material and
references carefully.
39 Digital Design with FPGAs Prof.Anish Goel

Digital System Design Basics

  • 1.
    Short Term TrainingProgram on “FPGA Based Digital Systems with Application to SDR in Cognitive Environment” Introduction to Digital Design with FPGAs Prof. Anish Goel
  • 2.
    What’s in theProgramme  Theory/Knowledge  Experiments  Hands-On Sessions  Case Studies  Quizzes  Key contacts  Query Sessions  Beyond the course  Nutcrackers  Teaching/Learning 2 Digital Design with FPGAs Prof.Anish Goel
  • 3.
    Schedule of theProgramme 3 Digital Design with FPGAs Prof.Anish Goel Monday 5th Oct STTP Module Venue 9 -9.30 Registration Room No 304 9.30- 11.30 Introduction to topic Room No 304 11.30-12.00 Formal Inaugural & Tea Break Room No 304 12.00 - 1.00 Lab I Room No 405 & 406 1.00 - 2.00 Lunch 2.00 - 4.00 Lab II Room No 405 & 406 4.00 - 8.00 Extra Sessions/Discussions Room No 405 & 406 Tuesday 6th Oct 9.00 - 10.30 FPGA Based Comm. Systems Room No 304 10.30 - 11. 00 Tea Break Room No 304 11.00 - 12.00 Lab III Room No 405 & 406 12.00-1.00 Lab IV Room No 405 & 406 1.00 - 2.00 Lunch 2.00 - 4.00 Lab V Room No 405 & 406 4.00 - 8.00 Extra Sessions/Discussions Room No 405 & 406
  • 4.
    Learning Cycle inour STTP Lectures Case Studies Lab Sessions Extra Classes Assignm ents Software Leaning System Design 4 Digital Design with FPGAs Prof.Anish Goel
  • 5.
    Possible Outcomes ofSTTP Knowledge Practice Attitude & Aptitude Wave of Interest and Fun learning Stay Happy! Stay Blessed! Danger Bouncer, Hectic, Bla Bla Bla WARNING !!! DO NOT PROCEED Proper Attitude 5 Digital Design with FPGAs Prof.Anish Goel
  • 6.
    Head-start Here Digital Designusing FPGA’s  Any circuit capable of processing Digital Data is termed as a digital system.  A system is a black box with inputs and outputs and a relation between them. Human Brain (processing data for Participants not listening to my lecture) Inputs (Senses) Outputs (Actions) Start Singing ? Make them Sleep? Walk Away? 6 Digital Design with FPGAs Prof.Anish Goel
  • 7.
    Anyways Examples inOur World for systems  Automobile Engine  VCD player  Computer  Smartphone  Audio System  Pen Drive  Internet  Whatever else 7 Digital Design with FPGAs Prof.Anish Goel
  • 8.
    Digital and Analog A m p l i t u d e TimeT1T2 T3 8 Digital Design with FPGAs Prof.Anish Goel
  • 9.
    Realistic & Non-RealisticSignal 9 Digital Design with FPGAs Prof.Anish Goel
  • 10.
    A little PushHelps 10 Digital Design with FPGAs Prof.Anish Goel
  • 11.
    Digital Systems  Sodigital systems are the ones that understand and process digital/discrete data.  We use only binary digital systems.  Lot of research on Ternary and Quaternary Systems is being carried out.  But if you try to increase the number of discrete levels then ultimately you would arrive at analog systems.  In short binary digital systems are simple to understand, analyze and design. 11 Digital Design with FPGAs Prof.Anish Goel
  • 12.
    HDL (Hardware DescriptionLanguage) Digital Systems Digital Systems A B C <= A.B Digital Systems B A C Binary OutputBinary Inputs 12 Digital Design with FPGAs Prof.Anish Goel
  • 13.
    Describe the Hardware DigitalSystems Library ieee; Use ieee.std_logic_1164.all; EntityEntity DigitalSystemDigitalSystem isis 13 Digital Design with FPGAs Prof.Anish Goel B A C Digital Systems Binary OutputBinary Inputs Port (Port (a,ba,b: in bit;: in bit; c: out bit);c: out bit); end DigitalSystem; Architecture behav of DigitalSystem is A B Digital Systems C <= A.B Begin C <= a and b;C <= a and b; end behav;
  • 14.
    Microprocessors and ASIC’s A microprocessor is a general purpose Digital System that can be programmed for any functionality.  For Eg.To implement For I = 1;I < 10; I ++ X(I) =Y(I) + Z(I) End  So the above code requires following in terms of hardware:  Adder  Counter  Registers  But the microprocessor will have lots of additional circuitry like arithmetic and logical circuits, memory interfaces, communication interfaces etc.  These circuits are required for implementing other functions depending on the code, but not required for our small code as above. 14 Digital Design with FPGAs Prof.Anish Goel
  • 15.
    Microprocessors and ASIC’s In case where the circuit only needs to run the above code only, having a microprocessor would be like wastage of resources as most of its hardware remains unused.  Instead if we are able to design only required circuit that works efficiently then the system performance will increase.  Such a kind of circuit can be termed as Application Specific Integrated Circuit or ASIC in short.  FPGAs are the most common platform to implement ASIC due to their re-configurability and ease of use. 15 Digital Design with FPGAs Prof.Anish Goel
  • 16.
    Clear Difference! Microprocessors FPGAs Hardwareis Already Present Program it ! Theirs no Hardware Create it ! 16 Digital Design with FPGAs Prof.Anish Goel
  • 17.
    Design Flow forASIC (VLSI/CHIP) 17 Digital Design with FPGAs Prof.Anish Goel
  • 18.
    FPGA Design Flow 18Digital Design with FPGAs Prof.Anish Goel
  • 19.
    Advantages of FPGAbased Design  Rapid prototyping.  Real time results.  Simulation and design up-gradation possible.  Time to market reduces.  Re-configurability at any time.  Hardware updates possible in future. 19 Digital Design with FPGAs Prof.Anish Goel
  • 20.
    Case Study –Full adder design Full AdderB A C S Cout S = A xor B xor C S = (A and B) or (A and C) or (B and C) A B C S Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 20 Digital Design with FPGAs Prof.Anish Goel
  • 21.
    Nutcracker I 99 X99 = ? 21 Digital Design with FPGAs Prof.Anish Goel
  • 22.
    Full adder Physicaldesign flow 22 Digital Design with FPGAs Prof.Anish Goel
  • 23.
    Full Adder Circuit 23Digital Design with FPGAs Prof.Anish Goel
  • 24.
    Full Adder Layout 24Digital Design with FPGAs Prof.Anish Goel
  • 25.
    Nutcracker II 2 x2 = ? 25 Digital Design with FPGAs Prof.Anish Goel
  • 26.
    Memory Based DigitalDesign Digital Design with FPGAs Prof.Anish Goel26 A B C 0 0 0 0 1 1 1 0 1 1 1 0 What’s in the Black Box ? Black Box A B C
  • 27.
    Memory Based DigitalDesign Digital Design with FPGAs Prof.Anish Goel27 A B C 0 0 1 0 1 0 1 0 1 1 1 1 What’s in the Black Box ? Black Box A B C
  • 28.
    Answer: Its memory(ROM) Digital Design with FPGAs Prof.Anish Goel28 0 1 1 0 A B C 2 Bit Address 1 bit Data
  • 29.
    Full Adder Design- FPGA library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity fa is Port ( a : in STD_LOGIC; b : in STD_LOGIC; cin : in STD_LOGIC; s : out STD_LOGIC; cout : out STD_LOGIC); end fa; architecture Behavioral of fa is begin s <= a xor b xor cin; cout <= (a and b) or (a and cin) or (b and cin); end Behavioral; 29 Digital Design with FPGAs Prof.Anish Goel
  • 30.
    Full Adder Synthesis(RTL) 30 Digital Design with FPGAs Prof.Anish Goel
  • 31.
    Full Adder TechnologyView 31 Digital Design with FPGAs Prof.Anish Goel
  • 32.
    FPGA already knowsthe output. It doesn’t calculate.  Consider a multiplier circuit that can be fed with 2 numbers in the range 1-4.  Thus there can be 16 combinations of the inputs.  For each combination the output is know as we know it’s a multiplier. A B A*B 1 1 1 1 2 2 1 3 3 1 4 4 2 1 2 2 2 4 2 3 6 2 4 8 3 1 3 3 2 6 3 3 9 3 4 12 4 1 4 4 2 8 4 3 12 4 4 16 32 Digital Design with FPGAs Prof.Anish Goel
  • 33.
    FPGA Highlights  Afield-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturing – hence “field-programmable".  Technically speaking, an FPGA can be used to solve any problem which is computable.  Another trend on the usage of FPGAs is hardware acceleration, where one can use the FPGA to accelerate certain parts of an algorithm and share part of the computation between the FPGA and a generic processor. 33 Digital Design with FPGAs Prof.Anish Goel
  • 34.
    Common FPGA Applications 34Digital Design with FPGAs Prof.Anish Goel •Aerospace and Defense •Avionics/DO-254 •Communications •Missiles & Munitions •Secure Solutions •Space •Medical Electronics •ASIC Prototyping •Audio •Connectivity Solutions •Portable Electronics •Radio •Digital Signal Processing (DSP) •Automotive •High Resolution Video •Image Processing •Vehicle Networking and Connectivity •Automotive Infotainment •Broadcast •Real-TimeVideo Engine •EdgeQAM •Encoders •Displays •Switches and Routers •Consumer Electronics •Digital Displays •Digital Cameras •Multi-function Printers •Portable Electronics •Set-top Boxes •Data Center •Servers •Security •Routers •Switches
  • 35.
    More Applications 35 DigitalDesign with FPGAs Prof.Anish Goel •High Performance Computing •Servers •Super Computers •SIGINT Systems •High-end RADARs •High-end Beam Forming Systems •Data Mining Systems •Industrial •Industrial Imaging •Industrial Networking •Motor Control •Medical •Ultrasound •CT Scanner •MRI •X-ray •PET •Surgical Systems •Scientific Instruments •Lock-in amplifiers •Phase-locked loops •Security •Industrial Imaging •Secure Solutions •Video & Image Processing •High Resolution Video •Video Over IP Gateway •Digital Displays •Wired Communications •OpticalTransport Networks •Network Processing •Connectivity Interfaces •Wireless Communications •Baseband •Connectivity Interfaces •Mobile Backhaul •Radio
  • 36.
    FPGA – Productsand Market  http://www.electronicsweekly.com/news/products/fpga- pld/fpgas-big-space-satellites-2015-04/  http://www.element14.com/community/docs/DOC- 13492/l/simplify-analog-channel-design-in-fpga-based-dso  http://www.marketsandmarkets.com/PressReleases/fpga.as p 36 Digital Design with FPGAs Prof.Anish Goel
  • 37.
    Conclusion  Digital Designusing FPGAs required knowledge of Digital Logic to design but ultimately implemented in generic logic like memory or LUT.  FPGA is a reconfigurable hardware that can be updated just like OS (Android/Windows) provides software updates.  VLSI technology is already on the verge of saturation in terms of Frequency of Operation and Device Size, hence industry has started focusing more on Architecture based enhancements. 37 Digital Design with FPGAs Prof.Anish Goel
  • 38.
    Disclaimer ! 38 DigitalDesign with FPGAs Prof.Anish Goel
  • 39.
    Disclaimer !  Thedata/material/information presented here are based on learning from books, internet, experience and studies. This programme aims to guide you along the lines of learning and provides you with the same environment for a short span. Please read the study material and references carefully. 39 Digital Design with FPGAs Prof.Anish Goel