ModelSim XE III Tutorial


 

The ModelSim XE (Xilinx Edition) software is no longer suported by Xilinx corporation and free licenses are not avalable. You could learn how to use the simulator from the newer Xilinx ISE packages by yourself or use ModelSim XE software installed in room SI062.

 

Setting Up ModelSim.

Before starting, check to see if ModelSim has been registered.
Click "Start" to "Programs" to "ModelSim XE III 6.4b" folder to "ModelSim"
If the program starts up, then no registration is needed.
If the ModelSim flashes but the program does not start, then ModelSim needs to be registerd.

Before trying to register ModelSim, verify that Xilinx is not running. Close Xilinx if it is runnning.

Click "Start" to "Programs" to "ModelSim XE III 6.4b" folder to "Licensing Wizard".
Click "Continue".
On the following screen, click "OK" and "Yes".
Run the Licensing Wizard one more time to accept licensing information.

License test completed

 

Module Simulation.

If needed, start Xilinx' Project Navigator.

Start Project Navigator

Open your existing project or create HDL module to test.

Open Project

From the "Project" menu choose "New source" of "Test Bench WaveForm" (.tbw) type.
Give a name for this testbench. The name has to be different from the testing module name, contain no spaces or dashes, and have a alphabetical character at the begining.
Click "Next" to continue.

New testbench module

Select HDL module you would like to simulate.
Click "Next".

Select module to Simulate

Select "Combinatorial" configuration in the "Clock information" area if your testing module does not have any clock input.
Click "Next".

Change clock configuration

On this screen you will see inputs (marked blue) and outputs (marked yellow) I/O module signals.
You could change input conditions by clicking on blue area (setting inputs "high" or "low"). You will observe changes in outputs after simulation.

I/O signals

Make apropriate changes on inputs to cover all possible testing conditions.
<! important !> Click "Save" button before going farther!

IO signals before sim

In the Project Navigator in "Sources" tab select Sources for: Behavioral Simulation.
Now you should see your previously created .tbw module.

Sources view

Click "Processes" tab on the window below to see all processes avalable for the simulation.

Processes view

You will see two options for simulating: Simulate Behavioral Model or Generate Expected Simulation Results.

 


Generate Expected Simulation Results.

Double-click on Generate Expected Simulation Results process.

Generate Expected Simulation Results

Press Yes button on confirmation alert windows two times to allow output results appears on the same window with inputs.

Confirm window updates

Verify generated results (yellow-marked signals) with testing conditions (blue-marked signals) for the right module behavior.

Verify Results

 


Simulate Behavioral Model.

Double-click on Simulate Behavioral Model process.

Simulate Behavioral Model

In the new opened ModelSim window undock the wave tab and maximize it to the full screen.

Undock the 'wave' tab

Click on Zoom Full button to stretch the waveform.
Verify generated results with testing conditions for the right module behavior.

12-Verify Results