<> <> <> <<>> DIRECTORY Core, CoreOps, CoreProperties, CoreDecoder; CoreDecoderImpl: CEDAR PROGRAM IMPORTS CoreOps, CoreProperties EXPORTS CoreDecoder = BEGIN OPEN Core, CoreDecoder; decoderCellClass: PUBLIC CellClass _ NEW[CellClassRec _ [name: "Decoder", recast: Recast, write: Write, read: Read]]; Start: PROC = { CoreOps.RegisterCellClass[decoderCellClass]; decoderCellClass.properties _ CoreProperties.PutProp[on: decoderCellClass.properties, prop: CoreOps.printClassProcProp, value: NEW[CoreOps.PrintClassProc _ PropPrintClass]]; }; Write: WriteProc = { }; Read: ReadProc = { }; Recast: RecastProc = { <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> }; Create: PUBLIC PROC [decoderCellType: DecoderCellType, name: ROPE _ NIL] RETURNS [cellType: CellType] = { cellType _ NEW[CellTypeRec _ [ name: name, class: decoderCellClass, publicWire: CoreOps.CreateRecordWire[components: LIST [ CoreOps.CreateAtomWire["Vdd"], CoreOps.CreateAtomWire["Gnd"], CoreOps.CreateSequenceWire[name: "AdrBit", base: CoreOps.CreateAtomWire[], count: decoderCellType.bitCount], CoreOps.CreateSequenceWire[name: "nAdrBit", base: CoreOps.CreateAtomWire[], count: decoderCellType.bitCount], CoreOps.CreateSequenceWire[name: "nDecode", base: CoreOps.CreateAtomWire[], count: decoderCellType.wordCount]]], data: decoderCellType]] }; PropPrintClass: CoreOps.PrintClassProc = {Print[NARROW[data], out]}; Print: PUBLIC PROC [decoderCellType: DecoderCellType, out: STREAM] = { }; Start[]; END.