Generate Statement A generate statement provides a mechanism for iterative or conditional elaboration of a portion of description. The iterative elaboration.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Simulation executable (simv)
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
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)
Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.
Topics of Lecture Structural Model Procedures Functions Overloading.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
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.
(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 
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
IAY 0600 Digital Systems Design
Digital Arithmetic and Arithmetic Circuits
Introduction to VHDL Arab Academy for Science, Technology & Maritime Transport Computer Engineering Department Magdy Saeb, Ph.D.
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 6: Configurations.
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #17 – Introduction.
Tutorial 1 Combinational Logic Synthesis. Introduction to VHDL VHDL = Very high speed Hardware Description Language VHDL and Verilog are the industry.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 5: Modeling Structure.
CSET 4650 Field Programmable Logic Devices Dan Solarek Introduction to VHDL An Overview / Review.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
7/10/2007DSD,USIT,GGSIPU1 Basic concept of Sequential Design.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
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.
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.
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.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Topics AliasesSubprograms Generics & Configurations.
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.
ECE 332 Digital Electronics and Logic Design Lab Lab 6 Concurrent Statements & Adders.
Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.
M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
(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.
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.
Components/Entities 1 It is a method of describing entities that are used often. Components are like the sockets that will be connected on a breadboard.
Advanced topics Lecture 7. Outline 7.1. Resolution functions 7.2. Guarded signals. Disconnection 7.3. GENERATE statement.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
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.
Subprograms Lecture 6. Subprograms A subprogram defines a sequential algorithm that performs some computations. Subprograms can be: –1. functions –2.
Slide 1 3.VHDL/Verilog Description Elements. Slide 2 To create a digital component, we start with…? The component’s interface signals Defined in MODULE.
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.
IAY 0600 Digital Systems Design VHDL discussion Structural style Modular design and hierarchy Part 1 Alexander Sudnitson Tallinn University of Technology.
IAY 0600 Digital Systems Design
Combinational logic circuit
Structural style Modular design and hierarchy Part 1
Basic Language Concepts
Module Goals Introduce structural VHDL constructs Use of components
ECE 4110–5110 Digital System Design
Structural style Modular design and hierarchy Part 1
Sequential Design.
Structural style Modular design and hierarchy Part 1
VHDL Discussion Subprograms
VHDL Discussion Subprograms
第7章 VHDL OBJECTS: CONSTANTS, VARIABLES, AND SIGNALS
CprE / ComS 583 Reconfigurable Computing
Sequntial-Circuit Building Blocks
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Generate Statement A generate statement provides a mechanism for iterative or conditional elaboration of a portion of description. The iterative elaboration of a description is a convenient mechanism to instantiate and replicate concurrent statements. The replication index is either a constant or a generic. This is often used to instantiate and connect components.

Generate Statement(Cont.) The conditional elaboration enables the conditional instantiation of a concurrent statement usually based on a constant or a generic. This is often used to conditionally instantiate a component or a concurrent procedure.

Generate It is equivalent to the sequential statement LOOP. It allows a section of code to be repeated a number of times, thus creating several instances of the same assignments.

There are two forms of the generate statement. 1.Using the for-generate scheme, concurrent statements can be replicated a predetermined number of times. 2. With the if-generation scheme, concurrent statements can be conditionally selected for execution.

generate-label: for generale-identifierin discrete-range generate concurrent-statements end generate [ generate-label];

Consider the following representation of a 4-bit full-adder, shown in Fig. 1, using the generate statement. entity FULL_ADD4 is port (A, B: in BIT_VECTOR(3 downto 0); CIN: in BIT; SUM: out BIT_VECTOR(3 downto 0); COUT: out BIT); end FULL_ADD4: architecture FOR_GENERATE of FULL_ADD4 is component FULL_ADDER port (A, B, C: in BIT; COUT, SUM: out BIT); end component; signal CAR: BIT_VECTOR(4 downto 0); begin CAR(0) <= CIN; GK: for K in 3 downto 0 generate FA: FULL_ADDER port map (CAR(K), A(K), B(K), CAR(K+1),SUM(K)); end generate GK; COUT <= CAR(4); end FOR_GENERATE;

After elaboration, the generate statement is expanded to FA(3): FULL_ADDER port map (CAR(3), A(3), B(3), CAR(4), SUM(3)); FA(2): FULL_ADDER port map (CAR(2), A(2), B(2), CAR(3), SUM(2)); FA(1): FULL_ADDER port map (CAR(1), A(1), B(1), CAR(2), SUM(1)); FA(0): FULL_ADDER port map (CAR(0), A(0), B(0), CAR(1), SUM(0));

the if-generation scheme. genarate-label: if expression generate concurrent-statements end generate [ generete-label ] ;

entity COUNTER4 is port (COUNT, CLOCK: in BIT; Q: buffer BIT_VECTOR(0 to 3)); end COUNTER4; architecture IF_GENERATE of COUNTER4 is component D_FLIP_FLOP port (D, CLK: in BIT; Q: out BIT); end component; begin GK: for K in 0 to 3 generate GKO: if K = 0 generate DFF: D_FLIP_FLOP port map (COUNT, CLOCK, Q(K)); end generate GK0; GK1_3: if K > 0 generate DFF: D_FLIP_FLOP port map (Q(K-1), CLOCK, Q(K)); end generate GK1_3; end generate GK; end IF_GENERATE;

4 bit counter

Block Statement A block is representative of a portion of the hierarchy of the design. One of the major purpose of a block is to disable signals (I.e. the signal drivers) by using a guard expression. A guard expression is a Boolean-valued expression associated with a block statement that controls assignments to guarded signals within a block. A guard expression defines an implicit signal GUARD that may be used to control the operation of certain statements within the block.

BLOCK Two types Block –Simple and Guarded –Simple Block The Block statement, in its simple form represents only a way of locally partitioning the code. It allows a set of concurrent statements to be clustered into a Block. A Block can be nested inside another BLOCK.

Block Syntax (Simple) Label : BLOCK [Declartive part] Begin (Concurrent statements) End BLOCK label;

Guarded Block A Guarded Block is a special kind of Block, which includes an additional expression, called guard expression. A guarded statement in a guarded BLOCK is executed only when the guard expression is TRUE. Even though only concurrent statements can be written within a block, with a guarded block sequential circuit can be constructed.

Guarded Block syntax Label : BLOCK (guard expression) [Declarative part] Begin (Concurrent guarded and unguarded statements) End BLOCK label;

Advantages of Blocks 1.Faster synthesis compilation time: Synopsys provides a group –hdl_block directive that groups design partition and creates new level of hierarchies. This approach can significantly reduce the compilation time. 2.Information Hiding: Within a block, local type and signal declaration can be defined. The signals within the block are local to the block, and are not visible by the architecture.

Advt. Of blocks (cont..) 3. Declaration of partition interfaces: The block header enables the definition of local generics, ports and port maps. All synthesizer vendors do not necessarily support block headers. 4. Visibility into architecture: Since a block is a concurrent statement of an architecture, a block has visibility into ports and signals of the architecture and into the declaration of the component within the architecture. A block also has visibility into packages, constants and types declared in the entity and architecture.