Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.

Slides:



Advertisements
Similar presentations
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Advertisements

Verilog Intro: Part 1.
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.
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.
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.
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.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
Topics of Lecture Structural Model Procedures Functions Overloading.
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.
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 Training ©1995 Cypress Semiconductor 1 Introduction  VHDL is used to:  document circuits  simulate circuits  synthesize design descriptions 
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.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
IAY 0600 Digital Systems Design
CSET 4650 Field Programmable Logic Devices Dan Solarek Introduction to VHDL An Overview / Review.
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
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
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
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.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
(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 &
L13 – VHDL Language Elements. VHDL Language Elements  Elements needed for FPGA design Types  Basic Types  Resolved Types – special attributes of resolved.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
1 Verilog Digital System Design Z. Navabi, 2006 Verilog Language Concepts.
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)
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 (
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.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Sequential Logic Design.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
Text-books 1. Digital System Design using VHDL by C.H. Roth. 2. Circuit Design with VHDL by Volnei A. Pedroni; Reference Book 1. VHDL Primer by J. Bhasker;
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Introduction To VHDL 홍 원 의.
VHDL Basics.
Chapter 2. Introduction To VHDL
Behavioral Modeling in Verilog
CHAPTER 10 Introduction to VHDL
OPERATORS and CONCURRENT STATEMENTS
ECE 434 Advanced Digital System L9
CPE 528: Lecture #4 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CPE/EE 422/522 Advanced Logic Design L11
ECE 434 Advanced Digital System L10
VHDL Discussion Subprograms
VHDL Discussion Subprograms
VHDL Data Types Module F3.1.
Design units Lecture 2.
COE 202 Introduction to Verilog
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more characters upper case, lower case, digit, underscore first character must be a letter, last character must NOT be an underscore Two underscores cannot occur concurrently case insensitive: COUNT, count, Count, counT are all the same –extended identifier: sequence of characters written between two backslashes Any printable characters can be used including %, $, *, etc. lower case and upper case are distinct examples: \2FOR$\, \countNow!\, –Keywords can not be used as basic identifiers

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Data Objects – hold a value of a specified type –constant: holds a single value of a specified type and cannot be changed throughout the simulation –constant declaration: constant RESULT: BIT:=1; constant FALL_TIME: TIME:=10ns –variable: holds a single value of a specified type but can be changed throughout the simulation variable ABAR:BIT; variable STATUS:BIT_VECTOR(3 downto 0); –signal: holds a list of values including current value and a list of possible future values typically used to model wires and flip-flops signal DATA_BUS:BIT_VECTOR(0 to 31) –file: same as with any computer file, contains data

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Not all objects are created using the declarations  Ports of an entity are automatically signal objects  Generics of an entity are constant objects  Formal parameters of functions and procedures are objects  A “for” loop variable is an object for COUNT in 1 to 8 loop SUM:=SUM+COUNT; end loop;

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Data Types – specifies the constraints on values held by an object and the kind of value it is  There are pre-defined types such as: –INTEGER (2 31 –1 to –2 31 ) –BOOLEAN (true, false) –BIT (0, 1)  There can also be user-defined types and subtypes  There are several categories of types including scalar, composite, access, and file types –We’ll focus on the scalar and composite  A subtype is a type with a (possibly) added constraint –subtype SPC_INTEGER is INTEGER range 5 to 15; –subtype HALF_BIT is BIT range 0 to 0; –subtype NUMBER is INTEGER; -- no extra constraints here

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Scalar types –Enumeration – defines a type that has a set of user-defined values type MY_VAL is (‘0’, ‘1’, ‘2’, ‘3’); type LOGIC is (AND, OR, NOT, XOR); Example declaration: variable AIN:LOGIC; –Integer – values fall within the specified integer range type REG_SIZE is range 0 to 31 subtype WORD is REG_SIZE range 0 to 15 –Floating Point – decimal types –Physical – represent measurement of some physical quantity like time, voltage, or current

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Composite Types – a collection of values –Array Types – collection of values all belonging to a single type BIT_VECTOR and STRING are pre-defined one-dimensional array types type DATA_BYTE is array (0 to 7) of BIT; type MEMORY is array (0 to 127) of DATA_BYTE; –Record Types – collection of values that may belong to different types –Similar to a “struct” declaration in C type MODULE is record SUM:BIT_VECTOR(0 to 7); COUT:BIT; end record

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Operators –logical operators and, or, nand, nor, xor, xnor, not –relational operators, =, =, /= -- /= means not equal to –shift operators logical shift left, logical shift right, arithmetic shift left, arithmetic shift right, rotate left, rotate right sll, srl, sla, sra, rol, ror –adding operators +, -, &-- & is concatenation –multiplying operators *, /, mod, rem –miscellaneous operators abs, **-- ** is exponentiation

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  Entity declarations specify the entity name, the names of the interface ports, their mode (direction), and the type of ports  There are several modes, we’ve seen two so far –in – can only be read within entity model –out – can only be written within entity model –inout – can be read and written within entity model –buffer – can be read and updated, it cannot have more than one source, can also be connected to another buffer we will not need it –linkage – can be read and updated – used to interface with foreign language models we will not need it

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  The architecture body describes the internal view of the entity  Concurrent statements describe internal composition of entity

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  The process statement contains sequential statements that describe the functionality of an entity in sequential terms  The sensitivity list is a set of signals which will cause the process to execute in sequential order when an event occurs

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  The process then suspends and waits for another event to occur  The process statement itself can execute concurrently with other concurrent statements, but internally, it executes sequentially  The variable gets initialized to –1, then incremented to zero  Any time an event occurs on A, this process is executed process(A) variable EVENTS_ON_A:INTEGER:=-1; begin EVENTS_ON_A:= EVENTS_ON_A+1; end process

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  Another example

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  A signal assignment statement can appear within or outside of a process –If outside a process, it is concurrent with the process statement –Within the process, it is sequential  When executed, the expression on the right side of the assignment is evaluated at that time, not after any specified delay, then assigned to the signal after any specified delay

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  Wait Statement – a alternate way to suspend a process  3 forms of the wait statement  Can be done in a single wait statement  Examples

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  Another example using the wait statement, this time in a process without a sensitivity list  Must have a sensitivity list or a wait statement, but NOT both

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  if statement – selects statements for execution based upon a condition

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  2-input NOR gate done with if statements

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  case statement – selects one branch of execution from a list of many based upon expression

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  case statement

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  Null statement – it does nothing, sometimes may need to specify that nothing is to be done

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  loop statement – used to iterate through a set of sequential statements  Several types of loops used in examples below

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  exit statement – used to jump out of a loop, cannot be used except inside a loop

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  next statement – can only be used inside a loop and begins execution back at the beginning of the loop

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  assertion statement – used for modeling constraints of an entity

Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Behavioral Modeling  report statement – can be used to generate a message  Example: –report “This circuit does not work”