(1) Identifiers, Data Types, and Operators © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.

Slides:



Advertisements
Similar presentations
VHDL in digital circuit synthesis (tutorial) dr inż. Miron Kłosowski EA 309
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.
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
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.
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
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.
VHDL Data Types Module F3.1. VHDL Data Types Scalar Integer Enumerated Real (floating point)* Physical* Composite Array Record Access (pointers)* * Not.
Data Types. Composite Date Types n Arrays –Single and multi-dimensional –Arrays are single Type n Records –Records are mixed types.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
1/31/20081 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
第6章 VHDL NUMBERS, STRINGS, AND EXPRESSIONS 義守大學電機工程學系 陳慶瀚
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 1 Microcomputer Systems Design (Embedded Systems)
1 H ardware D escription L anguages Basic Language Concepts.
Concordia University 1 Lecture #8 In this lecture we will cover the following material: The standard package, The std_logic_1164  Objects & data Types.
VHDL Training ©1995 Cypress Semiconductor 1 Introduction  VHDL is used to:  document circuits  simulate circuits  synthesize design descriptions 
George Mason University Modeling of Arithmetic Circuits ECE 545 Lecture 7.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
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.
10/17/2015DSD, USIT, GGSIPU1 Data Types Each data object has a type associated with it. The type defines the set of values that the object can have and.
Lecture 3 Chap 4 Types Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
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.
EE3A1 Computer Hardware and Digital Design Lecture 5 Testbenches and Memories in VHDL.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
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.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
INTRO TO VLSI DESIGN (CPE 448) (VHDL Tutorial ) Prof: Asuif Mahmood.
Topic 3: VHDL José Nelson Amaral Paul Berube Paras Mehta
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Utilities for High Level Description
L13 – VHDL Language Elements. VHDL Language Elements  Elements needed for FPGA design Types  Basic Types  Resolved Types – special attributes of resolved.
Lecture #7 Page 1 Lecture #7 Agenda 1.VHDL Data Types Announcements 1.n/a ECE 4110– Digital Logic Design.
9/4/ L6 Language Overview I Copyright 2006, Joanne DeGroat, ECE, OSU 1 Language Overview I The start of a grand tour of the language.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
Concordia University 1 Lecture #8 In this lecture we will cover the following material: The standard package, The std_logic_1164  Objects & data Types.
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.
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.
Digital System Design using VHDL
Scalar Data Types and Operations 大同大學 資訊工程系 副教授 鄭福炯
CEC 220 Digital Circuit Design Introduction to VHDL Friday, February 21 CEC 220 Digital Circuit Design Slide 1 of 10.
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.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Sequential Logic Design.
VHDL Tutorial.
13/06/59 1 Copyright  1997, KJH Introduction to VHDL Lecture 2 Prof. K. J. Hintz Department of Electrical and Computer Engineering George Mason University.
1 - CPRE 583 (Reconfigurable Computing): VHDL overview 1 Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 2: 8/26/2011 (VHDL Overview.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
Introduction To VHDL 홍 원 의.
Basic Language Concepts
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Design Entry: Schematic Capture and VHDL
Chapter 2. Introduction To VHDL
CPE 528: Session #7 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
ECE 448 Lab 1a Developing Effective Testbenches
ECE 434 Advanced Digital System L17
CHAPTER 10 Introduction to VHDL
ECE 434 Advanced Digital System L9
The start of a grand tour of the language.
Advanced FPGA Based System Design
ECE 434 Advanced Digital System L10
ECE 545 Lecture 5 Simple Testbenches.
VHDL Data Types Module F3.1.
Data Types Each data object has a type associated with it.
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

(1) Identifiers, Data Types, and Operators © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006

(2) Identifiers, Data Types, and Operators Identifiers –Basic identifiers: start with a letter, do not end with “_” –Case insensitive Data Objects –Signals –Constants –Variables –Files

(3) VHDL Standard Data Types TypeRange of valuesExample declaration integerimplementation definedsignal index: integer:= 0; realimplementation definedvariable val: real:= 1.0; boolean(TRUE, FALSE)variable test: boolean:=TRUE; characterdefined in package STANDARDvariable term: character:= bit0, 1signal In1: bit:= ‘0’; bit_vectorarray with each element of type bit variable PC: bit_vector(31 downto 0) timeimplementation definedvariable delay: time:= 25 ns; stringarray with each element of type character variable name : string(1 to 10) := “model name”; natural0 to the maximum integer value in the implementation variable index: natural:= 0; positive1 to the maximum integer value in the implementation variable index: positive:= 1;

(4) Data Types (cont.) Enumerated data types are particularly useful for constructing models of computing systems –Examples type instr_opcode is (‘add’, ‘sub’, ‘xor’, ‘nor’, ‘beq’, ‘lw’, ‘sw’); type state is (‘empty’, ‘half_full’, ‘half_empty’, ‘empty’); Array types type byte is array (7 downto 0) of std_logic; type word is array (31 downto 0) of std_logic; type memory is array (0 to 4095) of word;

(5) Physical Types type time is range units fs;-- femtoseconds ps = 1000 fs;-- picoseconds ns = 1000 ps;-- nanoseconds us = 1000 ns;-- microseconds ms = 1000 us;-- milliseconds s = 1000 ms;-- seconds min = 60 s;-- minutes hr = 60 min;-- hours end units ; type power is range 1 to units uw; -- base unit is microwatts mw = 1000 uw;-- milliwatts w = 1000 mw; -- watts kw = mw-- kilowatts mw = 1000 kw; -- megawatts end units ; In terms of base units

(6) Physical Types: Example entity inv_rc is generic (c_load: real:= 0.066E-12); -- farads port (i1 : in std_logic; o1: out: std_logic); constant rpu: real:= ; --ohms constant rpd: real := ; -- ohms end inv_rc; architecture delay of inv_rc is constant tplh: time := integer (rpu*c_load*1.0E15)*3 fs; constant tpll: time := integer (rpu*c_load*1.0E15)*3 fs; begin o1 <= ‘1’ after tplh when i1 = ‘0’ else ‘0’ after tpll when i1- = ‘1’ or i1 = ‘Z’ else ‘X’ after tplh; end delay; Example adapted from “VHDL: Analysis and Modeling of Digital Systems,” Z. Navabi, McGraw Hill, explicit type casting and range management

(7) Physical Types: Example (cont.) type capacitance is range 0 to 1E16 units ffr; -- femtofarads pfr = 1000 ffr; nfr = 1000 pfr; ufr = 1000 nfr mfr = 1000 ufr far = 1000 mfr; kfr = 1000 far; end units; type resistance is range 0 to 1E16 units l_o; -- milli-ohms ohms = 1000 l_o; k_o= 1000 ohms; m_o = 1000 k_o; g_o = 1000 m_o; end units; Rather than mapping the values to the real numbers, create new physical types Example adapted from “VHDL: Analysis and Modeling of Digital Systems,” Z. Navabi, McGraw Hill, 1998.

(8) Physical Types: Example (cont.) entity inv_rc is generic (c_load: capacitance := 66 ffr); -- farads port (i1 : in std_logic; o1: out: std_logic); constant rpu: resistance:= ohms; constant rpd : resistance := ohms; end inv_rc; architecture delay of inv_rc is constant tplh: time := (rpu/ 1 l_o)* (c_load/1 ffr) *3 fs/1000; constant tpll: time := (rpu/ 1 l_o)* (c_load/1 ffr) *3 fs/1000; begin o1 <= ‘1’ after tplh when i1 = ‘0’ else ‘0’ after tpll when i1 = ‘1’ or i1 = ‘Z’ else ‘X’ after tplh; end delay; Example adapted from “VHDL: Analysis and Modeling of Digital Systems,” Z. Navabi, McGraw Hill, Define a new overloaded multiplication operator rpu * c_load * 3 This expression now becomes

(9) Modeling with Physical Types Use packages to encapsulate type definitions, type conversions functions and arithmetic functions for new types Examples –Modeling power –Modeling silicon area –Modeling physical resources that are “cumulative”

(10) Operators VHDL ‘93 vs. VHDL ‘87 operators logical operatorsandornan d norxo r xnor relational operators=/=<<=>>= shift operatorssllsrlslasrarolror addition operators+–& unary operators+– multiplying operators*/modrem miscellaneous operators**absnot& VHDL text or language reference manual for less commonly used operators and types