Model Technology Model Sim EE Service Manual

Browse online or download Service Manual for Print & Scan Model Technology Model Sim EE. Model Technology Model Sim EE Technical data User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 113
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
ModelSim EE/SE
Tutorial
Version 5.3
The ModelSim Elite and Special Editions
for VHDL, Verilog, and Mixed-HDL Simulation
Page view 0
1 2 3 4 5 6 ... 112 113

Summary of Contents

Page 1 - Tutorial

ModelSim EE/SE TutorialVersion 5.3The ModelSim Elite and Special Editions for VHDL, Verilog, and Mixed-HDL Simulation

Page 2

10 Introduction ModelSim EE/SE TutorialModelSim EE Tutorial PDF online from the ModelSim Help menu in the EE Documentation group, or find ee_tutor.pd

Page 3 - Software License Agreement

11-100 ModelSim EE/SE TutorialThe List Signal Search dialog box includes these options:You can locate values for the Signal Name: <item_label>

Page 4 - Important Notice

Finding names, and searching for valuesModelSim EE/SE Tutorial 11-101• Search OccurrencesYou can search for the n-th transition or the n-th match o

Page 5 - Limited Warranty

Finding names, and searching for values11-102 ModelSim EE/SE Tutorial

Page 6 - Table of Contents

ModelSim EE/SE Tutorial 12-103Lesson 12 - Using the Wave window The goals for this lesson are:• Practice use of Wave window time cursors.• Practic

Page 7 - Introduction

Using the Wave window12-104 ModelSim EE/SE TutorialUsing time cursors in the Wave windowWhen the Wave window is first drawn, there is one cursor loc

Page 8 - Assumptions

Using the Wave windowModelSim EE/SE Tutorial 12-105You can also move cursors to the next transition of a signal with these toolbar buttons:Zooming -

Page 9 - Comments

Using the Wave window12-106 ModelSim EE/SE Tutorialside of the desired zoom interval, press mouse button 1 and drag to the right. Release when the b

Page 10

Using the Wave windowModelSim EE/SE Tutorial 12-107Syntax.wave.tree zoomrange f1 f2Argumentsf1 f2Sets the waveform display to zoom from time f1 to f

Page 11 - Before you begin

12-108 ModelSim EE/SE TutorialCombining and grouping items in the Wave windowThe Wave window allows you to combine signals into buses or groups. Use

Page 12

Using the Wave windowModelSim EE/SE Tutorial 12-109A group is simply a container for any number of signals. It has no value, and the signals contain

Page 13 - Lesson 1 - Creating a Project

ModelSim EE/SE Tutorial Before you begin 11Before you begin Preparation for some of the lessons leaves certain details up to you. You will decide the

Page 14 - Creating a Project

12-110 ModelSim EE/SE Tutorial

Page 15

ModelSim EE/SE Tutorial Index - 111IndexAAssertion errors 33BBatch-mode simulation 41Breakpoints 27continuing simulation after 28CCode Coverage 93cove

Page 16

112 - Index ModelSim EE/SE Tutorialof a Verilog design 65Home pageModel Technology’s home-page URL 9IInitialization file, see Project filesKKeyboard s

Page 17

ModelSim EE/SE Tutorial Index - 113applying stimulus to 25display values with examine command 69listing in region 25placing top-level Verilog signals

Page 18

12 Before you begin ModelSim EE/SE Tutorial Reusing commands from the Main transcriptModelSim’s Main transcript may be saved, and the resulting file

Page 19

ModelSim EE/SE Tutorial 1-13Lesson 1 - Creating a ProjectThe goals for the first lesson are:• Explore the Welcome to ModelSim dialog box features.•

Page 20 - 1-20 ModelSim EE/SE Tutorial

Creating a Project1-14 ModelSim EE/SE TutorialCreating a ProjectWith the 5.3 release, ModelSim incorporates the file extension .mpf to denote projec

Page 21 - Basic VHDL simulation

Creating a ProjectModelSim EE/SE Tutorial 1-15Clicking the Create a Project button opens the Create a New Project dialog box and a project creation

