I created a verilogA module.
What it basically does is as below:-
It is a simple sine wave generator.
I stored the sine wave time & amplitude in a text file for one period of the sine wave.
The verilog A code reads the file and generates the sine wave for the entire transient simulation time.
But the problem is:-
If I am not using the strobeperiod, the curve is NOT smooth at all.
But when I use stobeperiod=1ps then it becomes smooth.
I was thinking that the transient simulation will be evaluated at each time point stored in the file.
Can anybody please tell why this is happening.
The simulator will only place timesteps that are sufficient to resolve the equations, not necessarily enough that the sine wave looks like a sine wave. One way to help the simulator take more timesteps is to use the bound_step() function - this should be a little nicer to the simulator (than strobeperiod) as it still has flexibility on the time points, but now they are limited to a maximum time between steps. Work out how many samples/points you wantper cycle and work out the max timestep from there.
I hope that this helps.