The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 18th, 2024, 6:29am
Pages: 1
Send Topic Print
gmin or gdev in model using $simparam() (Read 1457 times)
Bob Atwell
New Member
*
Offline



Posts: 9
Tucson, AZ
gmin or gdev in model using $simparam()
Jan 08th, 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.
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: gmin or gdev in model using $simparam()
Reply #1 - 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.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Bob Atwell
New Member
*
Offline



Posts: 9
Tucson, AZ
Re: gmin or gdev in model using $simparam()
Reply #2 - 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?
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: gmin or gdev in model using $simparam()
Reply #3 - 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.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Bob Atwell
New Member
*
Offline



Posts: 9
Tucson, AZ
Re: gmin or gdev in model using $simparam()
Reply #4 - 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.
Back to top
 
 
View Profile   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.