Hardware Modeling. VHDL Basics. ECS Group, TU Wien

Similar documents
Concurrent Signal Assignment Statements (CSAs)

VHDL for FPGA Design. by : Mohamed Samy

Basic Language Concepts

Introduction to VHDL. Main language concepts

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

Introduction to VHDL #1

VHDL for Complex Designs

Lecture 4. VHDL Fundamentals. George Mason University

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

Constructing VHDL Models with CSA

Inthis lecture we will cover the following material:

VHDL: Code Structure. 1

Getting Started with VHDL

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

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

Sequential VHDL. Katarzyna Radecka. DSD COEN 313

EE 595. Part II Design Units in VHDL. EE 595 EDA / ASIC Design Lab

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

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

VHDL Structural Modeling II

EEL 4783: Hardware/Software Co-design with FPGAs

Introduction to VHDL #3

Contents. Appendix D VHDL Summary Page 1 of 23

Lattice VHDL Training

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

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

C-Based Hardware Design

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

Subprograms, Packages, and Libraries

Basic Language Constructs of VHDL

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

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

Digital Systems Design

Introduction to VHDL

Lecture 3 Introduction to VHDL

Lecture 38 VHDL Description: Addition of Two [5 5] Matrices

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

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

ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

ECOM4311 Digital Systems Design

VHDL And Synthesis Review

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

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

Design units can NOT be split across different files

Hardware Description Language VHDL (1) Introduction

Computer-Aided Digital System Design VHDL

Digital Systems Design

Very High Speed Integrated Circuit Har dware Description Language

Digital Systems Design

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

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

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

Embedded Systems CS - ES

COE 405 Design Methodology Based on VHDL

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

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

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

COVER SHEET: Total: Regrade Info: 1 (8 points) 2 ( 8 points) 3 (16 points) 4 (16 points) 5 (16 points) 6 (16 points) 7 (16 points) 8 (8 points)

VHDL Examples Mohamed Zaky

Experiment 8 Introduction to VHDL

In our case Dr. Johnson is setting the best practices

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

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

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

Chapter 6 Combinational-Circuit Building Blocks

Lecture 10 Subprograms & Overloading

Entity, Architecture and Process

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

Summary of basic structures

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

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

Synthesis of Digital Systems CS 411N / CSL 719. Part 3: Hardware Description Languages - VHDL

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

FPGA Design. Part III - Combinatorial VHDL. Thomas Lenzi

CprE 583 Reconfigurable Computing

Sub-programs in VHDL

Digitaalsüsteemide disain

VHDL 200X: The Future of VHDL

VHDL simulation and synthesis

Review of Digital Design with VHDL

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

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

VHDL 200X: The Future of VHDL

Chapter 2 Synthesizable VHDL for FPGA-Based Devices

Modeling Complex Behavior

Sequential Statement

ECOM 4311 Digital Systems Design


EITF35: Introduction to Structured VLSI Design

Document Version: 0.6 Document Date: 15 April 2011 Prepared by: Y. Ermoline for ATLAS Level-1Calorimeter Trigger

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

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

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

Lab # 5. Subprograms. Introduction

Hardware Description Languages. Modeling Complex Systems

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

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

Mridula Allani Fall Fall

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

Transcription:

Hardware Modeling VHDL Basics ECS Group, TU Wien

VHDL Basics 2 Parts of a Design Unit Entity Architecture Configuration Package Package Package Body Library

How to create a Design Unit? Interface to environment (ENTITY) Design Unit Functionality (ARCHITECTURE) Each Design Unit consists of one ENTITY and no, one or more ARCHITECTUREs 3

ENTITY Declaration 4 Interface of a block to the environment Name of the block Inputs and outputs (ports) Additional declaration of parameters possible (generics) No functional descriptions Comparable to a schematic symbol of a component

ENTITY Example Example of a half adder Schematic symbol entity name entity half_adder is port port mode (direction) port name ( port type a, b : in bit; carry, sum : out bit ); end entity half_adder; a b sum carry 5

Generics Example 6 Adder with configurable bus width entity adder is generic ( WIDTH : integer := 8 ); port ( a, b : in bit_vector (WIDTH - 1 downto 0); sum : out bit_vector (WIDTH - 1 downto 0); carry : out bit ); end entity adder;

