Diseño de Circuitos de Aplicación Específica VHDL Circuitos Integrados de Aplicación Específica VHDL: VHSIC Hardware Description Language.

Slides:



Advertisements
Similar presentations
DISEÑO LÓGICO (DLO) Ejemplos de VHDL.
Advertisements

VHDL.
Structural Specification of Hardware Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
6-1 Chapter 6 - Datapath and Control Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of Computer Architecture.
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
OBJECTIVES Learn the history of HDL Development. Learn how the HDL module is structured. Learn the use of operators in HDL module. Learn the different.
VHDL Refresher ECE 437 April 13, 2015 Motivation ECE 337 is a prerequisite But… –You may have taken 337 a few semesters previous –Breaks causes memory.
Introduction To VHDL for Combinational Logic
INTRO TO VHDL Appendix A: page page VHDL is an IEEE and ANSI standard. VHDL stands for Very High Speed IC hardware description language.
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
Chapter 2 Logic Circuits.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
MO Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
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.
"design productivity crisis“: 4 --hardware capability increases at a rapid rate --to harness this capability, we must employ design reuse, "IP"
© Dr. Alaaeldin Amin 1 Hardware Modeling & Synthesis Using VHDL Very High Speed Integrated Circuits Start Of VHDL Development First Publication.
02/02/20091 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
Lab 6 – Part C2 Circuit for Problem 3.6 p 20. a b s y z = ~s & a w = s & b = ~s & a  s & b b s a ~s w = (b & s ) z = (a & ~s ) y = ~ (z & w) De Morgan’s.
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.
331 W05.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 5: VHDL Programming [Adapted from Dave Patterson’s UCB CS152.
ECE 331 – Digital System Design Course Introduction and VHDL Fundamentals (Lecture #1)
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
1 Chapter 7 Design Implementation. 2 Overview 3 Main Steps of an FPGA Design ’ s Implementation Design architecture Defining the structure, interface.
Generalized De Morgan’s Theorem Lecture L5.4 Section 5.1.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 1 Microcomputer Systems Design (Embedded Systems)
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 4: Modeling Dataflow.
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 Part I: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Computer Architecture. “The design of a computer system. It sets the standard for all devices that connect to it and all the software that runs on it.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
VHDL – Dataflow and Structural Modeling and Testbenches ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering.
1 H ardware D escription L anguages Modeling Digital Systems.
6-1 Chapter 6 - Datapath and Control Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of.
Tutorial 1 Combinational Logic Synthesis. Introduction to VHDL VHDL = Very high speed Hardware Description Language VHDL and Verilog are the industry.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Ch 5. Logic Design with MSI Components. Csci 2021 Srping02 2 VHDL The U.S. Department of Defense (DoD) supported the development of VHDL (VHSIC hardware.
Introducing the Nexys 2 Board CS 332 – Operating Systems 12/04/2011 by Otto Castell-R.
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.
5-1 Chapter 5 - Datapath and Control Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring Computer Architecture.
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.
 Seattle Pacific University EE Logic System DesignCAD-VHDL-1 The Grunt Work of Design Many design tasks require a lot of time and effort Forming.
1 Hardware Description Languages: a Comparison of AHPL and VHDL By Tamas Kasza AHPL&VHDL Digital System Design 1 (ECE 5571) Spring 2003 A presentation.
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.
Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 1 Digital Fundamentals.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
Introduction to VHDL Coding Wenchao Cao, Teaching Assistant Department of EECS University of Tennessee.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
VHDL From Ch. 5 Hardware Description Languages. History 1980’s Schematics 1990’s Hardware Description Languages –Increased due to the use of Programming.
EECE 320 L8: Combinational Logic design Principles 1Chehab, AUB, 2003 EECE 320 Digital Systems Design Lecture 8: Combinational Logic Design Principles.
SUBJECT : DIGITAL ELECTRONICS CLASS : SEM 3(B) TOPIC : INTRODUCTION OF VHDL.
Basic Language Concepts
Systems Architecture Lab: Introduction to VHDL
ECE 4110–5110 Digital System Design
VHDL VHSIC Hardware Description Language VHSIC
CS341 Digital Logic and Computer Organization F2003
VHDL Structural Architecture
Hardware Modeling & Synthesis Using VHDL
Copyright Joanne DeGroat, ECE, OSU
Chapter 10 Introduction to VHDL
Presentation transcript:

Diseño de Circuitos de Aplicación Específica VHDL Circuitos Integrados de Aplicación Específica VHDL: VHSIC Hardware Description Language.

Diseño de Circuitos de Aplicación Específica VHDL A NAND Gate Example -- black-box definition (interface) entity NAND is generic ( Tpd : time := 0 ns ); port ( A, B : in bit; Y : out bit ); end NAND; -- an implementation (contents) architecture BEHAVIOR_1 of NAND is begin Y <= A nand B after Tpd; end BEHAVIOR_1; Important Concepts entity architecture generic port waveform assignment

Diseño de Circuitos de Aplicación Específica VHDL Another Implementation of NAND -- there can be multiple implementations architecture BEHAVIOR_2 of NAND is signal X : bit; begin -- concurrent statements Y <= X after Tpd; X <= 1 when A=0 or B=0 else 0; end BEHAVIOR_2; Important Concepts multiple architectures signal concurrent statements

Diseño de Circuitos de Aplicación Específica VHDL Yet More NAND Gates! entity NAND_N is generic ( N : integer := 4; Tpd : time); port ( A, B : in bit_vector(1 to N); Y : out bit_vector(1 to N)); end NAND_N; architecture BEHAVIOR_1 of NAND_N is begin process variable X : bit_vector(1 to N); begin X := A nand B; Y <= X after Td; wait on A, B; end process; end BEHAVIOR_1; Important Concepts process variable wait sequential statements events

Diseño de Circuitos de Aplicación Específica VHDL The process Statement [label:] process [(sensitivity_list)] [declarations] begin {sequential_statement} end process [label]; It defines an independent sequential process which repeatedly executes its body Following are equivalent: process (A,B)process beginbegin C <= A or B; C <= A or B; end; wait on A, B; end; No wait statements allowed in the body if there is a sensitivity_list

Diseño de Circuitos de Aplicación Específica VHDL The wait Statement wait [on list_of_signals] [until boolean_expression] [for time_expression] ; This is the ONLY sequential statement during which time advances! examples: -- wait for a rising or falling edge on CLK wait on CLK; wait until CLKEVENT; -- this is equivalent to the above -- wait for rising edge of CLK wait on CLK until CLK=1; wait until CLK=1; -- this is equivalent to the above -- wait for 10 ns wait until 10 ns; -- wait for ever (the process effectively dies!) wait;

Diseño de Circuitos de Aplicación Específica VHDL A Simple Producer-Consumer Example ProducesConsumer DATA REQ ACK

Diseño de Circuitos de Aplicación Específica VHDL Producer-Consumer in VHDL entity producer_consumer is end producer_comsumer; architecture two_phase of producer_consumer is signal REQ, ACK : bit; signal DATA : integer; begin P: process begin DATA <= produce(); REQ <= not REQ; wait on ACK; end P; C: process begin wait on REQ; consume(DATA); ACK <= not ACK; end C; end two_phase;

Diseño de Circuitos de Aplicación Específica VHDL Producer-Consumer in VHDL 4-Phase Case architecture four_phase of producer_consumer is signal REQ, ACK : bit := 0; signal DATA : integer; begin P: process begin DATA <= produce(); REQ <= 1; wait until ACK=1; REQ <= 0; wait until ACK=0; end P; C: process begin wait until REQ=1; consume(DATA); ACK <= 1; wait until REQ=0; ACK <= 0; end C; end four_phase;

Diseño de Circuitos de Aplicación Específica VHDL Muller C Element entity MULLER_C_ELEMENT is port (A,B : in bit; C : out bit); end MULLER_C_ELEMENT; architecture BEHAVIOR is begin process begin wait until A=1 and B=1; C <= 1; wait until A=0 and B=0; C <= 0; end process; end BEHAVIOR; Could have written: wait until A=B; C <= A; C A B C

Diseño de Circuitos de Aplicación Específica VHDL A Edge Triggered D Flip-Flop entity DFF is generic (T_setup, T_hold, T_delay : time:=0 ns); port (D, CLK: in bit; Q : out bit); begin -- check setup time assert not (CLKEVENT and CLK=1 and DLAST_EVENT < T_setup) report Setup violation severity WARNING; -- check hold time assert not (CLKDELAYED(T_hold)EVENT and CLKDELAYED(Thold)=1 and DLAST_EVENT < T_hold) report Hold violation severity WARNING; end DFF;

Diseño de Circuitos de Aplicación Específica VHDL A Edge Triggered D Flip-Flop (contd.) architecture BEHAVIOR of DFF is begin process begin wait on CLK until CLK=1; Q <= D after T_delay; end process; end BEHAVIOR;

Diseño de Circuitos de Aplicación Específica VHDL Behavior vs. Structure Description An entity can be described by its behavior or by its structure, or in a mixed fashion Example: a 2-input XOR gate

Diseño de Circuitos de Aplicación Específica VHDL XOR in VHDL: Behavior entity XOR is port ( A,B : in bit; Y : out bit); end XOR; architecture BEHAVIOR of XOR is begin Y <= (A and not B) or (not A and B); end BEHAVIOR;

Diseño de Circuitos de Aplicación Específica VHDL XOR in VHDL: Structure architecture STRUCTURE of XOR is component NAND port ( A, B : in bit; Y : out bit); end component; signal C, D, E : bit; begin G1 : NAND port map (A, B, C); G2 : NAND port map (A => A, B => C, Y => D); G3 : NAND port map (C, B => B, Y => E); G4 : NAND port map (D, E, Y); end STRUCTURE; Component Instantiation is just another Concurrent Statement!

Diseño de Circuitos de Aplicación Específica VHDL XOR in VHDL: Mixed architecture MIXED of XOR is component NAND port ( A, B : in bit; Y : out bit); end component; signal C, D, E : bit; begin D <= A nand C; E <= C nand B; G1 : NAND port map (A, B, C); G4 : NAND port map (D, E, Y); end MIXED;

Diseño de Circuitos de Aplicación Específica VHDL The Generate Statement Used to generate iteratively or conditionally a set of concurrent statements. Example: a ripple-carry adder entity RIPPLE_ADDER is port (A, B : in bit_vector; CIN : in bit; SUM : out bit_vector; COUT : out bit); begin assert ALENGTH=BLENGTH and ALENGTH=SUMLENGTH report Bad port connections severity ERROR; end;

Diseño de Circuitos de Aplicación Específica VHDL The Generate Statement (contd.) architecture STRUCTURE of RIPPLE_ADDER is alias IN1 : bit_vector(0 to ALENGTH-1) is A; alias IN2 : bit_vector(0 to ALENGTH-1) is B; alias S : bit_vector(0 to ALENGTH-1) is SUM; signal C : bit_vector(IN1RANGE); component FULL_ADDER port (A,B,CIN: in bit; S, COUT: out bit); end component; begin L1: for I in SRANGE generate L2: if I=0 generate FA1: FULL_ADDER port map (IN1(0),IN2(0),CIN,S(0),C(0)); end generate; L3: if I>0 generate FA2: FULL_ADDER port map (IN1(I),IN2(I),C(I-1),S(I),C(I)); end generate; end generate; COUT <= C(CHIGH); end STRUCTURE;

Diseño de Circuitos de Aplicación Específica VHDL Concurrent vs. Sequential Statements Concurrent Statements Process independent sequential process Block groups concurrent statements Concurrent Procedure convenient syntax for Concurrent Assertion commonly occurring form Concurrent Signal Assignment of processes Component Instantiation structure decomposition Generate Statement regular description

Diseño de Circuitos de Aplicación Específica VHDL Concurrent vs. Sequential Statements Sequential Statements Wait synchronization of processes Assertion Signal Assignment Variable Assignment Procedure Call If Case Loop (for, while) Next Exit Return Null

Diseño de Circuitos de Aplicación Específica VHDL VHDLs Model of a System Static network of concurrent processes communicating using signals A process has drivers for certain signals A signal may be driven by multiple processes

Diseño de Circuitos de Aplicación Específica VHDL Similar to an OS Reminds one of a multitasking OS! And, most (all?) VHDL simulators are indeed very similar in philosophy... a kernel process coordinates the activity of user-defined processes during simulation

Diseño de Circuitos de Aplicación Específica VHDL Anatomy of the VHDL Kernel vhdl_simulator_kernel() { /* initialization phase */ time = 0 ns; for (each process P) { run P until it suspends;} while TRUE do { /* this is one simulation cycle... */ if (no driver is active) { time = next time at which a driver is active or a process resumes; if (time = TIMEHIGH) break; } update_signals(); /* events may occur */ for (each process P) { if (P is sensitive to signal S & an event has occurred on S in this cycle) { resume P; /* put it on a list... */ } } for (each process P that has just resumed) { run P until it suspends;} } }

Diseño de Circuitos de Aplicación Específica VHDL Signals versus Variables architecture DUMMY_1 of JUNK is signal Y : bit := 0; begin process variable X : bit := 0; begin wait for 10 ns; X := 1; Y <= X; wait for 10 ns; -- What is Y at this point ? 1... end process; end DUMMY_1; architecture DUMMY_2 of JUNK is signal X, Y : bit := 0; begin process begin wait for 10 ns; X <= 1; Y <= X; wait for 10 ns; -- What is Y at this point ? 0... end process; end DUMMY_2; Signal assignments with 0 delay take effect only after a delta delay. i.e., in the next simulation cycle.

Diseño de Circuitos de Aplicación Específica VHDL Transaction Delay Models VHDL has two distinct ways of modeling delays Transport delay model signal <= transport waveform; l for ideal devices with infinite frequency response in which every input pulse, however small, produces an output pulse Inertial delay model signal <= [reject time] inertial waveform; l for devices with inertia so that not all pulses go through l pulses < reject time are rejected Projected waveform Preemptive timing Transport delay Inertial delay

Diseño de Circuitos de Aplicación Específica VHDL Case 1: Transport Delay Model Let: T new = earliest transaction scheduled by a new signal assignment Model: All pending transactions at time T new are deleted All new transactions are added

Diseño de Circuitos de Aplicación Específica VHDL Transport Delay Model (contd.) Y <= 0 after 0 ns, 2 after 2 ns, 4 after 4 ns, 6 after 6 ns; wait for 1 ns; Y <= transport 3 after 2 ns, 5 after 4 ns, 7 after 6 ns;

Diseño de Circuitos de Aplicación Específica VHDL Case 2: Inertial Delay Model Let: T new = earliest transaction scheduled by a new signal assignment T r = pulse rejection limit Model: All pending transactions at time T new are deleted All new transactions are added Any pending transactions in the interval T new -T r to T new are examined. If there is a run of consecutive transactions immediately preceding the earliest new transaction at T new with the same value as that new transaction, the yare kept. Other pending transactions in the interval are deleted.

Diseño de Circuitos de Aplicación Específica VHDL Inertial Delay Model (contd.) Y <= 0 after 0 ns, 2 after 2 ns, 4 after 4 ns, 6 after 6 ns; wait for 1 ns; Y <= 3 after 2 ns, 5 after 4 ns, 7 after 6 ns;

Diseño de Circuitos de Aplicación Específica VHDL Inertial Delay Model (contd.) -- suppose current time is 10 ns S <= reject 5 ns inertial 1 after 8 ns; 11 ns 1 12 ns X 14 ns 1 15 ns 0 16 ns 1 17 ns 1 20 ns 1 15 ns 0 11 ns 1 12 ns X 16 ns 1 17 ns 1 18 ns 1 new transaction retained deleted pulse rejection interval (13 ns to 18 ns)

Diseño de Circuitos de Aplicación Específica VHDL Signals with Multiple Drivers Y <= A; -- in process1 and,Y <= B; -- in process2 What is the value of the signal in such a case? VHDL uses the concept of a Resolution Function that is attached to a signal or a type, and is called every time the value of signal needs to be determined -- that is every time a driver changes value

Diseño de Circuitos de Aplicación Específica VHDL Resolution Function Example: Wire-And (open collector) package RESOLVED is function wired_and (V:bit_vector) return bit; subtype rbit is wired_and bit; end RESOLVED; package body RESOLVED is function wired_and(V:bit_vector) return bit is begin for I in VRANGE loop if V(I)= 0 then return 0; end if; end loop; return 1; end wired_and; end RESOLVED;

Diseño de Circuitos de Aplicación Específica VHDL Guarded Signals: register & bus Guarded signals are those whose drivers can be turned off What happens when all drivers of a guarded signal are off? Case 1: retain the last driven value –signal X : bit register; –useful for modeling charge storage nodes Case 2: float to a user defined default value –signal Y : bit bus; –useful for modeling busses

Diseño de Circuitos de Aplicación Específica VHDL Guarded Signals (contd.) Two ways to turn off the drivers null waveform in sequential signal assignment signal_name <= null after time_expression; guarded concurrent signal assignment block (data_bus_enable=1) begin data_bus <= guarded 0011; end block;

Diseño de Circuitos de Aplicación Específica VHDL Using VHDL Like C! Normal sequential procedural programs can be written in VHDL without ever utilizing the event scheduler or the concurrent concepts. Example: entity HelloWorld is end; architecture C_LIKE of HelloWorld is use std.textio.all; begin main: process variable buf : line; begin write(buf, Hello World!); writeln(output, buf); wait; -- needed to terminate the program end process main; end C_LIKE;

Diseño de Circuitos de Aplicación Específica VHDL Language Features: Types TYPE = Set of Values + Set of Operations VHDL types: SCALAR ENUMERATIONe.g. character, bit, boolean INTEGERe.g. integer FLOATINGe.g. real PHYSICALe.g. time COMPOSITE ARRAYe.g. bit_vector, string RECORD ACCESS FILE

Diseño de Circuitos de Aplicación Específica VHDL Examples of VHDL Types type bit is (0, 1); type thor_bit is (U, 0, 1, Z); type memory_address is range 0 to 2**32-1; type small_float is range 0.0 to 1.0; type weight is range 0 to 1E8 units Gm; -- base unit Kg = 1000 Gm; -- kilogram Tonne = 1000 Kg; -- tonne end units;

Diseño de Circuitos de Aplicación Específica VHDL Language Features: Subtypes SUBTYPE = TYPE + constraints on values TYPE is the base-type of SUBTYPE SUBTYPE inherits all the operators of TYPE SUBTYPE can be more or less used interchangeably with TYPE Examples: subtype natural is integer range 0 to integerHIGH; subtype good_thor_bit is thor_bit range 0 to 1; subtype small_float is real range 0.0 to 1.0;

Diseño de Circuitos de Aplicación Específica VHDL Array and Record Types -- unconstrained array (defines an array type) type bit_vector is array (natural range <>) of bit; -- constrained array (define an array type and subtype) type word is array (0 to 31) of bit; -- another unconstrained array type memory is array (natural range <>) of word; -- following is illegal! type memory is array (natural range <>) of bit_vector; -- an example record type PERSON is record name: string(1 to 20); age: integer range 0 to 150; end record;

Diseño de Circuitos de Aplicación Específica VHDL Language Features: Overloading Pre-defined operators (e.g., +, -, and, nand etc.) can be overloaded to call functions Example: function and(L,R : thor_bit) return thor_bit is begin if L=0 or R=0 then return 0; elsif L=1 and R=1 then return 1; else return U; end if; end and; -- now one can say C <= A and B; -- where A, B and C are of type thor_bit

Diseño de Circuitos de Aplicación Específica VHDL Overloading (contd.) Two subprograms (functions or procedures) can have the same name, i.e., the names can be overloaded. They are distinguished by parameter types. e.g., function MAX(A,B:integer) return integer; function MAX(A,B:real) return real;

Diseño de Circuitos de Aplicación Específica VHDL Language Features: Configurations Component declarations really define a template for a design entity The binding of an entity to this template is done through a configuration declaration entity data_path is... end data_path; architecture INCOMPLETE of data_path is component alu port(function : in alu_function; op1, op2 : in bit_vector_32; result : out bit_vector_32); end component; begin... end INCOMPLETE;

Diseño de Circuitos de Aplicación Específica VHDL Configurations (contd.) … configuration DEMO_CONFIG of data_path is for INCOMPLETE for all:alu use entity work.alu_cell(BEHAVIOR) port map (function_code => function, operand1 => op1, operand2 => op2, result => result, flags => open); end for; end for; end DEMO_CONFIG;

Diseño de Circuitos de Aplicación Específica VHDL Language Features: Packages A package is a collection of reusable declarations (constants, types, functions, procedures, signals etc.) A package has a declaration (interface), and a body (contents) [optional]

Diseño de Circuitos de Aplicación Específica VHDL Example of a Package package SIMPLE_THOR is type thor_bit is (U, 0,1,Z); function and(L,R: thor_bit) return thor_bit; function or(L,R:thor_bit) return thor_bit;... end SIMPLE_THOR; package body SIMPLE_THOR is function and(L,R: thor_bit) return thor_bit is begin... end and;... end SIMPLE_THOR; -- and then it can be used after saying library my_lib; use my_lib.SIMPLE_THOR.all;

Diseño de Circuitos de Aplicación Específica VHDL Language Features: Design Units and Libraries VHDL constructs are written in a design file and the compiler puts them into a design library. Libraries are made up of design units primary design units –entity declarations –package declarations –configuration declarations secondary design units –architecture bodies –package bodies

Diseño de Circuitos de Aplicación Específica VHDL Design Units and Libraries (contd.) Libraries have a logical name and the OS maps the logical name to a physical name for example, directories on UNIX Two special libraries: work: the working design library std: contains packages standard and textio To declare libraries that are referenced in a design unit: library library_name; To make certain library units directly visible: use library_name.unit_name; use also defines dependency among design units.

Diseño de Circuitos de Aplicación Específica VHDL Logic Simulation in VHDL The 2-state bit data type is insufficient for low- level simulation Multi-Valued types can easily be built in VHDL several packages available IEEE standard logic Example: one may use a 4-value (U,0,1,Z) system but no notion of strength only wired-X resolution Multi-State/Strength systems with interval logic

Diseño de Circuitos de Aplicación Específica VHDL Simulador VHDL típico Código fuente VHDL Analizador Compilador Compilador C Representación intermedia (IR) Código fuente en C Linker Elaboración Ejecución Binario ejecutable Código fuente en C Fichero objeto Pattern Debugger Patrón binario de salida TEXTO VÍDEO PICL Patrón binario de entrada Lenguaje de patrón