Model Technology Model Sim EE Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Drucken & Scannen Model Technology Model Sim EE herunter. Modelsim SE Tutorial by Ani Xavier [email protected] Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken

Inhaltsverzeichnis

Seite 1

Modelsim SE Tutorial byAni [email protected] DepartmentIndian Institute of Technology, Bombay

Seite 2 - CONTENTS

Getting Started with Projectsthe four basic steps to working with a project.• Step 1 — Creating a New Project This creates a .mpf file and a worki

Seite 3 - 1>What problem Modelsim

Step 1 — Creating a New Projecta. Select File > New > Project (Main window) from the menu bar. This opens the Create Project dialog where y

Seite 4

e. you can also Click the Browse button for the Project Location field to select an existing directory where the project file will be stored.f. Leave

Seite 5 - 2>Tool Structure and Flow

Step 2 -Adding items to the project•The following window pops up• Create New File — Create a new VHDL, Verilog or text file using the Source editor.•

Seite 6 - 3>Design Libraries

•Create new file• Press the Create new file option• You can also create a new project file by selecting Project > Add to Project > New File (the

Seite 7

•Add Existing File•You can add an existing file to the project by selecting Project > Add to Project > Existing•File or by right-clicking in the

Seite 8 - The Library Named "work“

•Step 3 — Compiling the Files•The question marks in the Status column in the Project tab denote either the files haven’t been compiled into the projec

Seite 9 - 4>Projects

•ModelSim compiles all the files and changes the symbol in the Status column to a green check mark. A check mark means the compile succeeded.• If com

Seite 10 - Getting Started with Projects

•i intent to demonstrate how to use a self defined resource library the concept of which was introduced earlier•Consider I had earlier created a pro

Seite 11

•now let us move to the current working directory c:/Xilinx/bin/tutorial•Now I make a new resource library by with the graphic interface, select File

Seite 12

CONTENTS1>What problem Modelsim addresses ?2>Tool Structure and Flow3>Design Libraries 4>Projects Step 1 — Creating a New Project

Seite 13 - The following window pops up

• Since this is library is user defined we need to map this logical library “mylib” to a path name of the library .Next we need to map the empty libr

Seite 14

• The same mapping can be done through the modelsim command line using the vmap command vmap <logical_name> <directory_pathname> i

Seite 15 - Add Existing File

•I also add a package called “mypackage” to the current project :•The package basically has a function called “myand” which basically performs a “AND”

Seite 16 - Step 3 — Compiling the Files

•Here is the adder2.vhd that makes use of the resource library “mylib” and the package “mypackage”•The file uses the myxor entity provided by the “myl

Seite 17

•Step 4 — Simulating a Design•To simulate a design• select Simulate > Start Simulation from the menus to open the Start Simulation dialog• Select

Seite 18

4.1>Running the simulation Now you will open the Wave window, add signals to it, then run the simulation.1. Open the Wave debugging window. a.

Seite 19

• We need to give the input vector to the signals.

Seite 20

• We can the input either through a Test bench or by Forcing the values for the input signals• We view the signals from View > signals .•The inputs

Seite 21

3. Run the simulation.b. Click the Run icon in the Main or Wave window toolbar.The simulation runs for 100 ns (the default simulation length) and wave

Seite 22

4.2>Using Break points for debug..•Modelsim provides us the facility of running the simulation till a particular point in the code called a “break

Seite 23

1>What problem Modelsim addresses ?•ModelSim is a verification and simulation tool for VHDL, Verilog, SystemVerilog, and mixed language

Seite 24 - To simulate a design

• For example here I click the test1 entity and the source window opens the adder2.vhd •To set a breakpoint just take your mouse pointer to the line n

Seite 25 - 4.1>Running the simulation

• after creating the break point we can run the simulation else if we have already run the simulation earlier we can use the restart simulation option

Seite 26

When a breakpoint is reached, typically you would want to know one or more signal values. You have several options for checking values:• look at

Seite 27

5>A quick example with Verilog•The procedure remains the same for verilog design as well .•You can use the same project for VHDL or Verilog design

Seite 28

•The code after successful compilation :the simulation is absolutely identical to the previous slides with a vhdl code

Seite 29

6>MIXED VHDL/VERILOG SIMULATION • Modelsim also provides the user the option to compile and simulate designs units which instantiates design units

Seite 30

Heres the verilog file register.v•Here is the top most design unit serialbitadder which uses the registerv module.

Seite 31

• Compiling the files : However, in a mixed VHDL/Verilog design, the Verilog files must be compiled before the VHDL files.. •In general the verilog fi

Seite 32

• Notice the hierarchical mixture of VHDL and Verilog in the design. VHDL levels are indicated by a square “prefix”, while Verilog levels are indicate

Seite 33

7>Command line options :• Modelsim also provides the user with command line options some of which are shown below :

Seite 34

•Modelsim can be invoked in any of the VLSI lab PCs by typing “vsim” at the command prompt .

Seite 36

8>Conclusion and Further learning•This tutorial is more than sufficient for beginners to start simulating any HDL description .• The most important

Seite 37

2>Tool Structure and Flow

Seite 38

3>Design Libraries• VHDL , Verilog designs are associated with libraries, which are objects that contain compiled design units.•A design library is

Seite 39 - 7>Command line options :

•ModelSim uses libraries in two ways: •1) as a local working library that contains the compiled version of your design (ie VHDL , Verilog code etc)

Seite 40

•The Library Named "work“• it is predefined in the compiler and need not be declared explicitly (i.e. library work). It is also the library name

Seite 41 - 6.3g in the following link :

4>Projects•when you create a project in a working directory , a work library gets automatically created for that particular working directory or

Kommentare zu diesen Handbüchern

Keine Kommentare