The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> help for this special model https://designers-guide.org/forum/YaBB.pl?num=1264136014 Message started by fencl_xu on Jan 21st, 2010, 8:53pm |
Title: help for this special model Post by fencl_xu on Jan 21st, 2010, 8:53pm Hi,all Firts, i'm a newer in verilog-a and this forum. i need a special model used in hspice, that a delay cell for ckout from ckin,i have constant delay model as follow,but actually i need is delay time----dtime,can control vs time when used in hspice,such as .tran in hspice,when t=t1 dtime=20n,t1-->t2 ,dtime vary from 20n to 30n lineraly. how should i do ? `include “discipline.h” module delay_cell (in, out); input in; output out; electrical in, out; parameter real dtime = 20n; analog begin V(out) <+ delay(V(in), dtime); end endmodule need help sincerely and urgent for project reason :'(. |
Title: Re: help for this special model Post by Geoffrey_Coram on Jan 22nd, 2010, 5:42am `include “discipline.h” module delay_cell (in, out); input in; output out; electrical in, out; parameter real dtime1 = 20n from (0:inf); parameter real dtime2 = 30n from (dtime1:inf); // dtime2 > dtime1 parameter real t1 = 1n from (0:inf); parameter real t2 = 5n from (t1:inf); // t2 > t1 real deff; analog begin if ($abstime < t1) deff = dtime1; else if ($abstime > t2) deff = dtime2; else deff = dtime1 + ($abstime -t1) * (dtime2-dtime1)/(t2-t1); V(out) <+ $absdelay(V(in), deff, dtime2); end endmodule |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |