ECOM4311 Digital Systems Design

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

VHDL BASIC ELEMENTS INTRODUCTION

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

Contents. Appendix D VHDL Summary Page 1 of 23

Hardware Description Language VHDL (1) Introduction

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

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

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

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

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

VHDL kod yerleşimi. kütüphaneler. Dış görünüş (entity: varlık) İşleyişi, yapısı (architecture: mimari)

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

ELCT 501: Digital System Design

ECE 3401 Lecture 10. More on VHDL

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

Design units can NOT be split across different files

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

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

ECOM 4311 Digital Systems Design

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

ECOM 4311 Digital System Design using VHDL. Chapter 7

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

EEL 4783: Hardware/Software Co-design with FPGAs

Review of Digital Design with VHDL

Summary of basic structures

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

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

Embedded Systems CS - ES

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

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

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

ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory

VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit.

C-Based Hardware Design

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

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

Le L c e t c ur u e e 2 To T p o i p c i s c t o o b e b e co c v o e v r e ed e Variables Operators

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

Getting Started with VHDL

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

Introduction to VHDL. Main language concepts

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

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

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

Arithmetic and Logical Operations

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

COE 405 Design Methodology Based on VHDL

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Course Topics - Outline

Sintaksa VHDL jezika - podsjetnik -

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

Introduction to VHDL #1

Hardware Modeling. VHDL Basics. ECS Group, TU Wien

Generatore di parità. LIBRARY ieee; USE ieee.std_logic_1164.all ; ENTITY xor2 IS PORT( A, B : in std_logic ; Y : out std_logic ) ; END xor2 ;

Building Blocks. Entity Declaration. Entity Declaration with Generics. Architecture Body. entity entity_name is. entity register8 is

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

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: The MIPS ISA (P&H ) Consulting hours. Milestone #1 (due 1/26)

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

HDL. Hardware Description Languages extensively used for:

Inthis lecture we will cover the following material:

VHDL Structural Modeling II

Introduction to VHDL

Chap 6 - Introduction to HDL (b)

Very High Speed Integrated Circuit Har dware Description Language

Concurrent Signal Assignment Statements (CSAs)

Computer-Aided Digital System Design VHDL

Basic Language Constructs of VHDL

Digital Design with VHDL. By Benjamin Abramov

CprE 583 Reconfigurable Computing

ECEN 468 Advanced Logic Design

GO - OPERATORS. This tutorial will explain the arithmetic, relational, logical, bitwise, assignment and other operators one by one.

Islamic University Gaza Engineering Faculty Department of Computer Engineering ECOM 4111: Digital Systems Design Lab. Lab # 5. Concurrent Statements

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

A bird s eye view on VHDL!

Arithmetic and Logic Blocks

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

Verilog Dataflow Modeling

Introduction to the VHDL language. VLSI Digital Design

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

Lecture 12 Integers. Computer and Network Security 19th of December Computer Science and Engineering Department

Lecture 3 Introduction to VHDL

Chapter 3: Dataflow Modeling

Lab # 5. Subprograms. Introduction

Chapter 2 Synthesizable VHDL for FPGA-Based Devices

CDA 4253 FPGA System Design VHDL Testbench Development. Hao Zheng Comp. Sci & Eng USF

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

ENGIN 241 Digital Systems with Lab

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

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

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

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

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

Lecture 4. VHDL Fundamentals. George Mason University

VHDL Lexical Elements

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

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

VHDL for Complex Designs

Arithmetic and Bitwise Operations on Binary Data

Fixed and Floating Point Packages

Elektrotechnik und Informationstechnik, Stiftungsprofessur hochparallele VLSI Systeme und Neuromikroelektronik. Oberseminar Informationstechnik

Transcription:

ECOM 4311 Digital Systems Design Eng. Monther Abusultan Computer Engineering Dept. Islamic University of Gaza Page 1

Agenda 1. VHDL : Data Types Cont d 2. VHDL : Operators 3. VHDL : Signal Assignments Page 2

Data Types Signed/Unsigned - Defined in the std_logic_arith package. - Syntax is similar to that of STD_LOGIC_VECTOR not that of an Integer. - Arithmetic operations are allowed, Logical operations are not allowed. (contrary to STD_LOGIC_VECTOR). Relational operations are allowed. Page 3

Data Types Signed/Unsigned - Unsigned is never lower than zero. Ex 0101 represents the decimal 5 1101 represents the decimal 13 - Signed can be positive or negative (two s compliment) Ex 0101 represents the decimal 5 1101 represents the decimal -3 Page 4

