DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

Similar documents
Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 11/01/17

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

Board-Data Processing. VHDL Exercises. Exercise 1: Basics of VHDL Programming. Stages of the Development process using FPGA s in Xilinx ISE.

FPGA Design Flow. - from HDL to physical implementation - Victor Andrei. Kirchhoff-Institut für Physik (KIP) Ruprecht-Karls-Universität Heidelberg

Introduction to VHDL #1

Experiment 0 OR3 Gate ECE 332 Section 000 Dr. Ron Hayne June 8, 2003

CCE 3202 Advanced Digital System Design

EENG 2910 Project III: Digital System Design. Due: 04/30/2014. Team Members: University of North Texas Department of Electrical Engineering

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

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

Tutorial on Simulation using Aldec Active-HDL Ver 1.0

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

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

CCE 3202 Advanced Digital System Design

Lecture 4. VHDL Fundamentals. George Mason University

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

Lecture 3 Introduction to VHDL

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

N-input EX-NOR gate. N-output inverter. N-input NOR gate

ECE 545 Lecture 4. Simple Testbenches. George Mason University

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

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

Hardware Synthesis. References

ELEC 204 Digital System Design LABORATORY MANUAL

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

Chip Design with FPGA Design Tools

Very High Speed Integrated Circuit Har dware Description Language

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

Inthis lecture we will cover the following material:

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Lecture 4. VHDL Basics. Simple Testbenches

Xilinx ISE Synthesis Tutorial

ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EEM Digital Systems II

EEL 4783: Hardware/Software Co-design with FPGAs

Laboratory of Digital Circuits Design: Design, Implementation and Simulation of Digital Circuits Using Programmable Devices

Lab 3 Sequential Logic for Synthesis. FPGA Design Flow.

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

Field Programmable Gate Array

Getting Started with Xilinx WebPack 13.1

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 8

Tutorial: Working with Verilog and the Xilinx FPGA in ISE 9.2i

VHDL And Synthesis Review

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

EITF35: Introduction to Structured VLSI Design

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

The board is powered by the USB connection, so to turn it on or off you plug it in or unplug it, respectively.

14:332:331. Computer Architecture and Assembly Language Fall Week 5

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

FPGA briefing Part II FPGA development DMW: FPGA development DMW:

ECT 224: Digital Computer Fundamentals Using Xilinx StateCAD

Design Entry: Schematic Capture and VHDL ENG241: Digital Design Week #4

Verilog Design Entry, Synthesis, and Behavioral Simulation

Lab 6 : Introduction to Verilog

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

Building Combinatorial Circuit Using Behavioral Modeling Lab

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

Test Benches - Module 8

Tutorial on FPGA Design Flow based on Xilinx ISE WebPack and ModelSim. ver. 2.0

EE 1315: DIGITAL LOGIC LAB EE Dept, UMD

Introduction to Xilinx Vivado tools

Multi-Output Circuits: Encoders, Decoders, and

Hardware Description Language VHDL (1) Introduction

TSIU03, SYSTEM DESIGN LECTURE 2

Menu. Introduction to VHDL EEL3701 EEL3701. Intro to VHDL

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

MANUAL XILINX ISE PROJECT NAVIGATOR

Tutorial: Working with the Xilinx tools 14.4

Solutions - Homework 2 (Due date: October 9:30 am) Presentation and clarity are very important!

Verilog for Combinational Circuits

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

PALMiCE FPGA Probing Function User's Manual

XILINX ISE AND SPARTAN 3AN TUTORIAL

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

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

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09

CSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack and ModelSim. ver. 1.5

VHDL Examples Mohamed Zaky

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

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

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

C-Based Hardware Design

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

Lab 2: Barrel Shifter Design

Introduction to VHDL #3

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

Basic Language Constructs of VHDL

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

Lecture 12 VHDL Synthesis

VHDL for FPGA Design. by : Mohamed Samy

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

Verilog Design Principles

Tutorial: ISE 12.2 and the Spartan3e Board v August 2010

In our case Dr. Johnson is setting the best practices

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

ECE 545 Lecture 12. FPGA Resources. George Mason University

FPGA Design Flow 1. All About FPGA

VHDL 2 IDENTIFIERS, DATA OBJECTS AND DATA TYPES

Transcription:

DIGITAL LOGIC WITH VHDL (Fall 23) Unit DESIGN FLOW DATA TYPES LOGIC GATES WITH VHDL TESTBENCH GENERATION

