FOR netONodes:
LIST
OF CoreRouteFlat.NetONode ← instance.netONodes, netONodes.rest
WHILE netONodes#
NIL
DO
netONode: CoreRouteFlat.NetONode ← netONodes.first;
netName: Rope.ROPE ← netONode.net.name;
isPowerNet: BOOLEAN ← Rope.Equal[netName, "Vdd"] OR Rope.Equal[netName, "{Vdd}"];
isGroundNet: BOOLEAN ← Rope.Equal[netName, "Gnd"] OR Rope.Equal[netName, "{Gnd}"];
vddTap: CD.Object ← PW.Get[design, "VddTap.mask"];
gndTap: CD.Object ← PW.Get[design, "GndTap.mask"];
IF isPowerNet
OR isGroundNet
THEN {
FOR pins:
LIST
OF CoreRouteFlat.Pin ← netONode.oNode.pins, pins.rest
WHILE pins#
NIL
DO
pin: CoreRouteFlat.Pin ← pins.first;
tap: CD.Object ← IF isPowerNet THEN vddTap ELSE gndTap;
trans:
CD.Transformation ←
SELECT pin.side
FROM
bottom => [off: [instance.layObject.bbox.x1 + pin.range.min, instance.layObject.bbox.y1],
orient: original],
top => [off: [instance.layObject.bbox.x1 + pin.range.max, instance.layObject.bbox.y2],
orient: rotate180],
left => [off: [instance.layObject.bbox.x1, instance.layObject.bbox.y1 + pin.range.max],
orient: rotate270],
right => [off: [instance.layObject.bbox.x2, instance.layObject.bbox.y1 + pin.range.min],
orient: rotate90],
ENDCASE => GC.Error[programmingError, "Call maintainer."];
cdInstances ←
CONS [
CDInstances.NewInst[
ob: tap,
trans: trans],
cdInstances];
ENDLOOP};
ENDLOOP;
instance.layShell ←
PW.CreateCell[
instances: cdInstances,
ir: CD.InterestRect[instance.layObject],
name: Rope.Cat[structure.name, "Taps.mask"] ]};