Port Types Read Write Comment in X - out (X) X Read in VHDL 2008 inout X X buffer X X Can only be written by one source 7

Architecture Describes the functionality of a design unit The functionality can be described on different levels Y-diagram, will be discussed in future lecture Mixing of different levels possible No, one or multiple architectures for each entity possible 8

Architecture Example architecture name entity name 9 loop architecture rtl of half_adder is begin process(a,b) begin if a=`1` and b=`1` then carry <=`1`; sum <=`0`; elsif a /= b then carry <=`0`; sum <=`1`; else carry <=`0`; sum <=`0`; end if; end process; end architecture rtl; sensitivity list

Configuration (1) One entity could have multiple architectures The assignment of the currently active one is done by a configuration Entity Configuration Architecture 1 Architecture 2 Architecture 3 Advantage: Different implementation of an entity can exist in parallel and be switched by only changing the configuration. 10

Configuration (2) configuration name entity name configuration half_adder_cfg of half_adder is for rtl end for; end configuration half_adder_cfg; 11

Configuration (3) a AND sum Architecture 1 Architecture 2 b XOR carry Architecture 1 Architecture 2 configuration half_adder_cfg of half_adder is 12 for rtl end for; end half_adder_cfg ; for and : and_gate use work.and_gate(behaviour); for xor : xor_gate use work.xor_gate(structure); additional configurations entity of instance architecture of instance instance name, Keyword all configures all instances of the specified entity

Design Unit Design unit consists of One entity, No, one or multiple architectures And an optional configuration! Entity Config Architecture The three components can be in separate files or in a common one entity half_adder is port ( a, b : in bit; carry, sum : out bit ); end entity half_adder; configuration half_adder_cfg of half_adder is for rtl end for; end configuration half_adder_cfg; architecture rtl of half_adder is begin process(a,b) if a=1 and b=1 then carry <=`1; sum <=`0`; elsif a<> b then carry <=`0`; sum <=`1`; else carry <=`0`; sum <=`0`; end if; end process; end architecture rtl; 13

Package (1) Project1 Project 2 Components can be grouped in packages By using the package they can be used in multiple projects Package Comparable to C header files Entity D Entity A Entity B Entity C 14

Package (2) 15 A package can be used in multiple projects It can contain: Custom data types, Component declarations, Function and procedures Constants... A package consists of Package declaration Package Body (Implementation of function and procedures)

Libraries Libraries contain (precompiled) VHDL Units Libraries have to be made visible by library lib_name; The library directive can be used before an entity, architecture, configuration, package or package body 16

USE - Clause Makes elements of a library visible use ieee.numeric_std. + element name library name package name Instead of the element name.all can be used to make all elements of the library visible. 17

Library work Standard library for your compiled designs Library work always visible No library clause required Custom packages normally in this library Packages have to be made visible with use clause 18

Standard Library (std) 19 Defined in IEEE-1076 standard Contains the packages standard und textio Package standard (always visible, no use clause required) Defines Basic types: bit, boolean, integer, natural, Operations for the basic types: and, or, not, =, /=,<, Package textio (not visible by default, use clause required) Defines text mode file operations

Library ieee (1) Package std_logic_1164: Types std_logic, std_ulogic,... Operators and, or, not,... Conversion functions: e.g.: to_bit, to_stdlogic,... Other functions rising_edge, falling_edge, 20

Library ieee (2) 21 Package numeric_std: Types signed unsigned Operators +, -, *, /, ABS,... <, >, <=,... Conversion functions to_integer(arg : unsigned) return integer... Synopsys version: std_logic_arith Not standard => do not use!

Conclusion (1) A design unit consists of: Architecture 1 Entity Configuration Architecture 2... Architecture n 22

Conclusion (2) Design Units can be grouped in packages (component declarations) Packages can also include constants, type declarations, procedures and functions Design units/packages can be grouped in libraries 23

Conclusion (3) A library must be made visible: library my_lib Elements of a library must be imported: use my_lib.adder_pkg.half_adder; Special cases Library work (always visible) Package std.standard (always visible).all (all elements of a package) 24