patrick
Junior Member
Offline
Posts: 30
Santa Rosa, CA.
|
Most simple use of $table_model to define a source, in this case a pulse:
`include "disciplines.vams"
module src(p,n); electrical p,n; analog V(p,n) <+ $table_model($abstime, {1,2,3,4,5}, {0,0,1,1,0}, "1CC"); endmodule
Time is used as the lookup variable with the (x,y) data defined using arrays (you'll probably use a file). On the control string, 1 => linear interpolation, "CC" - constant extrapolation both ends.
Patrick
|