Topics Entity DeclarationsEntity Declarations Port ClausePort Clause Component DeclarationComponent Declaration Configuration DeclarationConfiguration.

Slides:



Advertisements
Similar presentations
CMSC 611: Advanced Computer Architecture
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.
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
Topics of Lecture Configuration Test Bench Encapsulation Structural Decomposition.
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.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 2 Microcomputer Systems Design (Embedded Systems)
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.
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
Topics of Lecture Structural Model Procedures Functions Overloading.
1/31/20081 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
331 W05.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 5: VHDL Programming [Adapted from Dave Patterson’s UCB CS152.
N Structural Modeling: n Entities n Ports n Architectures n Packages.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
Simple Testbenches Behavioral Modeling of Combinational Logic
Package with 4-valued logic Signal Attributes Assertion Data Flow description.
Introduction to VHDL (part 2)
(1) Programming Mechanics © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
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 
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
IAY 0600 Digital Systems Design
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
Introduction to VHDL Arab Academy for Science, Technology & Maritime Transport Computer Engineering Department Magdy Saeb, Ph.D.
1 H ardware D escription L anguages Modeling Digital Systems.
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.
Copyright © 1997 Altera Corporation & 提供 What is VHDL Very high speed integrated Hardware Description Language (VHDL) –is.
29/10/58 1 Copyright  1997, KJH Introduction to VHDL Lecture 3 Prof. K. J. Hintz Department of Electrical and Computer Engineering George Mason University.
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
Basic Concepts in VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
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.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
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.
Topics AliasesSubprograms Generics & Configurations.
Timing Model VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Update Signals Execute.
(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 Introduction to VHDL Part 2 Fall We will use Std_logic And, Or have same precedence See slide 8 of part 1.
16/11/2006DSD,USIT,GGSIPU1 Packages The primary purpose of a package is to encapsulate elements that can be shared (globally) among two or more design.
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.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
Dataflow modelling Lecture 4. Dataflow modelling Specifies the functioning of a circuit without explicitly refer to its structure Functioning is described.
Basic Language Concepts
IAY 0600 Digitaalsüsteemide disain
B e h a v i o r a l to R T L Coding
Module Goals Introduce structural VHDL constructs Use of components
Timing Model Start Simulation Delay Update Signals Execute Processes
ECE 4110–5110 Digital System Design
Structural style Modular design and hierarchy Part 1
IAY 0600 Digital Systems Design
ECE 434 Advanced Digital System L08
Peter J. Ashenden The University of Adelaide
Structural style Modular design and hierarchy Part 1
Instructions to get MAX PLUS running
VHDL Discussion Subprograms
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
VHDL Discussion Subprograms
Design units Lecture 2.
COE 202 Introduction to Verilog
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

topics Entity DeclarationsEntity Declarations Port ClausePort Clause Component DeclarationComponent Declaration Configuration DeclarationConfiguration Declaration Architecture BodiesArchitecture Bodies Signal DeclarationsSignal Declarations Wait StatementWait Statement Sensitivity ClauseSensitivity Clause Concurrent AssertionsConcurrent Assertions Passive StatementsPassive Statements This lecture is going deeper to well-known ideas. You should read it but we will not cover it in detail in class

Modeling Constructs

n An Entity Declaration –Describes the external interface (I/O signals) n Multiple Architecture Bodies –Describe alternative implementations of an entity »Increasing levels of fidelity to physical reality »Allows simulation to different degrees of detail n Hierarchical Approach to Model Building

Entity Declarations n Entities are the Primary Hardware Abstraction in VHDL and May Represent –Entire system –Subsystem –Board –Chip –macro-cell –logic gate

Entity Declarations n May Be Used Directly as a Component in a Design n May Be the Top Level Module of the Design –Reside in library –Usable by other designs n May Have No Port Clause When Used As a Test Bench Since All Signals Are Generated Internally

Entity Declaration Syntax

Interface List Syntax

Port Clause n Channels for Dynamic Communication Between a Block and Its Environment n Optional –Not needed for testbench entities, e.g., entity TestNiCadCharger is end entity TestNiCadCharger ;

Port Clause n Purpose Is to Define Interface –in »in only –out »out only –inout »Can be connected to multiple signals »Requires bus resolution function

Port Clause –buffer »Signal driving buffer drives output i.e., no need to resolve »Signal driving buffer can also drive other internal signals i.e., there is an implied buffer isolating internal usage from port signal –linkage »Means for connecting to foreign design entities, e.g., Verilog

Port Clause n Can Be Given Default Value Which Can Be Overridden When Instantiated –Unconnected or unassociated signals of mode in must have default expression

Port Clause, e.g., entity NiCadCharger is port ( Voltage, Current : in real := 0.0 ; AC : in bit := ‘1’ ; Charged, Recharge: out bit ) ; end entity NiCadCharger ;

Component vs Entity n Entities Represent Real Devices Which Have Architectures to Implement Them n Components Represent Interfaces to Entities or Virtual Devices –Need to be declared »may be instantiated at same time »can be used to build structural model, instantiated later

Component Declaration n Declares a Virtual Design Entity Interface n May Be Used to Associate a Component Instance With a Design Entity in a Library by Using –Component configuration –Configuration specification

Component Declaration Syntax

Component Declaration, e.g. component mux_2_to_1 is generic ( tpd : time ); port ( in_1, in_2, mux_out ); end component mux ;

Component Instantiation Syntax Identifier: [ component ] component_identifier [ generic map ( generic_association_list )] [ port map ( port_association_list ) ];

Direct Component Instantiation Identifier: entity entity_identifier [ ( architecture_identifier ) ] [ port map ( port_association_list ) ] ;

Direct Component Instantiation, e.g. And2_1: entity And2 [ ( TI74LS00 ) ] [ port map ( pin2 => in_1, pin3 => in_2, pin1 => out ) ] ;

Configuration Declaration n Declares Virtual Design Entity That May Be Used for Component Instantiation n Components Need Not Be Bound When Declared, but Specified in Configuration n Binds a Component Instance With a Design Entity in a Library

Basic Configuration Syntax

Configuration Declarative Syntax

Block Configuration Syntax A Block Is an Identified Group of Concurrent Statements block_configuration <= for block_specification { use_clause } { configuration_item } end for ;

Block Specification Syntax

Configuration Item Syntax

Component Configuration Syntax

Binding Indication

Entities/Components n Entities Can Be Defined Locally or in a Library n Components Are Local Linkages to Entities in Libraries n Either Can Be Used in an Architecture, but Component Is More General and Allows for Reuse of Entities

Architecture Bodies n There May Be Multiple Architecture Bodies of the Same Entity With Each Architecture Body Describing a Different Implementation of the Entity. –Behavior using the sequential or concurrent statements –Structure of the entity as a hierarchy of entities

Architecture Bodies n Declarations Define Items That Will Be Used to Construct the Design Description. –Signals used to connect submodules in a design –Component port declarations are signals within the entity

Architecture Body Syntax

Concurrent Statements n No Temporal Ordering Among the Statements n A Signal Assignment Statement Is a Sequential Statement and Can Only Appear Within a Process.

Concurrent Statements n A Process of Sequential Statements Behaves As If It Were One Concurrent Statement –Internally sequential –Externally concurrent

Signal Declarations n Signals Can Be Declared Internal to an Architecture to Connect Entities n Variables Are Not Appropriate Since They Do Not Have the Temporal Characteristics of Hardware

Signal Declarations n Signals Declared Within an Entity Are Not Available Unless Specified in the Port Clause of the Entity Declaration. n Discrete Event Simulation –Signal changes are scheduled in the future

Signal Syntax

Waveform Syntax Waveform Syntax

Signal Assignment, e.g., Recharge <= ‘1’ after 5 ns, ‘0’ after 2005 ns ; n Executes in Zero Time n Schedules Future Event n Time References Are Relative to Current Time –Recharge returns to zero 2 ms after it goes high, not ms after it goes high

Discrete Event Simulation n Transaction –A scheduled change in a signal value n Active Signal –A simulation cycle during which a signal transaction occurs n Event –A transaction which results in a signal’s value changing

Signal Attributes Given a signal, S, and a value T of type time

Signal Attributes

Signal Attributes, e.g., 1* if clk’event and ( clk = ‘1’ or clk = ‘H’ ) and ( clk’last_value = ‘0’ or clk’last_value = ‘L’) then assert d’last_event >= Tsu report “Timing error: d changed within setup time of clk” ; end if ; *Ashenden, p112

Signal Attributes, e.g., 2* entity edge_triggered_Dff is port ( D, clk, clr : in bit ; Q : out bit ) end entity edge_triggered_Dff ; architecture behavioral of edge_triggered_Dff is begin state_change : process (clk, clr) is *Ashenden, p113

Signal Attributes Example 2* begin if clr = ‘1’ then Q <= ‘0’ after 2 ns ; elsif clk’event and clk = ‘1’ then Q <= D after 2 ns ; end if ; end process state_change ; end architecture behavioral ;

Wait Statements Sensitivity Clause Condition Clause Timeout Clause

Wait Statements n All Clauses Are Optional n Wait Statements Are The Only Ones That Take More Than Zero Time to Execute

Wait Statements n Simulation Time Only Advances With Wait Statements n A Process Without a Wait Statement Is an Infinite Loop. –Processes with sensitivity lists have an implied wait statement at the end of the process. –A process must have either a wait statement or a sensitivity list.

Sensitivity Clause n Sensitivity Clause –A list of signals to which the process responds –An event (change in value) on any signal causes the process to resume –Shorthand--sensitivity list in heading rather than wait statement at end of process.

Sensitivity Clause, e.g. process (clk, clr) is process is begin begin wait on clk, clr ; end ; end ;

Condition Clause n When Condition Is True, Process Resumes n Condition Is Tested Only While the Process Is Suspended –Even if the condition is true when the wait is executed, the process will suspend –In order to test the condition, »A signal in the sensitivity list must change, or, »IFF there is no sensitivity list, an event must occur on a signal within the condition

Timeout Clause n Specifies the Maximum Simulation Time to Wait. n A Sensitivity or Condition Clause May Cause the Process to Resume Earlier.

Concurrent Signal Assignments n Functional Modeling Implements Simple Combinational Logic. n Concurrent Signal Assignment Statements Are an Abbreviated Form of Processes –Conditional signal assignment statements –Selected Signal Assignment Statements

Conditional Signal Assignments n Shorthand if Statement n Sensitive to ALL Signals Mentioned in Waveforms and Conditions.

Conditional Signal Assignment Syntax

unaffected Can make Waveform Not Schedule a Transaction on the Signal in Response to an Event using unaffected n Can Only Be Used in Concurrent Signal Assignment Statements when not priority_waiting and server_status = ready else unaffected ;

Selected Signal Assignments Shorthand for case Statement All Rules of case Statement Apply unaffected Also Applies

Selected Signal Assignments

Concurrent Assertions

Entity and Passive Processes

Passive Statements n Statements Are Passive If They Do Not Affect the Operation of the Entity in Any Way. n Concurrent Assertion Statements Are Passive Since They Only Test Conditions

Passive Statements n A Process Statement Is Passive If It Does NOT Contain –any signal assignments, or –calls to procedures containing signal assignment statements n Concurrent Procedure Call Statements –not yet covered

Passive Statement Example* entity S_R_flipflop is port ( s, r : in bit ; q, q_n : out bit ) ; begin check: assert not ( s = ‘1’ and r = ‘1’ ) report “Incorrect use of S_R_flip_flop: s and r both ‘1’” ; end entity S_R_flipflop ;

Sources Prof. K. J. Hintz Department of Electrical and Computer Engineering George Mason University

End of Lecture