CreateProbe:
PUBLIC
PROC [simulation: RoseSimulation, flatWire: CoreFlat.FlatWireRec]
RETURNS [probe: RoseProbe] = {
fw: CoreFlat.FlatWire ← NEW[CoreFlat.FlatWireRec];
fw^ ← flatWire;
This is an interim hack that requires the argument to be an atomic, canonical wire.
probe ← NEW[RoseProbeSeq[1]];
probe[0] ← NEW[RoseProbePrimitiveRec];
probe[0].wire ← NARROW[RefTab.Fetch[x: simulation.coreToRoseWires, key: fw].val];
IF probe[0].wire=NIL THEN ERROR;
probe[0].wire.probes ← CONS[probe[0], probe[0].wire.probes];
};
BindProbe:
PUBLIC
PROC [simulation: RoseSimulation, cellType: Core.CellType, name: Rope.
ROPE, flatCell: CoreFlat.FlatCellTypeRec ← CoreFlat.rootCellType]
RETURNS [probe: RoseProbe] = {
probe ← CreateProbe[simulation, [flatCell: flatCell, wire: CoreOps.FindWire[cellType.public, name]]];
};
BindProbes:
PUBLIC
PROC [simulation: RoseSimulation, cellType: Core.CellType, n0, n1, n2, n3, n4: Rope.
ROPE ←
NIL, flatCell: CoreFlat.FlatCellTypeRec ← CoreFlat.rootCellType]
RETURNS [p0, p1, p2, p3, p4: RoseProbe ←
NIL] = {
IF n0#NIL THEN p0 ← BindProbe[simulation, cellType, n0, flatCell];
IF n1#NIL THEN p1 ← BindProbe[simulation, cellType, n1, flatCell];
IF n2#NIL THEN p2 ← BindProbe[simulation, cellType, n2, flatCell];
IF n3#NIL THEN p3 ← BindProbe[simulation, cellType, n3, flatCell];
IF n4#NIL THEN p4 ← BindProbe[simulation, cellType, n4, flatCell];
};