Model Technology Model Sim EE Manual de usuario

Busca en linea o descarga Manual de usuario para Impresión y escaneo Model Technology Model Sim EE. Modelsim SE Tutorial by Ani Xavier [email protected] Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir

Indice de contenidos

Pagina 1

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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.•

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 12

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

Pagina 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

Pagina 14

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

Pagina 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”

Pagina 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

Pagina 17

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

Pagina 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.

Pagina 19

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

Pagina 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

Pagina 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

Pagina 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

Pagina 23

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 28

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

Pagina 29

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

Pagina 30

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

Pagina 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

Pagina 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

Pagina 33

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

Pagina 34

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

Pagina 36

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

Pagina 37

2>Tool Structure and Flow

Pagina 38

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

Pagina 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)

Pagina 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

Pagina 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

Comentarios a estos manuales

Sin comentarios