Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

controlling modelsim through a tcl script

831 views
Skip to first unread message

Nachiket Kapre

unread,
Dec 30, 2002, 1:41:43 PM12/30/02
to
Hi,
I am user of modesim PE. I was interested in knowing if there is a way
of controlling simulations start,stop,restart etc a simulation through
a Tcl script or a tk itnerface other than modelsim's own.
so far i have managed to pipe commands into modelsim(vsim) uptil run.
but i am presently unaboe to find a way to break a current simulation.
basically i want to run vsim without a gui and still be able to
control it.
i cant use fli since i dont have SE. please suggest.

regards,
nachiket kapre.
paxonet communications inc.

Mike Treseler

unread,
Dec 30, 2002, 3:46:19 PM12/30/02
to
Nachiket Kapre wrote:


> so far i have managed to pipe commands into modelsim(vsim) uptil run.
> but i am presently unaboe to find a way to break a current simulation.


Consider repeatedly running for a fixed time with a command like
run 20
instead of
run -all

This will give you control of the interface between runs.

see also:
http://www.model.com/resources/appnotes/vhdl_testbench.asp#h3

-- Mike Treseler

Marc

unread,
Dec 31, 2002, 5:08:42 AM12/31/02
to
> Hi,
> I am user of modesim PE. I was interested in knowing if there is a way
> of controlling simulations start,stop,restart etc a simulation through
> a Tcl script or a tk itnerface other than modelsim's own.
> so far i have managed to pipe commands into modelsim(vsim) uptil run.
> but i am presently unaboe to find a way to break a current simulation.
> basically i want to run vsim without a gui and still be able to
> control it.

To start Modelsim without gui, run 'vsim -c' command.
You can use Tcl/Tk to control Modelsim (Modelsim commands are tcl
commands). By example you can execute this commamd 'puts "2+2 = [expr
2+2]"'

Marc

Nachiket Kapre

unread,
Jan 1, 2003, 3:24:25 AM1/1/03
to
mmatt...@yahoo.fr (Marc) wrote in message news:<22355a.021231...@posting.google.com>...

> To start Modelsim without gui, run 'vsim -c' command.
> You can use Tcl/Tk to control Modelsim (Modelsim commands are tcl
> commands). By example you can execute this commamd 'puts "2+2 = [expr
> 2+2]"'

Okay during my trials this is what i came across:-
1. when modelsim is onvoked with "vsim.exe" it is simple to open a
command pipeline to the modelsim interpreter and issue commands as and
when required whithout any gui required.
2. if vsim -gui is issued then the gui opens but no command pipeline
can be established. Is there a specific person for this? I assume that
since a command line is made available it may create conflicts if a
command pipeline is feeding this intepreter prompt simulatenously
alongwith a user.

One way to work aroung the GUI problem would be to open a socket
connection with your external Tcl script and Modelsim. But i somehow
find this way of doing IPC rather blunt.Does anyone have a better way
of doing an IPC into modelsim from another script/application.

regards,
nachiket.

0 new messages