Introduction To VHDL 2002. 12. 27 홍 원 의.

Slides:



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

Verilog Intro: Part 1.
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.
SubprogramsSubprograms. SubprogramsSubprograms ä Similar to subprograms found in other languages ä Allow repeatedly used code to be referenced multiple.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
Topics of Lecture Structural Model Procedures Functions Overloading.
HDL-Based Digital Design Part I: Introduction to VHDL (I) Dr. Yingtao Jiang Department Electrical and Computer Engineering University of Nevada Las Vegas.
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)
VHDL Training ©1995 Cypress Semiconductor 1 Introduction  VHDL is used to:  document circuits  simulate circuits  synthesize design descriptions 
CPE 626 Advanced VLSI Design Lecture 3: VHDL Recapitulation Aleksandar Milenkovic
ECE 2372 Modern Digital System Design
VHDL – Dataflow and Structural Modeling and Testbenches ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering.
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
Basic VHDL RASSP Education & Facilitation Module 10 Version 2.02 Copyright  RASSP E&F All rights reserved. This information is copyrighted by.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
CPE 626 Advanced VLSI Design Lecture 4: VHDL Recapitulation (Part 2) Aleksandar Milenkovic
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.
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
VHDL Basics. VHDL BASICS 2 OUTLINE –Component model –Code model –Entity –Architecture –Identifiers and objects –Operations for relations VHDL ET062G &
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)
BASIC VHDL LANGUAGE ELEMENTS Digital Design for Instrumentation with VHDL 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.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Sequential Logic Design.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
1 CS 352 Introduction to Logic Design Lecture 5 Ahmed Ezzat Multiplexers, Decoders, Programmable Logic Devices, and Intro to VHDL Ch-9 + Ch-10.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
Structural Description
Basic Language Concepts
Design Entry: Schematic Capture and VHDL
Operators Assignment Operators Logical Operators Relational Operators
VHDL Basics.
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Chapter 2. Introduction To VHDL
Behavioral Modeling in Verilog
CPE 626 Advanced VLSI Design Lecture 2: VHDL Recapitulation Aleksandar Milenkovic
ECE 434 Advanced Digital System L17
CPE/EE 422/522 Advanced Logic Design L06
ECE 434 Advanced Digital System L08
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 L08
CPE/EE 422/522 Advanced Logic Design L07
CPE/EE 422/522 Advanced Logic Design L11
ECE 434 Advanced Digital System L10
VHDL Discussion Subprograms
VHDL Discussion Subprograms
ECE 434 Advanced Digital System L11
VHDL Data Types Module F3.1.
© Copyright Joanne DeGroat, ECE, OSU
COE 202 Introduction to Verilog
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Introduction To VHDL 2002. 12. 27 홍 원 의

Contents General Basic Rule Combinational Logic Process Sequential Statements Simulation Variables, Signals, and Constants Data Type Arrays Operators Functions Procedures Packages and Libraries

General Digital system become more complex Competing to build cost-effective products as fast as possible Detailed design at gate & flip-flop level : tedious, time consuming → Using top-down design methodology (HDL, synthesis, …) → VHDL : logic & transistor level design → abstract programming Advantages shorter development cycles with more product feature and reduce time to market design reuse is enabled increased flexibility to design changes better and easier design auditing and verification

Basic Rule not case sensitive identifier rule : letters, numbers, underscore character (no space, start with a letter, not end with an underscore) command must end with semi-colon comment : -- Entity declaration : input, output Architecture body : internal behavior VHDL Program Structure Entity Architecture Entity Architecture Module 1 Entity Architecture Module 2 Entity Architecture Module N

Basic Rule entity entity-name is [ port (interface-signal-declaration); ] end [entity] [entity-name]; architecture architecture-name of entity-name is [declarations] begin architecture body end [architecture] [architecture-name]; Interface signal form: list-of-interface-signal : mode type [ := initial-value ] {; list-of-interface-signal : mode type [ := initial-value ] }

Combinational Logic A C C <= A and B after 5 ns; B E <= C or D after 5 ns; B E D VHDL signal assignments are concurrent statements when they are not in a process or block. The VHDL simulator monitors the right-hand side of each concurrent statement, and any time a signal changes, the expression on the right -hand side is immediately re-evaluated. The order of the preceding statements is unimportant. CLK <= not CLK after 10 ns; ( implicit loop )

Process a common way of modeling sequential logic in VHDL external : paralleled, internal : sequentially [label:] process [(sensitivity-list)] begin sequential-statements end process [label] ; difference in the way sequential and concurrent statements are executed concurrent Sequential (B,C,D) A <= B; B <= C; C <= D; Time delta A B C D 0 +0 1 2 3 0 10 +0 1 2 3 4 10 +1 1 2 4 4 10 +2 1 4 4 4 10 +3 4 4 4 4 Time delta A B C D 0 +0 1 2 3 0 10 +0 1 2 3 4 10 +1 2 3 4 4 10 +2 3 4 4 4 10 +3 4 4 4 4 A,B,C,D : signal A=1, B=2, C=3, D=0 D=1 @ T=10

