LECTURE 6 In this lecture we will introduce:

Slides:



Advertisements
Similar presentations
Verilog Intro: Part 1.
Advertisements

Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
Introduction to VHDL (Lecture #5) ECE 331 – Digital System Design The slides included herein were taken from the materials accompanying Fundamentals of.
02/02/20091 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
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.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
EENG 2910 – Digital Systems Design Fall Course Introduction Class Time: M9:30am-12:20pm Location: B239, B236 and B227 Instructor: Yomi Adamo
1 LECTURE 6 In this lecture we will introduce: The VHDL Language and its benefits. The VHDL entity Concurrent and Sequential constructs Structural design.
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 
IAY 0600 Digital Systems Design
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
ECE 2372 Modern Digital System Design
Introduction to VHDL Arab Academy for Science, Technology & Maritime Transport Computer Engineering Department Magdy Saeb, Ph.D.
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.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
CSET 4650 Field Programmable Logic Devices Dan Solarek Introduction to VHDL An Overview / Review.
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.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
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.
RTL Hardware Design by P. Chu Chapter Basic VHDL program 2. Lexical elements and program format 3. Objects 4. Data type and operators RTL Hardware.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Module 1.2 Introduction to Verilog
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Digital Logic Design.
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.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
HARDWARE DESCRIPTION LANGUAGE (HDL). What is HDL? A type of programming language for sampling and modeling of electronic & logic circuit designs It can.
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.
(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.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Digital Design Using VHDL and PLDs ECOM 4311 Digital System Design Chapter 1.
VHDL Programming Fundamentals Presented By Dr. Pradyut Kumar Biswal Department of Electronics, IIIT Bhubaneswar.
CEC 220 Digital Circuit Design Introduction to VHDL Friday, February 21 CEC 220 Digital Circuit Design Slide 1 of 10.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
Introduction To VHDL 홍 원 의.
Basic Language Concepts
Design Entry: Schematic Capture and VHDL
VHDL Basics.
Chapter 2. Introduction To VHDL
Hardware Descriptive Languages these notes are taken from Mano’s book
Behavioral Modeling in Verilog
CHAPTER 10 Introduction to VHDL
VHDL VHSIC Hardware Description Language VHSIC
ECE 434 Advanced Digital System L9
Introduction to Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
COE 202 Introduction to Verilog
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

LECTURE 6 In this lecture we will introduce: The VHDL Language and its benefits. The VHDL entity Concurrent and Sequential constructs Structural design. Hierarchy Packages Various architectures Examples

Digital Systems Digital system/circuit is any configuration of a circuit or System that processes or stores digital information. VHDL is a language that is developed specifically to model any digital system. Synthesis using tools/packages to analyze a circuit, enhance the design and transform it in a form that is downloadable in ASICs/FPGA and thus accelerating prototyping. The VHDL model is interpreted by software tools in such a way as to create actual digital circuits.

C-Based Hardware Design PC with C++ Application Implements Designs to Hardware Design and simulate at system level using C-based programming language such as Handel-C Need libraries that provide interface drivers including audio and video packages Need FPGA prototyping board, with variety of interfaces References: James Miller, Newsletter on Canadian’s System-On-Chip research Network, March 20, 2007, Vol. 5, No.1

Design Kit Output Targets Target a variety of FPGA’s Or convert Handel-C to: VHDL Verilog EDIF System C The output of the design kit can be down loaded to a variety of FPGAs or if you require some modification it can convert the Handel-C to other Forms such as VHDL…. Documentation and working Examples: https://www2.cmc.ca:ca/

Implementation is vendor English Prose Design Specification Transfer Function, Boolean Equations, Flow Graphs, Pseudo Codes Modeling the behavior VHDL Data Path Computational Units,Registers, Buses Logic Design Flip Flops, Gates, Netlist Transistors, Wires Masks Manufacturing Implementation is vendor dependent Netlist, ASCII text describing gates or library modules and their interconnection ASIC FPGA

VHDL Code of the Design Vendor’s Library VHDL Code of Test Design Verification Simulation Engine Synthesis is the use of software packages to automatically verify and translate the VHDL code into a targeted device, using embedded optimising methods and meeting all the design constraint. Synthesis is the process of interpreting the VHDL code and output the physical implementation of the circuit to be implemented on ASIC or programmed in an FPGA

FPGA Design Flow For Xilinx Virtex XCV50

Verilog Example // Description of a simple circuit . x B C y e   // Description of a simple circuit . module circuit_1 (A,B, C, x,y); input A,B,C; wire e; output x,y; and g1(e,A,B); not g2 (x,C); or g3(y,x,e); endmodule; x

//CMOS inverter module inverter (OUT, IN); input IN; output OUT; supply1 PWR; supply0 GND; pmos ( OUT, PWR, IN); // (Drain, Source, Gate) nmos (OUT, GND, IN); // (Drain, Source, Gate) end module   GND OUT PW R IN

For transmission gate the keyword cmos is used. cmos (output, input, ncontrol, pcontrol); // general description. For example for the transmission gate shown in the Figure below   cmos (Y,X,N,P);   x Y N P

The VHDL Language VHDL is a computer language with the set of syntax and usage rules. It is primarily used to describe hard ware and is a concurrent language. Introduced in 1985, standardized in 1987 modified in 1993. It is used mainly as a specification and modeling language for digital systems . It is also used as an intermediate form of design entry for many different tools It is also a simulation and verification language.

The Language VHDL is supported by DoD and most manufacturers. Technology Portable It is not yet standardized for synthesis. It has major applications in Rapid prototyping

VHDL DESIGN UNITS Entity Declaration Gives the interface view of the unit. Implementation Independent Architecture Describes the implementation(s) of the entity Package Declaration Contains global information common to many design units. Configuration Relates the design references to the designs saved in the library

BASIC CONSTRUCT entity OR_2 is -Input/output ports port -Interface entity OR_2 is -Input/output ports port (A, B : in BIT; Z : out BIT); end OR_2 ; --Body architecture DATA_FLOW of OR_2 is begin Z <= A or B; -- a construct statement implementing the OR gate end DATA_FLOW; Interface is responsible for defining the black box’s name, input and output Interface Body Body is responsible for describing the function that transforms the inputs to the outputs

Entity Organization Entity Interface Identifier, Generic constants, Port, Local types, signals…….. Architecture I Declarative Parts, Local signals, constants, types Concurrent statements Architecture n Declarative Parts, Local signals, constants, types Concurrent statements

Tutorials at http://www.encs.concordia.ca/helpdesk/resource/tutorial.html  

VHDL reserved words: They are identifiers reserved in the VHDL language for a special purpose. They cannot be used as explicitly declared identifiers. access after alias all and architecture array assert attribute begin abs block body buffer bus case component configuration constant disconnect downto else elsif end entity exit file for function generate generic guarded if in inout is label library linkage loop map mod new next nor not null of on open or others out package port procedure process range record register rem report return select severity signal subtype then to tansport type units until use variable wait when with xor

**VHDL is not case sensetive** Additional reserved keywords in VHDL-93 impure group inertia postponed pure literal reject rol ror shared sla sll sra srl unaffected xnor **All RESERVE WORDS ARE CASE INSENSETIVE** example: x_out <=A or B; X_Out<= a Or b; are acceptable statements **VHDL is not case sensetive**

--List of reserved operators = /= := < <= > >= + - * / ** & Equality operator Inequality operator The assignment operator for variables The “less than” operator “less than or equal to” when used in an expression on scalar types & array The assignment operator The “greater than” operator The “greater than or equal to” operator The addition operator The subtraction operator The multiplication operator The division operator The exponentiation operator The concatenation operator

Some notices VHDL is case in-sensative. Example: Z <=X and Y; are the same. VHDL is not sensitive to white spaces and tabs. Example: Z<= X and Y;  are the same. Parentheses used to clarify precedence. Example if x ='0'and y ='0'or z ='1' then statement if ( ((x ='0') and (y ='0')) or (z ='1') ) then

The Interface entity OR_2 is -- Input/output ports port keywords (reserved words) entity OR_2 is -- Input/output ports port (A, B : in BIT; Z : out BIT); end OR_2 ; the header name of the design (identifier) comment line Port declaration type type identifier optional terminates statements entity declaration

Identifiers Extended identifiers Case insensitive Characters can only be: First character must be a letter Last character must not be an underscore No adjacent underscores Make identifiers meaningful: Example My_COEN_6501_Project, OUT_1 Extended identifiers Any length Must be delimited by \ \ leading & trailing backslashes All graphic characters Within backslashes any characters in any order can appear (exception is backslash which has to appear in pair) Is case sensitive: An extended identifier is different from any keyword or basic identifier a – z A – Z 0 – 9 _ (underscore)

Port declaration port (A, B : in BIT; Z : out BIT); End of Reserved word port (A, B : in BIT; Z : out BIT); Predefined types Value of ‘0’ or ‘1’ End of Beginning of Keywords can be in out inout linkage buffer Information on direction of flow Any legal identifier Is a tri-state and bidirectional Is similar to out but is available within the architecture The VHDL compiler allows several port names to be included on a single line. Port names are separated by commas.

--Fundamental Data Types Values Example Bit Bit_vector Boolean Integer Real Time Character String ‘1’, ‘0’ (array of bits) True, False -20, 0, 1, 5090… 200.0, -2.0E2 10 us, 7 ns, 150 ps ‘c’, ‘z’, ‘5’, ‘#’, etc. (Array of characters) Q <= ‘1’; BYTE <= “00010101”; flag <= True; ACC <= ACC + 2; C1 = V2 * 5.3; output <= ‘0’ after 2 ns; DataOut <= ‘Y’; ADD <= “MEM” ;

The Body architecture DATA_FLOW of OR_2 is begin Z <= A or B ; Name of the architecture any legal identifier Association of architecture architecture DATA_FLOW of OR_2 is header header begin declaration part Z <= A or B ; Statement Part end DATA_FLOW ; Closes architecture Body declaration (architecture) optional

The operators Z <= A or B ; Signal assignment statement Logical operator Z <= A or B ; End of assignment do not forget the ; Assignment operator Signal assignment statement and or xor xnor nand nor not Other operators: *** “Anytime the input signal A and or B changes value the signal assignment statement executes and computes a new value for the output signal.” This is called “Signal Transformation.”

Concurrency Reserved word Concurrent assignment statement -- Interface ………… 1 entity XOR_2 is ……………… 2 Port ……………… .3 (A,B : in BIT; Z : out BIT); …………… 4 end XOR_2; ……………… 5 -- Body ………… …6 architecture DATA_FLOW of XOR_2 is …7 signal Sig 1, Sig 2: BIT; ……… 8 begin ………………9 Sig 1 <= A and not B; …………… ..10 Sig 2 <= B and not A; ………………11 Z <=Sig1 or Sig 2; ……………12 end DATA_FLOW; ……………13 Reserved word Signal Declaration Concurrent assignment statement

Modeling method Structural (A description of the entity by components instantiation) Behavioral Algorithmic (A description of the entity by the sequential statements) Data Flow ( A description of the entity by the use of concurrent statements) Mixed

Structural Synthesis behavioral Synthesis A C A C B B D D MUX MUX B B D D if t=0, then D<=0 else D<=DATA; CLK Control CLK Control

Configuration Statement It is used to bind the entity used with the architecture that is desired. Example: for all : OR_2 use entity OR_2 (data_Flow)

Libraries (Predefined) STD Provides declarations for predefined constructs in VHDL. WORK The working library into which design units are presently being analyzed are stored. (ie. design entities).

Libraries The design entities can be stored in libraries Libraries and their storage and implementation are achieved outside VHDL. VHDL is only the language that facilitates the usage of the libraries and its contents ie., the design entities. Any VHDL entity that can be analyzed is a COMPLETE DESIGN ENTITY * analysis means checking the syntax and symantic of a design entity statically. * simulate means checking the behaviour of the modelled entity dynamically. * There are two pre-defined libraries in VHDL: STD The standard IEEE library that holds many predefined types such as BIT. Many of these types are used almost like a reserved word because they are already predefined in the STD library. WORK This is the working library, where we store our currently analysed design entities

Standard Libraries The VHDL language has some standard libraries such as the IEEE Standard 1164 pack-age as well as some extentions. To take advantage of the main implementable feature of VHDL you need to import two main library packages Example: -- library declaration library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std. all;  There are other IEEE libraries, but they are not standardized, that you may use:

Structural Modeling Real Life Design and Implementation Structural modeling is the description of set of interconnected components that are previously defined, compiled and verified. Real Life Design and Implementation Design the board Design the chips Place sockets on the board Put the chips in the socket That is exactly how VHDL operates Design an entity that is the board Design the entities that are the chips You have components that are the sockets Design entities are put in the socket A VHDL STRUCTURAL Model interconnects the instances of chip sockets holding the chips.

architecture STRUCTURAL of CARRY is --Interface entity CARRY is port (A_IN, B_IN, C_IN : in BIT; C_OUT : out BIT); end CARRY; --Body architecture STRUCTURAL of CARRY is -Declaration of components component AND_2 port (A, B : in BIT ; Z : out BIT); end component ; component OR_3 port (A, B, C : in BIT ; Z : out BIT); end component; --Declare Signals signal TEMP1, TEMP2, TEMP3 : BIT ; begin -Connect Logic Operators to Describe Schematic A1: AND_2 port map (A_IN, B_IN, TEMP1) ; A2: AND_2 port map (A_IN, C_IN, TEMP2) ; A3: AND_2 port map (B_IN, C_IN, TEMP3) ; O3: OR_3 port map (TEMP1, TEMP2, TEMP3, C_OUT) ; end STRUCTURAL ; A_IN B_IN A_IN C_IN B_IN C_IN A1 A2 A3 TEMP1 TEMP2 TEMP3 OR1 C_OUT

DATA_FLOW CONSTRUCTS entity FULL_ADDER is port (A_IN,B_IN,C_IN : in BIT; SUM, CARRY : out BIT); end FULL_ADDER;   architecture DATA_FLOW of FULL_ADDER is signal S1,S2,S3: BIT; begin S1 <= A_IN xor B_IN; SUM <= S1 xor C_IN; S2 <= S1 and C_IN; S3 <= A_IN and B_IN; CARRY <= S2 or S3; end DATA_FLOW;

AND Gate simulation

Passgate simulation

library ieee; use ieee.std_logic_1164.all; entity Full_Adder is -- generic (TS : TIME := 0.11 ns; TC : TIME := 0.1 ns); port (X, Y, Cin: in std_logic; Cout, Sum: out std_logic); end Full_Adder; architecture Concurrent of Full_Adder is begin Sum <= X xor Y xor Cin after 0.11 ns ; Cout <= (X and Y) or (X and Cin) or (Y and Cin) after 0.11 ns; end Concurrent;