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.

stop simulation using modelsim .do file

Status
Not open for further replies.

syedshan

Advanced Member level 1
Joined
Feb 27, 2012
Messages
463
Helped
27
Reputation
54
Reaction score
26
Trophy points
1,308
Location
Jeonju, South Korea
Activity points
5,134
Hi all,

I am relatively new to writing script for modelsims I have loads of questions.
I know the basics of .do file and can start compilation and simulation using .do file.

1. Is it TCL language that we are wiritng as .do file
2. I want to write .do file such that after some time or certain condition, the file forces the simulation to stop
3. Also when I run the .do file, it first checks that either simulation is currently ON or not, if ON, then it closes that and then start again.

I looked but I cannot find. Note that I am using Xilinx ISE integrated with modelsim 6.5
 

1. Yes
2. Its a lot easier to do these checks inside your HDL testbench. For VHDL, the quickest and dirtiest way to stop a testbench is:

assert (not end_of_sim) report "Simulation finished!" severity failure;

Although the cleanest way is to stop all stimulus - ie. halt input processes and turn the clock off.

3. You cant really do that, because it will invoke VSIM.
 

oh...as I said there are loads of questions which ofcourse I will learn by doing and self-searching.
but few I am posting if you get time.

First of all, It was very silly of me to ask the question 1. since when we run the .do file we go thru tools->tcl->execute macro.
1. What I want to discuss is that tcl has extension of .tk then what is .do and how is tcl normal and tcl for mentor graphics vary.
2. the commands like vsim, vcom etc. etc. I dont think these commands belong to tcl itself, but they are mentor graphics provided commands. Then why do we call it tcl macro.
3. Will doing tcl with modelsim, can I claim that I have learnt tcl as well (although I dont know its uses now, but nevertheless).
4. Is there any way to directly run the .do command without opening the modelsim and then modelsim starts itself. Is making the .bat file the way


secondly it might seem quite naive, but is there any document that you have which can give the keywords et
 

.do seems to be the general extension for a file that executes commands within a program. So for modelsim, you can directly invoke vsim and vcom even though they are not part of the tcl standard. But you can put other tcl in there too. You can run tcl files from inside modelsim by entering

do my_file.do #or .tcl, or any tcl file

from the modelsim command line

3. If all you do is invoke vsim and vcom etc, then not really
4. I usually use it from in modelsim, but I think you can (but I never do).

The main tcl page is tcl.tk, and you can get a list of modelsim commands via the help.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top