Introduction to VHDL Dr. Adnan Shaout The University of Michigan-Dearborn.

Slides:



Advertisements
Similar presentations
CMSC 611: Advanced Computer Architecture
Advertisements

Fundamental Concepts 大同大學 資訊工程系 副教授
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
Verilog Intro: Part 1.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Adv. Digital Circuit Design
ECE C03 Lecture 17ECE C03 Lecture 61 Lecture 17 VHDL Structural Modeling Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
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.
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
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.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
Introduction to VHDL By Mr. Fazrul Faiz Zakaria School of Computer and Communication Engineering UniMAP.
Introduction to VHDL (part 2)
1 H ardware D escription L anguages Basic Language Concepts.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
An Introduction to VHDL Using Altera’s Quartus II IDE Dr. William M. Jones Coastal Carolina University Numbers and Bytes Meeting 20 OCT 2008.
1 Digital System Design Subject Name : Digital System Design Course Code : IT- 308 Instructor : Amit Prakash Singh Home page :
DSD,USIT,GGSIPU1 Entity declaration –describes the input/output ports of a module entity reg4 is port ( d0, d1, d2, d3, en, clk : in std_logic; q0, q1,
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
Language Concepts Ver 1.1, Copyright 1997 TS, Inc. VHDL L a n g u a g e C o n c e p t s Page 1.
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.
Basic Overview of VHDL Matthew Murach Slides Available at:
1 Introduction to VHDL Spring What is VHDL? VHDL can be uses to model and synthesise digital systems. VHDL = VHSIC Hardware Description Language.
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Systems Lecture # 6 Computer-Aided Design Technology for VLSI.
Module 1.2 Introduction to Verilog
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Fall 08, Oct 29ELEC Lecture 7 (updated) 1 Lecture 7: VHDL - Introduction ELEC 2200: Digital Logic Circuits Nitin Yogi
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Design Lecture # 11 High Desecration Language- Based Design.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
1 Introduction to VHDL Part 2 Fall We will use Std_logic And, Or have same precedence See slide 8 of part 1.
CMSC 611: Advanced Computer Architecture Design & Simulation Languages Practically everything adapted from slides by Peter J. Ashenden, VHDL Quick Start.
Digital System Projects
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
5-1 Logic System Design I VHDL Design Principles ECGR2181 Reading: Chapter 5.0, 5.1, 5.3 port ( I: in STD_LOGIC_VECTOR (1 to 9); EVEN, ODD: out STD_LOGIC.
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Digital Design Using VHDL and PLDs ECOM 4311 Digital System Design Chapter 1.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
IAY 0600 Digital Systems Design Timing and Post-Synthesis Verifications Hazards in Combinational Circuits Alexander Sudnitson Tallinn University of Technology.
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
CMSC 611: Advanced Computer Architecture Hardware Design Languages Some material adapted from slides by Peter J. Ashenden, VHDL Quick Start Some material.
Fundamentals of Digital Signal Processing יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
Hardware Description Languages: Verilog
Basic Language Concepts
Systems Architecture Lab: Introduction to VHDL
IAY 0600 Digitaalsüsteemide disain
Behavioral Style Combinational Design with VHDL
Structural style Modular design and hierarchy Part 1
Behavioral Style Combinational Design with VHDL
Hardware Description Languages: Verilog
IAY 0600 Digital Systems Design
Hardware Descriptive Languages these notes are taken from Mano’s book
ECE 434 Advanced Digital System L08
Peter J. Ashenden The University of Adelaide
VHDL VHSIC Hardware Description Language VHSIC
Hardware Descriptive Languages these notes are taken from Mano’s book
VHDL Discussion Subprograms
CMSC 611: Advanced Computer Architecture
VHDL Discussion Subprograms
Digital Designs – What does it take
Presentation transcript:

Introduction to VHDL Dr. Adnan Shaout The University of Michigan-Dearborn

Adnan ShaoutIntro to VHDL2 Objective Quick introduction to VHDL –basic language concepts –basic design methodology –examples

Adnan ShaoutIntro to VHDL3 VHDL Very Hard Difficult Language

Adnan ShaoutIntro to VHDL4 jk -- VHDL VHSIC Hardware Description Language VHSIC -- Very High Speed Integrated Circuits

Adnan ShaoutIntro to VHDL5 Modeling Digital Systems VHDL is for coding models of a digital system... Reasons for modeling –requirements specification –documentation –testing using simulation –formal verification –synthesis –class assignments Goal –most ‘reliable’ design process, with minimum cost and time –avoid design errors!

Adnan ShaoutIntro to VHDL6 Basic VHDL Concepts Interfaces -- i.e. ports Behavior Structure Test Benches Analysis, simulation Synthesis

Adnan ShaoutIntro to VHDL7 VHDL -- VHDL is a programming language that allows one to model and develop complex digital systems in a dynamic envirornment. Object Oriented methodology for you C people can be observed -- modules can be used and reused. Allows you to designate in/out ports (bits) and specify behavior or response of the system.

Adnan ShaoutIntro to VHDL8 VHDL Intro.-- Oh yeah, For all you C people --forget everything you know... Well, not EVERYTHING... But VHDL is NOT C... There are some similarities, as with any programming language, but syntax and logic are quite different; so get over it !! -obviously, this was a painful transition for me.

Adnan ShaoutIntro to VHDL9 3 ways to DO IT -- the VHDL way Dataflow Behavioral Structural Kindof BORING sounding huh?? well, it gets more exciting with the details !! :)

Adnan ShaoutIntro to VHDL10 Modeling the Dataflow way uses statements that defines the actual flow of data..... such as, x <= y-- this is NOT less than equl to -- told you its not C this assigns the boolean signal x to the value of boolean signal y... i.e. x = y this will occur whenever y changes....

Adnan ShaoutIntro to VHDL11 Jumping right in to a Model -- e.g. 1 lets look at a d - flip-flop model -- doing it the dataflow way..... ignore the extra junk for now -- entity dff_flow is port ( d :in bit; prn:in bit; clrn:in bit; q:out bit; qbar:out bit; ); end dff_flow; architecture arch1 of dff_flow is begin q <= not prn Or (clrn And d); % this is the DATAFLOW % qbar <= prn And (not clrn Or not d); % STUFF % end arch1;

Adnan ShaoutIntro to VHDL Dr. Adnan Shaout library ieee; use ieee.std_logic_1164.all; entity fulladd is port(A1,A2,Cin: IN std_logic; Sum, Cout: OUT std_logic); end fulladd; Architecture a of fulladd is Begin process(A1,A2,Cin) Begin Sum <= Cin XOR A1 XOR A2; Cout <= (A1 AND A2) OR (Cin AND (A1 XOR A2)); end process; end a;

Adnan ShaoutIntro to VHDL13 Modeling Interfaces Entity declaration –describes the input/output ports of a module entity reg4 is port ( d0, d1, d2, d3, en, clk : in bit; q0, q1, q2, q3 : out bit ); end entity reg4; entity nameport namesport mode (direction) port typereserved words punctuation

Adnan ShaoutIntro to VHDL14 Modeling the Behavior way Architecture body –describes an implementation of an entity –may be several per entity Behavioral architecture –describes the algorithm performed by the module –contains process statements, each containing –sequential statements, including signal assignment statements and wait statements

Adnan ShaoutIntro to VHDL15 The Behavior way -- eg 2 architecture behav of reg4 is begin process (d0, d1, d2, d3, en, clk) variable stored_d0, stored_d1, stored_d2, stored_d3 : bit; begin if en = '1' and clk = '1' then stored_d0 := d0; stored_d1 := d1; stored_d2 := d2; stored_d3 := d3; end if; q0 <= stored_d0 after 5 ns; q1 <= stored_d1 after 5 ns; q2 <= stored_d2 after 5 ns; q3 <= stored_d3 after 5 ns; end process; end behav; simulates real-world propagation delays. notice := syntax used for equating values from signals... sensitivity list

Adnan ShaoutIntro to VHDL16 VHDL -- goofy syntax to know.. Omit entity at end of entity declaration Omit architecture at end of architecture body Omit is in process statement header architecture behav of reg4 is begin process (d0,... )... begin... end process ; end behav; entity reg4 is port ( d0, d1, d2 : in bit d3, en, clk : in bit; q0, q1, q2, q3 : out bit ); end reg4;

Adnan ShaoutIntro to VHDL17 Modeling the Structurural way Structural architecture –implements the module as a composition of subsystems –contains signal declarations, for internal interconnections –the entity ports are also treated as signals component instances –instances of previously declared entity/architecture pairs port maps in component instances –connect signals to component ports

Adnan ShaoutIntro to VHDL18 Structural way -- e.g. 3

Adnan ShaoutIntro to VHDL19 Structural way cont.. First declare D-latch and and-gate entities and architectures entity d_latch is port ( d, clk : in bit; q : out bit ); end entity d_latch; architecture basic of d_latch is begin process (clk, d) begin if clk = ‘1’ then q <= d after 2 ns; end if; end process; end basic; entity and2 is port ( a, b : in bit; y : out bit ); end entity and2; architecture basic of and2 is begin process (a, b) begin y <= a and b after 2 ns; end process ; end basic; notice semicolon placements -- odd as it is, omit from last statement

Adnan ShaoutIntro to VHDL20 Structural way... Declare corresponding components in register architecture body architecture struct of reg4 is component d_latch port ( d, clk : in bit; q : out bit ); end component; component and2 port ( a, b : in bit; y : out bit ); end component; signal int_clk : bit;...

Adnan ShaoutIntro to VHDL21 Structural way.. Now use them to implement the register... begin bit0 : d_latch port map ( d0, int_clk, q0 ); bit1 : d_latch port map ( d1, int_clk, q1 ); bit2 : d_latch port map ( d2, int_clk, q2 ); bit3 : d_latch port map ( d3, int_clk, q3 ); gate : and2 port map ( en, clk, int_clk ); end struct;

Adnan ShaoutIntro to VHDL22 Mixed Behavior and Structure An architecture can contain both behavioral and structural parts –process statements and component instances collectively called concurrent statements –processes can read and assign to signals Example: register-transfer-level (RTL) Model –data path described structurally –control section described behaviorally

Adnan ShaoutIntro to VHDL23 Mixed Example

Adnan ShaoutIntro to VHDL24 Mixed Example entity multiplier is port ( clk, reset : in bit; multiplicand, multiplier : in integer; product : out integer ); end multiplier; architecture mixed of mulitplier is signal partial_product, full_product : integer; signal arith_control, result_en, mult_bit, mult_load : bit; begin arith_unit : entity work.shift_adder(behavior) port map ( addend => multiplicand, augend => full_product, sum => partial_product, add_control => arith_control ); result : entity work.reg(behavior) port map ( d => partial_product, q => full_product, en => result_en, reset => reset );...

Adnan ShaoutIntro to VHDL25 Mixed Example … multiplier_sr : entity work.shift_reg(behavior) port map ( d => multiplier, q => mult_bit, load => mult_load, clk => clk ); product <= full_product; process (clk, reset) -- variable declarations for control_section -- … begin -- sequential statements to assign values to control signals -- … end process; end mixed;

Adnan ShaoutIntro to VHDL26 Test Bench your Model Testing a design by simulation Use a test bench model –a Model that uses your Model –apply test sequences to your inputs –monitors values on output signals either using simulator or with a process that verifies correct operation or logic analyzer

Adnan ShaoutIntro to VHDL27 Analysis Check for syntax and logic errors –syntax: grammar of the language –logic: how your Model responds to stimuli Analyze each design unit separately –entity declaration –architecture body –… –put each design unit in a separate file -- helps a lot. Analyzed design units are placed in a library –make sure your Model is truly OOP

Adnan ShaoutIntro to VHDL28 Simulation Discrete event simulation –time advances in discrete steps –when signal values change—events occur A processes is sensitive to events on input signals –specified in wait statements –resumes and schedules new values on output signals schedules transactions event on a signal if value changes

Adnan ShaoutIntro to VHDL29 Simulation Algorithm Initialization phase –each signal is given its initial value –simulation time set to 0 –for each process activate execute until a wait statement, then suspend –execution usually involves scheduling transactions on signals for later times

Adnan ShaoutIntro to VHDL30 Simulation Algorithm Simulation cycle –advance simulation time to time of next transaction –for each transaction at this time update signal value –event if new value is different from old value –for each process sensitive to any of these events, or whose “wait for …” time-out has expired resume execute until a wait statement, then suspend Simulation finishes when there are no further scheduled transactions

Adnan ShaoutIntro to VHDL31 Basic Design Methodology Requirements SimulateRTL Model Gate-level Model Synthesize SimulateTest Bench ASIC or FPGA Place & Route Timing Model Simulate

Adnan ShaoutIntro to VHDL32 VHDL -- conclusion... Thats it !! in review -- replay presentaion Now for first asignment design a computer –Memory access –processor –data/address bus –display Always remember to use this knowledge for GOOD...