The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:21am
Pages: 1
Send Topic Print
help for this special model (Read 2054 times)
fencl_xu
New Member
*
Offline



Posts: 1

help for this special model
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 Cry.
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: help for this special model
Reply #1 - 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
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.