RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  1995-1998 RASSP E&F Structural VHDL RASSP Education & Facilitation Module 11 Version 2.01 Copyright.

Slides:



Advertisements
Similar presentations
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
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.
Simulation executable (simv)
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Verilog Intro: Part 1.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
Topics Entity DeclarationsEntity Declarations Port ClausePort Clause Component DeclarationComponent Declaration Configuration DeclarationConfiguration.
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.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
Package with 4-valued logic Signal Attributes Assertion Data Flow description.
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.
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.
Basic VHDL RASSP Education & Facilitation Module 10 Version 2.02 Copyright  RASSP E&F All rights reserved. This information is copyrighted by.
IAY 0600 Digital Systems Design
1 Digital System Design Subject Name : Digital System Design Course Code : IT- 308 Instructor : Amit Prakash Singh Home page :
ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 6: Configurations.
1 H ardware D escription L anguages Modeling Digital Systems.
Tutorial 1 Combinational Logic Synthesis. Introduction to VHDL VHDL = Very high speed Hardware Description Language VHDL and Verilog are the industry.
Copyright  RASSP E&F Structural VHDL RASSP Education & Facilitation Module 11 Version 2.01 Copyright  RASSP E&F All rights reserved.
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.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
Copyright  SCRA Methodology Reinventing Electronic Design Architecture Infrastructure DARPA Tri-Service RASSP Structural VHDL RASSP Education.
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.
Modern VLSI Design 3e: Chapters 3 & 8Partly from 2002 Prentice Hall PTR week6-1 Lectures 16 Transfer Characteristics (Delay and Power) Feb. 10, 2003.
Basic VHDL RASSP Education & Facilitation Module 10 Version 2.02 Copyright  RASSP E&F All rights reserved. This information is copyrighted by.
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.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
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.
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Design Lecture # 11 High Desecration Language- Based Design.
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.
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.
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.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
1 Introduction to VHDL Part 2 Fall We will use Std_logic And, Or have same precedence See slide 8 of part 1.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Basic VHDL RASSP Education & Facilitation Module 10 Version 2.02 Copyright  RASSP E&F All rights reserved. This information is copyrighted by.
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.
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.
(1) Modeling Structure © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
IAY 0600 Digital Systems Design
Basic VHDL RASSP Education & Facilitation Module 10 Version 2.02
Elements of Structural Models
Basic Language Concepts
Module Goals Introduce structural VHDL constructs Use of components
Structural style Modular design and hierarchy Part 1
ECE 434 Advanced Digital System L08
Structural style Modular design and hierarchy Part 1
IAY 0600 Digital Systems Design
VHDL Discussion Subprograms
Module Goals Introduce structural VHDL constructs Use of components
VHDL Discussion Subprograms
RASSP Education & Facilitation
RASSP Education & Facilitation
Design units Lecture 2.
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Structural VHDL RASSP Education & Facilitation Module 11 Version 2.01 Copyright  RASSP E&F All rights reserved. This information is copyrighted by the RASSP E&F Program and may only be used for non-commercial educational purposes. Any other use of this information without the express written permission of the RASSP E&F Program is prohibited. All information contained herein may be duplicated for non- commercial educational use provided this copyright notice is included. No warranty of any kind is provided or implied, nor is any liability accepted regardless of use. FEEDBACK: The RASSP E&F Program welcomes and encourages any feedback that you may have including any changes that you may make to improve or update the material. You can contact us at or RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Module Goals l Introduce structural VHDL constructs m Use of components m Component binding indications m Use of configuration declarations m GENERATE statements

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Module Outline l Introduction l Incorporating VHDL Design Objects l Generate Statement l Examples l Summary

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Putting It All Together Generic s Ports Entity Architectur e (structural) Concurren t Statement s Process Sequential Statements Concurren t Statement s Package

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Module Outline l Introduction l Incorporating VHDL Design Objects l Generate Statement l Examples l Summary

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Mechanisms for Incorporating VHDL Design Objects l VHDL mechanisms to incorporate design objects m Using direct instantiation (not available prior to VHDL-93) m Using component declarations and instantiations q Create idealized local components (i.e. declarations) and connect them to local signals (i.e. instantiations) q Component instantiations are then bound to VHDL design objects either : è Locally -- within the architecture declaring the component è At higher levels of design hierarchy, via configurations l Consider structural descriptions for the following entity : USE work.resources.all; ENTITY reg4 IS -- 4-bit register with no enable GENERIC(tprop : delay := 8 ns; tsu : delay := 2 ns); PORT(d0,d1,d2,d3 : IN level; clk : IN level; q0,q1,q2,q3 : OUT level); END reg4;

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F 4-Bit Register as Running Example USE work.resources.all; ENTITY dff IS GENERIC(tprop : delay := 8 ns; tsu : delay := 2 ns); PORT(d : IN level; clk : IN level; enable : IN level; q : OUT level; qn : OUT level); END dff; ARCHITECTURE behav OF dff IS BEGIN one : PROCESS (clk) BEGIN -- first, check for rising clock edge -- and check that ff is enabled IF ((clk = '1' AND clk'LAST_VALUE = '0') AND enable = '1') THEN -- now check setup requirement is met IF (d'STABLE(tsu)) THEN -- now check for valid input data IF (d = '0') THEN q <= '0' AFTER tprop; qn <= '1' AFTER tprop; ELSIF (d = '1') THEN q <= '1' AFTER tprop; qn <= '0' AFTER tprop; ELSE -- else invalid data q <= 'X'; qn <= 'X'; END IF; ELSE -- else setup not met q <= 'X'; qn <= 'X'; END IF; END PROCESS one; END behav; l First, need to find the building block(s) m Reusing an object from examples in Module 10

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F General Steps to Incorporate VHDL Design Objects l A VHDL design object to be incorporated into an architecture must generally be : m declared -- where a local interface is defined m instantiated -- where local signals are connected to the local interface q Regular structures can be created easily using GENERATE statements in component instantiations m bound -- where an entity/architecture object which implements it is selected for the instantiated object

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Using Component Declarations and Local Bindings l Component declarations define interfaces for idealized local objects m Component declarations may be placed in architecture declarations or in package declarations l Component instantiations connect local signals to component interface signals USE work.resources.all; ARCHITECTURE struct_2 OF reg4 IS COMPONENT reg1 IS PORT (d, clk : IN level; q : OUT level); END COMPONENT reg1; CONSTANT enabled : level := '1'; FOR ALL : reg1 USE work.dff(behav) PORT MAP(d=>d,clk=>clk,enable=>enabled,q=>q,qn=>OPEN); BEGIN r0 : reg1 PORT MAP (d=>d0,clk=>clk,q=>q0); r1 : reg1 PORT MAP (d=>d1,clk=>clk,q=>q1); r2 : reg1 PORT MAP (d=>d2,clk=>clk,q=>q2); r3 : reg1 PORT MAP (d=>d3,clk=>clk,q=>q3); END struct_2;

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Using Component Declarations and Configurations USE work.resources.all; ARCHITECTURE struct_3 OF reg4 IS COMPONENT reg1 IS PORT (d, clk : IN level; q : OUT level); END COMPONENT reg1; CONSTANT enabled : level := '1'; BEGIN r0 : reg1 PORT MAP (d<=d0,clk<=clk,q<=q0); r1 : reg1 PORT MAP (d<=d1,clk<=clk,q<=q1); r2 : reg1 PORT MAP (d<=d2,clk<=clk,q<=q2); r3 : reg1 PORT MAP (d<=d3,clk<=clk,q<=q3); END struct_3; USE work.resources.all; CONFIGURATION reg4_conf_1 OF reg4 IS CONSTANT enabled : level := '1'; FOR struct_3 FOR all : reg1 USE work.dff(behav) PORT MAP(d=>d,clk=>clk,enable=>enabled,q=>q,qn=>OPEN); END FOR; END reg4_conf_1; -- Architecture in which a COMPONENT for reg4 is declared... FOR ALL : reg4_comp USE CONFIGURATION work.reg4_conf_1;...

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Power of Configuration Declarations l Reasons to use configuration declarations : m Large design may span multiple levels of hierarchy m When the architecture is developed, only the component interface may be available m Mechanism to put the pieces of the design together l Configurations can be used to customize the use of VHDL design objects interfaces as needed : m Entity name can be different than the component name m Entity of incorporated design object may have more ports than the component declaration m Ports on the entity declaration of the incorporated design object may have different names than the component declaration

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F r0 : reg1 PORT MAP (d=>d0,clk=>clk,q=>q0); Instantiation Statement l The instantiation statement connects a declared component to signals in the architecture l The instantiation has 3 key parts m Name -- to identify unique instance of component m Component type -- to select one of the declared components m Port map -- to connect to signals in architecture q Along with optional Generic Map presented on next slide Name Component Type Port Map

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Generic Map l Generics allow the component to be customized upon instantiation m Entity declaration of design object being incorporated provides default values l The GENERIC MAP is similar to the PORT MAP in that it maps specific values to the generics of the component USE Work.my_stuff.ALL ARCHITECTURE test OF test_entity SIGNAL S1, S2, S3 : BIT; BEGIN Gate1 : my_stuff.and_gate -- component found in package GENERIC MAP (tplh=>2 ns, tphl=>3 ns) PORT MAP (S1, S2, S3); END test;

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Component Binding Specifications l A component binding specification provides binding information for instantiated components m Single component m Multiple components m All components -- All components of this type are effected m Other components -- i.e. for components that are not otherwise specified FOR A1 : and_gate USE binding_indication; FOR A1, A2 : and_gate USE binding_indication; FOR ALL : and_gate USE binding_indication; FOR OTHERS : and_gate USE binding_indication;

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Binding Indication l The binding indication identifies the design object to be used for the component l Two mechanisms available : m VHDL entity/architecture design object m VHDL configuration l Binding indication may also include a PORT MAP and/or GENERIC MAP to customize the component(s) FOR reg4_inst : reg4_comp USE CONFIGURATION work.reg4_conf_1; FOR ALL : reg1 USE work.dff(behav);

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Using Direct Instantiation USE work.resources.all; ARCHITECTURE struct_1 OF reg4 IS CONSTANT enabled : level := '1'; BEGIN r0 : ENTITY work.dff(behav) PORT MAP (d0,clk,enabled,q0,OPEN); r1 : ENTITY work.dff(behav) PORT MAP (d1,clk,enabled,q1,OPEN); r2 : ENTITY work.dff(behav) PORT MAP (d2,clk,enabled,q2,OPEN); r3 : ENTITY work.dff(behav) PORT MAP (d3,clk,enabled,q3,OPEN); END struct_1; l Provides one-step mechanism for plugging in previously defined VHDL design objects l Only available one level up in hierarchy from level of incorporated building block(s)

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Rules for Actuals and Locals l An actual is either signal declared within the architecture or a port in the entity declaration m A port on a component is known as a local and must be matched with a compatible actual l VHDL has two main restrictions on the association of locals with actuals m Local and actual must be of same data type m Local and actual must be of compatible modes q Locally declared signals do not have an associated mode and can connect to a local port of any mode in1 in2 out2 Locally_Declared_Sig_a Input_Port_a Output_Port_a out1 Locally_Declared_Sig_b

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Summary of Concepts of Structural VHDL l Various levels of abstraction supported in description of VHDL structural models m Direct instantiation requires detailed knowledge of building blocks when they are incorporated m Use of components allows definition and use of idealized local building blocks q Can define local interface for component to be connected to local signals q Declared components bound to VHDL design objects (i.e. entity/architecture descriptions) è Binding done either locally or deferred to higher levels in design hierarchy via use of configurations l Actuals and locals must be of compatible types and modes

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Module Outline l Introduction l Incorporating VHDL Design Objects l Generate Statement l Examples l Summary

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Generate Statement l VHDL provides the GENERATE statement to create well-patterned structures easily m Some structures in digital hardware are repetitive in nature (e.g. RAMs, adders) l Any VHDL concurrent statement may be included in a GENERATE statement, including another GENERATE statement m Specifically, component instantiations may be made within GENERATE bodies

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Generate Statement FOR-Scheme l All objects created are similar l The GENERATE parameter must be discrete and is undefined outside the GENERATE statement l Loop cannot be terminated early name : FOR N IN 1 TO 8 GENERATE concurrent-statements END GENERATE name; name : FOR N IN 1 TO 8 GENERATE concurrent-statements END GENERATE name;

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F FOR-Scheme Example -- this uses the and_gate component from before ARCHITECTURE test_generate OF test_entity IS SIGNAL S1, S2, S3: BIT_VECTOR(7 DOWNTO 0); BEGIN G1 : FOR N IN 7 DOWNTO 0 GENERATE and_array : and_gate GENERIC MAP (2 ns, 3 ns) PORT MAP (S1(N), S2(N), S3(N)); END GENERATE G1; END test_generate; -- this uses the and_gate component from before ARCHITECTURE test_generate OF test_entity IS SIGNAL S1, S2, S3: BIT_VECTOR(7 DOWNTO 0); BEGIN G1 : FOR N IN 7 DOWNTO 0 GENERATE and_array : and_gate GENERIC MAP (2 ns, 3 ns) PORT MAP (S1(N), S2(N), S3(N)); END GENERATE G1; END test_generate; S2(7:0) S1(7:0) S3(7:0)

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Generate Statement IF-Scheme l Allows for conditional creation of components l Cannot use ELSE or ELSIF clauses with the IF-scheme name : IF (boolean expression) GENERATE concurrent-statements END GENERATE name; name : IF (boolean expression) GENERATE concurrent-statements END GENERATE name;

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F IF-Scheme Example ARCHITECTURE test_generate OF test_entity SIGNAL S1, S2, S3: BIT_VECTOR(7 DOWNTO 0); BEGIN G1 : FOR N IN 7 DOWNTO 0 GENERATE G2 : IF (N = 7) GENERATE or1 : or_gate GENERIC MAP (3 ns, 3 ns) PORT MAP (S1(N), S2(N), S3(N)); END GENERATE G2; G3 : IF (N < 7) GENERATE and_array : and_gate GENERIC MAP (2 ns, 3 ns) PORT MAP (S1(N), S2(N), S3(N)); END GENERATE G3; END GENERATE G1; END test_generate; ARCHITECTURE test_generate OF test_entity SIGNAL S1, S2, S3: BIT_VECTOR(7 DOWNTO 0); BEGIN G1 : FOR N IN 7 DOWNTO 0 GENERATE G2 : IF (N = 7) GENERATE or1 : or_gate GENERIC MAP (3 ns, 3 ns) PORT MAP (S1(N), S2(N), S3(N)); END GENERATE G2; G3 : IF (N < 7) GENERATE and_array : and_gate GENERIC MAP (2 ns, 3 ns) PORT MAP (S1(N), S2(N), S3(N)); END GENERATE G3; END GENERATE G1; END test_generate;

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Module Outline l Introduction l Component Instantiation l Generate Statement l Examples l Summary

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F Summary l Structural VHDL describes the arrangement and interconnection of components l Components can be at any level of abstraction -- low level gates or high level blocks of logic l Generics are inherited by every architecture or component of that entity l GENERATE statements create large, regular blocks of logic easily l Configurations give the designer control over the entity and architecture used for a component

RASSP E&F SCRA GT UVA Raytheon UCinc EIT ADL Copyright  RASSP E&F References [Bhasker95] Bhasker, J. A VHDL Primer, Prentice Hall, [Coelho89] Coelho, D. R., The VHDL Handbook, Kluwer Academic Publishers, [Lipsett89] Lipsett, R., C. Schaefer, C. Ussery, VHDL: Hardware Description and Design, Kluwer Academic Publishers,, [LRM94] IEEE Standard VHDL Language Reference Manual, IEEE Std , [Navabi93] Navabi, Z., VHDL: Analysis and Modeling of Digital Systems, McGraw-Hill, [Menchini94] Menchini, P., “Class Notes for Top Down Design with VHDL”, [MG90] An Introduction to Modeling in VHDL, Mentor Graphics Corporation, [MG93] Introduction to VHDL, Mentor Graphics Corporation, [Perry94] Perry, D. L., VHDL, McGraw-Hill, [Calhoun95] Calhoun, J.S., Reese, B., “Class Notes for EE-4993/6993: Special Topics in Electrical Engineering (VHDL)”, Mississippi State University, [Williams94] Williams, R. D., "Class Notes for EE 435: Computer Organization and Design", University of Virginia, 1994.