Special considerations for $now
The $now variable is set within ModelSim by a procedure that converts the current simulator time to user-time units, as specified in the -t argument to vsim command. When no multiplier is specified with the time unit (e.g, 1ps), the procedure formats $now without a time unit. For example:
ModelSim> vsim -t 1ps VSIM > echo $now # 0However, when a multiplier is specified (e.g, 10ps), it's difficult to know how it should behave for a given simulation time. For example, if the current simulation time is 500ps, and resolution is 10ps, should $now be 50 or 500 or 500ps? To remove any ambiguity ModelSim prints the 3rd alternative. For example:
ModelSim> vsim -t 10ps VSIM > echo $now # 0 psFor the when command, special processing is performed on comparisons involving the $now variable. If you specify "when {$now = 100}...", the simulator will stop at time 100, regardless of the multiplier applied to the time unit.
Model Technology Incorporated Voice: (503) 641-1340 Fax: (503)526-5410 www.model.com sales@model.com |