SlideShare a Scribd company logo
Introduction to VHDL M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
Domains of Description : Gajski’s Y-Chart Behavioral domain Structural domain Physical domain Level of  abstraction VHDL models
VHDL Development US DoD initiated in 80’s V ery  H igh Speed ASIC  D escription  L anguage Initial objective was modeling only and thus only a simulator was envisaged Subsequently tools for VHDL synthesis were developed
HDL Requirements Abstraction Modularity Concurrency Hierarchy
Abstraction VHDL supports description of components as well as systems at various levels of abstraction Gate and component delays Clock cycles Abstract behavior without any notion of delays
Modularity Every component in VHDL is referred to as an entity and has a clear interface The interface is called an entity declaration  The “internals” of the component are referred to as the architecture declaration There can be multiple architectures at even different levels of abstraction associated with the same entity
VHDL Example a b c AND
VHDL Description: AND gate entity   AND2  is port  (a, b:  in  bit ;   c :  out  bit); end   AND2; architecture  beh  of  AND2  is begin c <= a and b; end   beh;
Concurrency in  VHDL Descriptions signals process 1 process 2 process n signals
Concurrent and Sequential Computations Processes are concurrent Sequential activity within each process Nesting of statements : Concurrent statements in a concurrent statement Sequential statements in a concurrent statement Sequential statements in a sequential statement
Hierarchy in VHDL
Modeling Styles in VHDL   M. Balakrishnan Dept. of Comp. Sci. & Engg. I.I.T. Delhi
Modeling Styles Semantic model of VHDL Structural description Data Flow description Algorithmic description RTL description
Modeling Choices in VHDL Behavioral and Structural Domains Several Levels of Abstraction Multiple Styles of Behavioral Description: Data Flow Style (concurrent) Procedural Style (sequential) Combinations, variations and special cases of these, e.g., special case of data flow style - FSM described using guarded blocks special case of procedural style - FSM described using case statement in a process
Structural Description Carries same information as a NET LIST Net List =  (Component instances) + (Nets) Structural Description in VHDL =  (Signals) + (Component instances + Port maps) Many sophisticated features in VHDL to make it more versatile: * Variety of signal types * Generic components * Generate statements for creating arrays of component instances * Flexibility in binding components to design entities and architectures
Behavioral Description Procedural  (textual order => execution order) Sequential statements Control constructs alter normal sequential flow Called Behavioral description in VHDL Non-procedural  (textual order NOT => execution order) Concurrent statements Data flow (or rather data dependency restricts concurrency) Called Data flow description in VHDL
Concurrent Statements in VHDL process statement -- behavior concurrent procedure call -- behavior concurrent signal assign. -- data flow component instantiation -- structure generate statement -- structure block statement -- nesting concurrent assertion stmt -- error check
Example: 1-bit Full Adder entity  FullAdder  is port  (X, Y, Cin:  in  bit; -- Inputs Cout, Sum:  out  bit); -- Outputs end  FullAdder; X Y Cin Sum Cout FullAdder
Example: 1-bit Full Adder (contd.) Architecture  Equations  of  FullAdder  is begin -- Concurrent Assignment Sum <= X  xor  Y  xor  Cin  after  10 ns; Cout <= (X  and  Y)  or  (X  and  Cin)  or  (Y  and  Cin)  after  15 ns; end  Equations;
Example: 4-bit Adder entity   Adder4  is port   (A, B:  in  bit_vector(3  downto  0); Ci:  in  bit; -- Inputs S:  out  bit_vector(3  downto  0); Co:  out  bit); -- Outputs end  Adder4;
Example: 4-bit Adder (contd.) Architecture  Structure  of   Adder4  is Component  FullAdder port (X, Y, Cin:  in  bit; Cout, Sum:  out  bit); signal  C:   bit_vector   (3  downto  1); begin -- Instantiations FA0: FullAdder port map (A(0), B(0), Ci, C(1), S(0)); FA1: FullAdder port map (A(1), B(1), C(1), C(2), S(1)); FA2: FullAdder port map (A(2), B(2), C(2), C(3), S(2)); FA3: FullAdder port map (A(3), B(3), C(3), Co, S(3)); end  Structure;
Example: 4-bit Comparator entity  nibble_comparator  is port  (a, b:  in  bit_vector (3  downto  0); gt,eq,lt :  in  bit; a_gt_b, a_eq_b, a_lt_b :  out  bit); end  nibble_comparator;
Structural Description (contd.) architecture  iterative  of  nibble_comparator  is component  comp1 port  (a, b, gt,eq,lt :  in  bit; a_gt_b, a_eq_b, a_lt_b :  out  bit); end component ; for all  : comp1  use entity  work.bit_comparator(gate_level); signal  im: bit_vector (0 to 8); begin c0:comp1  port map (a(0),b(0), gt, eq, lt, im(0), im(1), im(2)); c1toc2:  for  i  in  1  to  2  generate c:comp1  port map (a(i),b(i),im(i*3-3),im(i*3-2),im(i*3-1),  im(i*3+0),im(i*3+1),im(i*3+2)); end generate ; c3: comp1  port map (a(3),b(3),im(6),im(7),im(8), a_gt_b, a_eq_b, a_lt_b); end  nibble_comparator;
Example: 1-bit Comparator  (data flow) entity  comp1  is port  (a, b, gt,eq,lt :  in  bit; a_gt_b, a_eq_b, a_lt_b :  out  bit); end  comp1; architecture  dataflow  of  comp1  is signal  s : bit; begin s <= (a and b) or (not a and not b); a_gt_b <= (gt and s) or (a and not b); a_lt_b <= (lt and s) or (not a and b); a_eq_b <= eq and s; end  dataflow;
References Digital Systems Design Using VHDL Charles H. Roth, Jr., PWS Publishing Co. Chapter 2 (pp. 44 to 84) The Designer’s Guide to VHDL Peter J. Ashenden, Morgon Kaufmann
Behavioral Description in VHDL   M. Balakrishnan Dept. of Comp. Sci. & Engg. I.I.T. Delhi
Modeling Styles Semantic model of VHDL Structural description Data Flow description Algorithmic description RTL description
Concurrent Statements in VHDL process statement -- behavior concurrent procedure call -- behavior concurrent signal assign. -- data flow component instantiation -- structure generate statement -- structure block statement -- nesting concurrent assertion stmt -- error check
Example: D Flip-Flop entity  DFF  is port  (D, CLK:  in  bit;   Q:  out  bit; QN:  out  bit := ‘1’) ;  end   DFF; D CLK Q QN DFF
Example: DFF (contd.) Architecture  Beh  of  DFF  is begin   process  (CLK) begin if  (CLK = ‘1’  then Q <= D  after  10 ns; QN <=  not  D  after  10 ns; endif; endprocess; end  Beh;
Concurrent Conditional Assignment: 4 to 1 Multiplexer y <= x0 when sel = 0 else x1 when sel = 1 else x2 when sel = 2 else x3 when sel = 3 x0 x1 x2 x3 sel y
CASE Statement:  4 to 1 Multiplexer Case sel is   when  0 =>  y <= x0 when  1 =>  y <= x1 when  2 =>  y <= x2 when  3 =>  y <= x3 end case   x0 x1 x2 x3 y
Variables And Signals Architecture  var  of  dummy is signal trigger, sum:  integer  := 0; begin process variable  var1: integer:= 1; variable  var3, var2: integer:= 2; begin wait on  trigger; var3 := var1 + var2; var1 := var3; sum <= var1; end process; end  var;
Variables And Signals Architecture  sig  of  dummy is signal trigger, sum:  integer  := 0; signal  sig1: integer:= 1; signal   sig3, sig2: integer:= 2; begin process begin wait on  trigger; sig3 <= sig1 + sig2; sig1 <= sig3; sum <= sig1; end process; end  sig;

More Related Content

PDF
Data types in verilog
PPTX
Vhdl programming
PPTX
I2C Protocol
PPT
VHDL-PRESENTATION.ppt
PDF
Programmable Logic Array(PLA) & Programmable Array Logic(PAL)
PPTX
Complex Programmable Logic Device (CPLD) Architecture and Its Applications
PDF
Logic Synthesis
PPT
Fpga(field programmable gate array)
Data types in verilog
Vhdl programming
I2C Protocol
VHDL-PRESENTATION.ppt
Programmable Logic Array(PLA) & Programmable Array Logic(PAL)
Complex Programmable Logic Device (CPLD) Architecture and Its Applications
Logic Synthesis
Fpga(field programmable gate array)

What's hot (20)

PPT
PPT
Layout design on MICROWIND
PPT
PPT
Analog to digital converters, adc
PPTX
VERILOG HDL :: Blocking & NON- Blocking assignments
PPTX
Probabilistic Power Analysis
PPT
Combinational Logic
PPTX
Xilinx 4000 series
PDF
8051 interfacing
PPT
PAL And PLA ROM
PPTX
Vlsi design flow
PPTX
Fpga architectures and applications
PPTX
CMOS LOGIC STRUCTURES
PPTX
Introduction to ASICs.pptx
PPTX
Vlsi testing
DOCX
Altera flex
PDF
1st Semester M Tech CMOS VLSI Design (Dec-2013) Question Papers
PPTX
Ripple Carry Adder
PPTX
Data flow model -Lecture-4
Layout design on MICROWIND
Analog to digital converters, adc
VERILOG HDL :: Blocking & NON- Blocking assignments
Probabilistic Power Analysis
Combinational Logic
Xilinx 4000 series
8051 interfacing
PAL And PLA ROM
Vlsi design flow
Fpga architectures and applications
CMOS LOGIC STRUCTURES
Introduction to ASICs.pptx
Vlsi testing
Altera flex
1st Semester M Tech CMOS VLSI Design (Dec-2013) Question Papers
Ripple Carry Adder
Data flow model -Lecture-4
Ad

Viewers also liked (12)

PPT
Shift Registers
PPTX
PPTX
Dlc{binary to gray code conversion} ppt
PDF
VHDL CODE
PDF
23 gray codes
PPTX
Binary to grey code conversion
PDF
Programs of VHDL
PPT
BCD,GRAY and EXCESS 3 codes
PPT
Counters
PDF
Introduction to FPGA, VHDL
PPT
PPT
Fundamentals of FPGA
Shift Registers
Dlc{binary to gray code conversion} ppt
VHDL CODE
23 gray codes
Binary to grey code conversion
Programs of VHDL
BCD,GRAY and EXCESS 3 codes
Counters
Introduction to FPGA, VHDL
Fundamentals of FPGA
Ad

Similar to VHDL (20)

PPSX
Vhd lhigh2003
PPT
Spdas2 vlsibput
PPTX
Writing more complex models
PPTX
why verilog compared to vhd why verilog compared to vhd why verilog compared ...
PPTX
Create your first model for a simple logic circuit
PPT
Introduction to VHDL language VHDL_Intro.ppt
PPTX
the-vhsic-.pptx
PDF
Introduction to VHDL
DOCX
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
PPTX
Dica ii chapter slides
PPTX
VHDL_VIKAS.pptx
PPTX
Building Hierarchy
PPT
vhdlTutorial.ppt . digital principal and computer design
PPTX
vhdlTutorial VHDL notes, introductions and Basic concepts
PPTX
Introduction to VHDL
PPT
VHDL lecture 1.ppt
PDF
INTRODUCTION TO VHDL
PPT
Lecture1111111111111111111111_vhdl_Introduction.ppt
Vhd lhigh2003
Spdas2 vlsibput
Writing more complex models
why verilog compared to vhd why verilog compared to vhd why verilog compared ...
Create your first model for a simple logic circuit
Introduction to VHDL language VHDL_Intro.ppt
the-vhsic-.pptx
Introduction to VHDL
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
Dica ii chapter slides
VHDL_VIKAS.pptx
Building Hierarchy
vhdlTutorial.ppt . digital principal and computer design
vhdlTutorial VHDL notes, introductions and Basic concepts
Introduction to VHDL
VHDL lecture 1.ppt
INTRODUCTION TO VHDL
Lecture1111111111111111111111_vhdl_Introduction.ppt

More from Ramasubbu .P (20)

PPT
PPT
PPT
Milling 2
PPT
MIlling 1
PPT
Drillings
PPT
Holding
PPT
Saftey
PPT
Harvesting
PPT
Plough
PPT
Tractor PTO
PPT
Tractor Components
PPT
PPT
PPT
PPT
PPT
Hacker
PPT
Denail of Service
PPT
RAID CONCEPT
PPT
Network Security
PPT
Milling 2
MIlling 1
Drillings
Holding
Saftey
Harvesting
Plough
Tractor PTO
Tractor Components
Hacker
Denail of Service
RAID CONCEPT
Network Security

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
master seminar digital applications in india
PDF
RMMM.pdf make it easy to upload and study
PPTX
Cell Structure & Organelles in detailed.
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Complications of Minimal Access Surgery at WLH
Anesthesia in Laparoscopic Surgery in India
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial disease of the cardiovascular and lymphatic systems
LDMMIA Reiki Yoga Finals Review Spring Summer
STATICS OF THE RIGID BODIES Hibbelers.pdf
Microbial diseases, their pathogenesis and prophylaxis
A systematic review of self-coping strategies used by university students to ...
What if we spent less time fighting change, and more time building what’s rig...
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Final Presentation General Medicine 03-08-2024.pptx
UNIT III MENTAL HEALTH NURSING ASSESSMENT
master seminar digital applications in india
RMMM.pdf make it easy to upload and study
Cell Structure & Organelles in detailed.
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Supply Chain Operations Speaking Notes -ICLT Program
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...

VHDL

  • 1. Introduction to VHDL M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
  • 2. Domains of Description : Gajski’s Y-Chart Behavioral domain Structural domain Physical domain Level of abstraction VHDL models
  • 3. VHDL Development US DoD initiated in 80’s V ery H igh Speed ASIC D escription L anguage Initial objective was modeling only and thus only a simulator was envisaged Subsequently tools for VHDL synthesis were developed
  • 4. HDL Requirements Abstraction Modularity Concurrency Hierarchy
  • 5. Abstraction VHDL supports description of components as well as systems at various levels of abstraction Gate and component delays Clock cycles Abstract behavior without any notion of delays
  • 6. Modularity Every component in VHDL is referred to as an entity and has a clear interface The interface is called an entity declaration The “internals” of the component are referred to as the architecture declaration There can be multiple architectures at even different levels of abstraction associated with the same entity
  • 7. VHDL Example a b c AND
  • 8. VHDL Description: AND gate entity AND2 is port (a, b: in bit ; c : out bit); end AND2; architecture beh of AND2 is begin c <= a and b; end beh;
  • 9. Concurrency in VHDL Descriptions signals process 1 process 2 process n signals
  • 10. Concurrent and Sequential Computations Processes are concurrent Sequential activity within each process Nesting of statements : Concurrent statements in a concurrent statement Sequential statements in a concurrent statement Sequential statements in a sequential statement
  • 12. Modeling Styles in VHDL M. Balakrishnan Dept. of Comp. Sci. & Engg. I.I.T. Delhi
  • 13. Modeling Styles Semantic model of VHDL Structural description Data Flow description Algorithmic description RTL description
  • 14. Modeling Choices in VHDL Behavioral and Structural Domains Several Levels of Abstraction Multiple Styles of Behavioral Description: Data Flow Style (concurrent) Procedural Style (sequential) Combinations, variations and special cases of these, e.g., special case of data flow style - FSM described using guarded blocks special case of procedural style - FSM described using case statement in a process
  • 15. Structural Description Carries same information as a NET LIST Net List = (Component instances) + (Nets) Structural Description in VHDL = (Signals) + (Component instances + Port maps) Many sophisticated features in VHDL to make it more versatile: * Variety of signal types * Generic components * Generate statements for creating arrays of component instances * Flexibility in binding components to design entities and architectures
  • 16. Behavioral Description Procedural (textual order => execution order) Sequential statements Control constructs alter normal sequential flow Called Behavioral description in VHDL Non-procedural (textual order NOT => execution order) Concurrent statements Data flow (or rather data dependency restricts concurrency) Called Data flow description in VHDL
  • 17. Concurrent Statements in VHDL process statement -- behavior concurrent procedure call -- behavior concurrent signal assign. -- data flow component instantiation -- structure generate statement -- structure block statement -- nesting concurrent assertion stmt -- error check
  • 18. Example: 1-bit Full Adder entity FullAdder is port (X, Y, Cin: in bit; -- Inputs Cout, Sum: out bit); -- Outputs end FullAdder; X Y Cin Sum Cout FullAdder
  • 19. Example: 1-bit Full Adder (contd.) Architecture Equations of FullAdder is begin -- Concurrent Assignment Sum <= X xor Y xor Cin after 10 ns; Cout <= (X and Y) or (X and Cin) or (Y and Cin) after 15 ns; end Equations;
  • 20. Example: 4-bit Adder entity Adder4 is port (A, B: in bit_vector(3 downto 0); Ci: in bit; -- Inputs S: out bit_vector(3 downto 0); Co: out bit); -- Outputs end Adder4;
  • 21. Example: 4-bit Adder (contd.) Architecture Structure of Adder4 is Component FullAdder port (X, Y, Cin: in bit; Cout, Sum: out bit); signal C: bit_vector (3 downto 1); begin -- Instantiations FA0: FullAdder port map (A(0), B(0), Ci, C(1), S(0)); FA1: FullAdder port map (A(1), B(1), C(1), C(2), S(1)); FA2: FullAdder port map (A(2), B(2), C(2), C(3), S(2)); FA3: FullAdder port map (A(3), B(3), C(3), Co, S(3)); end Structure;
  • 22. Example: 4-bit Comparator entity nibble_comparator is port (a, b: in bit_vector (3 downto 0); gt,eq,lt : in bit; a_gt_b, a_eq_b, a_lt_b : out bit); end nibble_comparator;
  • 23. Structural Description (contd.) architecture iterative of nibble_comparator is component comp1 port (a, b, gt,eq,lt : in bit; a_gt_b, a_eq_b, a_lt_b : out bit); end component ; for all : comp1 use entity work.bit_comparator(gate_level); signal im: bit_vector (0 to 8); begin c0:comp1 port map (a(0),b(0), gt, eq, lt, im(0), im(1), im(2)); c1toc2: for i in 1 to 2 generate c:comp1 port map (a(i),b(i),im(i*3-3),im(i*3-2),im(i*3-1), im(i*3+0),im(i*3+1),im(i*3+2)); end generate ; c3: comp1 port map (a(3),b(3),im(6),im(7),im(8), a_gt_b, a_eq_b, a_lt_b); end nibble_comparator;
  • 24. Example: 1-bit Comparator (data flow) entity comp1 is port (a, b, gt,eq,lt : in bit; a_gt_b, a_eq_b, a_lt_b : out bit); end comp1; architecture dataflow of comp1 is signal s : bit; begin s <= (a and b) or (not a and not b); a_gt_b <= (gt and s) or (a and not b); a_lt_b <= (lt and s) or (not a and b); a_eq_b <= eq and s; end dataflow;
  • 25. References Digital Systems Design Using VHDL Charles H. Roth, Jr., PWS Publishing Co. Chapter 2 (pp. 44 to 84) The Designer’s Guide to VHDL Peter J. Ashenden, Morgon Kaufmann
  • 26. Behavioral Description in VHDL M. Balakrishnan Dept. of Comp. Sci. & Engg. I.I.T. Delhi
  • 27. Modeling Styles Semantic model of VHDL Structural description Data Flow description Algorithmic description RTL description
  • 28. Concurrent Statements in VHDL process statement -- behavior concurrent procedure call -- behavior concurrent signal assign. -- data flow component instantiation -- structure generate statement -- structure block statement -- nesting concurrent assertion stmt -- error check
  • 29. Example: D Flip-Flop entity DFF is port (D, CLK: in bit; Q: out bit; QN: out bit := ‘1’) ; end DFF; D CLK Q QN DFF
  • 30. Example: DFF (contd.) Architecture Beh of DFF is begin process (CLK) begin if (CLK = ‘1’ then Q <= D after 10 ns; QN <= not D after 10 ns; endif; endprocess; end Beh;
  • 31. Concurrent Conditional Assignment: 4 to 1 Multiplexer y <= x0 when sel = 0 else x1 when sel = 1 else x2 when sel = 2 else x3 when sel = 3 x0 x1 x2 x3 sel y
  • 32. CASE Statement: 4 to 1 Multiplexer Case sel is when 0 => y <= x0 when 1 => y <= x1 when 2 => y <= x2 when 3 => y <= x3 end case x0 x1 x2 x3 y
  • 33. Variables And Signals Architecture var of dummy is signal trigger, sum: integer := 0; begin process variable var1: integer:= 1; variable var3, var2: integer:= 2; begin wait on trigger; var3 := var1 + var2; var1 := var3; sum <= var1; end process; end var;
  • 34. Variables And Signals Architecture sig of dummy is signal trigger, sum: integer := 0; signal sig1: integer:= 1; signal sig3, sig2: integer:= 2; begin process begin wait on trigger; sig3 <= sig1 + sig2; sig1 <= sig3; sum <= sig1; end process; end sig;