0% found this document useful (0 votes)
34 views

ModelSim Tutorial Brief

The document provides instructions for using ModelSim simulation software, including how to create a new project, add files, write and compile code, simulate designs, and view waveforms. Key steps are to create a new project, add Verilog files, compile the code to check for errors, simulate the testbench to check functionality, and add signals to waveforms to view output. The tutorial aims to help users learn how to setup simulations and debug designs using various ModelSim features.

Uploaded by

Jithin Karamel
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

ModelSim Tutorial Brief

The document provides instructions for using ModelSim simulation software, including how to create a new project, add files, write and compile code, simulate designs, and view waveforms. Key steps are to create a new project, add Verilog files, compile the code to check for errors, simulate the testbench to check functionality, and add signals to waveforms to view output. The tutorial aims to help users learn how to setup simulations and debug designs using various ModelSim features.

Uploaded by

Jithin Karamel
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI

Second Semester 2010-2011 CS C342 Advanced Computer Organization ModelSim Tutorial

Simulation is third pillar in scientific study beside theory & practical


1. Create a New Project

2. Save it to My Documents. The default library should be work(more on this later).

3. Add /create files new files to your project.

if you select Create File choose VERILOG Type of file in the dropbox menu, bcoz all file shoud have .v extension

4. Write code into your files. Left window shows your project and right window shows your code.

5. Once code is written, compile it.

6. Errors in compilation are written in lower window. Double clicking on error will give you detailed list of errors.

7. Once you have compiled your code, we simulate it to check functionality (testing). Switch to library tab in left window. Your compiled modules are in your library work (added to work when project was created).

8. Load your testbench for simulation. Remember only testbench can run not all modules that you write.

to load double click on testbench module

9. Run your testbench.

To run, select Simulate->Run->Run All You will see the output in lower window.

10.Another way to simulate is through waveform. Load your testbench or module. Add your signals to wave.

Select all the signals (input and output signals). Right click and select Add to Wave > Selected Signals. This will add all the signals to wave. 11. Assign value to signals by clicking create/Modify waveform.

Note: In create-Modify Waveform window select Pattern as Constant. Creating a wave

Change the values as required

Wave output

Note: to see the output waveform click Create/Modify waveform window->select constant pattern->click next without changing the value click finish. 12.Happy Coding , removing compilation error and most importantly debugging !!!!!!!!

You might also like