第7章 VHDL OBJECTS: CONSTANTS, VARIABLES, AND SIGNALS

Slides:



Advertisements
Similar presentations
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Advertisements

LECTURE 4: The VHDL N-bit Adder
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
第5章 VHDL Package 義守大學電機工程學系 陳慶瀚
Sistemas Digitais I LESI - 2º ano Lesson 5 - VHDL U NIVERSIDADE DO M INHO E SCOLA DE E NGENHARIA Prof. João Miguel Fernandes Dept.
第6章 VHDL NUMBERS, STRINGS, AND EXPRESSIONS 義守大學電機工程學系 陳慶瀚
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #12) The slides included herein were taken from the materials.
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
1 Data Object Object Types A VHDL object consists of one of the following: –Signal, Which represents interconnection wires that connect component instantiation.
1 H ardware D escription L anguages Basic Language Concepts.
1 Data Object Object Types A VHDL object consists of one of the following: –Signal, Which represents interconnection wires that connect component instantiation.
Modeling styles: 1. Structural Modeling: As a set of interconnected components (to represent structure), 2. Dataflow Modeling: As a set of concurrent assignment.
IAY 0600 Digital Systems Design
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,
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.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- 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.
L12 – VHDL Overview. VHDL Overview  HDL history and background  HDL CAD systems  HDL view of design  Low level HDL examples  Ref: text Unit 10, 17,
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
Copyright(c) 1996 W. B. Ligon III1 Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Timing Model VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Update Signals Execute.
Generate Statement A generate statement provides a mechanism for iterative or conditional elaboration of a portion of description. The iterative elaboration.
M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
1/8/ L2 VHDL Introcution© Copyright Joanne DeGroat, ECE, OSU1 Introduction to VHDL.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
Digital System Projects
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Sequential Logic Design by VHDL
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
VHDL Project I: Serial Adder Matthew Murach Slides Available at:
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
VHDL Tutorial.
IAY 0600 Digital Systems Design
Elements of Structural Models
Basic Language Concepts
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
IAY 0600 Digitaalsüsteemide disain
HDL simulation and Synthesis (Marks16)
Module Goals Introduce structural VHDL constructs Use of components
Dataflow Style Combinational Design with VHDL
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Timing Model Start Simulation Delay Update Signals Execute Processes
Structural style Modular design and hierarchy Part 1
IAY 0600 Digital Systems Design
ECE 434 Advanced Digital System L08
CHAPTER 10 Introduction to VHDL
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
VHDL VHSIC Hardware Description Language VHSIC
ECE 434 Advanced Digital System L9
Structural style Modular design and hierarchy Part 1
IAY 0600 Digital Systems Design
VHDL Hardware Description Language
VHDL Discussion Subprograms
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
VHDL Discussion Subprograms
Hardware Modeling & Synthesis Using VHDL
© Copyright Joanne DeGroat, ECE, OSU
Data Object By E. Thirumeni Department of Electronics
Design units Lecture 2.
Digital Logic with VHDL
Presentation transcript:

第7章 VHDL OBJECTS: CONSTANTS, VARIABLES, AND SIGNALS 義守大學電機工程學系 陳慶瀚 pierre@mail.isu.edu.tw

1. Constants A constant associates a value to a symbol of a given data type. The use of constants may improve the readability of VHDL code and reduce the likelihood of making errors. Constant declaration syntax : constant symbol: type := value; Examples constant Vcc: signal:= '1'; --logic 1 constant constant zero4: bit_vector(0 to 3) := ('0','0','0','0');

2. Variables A signal is an object with a history of values (related to "event" times, i.e. times at which the signal value changes). Signals are declared via signal declaration statements or entity port definitions, and may be of any data type. The syntax is: signal sig_name: data_type [:=initial_value]; Examples signal clock: bit; signal GND: bit := '0'; signal databus: std_ulogic_vector(15 downto 0); signal addrbus: std_logic_vector(0 to 31);

