Introduction to VHDL #2

Similar documents
Introduction to VHDL #3

Digital Systems Design

COVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points)

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

Introduction to VHDL #1

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

Basic Language Concepts

The block diagram representation is given below: The output equation of a 2x1 multiplexer is given below:

EEL 4712 Digital Design Test 1 Spring Semester 2008

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

Chapter 6 Combinational-Circuit Building Blocks

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

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

EEL 4712 Name: SOLUTION Midterm 1 Spring 2016 VERSION 1 UFID:

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points)

COVER SHEET: Total: Regrade Info: Problem#: Points. 7 (14 points) 6 (7 points) 9 (6 points) 10 (21 points) 11 (4 points)

Experiment 8 Introduction to VHDL

EEL 4712 Digital Design Test 1 Spring Semester 2007

Hardware Description Language VHDL (1) Introduction

Introduction to VHDL. Yvonne Avilés Colaboration: Irvin Ortiz Flores Rapid System Prototyping Laboratory (RASP) University of Puerto Rico at Mayaguez

Constructing VHDL Models with CSA

VHDL for Complex Designs

[VARIABLE declaration] BEGIN. sequential statements

Lattice VHDL Training

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

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

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity

2/14/2016. Hardware Synthesis. Midia Reshadi. CE Department. Entities, Architectures, and Coding.

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

VHDL simulation and synthesis

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID:

FPGA BASED SYSTEM DESIGN. Dr. Tayab Din Memon Lecture 9 & 10 : Combinational and Sequential Logic

VHDL Structural Modeling II

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

CONCURRENT STATEMENTS COMPONENT DECLARATION COMPONENT INSTANTIATION

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 3

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

VHDL. Chapter 1 Introduction to VHDL. Course Objectives Affected. Outline

Sign here to give permission to return your test in class, where other students might see your score:

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

Very High Speed Integrated Circuit Har dware Description Language

