The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> smoothing transition function in transient analysis https://designers-guide.org/forum/YaBB.pl?num=1236439667 Message started by Dracon on Mar 7th, 2009, 7:27am |
Title: smoothing transition function in transient analysis Post by Dracon on Mar 7th, 2009, 7:27am Dear All, I have a problem with function that should smooth my output signal. The transition(V(x), td,tr,tf) add to signal rise and fall times but only in linear way. I have written following funkction based on Lagrange interpolation between three points (x1,y1) (x2,y2) , (x12,y12) and wanted signal, after smoothing to be more exponential, but I get convergence problem: "internal timestep too small in transient analysis" Note that points(x,y) are changing in time. analog function real fsmooth; input x,x1,y1,x12,y12,x2,y2; real x,x1,y1,x12,y12,x2,y2; real n1,n12,n2; begin n1 = ((x-x12)*(x-x2))/((x1-x12)*(x1-x2)); n12 = ((x-x1)*(x-x2))/((x12-x1)*(x12-x2)); n2 = ((x-x1)*(x-x12))/((x2-x1)*(x2-x12)); fsmooth = n1*y1 + n12*y12 + n2*y2; end endfunction Perhaps there is some embedded function to do this?? Thanks for your answers. Best regards, Dracon |
Title: Re: smoothing transition function in transient analysis Post by pancho_hideboo on Mar 8th, 2009, 9:47am Dracon wrote on Mar 7th, 2009, 7:27am:
Try other interpolation filter such as spline, raised-cosine, etc. Dracon wrote on Mar 7th, 2009, 7:27am:
Everyone write own interpolation filter, if needed. |
Title: Re: smoothing transition function in transient analysis Post by Ken Kundert on Mar 8th, 2009, 2:38pm The reason why it is not built into the language is because in practice, it is very rarely needed. My experience is that people overuse smoothing, usually at great cost in modeling and simulation time. Can I ask why you think you need it? -Ken |
Title: Re: smoothing transition function in transient analysis Post by Dracon on Mar 8th, 2009, 3:01pm I just begun my journey with modelling circuits and thought it maybe good idea to make signal transitions as it look like in specification. I needed it for driver de-emphasis model, but now if I look on that from a perspective of large simulation time I do not think this is my goal. I think the model have to be simple for functional verifications. Thanks |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |