VHDL And Synthesis Review

Similar documents
VHDL: Code Structure. 1

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

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems

Sequential Logic - Module 5

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

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

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

Sequential Statement

VHDL for FPGA Design. by : Mohamed Samy

EITF35: Introduction to Structured VLSI Design

Basic Language Constructs of VHDL

Introduction to VHDL #1

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

EITF35: Introduction to Structured VLSI Design

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

Introduction to VHDL

Computer-Aided Digital System Design VHDL

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

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)

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

Lecture 10 Subprograms & Overloading

[VARIABLE declaration] BEGIN. sequential statements

SEQUENTIAL STATEMENTS

Inferring Storage Elements

VHDL for Synthesis. Course Description. Course Duration. Goals

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

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

Subprograms, Packages, and Libraries

VHDL: RTL Synthesis Basics. 1 of 59

VHDL in 1h. Martin Schöberl

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

Lecture 12 VHDL Synthesis

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

ECE 459/559 Secure & Trustworthy Computer Hardware Design

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

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

Control and Datapath 8

VHDL: Modeling RAM and Register Files. Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2

Inthis lecture we will cover the following material:

Menu. Introduction to VHDL EEL3701 EEL3701. Intro to VHDL

Introduction to VHDL. Main language concepts

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

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

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

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

Lecture 4. VHDL Fundamentals. George Mason University

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

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

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

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

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

CprE 583 Reconfigurable Computing

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

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

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

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

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

Introduction to Design Vision. Instructor: Prof. Shantanu Dutt. TA: Soumya Banerjee

Introduction to VHDL #3

The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution

Design units can NOT be split across different files

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

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

Nanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas

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

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

Summary of FPGA & VHDL

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

Hardware Description Language VHDL (1) Introduction

Very High Speed Integrated Circuit Har dware Description Language

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

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

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

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

EEL 4712 Digital Design Test 1 Spring Semester 2007

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

8 Register, Multiplexer and

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution Spring 2016

EEL 4783: Hardware/Software Co-design with FPGAs

In our case Dr. Johnson is setting the best practices

VHDL simulation and synthesis

Basic Language Concepts

VHDL Examples Mohamed Zaky

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

Timing in synchronous systems

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

ECE 3401 Lecture 10. More on VHDL

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

VHDL Synthesis Reference

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

COE 405 Design Methodology Based on VHDL

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

Lab # 5. Subprograms. Introduction

Verilog for High Performance

Counters. Counter Types. Variations. Modulo Gray Code BCD (Decimal) Decade Ring Johnson (twisted ring) LFSR

VHDL for Complex Designs

Basic Language Elements

ECOM 4311 Digital Systems Design

Lattice VHDL Training

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

Transcription:

VHDL And Synthesis Review

VHDL In Detail Things that we will look at: Port and Types Arithmetic Operators Design styles for Synthesis

VHDL Ports Four Different Types of Ports in: signal values are read-only out: signal values are write-only Possible to have multiple drivers <- Depends on type of port, will discuss later buffer: comparable to out signal values may be read, as well only 1 driver inout: bidirectional port

Types of VHDL Ports / Signals VHDL a strongly typed language, so all types assigned between signals and ports have to match Standard VHDL Types: type BOOLEAN is (FALSE,TRUE); type BIT is (`0`,`1`); type CHARACTER is (-- ascii set); type INTEGER is range -- implementation_defined type REAL is range -- implementation_defined BIT_VECTOR, STRING, TIME

VHDL Types However instead of using bits, or bit vectors better to use the Std_Logic_1164 types: Instead of a simple 0 or 1 have more states that you can use during simulation to get more information on what is going on with design TYPE STD_ULOGIC IS ( `U`, -- uninitialized `X`, -- Forcing Unknown `0`, -- Forcing 0 `1`, -- Forcing 1 `Z`, -- High Impedance `W`, -- Weak Unknown `L`, -- Weak 0 `H`, -- Weak 1 `-`, -- don`t care); To use Std_Logic_1164 need to include its library with command use IEEE.std_logic_1164.all; Should use Std_logic type on all input/output ports

Std_Logic_1164 Two different base types for the library STD_ULOGIC AND STD_ULOGIC_VECTOR Gives you error messages in cases of multiple concurrent signal assignments More work to do arithmetic as type conversions are needed, some libraries predefined for std_logic STD_LOGIC AND STD_LOGIC_VECTOR When multiple signal assignments present uses resolution function to decide which signal wins over the other signal and is assigned, or whether an unknown signal is assigned Can use the port mode buffer to overcome the resolution function being used (buffer allows only a single signal driver)

Arithmetic Operations Arithmetic operators you will want to use are included in the NUMERIC_STD package Include its libraries with this command use ieee.numeric_std.all; Have two basic modes of operation Signed : 2-complement (sign+absolute value) Unsigned : binary representation of positive integers

Arithmetic Operators Might have to convert std_logic_vector to signed or unsigned type if compiler complains Typecasting to unsigned somesignalunsignedtype <= 6 + unsigned(somesignal) NOTE: Can use Logical and Comparison operators directly on std_logic and std_logic_vector types without type conversion! i.e. not, and, <, =, /=

Understanding Synthesis How does design translate during synthesis? Sensitivity list is usually ignored during synthesis (It is NOT ignored during simulation) A bad sensitivity list could give you a design that looks like it works during simulation, but could synthesize to something that doesn t!

Understanding Synthesis Latches Happen when you have incomplete assignment statements, synthesizer then infers that you want to have memory (this is in an un-clocked process) Example: architecture WRONG of MUX is begin process (A, B, SEL) begin if SEL = `1` then Z<=A; end if; end process; end WRONG; Why is a latch generated for Z instead of a logic path?

Understanding Synthesis Correct way to do assignment statements with if statements architecture OK_1 of MUX is begin process (A, B, SEL) begin Z <= B; if SEL = `1` then Z<=A; end if; end process; end OK_1; For CASE statements, can use the default case ( when others ), and assign signals there to avoid latches

Understanding Synthesis Clocked Processes In synthesis all assignments to signals inside a clocked process will make those signals stored as memory (flip-flop, registers) Have to follow a certain format for this to happen Need to have a clock event in the sensitivity list (or wait on clk event statements) For single edge triggered need to check for specified edge (can do dual edge triggered by checking for both edges)

Understanding Synthesis Example of Register process(clk, RST) begin if (CLK`event and CLK=`1`) then -- combinatorics end if; end process; OR Here can use function to check for rising edge of clock, synthesizer may or may not support this process(clk, RST) begin if (rising_edge(clk) then -- combinatorics end if; end process; **Cant have any other elsif, else in main outer if block!! Nested if blocks ok!!

Understanding Synthesis Example of asynchronous reset FlipFlop process(clk, RST) begin if (RST = `1`) then -- asynchronous register reset elsif (CLK`event and CLK=`1`) then -- combinatorics --Signals assigned here inferred as FF s, reg end if; end process;