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

Similar documents
Hardware Description Language VHDL (1) Introduction

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

Digital Systems Design

ELCT 501: Digital System Design

Lattice VHDL Training

VHDL Examples Mohamed Zaky

Chapter 6 Combinational-Circuit Building Blocks

VHDL for Synthesis. Course Description. Course Duration. Goals

[VARIABLE declaration] BEGIN. sequential statements

Chapter 2 Basic Logic Circuits and VHDL Description

Topics. Midterm Finish Chapter 7

Programable Logic Devices

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

Field Programmable Gate Array

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

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

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

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

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

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

Lecture 12 VHDL Synthesis

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

ECE 331 Digital System Design

Advanced Electronics Lab.

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

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

MCMASTER UNIVERSITY EMBEDDED SYSTEMS

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

Introduction to VHDL #1

Verilog for High Performance

CprE 583 Reconfigurable Computing

קורס VHDL for High Performance. VHDL

Topics. Midterm Finish Chapter 7

Introduction to VHDL #3

Menu. Introduction to VHDL EEL3701 EEL3701. Intro to VHDL

EEL 4712 Digital Design Test 2 Spring Semester 2008

Review of Digital Design with VHDL

Computer-Aided Digital System Design VHDL

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

EEL 4783: Hardware/Software Co-design with FPGAs

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

Lecture 4. VHDL Fundamentals. George Mason University

VHDL for Complex Designs

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

EL 310 Hardware Description Languages Midterm

ENGIN 241 Digital Systems with Lab

VHDL Structural Modeling II

Basic Language Concepts

ENGN1640: Design of Computing Systems Topic 02: Lab Foundations

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

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

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

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

Sign here to give permission for your test to be returned in class, where others might see your score:

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

EEL 4712 Digital Design Test 1 Spring Semester 2008

Using Library Modules in VHDL Designs

Today. Comments about assignment Max 1/T (skew = 0) Max clock skew? Comments about assignment 3 ASICs and Programmable logic Others courses

FPGA for Software Engineers

VHDL And Synthesis Review

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

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

Using Library Modules in VHDL Designs

register:a group of binary cells suitable for holding binary information flip-flops + gates

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations

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

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points)

CprE 583 Reconfigurable Computing

Introduction to VHDL Design on Quartus II and DE2 Board

VHDL: A Crash Course

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

EEL 4712 Digital Design Test 1 Spring Semester 2007

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

COE 405 Design Methodology Based on VHDL

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

Contents. Appendix D VHDL Summary Page 1 of 23

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

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

FPGA for Complex System Implementation. National Chiao Tung University Chun-Jen Tsai 04/14/2011

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

Laboratory Exercise 3

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

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

ECE 545 Lecture 12. FPGA Resources. George Mason University

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

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

V1 - VHDL Language. FPGA Programming with VHDL and Simulation (through the training Xilinx, Lattice or Actel FPGA are targeted) Objectives

Digital Design with FPGAs. By Neeraj Kulkarni

HDLs and SystemVerilog. Digital Computer Design

VHDL for FPGA Design. by : Mohamed Samy

Summary of FPGA & VHDL

Using Library Modules in VHDL Designs. 1 Introduction. For Quartus II 12.1

Writing VHDL for RTL Synthesis

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

ECE 341 Midterm Exam

ACS College of Engineering. Department of Biomedical Engineering. Logic Design Lab pre lab questions ( ) Cycle-1

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

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

Transcription:

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

Standard ICs PLD: Programmable Logic Device CPLD: Complex PLD FPGA: Field Programmable Gate Array 2

x 1 x 2 x 3 Programmable connections P 1 OR plane P 2 P 3 P 4 Programmable Logic Array (PLA) AND plane f 1 f 2 3

Field-Programmable Gate Arrays (FPGA) An array of logic blocks (Logic Elements) Each logic block typically has a small number of inputs and one output. Large RAM blocks Embedded multipliers Interconnection wires and switches (routing channels) I/O blocks In-System Programming (ISP) with JTAG port Storage cells are volatile. 4

x 1 Lookup table Logic Elements of FPGA 0/1 x 2 0/1 0/1 0/1 f x 1 x 2 0 0 1 1 0 1 0 1 f 1 1 0 0 1 (a) Circuit for a two-input LUT (b) f 1 = x 1 x 2 + x 1 x 2 x 1 1 0 0 f 1 LUTs usually have 4 to 6 inputs (16 to 64 storage cells). 1 x 2 (c) Storage cell contents in the LUT A two-input lookup table 5

Select In 1 Flip-flop Out In 2 LUT D Q In 3 Clock Inclusion of a flip-flop with a LUT 6

x 3 f x 1 x 2 x 1 x 2 0 0 0 1 x 2 0 f 1 1 f 2 0 x 3 0 f 1 f 2 0 1 1 1 f A section of a programmed FPGA 7

Altera Cyclone II, EP2C20 on Altera DE1 18752 Logic Elements (LEs) Each LE has a four-input look-up table (LUT) 52 M4K Memory blocks (4 Kbits plus 512 parity bits) Total RAM bits: 239616 26 Embedded multipliers 4 Phase-Locked Loops (PLLs) User I/O pins: 315 8

