ElectricalCoreClasses.mesa
Written by: Pradeep Sindhu April 1, 1986 1:12:34 am PST
Last Edited by:
Christian LeCocq February 11, 1987 5:10:50 pm PST
Bertrand Serlet June 17, 1986 5:23:34 pm PDT
Pradeep Sindhu April 30, 1986 10:31:53 pm PDT
DIRECTORY
Core;
ElectricalCoreClasses: CEDAR DEFINITIONS = BEGIN OPEN Core;
Theory
This interface defines the electrical elements of integrated circuits, plus a few tricks used by the simulators.
Basic Types and Associated Procs
Volts: TYPE = REAL;
KOhms: TYPE = REAL;
pF: TYPE = REAL;
ns: TYPE = REAL;
mA: TYPE = REAL;
uH: TYPE = REAL;
RopeFromVolts: PROC [v: Volts] 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];
Resistor
resistorCellClass: CellClass;
Resistor: TYPE = REF ResistorRec;
ResistorRec: TYPE = RECORD [
value: KOhms];
ResistorPort: TYPE = MACHINE DEPENDENT {n0(0), n1(1)};
Public wires: n0, n1.
CreateResistor: PROC [args: ResistorRec, name: ROPENIL, props: Properties ← NIL] RETURNS [resistor: CellType];
Inductor
inductorCellClass: CellClass;
Inductor: TYPE = REF InductorRec;
InductorRec: TYPE = RECORD [
value: uH];
InductorPort: TYPE = MACHINE DEPENDENT {n0(0), n1(1)};
Public wires: n0, n1.
CreateInductor: PROC [args: InductorRec, name: ROPENIL, props: Properties ← NIL] RETURNS [inductor: CellType];
Capacitor
capacitorCellClass: CellClass;
Capacitor: TYPE = REF CapacitorRec;
CapacitorRec: TYPE = RECORD [
value: pF];
CapacitorPort: TYPE = MACHINE DEPENDENT {n0(0), n1(1)};
Public wires: n0, n1.
CreateCapacitor: PROC [args: CapacitorRec, name: ROPENIL, props: Properties ← NIL] RETURNS [capacitor: CellType];
Diode
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)};
Public wires: n0, n1.
CreateDiode: PROC [args: DiodeRec, name: ROPENIL, props: Properties ← NIL] RETURNS [cellType: CellType];
Coupled Inductors
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)};
Public wires: n0, n1, n2, n3.
CreateCoupledInd: PROC [args: CoupledIndRec, name: ROPENIL, props: Properties ← NIL] RETURNS [cellType: CellType];
Lossless Line
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)};
Public wires: n0, n1, n2, n3.
CreateLosslessLine: PROC [args: LosslessLineRec, name: ROPENIL, props: Properties ← NIL] RETURNS [cellType: CellType];
Linear Sources
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)};
Public wires: n0, n1, n2, n3.
CreateLinearSource: PROC [args: LinearSourceRec, name: ROPENIL, props: Properties ← NIL] RETURNS [cellType: CellType];
SignalGenerator
signalGeneratorCellClass: CellClass;
SignalGenerator: TYPE = REF SignalGeneratorRec;
SignalGeneratorRec: TYPE = RECORD [
type: SignalGeneratorType ← DC,
onLevel: Volts ← 5.0,
offLevel: Volts ← 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)};
Public wires: n.
CreateSignalGenerator: PROC [args: SignalGeneratorRec, name: ROPENIL, props: Properties ← NIL] RETURNS [signalGenerator: CellType];
Probe
probeCellClass: CellClass;
Probe: TYPE = REF ProbeRec;
ProbeRec: TYPE = RECORD [
type: ProbeType ← Voltage,
scale: REAL ← 1.0,
resistance: KOhms ← 0.001];
ProbeType: TYPE = {Voltage, Current};
Public wires: depends on the type of probe.
CreateProbe: PROC [args: ProbeRec, name: ROPENIL, props: Properties ← NIL] RETURNS [probe: CellType];
Init
initCellClass: CellClass;
Init: TYPE = REF InitRec;
InitRec: TYPE = RECORD [
type: InitType ← Voltage,
value: REAL ← 5.0,
time: ns ← 0.0];
InitType: TYPE = {Voltage, Current};
Public wires: depends on the type of init.
CreateInit: PROC [args: InitRec, name: ROPENIL, props: Properties ← NIL] RETURNS [init: CellType];
Panel
panelCellClass: CellClass;
Panel: TYPE = REF PanelRec;
PanelRec: TYPE = RECORD [
title: ROPENIL,
tMin: ns ← 0.0,
tMax: ns ← 100.0,
tStep: ns ← 0.05,
yMin: Volts ← -1.0,
yMax: Volts ← 5.0,
tScale: REAL ← 1.0,
iScale: mA ← 1.0];
Public wires: none.
CreatePanel: PROC [args: PanelRec, name: ROPENIL, props: Properties ← NIL] RETURNS [Panel: CellType];
END.