Forum Discussion
ABrow3
New Contributor
7 years agoA fairly basic question relating to Modelsim. I need to preset a counter during a simulation. "Force" maintains the counter at a fixed value - I need it to continue counting but from a pre-selected value. Thanks in anticipation. Alan Brown
hans86
New Contributor
7 years agoI agree with Anand that the testbench is the best place, however, if you do want to use force command have a look at the many options and in particular the "-deposit" one;
force {<object_name> <value> [[@]<time_info>][, <value> [@]<time_info>]...
[-deposit | -drive | -freeze] [-cancel [@]<time_info>] [-repeat [@]<time_info>]
• -deposit
(optional) Sets the object to the specified <value>. The <value> remains until the object is
forced again, there is a subsequent driver transaction, or it is unforced with a noforce
command.
Good luck,
hans86