Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Modelsim .do file to start simulation

Status
Not open for further replies.

hithesh123

Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Activity points
3,548
How do you start simulation using a .do file.

I tried
vsim "filepath"
view wave

The wave window opened, but there were no signals to add to the wave.
 

If you have waveforms stored in a wave.do file, you would type

do wave.do

But this doesn't start simulation. It just brings up the waves.

r.b.
 

If you have waveforms stored in a wave.do file, you would type

do wave.do

But this doesn't start simulation. It just brings up the waves.

r.b.

How do I start simulation.
I am tired of clicking simulation-->start simulation-->select the vhd file from 'work' folder, add signals etc.
 

After compilation using vlog/vcom, use "run" command to start simulation
 

run will run for the time set in the run dialog
run Nns will run for N ns (can also be us or ms)
run -all run simulation until simulation stops.
 

if {!0} {
vlib work
}

vmap work work


vcom \
filename_1.vhd\
filename_2.vhd\
filename_3.vhd\
filename_4.vhd\
filename_testbench.vhd

vsim -t 1ps -novopt testbench_entity_name

if {[catch [set StdArithNoWarnings 1] temp ]} {}
if {[catch [set NumericStdNoWarnings 1] temp ]} {}
if {[catch [set IgnoreWarning 1] temp ]} {}

add wave -r -radix hex sim:/testbench_entity_name/*

run -all

## you can also use the "run 10 us", or "run 100 ns" commands instead of "run -all"
## just write these things to your " file.do " file and put it in the simulation folder and change the modelsim directory as the simulation folder then, type these commands

"do file.do"

then the modelsim will compile those specified files and simulate the testbench then will added the waves and finally it run the simulation...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top