3. Signals A signal is an object with a history of values (related to "event" times, i.e. times at which the signal value changes). Signals are declared via signal declaration statements or entity port definitions, and may be of any data type. The syntax is: signal sig_name: data_type [:=initial_value]; Examples signal clock: bit; signal GND: bit := '0'; signal databus: std_ulogic_vector(15 downto 0); signal addrbus: std_logic_vector(0 to 31);

4. Drivers of signal Each signal has one or more "drivers" which determine the value and timing of changes to the signal. Each driver is a queue of events which indicate when and to what value a signal is to be changed. Each signal assignment results in the corresponding event queue being modified to schedule the new event. signal line x Event Values Times If no delay is specified, the signal event is scheduled for one infinitessimally-small "delta" delay from the current time. The signal change will occur in the next simulation cycle.

5. Signal Examples Assume current time is T Clock <= not clock after 10ns; -- change at T + 10ns Databus <= mem1 and mem2 after delay; -- change at T + delay x <= '1'; -- change to '1' at time T + "delta";

6. Signal delay models Inertial delay: The addition to an event queue of an event scheduled at time T automatically cancels any events in the queue scheduled to occur prior to time T, i.e. any event shorter than the delay time is suppressed. Transport delay: Each new event is simply inserted into the event queue, i.e. behavior is that of a delay line. The keyword transport is used to indicate transport delays.

7. Signal delay example B <= A after 5ns; -- inertial delay C <= transport A after 5 ns; -- transport delay 5______15 17_________30 A _______| |_| |_____________ ____________________ B ___________| |_________ (Inertial Delay) _______ __________ C ___________| |_| |_________ (Transport Delay) 10 20 22 35

8. Component instantiation Instantiates (i.e. create instances of) predefined components within a design architecture. Each such component is first declared in the declaration section of that architecture, and then "instantiated" one or more times in the body of the architecture. In the declaration section: list the "component declaration" and one or more "configuration specifications". The "component declaration" defines the component interface, which corresponds to the component's entity declaration. This allows the VHDL compiler to check signal compatibilities.

9. Component Instantiates (i.e. create instances of) predefined components within a design architecture. Each such component is first declared in the declaration section of that architecture, and then "instantiated" one or more times in the body of the architecture. In the declaration section: list the "component declaration" and one or more "configuration specifications". The "component declaration" defines the component interface, which corresponds to the component's entity declaration. This allows the VHDL compiler to check signal compatibilities.

10. Component declaration example component adder port(a,b: in bit_vector(7 downto 0); s: out bit_vector(7 downto 0); cin: in bit; cout: out bit); end component;

11. Component configuration specification The "configuration specification" identifies specific architecture(s) to be used for each instance of the component. (There may be multiple architectures for a given component.) Examples for ALL:comp1 use entity work.comp1 (equations); for ADDER1:adder use entity work.adder (equations); for ADDER2:adder use entity work.adder (dataflow); In all three examples, the prefix work. indicates that the current working library contains the indicated component models. In the first example, architecture equations of entity comp1 is used for all instances of comp1. In the other examples, architecture equations is to be used for instance ADDER1 of component adder, and architecture dataflow is to be used for instance ADDER2 of component adder.

12. Component instantiation Each instance of a declared component is listed, an instance name assigned, and actual signals connected to its ports as follows: instance_name: component_name port map (port list); The port list may be in either of two formats: (1) "Positional association": signals are connected to ports in the order listed in the component declaration. Example A1: adder port map (v,w,x,y,z) v,w, and y must be bit_vectors, y and z bits (2) "Named association": each signal-to-port connection is listed explicitly as "signal=>port". A1: adder port map(a=>v, b=>w, s=>y, cin->x, cout->z);

13. Component example architecture r1 of register is component jkff port(J,K,CLK: in bit; Q,QN: out bit); end component; for ALL: jkff use entity work.jkff (equations); component dff port(D,CLK: in bit; Q,QN: out bit); for DFF1: dff use entity work.dff (equations); for DFF2: dff use entity work.dff (circuit); begin JKFF1: jkff port map (j1,k1,clk,q1,qn1); JKFF2: jkff port map (j2,k1,clk,q2,qn2); DFF1: dff port map (d1,clk,q4,qn4); DFF2: dff port map (d2,clk,q5,qn5); end.