SinixCMosImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reversed.
Created by Bertrand Serlet January 21, 1986 0:24:35 am PST
Bertrand Serlet May 16, 1986 2:18:49 pm PDT
DIRECTORY
CD, CDAtomicObjects, CDBasics, CDLayers, CDOrient, CDRects, CDSatellites,
CMosB,
Core, CoreOps,
PWPins,
Rope,
Sinix, SinixCMos;
SinixCMosImpl: CEDAR PROGRAM
IMPORTS CDBasics, CDLayers, CDOrient, CDRects, CDSatellites, CMosB, CoreOps, PWPins, Rope, Sinix
EXPORTS SinixCMos
SHARES CDLayers, CDRects =
BEGIN OPEN SinixCMos;
Dealing with satellites
AddNamesToWire: PUBLIC PROC [wire: Wire, properties: CD.PropList] = {
FOR ropes: LIST OF ROPE ← CDSatellites.GetSatelliteRopes[properties], ropes.rest WHILE ropes#NIL DO
IF CoreOps.GetShortWireName[wire]#NIL AND ~Rope.Equal[CoreOps.GetShortWireName[wire], ropes.first] THEN ERROR; -- two names for the same wire
[] ← CoreOps.SetShortWireName[wire, ropes.first];
ENDLOOP;
};
Well and rectangles
IsWellLayer: PUBLIC PROC [layer: CD.Layer] RETURNS [BOOL] = {
RETURN [layer=CMosB.pwell OR layer=CMosB.nwell];
};
AddRect: PUBLIC PROC [mode: Sinix.Mode, wire: Wire, rect: CD.Rect, layer: CD.Layer] = {
instance: CD.Instance ← PWPins.NewInstance[
ob: CDRects.CreateRect[CDBasics.SizeOfRect[rect], layer],
location: CDBasics.BaseOfRect[rect]
];
Sinix.AddWireGeometryProp[mode, wire, instance];
Sinix.AddPinsProp[mode, wire, instance];
};
Contacts
TouchAtomicWell: PUBLIC Sinix.TouchProc = {
FOR rList: CDAtomicObjects.DrawList ← NARROW [instance1.ob.specificRef, CDAtomicObjects.AtomicObsPtr].rList, rList.rest WHILE rList#NIL DO
IF ~IsWellLayer[rList.first.lev] AND Sinix.TouchRectObject[mode, instance2, CDOrient.MapRect[rList.first.r, instance1.ob.size, instance1.orientation, instance1.location], rList.first.lev] THEN RETURN [TRUE];
ENDLOOP;
};
Transistors
MakeAbstract: PUBLIC PROC [abstract, represents: CD.Layer] RETURNS [sameAbstract: CD.Layer] = {
CDLayers.MakeAbstract[abstract, represents]; RETURN [abstract];
};
END.