VHDL Structural Modeling II

Similar documents
Contents. Appendix D VHDL Summary Page 1 of 23

Review of Digital Design with VHDL

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Hardware Description Language VHDL (1) Introduction

Introduction to VHDL #1

Digital Systems Design

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

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

C-Based Hardware Design

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

Basic Language Concepts

EEL 4783: Hardware/Software Co-design with FPGAs

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

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

Concurrent Signal Assignment Statements (CSAs)

ELCT 501: Digital System Design

Embedded Systems CS - ES

ENGIN 241 Digital Systems with Lab

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

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

What Is VHDL? VHSIC (Very High Speed Integrated Circuit) Hardware Description Language IEEE 1076 standard (1987, 1993)

Design units can NOT be split across different files

Digital Design Laboratory Lecture 2

Combinational Logic COMB. LOGIC BLOCK. A Combinational Logic Block is one where the outputs depend only on the current inputs

Hardware Modeling. VHDL Basics. ECS Group, TU Wien

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Part II

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

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

Chapter 6 Combinational-Circuit Building Blocks

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

Step 1 in transitioning to behavioral modeling. But here 1-to-1 with our gate level model.

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

Digital Design with FPGAs. By Neeraj Kulkarni

ECE 3401 Lecture 10. More on VHDL

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

VHDL Lexical Elements

COE 405 Design Methodology Based on VHDL

Lattice VHDL Training

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

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

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

Declarations of Components and Entities are similar Components are virtual design entities entity OR_3 is

Lecture 3 Introduction to VHDL

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

1. Using the for-generahon scheme, concurrent statements can be replicated a predetermined number of times.

ECE Digital System Design & Synthesis Exercise 1 - Logic Values, Data Types & Operators - With Answers

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

Last Lecture: Adder Examples

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

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

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

Contents. Appendix D Verilog Summary Page 1 of 16

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

UNIT I Introduction to VHDL VHDL: - V -VHSIC, H - Hardware, D - Description, L Language Fundamental section of a basic VHDL code Library :

VHDL Basics. Mehdi Modarressi. Department of Electrical and Computer Engineering, University of Tehran. ECE381(CAD), Lecture 4:

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

VHDL BASIC ELEMENTS INTRODUCTION

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

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

Inthis lecture we will cover the following material:

1. Defining and capturing the design of a system. 2. Cost Limitations (low profit margin must sell millions)

Introduction to VHDL. Main language concepts

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

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

Course Topics - Outline

ECE468 Computer Organization & Architecture. The Design Process & ALU Design

A Verilog Primer. An Overview of Verilog for Digital Design and Simulation

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

Microcomputers. Outline. Number Systems and Digital Logic Review

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

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

LECTURE 4: The VHDL N-bit Adder

CS Computer Architecture. 1. Explain Carry Look Ahead adders in detail

Computer-Aided Digital System Design VHDL

VHDL for Complex Designs

Chapter 3 Part 2 Combinational Logic Design

Design Using Verilog

ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory

Verilog HDL Introduction

Chapter 3: Dataflow Modeling

REGISTER TRANSFER AND MICROOPERATIONS

Spiral 1 / Unit 4 Verilog HDL. Digital Circuit Design Steps. Digital Circuit Design OVERVIEW. Mark Redekopp. Description. Verification.

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

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

6.111 Lecture # 5. Entity section describes input and output. VHDL: Very High speed integrated circuit Description Language:

Verilog Dataflow Modeling

Speaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28

Modeling Complex Behavior

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

ECOM4311 Digital Systems Design

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

In this lecture, we will go beyond the basic Verilog syntax and examine how flipflops and other clocked circuits are specified.

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

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

VHDL: A Crash Course

Hardware Description Languages. Modeling Complex Systems

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Writing VHDL for RTL Synthesis

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

Tutorial 4 HDL. Outline VHDL PROCESS. Modeling Combinational Logic. Structural Description Instantiation and Interconnection Hierarchy

Transcription:

