CMPT 250: Computer Architecture. Using LogicWorks 5. Tutorial Part 1. Somsubhra Sharangi

Similar documents
Concurrent Signal Assignment Statements (CSAs)

Basic Language Concepts

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

Hardware Description Language VHDL (1) Introduction

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

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

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

Active-HDL. Getting Started

CCE 3202 Advanced Digital System Design

VHDL Examples Mohamed Zaky

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

VHDL VS VERILOG.

Constructing VHDL Models with CSA

Mridula Allani Fall Fall

ELCT 501: Digital System Design

ENGIN 241 Digital Systems with Lab

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

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

Field Programmable Gate Array

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0

Experiment 8 Introduction to VHDL

Introduction to VHDL. Yvonne Avilés Colaboration: Irvin Ortiz Flores Rapid System Prototyping Laboratory (RASP) University of Puerto Rico at Mayaguez

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

Getting Started with Xilinx WebPack 13.1

Digital Systems Design

Lecture 5: Aldec Active-HDL Simulator

Tutorial on VHDL Compilation, Simulation, and Synthesis

Chapter 2 Basic Logic Circuits and VHDL Description

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

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

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

Sequential Statement

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

JUNE, JULY 2013 Fundamentals of HDL (10EC45) PART A

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

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

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

structure syntax different levels of abstraction

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

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

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

Hardware Description Languages. Modeling Complex Systems

VHDL for FPGA Design. by : Mohamed Samy

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston

Hardware Synthesis. References

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

Inferring Storage Elements

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

C-Based Hardware Design

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

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

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

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

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

VHDL: A Crash Course

Libraries. Library ieee; Use ieee.std_logic_1164.all; Use ieee.std_logic_arith.all; Use ieee.std_logic_signed.all; Use ieee.std_logic_unsigned.

VHDL simulation and synthesis

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

COS/ELE 375 Verilog & Design Tools Tutorial

Digital System Design

Control Unit: Binary Multiplier. Arturo Díaz-Pérez Departamento de Computación Laboratorio de Tecnologías de Información CINVESTAV-IPN

Control and Datapath 8

CCE 3202 Advanced Digital System Design

EXPERIMENT NUMBER 7 HIERARCHICAL DESIGN OF A FOUR BIT ADDER (EDA-2)

Tutorial on VHDL and Verilog Applications

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

Introduction to Verilog

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

In our case Dr. Johnson is setting the best practices

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

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

Lecture 3 Introduction to VHDL

Tutorial on Simulation using Aldec Active-HDL Ver 1.0

Introduction to VHDL. Main language concepts

Entity, Architecture, Ports

Chapter 2 Getting Hands on Altera Quartus II Software

EITF35: Introduction to Structured VLSI Design

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 3

1. What is y-chart? ans: The y- chart consists of three domains:- behavioral, structural and geometrical.

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

Advanced Electronics Lab.

Modeling Complex Behavior

Sequential Logic - Module 5

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

Contents. Appendix B HDL Entry Tutorial 2 Page 1 of 14

Vivado Walkthrough ECGR Fall 2015

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

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

TUTORIAL On USING XILINX ISE FOUNDATION DESIGN TOOLS: Mixing VHDL and Schematics

Lecture 2: Introduction to System Design, VHDL Basics. TIE Logic Synthesis Arto Perttula Tampere University of Technology Fall 2017

VHDL And Synthesis Review

EE261: Intro to Digital Design

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 3

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

101-1 Under-Graduate Project Digital IC Design Flow

Design a 4 bit-adder. Then design a 4-7 decoder to show the outputs. Output Sum(4 bits) Adder. Output carry(1 bit)

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

Lattice VHDL Training

Transcription:

CMPT 250: Computer Architecture Using LogicWorks 5 Tutorial Part 1 Somsubhra Sharangi

What is VHDL? A high level language to describe digital circuit Different that a programming language ( such as Java) : It cannot be run. Can only be simulated. Sometimes Inputs are given in parallel(e.g. two inputs of an AND gates) Used to model only digital circuit system. Specific, not as versatile Other HDL: Verilog, System C

Why Learn VHDL? EDA Computer Architecture Requirement Analysis HDL/ RTL Design Functional Verification GDSII IC Fabrication Easy to design Large Scale and complex circuits through modular approach of programming. Easy verification of your design without having to use expensive hardware. Faster and more robust design with the code test improve cycle.

