Directory RoseCreate, RoseRun, RoseTypes, SwitchTypes; Imports RoseCreate, RoseRun, RoseTypes, SwitchTypes; Open SwitchTypes, RoseRun, RoseCreate, RoseTypes; CEDAR Conductance: TYPE = {Off, Indeterminate, On}; NState: ARRAY Level OF Conductance = [Off, Indeterminate, On]; PState: ARRAY Level OF Conductance = [On, Indeterminate, Off]; ; NETrans: CELL [gate NULL; 1, 2 => IF conductance # Off THEN FindExteriorVicinity[cell, 3-index]; ENDCASE => ERROR; PropQ IF conductance = On THEN { ch1.s[q] _ MAX[ch1.s[q], MIN[strength, ch2.s[q]]]; ch2.s[q] _ MAX[ch2.s[q], MIN[strength, ch1.s[q]]]; }; PropUD IF conductance # Off THEN BEGIN ch1.s[u] _ MAX[ch1.s[u], MIN[strength, ch2.s[u]]]; ch2.s[u] _ MAX[ch2.s[u], MIN[strength, ch1.s[u]]]; ch1.s[d] _ MAX[ch1.s[d], MIN[strength, ch2.s[d]]]; ch2.s[d] _ MAX[ch2.s[d], MIN[strength, ch1.s[d]]]; END; ENDCELL; PETrans: CELL [gate NULL; 1, 2 => IF conductance # Off THEN FindExteriorVicinity[cell, 3-index]; ENDCASE => ERROR; PropQ IF conductance = On THEN { ch1.s[q] _ MAX[ch1.s[q], MIN[strength, ch2.s[q]]]; ch2.s[q] _ MAX[ch2.s[q], MIN[strength, ch1.s[q]]]; }; PropUD IF conductance # Off THEN BEGIN ch1.s[u] _ MAX[ch1.s[u], MIN[strength, ch2.s[u]]]; ch2.s[u] _ MAX[ch2.s[u], MIN[strength, ch1.s[u]]]; ch1.s[d] _ MAX[ch1.s[d], MIN[strength, ch2.s[d]]]; ch2.s[d] _ MAX[ch2.s[d], MIN[strength, ch1.s[d]]]; END; ENDCELL; PDTrans: CELL [gate NULL; 1, 2 => IF conductance # Off THEN FindExteriorVicinity[cell, 3-index]; ENDCASE => ERROR; PropQ IF conductance = On THEN { ch1.s[q] _ MAX[ch1.s[q], MIN[strength, ch2.s[q]]]; ch2.s[q] _ MAX[ch2.s[q], MIN[strength, ch1.s[q]]]; }; PropUD IF conductance # Off THEN BEGIN ch1.s[u] _ MAX[ch1.s[u], MIN[strength, ch2.s[u]]]; ch2.s[u] _ MAX[ch2.s[u], MIN[strength, ch1.s[u]]]; ch1.s[d] _ MAX[ch1.s[d], MIN[strength, ch2.s[d]]]; ch2.s[d] _ MAX[ch2.s[d], MIN[strength, ch1.s[d]]]; END; ENDCELL; NDTrans: CELL [gate NULL; 1, 2 => IF conductance # Off THEN FindExteriorVicinity[cell, 3-index]; ENDCASE => ERROR; PropQ IF conductance = On THEN { ch1.s[q] _ MAX[ch1.s[q], MIN[strength, ch2.s[q]]]; ch2.s[q] _ MAX[ch2.s[q], MIN[strength, ch1.s[q]]]; }; PropUD IF conductance # Off THEN BEGIN ch1.s[u] _ MAX[ch1.s[u], MIN[strength, ch2.s[u]]]; ch2.s[u] _ MAX[ch2.s[u], MIN[strength, ch1.s[u]]]; ch1.s[d] _ MAX[ch1.s[d], MIN[strength, ch2.s[d]]]; ch2.s[d] _ MAX[ch2.s[d], MIN[strength, ch1.s[d]]]; END; ENDCELL; PassTransistor: CELL [gate, inBIT] InittableState strength: Strength _ drive, conductance: Conductance _ Indeterminate Initializer rs: REF Strength _ NARROW[initData]; IF rs # NIL THEN strength _ rs^; ValsChanged IF NState[gate.val] # conductance THEN {conductance _ NState[gate.val]; PerturbPort[cell, 2]}; FindVicinity SELECT index FROM 0 => NULL; 1 => IF state.conductance # Off THEN FindExteriorVicinity[cell, 3-index]; 2 => ERROR; ENDCASE => ERROR; PropQ IF conductance = On THEN { IF in.s[q] < MIN[strength, out.s[q]] THEN ERROR Error["Backward flow across unidirectional transistor!", cell]; out.s[q] _ MAX[out.s[q], MIN[strength, in.s[q]]]; }; PropUD IF conductance # Off THEN BEGIN IF in.s[u] < Block[MIN[strength, out.s[u]], in.s[q]] THEN ERROR Error["Backward flow across unidirectional transistor!", cell]; out.s[u] _ MAX[out.s[u], MIN[strength, in.s[u]]]; IF in.s[d] < Block[MIN[strength, out.s[d]], in.s[q]] THEN ERROR Error["Backward flow across unidirectional transistor!", cell]; out.s[d] _ MAX[out.s[d], MIN[strength, in.s[d]]]; END; ENDCELL; PullupTransistor: CELL [gate, inBIT] InittableState strength: Strength _ driveWeak, conductance: Conductance _ Indeterminate Initializer rs: REF Strength _ NARROW[initData]; IF rs # NIL THEN strength _ rs^; FindVicinity SELECT index FROM 0 => NULL; 1 => IF state.conductance # Off THEN FindExteriorVicinity[cell, 3-index]; 2 => ERROR; ENDCASE => ERROR; PropQ IF conductance = On THEN { IF in.s[q] < MIN[strength, out.s[q]] THEN ERROR Error["Backward flow across unidirectional transistor!", cell]; out.s[q] _ MAX[out.s[q], MIN[strength, in.s[q]]]; }; PropUD IF conductance # Off THEN BEGIN IF in.s[u] < Block[MIN[strength, out.s[u]], in.s[q]] THEN ERROR Error["Backward flow across unidirectional transistor!", cell]; out.s[u] _ MAX[out.s[u], MIN[strength, in.s[u]]]; IF in.s[d] < Block[MIN[strength, out.s[d]], in.s[q]] THEN ERROR Error["Backward flow across unidirectional transistor!", cell]; out.s[d] _ MAX[out.s[d], MIN[strength, in.s[d]]]; END; ENDCELL PTransistors.Rose Last Edited by: Spreitzer, March 20, 1984 1:59:40 pm PST Κ!– "cedar" style˜Jšœ™J™8J˜Icodešœ6˜6Kšœ4˜4Kšœ1˜1K˜šΟk˜Kšœ œ˜-Kšœœœ(˜>Kšœœœ(˜>—K˜K˜šΟbœœœ œ˜&šœ˜K˜Kšœ(˜(—˜ Kšœœ œ ˜$Kšœœœ˜ —šœ ˜ šœ ˜&K˜M——šœ ˜ šœ˜Kšœœ˜ Kšœœœ%˜FKšœœ˜——šœ˜šœœ˜Kšœ œ œ˜2Kšœ œ œ˜2K˜——šœ˜šœ˜Kš˜Kšœ œ œ˜2Kšœ œ œ˜2Kšœ œ œ˜2Kšœ œ œ˜2Kšœ˜——Kšœ˜—K˜šžœœœ œ˜&šœ˜K˜Kšœ(˜(—˜ Kšœœ œ ˜$Kšœœœ˜ —šœ ˜ šœ ˜&K˜M——šœ ˜ šœ˜Kšœœ˜ Kšœœœ%˜FKšœœ˜——šœ˜šœœ˜Kšœ œ œ˜2Kšœ œ œ˜2K˜——šœ˜šœ˜Kš˜Kšœ œ œ˜2Kšœ œ œ˜2Kšœ œ œ˜2Kšœ œ œ˜2Kšœ˜——Kšœ˜—K˜šžœœœ œ˜&šœ˜K˜Kšœ˜—˜ Kšœœ œ ˜$Kšœœœ˜ —šœ ˜ šœ˜Kšœœ˜ Kšœœœ%˜FKšœœ˜——šœ˜šœœ˜Kšœ œ œ˜2Kšœ œ œ˜2K˜——šœ˜šœ˜Kš˜Kšœ œ œ˜2Kšœ œ œ˜2Kšœ œ œ˜2Kšœ œ œ˜2Kšœ˜——Kšœ˜—K˜šžœœœ œ˜&šœ˜K˜Kšœ˜—˜ Kšœœ œ ˜$Kšœœœ˜ —šœ ˜ šœ˜Kšœœ˜ Kšœœœ%˜FKšœœ˜——šœ˜šœœ˜Kšœ œ œ˜2Kšœ œ œ˜2K˜——šœ˜šœ˜Kš˜Kšœ œ œ˜2Kšœ œ œ˜2Kšœ œ œ˜2Kšœ œ œ˜2Kšœ˜——Kšœ˜—K˜šžœœ œœ˜,šœ˜K˜Kšœ(˜(—˜ Kšœœ œ ˜$Kšœœœ˜ —šœ ˜ šœ ˜&K˜7——šœ ˜ šœ˜Kšœœ˜ Kšœœœ%˜IKšœœ˜ Kšœœ˜——šœ˜šœœ˜šœ œ˜)Kšœ@˜E—Kšœ œ œ˜1K˜——šœ˜šœ˜Kš˜šœœ˜9Kšœ@˜E—Kšœ œ œ˜1šœœ˜9Kšœ@˜E—Kšœ œ œ˜1Kšœ˜——Kšœ˜—K˜šžœœ œœ˜.šœ˜Kšœ˜Kšœ(˜(—˜ Kšœœ œ ˜$Kšœœœ˜ —šœ ˜ šœ˜Kšœœ˜ Kšœœœ%˜IKšœœ˜ Kšœœ˜——šœ˜šœœ˜šœ œ˜)Kšœ@˜E—Kšœ œ œ˜1K˜——šœ˜šœ˜Kš˜šœœ˜9Kšœ@˜E—Kšœ œ œ˜1šœœ˜9Kšœ@˜E—Kšœ œ œ˜1Kšœ˜——Kš˜—K˜—…—¬