Page 22

Creating a Project1-16 ModelSim EE/SE TutorialNote: A project's .mpf file is always located in the project's directory.6 Once you have spe

Page 23 - (PROMPT: vsim counter)

Creating a ProjectModelSim EE/SE Tutorial 1-178 Select Options > Edit Project. This opens the Edit Project dialog box.Click the down arrow next t

Page 24

Creating a Project1-18 ModelSim EE/SE TutorialThe Edit Project dialog also allows you to import a new source file into libraries local to the projec

Page 25 - (PROMPT: add wave/counter/*)

Creating a ProjectModelSim EE/SE Tutorial 1-19This completes the process of creating a project by copying an existing project. The newly created pro

Page 26

2ModelSim /VHDL, ModelSim /VLOG, ModelSim /LNL, and ModelSim /PLUS are produced by Model Technology Incorporated. Unauthorized copying, duplication, o

Page 27 - (PROMPT: bp counter.vhd 18)

1-20 ModelSim EE/SE Tutorial

Page 28

ModelSim EE/SE Tutorial 2-21Lesson 2 - Basic VHDL simulation The goals for this lesson are:• Create a library.• Compile a VHDL file.• Start the s

Page 29

Basic VHDL simulation2-22 ModelSim EE/SE TutorialIn the Create a New Library dialog box select Create: a new library and a logical mapping to it. Ma

Page 30

Basic VHDL simulationModelSim EE/SE Tutorial 2-23Complete the compilation by selecting counter.vhd from the file list and clicking Compile. Select D

Page 31 - Debugging a VHDL design

Basic VHDL simulation2-24 ModelSim EE/SE TutorialThe Load Design dialog box allows you to select the library and the top-level design unit to simula

Page 32

Basic VHDL simulationModelSim EE/SE Tutorial 2-256 Select the entity counter and choose Load to accept these settings.7 Now you can open all of the

Page 33 - (PROMPT: run)

Basic VHDL simulation2-26 ModelSim EE/SE TutorialNote how the Run Length selector on the toolbar now indicates 100 (ns is the current default resolu

Page 34

Basic VHDL simulationModelSim EE/SE Tutorial 2-27The arrow in the Source window points to the next HDL statement to be executed. (If the simulator i

Page 35

Basic VHDL simulation2-28 ModelSim EE/SE Tutorial14 Select the Continue Run button to resume the run that you interrupted. VSIM will hit the breakpo

Page 36

Basic VHDL simulationModelSim EE/SE Tutorial 2-29In the Wave window, you can use cursors to:• probe for values - Signal values update whenever you

Page 37

3Software License AgreementThis is a legal agreement between you, the end user, and Model Technology Incorporated (MTI). By opening the sealed package

Page 38

Basic VHDL simulation2-30 ModelSim EE/SE Tutorial17 When you’re done experimenting, quit the simulator by entering the command:quit -forceThis comma

Page 39

ModelSim EE/SE Tutorial 3-31Lesson 3 - Debugging a VHDL design The goals for this lesson are:• Show an example of a VHDL testbench - a VHDL archite

Page 40 - 3-40 ModelSim EE/SE Tutorial

Debugging a VHDL design3-32 ModelSim EE/SE Tutorialvmap work library_2ModelSim modifies the modelsim.ini file for you.5 Start the simulator by selec

Page 41

Debugging a VHDL designModelSim EE/SE Tutorial 3-339 To add top-level signals to the Wave window, enter the command:add wave *(Signals MENU: View &g

Page 42

Debugging a VHDL design3-34 ModelSim EE/SE Tutorial12 First, change the simulation assertion options. Make this Main menu selection: Options > Si

Page 43 - Startup = do startup.do

Debugging a VHDL designModelSim EE/SE Tutorial 3-3515 From the Main toolbar select the Run button. (Main MENU: Run > Run 1000 ns) (PROMPT: run)No

Page 44

Debugging a VHDL design3-36 ModelSim EE/SE Tutorial17 Expand the variable named test_patterns by clicking the [+]. (You may need to resize the windo

Page 45 - Tcl/Tk and ModelSim

Debugging a VHDL designModelSim EE/SE Tutorial 3-3721 In the Variables window, expand test_patterns and test_pattern(6) again. Then highlight the .s

Page 46

Debugging a VHDL design3-38 ModelSim EE/SE Tutorial25Perform these steps on Triggers page in the Modify Display Properties (list) dialog box:• Dese

Page 47

Debugging a VHDL designModelSim EE/SE Tutorial 3-3927 In the List window select the signal you want to change, then make the property changes in the

Page 48

4from MTI. All copies of the SOFTWARE, whether provided by MTI or made by you, shall remain the property of MTI or its licensors. You will maintain a

Page 49 - Solutions to the examples

3-40 ModelSim EE/SE Tutorial

Page 50 - Example shortcuts

ModelSim EE/SE Tutorial 4-41Lesson 4 - Running a batch-mode simulation The goals for this lesson are:• Run a batch-mode VHDL simulation.• Execute

Page 51

Running a batch-mode simulation4-42 ModelSim EE/SE Tutorial7 To run the batch-mode simulation, enter the following command:vsim -wav saved.wav count

Page 52

ModelSim EE/SE Tutorial 5-43Lesson 5 - Executing commands at startup The goals for this lesson are:• Specify the design unit to be simulated on the

Page 53

Executing commands at startup5-44 ModelSim EE/SE TutorialAlso notice that all the windows are open. This is because the view * command is included i

Page 54

ModelSim EE/SE Tutorial 6-45Lesson 6 - Tcl/Tk and ModelSim This lesson is divided into several Tcl examples intended to give you a sense of Tcl/Tk’s

Page 55

Tcl/Tk and ModelSim6-46 ModelSim EE/SE TutorialModelSim generates Tcl commands and passes them to the Tcl parser for execution. Commands may be gene

Page 56

Tcl/Tk and ModelSimModelSim EE/SE Tutorial 6-47The custom-traffic-light interfaceThe subject of our main Tcl/Tk lesson is a simple traffic-light con

Page 57

Tcl/Tk and ModelSim6-48 ModelSim EE/SE TutorialThe result is a traffic intersection interface similar to this illustration:wm widgetCalls to the ope

Page 58

Tcl/Tk and ModelSimModelSim EE/SE Tutorial 6-49Tk widgets The intersection illustration points out several Tcl/Tk "widgets". A widget is s

Page 59 - Basic Verilog simulation

5Limited WarrantyLIMITED WARRANTY. MTI warrants that the SOFTWARE will perform substantially in accordance with the accompanying written materials for

Page 60

Tcl/Tk and ModelSim6-50 ModelSim EE/SE Tutorialexamples ready-to-run in the tcl_tutorial\solutions directory. Invoke these commands from the ModelSi

Page 61 - (PROMPT: vlog counter.v)

Tcl/Tk and ModelSimModelSim EE/SE Tutorial 6-51mouse), or middle (3 button mouse). You can also select a ModelSim or VSIM prompt from the Main trans

Page 62

Tcl/Tk and ModelSim6-52 ModelSim EE/SE TutorialExample 1 - Create a "hello world" button widget.Before you begin the examples make sure yo

Page 63 - (PROMPT: add list \counter\*)

Tcl/Tk and ModelSimModelSim EE/SE Tutorial 6-532 Drag the mouse across the buttons and notice what happens in the Main transcript.Push one of the bu

Page 64

Tcl/Tk and ModelSim6-54 ModelSim EE/SE Tutorialsource intersection.tcldraw_intersection2 From the ModelSim prompt, use the procedure set_light_state

Page 65

Tcl/Tk and ModelSimModelSim EE/SE Tutorial 6-55and indicates the next line to be executed. (If the simulator is not evaluating an executable process

Page 66

Tcl/Tk and ModelSim6-56 ModelSim EE/SE TutorialThe update is accomplished by using a when statement.9 After you have added your North/South widget,

Page 67

Tcl/Tk and ModelSimModelSim EE/SE Tutorial 6-57(add wave *). You can also change the run length in the Main window. Try using the Run buttons in the

Page 68

Tcl/Tk and ModelSim6-58 ModelSim EE/SE Tutorial5 Reuse the original commands when you're ready to run the state machine (remember, to copy a pr

Page 69

ModelSim EE/SE Tutorial 7-59Lesson 7 - Basic Verilog simulation You must be using ModelSim/PLUS or ModelSim/VLOG for this lesson.The goals for this

Page 70

ModelSim EE/SE Tutorial Table of Contents - 6Table of ContentsIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 71

Basic Verilog simulation7-60 ModelSim EE/SE Tutorial4 Before you compile a source file, you’ll need a design library to hold the compilation results

Page 72

Basic Verilog simulationModelSim EE/SE Tutorial 7-61Note: Remember, a library directory should not be created using UNIX/DOS commands - always use t

Page 73 - Mixed VHDL/Verilog simulation

Basic Verilog simulation7-62 ModelSim EE/SE TutorialNote: The order in which you compile the two Verilog modules is not important (other than the so

Page 74

Basic Verilog simulationModelSim EE/SE Tutorial 7-63The Load Design dialog box allows you to select a design unit to simulate from the specified lib

Page 75 - (PROMPT: vmap work mixed)

Basic Verilog simulation7-64 ModelSim EE/SE TutorialHDL items can also be copied from one window to another (or within the Wave and List windows) wi

Page 76

Basic Verilog simulationModelSim EE/SE Tutorial 7-65The Structure window shows the hierarchical structure of the design. By default, only the top le

Page 77

Basic Verilog simulation7-66 ModelSim EE/SE Tutorial16 Next change the run length to 500 on the Run Length selector and select the Run button again.

Page 78

Basic Verilog simulationModelSim EE/SE Tutorial 7-67Your Source window won’t look exactly like this illustration because your simulation very likely

Page 79

Basic Verilog simulation7-68 ModelSim EE/SE TutorialSelect a display radix of Decimal for the signal count. Click OK. This causes the List window ou

Page 80

Basic Verilog simulationModelSim EE/SE Tutorial 7-6922 Select the Run -all button from the Main toolbar to resume execution of the simulation.(PROMP

Page 81 - (MENU: Design > Compile)

ModelSim EE/SE Tutorial Introduction 7IntroductionChapter contentsSoftware versions . . . . . . . . . . .

Page 82

Basic Verilog simulation7-70 ModelSim EE/SE TutorialThis causes the debugger to step over the function call on line 30. The Step button on the toolb

Page 83

Basic Verilog simulationModelSim EE/SE Tutorial 7-71When you add a cursor, it is drawn in the middle of the display. Once you have more than one cur

Page 84

Basic Verilog simulation7-72 ModelSim EE/SE TutorialAnother way to position multiple cursors is to use the mouse in the time box tracks at the botto

Page 85

ModelSim EE/SE Tutorial 8-73Lesson 8 - Mixed VHDL/Verilog simulationYou must be using ModelSim /PLUS for this lesson.The goals for this lesson are:•

Page 86

Mixed VHDL/Verilog simulation8-74 ModelSim EE/SE Tutorial3 Let’s create a new library to hold the mixed design. Make this menu selection in the Main

Page 87

Mixed VHDL/Verilog simulationModelSim EE/SE Tutorial 8-754 Now you can map the new library to the work library. From the Main menu select Design >

Page 88

Mixed VHDL/Verilog simulation8-76 ModelSim EE/SE TutorialA group of Verilog files can be compiled in any order. Note, however, in a mixed VHDL/Veril

Page 89 - Update icon

Mixed VHDL/Verilog simulationModelSim EE/SE Tutorial 8-77On the Design tab select the top entity and click Load.8 From the Main menu select View >

Page 90

Mixed VHDL/Verilog simulation8-78 ModelSim EE/SE TutorialNotice the hierarchical mixture of VHDL and Verilog in the design. VHDL levels are indicate

Page 91

Mixed VHDL/Verilog simulationModelSim EE/SE Tutorial 8-7913 Now click on the line "s0: cache_set(only)" in the Structure window.The Source

Page 92 - 25 Quit the simulator

8 Introduction ModelSim EE/SE TutorialModelSim’s graphic interfaceWhile your operating system interface provides the window-management frame, ModelS

Page 93

Mixed VHDL/Verilog simulation8-80 ModelSim EE/SE TutorialBefore you quit, try experimenting with some of the commands you’ve learned from Lesson 1.

Page 94

ModelSim EE/SE Tutorial 9-81Lesson 9 - Simulating with Performance Analyzer This lesson introduces the Performance Analyzer and shows you how the ma

Page 95

Simulating with Performance Analyzer9-82 ModelSim EE/SE Tutorialvcom ringrtl.vhd testring.vhd config_rtl.vhd(MENU: Design > Compile)6 Use the vsi

Page 96

Simulating with Performance AnalyzerModelSim EE/SE Tutorial 9-83Make a note of the run time of the simulation. (Your run time will depend on the pro

Page 97

Simulating with Performance Analyzer9-84 ModelSim EE/SE TutorialNotice that the overhead of running the Performance Analyzer is very small (your res

Page 98

Simulating with Performance AnalyzerModelSim EE/SE Tutorial 9-85Speed up the simulationThe information provided by the Performance Analyzer can be u

Page 99

Simulating with Performance Analyzer9-86 ModelSim EE/SE Tutorial(MENU: Design > Compile)14 Reset the simulation to time zero and restart with the

Page 100

Simulating with Performance AnalyzerModelSim EE/SE Tutorial 9-87A lot of time is still being spent in the loops. To further reduce simulation time,

Page 101 - 11-101

Simulating with Performance Analyzer9-88 ModelSim EE/SE Tutorial20 Run timerun.do again and note the difference in simulation run time. Your simulat

Page 102 - ModelSim EE/SE Tutorial

Simulating with Performance AnalyzerModelSim EE/SE Tutorial 9-8922 Set the Under% filter to "2" and click the Update icon. This will filte

Page 103 - Using the Wave window

ModelSim EE/SE Tutorial Introduction 9We also assume that you have a working knowledge of VHDL and Verilog. Although ModelSim is an excellent tool to

Page 104 - ModelSim EE/SE Tutorial

Simulating with Performance Analyzer9-90 ModelSim EE/SE Tutorial23 Take a look at the Ranked Profile view.view_profile_ranked(MENU: View > Other

Page 105 - 12-105

Simulating with Performance AnalyzerModelSim EE/SE Tutorial 9-9124 Use the report command to output a file with the profile data.profile report -hie

Page 106

Simulating with Performance Analyzer9-92 ModelSim EE/SE TutorialThis command outputs a hierarchical profile of performance data with the file name h

Page 107 - 12-107

ModelSim EE/SE Tutorial 10-93Lesson 10 - Simulating with Code Coverage This lesson will introduce ModelSim’s Code Coverage feature, detail the use o

Page 108

Simulating with Code Coverage10-94 ModelSim EE/SE TutorialThis switch configures the test bench – the ringrtl.vhd file. Changing this entry in the t

Page 109 - 12-109

Simulating with Code CoverageModelSim EE/SE Tutorial 10-95Note that both testring.vhd and control.vhd are below 90% and, therefore, shown in red in

Page 110

Simulating with Code Coverage10-96 ModelSim EE/SE Tutorial10 Now, take note of how many times the clocked processes have been executed. Then edit th

Page 111

Simulating with Code CoverageModelSim EE/SE Tutorial 10-97Note that now both testring.vhd and control.vhd are above 95% and therefore shown is green

Page 112

Simulating with Code Coverage10-98 ModelSim EE/SE Tutorial16 Compile the lower level blocks with all optimizations switched off. This will cause mor

Page 113

ModelSim EE/SE Tutorial 11-99Lesson 11 - Finding names, and searching for values The goals for this lesson will be to:• Find items by name in tree

Comments to this Manuals

No comments