11.2.2. Defining variablesΒΆ
We are going to define two variables holding the names of the MOS transistor instances and flags specifying whthere these transistors are of NMOS type. To see more on how variable values are specifiede read section Specifying field values and identifiers. If variable values are given with the hash notation as Pythonic expressions the expressions are evaluated in an environment that contains no variables.
The value of variable mosList
can be specified as
xmn1 xmn2 xmn3 xmn4 xmn5 xmp1 xmp2 xmp3
or as
#['xmn1', 'xmn2', 'xmn3', 'xmn4', 'xmn5', 'xmp1', 'xmp2', 'xmp3']
With the latter syntax we specify the isNmos
variable which is list of
flags specifying whether a transistor is of type NMOS.
#[1, 1, 1, 1, 1, 0, 0, 0]
Variable names must be unique identifiers.