VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.

Slides:



Advertisements
Similar presentations
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Advertisements

INTRO TO VHDL Appendix A: page page VHDL is an IEEE and ANSI standard. VHDL stands for Very High Speed IC hardware description language.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
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.
History TTL-logic PAL (Programmable Array Logic)
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
Introduction to VHDL (Lecture #5) ECE 331 – Digital System Design The slides included herein were taken from the materials accompanying Fundamentals of.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
Sequential Statements Module F3.2. Sequential Statements Statements executed sequentially within a process If Statements Case Statements Loop Statements.
02/02/20091 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
VHDL Data Types Module F3.1. VHDL Data Types Scalar Integer Enumerated Real (floating point)* Physical* Composite Array Record Access (pointers)* * Not.
ECE C03 Lecture 18ECE C03 Lecture 61 Lecture 18 VHDL Modeling of Sequential Machines Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
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.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
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.
VHDL And Synthesis Review. VHDL In Detail Things that we will look at: –Port and Types –Arithmetic Operators –Design styles for Synthesis.
Programming in VHDL Using Processes. How Processes Run A process is either in suspend mode or is running. For a process to run, there has to be a change.
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.
VHDL Asutosh Kar Asst. Prof. in IIIT, Bhubaneswar.
Fall 08, Oct 29ELEC Lecture 7 (updated) 1 Lecture 7: VHDL - Introduction ELEC 2200: Digital Logic Circuits Nitin Yogi
Introduction to VHDL (part 2)
1 Data Object Object Types A VHDL object consists of one of the following: –Signal, Which represents interconnection wires that connect component instantiation.
VHDL 9/12/2015www.noteshit.com1. What is VHDL? A Standard Language VHDL is the VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
1 Part I: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
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.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
1 CAD for VLSI Tutorial #1 VHDL - Very High Speed Integrated Circuit (VHSIC) Hardware Description Language.
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.
Packages and Use Clauses Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
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.
HARDWARE DESCRIPTION LANGUAGE (HDL). What is HDL? A type of programming language for sampling and modeling of electronic & logic circuit designs It can.
Topic 3: VHDL José Nelson Amaral Paul Berube Paras Mehta
Topics AliasesSubprograms Generics & Configurations.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
VHDL Basics. VHDL BASICS 2 OUTLINE –Component model –Code model –Entity –Architecture –Identifiers and objects –Operations for relations VHDL ET062G &
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.
15-Dec-15EE5141 Chapter 4 Sequential Statements ä Variable assignment statement ä Signal assignment statement ä If statement ä Case statement ä Loop statement.
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.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
8-Jan-16EE5141 Chapter 6 Subprograms & Packages Subprogram declaration Subprogram body Package declaration Package body Resolution function Subprogram.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
BASIC VHDL LANGUAGE ELEMENTS Digital Design for Instrumentation with VHDL 1.
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.
VHDL Programming Fundamentals Presented By Dr. Pradyut Kumar Biswal Department of Electronics, IIIT Bhubaneswar.
Relational Operators Result is boolean: greater than (>) less than (=) less than or equal to (
Signals & Data-typesVer 1.1, Copyright 1997, TS, Inc. VHDL S i g n a l s & D a t a T y p e s Page 1.
VHDL Tutorial.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Introduction To VHDL 홍 원 의.
Basic Language Concepts
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Chapter 2. Introduction To VHDL
CHAPTER 10 Introduction to VHDL
Sequential Statements
ELEC 5200/6200 Computer Architecture and Design Review of VHDL
VHDL Data Types Module F3.1.
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011

Introduction VHDL Texas Instrument intermetrics IBM Under US department of Defense order for High speed ICs Shiraz University of shiraz spring 2011

Introduction  VHDL is a language for  Simulation  Synthesis  Documentation of complex digital systems. Shiraz University of shiraz spring 2011

VHDL Standards  IEEE std  The latest language reference manual  Not much different from 1993  IEEE std  Most tools uses it.  Used in this tutorial  IEEE std  Old standard, almost obsolete. Shiraz University of shiraz spring 2011

VHDL/FPGA Design Flow Shiraz University of shiraz spring 2011

Design Entity  A component or a system to be designed is a VHDL “design entity ”  VHDL divides entities into two parts:  External (interface): how it connects to other components  Internal (architecture): how it behaves and how it is implemented  Behavioral  Structural  Hybrid Shiraz University of shiraz spring 2011

Design Entity Shiraz University of shiraz spring 2011

Example Shiraz University of shiraz spring 2011

Example(cont’d) Shiraz University of shiraz spring 2011

Example(cont’d) Shiraz University of shiraz spring 2011

Example(cont’d) Shiraz University of shiraz spring 2011

Example(cont’d) Shiraz University of shiraz spring 2011

VHDL Construct  Entity definition  Architecture definition  Configuration  Process  Subprogram  Package  A VHDL design can be broken into multiple files. Each file contains entity and architecture definitions, or packages. Shiraz University of shiraz spring 2011

Expressions  An expression is a formula that specifies how to compute a value.  Example (D**3) + ((A*B) mod 2)  VHDL operators: Shiraz University of shiraz spring 2011

Defining scalar types  Syntax: Type identifier is range expression {to|downto} expression; Type identifier is ( list_of_items ); Subtype identifier is type_name range expression {to|downto} expression;  Example Type opcode is (nop,load,store,add,subtract,negate,branch,halt); Type system_state is (unknown, idle, busy, ready); Type bit is (‘0’, ‘1’); Type boolean is (false,true); Type std ulogic is (‘U’, ‘X’, ‘0’, ‘1’, ‘Z’, ‘W’, ‘L’, ‘H’, ‘-’); Subtype small_int is integer range –128 to 127; Subtype bit_index is integer range 31 downto 0; Type frequency is range 0 to 1e15 Units hz; khz=1000 hz; mhz=1000 khz; ghz=1000 mhz; End units; Shiraz University of shiraz spring 2011

arrays  An array is an ordered collection of elements of the same type.  Two types of array can be defined  Constrained arrays:  Type word is array (0 to 15) of bit;  Type byte is array (7 downto 0) of bit;  Type ram is array (0 to 16#FFFF#) of byte;  Type int array is array (1 to 100) of integer ;  Unconstrained arrays  Type bit_vector is array (natural range <>) of bit;  Type string is array (positive range <>) of character;  Type std_ulogic_vector is array (natural range <>) of std_ulogic Shiraz University of shiraz spring 2011

Array Elements & slices  Example: Variable B : bit_vector(7 downto 0); Shiraz University of shiraz spring 2011

Array operations  Shift, rotate and concatenate examples Shiraz University of shiraz spring 2011

Simulation Example Shiraz University of shiraz spring 2011

VHDL Statements VHDL has two kinds of statements  Sequential statements: they are executed one after another, like C or Pascal.  Signal and variable assignments, flow control constructs (if, case,while, loop, …), subprogram call, wait  Concurrent statements: all are executed at the same time.  Processes, block statements, component instantiations, generate statements, concurrent assignments and concurrent procedures Shiraz University of shiraz spring 2011

Syntax  Entity : entity entity_name is [ generic (generic_declarations); ] [ port (port_declarations); ] end [entity] [entity_name];  Generic : generic ( [constant_name : type [:=value]] { ; constant_name : type [:=value] } );  Port : port ( [ port_name : port_mode type { ; port_name : port_mode type } ] ); Shiraz University of shiraz spring 2011

Syntax Port Modes:  In : port can only be read  Out : port can only be assigned  Inout : Can be read and assigned a value. The value read is not the assigned value.  Buffer : Similar to out, but can be read Shiraz University of shiraz spring 2011

Syntax  Architecture architecture architecture_name of entity_name is { declarative_item } begin { concurrent_statement } end [architecture_name];  A declarative item can be any of these:  Use clause  Subprogram declaration and body  Type or subtype declaration  Constant declaration  Signal declaration  Component declaration Shiraz University of shiraz spring 2011

Syntax  Process [label:] process [( sensitivity_list )] { process_declarative_item } begin { sequential_statement } end process ;  The sensitivity list is a list of signals read by the process.  The process declarative items can include :  Use clause  Subprogram declaration and body  Variable and constant declaration  Type and subtype declaration Shiraz University of shiraz spring 2011

Signlas  “Signals” carry information among processes and components in an architecture.  Signal declaration syntax signal signal_name : signal_type [:=expression]; signal address : bit_vector(31 downto 0); signal mem_read : bit := ‘0’;  Signal assignment syntax [Label:] signal_name <= value [after time_expression] address <= x”18FE5900” after 20 ns; mem_read <= ‘1’; data_reg <= ”1101_0010”; Shiraz University of shiraz spring 2011

Example Shiraz University of shiraz spring 2011

Array Attributes Shiraz University of shiraz spring 2011

Wait Statement  Wait causes a process to wait for an event  Syntax wait [on signal_name {,signal_name}]; wait [until boolean_expression]; wait [for time_expression];  Example wait on a,b; wait until clk=‘1’ and clk’event; wait for 100 us; wait; Shiraz University of shiraz spring 2011

Wait Statement Shiraz University of shiraz spring 2011

if Statement  Syntax [label]: if boolean_expression then {sequential_statement} elsif boolean_expression then {sequential_statement} [else {sequential_statement} ] end if [lable]; Shiraz University of shiraz spring 2011

Example Shiraz University of shiraz spring 2011

Case Statement  Syntax [Label:] case expression is { when choice => {sequential_statement} } end case [label]; Shiraz University of shiraz spring 2011

Example Shiraz University of shiraz spring 2011

Loop, While & For Statement  Syntax [label:] loop {sequential_statement} end loop [label];  Syntax [label:] while condition loop {sequential_statement} end loop [label];  Syntax [label:] for identifier in discrete_range loop {sequential_statement} end loop [label]; Shiraz University of shiraz spring 2011

Example Shiraz University of shiraz spring 2011

Next, Exit, Null  Syntax [label:] next [when boolean_expression]; [label:] exit [when boolean_expression]; [label:] null; Shiraz University of shiraz spring 2011

Example Shiraz University of shiraz spring 2011

Concurrent Signal Assignment  Conditional signal assignment [label:] Signal_name <= { value when boolean_expression else } value [when boolean_expression];  Selected signal assignment [label:] with expression select signal_name <= { value when choices} value when choices; Shiraz University of shiraz spring 2011

Example Shiraz University of shiraz spring 2011

Subprograms  Procedures  Generalize a statement  Encapsulate a collection of sequential statements that are executed for their effect  Functions  Generalize an expression  Encapsulate a collection of sequential statements thatcompute a result Shiraz University of shiraz spring 2011

Procedures  Syntax procedure identifier [ ( parameter_list ) ] is { declarations } begin { sequential statements } end [procedure]; Shiraz University of shiraz spring 2011

Example 1 Shiraz University of shiraz spring 2011

Example 2 Shiraz University of shiraz spring 2011

Example 3 Shiraz University of shiraz spring 2011

Functions  Syntax [pure|impure] function identifier [ ( parameter_list ) ] return type_name is { declarations } begin { sequential statements } end [function] [identifier]; Shiraz University of shiraz spring 2011

Example Shiraz University of shiraz spring 2012

IEEE Std_Logic  Multivalued logic:  ‘U’ : Uninitialized  ‘X’ : Forcing Unknown  ‘0’ : Forcing Zero  ‘1’ : Forcing One  ‘Z’ : High Impedance  ‘W’ : Weak Unknown  ‘L’ : Weak Zero  ‘H’ : Weak High  ‘-’ : Don’t care  type std_ulogic is ('U', 'X', '0', '1', 'Z', 'W', 'L', 'H', '-');  type std_ulogic_vector is array ( natural range <> ) of std_ulogic; Shiraz University of shiraz spring 2012

IEEE Std_Logic  Std_logic Resolution Table Shiraz University of shiraz spring 2012

State Machine  Finite State Machines:  Moore  Mealy Shiraz University of shiraz spring 2012

State Machine Example 1  Moore Shiraz University of shiraz spring 2012

State Machine Example 1  Moore Shiraz University of shiraz spring 2012

State Machine Example 2  Mealy Shiraz University of shiraz spring 2012

State Machine Example 2  Mealy Shiraz University of shiraz spring 2012