Sequential Statements variable assignment case statement case expression is when choice1 => sequential statement1 when choice2 => sequential statement2 … [when others => sequential statements] end case; cf. conditional signal assignment (in concurrent statement) signal-name <= expression1 when condition1 else expression2 when condition2 … [else expressionN];

Sequential Statements if statement if condition then sequential statements {elsif condition then sequential statements} [else sequential statements] end if; wait statement wait on sensitivity-list : wait until sensitivity-list changes wait for time-expression wait until boolean-expression for loop [loop-label] for loop-index in range loop sequential statements end loop [loop-label]; exit; or exit when condition;

Simulation Example After elaboration: entity simulation_example is '0' A entity simulation_example is end simulation_example; architecture test1 of simulation_example is signal A, B : bit; begin P1: process(B) A <= '1'; A <= transport '0' after 5 ns; end process P1; P2: process(A) if A = '1' then B <= not B after 10 ns; end if; end process P2; end test1; time = 0 B After initialization: '0' @ 5 '1' @ ∆ '0' A time = 0 B Simulation step: '0' @ 5 '1' '1' @ 10 '0' A time = ∆ B '0' '1' @ 10 A time = 5 B '0' @ 15 '1'@ 10+∆ '0' '1' A time = 10 B '0' @ 15 '1' '0' @ 20 time = 10 + ∆ A B '0' '0' @ 20 '1' time = 15 A B

Variables, Signals, and Constants Signal : wiring, connecting component declared at the start of architecture can be used anywhere within architecture assignment ("S <= S0 after delay") Variable : temporary storage, has locality declared within process function, procedure assignment ("V := V0", immediately) Constant : declared at the start of architecture → anywhere within the architecture declared within a process → local to that process signal list_of_signal_names : type_name [ := initial_value ]; port (list_of_signal_names : mode type [ := initial_value ];) variable list_of_variable_names : type_name [ :=initial_value]; constant constant_name : type_name := constant_value;

Data Type Scalar Type Enumeration Type : bit, boolean, character Integer Type : integer ( -(231-1) ~ +(231-1) ) Float Type : real ( -1.0E38 ~ +1.0E38 ) Physical Type : time Composite Type Array Type : to, downto, bit_vector, string Record Type: record Access Type Access Type : access, new File Type File Type : file Subtype : allows the values to be constrained subset of some base type subtype identifier is subtype_indication; subtype natural is integer range 0 to highest_integer

Arrays type array_type_name is array index_range of element_type; signal array_name : array_type_name [ := initial_value ]; One-dimensional array type SHORT_WORD is array (15 downto 0) of bit; signal DATA_WORD : SHORT_WORD; Multi-dimensional array type matrix4x3 is array (1 to 4, 1 to 3) of integer; variable matrixA : matrix4x3 := ((1,2,3), (4,5,6), (7,8,9), (10,11,12)); Unconstrained type invec is array (natural range <>) of integer; signal invec5 : invec (1 to 5) := (3, 2, 6, 8, 1); Subtype type bit_vector is array (natural range <>) of bit subtype SHORT_WORD is bit_vector (15 downto 0);

Operators can be grouped into seven classes : Binary Logical Operators : and or nand nor xor xnor Ralational Operators : = /= < <= > >= Shift Operators : sll srl sla sra sra rol ror Adding Operators : + - &(concatenation) Unary Sign Operators : + - Multiplying Operators : * / mod rem Miscellaneous Operators : not abs ** Operators in class 7 have the highest precedence follow by class 6, then class 5, … Operators in the same class are applied from left to right in an expression. The precedence order can be changed by using parentheses.

Functions execute sequential algorithm and return a single value to calling program Function declaration : function function-name(formal-parameter-list) return return-type is [declarations] begin sequential statements -- must include return return_value end function-name Function call : function-name(actual-parameter-list)

Procedures facilitate decomposition of VHDL code into modules return any number of values using output parameters procedure declaration : procedure procedure_name(formal-parameter-list) is [declaration] begin sequential statements end procedure-name; procedure call : procedure_name(actual-parameter-list); formal-parameter-list [class] list-of-parameter : mode type; ※ If the class is omitted, constant is used as default. For a constant parameter, the actual parameter can be any expression.

Packages and Libraries provides a convenient way of referencing frequently used functions and components package declaration package package-name is package declarations end [package] [package-name]; type, signal, function, procedure, component declaration optional package body package body package-name is package body declaration end [package body] [package-name]; function, procedure body, entity-architecture library BITLIB; → allows to access the BITLIB; use BITLIB.bit_pack.all; → allows to use bit_pack package use BITLIB.bit_pack.Nand2; → allows to use a specific component or function in the package