! Initially developed under DOD auspices, later standardized as IEEE standards , , & (standard logic data type)

Similar documents
Concurrent & Sequential Stmts. (Review)

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Hardware Description Language VHDL (1) Introduction

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University

BASIC VHDL LANGUAGE ELEMENTS AND SEMANTICS. Lecture 7 & 8 Dr. Tayab Din Memon

IT T35 Digital system desigm y - ii /s - iii

Contents. Appendix D VHDL Summary Page 1 of 23

ELCT 501: Digital System Design

ECOM4311 Digital Systems Design

EEL 4783: Hardware/Software Co-design with FPGAs

Logic and Computer Design Fundamentals VHDL. Part 1 Chapter 4 Basics and Constructs

Lecture 1: VHDL Quick Start. Digital Systems Design. Fall 10, Dec 17 Lecture 1 1

!"#$%&&"'(')"*+"%,%-".#"'/"'.001$$"

Introduction to VHDL #1

CPE/EE 422/522. Chapter 8 - Additional Topics in VHDL. Dr. Rhonda Kay Gaede UAH. 8.1 Attributes - Signal Attributes that return a value

VHDL BASIC ELEMENTS INTRODUCTION

C-Based Hardware Design

ECE 545 Lecture 5. Data Flow Modeling in VHDL. George Mason University

VHDL Objects. Lecture 8: VHDL (2) Variables. VHDL Objects - Constant. Files. EE3109 Gopi K. Manne Fall 2007

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

EECE-4740/5740 Advanced VHDL and FPGA Design. Lecture 3 Concurrent and sequential statements

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

Very High Speed Integrated Circuit Har dware Description Language

Lecture 7. Summary of two-level combinational-logic. Ways of specifying circuits. Solving combinational design problems. Verilog versus VHDL

Outline. CPE/EE 422/522 Advanced Logic Design L07. Review: JK Flip-Flop Model. Review: VHDL Program Structure. Review: VHDL Models for a MUX

Review of Digital Design with VHDL

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden

Design units can NOT be split across different files

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

VHDL 3 BASIC OPERATORS AND ARCHITECTURE BODY. Design descriptions & design constructions examples are taken from foundation series examples

Digital Systems Design

ECE 3401 Lecture 10. More on VHDL

Introduction to VHDL

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 4 Introduction to VHDL

Performance Engineering of Real-Time and Embedded Systems. Introduction to VHDL

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog

Class 04 MUX / DMUX and Full Adder

Lecture 12 VHDL Synthesis

VHDL. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning

Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23

Lecture 4. VHDL Fundamentals. Required reading. Example: NAND Gate. Design Entity. Example VHDL Code. Design Entity

Hardware Modeling. VHDL Syntax. Vienna University of Technology Department of Computer Engineering ECS Group

Outline CPE 626. Advanced VLSI Design. Lecture 4: VHDL Recapitulation (Part 2) Signals. Variables. Constants. Variables vs.

Arithmetic Operators There are two types of operators: binary and unary Binary operators:

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

Lecture 4. VHDL Fundamentals. George Mason University

[1] Douglas L. Perry, VHDL, third edition, ISBN , McRaw- Hill Series on Computer Engineering.

Lecture 3 Introduction to VHDL

VHDL Part 2. What is on the agenda? Basic VHDL Constructs. Examples. Data types Objects Packages and libraries Attributes Predefined operators

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

ECEN 468 Advanced Logic Design

COE 405 Design Methodology Based on VHDL

ECE 545 Lecture 7. VHDL Description of Basic Combinational & Sequential Circuit Building Blocks. Required reading. Fixed Shifters & Rotators

Introduction to Verilog/System Verilog

5. VHDL - Introduction - 5. VHDL - Design flow - 5. VHDL - Entities and Architectures (1) - 5. VHDL - Entities and Architectures (2) -

CS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory

Introduction to VHDL. Main language concepts

HDL. Hardware Description Languages extensively used for:

Verilog. Reminder: Lab #1 due tonight! Fall 2008 Lecture 3

Verilog Design Principles

Declarations. Lexical elements. Type declaration Subtype declaration Constant declaration Signal declaration Variable declaration.

VHDL for FPGA Design. by : Mohamed Samy

310/ ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006

Introduction to VHDL #3

14:332:331. Computer Architecture and Assembly Language Fall Week 5

VHDL And Synthesis Review

5. 0 VHDL OPERATORS. The above classes are arranged in increasing priority when parentheses are not used.

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

Verilog. Verilog for Synthesis

Getting Started with VHDL

ENGIN 241 Digital Systems with Lab

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

Synthesizable Verilog

Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis. 26 October - 20 November, 2009

Embedded Systems CS - ES

Summary of basic structures

The process. Sensitivity lists

VHDL: skaitmeninių įtaisų projektavimo kalba. 2 paskaita Pradmenys

VHDL. Chapter 7. Behavioral Modeling. Outline. Behavioral Modeling. Process Statement

VHDL Packages for Synthesis Base Types Standard bit types may be used Typically IEEE 1164 Std. types are used. CPE 528: Session #9