Data Types Subtypes - A subtype is a type with a constraint. - Operations between type and its subtype are allowed. Ex SUBTYPE natural IS INTEGER RANGE 0 TO INTEGER'HIGH; SUBTYPE my_logic IS STD_LOGIC RANGE '0' TO 'Z'; - Recall that STD_LOGIC=('X','0','1','Z','W','L','H','-'). - Therefore, my_logic=('0','1','z'). Page 5

Data Types Arrays - Arrays can be one-dimensional (1D), two-dimensional (2D), or 1Dx1D. - They can also be of higher dimensions, but they are not synthesizable. TYPE type_name IS ARRAY (specification) OF data_type; Ex TYPE row IS ARRAY (7 DOWNTO 0) OF STD_LOGIC; TYPE matrix IS ARRAY (0 TO 3) OF row; TYPE matrix2d IS ARRAY (0 TO 3, 7 DOWNTO 0) OF STD_LOGIC; Page 6

Data Conversion conv_integer(p) : Converts INTEGER, UNSIGNED, SIGNED, or STD_ULOGIC to an INTEGER value. (STD_LOGIC_VECTOR is not included) conv_unsigned(p, b): Converts INTEGER, UNSIGNED, SIGNED, or STD_ULOGIC to an UNSIGNED value with size b bits. conv_signed(p, b): Converts INTEGER, UNSIGNED, SIGNED, or STD_ULOGIC to a SIGNED value with size b bits. conv_std_logic_vector(p, b): Converts INTEGER, UNSIGNED, SIGNED, or STD_LOGIC to a STD_LOGIC_VECTOR value with size b bits. Page 7

VHDL Operators VHDL Operators - Data types define both "values" and "operators" - There are "Pre-Determined" data types Pre-determined = Built-In = STANDARD Package - We can add additional types/operators by including other Packages - We'll first start with the STANDARD Package that comes with VHDL Page 8

Logical Operators VHDL Operators - works on types BIT, BIT_VECTOR, BOOLEAN - vectors must be same length - the result is always the same type as the input not and nand or nor xor xnor (NOT operator has precedence over the others) Page 9

Numerical Operators VHDL Operators - works on types INTEGER, REAL - the types of the input operands must be the same + "addition" - "subtraction" * "multiplication" / "division" mod "modulus" rem "remainder" abs "absolute value" ** "exponential" Page 10

VHDL Operators Relational Operators - used to compare objects of the same type - Output is always BOOLEAN (TRUE, FALSE) - works on types: BOOLEAN, BIT, BIT_VECTOR, CHARACTER, INTEGER, REAL, TIME = "equal" /= "not equal" < "less than" <= "less than or equal" > "greater than" >= "greater than or equal" Page 11

VHDL Operators Shift Operators - works on one-dimensional arrays - works on arrays that contain types BIT, BOOLEAN - the operator requires 1) An Operand (what is to be shifted) 2) Number of Shifts (specified as an INTEGER) - a negative Number of Shifts (i.e., "-") is valid and reverses the shift sll srl sla sra rol ror "shift left logical" "shift right logical" "shift left arithmetic" "shift right arithmetic" "rotate left" "rotate right" Page 12

Concatenation Operator VHDL Operators - combines objects of same type into an array - the order is preserved & "concatenate" ex) New_Bus <= ( Bus1(7:4) & Bus2(3:0) ) Page 13

VHDL Operators STD_LOGIC_1164 Operators - To expand the data types we have in VHDL, we include the IEEE Package "STD_LOGIC_1164" - This gives us the data types: STD_LOGIC STD_LOGIC_VECTOR - This gives us all of the necessary operators for these types Logical Numerical Relational Shift Page 14

VHDL Operators Assignment Operators - The signal assignment operator is <= - The variable assignment operator is := - The Results is always on the Left, Operands on the Right - Types need to all be of the same type - need to watch the length of arrays! Ex) x :=y; sum <= x + y; NewBus <= m & k; Page 15

Delayed Assignments Delay Modeling - VHDL allows us to include timing information into assignment statements - this gives us the ability to model real world gate delay - we use the keyword "after" in our assignment followed by a time operand. Ex) B <= not A after 2ns; - VHDL has two types of timing models that allow more accurate representation of real gates 1) Inertial Delay (default) 2) Transport Delay Page 16

Delayed Assignments Inertial Delay - if the input has two edge transitions in less time than the inertial delay, the pulse is ignored said another way - if the input pulse width is smaller than the delay, it is ignored - this models the behavior of trying to charge up the gate capacitance of a MOSFET ex) B <= A after 5ns; any pulses less than 5ns in width are ignored. Page 17

Delayed Assignments Transport Delay - transport delay will always pass the pulse, no matter how small it is. - this models the behavior of transmission lines - we have to explicitly call out this type of delay using the "transport" keyword ex) B <= transport A after 5ns; B <= transport not A after t_delay; Page 18