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

Similar documents
VHDL And Synthesis Review

Very High Speed Integrated Circuit Har dware Description Language

VHDL for FPGA Design. by : Mohamed Samy

Digital Systems Design

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

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

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

Introduction to VHDL. Main language concepts

Subprograms, Packages, and Libraries

Digital Systems Design

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

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

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

Inthis lecture we will cover the following material:

Introduction to VHDL

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

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

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

Introduction to VHDL #3

Basic Language Concepts

Hardware Description Language VHDL (1) Introduction

Menu. Introduction to VHDL EEL3701 EEL3701. Intro to VHDL

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

Contents. Appendix D VHDL Summary Page 1 of 23

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

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

Concurrent Signal Assignment Statements (CSAs)

Lecture 10 Subprograms & Overloading

Lecture 4. VHDL Fundamentals. George Mason University

Control and Datapath 8

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

EEL 4783: Hardware/Software Co-design with FPGAs

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

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

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

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

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

Lecture 12 VHDL Synthesis

Digital Systems Design

VHDL: Code Structure. 1

Lecture 3 Introduction to VHDL

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

Hardware Description Languages. Modeling Complex Systems

VHDL simulation and synthesis

[VARIABLE declaration] BEGIN. sequential statements

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

Chapter 6 Combinational-Circuit Building Blocks

Sequential VHDL. Katarzyna Radecka. DSD COEN 313

The process. Sensitivity lists

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

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

ECE 459/559 Secure & Trustworthy Computer Hardware Design

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

Design units can NOT be split across different files

VHDL for Complex Designs

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

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

EEL 4712 Digital Design Test 1 Spring Semester 2008

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

Introduction to VHDL #1

ENGIN 241 Digital Systems with Lab

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

Sequential Statements

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)

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

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

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

Chapter 2 Basic Logic Circuits and VHDL Description

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

Constructing VHDL Models with CSA

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

VHDL in 1h. Martin Schöberl

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

Basic Language Constructs of VHDL

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

VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University

Lattice VHDL Training

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

Modeling Complex Behavior

Programmable Logic Design Grzegorz Budzyń Lecture. 4: Introduction to VHDL

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

VHDL Examples Mohamed Zaky

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

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

VHDL for Synthesis. Course Description. Course Duration. Goals

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 3

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

EITF35: Introduction to Structured VLSI Design

Nanosistemų programavimo kalbos 4 paskaita. Nuosekliai vykdomi sakiniai

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

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

Sub-programs in VHDL

14:332:331. Computer Architecture and Assembly Language Spring Week 6

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

VHDL 2 IDENTIFIERS, DATA OBJECTS AND DATA TYPES

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

EE434 ASIC & Digital Systems

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

Sequential Logic - Module 5

Transcription:

Multi-valued Logic Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized X, unknown 0, logic 0 1, logic 1 Z, high impedance W, unknown L, logic 0 weak H, logic 1 weak - ); don t care

Standard Logic Std_ulogic is an unresolved data type; only 1 driver. Std_logic is a resolved data type; > than 1driver. Both have the same nine states. Both have a vector form: std_ulogic_vector, std_logic vector Both are contained in a package called standard_logic_1164 In MAX+PLUS II, std_logic must have only 1 driver to synthesize.

Using Standard Logic To use standard logic, define the library, define the package in the library, define the objects in the package library list_library_names; use library.package.object; library IEEE; use IEEE.Std_Logic_1164.all;

Using Standard Logic Objects of type std_logic can be assigned to objects of type std_ulogic, and vice-versa. For MAX+PLUS, only resolved logic can be synthesized so both logic types behave the same way in terms of drivers. There are other standards which use std_logic so this is typically preferred.

Concurrent Assignments Concurrent statements: execute in parallel (at the same time), behaviour is independent of the order in which they are written X <= A or B; Z<= C or X; Z <= C or X; X <= A or B; Remember the statements represent hardware!