Course Topics - Outline

CDA 4253 FPGA System Design Introduction to VHDL. Hao Zheng Dept of Comp Sci & Eng USF

Multi-valued Logic. Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized

JUNE, JULY 2013 Fundamentals of HDL (10EC45) PART A

Chap 6 - Introduction to HDL (b)

VHDL: RTL Synthesis Basics. 1 of 59

This Lecture. Some components (useful for the homework) Verilog HDL (will continue next lecture)

SRI SUKHMANI INSTITUTE OF ENGINEERING AND TECHNOLOGY, DERA BASSI (MOHALI)

Verilog Module 1 Introduction and Combinational Logic

Computer-Aided Digital System Design VHDL

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003

Synthesis of Combinational and Sequential Circuits with Verilog

Outline CPE 626. Advanced VLSI Design. Lecture 3: VHDL Recapitulation. Intro to VHDL. Intro to VHDL. Entity-Architecture Pair

Introduction to Verilog. Garrison W. Greenwood, Ph.D, P.E.

Digital Systems Design

Introduction To Verilog Design. Chun-Hung Chou

Transcription:

VHDL Introduction, Part I Figures in this lecture are from: Rapid Prototyping of Digital Systems, Second Edition James O. Hamblen & Michael D. Furman, Kluwer cademic Publishers, 2001, ISN 0-7923-7439-8 Dr. omputer Science Department Kent State University Kent, OH 44242 US http://www.cs.kent.edu/~walker VHDL History 2! VHDL = VHSI Hardware Description Language " VHSI = Very High Speed Integrated ircuits " oth US Department of Defense (DOD) programs! Initially developed under DOD auspices, later standardized as IEEE standards 1076-1987, 1076-1993, & 1076-1164 (standard logic data type)! Syntax similar to D and Pascal! concurrent language, initially aimed at simulation, later at synthesis " Specific subsets and cookbook design styles supported by logic and behavioral synthesis tools " Write code like this & you ll get this expected design

Signals, Time, and Simulation! Variables vs. signals " VHDL variables change value without delay " VHDL signals have an associated delay! signal is given a value at a specific point in time, and retains that value until it is given a new value " waveform is a sequence of values over time " Example: in1 <= 0, 1 after 5 ns, 0 after 15 ns; " variable has a single value, whereas a signal has multiple value / time pairs! discrete event simulator executes VHDL code by advancing time to the next event, updating signal values, then possibly scheduling new events 3 Simple Gate Network (Desired Hardware) X Y 4

Simple Gate Network (VHDL ode) LIRRY IEEE; -- Include Libraries for standard logic data types USE IEEE.STD_LOGI_1164.LL; -- Entity name normally the same as file name ENTITY gate_network IS -- Ports: Declares module inputs and outputs PORT(,, : IN STD_LOGI; -- Standard Logic Vector ( rray of 4 its ) D : IN STD_LOGI_VETOR( 3 DOWNTO 0 ); -- Output Signals X, Y : OUT STD_LOGI ); END gate_network; 5 -- Defines internal module architecture RHITETURE behavior OF gate_network IS EGIN -- oncurrent assignment statements operate in parallel -- selects bit 1 of standard logic vector D X <= ND NOT( OR ) ND ( D( 1 ) XOR D( 2 ) ); -- Process must declare a sensitivity list, -- In this case it is (,,, D ) -- List includes all signals that can change the outputs PROESS (,,, D ) EGIN -- Statements inside process execute sequentially Y <= ND NOT( OR ) ND ( D( 1) XOR D( 2 ) ); END PROESS; END behavior; VHDL Design Styles! VHDL was designed to support both behavioral and structural designs as various levels of abstraction " ehavioral description says what the design does, but not how it is implemented " Structural description specifies the interconnection of a set of components, but not what the components do " The design process tends to convert high-level behavioral descriptions to low-level structural ones! VHDL design entities include " Entity declaration interface (named I/O ports) " rchitecture declaration behavioral or structural description of the design entity 6

Simple Gate Network (Entity) LIRRY IEEE; -- Include Libraries for standard logic data types USE IEEE.STD_LOGI_1164.LL; -- Entity name normally the same as file name ENTITY gate_network IS -- Ports: Declares module inputs and outputs PORT(,, : IN STD_LOGI; -- Standard Logic Vector ( rray of 4 its ) D : IN STD_LOGI_VETOR( 3 DOWNTO 0 ); -- Output Signals X, Y : OUT STD_LOGI ); END gate_network; X Y 7 Simple Gate Network (rchitecture) -- Defines internal module architecture RHITETURE behavior OF gate_network IS EGIN -- oncurrent assignment statements operate in parallel -- selects bit 1 of standard logic vector D X <= ND NOT( OR ) ND ( D( 1 ) XOR D( 2 ) ); -- Process must declare a sensitivity list, -- In this case it is (,,, D ) -- List includes all signals that can change the outputs PROESS (,,, D ) EGIN -- Statements inside process execute sequentially Y <= ND NOT( OR ) ND ( D( 1) XOR D( 2 ) ); END PROESS; END behavior; X Y 8

