ENGR 5865 DIGITAL SYSTEMS

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

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

Symbolically the RS-Latch that is being simulated is the one shown below, it s truth table is also given:

JEE2600 INTRODUCTION TO DIGITAL LOGIC AND COMPUTER DESIGN. ModelSim Tutorial. Prepared by: Phil Beck 9/8/2008. Voter Function

Symbolically a D-Latch can be represented as so, it s truth table is also given:

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

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

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

ENSC 350 ModelSim Altera Tutorial

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180A DIGITAL SYSTEMS I Winter 2015

5 January ModelSim v5.7 Quick Reference Guide

Xilinx Schematic Entry Tutorial

Computer-Aided Digital System Design VHDL

Tutorial on Simulation using Aldec Active-HDL Ver 1.0

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

CS232 VHDL Lecture. Types

Circuit Design and Simulation with VHDL 2nd edition Volnei A. Pedroni MIT Press, 2010 Book web:

EET2141 Project 2: Binary Adder Using Xilinx 7.1i Due Friday April 25

Introduction to VHDL #1

In our case Dr. Johnson is setting the best practices

Xilinx ChipScope ICON/VIO/ILA Tutorial

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

Using ModelSim to Simulate Logic Circuits for Altera FPGA Devices

CSEE W4840 Embedded System Design Lab 1

SCHEMATIC DESIGN IN QUARTUS

Design Flow Tutorial

1 Design Process HOME CONTENTS INDEX. For further assistance, or call your local support center

Getting Started with Xilinx WebPack 13.1

E85: Digital Design and Computer Engineering Lab 2: FPGA Tools and Combinatorial Logic Design

Lecture 5: Aldec Active-HDL Simulator

Test Benches - Module 8

Introduction to Simulation of VHDL Designs Using ModelSim Graphical Waveform Editor. 1 Introduction. For Quartus Prime 16.1

Actel Libero TM Integrated Design Environment v2.3 Structural Schematic Flow Design Tutorial

Using Synplify Pro, ISE and ModelSim

Quartus Counter Example. Last updated 9/6/18

MicroBlaze Tutorial on EDK 10.1 using Sparatan III E Behavioural Simulation of MicroBlaze System

Design Progression With VHDL Helps Accelerate The Digital System Designs

C-Based Hardware Design

Quartus II Version 14.0 Tutorial Created September 10, 2014; Last Updated January 9, 2017

Simulate the Design using the XSim Simulator

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity

Quick Tutorial for Quartus II & ModelSim Altera

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

3 Designing Digital Systems with Algorithmic State Machine Charts

VHDL Simulation. Testbench Design

Verilog Simulation Mapping

Hardware Description Language VHDL (1) Introduction

Xilinx Tutorial Basic Walk-through

Design a three-input, two-output sequential digital circuit which functions as a digital locking mechanism. LOCK ALARM

TKT-1212 Digitaalijärjestelmien toteutus. Lecture 7: VHDL Testbenches Ari Kulmala, Erno Salminen 2008

Verilog Design Entry, Synthesis, and Behavioral Simulation

CPEN 230L: Introduction to Digital Logic Laboratory Lab #6: Verilog and ModelSim

EEL 4783: Hardware/Software Co-design with FPGAs

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

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

NIOS CPU Based Embedded Computer System on Programmable Chip

ECSE-323 Digital System Design. Lab #1 Using the Altera Quartus II Software Fall 2008

Lab 6 : Introduction to Verilog

Advanced module: Video en/decoder on Virtex 5

Review of Digital Design with VHDL

VHDL Introduction to tools. TSTE12 Datorteknik Kent Palmkvist, Thomas Johansson. Version

ECE337 Lab 1 Introduction to VHDL Simulation via Modelsim and Digital Logic Design Refresher

QUARTUS II Altera Corporation

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 6: Quartus II Tutorial and Practice. Name: Date:

University of California, Davis Department of Electrical and Computer Engineering. Lab 1: Implementing Combinational Logic in the MAX10 FPGA

VHDL And Synthesis Review

Lab 6 : Introduction to Verilog

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

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

Lecture 9. VHDL, part IV. Hierarchical and parameterized design. Section 1 HIERARCHICAL DESIGN

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

Assignment 01 Computer Architecture Lab ECSE

Quartus II Tutorial. September 10, 2014 Quartus II Version 14.0

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

CPLD Experiment 4. XOR and XNOR Gates with Applications

Guidelines for Laboratory Sessions:

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 1: Introduction Course arrangements Recap of basic digital design concepts EDA tool demonstration

How to Customize the ModelSim Wave View in the Altera Quartus Simulation Flow

