DIRECTORY BitOps, Core, CoreClasses, CoreCreate, CoreProperties, Ports, Rosemary, RosemaryUser, TamarinPorts, TamarinOpsUtils, TamarinBlocks, Rope; EuLu: CEDAR PROGRAM IMPORTS CoreClasses, CoreCreate, Ports, Rosemary, TamarinPorts, TamarinBlocks, TamarinOpsUtils = BEGIN d1, d2, r, luEuop, selLu, Vdd, Gnd: NAT _ LAST[NAT]; luCt: Core.CellType; luPorts: Ports.Port; busBits: NAT _ 32; euopBits: NAT _ 4; Create: PUBLIC PROC RETURNS [ct: Core.CellType] = { luCt _ CoreClasses.CreateUnspecified[ public: CoreCreate.WireList[ LIST[ CoreCreate.Seq["D1", busBits], CoreCreate.Seq["D2", busBits], CoreCreate.Seq["R", busBits], CoreCreate.Seq["LUEuop", euopBits], CoreCreate.Seq["SelLU", 2], "Vdd", "Gnd"], "LU", NIL], name: luName ]; ct _ luCt; InitPorts[ct]; }; LuInit: Rosemary.InitProc = { InitPorts[cellType]; RETURN[NIL]; }; InitPortIndexes: PROC [ct: Core.CellType] = { [d1, d2, r, luEuop, selLu, Vdd, Gnd] _ Ports.PortIndexes[ct.public, "D1", "D2", "R", "LUEuop", "SelLU", "Vdd", "Gnd"]; }; InitPorts: PROC [ct: Core.CellType] = { InitPortIndexes[ct]; [] _ Ports.InitPorts[ct, ls, none, "D1"]; [] _ Ports.InitPorts[ct, ls, none, "D2"]; [] _ Ports.InitPorts[ct, ls, drive, "R"]; [] _ Ports.InitPorts[ct, ls, none, "LUEuop"]; [] _ Ports.InitPorts[ct, ls, none, "SelLU"]; [] _ Rosemary.SetFixedWire[ct.public[Vdd], H]; [] _ Rosemary.SetFixedWire[ct.public[Gnd], L]; }; LuEvalSimple: Rosemary.EvalProc = { luPorts _ p; IF TamarinPorts.PortToCard[p, selLu] = 3 THEN TamarinPorts.SetP[ p, r, TamarinOpsUtils.WordToCard[ TamarinBlocks.LogicalUnit[ TamarinPorts.PortToCard[p, luEuop], TamarinPorts.PortToTamWord[p, d1], TamarinPorts.PortToTamWord[p, d2] ] ] ]; luPorts _ p; }; luName: Rope.ROPE = Rosemary.Register[roseClassName: "LU", init: LuInit, evalSimple: LuEvalSimple]; END. tEuLu.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. April 7, 1987 3:40:36 pm PST Last Edited by: Krivacic April 6, 1987 4:08:37 pm PDT -- Cell which this is replacing must have the Object satellite: cI_EuLu.Create[] --PROC [cellType: Core.CellType, p: Ports.Port] RETURNS [stateAny: REF ANY _ NIL]-- PROC [p: Ports.Port, stateAny: REF ANY]-- ΚΕ˜Jšœ–Οk™™J™J™Jš ˜ Icodešœ‰˜‰J˜J˜šΟnœœ˜JšœW˜^J˜Jšœ˜J˜Jš œžœœœœ˜4Jšœ˜J˜J˜Jšœ œ˜Jšœ œ˜J˜šžœœœœ˜3J˜JšœP™PJ˜šœ%˜%šœ˜šœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ#˜#Kšœ˜Kšœ˜—Kšœœ˜ —Kšœ ˜ K˜—Kšœ ˜ K˜Kšœ˜K˜Kšœ˜—J˜šžœ˜K™KšΟcS™SK˜Kšœ˜Kšœœ˜ Kšœ˜K˜—K˜šžœœ˜-Kšœv˜vKšœ˜K˜—K˜šž œœ˜'K˜Kšœ˜K˜Kšœ)˜)Kšœ)˜)Kšœ)˜)Kšœ-˜-Kšœ,˜,K˜Kšœ.˜.Kšœ.˜.Kšœ˜K˜—J˜šž œ˜#J˜JšœœœŸ™*J˜Jšœ ˜ J˜šœ'œ˜.šœ˜Jšœ˜Jšœ˜šœ˜šœ˜Jšœ$˜$Jšœ#˜#Jšœ!˜!Jšœ˜—Jšœ˜—Jšœ˜——J˜Jšœ ˜ J˜Jšœ˜—J˜J˜Jšœ œR˜cJ˜J˜J˜J˜Jšœ˜—J™—…— Q