VHDL Structural Modeling II ECE-331, Digital Design Prof. Hintz Electrical and Computer Engineering 5/7/2001 331_13 1

Ports and Their Usage Port Modes in reads a signal out writes a signal inout reads or writes a signal Can be connect to multiple signals buffer reads or writes a signal Can be connected to only one signal linkage special use 5/7/2001 331_13 2

Illegal Port Usage Signal Defined As Out Cannot Be Used As Signal Connected to Internal Device. Need to Create Internal Signal. ENTITY (W, X,Y: IN bit ; A,B : OUT bit) ; 5/7/2001 331_13 3

Constant-Valued Signals May Want to Hard-Wire an Input Signal to a Particular Value Control signal in a model of real device, e.g., preset or clear on a register Inputs to MUX to implement a particular combinational logic circuit Not use all inputs to a NAND/NOR gate while minimizing loading output of driving gate 5/7/2001 331_13 4

Constant-Valued Signals Three Methods for Generating a Constant Define local signal with default equal to desired value e.g., signal Zero_Input : BIT := 0 ; Directly define input as 0 or 1 (VHDL-93) 5/7/2001 331_13 5

Constant-Valued Signals Set default inputs on entity and use keyword OPEN ENTITY NAND_2 IS PORT ( A, B : IN BIT := 1 ; C : OUT BIT ) ; END NAND ;... X1: NAND_2 ( OPEN, W, Z ) ;... 5/7/2001 331_13 6

Regular VHDL Structures Iterative Circuits Are Composed of Many Identical Circuits Ripple-carry adder RAM Counters Comparators 5/7/2001 331_13 7

Generate Statement Use Generate Statement to Reduce Coding Effort Can Include Any Concurrent Statement Including Another Generate Statement Does Not Execute Directly, But Expands into Code Which Does Execute 5/7/2001 331_13 8

Generate Statement Automatically Generates Multiple Component Instantiations Two Kinds of Statements Iteration FOR... GENERATE Conditional IF... GENERATE 5/7/2001 331_13 9

Iteration Instantiates Identical Components FOR Syntax identifier : FOR N IN 1 TO 8 GENERATE concurrent-statements END GENERATE name ; N is a constant and cannot be changed name is required 5/7/2001 331_13 10

Conditional Takes Care of Boundary Conditions IF Syntax identifier : IF (boolean expression) GENERATE concurrent-statements END GENERATE name ; Cannot use else or ifelse clauses 5/7/2001 331_13 11

Generate e.g., R-C Adder ENTITY RCAdder_16 IS PORT ( A, B : IN Bit_Vector (15 downto 0); Cforce : IN Bit ; Sum : OUT Bit_Vector(15 downto 0); Cout : OUT Bit ) ; END RCAdder_16 ; 5/7/2001 331_13 12

Generate e.g., R-C Adder ARCHITECTURE Generate_S OF RCAdder_16 IS COMPONENT Full_Adder --defined elsewhere PORT ( A, B, Cin : IN bit ; S, Cout : OUT bit ); END COMPONENT Full_Adder ; SIGNAL Int_C : BIT_VECTOR (15 DOWNTO 0); 5/7/2001 331_13 13

Generate e.g., R-C Adder BEGIN --RC Adder All_Bits: FOR I IN 15 DOWNTO 0 GENERATE LSB : IF (I = 0) GENERATE BEGIN S0: Full_Adder PORT MAP ( A(I), B(I), Cforce, Sum(I), Int_C(I) ); END GENERATE S0 ; 5/7/2001 331_13 14

Generate e.g., R-C Adder Middle_bits: IF ( I < 15 AND I > 0 ) GENERATE BEGIN SI: Full_Adder PORT MAP ( A(I), B(I), Int_C(I-1), Sum(I), Int_C(I) ); END GENERATE SI; 5/7/2001 331_13 15

Generate e.g., R-C Adder MSB: IF ( I = 15 ) GENERATE BEGIN S15: Full_Adder PORT MAP ( A(I), B(I), Int_C(I-1), Sum(I), Cout ); END GENERATE MSB; END GENERATE All_Bits END Generate_S ; 5/7/2001 331_13 16

Unconstrained Ports Entity Declarations Can Have Ports Defined Using Arrays Without Explicitly Including the Size of the Array Leads to General Specification of Iterative Circuit Uses Predefined Array Attribute LENGTH 5/7/2001 331_13 17

Generate e.g., R-C Adder ENTITY RCAdder_N IS PORT ( A, B : IN Bit_Vector ; Cforce : IN Bit ; Sum : OUT Bit_Vector ; Cout : OUT Bit ) ; END RCAdder_N ; 5/7/2001 331_13 18

Generate e.g., R-C Adder ARCHITECTURE Generate_S OF RCAdder_N IS COMPONENT Full_Adder --defined elsewhere PORT ( A, B, Cin : IN bit ; S, Cout : OUT bit ) ; END COMPONENT Full_Adder ; SIGNAL Int_C : BIT_VECTOR ( (A LENGTH - 1) DOWNTO 0); 5/7/2001 331_13 19

Generate e.g., R-C Adder BEGIN --RC Adder All_Bits: FOR I IN (A LENGTH -1) DOWNTO 0 GENERATE LSB: IF (I = 0) GENERATE BEGIN S0: Full_Adder PORT MAP ( A(I), B(I), Cforce, Sum(I), Int_C(I) ); END GENERATE S0 ; 5/7/2001 331_13 20

Generate e.g., R-C Adder Middle_bits: IF ( I < ( A LENGTH - 1 ) AND I > 0 ) GENERATE BEGIN SI: Full_Adder PORT MAP ( A(I), B(I), C(I-1), Sum(I), Int_C(I) ); END GENERATE SI ; 5/7/2001 331_13 21

Generate e.g., R-C Adder MSB: IF ( I = A LENGTH - 1 ) GENERATE BEGIN SN: Full_Adder PORT MAP ( A(I), B(I), INT_C(I-1), Sum(I), Cout ); END GENERATE MSB; END GENERATE All_Bits END Generate_S ; 5/7/2001 331_13 22

Arithmetic Operators Four Classes of Operators in VHDL Logic Relational Shift Arithmetic + - * / ** mod rem abs & (concatenation) 5/7/2001 331_13 23

Number Types Integer Literals MAX_ INT = Maximum Positive Value of Integer { h } { } { } Positive Numbers = 1, 2, 3,, MAX_ INT Counting Numbers = Positive Numbers 0 Integers =± Counting Numbers 5/7/2001 331_13 24

Number Types Floating Point Literals Number containing a radix point Only one type, REAL Range of values is implementation dependent 5/7/2001 331_13 25

Type Conversion There is NO implicit type conversion Mixed type operations are not allowed Explicit type conversion IS allowed e.g., INTEGER ( 4.8 ), REAL ( 5 ) 5/7/2001 331_13 26

Arithmetic Operator Limitations REM and MOD Operators Only Defined for Integers ** (Exponentiation) Accepts Both Integer and Real Arguments With Restrictions REAL can only be raised to integer power INTEGER can only be raised to positive power 5/7/2001 331_13 27

Writing Literals Underscore Can Be Inserted Anywhere for Readability Exponential Notation Allowed for Both Integers and Reals Any Radix From 2 to 16 Is Allowed radix # number_in_radix # 5/7/2001 331_13 28

Literal Examples Decimal Integer, e.g., 43800, 43_800, 438e2, 438E+2 Other Radix Integer, e.g., 2#1101011#, 3#21201#, 16#faff0# Real, e.g., 0.0, 0.0_26, 3.8e-4, 9.8E+4 Other Radix Real, e.g., 2#11.011#, 3#22.1#, 7#46.31#e-1 5/7/2001 331_13 29

End of Lecture Ports Constants Regular Structures Arithmetic Operators Literals 5/7/2001 331_13 30