Lab 1 - Counter. Create a project. Add files to the project. Compile design files. Run simulation. Debug results

Similar documents
Agilent Mass Hunter Software

License Manager Installation and Setup

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment

Simrad ES80. Software Release Note Introduction

NOTES. Figure 1 illustrates typical hardware component connections required when using the JCM ICB Asset Ticket Generator software application.

Welch Allyn CardioPerfect Workstation Installation Guide

HP Unified Functional Testing

Agilent MassHunter Workstation Software

Fig.25: the Role of LEX

McAfee Network Security Platform

Start Here. Remove all tape and lift display. Locate components

How to Design REST API? Written Date : March 23, 2015

EasyMP Multi PC Projection Operation Guide

View, evaluate, and publish assignments using the Assignment dropbox.

pdfapilot Server 2 Manual

Alphabetic Input and Ties (Musical Example: Finlandia by Jean Sibelius)

Epson iprojection Operation Guide (Windows/Mac)

McAfee Network Security Platform

PPS: User Manual. Krishnendu Chatterjee, Martin Chmelik, Raghav Gupta, and Ayush Kanodia

UT1553B BCRT True Dual-port Memory Interface

Deposit a Technical Report in PubRep

Polycom RealPresence Media Editor Quick Start

YOU ARE: AND THIS IS:

EasyMP Network Projection Operation Guide

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables

From Dependencies to Evaluation Strategies

Installation Guide AT-VTP-800

Compilers Spring 2013 PRACTICE Midterm Exam

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the

Registering as an HPE Reseller

vcloud Director Service Provider Admin Portal Guide vcloud Director 9.1

Example: 2:1 Multiplexer

Epson Projector Content Manager Operation Guide

Reducing a DFA to a Minimal DFA

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

TECHNICAL NOTE MANAGING JUNIPER SRX PCAP DATA. Displaying the PCAP Data Column

Distributed Systems Principles and Paradigms

VMware Horizon JMP Server Installation and Setup Guide. Modified on 06 SEP 2018 VMware Horizon 7 7.6

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

COMPUTER EDUCATION TECHNIQUES, INC. (MS_W2K3_SERVER ) SA:

LINX MATRIX SWITCHERS FIRMWARE UPDATE INSTRUCTIONS FIRMWARE VERSION

CS201 Discussion 10 DRAWTREE + TRIES

Guide for sending an Electronic Dental referral

McAfee Network Security Platform

2 Computing all Intersections of a Set of Segments Line Segment Intersection

Load the ribbon on the ribbon cartridge. Load the ribbon cartridge in the printer. Fan the cards, and then load them in the input hopper.

Online Portal Guide. Access your policy information, documentation, claim forms and claims history easily and securely.

Assembly Instructions

Agilent G2724AA Spectrum Mill Extractor for Applied Biosystems/MDS Sciex QSTAR Data Files Quick Start Guide

Use Case Deployment Using vrealize Suite Lifecycle Manager. Modified on 21 DEC 2017 VMware Validated Design 4.1

OPERATION MANUAL. DIGIFORCE 9307 PROFINET Integration into TIA Portal

Registering as a HPE Reseller. Quick Reference Guide for new Partners in Asia Pacific

Agilent G3314AA BioConfirm Software

Zenoss Service Impact Installation and Upgrade Guide for Resource Manager 5.x and 6.x

Dr. D.M. Akbar Hussain

Discussion 1 Recap. COP4600 Discussion 2 OS concepts, System call, and Assignment 1. Questions. Questions. Outline. Outline 10/24/2010

the machine and check the components Black Yellow Cyan Magenta Starter Ink Cartridges

Media Player Using Media Player Downloading Media Files Playing Music Playing Movie Using Playlist...

Introduction To Files In Pascal

Definition of Regular Expression

Intelligent Operations Use Case Deployment Using vrealize Suite Lifecycle Manager

CS 340, Fall 2014 Dec 11 th /13 th Final Exam Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string.

Upgrading from vrealize Automation 7.1, 7.2 to 7.3 or 7.1, 7.2, 7.3 to March 2018 vrealize Automation 7.3

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

10.5 Graphing Quadratic Functions

Package Contents. Wireless-G USB Network Adapter with SpeedBooster USB Cable Setup CD-ROM with User Guide (English only) Quick Installation

Upgrading from vrealize Automation 7.1 or Later to June 2018 vrealize Automation 7.4

vcloud Director Tenant Portal Guide vcloud Director 9.0

EasyMP Network Projection Operation Guide

the machine and check the components AC Power Cord Quick Setup Guide User s Guide Accessory Order Form

E201 USB Encoder Interface

Agenda & Reading. Class Exercise. COMPSCI 105 SS 2012 Principles of Computer Science. Arrays

Zenoss Resource Manager Installation Guide

Stained Glass Design. Teaching Goals:

CMPSC 470: Compiler Construction

McAfee Web Gateway

CKX-CCSW Confluency checker INSTRUCTIONS. Software for research/education This software is designed to use in research and or education fields.

16 Bit Software Tools ADDU-21xx-PC-1 Code Generation and Simulation

McAfee Network Security Platform

1 Drawing 3D Objects in Adobe Illustrator

Address/Data Control. Port latch. Multiplexer

MTH 146 Conics Supplement

OUTPUT DELIVERY SYSTEM

box Boxes and Arrows 3 true 7.59 'X' An object is drawn as a box that contains its data members, for example:

LCI/USB LonWorks Commissioning Interface

Lexical analysis, scanners. Construction of a scanner

12 <= rm <digit> 2 <= rm <no> 2 <= rm <no> <digit> <= rm <no> <= rm <number>

Upgrading from vrealize Automation 6.2 to 7.1

CSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011

Midterm 2 Sample solution

the machine and check the components USB Interface Cable Drum Unit Assembly (including Standard Toner Cartridge)

Scenarios. VMware Validated Design for IT Automating IT 4.0 EN

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis

ECE 468/573 Midterm 1 September 28, 2012

Passwords Passwords Changing Passwords... <New Passwords> 130 Setting UIM PIN... <UIM PIN/UIM PIN2> 130 Unlocking a Locked UIM...

Introductory Information. Setup Guide. Introduction. Space Required for Installation. Overview of Setup. Preparations. Install the Printheads

Introductory Information. Setup Guide. Introduction. Overview of Setup. Space Required for Installation. Preparations. Attach the Ink Tanks

Network Interconnection: Bridging CS 571 Fall Kenneth L. Calvert All rights reserved

Scenarios. VMware Validated Design 4.0 VMware Validated Design for IT Automating IT 4.0

COMP 423 lecture 11 Jan. 28, 2008

Transcription:

1 L 1 - Counter A project is collection mechnism for n HDL design under specifiction or test. Projects in ModelSim ese interction nd re useful for orgnizing files nd specifying simultion settings. The following digrm shows the sic steps for simulting design within ModelSim project. Crete project Add files to the project Compile design files Run simultion Deug results There re two points to rememer out projects in ModelSim: You hve to crete working lirry in the project flow. Projects re persistent. In other words, they will open every time you invoke ModelSim unless you specificlly close them.

2 Introduction In this l you will prctice creting project in ModelSim nd lern sic VHDL. At minimum, projects hve work lirry nd session stte tht is stored in.mpf file. A project my lso consist of: HDL source files or references to source files other files such s READMEs or other project documenttion locl lirries references to glol lirries Design files for this lesson The design for this l is simple counter with n ssocited testench. The files cn e found on the clss wesite: www-cs.ccny.cuny.edu/~gertner Click on CSC 343 then on L Assignments nd Tutoril.

3 Creting new project Figure 1: The Crete Project dilog Before you cn simulte design, you must first crete project nd compile the source code into tht project's lirry. 1 Crete new folder in your home directory. Renme it l_1. Go to the clss wesite nd downlod counter.vhd nd tcounter.vhd. 3 Crete sudirectory for your project. Renme the sufolder counter. 2 Strt ModelSim. Right click on the desktop t Linux mchine. Click on Open Terminl. Type vsim in the UNIX shell prompt. Upon opening ModelSim for the first time, you will see the Welcome to ModelSim dilog. Click Close. Select File > Chnge Directory nd chnge to the sufolder you creted in step 1. 3 Crete new project. Select File > New > Project from the menu r in the Min window. This opens dilog where you enter Project Nme, Project Locrion (i.e., directory), nd Defult Lirry Nme (Figure 1). The defult lirry is where compiled design units will reside. Type counter in the Project Nme field.

4 Adding ojects to the project Once you click OK to ccept the new project settings, you will see lnk Project t in the Workspce re of the Min window nd the Add items to the Project dilog will pper (Figure 2). From this dilog you cn crete new design file, dd n existing file, dd folder for orgniztion purposes, or crete simultion configurtion (discussed elow). Figure 2: Adding new items to project 1 Add two existing files. Click Add Existing File. This opens the Add file to Project dilog (Figure 3). This dilog lets you rowse to find files, specify the file type, specify which folder to dd the file to, nd identify whether to leve the file in its current loction or to copy it to the project directory. c Click Browse. Open the l_1/counter directory in your ModelSim instlltion tree. d Select counter.vhd, hold the <Ctrl> key down, nd then select tcounter.vhd. Figure 3: The Add file to Project dilog 1 e f Click Open nd then OK. Click Close to dismiss the Add items to the Project dilog. 1

5 You should now see two files listed in the Project t of the Workspce pne (Figure 4). Question mrk icons (?) in the Sttus column men the file hsn t een compiled or the source file hs chnged since the lst successful compile. The other columns identify file type (e.g., Verilog or VHDL), compiltion order, nd modified dte. Figure 4: Newly dded project files disply? for sttus Chnging compile order (VHDL) By defult ModelSim performs defult inding of VHDL designs when you lod the design with vsim (CR-224). However, you cn elect to perform defult inding t compile time. (For detils, see "Defult inding" (UM-68) in the User s Mnul.) If you elect to do defult inding t compile, then the compile order is importnt. Follow these steps to chnge compiltion order within project. 1 Chnge the compile order. Select Compile > Compile Order. This opens the Compile Order dilog ox (Figure 5). Click the Auto Generte utton. ModelSim "determines" the compile order y mking multiple psses over the files. It strts compiling from the top; if file fils to compile due to dependencies, it moves tht file to the ottom nd then recompiles it fter compiling the rest of the files. It continues in this mnner until ll files compile successfully or until file(s) cn t e compiled for resons other thn dependency. Alterntively, you cn select file nd use the Move Up nd Move Down uttons to put the files in the correct order. c Click OK to close the Compile Order dilog. Figure 5: The Compile Order dilog ox move up / down uttons 1

6 Compiling nd loding design 1 Compile the files. Right-click nywhere in the Project t nd select Compile > Compile All from the pop-up menu. ModelSim compiles oth files nd chnges the symol in the Sttus column to green check mrk. A check mrk mens the compile succeeded. If compile fils, the symol will e red X, nd you will see n error messge in the Trnscript pne. 2 2 3 Figure 7: The structure t for loded design 2 View the design units. Click the Lirry t in the workspce. Click the "+" icon next to the work lirry. You should see two compiled design units, their types (modules in this cse), nd the pth to the underlying source files (Figure 6). 3 Lod the tcounter design unit. Doule-click the tcounter design unit. You should see 3 new ts in the Min window Workspce. The sim t displys the structure of the tcounter design unit (Figure 7). The Files t contins informtion out the underlying source files. The Memories t lists ll memories in the design.

7 Running the simultion Figure 8: Adding signls to the Wve window Now you will run the simultion. 1 Set the grphic user interfce to view the Wve deugging pne in the Min window. Enter view wve t the commnd line. This opens one of severl pnes ville for deugging. To see list of the other pnes, select View > Deug Windows from the menu r. Most deugging windows will open s pnes within the Min window. The Dtflow window will open s seprte window. You my need to move or resize the windows to your liking. Pnes within the Min window cn zoomed to occupy the entire Min window or undocked to stnd lone. 2c 2 Add signls to the Wve window. In the Workspce pne, select the sim t. Right-click tcounter to open popup context menu. c Select Add > Add to Wve (Figure 8). Four signls re dded to the Wve window. Figure 9: Wves eing drwn in the Wve window 3 Run the simultion. Click the Run icon in the Min or Wve window toolr. The simultion runs for 100 ns (the defult simultion length) nd wves re drwn in the Wve window. Type run 500 ns t the VSIM> prompt in the Min window. The simultion dvnces 500 ns for totl of 600 ns (Figure 9).

8 c Click the Run -All icon on the Min window toolr. d The simultion continues running until you execute rek commnd or it hits sttement in your code tht hlts the simultion. Click the Brek icon. The simultion stops running.

9 Zooming the wveform disply Figure 10: Zooming in with the mouse pointer Zooming lets you chnge the disply rnge in the wveform pne. There re numerous methods for zooming the disply. 1 Zoom the disply using vrious techniques. Click the Zoom Mode icon on the Wve window toolr. c d In the wveform pne, click nd drg down nd to the right. You should see lue verticl lines nd numers defining n re to zoom in (Figure 10). Select View > Zoom > Zoom Lst. The wveform pne returns to the previous disply rnge. Click the Zoom In 2x icon few times. 1 Figure 11: Zooming out with the mouse pointer e f In the wveform pne, click nd drg up nd to the right. You should see lue line nd numers defining n re to zoom out (Figure 11). Select View > Zoom > Zoom Full. 1e

10 Using cursors in the Wve window Cursors mrk simultion time in the Wve window. When ModelSim first drws the Wve window, it plces one cursor t time zero. Clicking nywhere in the wveform pne rings tht cursor to the mouse loction. You cn lso dd dditionl cursors; nme, lock, nd delete cursors; use cursors to mesure time intervls; nd use cursors to find trnsitions. Working with single cursor 1 Position the cursor y clicking nd drgging. Click the Select Mode icon on the Wve window toolr. 1e c Click nywhere in the wveform pne. A cursor is inserted t the time where you clicked (Figure 12). Drg the cursor nd oserve the vlue pne. The signl vlues chnge s you move the cursor. This is perhps the esiest wy to exmine the vlue of signl t prticulr time. d Confirm tht the wveform is correctly counting upwrd..

10 ModelSim L wrp-up This concludes the tutoril. Before continuing you need to end the current simultion nd close the current project. 1 Select Simulte > End Simultion. Click Yes. 2 Select the Project t in the Min window Workspce. 3 Right-click in this t to open context popup menu nd select Close Project. Then click OK. If you do not close the project, it will open utomticlly the next time you strt ModelSim.