SCStatsImpl.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Last Edited by: Preas, September 5, 1985 10:39:21 am PDT
To print stats from SC placement and routing;
set SCNewRouteImpl.keepStats ← TRUE to gather statistics
DIRECTORY
IO, Rope, SC, SCStats, TerminalIO;
SCStatsImpl: CEDAR PROGRAM
IMPORTS IO, TerminalIO
EXPORTS SCStats = BEGIN
WriteStats: PUBLIC PROC [result: SC.Result] ~ {
stats: LIST OF SC.ChannelStats ← result.stats;
TerminalIO.PutRope[text: "\n Routing Statistics"];
UNTIL stats = NIL DO
outer list is of the channels
netStats: LIST OF SC.NetEntry ← stats.first.netStats;
TerminalIO.PutF[format: "\n\tchannel: %g", v1: IO.int[stats.first.channel]];
UNTIL netStats = NIL DO
next inner list is of the nets within this channel
pinStats: LIST OF SC.PinEntry ← netStats.first.pinStats;
ftStats: LIST OF SC.PinEntry ← netStats.first.ftStats;
TerminalIO.PutF[format: "\n\t\tname: %g, leftExit: %g, rightExit: %g", v1: IO.rope[netStats.first.name], v2: IO.bool[netStats.first.leftExit], v3: IO.bool[netStats.first.rightExit]];
UNTIL ftStats = NIL DO
inner list is of the pins within the net within this channel
TerminalIO.PutF[format: "\n\t\t\tfeedThroughBottom: %g, position: %g", v1: IO.bool[ftStats.first.bottom], v2: IO.int[ftStats.first.position]];
ftStats ← ftStats.rest;
ENDLOOP;
UNTIL pinStats = NIL DO
inner list is of the pins within the net within this channel
TerminalIO.PutF[format: "\n\t\t\tbottom: %g, position: %g", v1: IO.bool[pinStats.first.bottom], v2: IO.int[pinStats.first.position]];
pinStats ← pinStats.rest;
ENDLOOP;
netStats ← netStats.rest;
ENDLOOP;
stats ← stats.rest;
ENDLOOP;
TerminalIO.PutRope[text: "\n End Routing Statistics\n"];
};
ReadStats: PUBLIC PROC [fileName: Rope.ROPE] RETURNS [stats: LIST OF SC.ChannelStats] ~ {
read as stats file and make a data structure
};
END.