- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I'm writing a TCL script to automate simulations in modelsim. When I left work last night, my script worked fine. This morning it causes modelsim to freeze, and I've identified the script that causes it but I can't figure out why. do "run_$file_name.do" onbreak resume for {set x $holder} {$x >=0} {incr x -1} { run -all } What I'm trying to do, is loop through the number of tests I want to do, and then return control to the script when they are done. This is one of the SEVERAL methods I have tried to use to return control to the script. All of them involved looping of some sort. Modelsim runs all the simulations just fine, but when it tries to return control to the script, it just freezes. I used a while loop before, using signals from the simulation to trigger the loop to stop, but that doesn't work anymore either. Any insight would be greatly appreciated! Thank you in advance!Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
UPDATE:
I've narrowed down my problem further. The last thing my verilog file does in the simulation is writememh("file.txt", mem, 0, i). If I comment out the writememh my script works fine. I don't understand why this matters, because running the simulation without the scripting works fine.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, problem solved. For some reason having writememh as the last thing in the verilog code before the $stop command caused the problem. Moving writememh to a different location in the code fixed the problem. Still have no idea why.

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