Previous: PRS Supply Override, Up: Language Features


3.2 Instance Supply Override

All processes have implicit primary supply ports !Vdd and !GND, that are accessed differently than normal ports. By default, a process instance will connect its primary supply ports to those of its immediate parent process. To specify a different supply, one can write:

     bool myVdd, myGND, x, y;
     inverter foo;
     foo $(myGND, myVdd);
     foo (x, y);
     
     inverter yoyo(x, y);
     yoyo $(myGND, myVdd);
     
     inverter bar $(myGND, myVdd);
     bar (x, y);
     
     inverter bq $(myGND, myVdd) (x, y);

Either supply port may be ommitted to use the corresponding default primary supply. Alert: note that the supply ordering for instances is GND, Vdd, whereas for production rules, it is Vdd, GND.