Major steps of design with programmable devices 9

VHDL A hardware description language 10

Example VHDL code 11

Design Entity Entity Entity Declaration Architecture 12

LIBRARY ieee; USE ieee.std_logic_1164.all; std_logic_1164: a package containing the definition of STD_LOGIC Data type: STD_LOGIC Some of legal values of STD_LOGIC: 0, 1, Z, - Z: high-impedance state - : don t care 13

ENTITY Declaration ENTITY entity-name IS PORT ( [SIGNAL] signal_name{,signal_name}:[mode] type_name {; [SIGNAL] signal_name{,signal_name}:[mode] type_name} ) ; END entity_name ; Example ENTITY fulladd IS PORT ( Cin, x, y : IN STD_LOGIC ; s, Cout : OUT STD_LOGIC ) ; END fulladd ; 14

Modes of signals in entity ports Mode IN OUT INOUT BUFFER Purpose Input Output The signal only appears on the left of <=. Input and output Output The signal can appear both on the left and right sides of <=. 15

Architecture ARCHITECTURE architecture_name OF entity_name IS [SIGNAL declarations] [CONSTANT declarations] [TYPE declarations] [COMPONENT declarations] [ATTRIBUTE specifications] BEGIN {COMPONENT instantiation statement ;} {CONCURRENT ASSIGNMENT statement ;} {PROCESS statement ;} {GENERATE statement ;} END [architecture_name]; Declaration region Architecture body 16

Example: a 2-to-1 multiplexer MUX 2-1 17

Representation of numbers in VHDL code SIGNAL C: STD_LOGIC_VECTOR(1 TO 3); The data type STD_LOGIC_VECTOR represents a linear array of STD_LOGIC data objects. C is defined as a three-bit STD_LOGIC signal. Each bit of C can be referred to separately using names C(1), C(2), and C(3). The syntax (1 TO 3) specifies that the mostsignificant bit in C is C(1) and the least-significant bit is C(3). 18

SIGNAL X: STD_LOGIC_VECTOR(3 DOWNTO 0); X is a four-bit STD_LOGIC_VECTOR signal. The syntax (3 DOWNTO 0) specifies that the mostsignificant bit in X is X(3) and the least-significant bit is X(0). Signal Assignment Statements X(3) <= 1 ; X(2) <= 1 ; X(1) <= 0 ; X(0) <= 0 ; X <= 1100 ; Single quotes for one-bit signals Double quotes for multibit signals 19

Example: MUX 4-1 20

Conditional Signal Assignment LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY mux2to1 IS PORT ( w0, w1, s : IN STD_LOGIC ; f : OUT STD_LOGIC ) ; END mux2to1 ; ARCHITECTURE Behavior OF mux2to1 IS BEGIN f <= w0 WHEN s = '0' ELSE w1 ; END Behavior ; A 2-to-1 multiplexer using a conditional signal assignment 21

Example: MUX2_1x4 22

Select Signal Assignment LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY mux2to1 IS PORT ( w0, w1, s : IN STD_LOGIC ; f : OUT STD_LOGIC ) ; END mux2to1 ; ARCHITECTURE Behavior OF mux2to1 IS BEGIN WITH s SELECT f <= w0 WHEN '0', w1 WHEN OTHERS ; END Behavior ; VHDL code for a 2-to-1 multiplexer 23

Process Statement Sensitivity list When any signal in the sensitivity list changes value, statements are evaluated in sequential order. Sequential Assignment Statements: IF-THEN-ELSE statement CASE statement Assignments to signals are only visible when all the statements in the process have been evaluated. If there are multiple assignments to the same signal, only the last one has any visible effect. 24

Using a process statement to describe a 2-to-1 multiplexer, MUX 2-1 Sensitivity list 25

IF-THEN-ELSE statement 26

Example of CASE statement: MUX 4-1 27

CASE statement 28

Process statement for combinational circuits The sensitivity list must include all input signals. All values of each output signal must be defined (specified) for all combination of values of all input signals. 29

Process statement for sequential circuits The sensitivity list only includes some input signals which can trigger the sequential circuits. For example, clock and asynchronous reset. The values of each output signal may not be fully specified. For example, the output signal of a latch. 30

Example: Sequence detector 31

There are 3 processes in the entity Sdet1_mo. 32

The first process is a combinational circuit. 33

The second process is a combinational circuit. 34

The third process is a sequential circuit. 35

Example: TwoComp for computing 2 s complement of a binary number 36

Example: TwoComp 37

First process for a combinational circuit 38

Second process for a combinational circuit (Note that TwoComp is Mealy type.) 39

Third process for a sequential circuit 40

Synchronous reset 41

Asynchronous reset 42

Example: Sequence generator Sgen1 43

Example: Sgen1 Arithmetic package 44

Sgen1: Two combinational circuits 45

Convert an integer to an std_logic_vector 46

Sgen1: Process for a sequential circuit 47

Example: Shift register Shreg4_hvL 48

Example: Shreg4_hvL 49

Concatenate operator: & 50

Structure description Use a full adder as a component to construct a 4-bit adder 51

VHDL code for a full adder 52

53

COMPONENT instantiation statement: port map 54