DESIGN FLOW Design Entry: We specify the logic circuit using a Hardware Description Language (e.g., VHDL, Verilog). Functional Simulation: Also called behavioral simulation. Here, we will only verify the logical operation of the circuit. Stimuli is provided to the logic circuit, so we can verify the outputs behave as we expect. Physical Mapping: The inputs/outputs of our logic circuit are mapped to specific pins of the FPGA. Timing Simulation: It simulates the circuit considering its timing behavior (delays between inputs and outputs) Implementation: A configuration file ( bitstream file) is generated and then downloaded onto the FPGA

DESIGN FLOW (ISE Software) Synthesis: It makes sure that the VHDL file is syntax free. If ok, the logical circuit is ready for behavioral simulation. Simulate Behavioral Model: It requires the creation of a VHDL file in which we specify the stimuli to the logic circuit. This file is called testbench. Implement Design (Translate + Map + Place & Route): Generate Programming File: Here, a configuration file (bitstream) is generated. This file will configure the FPGA so that the logic circuit is implemented on it. Configure Target Device (impact software): Here, the configuration file (.bit file) previously created is downloaded onto the FPGA. At this stage, we can verify whether the actual hardware is actually working.

LOGIC DATA TYPES Type: There are many ways to define data types in VHDL. A very common IEEE standard is std_logic_64. The following types are available: std_logic, std_logic_vector, std_logic_2d The std_logic type define nine (9) possible states: U : Uninitialized X : Forced Unknown : Zero : One Other data types: integer array Z : High impedance W : Weak unknown L : Weak Zero H : Weak One - : Don t care User-defined

DATA TYPES: Mode: Physical characteristics of inputs/outputs of a logic circuit. The following modes are available in VHDL: IN : Input port of a circuit OUT : Output port of a circuit INOUT : Bidireccional port: It can be an input and an output at different times Very useful when working with bidireccional buses. BUFFER : Output port of a circuit. It has the property that this output can be fed back to the circuit.

LOGIC GATES IN VHDL AND, OR, NOT, XOR: Let s work on the following examples: a) Write the VHDL code to generate the output f given the truth table. b) Write the VHDL code to generate the output F given the circuit X Y Z f C B A F (a) (b)

EXAMPLE (b): VHDL Coding library ieee; use ieee.std_logic_64.all; entity ex_a is port ( A, B, C: in std_logic; F: out std_logic); end ex_a; architecture struct of ex_a is signal x,y: std_logic; begin x <= C nor B; y <= A and not(b); F <= not(x xor y); end struct; I/Os are specified here logic circuit Internal Description of the logic circuit is specified here

We provide stimuli We retrieve the outputs Testbench Generation: library ieee; use ieee.std_logic_64.all; entity tb_ex_a is end tb_ex_a; Unit Under Test (UUT) architecture behav of tb_ex_a is component ex_a port ( A,B,C: in std_logic; F: out std_logic); end component; -- Inputs signal A: std_logic := ''; signal B: std_logic := ''; signal C: std_logic := ''; -- Outputs signal F: std_logic; begin uut: ex_a port map (A=>A, B =>B, C=>C, F=>F); stim_proc: process -- Stimulus process begin wait for ns -- reset state -- Stimuli: A <=''; B <=''; C <=''; wait for 2 ns; A <=''; B <=''; C <=''; wait for 2 ns; wait; end process; end;

EXAMPLE (b): UCF file (for Xilinx Design Flow) We need to map the I/Os of our logic circuit to physical FPGA pins. In a board (e.g., Nexys 3) these FPGA pins are connected to specific resources: LEDs, switches, buttons, etc. UCF FILE: # Inputs NET "A" LOC = "T"; # SW NET "B" LOC = "T9"; # SW NET "C" LOC = "V9"; # SW2 FPGA pins: T T9 U9 U6 NEXYS 3 schematic names: ON () SW2 SW SW LED # Outputs NET "F" LOC = "U6"; # LED OFF() I/O names: A B C F

EXAMPLE: Light Control There are three available switches. We want to light an LED when only one of the switches is in the ON position (logic ). ON () SW2 SW SW OFF () SW2 SW SW LED LED

EXAMPLE: Security Combination A lock is opened only when a certain combination of switches exist: Switches: For the NEXYS3 board, the lock will be represented by an LED. ON () SW7 SW6 SW5 SW4 SW3 SW2 SW SW OFF ()