Home > Community > Forums > Custom IC Design > global vs local parameters

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 global vs local parameters 

Last post Tue, Oct 22 2013 4:52 AM by Fabb. 3 replies.
Started by Fabb 21 Oct 2013 07:31 AM. Topic has 3 replies and 1913 views
Page 1 of 1 (4 items)
Sort Posts:
  • Mon, Oct 21 2013 7:31 AM

    • Fabb
    • Top 500 Contributor
    • Joined on Mon, Jun 17 2013
    • Grenoble, Isere
    • Posts 21
    • Points 300
    global vs local parameters Reply

    Hello,

    In a spectre netlist I define a parameter in an inline subckt, to set a default value.Nevertheless is at toplevel this parameters is set I would like to bypass the local definition

    exemple:

    parameters test = 1

    inline suckt mySbckt

         parameters test = 0

         myModel ....

    end

    I would like to have test = 1 instead of 0 in myModel.

    Is there a way to workarround this.

    Regards,

    Fab

    Filed under:
    • Post Points: 20
  • Tue, Oct 22 2013 12:10 AM

    • kenambo
    • Not Ranked
    • Joined on Thu, Sep 26 2013
    • Tirunelveli, Tamil Nadu
    • Posts 11
    • Points 220
    Re: global vs local parameters Reply

    Hi,

     local variable values dont affect global variables value...

     So, your local parameter value is available for the local loop itself.. so out of this loop the parameter automatically takes its global value..

    Thanks..

    Ken

     

    • Post Points: 20
  • Tue, Oct 22 2013 4:34 AM

    Re: global vs local parameters Reply

    It is actually possible to get spectre to have the parameters looked up in the reverse (incorrect, in my opinion) order.

    Historically certain other SPICE simulators used to have a rather counterintuitive (and bizarre, as it's nothing like any other language) parameter precedence - where global parameters overrode local parameters. I remember when this was introduced in one particular simulator around 20 years ago, and then I had to ask for a mechanism to make it the sensible way around.

    Spectre defaults to the more logical local overrides global (which is the way thay any programming language would work). However, because we also support reading in other SPICE dialects, you can add:

    simulator lang=spice
    .options PARHIER=GLOBAL
    simulator lang=spectre

    in your netlist, and the lookup will be reversed. But remember that this applies everywhere. I strongly discourage you from doing this, because if you're using ADE, the parameter passing would be inconsistent with how ADE looks up parameters, and the danger is that you end up simulating something different from what you're manufacturing. That's clearly dangerous...

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Oct 22 2013 4:52 AM

    • Fabb
    • Top 500 Contributor
    • Joined on Mon, Jun 17 2013
    • Grenoble, Isere
    • Posts 21
    • Points 300
    Re: global vs local parameters Reply
    Thanks Andrew,
    I note that you clearly warn me about this approach.
    regards,
    fabrice
    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by Fabb at 21 Oct 2013 07:31 AM. Topic has 3 replies.