• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. global vs local parameters

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 16169
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

global vs local parameters

Fabb
Fabb over 11 years ago

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

  • Cancel
  • kenambo
    kenambo over 11 years ago

    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

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Fabb
    Fabb over 11 years ago
    Thanks Andrew,
    I note that you clearly warn me about this approach.
    regards,
    fabrice
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information