VHDL Data Types! oolean, integer, real! STD_LOGI to model logic values " 0, 1, Z, U, X,, L, W, H " Z = tri-state, U = uninitialized, X = unknown, = don t care, L = weak 0, W = weak unknown, H = weak 1 Table 6.2 STD_LOGI conversion functions. Function Example: TO_STDLOGIVETOR( bit_vector ) TO_STDLOGIVETOR( X"FFFF" ) onverts a bit vector to a standard logic vector. Generates a 16-bit standard logic vector of ones. "X" indicates hexadecimal and "" is binary. ONV_STD_LOGI_VETOR( integer, bits ) ONV_STD_LOGI_VETOR( 7, 4 ) onverts an integer to a standard logic vector. Produces a standard logic vector of "0111". ONV_INTEGER( std_logic_vector ) ONV_INTEGER( "0111" ) onverts a standard logic vector to an integer. Produces an integer value of 7. 9 10 VHDL Operations Precedence: **,S,NOT *,/,MOD,REM +, (sign) +,,& SLL,SRL,SL, =,/=,<,<=,>,>= ND,NOT,OR, NOT,XOR, XNOR (note: all at same level) VHDL Operator Table 6.1 VHDL Operators. Operation + ddition - Subtraction * Multiplication* / Division* MOD REM & SLL** SRL** SL** SR** ROL** ROR** Modulus* Remainder* oncatenation used to combine bits logical shift left logical shift right arithmetic shift left arithmetic shift right rotate left rotate right = equality /= Inequality < less than <= less that or equal > greater than >= greater than or equal NOT ND OR NND NOR XOR XNOR* logical NOT logical ND logical OR logical NND logical NOR logical XOR logical XNOR *Not supported in many VHDL synthesis tools. In the MX+PLUS II tools, only multiply and divide by powers of two (shifts) are supported. Mod and Rem are not supported in MX+PLUS II. Efficient design of multiply or divide hardware typically requires the user to specify the arithmetic algorithm and design in VHDL. ** Supported only in 1076-1993 VHDL. Note: VHDL is not case sensitive

oncurrent and Sequential Statements 11! oncurrent statements " Signal assignment " onditional signal assignment (WHEN-ELSE) " Selected signal assignment (WITH-SELET-WHEN) " Process! Statements inside a process are executed sequentially " Variables, arrays, queues " Variable assignments (no delay) " IF-THEN-ELSE,SE-WHEN, LOOP " WIT UNTIL, WIT FOR, WIT ON " WRNING not everything you do in a process may be synthesizable by your synthesis tools! Four Multiplexers LIRRY IEEE; USE IEEE.STD_LOGI_1164.LL; ENTITY multiplexer IS -- Input Signals and Mux ontrol Mux_Out3, Mux_Out4 : OUT STD_LOGI ); END multiplexer; PORT(,, Mux_ontrol : IN STD_LOGI; Mux_Out1, Mux_Out2, Mux_ontrol 0 1 Mux_Outx RHITETURE behavior OF multiplexer IS EGIN -- selected signal assignment statement Mux_Out1 <= WHEN Mux_ontrol = '0' ELSE ; -- with Select Statement WITH mux_control SELET Mux_Out2 <= WHEN '0', WHEN '1', WHEN OTHERS; -- OTHERS case required since STD_LOGI -- has values other than "0" or "1" PROESS (,, Mux_ontro l) EGIN -- Statements inside a process IF Mux_ontrol = '0' THEN -- execute sequentially. Mux_Out3 <= ; ELSE Mux_out3 <= ; END IF; 12 SE Mux_ontrol IS WHEN '0' => Mux_Out4 <= ; WHEN '1' => Mux_Out4 <= ; WHEN OTHERS => Mux_Out4 <= ; END SE; END PROESS; END behavior;

Signal ssignment! oncurrent signal assignment " Example: a <= 1 ; z <= a XOR b; " LHS signal type must match RHS! onditional signal assignment " Example: z <= s0 WHEN sel= 0 ELSE s1; " Last ELSE should have no condition to handle all cases not otherwise covered 13! Selected signal assignment " Example: WITH sel SELET z <= s0 WHEN 0, s1 WHEN 1 ; " over all cases in mutually-exclusive fashion, possibly use WHEN OTHERS for last case Processes! process may begin main: process (, ) " Name of process is main " Sensitivity list for process is,! Sensitivity list " If one of these signals changes, the process executes " Should contain any signals on the right-hand-side of an assignment, or in any boolean condition! onditionals in IF statements must return a boolean " OK to write: if reset = 1 then " NOT OK to write: if reset then! Returns a standard logic type (!) 14

Sequential Statements (Inside Process)! IF-THEN-ELSE " Only statements in the first condition matched will be executed " Nesting allowed, each level adds more multiplexing or other additional logic, so should be done carefully! SE-WHEN " Good when all branching is based on signle condition! LOOP, WHILE-LOOP, FOR-LOOP " Repetition! WIT UNTIL (boolean), WIT FOR (time expression), WIT ON (signal) -- waits for event on that signal 15