Reputation: 119
I want to calculate the total execution time that should appear on a Modelsim console by taking the difference between starting time and finishing time. I have one solution but didn't give me a final answer.
I am doing
set start [clock seconds];
run -all
set finish [clock seconds];
puts [expr {$finish - $start}]
But this didn't give me the final diff time.
Is there any way I can modify my test bench code to do that for me?
Upvotes: 3
Views: 3061
Reputation: 119
I wrote a .do file as mentioned below it works well but left with one problem after run -all, my simulation got halted this halting is a part of a program but after halting, model Sim (paused), is it possible that in do file I can write some thing that Model Sim wouldn't get paused than my last two instructions would works accordingly.
restart set start [clock seconds] run -all set finish [clock seconds] puts [expr {$finish - $start}]
Upvotes: 1
Reputation: 629
You could use the open source VUnit VHDL test automation framework. It will report the execution time for each test as well as the total time for an entire regression suite. Thus you can avoid writing your own Modelsim TCL scripts.
Disclosure: I am one of the authors.
Upvotes: 4