DIRECTORY Core, CoreCreate, CoreOps, IFUPublic, Ports, REFBit, Rosemary; IFUPublicImpl: CEDAR PROGRAM IMPORTS CoreCreate, CoreOps, Ports, REFBit, Rosemary EXPORTS IFUPublic = BEGIN PortWire: PUBLIC PROC [init: BOOL, name: Core.ROPE, size: NAT_0, dr: Ports.Drive_none, pwrVal: Ports.Level _ L] RETURNS[wire: Core.Wire] = { wire _ CoreCreate.Seq[name, (IF size=1 THEN 0 ELSE size)]; IF NOT init THEN RETURN[wire]; [] _ Ports.InitPort[ wire: wire, levelType: (SELECT size FROM 0,1=>b, <=16=>c, <=32=>lc, ENDCASE=>ERROR), initDrive: dr ]; [] _ Ports.InitTesterDrive[ wire: wire, initDrive: (SELECT dr FROM none=>force, force, expect => none, ENDCASE=>expect)]; IF dr=infinite THEN [] _ Rosemary.SetFixedWire[wire, pwrVal]}; IfuInitializedPublic: PUBLIC PROC[init: BOOL _ TRUE] RETURNS[public: Core.Wire] = { II: TYPE = IFUPublic.II; ii: II _ LAST[II]; public _ CoreOps.CreateWires[ii.ORD+1]; public[II[KBus ].ORD] _ PortWire[init, "KBus", 32, drive ]; public[II[EUAluOp ].ORD] _ PortWire[init, "EUAluOp", 4, drive ]; public[II[EUCondSel ].ORD] _ PortWire[init, "EUCondSel", 4, drive ]; public[II[EUCondition ].ORD] _ PortWire[init, "EUCondition"]; public[II[EURdFromPBus ].ORD] _ PortWire[init, "EURdFromPBus", 1, drive ]; public[II[EUWriteToPBus ].ORD] _ PortWire[init, "EUWriteToPBus", 1, drive ]; public[II[UserMode ].ORD] _ PortWire[init, "UserMode", 1, drive ]; public[II[DPCmd ].ORD] _ PortWire[init, "DPCmd", 8, drive ]; public[II[DPReject ].ORD] _ PortWire[init, "DPReject"]; public[II[DPFault ].ORD] _ PortWire[init, "DPFault", 4]; public[II[IPCmdFetch ].ORD] _ PortWire[init, "IPCmdFetch", 1, drive ]; public[II[IPReject ].ORD] _ PortWire[init, "IPReject"]; public[II[IPFaulting ].ORD] _ PortWire[init, "IPFaulting"]; public[II[IPData ].ORD] _ PortWire[init, "IPData", 32]; public[II[DShA ].ORD] _ PortWire[init, "DShA"]; public[II[DShB ].ORD] _ PortWire[init, "DShB"]; public[II[DShRd ].ORD] _ PortWire[init, "DShRd"]; public[II[DShWt ].ORD] _ PortWire[init, "DShWt"]; public[II[DShIn ].ORD] _ PortWire[init, "DShIn"]; public[II[DShOut ].ORD] _ PortWire[init, "DShOut", 1, drive ]; public[II[Reset ].ORD] _ PortWire[init, "Reset"]; public[II[Reschedule ].ORD] _ PortWire[init, "Reschedule"]; public[II[Clk ].ORD] _ PortWire[init, "Clk"]; public[II[PhAOut ].ORD] _ PortWire[init, "PhAOut", 1, drive ]; public[II[PhBOut ].ORD] _ PortWire[init, "PhBOut", 1, drive ]; public[II[PhA ].ORD] _ PortWire[init, "PhA"]; public[II[PhB ].ORD] _ PortWire[init, "PhB"]; public[II[VbbGen ].ORD] _ PortWire[init, "VbbGen", 1, drive ]; public[II[Vbb ].ORD] _ PortWire[init, "Vbb", 1, infinite, H]; public[II[Vdd ].ORD] _ PortWire[init, "Vdd", 1, infinite, H]; public[II[Gnd ].ORD] _ PortWire[init, "Gnd", 1, infinite, L]; public[II[PadVdd ].ORD] _ PortWire[init, "PadVdd", 1, infinite, H]; public[II[PadGnd ].ORD] _ PortWire[init, "PadGnd", 1, infinite, L]}; scanDrInv: PUBLIC IFUPublic.ScanRef _ ScanDrInv[]; ScanDrInv: PUBLIC PROC[scan: IFUPublic.ScanRef _ NIL] RETURNS[IFUPublic.ScanRef] = { logicalBit: CARDINAL _ 0; format: REFBit.Format; IF scan=NIL THEN scan _ NEW[IFUPublic.ScanRec]; format _ REFBit.Desc[scan].fieldForm; FOR fldFrmIdx: CARDINAL IN [0..format.size) DO -- detects Decoded Enumerated Type LSBs field: REFBit.FormatRec _ format[fldFrmIdx]; logicalBit _ logicalBit + field.bitSize; IF field.bitSize>1 AND field.name=NIL AND field.nameInv#NIL THEN REFBit.Set[scan, logicalBit-1, NOT REFBit.Get[scan, logicalBit-1]] ENDLOOP; scan.MPOut.notBcLoadStage1 _ NOT scan.MPOut.notBcLoadStage1; scan.FCOut.notInstReady _ NOT scan.FCOut.notInstReady; RETURN[scan]}; SetScanBit: PUBLIC PROC[scan: IFUPublic.ScanRef, bit: NAT, val: BOOL] = { inv: BOOL _ REFBit.Get[scanDrInv, bit]; REFBit.Set[scan, bit, val#inv]}; GetScanBit: PUBLIC PROC[scan: IFUPublic.ScanRef, bit: NAT] RETURNS[ val: BOOL] = { inv: BOOL _ REFBit.Get[scanDrInv, bit]; val _ inv#REFBit.Get[scan, bit]}; END. ~IFUPublicImpl.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Don Curry April 2, 1987 9:36:57 am PST ʳ˜™Jšœ Ïmœ1™J˜——š  œžœžœžœžœžœ˜SJšžœžœ žœ˜Jšœžœžœžœ˜Jšœ žœ˜'Jšœžœ žœ+˜BJšœžœ žœ,˜EJšœžœžœ.˜HJšœžœžœ"˜>Jšœžœžœ/˜KJšœžœžœ0˜MJ˜Jšœžœžœ-˜GJ˜Jšœžœ žœ+˜CJšœžœžœ˜9Jšœžœ žœ$˜=J˜Jšœžœžœ.˜IJšœžœžœ˜9Jšœžœžœ!˜=Jšœžœ žœ%˜>J˜Jšœžœ žœ˜2Jšœžœ žœ˜2Jšœžœ žœ˜4Jšœžœ žœ˜4Jšœžœ žœ˜4Jšœžœ žœ+˜CJ˜Jšœžœ žœ˜4Jšœžœžœ!˜