A First Example: 2 input AND Open LogicWorks File New Model Wizard Empty Model Independent Design

Contd. -Select type VHDL -Naming Convention: - Must not start with number -Must not end with underscores -Must not be VHDL reserved words -Give a meaningful name to your design

Contd. -Define Your Device Ports -For Single Bit - Select Function Type as Input/Output - Give a Name to the Port - Click Add Single Bit -For Multiple Bit - The first two steps are same as single bit ports - Specify the range of bits with Left/Right bit number - Click Add Vector

Generated VHDL stub corresponding to a Digital Circuit black-box library IEEE; use IEEE.std_logic_1164.all; entity myand is port( A : in std_logic; ); end myand; B : in std_logic; C : out std_logic architecture arch1 of myand is Begin -- Your VHDL code goes here A B Circuit C end arch1;

Add the code to make AND library IEEE; use IEEE.std_logic_1164.all; entity myand is port( A : in std_logic; ); end myand; B : in std_logic; C : out std_logic A B architecture arch1 of myand is Begin -- Your VHDL code goes here C <= A AND B AFTER 10NS; end arch1; C Save your Work!

Verifying your work: Compile -VHDL Compile - The Compilation Tab should appear at the bottom window - It should say 0 errors - If There are errors you can select an error message and then click on the Goto button to go the line which is causing the error. - After correcting all error and successful compilation go to the next step

Verifying your work: Run Simulation I/O Panel Stop Simulation Run Simulation Button Same as VHDL->Run Simulation Two other Simulation Buttons which we ll use less frequently -Code Window Turns Grey -Code not Editable While Simulation is running

Verifying your work: Use I/O Panel - If not already open click on the I/O Panel button(see previous slide) to open the I/O Tab in bottom window - If you cannot see your ports appearing click the Browse button and open the I/OPanelDefault.html file from the Script folder in your installation location. - Once you see your ports click on the + sign to set their values to 1 and 0 to set their values to 0. -You should change the values of input ports only and observe the values of output port change by itself -Verify the truth table of your device.

Verifying your work: Timing Timing Panel Button Time Scale Zoom In/Out Simulation Speed Total Time Truth Table of AND a 0 1 0 1 b 0 0 1 1 c 0 0 0 1 -If you cannot see a waveform similar to the one displayed here adjust the Time Scale using Zoom In/Out buttons -For sequential circuits we will need to use the Speed button to adjust the Speed of simulation

Looking Back At this point you have successfully wrote and tested the VHDL code for a two input AND gate Take some time to look back and familiarize with the procedure of Coding and Testing Make sure you remember the different LogicWorks tools and controls you just learnt. We ll try some more circuits, but the basic procedure will remain same. Only thing that will change is we ll write different VHDL Code and will try out more test cases.

Something Useful: 1 bit Full Adder entity myfulladder is port( A : in std_logic; B : in std_logic; Cin : in std_logic; S : out std_logic; Cout : out std_logic ); end myfulladder; s1 architecture arch1 of myfulladder is signal s1,s2,s3 :std_logic; constant gate_delay: Time := 5 ns; begin L1: s1 <= (A xor B) after gate_delay; L2: s2 <= (Cin and s1) after gate_delay; L3: s3 <= (A and B) after gate_delay; L4: S <= (s1 xor Cin) after gate_delay; L5: Cout <= (s2 or s3) after gate_delay; end arch1; s3 s2

Sequential Circuits: D Flip-Flop entity dff is port( ); end dff; d : in std_logic; ena : in std_logic; q : out std_logic architecture arch1 of dff is begin process (d, ena) begin if (ena = '1') then q <= d; end if; end process; end arch1;

Something Useful: 3 bit Counter use IEEE.numeric_std.all; entity my3bitcounter is port(d : in std_logic_vector(0 to 2); ENA : in std_logic; LOAD: in std_logic; Q : out std_logic_vector(0 to 2) ); end my3bitcounter; architecture arch1 of my3bitcounter is begin clk_proc:process(ena) variable COUNT : unsigned(2 downto 0):="000"; begin if ENA'EVENT AND ENA='1' then if LOAD = '1' then COUNT := D;

Something Useful: 3 bit Counter COUNT := D; else COUNT := COUNT + 1; end if; end if; Q <= COUNT after 5NS; end process clk_proc; end arch1; 000 111 001 110 010 101 011 100

Practice Problems 4x1 MUX 1 Bit Serial Adder