- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'll try to explain my problem, I'm sorry if there are some English mistakes. I have my design in VHDL, and several VHDL testbenches, each of them simulates one component of my design. I'm using tcl files to automate the simulation for each testbench, one after the other. Below is a short version of my files: go.bat : start "Simulation of Design" /WAIT vsim -runinit -do "do All_Simulations.do" all_simulations.do: do Start_Simulation.do [set simulation [list {RTL arch1}]] do Start_Simulation.do [set simulation [list {RTL arch2}]] … start_simulation.do: # # Compilation ... ... # Simulation vsim -t 1ps -L lpm -L altera_mf -coverage work.testbench run -all quit -sim # Save coverage reports coverage save -code bcefs -instance sim:/testbench/top_inst ../RESULT/UCDB/${ARCH_SIM}.ucdb The first simulation goes well until the last line of my VHDL testbench, which is "report severity failure", is reached. My script is stuck at "run -all", and in ModelSim I see vsim <paused> I was wondering if there were a way to quit the simulation, and not Modelsim? Maybe include something in my VHDL code? I tried to use "stop" and "finish" from ENV package without success, indeed "stop" doesn't change anything and "finish" makes Modelsim quit. I would be really glad if you could help me !! Thank you DamienLink Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you pass stop() an argument? You need to use stop(1).
There's a VHDL testbench example modelsim_example.zip posted in this thread: http://www.alteraforum.com/forum/showthread.php?t=32386 Cheers, Dave- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately i'm not able to check if it works right now
but what I found about stop is : procedure STOP (STATUS : INTEGER) is begin report "Procedure STOP called with status: " & INTEGER'image(STATUS) severity failure; end procedure STOP; There's already a report with severity failure in my testbench, so my guess is a same result. Is there any other difference?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As expected this doesn't make any difference.
I found a beginning of a solution by using the onbreak command before "run -all": onbreak { coverage save -code bcefs -instance sim:/testbench/top_inst ../RESULT/UCDB/${ARCH_SIM}.ucdb quit -sim } run -all My .ucdb is saved and correct but "quit -sim" seems to be invisible- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Simulations will automaticcally stop at event starvation (like you stop the clock). it should also stop on a assert failure.
but to quit the sim, and not modelsim, you can type: quit -sim- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the solution, I just added the command "resume" :
onbreak { coverage save -code bcefs -instance sim:/testbench/top_inst ../RESULT/UCDB/${ARCH_SIM}.ucdb resume } run -all quit -sim Now I can have the hand in my .do file again and i'm no longer in "run -all", that's why I can put "quit -sim" afterwards. That's why I got the following message on Modelsim transcript: "Macro ./Start_Simulation.do PAUSED at line 131" I should have mentioned that before... Thank you for your help!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page