The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> gmin or gdev in model using $simparam() https://designers-guide.org/forum/YaBB.pl?num=1357683469 Message started by Bob Atwell on Jan 8th, 2013, 2:17pm |
Title: gmin or gdev in model using $simparam() Post by Bob Atwell on Jan 8th, 2013, 2:17pm Does anyone have any experience using $simparam(gmin) or $simparam(gdev) in their models? I am wondering exactly how these work in the case of gmin ramping homotopy and how much computational overhead they cost. Should they be used in an initial_step or should they be used directly in a contribution statement? Any help would be very welcome. Thanks, Bob. |
Title: Re: gmin or gdev in model using $simparam() Post by Geoffrey_Coram on Jan 9th, 2013, 6:56am I've used $simparam(gmin, 1p), but usually in models where the look-up cost of this variable ought to be significantly less than the cost of the other expressions (exp). Do you find that initial_step makes a difference? I expect a good simulator to build a dependency tree and determine for itself what can be done during initialization. |
Title: Re: gmin or gdev in model using $simparam() Post by Bob Atwell on Jan 10th, 2013, 5:57am Thanks, but that doesn't really address my question. Let me try to rephrase it. I am trying to create a conductance branch inside a veriloga model that replicates or mimics the GMIN conductance used in the simulator primitives for both normal simulations and during a GMIN ramp homotopy. This is the code that I think will do the job. @(initial_step) begin gmin = $simparam("gmin", 1e-12); gwiz = $simparam("gdev", gmin); end I(p, n) <+ gwiz*V(p, n); I have two questions: 1. Will this code work correctly during GMIN ramping homotopy? 2. Is there any sensible way that I can test it? |
Title: Re: gmin or gdev in model using $simparam() Post by Geoffrey_Coram on Jan 11th, 2013, 7:48am Since gmin ramping falls in to the black art area of convergence tricks, I don't think you'll have any simulator vendors posting clear answers in a public forum. There's no guarantee, either, that the variable the simulator uses in that homotopy will be available for the user. I think the LRM only says something like, if the variable is available/provided, then the simulator should use the recommended name. However, you might be able to use $debug to print the value of gwiz during every iteration, and then stick your module in a circuit that requires the gmin homotopy. |
Title: Re: gmin or gdev in model using $simparam() Post by Bob Atwell on Jan 11th, 2013, 11:34am Thanks, the gmin seems to work everywhere I need it to and I'll try the $debug idea to check the gdev piece. Thanks again. Bob. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |