Instancing the Diode Instancing the AND Gates

Instancing the BJT

Moving on to the BJT, we first examine the schematic and device declaration:

device BJT is
   attr refPrefix = "Q";
   attr pkg_type = "th_disc_bjt";
   attr supplier = "Spark Fun";
   attr cost = "0.75";
   pin e = {1};
   pin b = {2};
   pin c = {3};
end device BJT;

Now we can make a device instance:

inst myBJT of BJT is
   e = GND;
   b = BR_junct;
   c = CR_junct;
end inst myBJT;

Constraining the Reference Designator

Suppose for some reason, now, we wanted to make sure this BJT had a specific reference designator. For example, instead of using "Q" followed by an arbitrary number generated later we could constrain the BJT to have the reference designator of "QA3." We can do this in the following manner:

inst myBJT of BJT is
   e = GND;
   b = BR_junct;
   c = CR_junct;
   newattr refDes = "QA3";
end inst myBJT;

The expression "refDes" is a keyword that will manually constrain the reference designator to whatever value you chose.


Instancing the Diode Instancing the AND Gates