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
parameters test = 1
inline suckt mySbckt
parameters test = 0
I would like to have test = 1 instead of 0 in myModel.
Is there a way to workarround this.
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..
In reply to kenambo:
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=GLOBALsimulator 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...
In reply to Andrew Beckett: