I am developping a verilogA module with an agressive transition on a specific current (transition occure at Ith).
To improve the accuracy I would like to reduce time step close to it.
Using $bound_step(10p) should work, but it is for the complete simulation set, so I would prefer to dynamicazlly reduce time step only close to the transition.
For this I try
@(cross(I-Ith,0,1p,1p)) $discontinuity (0),
and I monitor the time step with
I am not able to to see the impact of (cross and discontinuity statment) on the time step.
Is it normal ?
You can call $bound_step with a varying argument - so you could adaptively adjust the value of $bound_step during the simulation. Such a technique is commonly used in VCO models to ensure a sufficient number of points per period. You should call $bound_step on each timestep, but you could conditionally alter the variable you're passing to it.
The $discontinuity is just a hint to the simulator to tell it how to cope - it will already force a timestep at (or close to) the threshold crossing - but it will not necessarily force it to zoom in and keep the timesteps short.
It's not obvious what you're trying to do - maybe showing more of your model would help?
In reply to Andrew Beckett:
thank you, indeed I am now managing the time step much more accuratly.