M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi

Slides:



Advertisements
Similar presentations
Digital System Design Subject Name : Digital System Design Course Code : IT-314.
Advertisements

COE 405 VHDL Basics Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh Computer Engineering.
//HDL Example 4-10 // //Gate-level description of circuit of Fig. 4-2 module analysis (A,B,C,F1,F2); input.
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Register Transfer Level
Verilog Modules for Common Digital Functions
Verilog Intro: Part 1.
Hardware Description Language (HDL)
LECTURE 4: The VHDL N-bit Adder
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
© Dr. Alaaeldin Amin 1 Hardware Modeling & Synthesis Using VHDL Very High Speed Integrated Circuits Start Of VHDL Development First Publication.
02/02/20091 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
VHDL Quick Start Peter J. Ashenden The University of Adelaide.
1/31/20081 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
HDL-Based Digital Design Part I: Introduction to VHDL (I) Dr. Yingtao Jiang Department Electrical and Computer Engineering University of Nevada Las Vegas.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
DIGITAL DESIGN WITH VHDL Exercise 1 1Muhammad Amir Yousaf.
GOOD MORNING.
Fall 08, Oct 29ELEC Lecture 7 (updated) 1 Lecture 7: VHDL - Introduction ELEC 2200: Digital Logic Circuits Nitin Yogi
1 H ardware D escription L anguages Basic Language Concepts.
VHDL Training ©1995 Cypress Semiconductor 1 Introduction  VHDL is used to:  document circuits  simulate circuits  synthesize design descriptions 
VHDL Structured Logic Design School of Electrical Engineering University of Belgrade Department of Computer Engineering Ivan Dugic Veljko.
Modeling styles: 1. Structural Modeling: As a set of interconnected components (to represent structure), 2. Dataflow Modeling: As a set of concurrent assignment.
Data Flow Modeling of Combinational Logic Simple Testbenches
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
1 H ardware D escription L anguages Modeling Complex Systems.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 5: Modeling Structure.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
1/26 VHDL VHDL Structural Modeling Digital Logic.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Module 1.2 Introduction to Verilog
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
HARDWARE DESCRIPTION LANGUAGE (HDL). What is HDL? A type of programming language for sampling and modeling of electronic & logic circuit designs It can.
1 component OR_3 port (A,B,C: in bit; Z: out bit); end component ; Reserved Words  Declarations of Components and Entities are similar  Components are.
Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.
Generate Statement A generate statement provides a mechanism for iterative or conditional elaboration of a portion of description. The iterative elaboration.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Hardware Description Languages Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
Digital System Projects
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
Introduction to ASIC flow and Verilog HDL
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
George Mason University ECE 448 – FPGA and ASIC Design with VHDL VHDL Coding for Synthesis ECE 448 Lecture 12.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Unit 4 Structural Descriptions SYLLABUS Highlights of Structural descriptions Organization of the Structural descriptions Binding State Machines Generate(HDL),Generic(VHDL),
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
Basic Language Concepts
Behavioral Modeling in Verilog
Peter J. Ashenden The University of Adelaide
VHDL VHSIC Hardware Description Language VHSIC
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
VHDL (VHSIC Hardware Description Language)
Data Flow Description of Combinational-Circuit Building Blocks
Copyright Joanne DeGroat, ECE, OSU
COE 202 Introduction to Verilog
Presentation transcript:

M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi Introduction to VHDL M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi

Domains of Description : Gajski’s Y-Chart Structural domain Behavioral domain VHDL models Level of abstraction Physical domain

VHDL Development US DoD initiated in 80’s Very High Speed ASIC Description Language 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 AND c b

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 signals process 1 process 2 process n

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 Sum Y FullAdder Cout Cin

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 Q DFF QN CLK

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 y x2 x3 sel

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 y x2 x3

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;