1
\$\begingroup\$

I'm using this script to run the simulation

#vlib work
view structure
vsim -t 1ps -voptargs=+acc -L work BiPhase_tb
do BiPhase_wave.do
run -all

From what I see the simulation time is 1 picosecond, but the siumlation won't stop at that and just continues running (this is my understanding from the status bar underlined in the screenshot below):

Modelsim simulation won't stop where it should

How do I make the simulation time a specified duration (e.g. 1ps)?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

You have told it to run -all. If there is no end condition, nothing that makes it stop like $finish, then it will just keep running and running and running.

If you instead call run 10ns it would run for 10 nanoseconds and then stop.


For the vsim command, the -t flag doesn't specify the length of the simulation, it specifies the precision of the simulation. In your case you are saying that you want every tick of the simulation to be 1ps.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks, I was confused because this is code from a video tutorial and there the simulation completes almost instantaneously and for me it runs for a while, probably there's a bug in the code after all. \$\endgroup\$
    – axk
    Commented Nov 7, 2015 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.