Concurrent Assignments Consider X <= X + Y; In software, X and Y are registers. In hardware, X and Y are signals. Code describes an adder, with no implied storage registers. Describes feedback around combinational logic. Think hardware!

Sequential Assignments Sequential statements are only found within a process. The process is not a fundamental design unit. The process must be contained within an architecture.

The Process MUX: process (A,B,SEL) begin if SEL = '1' then Z <= A; else Z <= B; end if; end process MUX;

The Process A process is invoked when one of the signals in its sensitivity list has an event, i.e. changes value. Each process executes its statements in sequence. Multiple processes interact with each other concurrently.

The Process architecture A of E is begin -- concurrent statements P1 : process begin -- sequential statements end process P1; -- concurrent statements P2 : process begin -- sequential statements end process P2; -- concurrent statements end A;

Concurrent vs Sequential Consider: Z <= A and B; Z <= C and D; architecture CONCURRENT of MULTIPLE is signal Z, A, B, C, D : std_logic; begin Z <= A and B; Z <= C and D; end CONCURRENT;

Concurrent vs Sequential architecture SEQUENTIAL of MULTIPLE is signal Z, A, B, C, D : std_logic; begin process (A, B, C, D) begin Z <= A and B; Z <= C and D; end process; end SEQUENTIAL;

Process Execution Signals assigned within a process are not actually updated until the process suspends execution, i.e. after the last sequential statement Ensures that the signal update is clean. For previous example, Z is never updated with the value of A and B.

Sensitivity List MUX: process (A, B, SEL) begin if SEL = '1' then Z <= A; else Z <= B; end if; end process MUX;

MUX: process (A, B) begin if SEL = '1' then Z <= A; else Z <= B; end if; end process MUX; Sensitivity List

Combinational Logic If describing combinational logic in a process, the sensitivity list should always be complete. A complete sensitivity list contains every signal that could be considered an input.

The Process Program flow within the process is determined by: the case statement the for loop the if statement These statements only make sense within sequential code and, therefore, are only valid within a process.

If Statement If condition then -- sequential statements end if; If condition then -- sequential statements else -- sequential statements end if;

If-Elsif Statement if condition then -- sequential statements elsif condition then -- sequential statements elsif condition then -- sequential statements else -- sequential statements end if;

If-Elsif Statement process (A, B, C, X) begin if (X = "0000") then Z <= A; elsif (X <= "0101") then Z <= B; else Z <= C; end if; end process;

Case Statement case OBJECT is when VALUE_1 => -- statements when VALUE_2 => -- statements when VALUE_3 => --statements --etc... end case;

process (A, B, C, X) begin case X is when 0 to 4 => Z <= B; when 5 => Z <= C; when 7 9 => Z <= A; when others => Z <= 0; end case; end process; Case Statement

Case Statement The object may be any valid expression. Values may be specified: individually by range, e.g. 0 to 4 by list, e.g. 7 9 by others clause covers all other possible values that have not been specified

Case Statement Values must be: constant values of the same type as object specified only once. All possible values must be specified explicitly or with the others clause.

For Loop for index in range loop -- sequential statements end loop; for I in 0 to 3 loop -- statements end loop;

For Loop The index does not have to be declared. The range must be fixed to allow the synthesis tool to unfold the loop. Logic inside the loop is replicated, once for each loop, and then the circuit is optimized.

entity EX is port (A : in std_logic_vector(0 to 15); SEL : in integer range 0 to 15; Z : out std_logic); end EX; architecture RTL of EX is begin WHAT: process (A, SEL) begin for I in 0 to 15 loop if SEL = I then Z <= A(I); end if; end loop; end process WHAT; end RTL;

Important Trivia Not case sensitive Ignores spaces and line breaks Comments begin with -- and end at the end of the line. Many reserved words Strongly typed language value assigned to a signal or variable must match exactly in type

Important Trivia Identifiers (variable and signal names) start with a character may contain letters, numbers, _(underscore) may not contain, may not end with _ VHDL code is contained in text files with file name name.vhd File name must be the same as entity name