Review. LIBRARY list of library names; USE library.package.object; ENTITY entity_name IS generic declarations PORT ( signal_name(s): mode signal_type;

EEL 4783: Hardware/Software Co-design with FPGAs

VHDL 2 Combinational Logic Circuits. Reference: Roth/John Text: Chapter 2

Introduction to VHDL. Main language concepts

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

Fundamental Design Concepts. Fundamental Concepts. Modeling Domains. Basic Definitions. New terminology and overloaded use of common words

Introduction to VHDL

Lecture 3. VHDL Design Units and Methods. Entity, Architecture, and Components Examples of Combinational Logic Hands-on in the Laboratory

VHDL Sample Slides Rev Sample Slides from the 2-day and 4-day VHDL Training Courses

Control and Datapath 8

EECE 353: Digital Systems Design Lecture 10: Datapath Circuits

Writing VHDL for RTL Synthesis

HIERARCHICAL DESIGN. RTL Hardware Design by P. Chu. Chapter 13 1

Outline HIERARCHICAL DESIGN. 1. Introduction. Benefits of hierarchical design

INTRODUCTION TO VHDL. Lecture 5 & 6 Dr. Tayab Din Memon Assistant Professor Department of Electronic Engineering, MUET

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

LECTURE 4: The VHDL N-bit Adder

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 2

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic

Contents. Appendix D VHDL Summary Page 1 of 23

VHDL HIERARCHICAL MODELING

Nanosistemų programavimo kalbos 4 paskaita. Nuosekliai vykdomi sakiniai

ELCT 501: Digital System Design

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

Lecture 5: State Machines, Arrays, Loops. EE 3610 Digital Systems

Concurrent Signal Assignment Statements (CSAs)

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 3

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

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

EITF35: Introduction to Structured VLSI Design

Lecture 12 VHDL Synthesis

Lecture 27. Structural Description of a 3-Bit Synchronous Decade Counter. FIGURE 4.31 A State diagram of a decade counter.

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions

DOD, VHSIC ~1986, IEEE stnd 1987 Widely used (competition Verilog) Commercial VHDL Simulators, Synthesizers, Analyzers,etc Student texts with CDROMs

Lecture 3. VHDL Design Units and Methods. Notes. Notes. Notes

Department of Electronics & Communication Engineering Lab Manual E-CAD Lab

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

CASE Statement. Controls execution of one or more sequential statements.

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

The process. Sensitivity lists

Experiment 0 OR3 Gate ECE 332 Section 000 Dr. Ron Hayne June 8, 2003

ECE 3401 Lecture 10. More on VHDL

Concurrent & Sequential Stmts. (Review)

COVER SHEET: Total: Regrade Info: 7 (5 points) 8 (6 points) 4 (10 points) 5 (12 points) 9 (15 points) 10 (27 points) 11 (4 free points)

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

Test Benches - Module 8

ECE 545 Lecture 4. Simple Testbenches. George Mason University

Computer-Aided Digital System Design VHDL

Solutions - Homework 2 (Due date: October 9:30 am) Presentation and clarity are very important!

Lecture 9. VHDL, part IV. Hierarchical and parameterized design. Section 1 HIERARCHICAL DESIGN

Lecture 4. VHDL Fundamentals. George Mason University

Review of Digital Design with VHDL

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

Summary of FPGA & VHDL

Transcription:

ECE 322 Digital Design with VHDL Introduction to VHDL #2 Lecture 4

Signal Assignment Statements Forms of signal assignment statements: Simple Concurrent Assignment Selected Assignment Conditional Assignment Component Instantiation Generate Statements Process Blocks

Signal Assignment Statements-Conditional vs. Selected What is the difference between a conditional assignment and a selected assignment? n n From a functional point of view, not much they both can implement the same function. From a synthesis point of view, quite a bit! they both generate different forms of hardware. Selected assignment two-level, fast, high gate count and longer VHDL descriptions. Conditional assignment multi-level, slow (worst-case), low gate count and shorter VHDL descriptions.

Signal Assignment Statements-Conditional vs. Selected Use conditional assignments if you want to implement some sort of priority scheme. For example, priority encoders are often used to handle multiple interrupt lines.

Signal Assignment Statements-Conditional vs. Selected Priority Interrupt Encoder-withconditional signal assignment INT_VEC <= VEC1 when INT1 = 1 else VEC2 when INT2 = 1 else VEC3 when INT3 = 1 else VEC4 when INT4 = 1 else 0 ; Maximum delay is 4 MUX gate delays

Signal Assignment Statements-Conditional vs. Selected Priority Interrupt Encoder-with selected signal assignment with IntSel select <= INT_VEC <= VEC1 when 1000, VEC1 when 1001, VEC1 when 1010, VEC1 when 1011, VEC1 when 1100, VEC1 when 1101, VEC1 when 1110, VEC1 when 1111, VEC2 when 0100, VEC2 when 0101, VEC2 when 0110, VEC2 when 0111, VEC3 when 0010, VEC3 when 0011, VEC4 when 0001, 0 when others; Compared to conditional signal assignment, the equivalent circuit description using selected Signal assignment is longer.

Signal Assignment Statements-Conditional vs. Selected Priority Interrupt Encoder-with selected signal assignment Ø To make the selected assignment statement as short as possible, always group the output value that has the most cases (for this example it is VEC1) under the "when others" clause: with IntSel select <= INT_VEC <= VEC2 when 0100, VEC2 when 0101, VEC2 when 0110, VEC2 when 0111, VEC3 when 0010, VEC3 when 0011, VEC4 when 0001, 0 when 0000, VEC1 when others;

Signal Assignment Statements-Conditional vs. Selected Priority Interrupt Encoder-as described with selected signal assignment Maximum delay is 1 MUX gate delay

Signal Assignment Statements-Conditional vs. Selected Priority Interrupt Encoder-with selected signal assignment n Usually, selected signal assignment results in faster, but larger, circuits than using conditional signal assignment statements. n This is true only for the worst-case speed. n The priority tree structures generated by conditional signal assignment have differing delays for different signal paths. Some paths can have very short delays!

Signal Assignment Statements-Conditional vs. Selected Conditional assignment statements are often used to reduce delay for critical path signals. Consider the following VHDL description that uses selected signal assignment: sel <= crit or sorta_crit or non_crit; Synthesis with sel select Y <= in1 when 0, in2 when 1, in2 when others; Critical path has a delay of 2 gate delays

Signal Assignment Statements-Conditional vs. Selected Re-design with conditional signal assignments: Y <= in2 when cirt = 1 else in2 when sorta_crit = 1 else in2 when non_crit = 1 else in1; Synthesis Critical path has a delay of 1 gate delay

Signal Assignment Statements Design Rule: Put time-critical signals at the top levels of conditional assignment trees. After circuit synthesis, these signals will usually have the shortest path to the output.

Signal Assignment Statements-Components n Components are used to connect multiple VHDL design units (entity/architecture pairs) together to form a larger, hierarchical design. n Hierarchy can dramatically simplify your design description and can make it much easier to re-use portions of the design in other projects.

Signal Assignment Statements-Components Example of Hierarchical Design- The design entity WIDGET contains instantiations of other design entities.

Signal Assignment Statements-Components n A component must be declared, in the declarations section of the architecture body, before it is instantiated in the concurrent statements area. component component_name port ( ); end component;

Signal Assignment Statements-Components n There are 3 component instances, but only 2 different types of components. Thus we need 2 component declarations.

Signal Assignment Statements-Components n The component declarations for our example: component XY_gate port (X, Y : in std_logic; s1, s2 : out std_logic); end component; component QZ_gate port (Z1, Z2 : in std_logic; Q : in std_logic_vector(7 downto 0); ST : out std_logic); end component; Note: The port list should match the port list of the component s entity declaration.

Signal Assignment Statements-Components To actually use a component it must be instantiated, in the concurrent statements section of the architecture body. The basic template for component instantiation is: instance_label : component_name port map( component_port1 =>signal1, component_port2 =>signal2, component_portn =>signaln);

Signal Assignment Statements-Components There are 3 components in total of all kinds, so we need 3 instantiation statements.

Signal Assignment Statements-Components n The component instantiations for our example: Gate1:XY_Gate port map( x=>d1, y=>d2, s2=>i1, s1=>status); Gate2:XY_Gate port map( x=>i1, s2=>q2, y=>i2, s1=>q1); Gate3:QZ_Gate port map( Q=>X, Z2=>I1, Z1=>SET, ST=>I2); Now, let s put it all together

Signal Assignment Statements-Components entity widget is port ( D1, D2, SET: in std_logic; X :in std_logic_vector(7 downto 0); Q1, Q2, STATUS :out std_logic); end widget; Architecture implementation of widget is signal I1, I2 : std_logic; component XY_gate port(x, Y: in std_logic;s1, s2:out std_logic); end component; component QZ_gate port(z1, Z2 : in std_logic; ST:out std_logic; Q :in std_logic_vector(7downto0)); end component; begin Gate1:XY_Gate port map(x=>d1, y=>d2, s2=>i1, s1=>status); Gate2:XY_Gate port map(x=>i1, s2=>q2, y=>i2, s1=>q1); Gate3:QZ_Gate port map(q=>x, Z2=>I1, Z1=>SET, ST=>I2); End implementation;