file: ///stdcell/SCSetUpLayoutImpl.mesa
-- Copyright (C) 1984, 1985 by Xerox Corporation. All rights reserved.
last modified by Preas, September 4, 1985 5:57:58 pm PDT
Frank Bowers February 6, 1986 9:55:23 am PST
the high level Sloop initialization:
DIRECTORY
Rope,
Route,
SC,
SCPrivate,
SCRowUtil,
TerminalIO;
SCSetUpLayoutImpl: CEDAR PROGRAM
IMPORTS SCRowUtil
EXPORTS SCPrivate
SHARES SC =
BEGIN
SetUpLayout: PUBLIC PROCEDURE[handle: SC.Handle] RETURNS [canContinue: BOOLTRUE] =
BEGIN
GetRopeProp: PROCEDURE[key: Rope.ROPE, default: Rope.ROPENIL]
RETURNS [val: Rope.ROPE] = {
RETURN[default]};
GetRopeListProp: PROCEDURE[key: Rope.ROPE, default: LIST OF Rope.ROPENIL]
RETURNS [val: LIST OF Rope.ROPE] = {
RETURN[default]};
GetIntProp: PROCEDURE[key: Rope.ROPE, default: INT ← 0] RETURNS [val: INT] = {
RETURN[default]};
GetBoolProp: PROCEDURE[key: Rope.ROPE, default: BOOLFALSE]
RETURNS [val: BOOL] = {
RETURN[default]};
GetFomProp: PROCEDURE[key: Rope.ROPE, default: SCPrivate.FomType]
RETURNS [val: SCPrivate.FomType] = {
RETURN[default]};
get signals to route without feedthrus
ProcClocks: PROCEDURE [descName: Rope.ROPE, lRSide: SCPrivate.LRSide]
RETURNS [acSide: SCPrivate.AcBusSides] =
BEGIN
clockSignalNames: LIST OF Rope.ROPE ← GetRopeListProp[descName];
acSide ← NEW[SCPrivate.AcBusSidesRec];
FOR nameList: LIST OF Rope.ROPE ← clockSignalNames, nameList.rest WHILE nameList # NIL DO
acSide.count ← acSide.count + 1
ENDLOOP;
IF acSide.count > 0 THEN {
index: NAT ← 0;
acSide.sigs ← NEW[SCPrivate.AcBusSigsRec[acSide.count]];
FOR nameList: LIST OF Rope.ROPE ← clockSignalNames, nameList.rest WHILE nameList # NIL DO
acSide.sigs[index].name ← nameList.first;
acSide.sigs[index].onSide ← lRSide;
index ← index + 1;
ENDLOOP};
END;
get Power signals
ProcPower: PROCEDURE [descName: Rope.ROPE, lRSide: SCPrivate.LRSide]
RETURNS [powerSide: SCPrivate.PowerBus] =
BEGIN
powerSide ← NEW[SCPrivate.PowerBusRec];
powerSide.name ← descName;
powerSide.onSide ← lRSide;
END;
layoutData: SCPrivate.LayoutData ← NARROW[NEW[SCPrivate.LayoutDataRec], SCPrivate.LayoutData];
layoutParms: SCPrivate.LayoutParms ← NEW[SCPrivate.LayoutParmsRec];
sideRules: Route.DesignRules ← handle.rules.sideRules;
rowRules: Route.DesignRules ← handle.rules.rowRules;
bottomRow: SCPrivate.BpRow ← NEW[SCPrivate.BpRowRec];
rightRow: SCPrivate.BpRow ← NEW[SCPrivate.BpRowRec];
topRow: SCPrivate.BpRow ← NEW[SCPrivate.BpRowRec];
leftRow: SCPrivate.BpRow ← NEW[SCPrivate.BpRowRec];
layoutData.bpRows ← NEW[SCPrivate.BpRowsRec];
layoutData.lgRows ← NEW[SCPrivate.LgRowsRec];
layoutData.sideChans[left] ← NEW[SCPrivate.SideChanRec];
layoutData.sideChans[right] ← NEW[SCPrivate.SideChanRec];
layoutData.rowChans ← NEW[SCPrivate.RowChansRec];
layoutData.layoutParms ← layoutParms;
handle.layoutData ← layoutData;
get fom type
layoutParms.whichFom ← GetFomProp["FomType", wlFom];
get whether to use only maxRoute channels for exits
layoutParms.useMaxRouteExits ← GetBoolProp["UseMaxRouteExits", TRUE];
layoutParms.useInteriorChanExits ← GetBoolProp["UseInteriorChanExits", TRUE];
get number of rows
layoutParms.numRows ← GetIntProp["NumRows", 0];
layoutParms.rowDirection ← handle.rules.rowRules.trunkDirection;
-- do the power buses
layoutData.powerBuses[left] ← ProcPower[GetRopeProp["LeftPowerName", "Vdd"], left];
layoutData.powerBuses[right] ← ProcPower[GetRopeProp["RightPowerName", "Gnd"], right];
-- do the ac buses
layoutData.acBuses[left] ← ProcClocks["LeftClocks", left];
layoutData.acBuses[right] ← ProcClocks["RightClocks", right];
initialize the channel widths
FOR chan: SCPrivate.MaxChanSr IN SCPrivate.MaxChanSr DO
channel: SCPrivate.RowChan ← NEW[SCPrivate.RowChanRec];
channel.exits ← NEW[SCPrivate.ExitArrayOb ← ALL []];
channel.chanNum ← chan;
layoutData.rowChans.chans[chan] ← channel;
IF SCRowUtil.FindRouteType[chan] = minRoute THEN
{channel.initChanWidth ← rowRules.trunkToTrunk*15;
channel.routeType ← minRoute}
ELSE
{channel.initChanWidth ← rowRules.trunkToTrunk*30;
channel.routeType ← maxRoute}
ENDLOOP;
side data
FOR side: SCPrivate.LRSide IN SCPrivate.LRSide DO
channel: SCPrivate.SideChan ← NEW[SCPrivate.SideChanRec];
channel.side ← side;
layoutData.sideChans[side] ← channel;
channel.initSideChanWidth ← sideRules.trunkToTrunk*10;
ENDLOOP;
io and row data
FOR row: NAT IN SCPrivate.MaxRowSr DO
layoutData.lgRows.rows[row] ← NEW[SCPrivate.LgRowRec];
layoutData.lgRows.rows[row].rowNum ← row;
ENDLOOP;
layoutData.bpRows[bottom] ← bottomRow;
bottomRow.bpSpacing ← GetIntProp["BottomBPSpacing", rowRules.branchToBranch];
bottomRow.initMaxBpsOnSide ← GetIntProp["BottomMaxBPs", 0];
bottomRow.routeSideChans ← GetBoolProp["BottomChanRoute", FALSE];
layoutData.bpRows[right] ← rightRow;
rightRow.bpSpacing ← GetIntProp["RightBPSpacing", sideRules.trunkToTrunk];
rightRow.initMaxBpsOnSide ← GetIntProp["RightMaxBPs", 0];
rightRow.routeSideChans ← GetBoolProp["RightChanRoute", FALSE];
layoutData.bpRows[top] ← topRow;
topRow.bpSpacing ← GetIntProp["TopBPSpacing", rowRules.branchToBranch];
topRow.initMaxBpsOnSide ← GetIntProp["TopMaxBPs", 0];
topRow.routeSideChans ← GetBoolProp["TopChanRoute", FALSE];
layoutData.bpRows[left] ← leftRow;
leftRow.bpSpacing ← GetIntProp["LeftBPSpacing", sideRules.trunkToTrunk];
leftRow.initMaxBpsOnSide ← GetIntProp["LeftMaxBPs", 0];
leftRow.routeSideChans ← GetBoolProp["LeftChanRoute", FALSE];
RETURN[canContinue];
END;
END.