ECE Digital Design Laboratory. Lecture 3 Finite State Machines!

Sequential Statement

TDTS01. Computer Aided Design of Electronics. Lab Compendium

Experiment VERI: FPGA Design with Verilog (Part 2) (webpage: /)

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

Generating Parameterized Modules and IP Cores

Introduction to WebPACK 3.1. Using XILINX WebPACK Software to Create CPLD Designs

After opening the Programs> Xilinx ISE 8.2i > Project Navigator, you will come to this screen as start-up.

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

ENGIN 241 Digital Systems with Lab

COE 405 Design Methodology Based on VHDL

FPGA Design Tutorial

Field Programmable Gate Array

CSEE W4840 Embedded System Design Lab 1

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

Tutorial on Quartus II Introduction Using Verilog Code

ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory

Lab 7 (All Sections) Prelab: Introduction to Verilog

CS/EE Homework 7 Solutions

Vivado Walkthrough ECGR Fall 2015

Transcription:

ENGR 5865 DIGITAL SYSTEMS ModelSim Tutorial Manual January 22, 2007 Introduction ModelSim is a CAD tool widely used in the industry for hardware design. This document describes how to edit/add, compile and simulate VHDL code by using ModelSim software. The example code for this tutorial is a simple counter without testbench but setting the values of selected input signals manually in the waveform. Normally, a complete project should include a testbench for each module to instantiate the entity under test, and to initialize the input signals to the module. You may feel like creating your own testbench and simulate it after you complete this tutorial. Create a Project In the file menu, choose File -> New -> Project This will bring up the following window: Put the project in your preferred directory. Leave work as the default library name. Edit and Compile the Code To edit VHDL files, you may use the editor provided by ModelSim, or any external code editors such as Windows Notepad, which is normally faster and more stable than ModelSim text editor. ModelSim can also understand DOS and UNIX coded text files. If you would prefer the VHDL syntax coloring of ModelSim editor, then you can edit/add a VHDL file by choosing: File -> Add to Project -> New File, or 1

File -> Add to Project -> Existing File If it is a new file, then create a file name such as counter.vhd. Edit it as below: entity counter is port (count : buffer bit_vector(8 downto 1); -- the most significant bit is -- buffer (8) clk : in bit; reset : in bit); end; architecture only of counter is constant tpd_reset_to_count : time := 10 ns; constant tpd_clk_to_count : time := 5 ns; function increment(val : bit_vector) return bit_vector is -- normalize the indexing alias input : bit_vector(val'length downto 1) is val; variable result : bit_vector(input'range) := input; variable carry : bit := '1'; begin for i in input'low to input'high loop result(i) := input(i) xor carry; carry := input(i) and carry; exit when carry = '0'; end loop; return result; end increment; begin ctr: process(clk, reset) begin if (reset = '1') then if reset'event then count <= (others => '0') after tpd_reset_to_count; end if; elsif clk'event and (clk = '1') then count <= increment(count) after tpd_clk_to_count; end if; end process; end only; 2

After you save it, the workspace window will be like this: Highlight the file to activate the compile button on the toolbar: If there is no error in the file, the transcript window at the bottom will show: Run the Simulation and View the Waveform With the file status being changed in the workspace after compilation, you can press the simulate button to activate the simulation process: This will bring up the following window: 3

Choose counter in the library work, and press OK. Then, the workspace switches to the simulation window by itself: Now, you can add selected signals to the waveform. Select View -> Debug Windows -> Objects This will bring up a signals window that looks like this: 4

After the selected signals or signals in the whole region are added, a default waveform will appear with the signals on the vertical axis and the time along the horizontal axis as shown below: If you right click on the signals, you can change the display radix to make it easier to see whether the counter works correctly. Go to Radix, click on unsigned. It is necessary to set values manually for the input since there is no testbench in this case. Right click the signal clock, select clock, define it by setting the parameters: Other input signals are assigned differently. Right click the signal, select force and set a specific value in a binary format. Press the run button on the toolbar, the waveform looks like the one below: 5

The wave that you see above is a box with numbers in it. If you change the radix back to binary, when you see 10000, it means that this is a bus (collection of wires) instead of an individual input or output. You can see the individual wires for each bus if you click next to each signal. The simulation duration can be set by entering a value in the Run Length box. Summary In this tutorial, we have built a project for a counter that is edited and simulated for you to get familiar with ModelSim CAD tool. Neither gate delays nor interconnect delays are considered since it is only a behavioral simulation that gives the least accurate prediction of how the circuit will perform. However, it is very useful during the initial debugging of your design. 6