<> <> <> <> <> <> <> <> <> <<>> DIRECTORY Core, Rope; ElectricalCoreClasses: CEDAR DEFINITIONS = BEGIN OPEN Core; <> <> <> V: TYPE = REAL; KOhms: TYPE = REAL; pF: TYPE = REAL; ns: TYPE = REAL; Hz: TYPE = REAL; mA: TYPE = REAL; uH: TYPE = REAL; CorV: TYPE = {Voltage, Current}; RopeFromV: PROC [v: V] RETURNS [rope: ROPE]; RopeFromKOhms: PROC [r: KOhms] RETURNS [rope: ROPE]; RopeFrompF: PROC [c: pF] RETURNS [rope: ROPE]; RopeFromns: PROC [t: ns] RETURNS [rope: ROPE]; RopeFrommA: PROC [i: mA] RETURNS [rope: ROPE]; RopeFromuH: PROC [l: uH] RETURNS [rope: ROPE]; <> resistorCellClass: CellClass; Resistor: TYPE = REF ResistorRec; ResistorRec: TYPE = RECORD [ value: KOhms]; ResistorPort: TYPE = MACHINE DEPENDENT {n0(0), n1(1)}; <> CreateResistor: PROC [args: ResistorRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [resistor: CellType]; <> inductorCellClass: CellClass; Inductor: TYPE = REF InductorRec; InductorRec: TYPE = RECORD [ value: uH]; InductorPort: TYPE = MACHINE DEPENDENT {n0(0), n1(1)}; <> CreateInductor: PROC [args: InductorRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [inductor: CellType]; <> capacitorCellClass: CellClass; Capacitor: TYPE = REF CapacitorRec; CapacitorRec: TYPE = RECORD [ value: pF]; CapacitorPort: TYPE = MACHINE DEPENDENT {n0(0), n1(1)}; <> CreateCapacitor: PROC [args: CapacitorRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [capacitor: CellType]; <> bjtCellClass: CellClass; BJT: TYPE = REF BJTRec; BJTRec: TYPE = RECORD [ type: BJTType _ npn, area: REAL]; BJTType: TYPE = {npn, pnp}; BJTPort: TYPE = MACHINE DEPENDENT {c(0), b(1), e(2)}; <> CreateBJT: PROC [args: BJTRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [cellType: CellType]; <> diodeCellClass: CellClass; Diode: TYPE = REF DiodeRec; DiodeRec: TYPE = RECORD [ type: DiodeType _ Junction, area: REAL]; DiodeType: TYPE = {Junction, Zenner, Varicap, Special}; DiodePort: TYPE = MACHINE DEPENDENT {n0(0), n1(1)}; <> CreateDiode: PROC [args: DiodeRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [cellType: CellType]; <> coupledIndCellClass: CellClass; CoupledInd: TYPE = REF CoupledIndRec; CoupledIndRec: TYPE = RECORD [ l1: uH, -- inductance between n0 and n1 l2: uH, -- inductance between n2 and n3 k: REAL -- coefficient of coupling ]; CoupledIndPort: TYPE = MACHINE DEPENDENT {n0(0), n1(1), n2(2), n3(3)}; <> CreateCoupledInd: PROC [args: CoupledIndRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [cellType: CellType]; <> losslessLineCellClass: CellClass; LosslessLine: TYPE = REF LosslessLineRec; LosslessLineRec: TYPE = RECORD [ z0: KOhms, -- characteristic impedance td: ns -- transmission delay ]; LosslessLinePort: TYPE = MACHINE DEPENDENT {n0(0), n1(1), n2(2), n3(3)}; <> CreateLosslessLine: PROC [args: LosslessLineRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [cellType: CellType]; <> linearSourceCellClass: CellClass; LinearSource: TYPE = REF LinearSourceRec; LinearSourceRec: TYPE = RECORD [ type: LinearType _ VCVS, value: REAL]; LinearType: TYPE = {VCCS, VCVS, CCCS, ccvs}; LinearSourcePort: TYPE = MACHINE DEPENDENT {n0(0), n1(1), n2(2), n3(3)}; <> CreateLinearSource: PROC [args: LinearSourceRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [cellType: CellType]; <> signalGeneratorCellClass: CellClass; SignalGenerator: TYPE = REF SignalGeneratorRec; SignalGeneratorRec: TYPE = RECORD [ type: SignalGeneratorType _ DC, onLevel: V _ 5.0, offLevel: V _ 0.0, period: ns _ 0.0, width: ns _ 0.0, tRise: ns _ 0.0, tFall: ns _ 0.0, tDelay: ns _ 0.0]; SignalGeneratorType: TYPE = {DC, RectWave, OneShot, Step}; SignalGeneratorPort: TYPE = MACHINE DEPENDENT {n(0)}; <> CreateSignalGenerator: PROC [args: SignalGeneratorRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [signalGenerator: CellType]; <> sineGeneratorCellClass: CellClass; SineGenerator: TYPE = REF SineGeneratorRec; SineGeneratorRec: TYPE = RECORD [ v0: V _ 1.0, vA: V _ 1.0, freq: Hz _ 1.0, td: ns _ 0.0, theta: Hz _ 0.0]; SineGeneratorPort: TYPE = MACHINE DEPENDENT {n(0)}; <> CreateSineGenerator: PROC [args: SineGeneratorRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [sineGenerator: CellType]; <> acSourceCellClass: CellClass; ACSource: TYPE = REF ACSourceRec; ACSourceRec: TYPE = RECORD [ mag: V _ 1.0, phase: REAL _ 0.0]; ACSourcePort: TYPE = MACHINE DEPENDENT {n(0)}; <> CreateACSource: PROC [args: ACSourceRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [acSource: CellType]; <> probeCellClass: CellClass; Probe: TYPE = REF ProbeRec; ProbeRec: TYPE = RECORD [ type: CorV _ Voltage, acKind: Rope.ROPE _ NIL, scale: REAL _ 1.0, resistance: KOhms _ 0.001]; ProbeType: TYPE = {Voltage, Current}; <> CreateProbe: PROC [args: ProbeRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [probe: CellType]; <> initCellClass: CellClass; Init: TYPE = REF InitRec; InitRec: TYPE = RECORD [ type: CorV _ Voltage, value: REAL _ 5.0, time: ns _ 0.0]; <> CreateInit: PROC [args: InitRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [init: CellType]; <> panelCellClass: CellClass; Panel: TYPE = REF PanelRec; PanelRec: TYPE = RECORD [ title: ROPE _ NIL, tMin: ns _ 0.0, tMax: ns _ 100.0, tStep: ns _ 0.05, yMin: V _ -1.0, yMax: V _ 5.0, tScale: REAL _ 1.0, iScale: mA _ 1.0]; <> CreatePanel: PROC [args: PanelRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [Panel: CellType]; END.