rm \n from print stmts

This commit is contained in:
James Cherry 2020-12-28 09:04:57 -08:00
parent 7337e6e099
commit 20f01e417b
41 changed files with 507 additions and 477 deletions

View File

@ -880,7 +880,7 @@ ArnoldiDelayCalc::pr_solve1(double s,
// ignoring a typical error at drive node, that comes
// from slight inaccuracies in rr
if (!(rr[order-1]>1.0 && p[order-1]>500.0 && va>v1-0.002))
debugPrint0(debug_, "arnoldi", 1, "err, pr_solve1, va<v1\n");
debugPrint0(debug_, "arnoldi", 1, "err, pr_solve1, va<v1");
}
tmin = ta; vmin = va;
} else {
@ -893,7 +893,7 @@ ArnoldiDelayCalc::pr_solve1(double s,
pr_get_v(ta,s,order,p,rr,&va);
}
if (va>v1)
debugPrint0(debug_, "arnoldi", 1, "err, pr_solve1, va>v1\n");
debugPrint0(debug_, "arnoldi", 1, "err, pr_solve1, va>v1");
tmax = ta; vmax = va;
}
} else {
@ -1141,7 +1141,7 @@ ra_hinv(double y,
ex = exp(-x);
f = x+ex-1.0-y;
if (f<-1e-8 || f>1e-8)
debugPrint2(debug, "arnoldi", 1, "y f %g %g\n",y,f);
debugPrint2(debug, "arnoldi", 1, "y f %g %g" ,y, f);
return x;
}
@ -1276,7 +1276,7 @@ ArnoldiDelayCalc::ra_solve_for_s(delay_work *D,
if (abs(f)>.5e-12) // .5ps
debugPrint3(debug_, "arnoldi", 1,
"ra_solve_for_s p %g tlohi %s err %s\n",
"ra_solve_for_s p %g tlohi %s err %s",
p,
units_->timeUnit()->asString(tlohi),
units_->timeUnit()->asString(f));
@ -1396,7 +1396,7 @@ ArnoldiDelayCalc::ar1_ceff_delay(delay_work *D,
ArcDelay df;
Slew sf;
debugPrint1(debug_, "arnoldi", 1, "\nctot=%s\n",
debugPrint1(debug_, "arnoldi", 1, "\nctot=%s",
units_->capacitanceUnit()->asString(ctot));
rdelay = ra_rdelay_1(tab,ctot);
@ -1419,7 +1419,7 @@ ArnoldiDelayCalc::ar1_ceff_delay(delay_work *D,
double p = 1.0/(r*ctot);
double thix,tlox;
if (bad) printf("bad\n");
debugPrint2(debug_, "arnoldi", 1, "at r=%s s=%s\n",
debugPrint2(debug_, "arnoldi", 1, "at r=%s s=%s",
units_->resistanceUnit()->asString(r),
units_->timeUnit()->asString(s));
thix = ra_solve_for_t(p,s,vhi);
@ -1427,12 +1427,12 @@ ArnoldiDelayCalc::ar1_ceff_delay(delay_work *D,
tab->table->gateDelay(tab->cell, tab->pvt,tab->in_slew,
ctot, tab->relcap, pocv_enabled_, df, sf);
debugPrint3(debug_, "arnoldi", 1,
"table slew (in_slew %s ctot %s) = %s\n",
"table slew (in_slew %s ctot %s) = %s",
units_->timeUnit()->asString(tab->in_slew),
units_->capacitanceUnit()->asString(ctot),
delayAsString(sf, this));
tlohi = slew_derate*delayAsFloat(sf);
debugPrint2(debug_, "arnoldi", 1, "tlohi %s %s\n",
debugPrint2(debug_, "arnoldi", 1, "tlohi %s %s",
units_->timeUnit()->asString(tlohi),
units_->timeUnit()->asString(tlox-thix));
}
@ -1463,17 +1463,17 @@ ArnoldiDelayCalc::ar1_ceff_delay(delay_work *D,
if((ceff-1e-20) < 0.0) { // 1e-8pf
debugPrint0(debug_, "arnoldi", 1,
"Invalid effective capacitance, using total capacitance\n");
"Invalid effective capacitance, using total capacitance");
ceff = ctot;
}
// new mvs at ceff
s = ra_get_s(D,tab,r,ceff);
debugPrint1(debug_, "arnoldi", 1, "new mvs s = %s\n",
debugPrint1(debug_, "arnoldi", 1, "new mvs s = %s",
units_->timeUnit()->asString(s));
}
}
debugPrint4(debug_, "arnoldi", 1, "r %s s %s ceff_time %s ceff %s\n",
debugPrint4(debug_, "arnoldi", 1, "r %s s %s ceff_time %s ceff %s",
units_->resistanceUnit()->asString(r),
units_->timeUnit()->asString(s),
units_->timeUnit()->asString(ceff_time),

View File

@ -404,8 +404,7 @@ ArnoldiReduce::makeRcmodelDfs(ts_point *pdrv)
} // while (stackN)
if (loop)
debugPrint1(debug_, "arnoldi", 1,
"net %s loop\n",
debugPrint1(debug_, "arnoldi", 1, "net %s loop",
network_->pathName(drvr_pin_));
}
@ -433,7 +432,7 @@ ArnoldiReduce::getRC()
p->r = parasitics_->value(p->in_edge->resistor_, ap_);
if (!(p->r>=0.0 && p->r<100e+3)) { // 0 < r < 100kohm
debugPrint2(debug_, "arnoldi", 1,
"R value %g out of range, drvr pin %s\n",
"R value %g out of range, drvr pin %s",
p->r,
network_->pathName(drvr_pin_));
}
@ -499,7 +498,7 @@ ArnoldiReduce::makeRcmodelFromTs()
debug_->print("\n");
}
for (i=0;i<nterms;i++)
debugPrint2(debug_, "arnoldi", 1, "outV[%d] = T%d\n",i,outV[i]);
debugPrint2(debug_, "arnoldi", 1, "outV[%d] = T%d", i, outV[i]);
}
int max_order = 5;
@ -522,7 +521,7 @@ ArnoldiReduce::makeRcmodelFromTs()
sum = 0.0;
for (j=0;j<n;j++) sum += c[j];
debugPrint1(debug_, "arnoldi", 1, "ctot = %s\n",
debugPrint1(debug_, "arnoldi", 1, "ctot = %s",
units_->capacitanceUnit()->asString(sum));
ctot_ = sum;
sqc_ = sqrt(sum);
@ -589,9 +588,9 @@ ArnoldiReduce::makeRcmodelFromTs()
if (debug_->check("arnoldi", 1)) {
debugPrint1(debug_, "arnoldi", 1,
"tridiagonal reduced matrix, drvr pin %s\n",
"tridiagonal reduced matrix, drvr pin %s",
network_->pathName(drvr_pin_));
debugPrint2(debug_, "arnoldi", 1, "order %d n %d\n",order,n);
debugPrint2(debug_, "arnoldi", 1, "order %d n %d",order,n);
for (h=0;h<order;h++) {
debug_->print("d[%d] %s",
h,

View File

@ -355,7 +355,7 @@ DmpAlg::findDriverParams(double ceff)
this, fvec_, fjac_, index_, p_, scale_);
t0_ = x_[DmpParam::t0];
dt_ = x_[DmpParam::dt];
debugPrint3(debug_, "dmp_ceff", 3, " t0 = %s dt = %s ceff = %s\n",
debugPrint3(debug_, "dmp_ceff", 3, " t0 = %s dt = %s ceff = %s",
units_->timeUnit()->asString(t0_),
units_->timeUnit()->asString(dt_),
units_->capacitanceUnit()->asString(x_[DmpParam::ceff]));
@ -730,7 +730,7 @@ DmpCap::init(const LibertyLibrary *drvr_library,
double rpi,
double c1)
{
debugPrint0(debug_, "dmp_ceff", 3, "Using DMP cap\n");
debugPrint0(debug_, "dmp_ceff", 3, "Using DMP cap");
DmpAlg::init(drvr_library, drvr_cell, pvt, gate_model, rf,
rd, in_slew, related_out_cap, c2, rpi, c1);
ceff_ = c1 + c2;
@ -740,7 +740,7 @@ void
DmpCap::gateDelaySlew(double &delay,
double &slew)
{
debugPrint1(debug_, "dmp_ceff", 3, " ceff = %s\n",
debugPrint1(debug_, "dmp_ceff", 3, " ceff = %s",
units_->capacitanceUnit()->asString(ceff_));
gateCapDelaySlew(ceff_, delay, slew);
gate_slew_ = slew;
@ -871,7 +871,7 @@ DmpPi::init(const LibertyLibrary *drvr_library,
double rpi,
double c1)
{
debugPrint0(debug_, "dmp_ceff", 3, "Using DMP Pi\n");
debugPrint0(debug_, "dmp_ceff", 3, "Using DMP Pi");
DmpAlg::init(drvr_library, drvr_cell, pvt, gate_model, rf, rd,
in_slew, related_out_cap, c2, rpi, c1);
@ -1185,7 +1185,7 @@ DmpZeroC2::init(const LibertyLibrary *drvr_library,
double rpi,
double c1)
{
debugPrint0(debug_, "dmp_ceff", 3, "Using DMP C2=0\n");
debugPrint0(debug_, "dmp_ceff", 3, "Using DMP C2=0");
DmpAlg::init(drvr_library, drvr_cell, pvt, gate_model, rf, rd,
in_slew, related_out_cap, c2, rpi, c1);
ceff_ = c1;
@ -1628,7 +1628,7 @@ DmpCeffDelayCalc::setCeffAlgorithm(const LibertyLibrary *drvr_library,
dmp_alg_->init(drvr_library, drvr_cell, pvt, gate_model,
drvr_rf_, rd, in_slew, related_out_cap, c2, rpi, c1);
debugPrint6(debug_, "dmp_ceff", 3,
" DMP in_slew = %s c2 = %s rpi = %s c1 = %s Rd = %s (%s alg)\n",
" DMP in_slew = %s c2 = %s rpi = %s c1 = %s Rd = %s (%s alg)",
units_->timeUnit()->asString(in_slew),
units_->capacitanceUnit()->asString(c2),
units_->resistanceUnit()->asString(rpi),

View File

@ -287,7 +287,7 @@ GraphDelayCalc1::setObserver(DelayCalcObserver *observer)
void
GraphDelayCalc1::delaysInvalid()
{
debugPrint0(debug_, "delay_calc", 1, "delays invalid\n");
debugPrint0(debug_, "delay_calc", 1, "delays invalid");
delays_exist_ = false;
delays_seeded_ = false;
incremental_ = false;
@ -323,7 +323,7 @@ GraphDelayCalc1::delayInvalid(const Pin *pin)
void
GraphDelayCalc1::delayInvalid(Vertex *vertex)
{
debugPrint1(debug_, "delay_calc", 2, "delays invalid %s\n",
debugPrint1(debug_, "delay_calc", 2, "delays invalid %s",
vertex->name(sdc_network_));
if (graph_ && incremental_) {
invalid_delays_.insert(vertex);
@ -404,7 +404,7 @@ GraphDelayCalc1::findDelays(Level level)
if (arc_delay_calc_) {
Stats stats(debug_);
int dcalc_count = 0;
debugPrint1(debug_, "delay_calc", 1, "find delays to level %d\n", level);
debugPrint1(debug_, "delay_calc", 1, "find delays to level %d", level);
if (!delays_seeded_) {
iter_->clear();
ensureMultiDrvrNetsFound();
@ -427,7 +427,7 @@ GraphDelayCalc1::findDelays(Level level)
delays_exist_ = true;
incremental_ = true;
debugPrint1(debug_, "delay_calc", 1, "found %d delays\n", dcalc_count);
debugPrint1(debug_, "delay_calc", 1, "found %d delays", dcalc_count);
stats.report("Delay calc");
}
}
@ -510,7 +510,7 @@ GraphDelayCalc1::ensureMultiDrvrNetsFound()
void
GraphDelayCalc1::makeMultiDrvrNet(PinSet &drvr_pins)
{
debugPrint0(debug_, "delay_calc", 3, "multi-driver net\n");
debugPrint0(debug_, "delay_calc", 3, "multi-driver net");
VertexSet *drvr_vertices = new VertexSet;
MultiDrvrNet *multi_drvr = new MultiDrvrNet(drvr_vertices);
Level max_drvr_level = 0;
@ -519,7 +519,7 @@ GraphDelayCalc1::makeMultiDrvrNet(PinSet &drvr_pins)
while (pin_iter.hasNext()) {
Pin *pin = pin_iter.next();
Vertex *drvr_vertex = graph_->pinDrvrVertex(pin);
debugPrint1(debug_, "delay_calc", 3, " %s\n",
debugPrint1(debug_, "delay_calc", 3, " %s",
network_->pathName(pin));
multi_drvr_net_map_[drvr_vertex] = multi_drvr;
drvr_vertices->insert(drvr_vertex);
@ -575,7 +575,7 @@ GraphDelayCalc1::seedDrvrSlew(Vertex *drvr_vertex,
ArcDelayCalc *arc_delay_calc)
{
const Pin *drvr_pin = drvr_vertex->pin();
debugPrint1(debug_, "delay_calc", 2, "seed driver slew %s\n",
debugPrint1(debug_, "delay_calc", 2, "seed driver slew %s",
drvr_vertex->name(sdc_network_));
InputDrive *drive = 0;
if (network_->isTopLevelPort(drvr_pin)) {
@ -679,7 +679,7 @@ void
GraphDelayCalc1::seedLoadSlew(Vertex *vertex)
{
const Pin *pin = vertex->pin();
debugPrint1(debug_, "delay_calc", 2, "seed load slew %s\n",
debugPrint1(debug_, "delay_calc", 2, "seed load slew %s",
vertex->name(sdc_network_));
ClockSet *clks = sdc_->findLeafPinClocks(pin);
initSlew(vertex);
@ -757,7 +757,7 @@ GraphDelayCalc1::findInputDriverDelay(LibertyCell *drvr_cell,
LibertyPort *to_port,
DcalcAnalysisPt *dcalc_ap)
{
debugPrint2(debug_, "delay_calc", 2, " driver cell %s %s\n",
debugPrint2(debug_, "delay_calc", 2, " driver cell %s %s",
drvr_cell->name(),
rf->asString());
LibertyCellTimingArcSetIterator set_iter(drvr_cell);
@ -789,7 +789,7 @@ GraphDelayCalc1::findInputArcDelay(LibertyCell *drvr_cell,
float from_slew,
DcalcAnalysisPt *dcalc_ap)
{
debugPrint5(debug_, "delay_calc", 3, " %s %s -> %s %s (%s)\n",
debugPrint5(debug_, "delay_calc", 3, " %s %s -> %s %s (%s)",
arc->from()->name(),
arc->fromTrans()->asString(),
arc->to()->name(),
@ -818,7 +818,7 @@ GraphDelayCalc1::findInputArcDelay(LibertyCell *drvr_cell,
gate_delay, gate_slew);
ArcDelay load_delay = gate_delay - intrinsic_delay;
debugPrint3(debug_, "delay_calc", 3,
" gate delay = %s intrinsic = %s slew = %s\n",
" gate delay = %s intrinsic = %s slew = %s",
delayAsString(gate_delay, this),
delayAsString(intrinsic_delay, this),
delayAsString(gate_slew, this));
@ -842,7 +842,7 @@ GraphDelayCalc1::findVertexDelay(Vertex *vertex,
const Pin *pin = vertex->pin();
// Don't clobber root slews.
if (!vertex->isRoot()) {
debugPrint2(debug_, "delay_calc", 2, "find delays %s (%s)\n",
debugPrint2(debug_, "delay_calc", 2, "find delays %s (%s)",
vertex->name(sdc_network_),
network_->cellName(network_->instance(pin)));
if (network_->isLeaf(pin)) {
@ -1195,7 +1195,7 @@ GraphDelayCalc1::findArcDelay(LibertyCell *drvr_cell,
if (from_rf && drvr_rf) {
DcalcAPIndex ap_index = dcalc_ap->index();
debugPrint7(debug_, "delay_calc", 3,
" %s %s -> %s %s (%s) corner:%s/%s\n",
" %s %s -> %s %s (%s) corner:%s/%s",
arc->from()->name(),
arc->fromTrans()->asString(),
arc->to()->name(),
@ -1224,7 +1224,7 @@ GraphDelayCalc1::findArcDelay(LibertyCell *drvr_cell,
gate_delay, gate_slew);
}
debugPrint2(debug_, "delay_calc", 3,
" gate delay = %s slew = %s\n",
" gate delay = %s slew = %s",
delayAsString(gate_delay, this),
delayAsString(gate_slew, this));
// Merge slews.
@ -1417,7 +1417,7 @@ GraphDelayCalc1::annotateLoadDelays(Vertex *drvr_vertex,
Slew load_slew;
arc_delay_calc->loadDelay(load_pin, wire_delay, load_slew);
debugPrint3(debug_, "delay_calc", 3,
" %s load delay = %s slew = %s\n",
" %s load delay = %s slew = %s",
load_vertex->name(sdc_network_),
delayAsString(wire_delay, this),
delayAsString(load_slew, this));
@ -1461,7 +1461,7 @@ void
GraphDelayCalc1::findCheckDelays(Vertex *vertex,
ArcDelayCalc *arc_delay_calc)
{
debugPrint2(debug_, "delay_calc", 2, "find checks %s (%s)\n",
debugPrint2(debug_, "delay_calc", 2, "find checks %s (%s)",
vertex->name(sdc_network_),
network_->cellName(network_->instance(vertex->pin())));
if (vertex->hasChecks()) {
@ -1525,14 +1525,14 @@ GraphDelayCalc1::findCheckEdgeDelays(Edge *edge,
int slew_index = dcalc_ap->checkDataSlewIndex();
const Slew &to_slew = graph_->slew(to_vertex, to_rf, slew_index);
debugPrint5(debug_, "delay_calc", 3,
" %s %s -> %s %s (%s)\n",
" %s %s -> %s %s (%s)",
arc_set->from()->name(),
arc->fromTrans()->asString(),
arc_set->to()->name(),
arc->toTrans()->asString(),
arc_set->role()->asString());
debugPrint2(debug_, "delay_calc", 3,
" from_slew = %s to_slew = %s\n",
" from_slew = %s to_slew = %s",
delayAsString(from_slew, this),
delayAsString(to_slew, this));
float related_out_cap = 0.0;
@ -1550,7 +1550,7 @@ GraphDelayCalc1::findCheckEdgeDelays(Edge *edge,
pvt, dcalc_ap,
check_delay);
debugPrint1(debug_, "delay_calc", 3,
" check_delay = %s\n",
" check_delay = %s",
delayAsString(check_delay, this));
graph_->setArcDelay(edge, arc, ap_index, check_delay);
delay_changed = true;

View File

@ -155,7 +155,7 @@ LumpedCapDelayCalc::gateDelay(const LibertyCell *drvr_cell,
{
GateTimingModel *model = gateModel(arc, dcalc_ap);
debugPrint3(debug_, "delay_calc", 3,
" in_slew = %s load_cap = %s related_load_cap = %s lumped\n",
" in_slew = %s load_cap = %s related_load_cap = %s lumped",
delayAsString(in_slew, this),
units()->capacitanceUnit()->asString(load_cap),
units()->capacitanceUnit()->asString(related_out_cap));

View File

@ -48,6 +48,10 @@ public:
void print(const char *fmt,
...) const
__attribute__((format (printf, 2, 3)));
void reportLine(const char *what,
const char *fmt,
...) const
__attribute__((format (printf, 3, 4)));
protected:
Report *&report_;
@ -70,63 +74,54 @@ debugCheck(const Debug *debug,
// Inlining a varargs function would eval the args, which can
// be expensive, so use macros.
#define debugPrint0(debug, what, level, msg) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: %s", what, msg); \
#define debugPrint0(debug, what, level, msg) \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, "%s", msg); \
}
#define debugPrint1(debug, what, level, fmt, arg1) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1); \
}
#define debugPrint2(debug, what, level, fmt, arg1, arg2) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1, arg2); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1, arg2); \
}
#define debugPrint3(debug, what, level, fmt, arg1, arg2, arg3) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1, arg2, arg3); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1, arg2, arg3); \
}
#define debugPrint4(debug, what, level, fmt, arg1, arg2, arg3, arg4) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1, arg2, arg3, arg4); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1, arg2, arg3, arg4); \
}
#define debugPrint5(debug, what, level, fmt, arg1, arg2, arg3, arg4, arg5) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1, arg2, arg3, arg4, arg5); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1, arg2, arg3, arg4, arg5); \
}
#define debugPrint6(debug,what,level,fmt,arg1,arg2,arg3,arg4,arg5,arg6) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1, arg2, arg3, arg4, arg5, arg6); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1, arg2, arg3, arg4, arg5, arg6); \
}
#define debugPrint7(debug,what,level,fmt,arg1,arg2,arg3,arg4,arg5,arg6,arg7) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \
}
#define debugPrint8(debug,what,level,fmt,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \
}
#define debugPrint9(debug,what,level,fmt,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) \
if (sta::debug_on && debug->check(what, level)) { \
debug->print("%s: ", what); \
debug->print(fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \
if (debug_on && debug->check(what, level)) { \
debug->reportLine(what, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \
}
} // namespace

View File

@ -42,13 +42,13 @@ public:
// Return the number of characters written.
virtual size_t printString(const char *buffer,
size_t length);
virtual void print(const char *fmt, ...);
virtual void vprint(const char *fmt,
va_list args);
void print(const string *str);
void print(const string &str);
// Print line with return.
virtual void printLine(const char *line);
virtual void reportLine(const char *fmt, ...);
virtual void reportLineString(const char *line);
////////////////////////////////////////////////////////////////
@ -148,6 +148,8 @@ protected:
std::mutex buffer_lock_;
static Report *default_;
friend class Debug;
private:
DISALLOW_COPY_AND_ASSIGN(Report);
};

View File

@ -48,7 +48,8 @@ public:
virtual void setTclInterp(Tcl_Interp *interp);
protected:
virtual size_t printConsole(const char *buffer, size_t length);
virtual size_t printConsole(const char *buffer,
size_t length);
void flush();
private:
@ -56,7 +57,9 @@ private:
Tcl_ChannelType *makeEncapChannelType(Tcl_Channel channel,
char *channel_name,
Tcl_DriverOutputProc output_proc);
size_t printTcl(Tcl_Channel channel, const char *buffer, size_t length);
size_t printTcl(Tcl_Channel channel,
const char *buffer,
size_t length);
Tcl_Interp *interp_;
// The original tcl channels.

View File

@ -1713,7 +1713,7 @@ LibertyCell::makeLatchEnable(LibertyPort *d,
latch_d_to_q_map_[d_to_q] = latch_enable;
latch_check_map_[setup_check] = latch_enable;
latch_data_ports_.insert(d);
debugPrint3(debug, "liberty", 2, "latch d=%s en=%s q=%s\n",
debugPrint3(debug, "liberty", 2, "latch d=%s en=%s q=%s",
d->name(), en->name(), q->name());
return latch_enable;
}

View File

@ -1782,7 +1782,7 @@ LibertyReader::beginCell(LibertyGroup *group)
{
const char *name = group->firstName();
if (name) {
debugPrint1(debug_, "liberty", 1, "cell %s\n", name);
debugPrint1(debug_, "liberty", 1, "cell %s", name);
cell_ = builder_->makeCell(library_, name, filename_);
in_bus_ = false;
in_bundle_ = false;
@ -2059,7 +2059,7 @@ LibertyReader::beginScaledCell(LibertyGroup *group)
if (op_cond_name) {
op_cond_ = library_->findOperatingConditions(op_cond_name);
if (op_cond_) {
debugPrint2(debug_, "liberty", 1, "scaled cell %s %s\n",
debugPrint2(debug_, "liberty", 1, "scaled cell %s %s",
name, op_cond_name);
cell_ = library_->makeScaledCell(name, filename_);
}
@ -2131,7 +2131,7 @@ LibertyReader::makeTimingArcs(LibertyPort *to_port,
const char *from_port_name = related_port_iter.next();
PortNameBitIterator from_port_iter(cell_, from_port_name, this, line);
if (from_port_iter.hasNext()) {
debugPrint2(debug_, "liberty", 2, " timing %s -> %s\n",
debugPrint2(debug_, "liberty", 2, " timing %s -> %s",
from_port_name, to_port->name());
makeTimingArcs(from_port_name, from_port_iter, to_port,
related_out_port, timing);
@ -2304,7 +2304,7 @@ LibertyReader::makeInternalPowers(LibertyPort *port,
const char *related_port_name = related_port_iter.next();
PortNameBitIterator related_port_iter(cell_, related_port_name, this, line);
if (related_port_iter.hasNext()) {
debugPrint2(debug_, "liberty", 2, " power %s -> %s\n",
debugPrint2(debug_, "liberty", 2, " power %s -> %s",
related_port_name, port->name());
makeInternalPowers(port, related_port_name, related_port_iter, power_group);
}
@ -2504,7 +2504,7 @@ LibertyReader::beginPin(LibertyGroup *group)
LibertyAttrValue *param = param_iter.next();
if (param->isString()) {
const char *name = param->stringValue();
debugPrint1(debug_, "liberty", 1, " port %s\n", name);
debugPrint1(debug_, "liberty", 1, " port %s", name);
PortNameBitIterator port_iter(cell_, name, this, group->line());
while (port_iter.hasNext()) {
LibertyPort *port = port_iter.next();
@ -2524,7 +2524,7 @@ LibertyReader::beginPin(LibertyGroup *group)
LibertyAttrValue *param = param_iter.next();
if (param->isString()) {
const char *name = param->stringValue();
debugPrint1(debug_, "liberty", 1, " port %s\n", name);
debugPrint1(debug_, "liberty", 1, " port %s", name);
LibertyPort *port = findPort(name);
if (port == nullptr)
port = builder_->makePort(cell_, name);
@ -2544,7 +2544,7 @@ LibertyReader::beginPin(LibertyGroup *group)
LibertyAttrValue *param = param_iter.next();
if (param->isString()) {
const char *name = param->stringValue();
debugPrint1(debug_, "liberty", 1, " port %s\n", name);
debugPrint1(debug_, "liberty", 1, " port %s", name);
if (isBusName(name, brkt_left, brkt_right, escape_))
// Pins not inside a bus group with bus names are not really
// busses, so escape the brackets.
@ -2680,7 +2680,7 @@ LibertyReader::visitBusType(LibertyAttr *attr)
StringSeq::Iterator name_iter(bus_names_);
while (name_iter.hasNext()) {
const char *name = name_iter.next();
debugPrint1(debug_, "liberty", 1, " bus %s\n", name);
debugPrint1(debug_, "liberty", 1, " bus %s", name);
LibertyPort *port = builder_->makeBusPort(cell_, name,
bus_dcl->from(),
bus_dcl->to());
@ -2723,7 +2723,7 @@ LibertyReader::visitMembers(LibertyAttr *attr)
StringSeq::Iterator name_iter(bus_names_);
while (name_iter.hasNext()) {
const char *name = name_iter.next();
debugPrint1(debug_, "liberty", 1, " bundle %s\n", name);
debugPrint1(debug_, "liberty", 1, " bundle %s", name);
ConcretePortSeq *members = new ConcretePortSeq;
LibertyAttrValueIterator value_iter(attr->values());
while (value_iter.hasNext()) {

View File

@ -16,7 +16,8 @@
#include "TableModel.hh"
#include "Report.hh"
#include <string>
#include "Error.hh"
#include "EnumNameMap.hh"
#include "Units.hh"
@ -24,6 +25,8 @@
namespace sta {
using std::string;
static void
deleteSigmaModels(TableModel *models[EarlyLate::index_count]);
static void
@ -732,7 +735,7 @@ Table0::report(const Units *units,
{
int digits = 4;
const Unit *table_unit = units->timeUnit();
report->print("%s\n", table_unit->asString(value_, digits));
report->reportLine("%s", table_unit->asString(value_, digits));
}
////////////////////////////////////////////////////////////////
@ -835,15 +838,21 @@ Table1::report(const Units *units,
int digits = 4;
const Unit *unit1 = tableVariableUnit(axis1_->variable(), units);
const Unit *table_unit = units->timeUnit();
report->print("%s\n", tableVariableString(axis1_->variable()));
report->print("------------------------------\n");
for (size_t index1 = 0; index1 < axis1_->size(); index1++)
report->print("%s ", unit1->asString(axis1_->axisValue(index1), digits));
report->print("\n");
report->reportLine("%s", tableVariableString(axis1_->variable()));
report->reportLine("------------------------------");
string line;
for (size_t index1 = 0; index1 < axis1_->size(); index1++) {
line += unit1->asString(axis1_->axisValue(index1), digits);
line += " ";
}
report->reportLine(line.c_str());
for (size_t index1 = 0; index1 < axis1_->size(); index1++)
report->print("%s ", table_unit->asString(tableValue(index1),digits));
report->print("\n");
line.clear();
for (size_t index1 = 0; index1 < axis1_->size(); index1++) {
line += table_unit->asString(tableValue(index1), digits);
line += " ";
}
report->reportLine(line.c_str());
}
////////////////////////////////////////////////////////////////
@ -1020,19 +1029,23 @@ Table2::report(const Units *units,
const Unit *table_unit = units->timeUnit();
const Unit *unit1 = tableVariableUnit(axis1_->variable(), units);
const Unit *unit2 = tableVariableUnit(axis2_->variable(), units);
report->print("%s\n", tableVariableString(axis2_->variable()));
report->print(" ------------------------------\n");
report->print(" ");
for (size_t index2 = 0; index2 < axis2_->size(); index2++)
report->print("%s ", unit2->asString(axis2_->axisValue(index2), digits));
report->print("\n");
report->reportLine("%s", tableVariableString(axis2_->variable()));
report->reportLine(" ------------------------------");
string line = " ";
for (size_t index2 = 0; index2 < axis2_->size(); index2++) {
line += unit2->asString(axis2_->axisValue(index2), digits);
line += " ";
}
report->reportLine(line.c_str());
for (size_t index1 = 0; index1 < axis1_->size(); index1++) {
report->print("%s |", unit1->asString(axis1_->axisValue(index1), digits));
for (size_t index2 = 0; index2 < axis2_->size(); index2++)
report->print("%s ", table_unit->asString(tableValue(index1, index2),
digits));
report->print("\n");
line = unit1->asString(axis1_->axisValue(index1), digits);
line += " |";
for (size_t index2 = 0; index2 < axis2_->size(); index2++) {
line += table_unit->asString(tableValue(index1, index2), digits);
line += " ";
}
report->reportLine(line.c_str());
}
}
@ -1277,23 +1290,26 @@ Table3::report(const Units *units,
const Unit *unit2 = tableVariableUnit(axis2_->variable(), units);
const Unit *unit3 = tableVariableUnit(axis3_->variable(), units);
for (size_t index1 = 0; index1 < axis1_->size(); index1++) {
report->print("%s %s\n", tableVariableString(axis1_->variable()),
unit1->asString(axis1_->axisValue(index1), digits));
report->reportLine("%s %s", tableVariableString(axis1_->variable()),
unit1->asString(axis1_->axisValue(index1), digits));
report->print("%s\n", tableVariableString(axis3_->variable()));
report->print(" ------------------------------\n");
report->print(" ");
for (size_t index3 = 0; index3 < axis3_->size(); index3++)
report->print("%s ", unit3->asString(axis3_->axisValue(index3), digits));
report->print("\n");
report->reportLine("%s", tableVariableString(axis3_->variable()));
report->reportLine(" ------------------------------");
string line = " ";
for (size_t index3 = 0; index3 < axis3_->size(); index3++) {
line += unit3->asString(axis3_->axisValue(index3), digits);
line += " ";
}
report->reportLine(line.c_str());
for (size_t index2 = 0; index2 < axis2_->size(); index2++) {
report->print("%s |", unit2->asString(axis2_->axisValue(index2),digits));
for (size_t index3 = 0; index3 < axis3_->size(); index3++)
report->print("%s ", table_unit->asString(tableValue(index1, index2,
index3),
digits));
report->print("\n");
line = unit2->asString(axis2_->axisValue(index2),digits);
line += " |";
for (size_t index3 = 0; index3 < axis3_->size(); index3++) {
line += table_unit->asString(tableValue(index1, index2, index3), digits);
line += " ";
}
report->reportLine(line.c_str());
}
}
}

View File

@ -316,3 +316,6 @@
604 Sdc.tcl:270 unknown $unit prefix '$prefix'.
605 Sdc.tcl:3066 wire load model '$model_name' not found.
606 Cmds.tcl:1875 get_property unsupported object type $object_type.
607 StaTcl.i unknown report path field %s
608 StaTcl.i unknown report path field %s

View File

@ -1592,7 +1592,7 @@ ConcreteParasitics::reduceToPiElmore(Parasitic *parasitic,
const MinMax *cnst_min_max,
const ParasiticAnalysisPt *ap)
{
debugPrint1(debug_, "parasitic_reduce", 1, "Reduce net %s\n",
debugPrint1(debug_, "parasitic_reduce", 1, "Reduce net %s",
network_->pathName(net));
NetConnectedPinIterator *pin_iter = network_->connectedPinIterator(net);
while (pin_iter->hasNext()) {
@ -1625,7 +1625,7 @@ ConcreteParasitics::reduceToPiPoleResidue2(Parasitic *parasitic,
const MinMax *cnst_min_max,
const ParasiticAnalysisPt *ap)
{
debugPrint1(debug_, "parasitic_reduce", 1, "Reduce net %s\n",
debugPrint1(debug_, "parasitic_reduce", 1, "Reduce net %s",
network_->pathName(net));
NetConnectedPinIterator *pin_iter = network_->connectedPinIterator(net);
while (pin_iter->hasNext()) {

View File

@ -132,7 +132,7 @@ ReduceToPi::reduceToPi(const Pin *drvr_pin,
rpi = -y3 * y3 / (y2 * y2 * y2);
}
debugPrint3(debug_, "parasitic_reduce", 2,
" Pi model c2=%.3g rpi=%.3g c1=%.3g\n",
" Pi model c2=%.3g rpi=%.3g c1=%.3g",
c2, rpi, c1);
}
@ -173,8 +173,7 @@ ReduceToPi::reducePiDfs(const Pin *drvr_pin,
&& device != from_res) {
if (isVisited(onode)) {
// Resistor loop.
debugPrint1(debug_, "parasitic_reduce", 2,
" loop detected thru resistor %s\n",
debugPrint1(debug_, "parasitic_reduce", 2, " loop detected thru resistor %s",
parasitics_->name(device));
markLoopResistor(device);
}
@ -197,7 +196,7 @@ ReduceToPi::reducePiDfs(const Pin *drvr_pin,
setDownstreamCap(node, dwn_cap);
leave(node);
debugPrint5(debug_, "parasitic_reduce", 3,
" node %s y1=%.3g y2=%.3g y3=%.3g cap=%.3g\n",
" node %s y1=%.3g y2=%.3g y3=%.3g cap=%.3g",
parasitics_->name(node), y1, y2, y3, dwn_cap);
}
@ -302,8 +301,7 @@ reduceToPiElmore(Parasitic *parasitic_network,
ParasiticNode *drvr_node = parasitics->findNode(parasitic_network,
drvr_pin);
if (drvr_node) {
debugPrint1(sta->debug(), "parasitic_reduce", 1,
"Reduce driver %s\n",
debugPrint1(sta->debug(), "parasitic_reduce", 1, "Reduce driver %s",
sta->network()->pathName(drvr_pin));
ReduceToPiElmore reducer(sta);
reducer.makePiElmore(parasitic_network, drvr_pin, drvr_node,
@ -357,8 +355,7 @@ ReduceToPiElmore::reduceElmoreDfs(const Pin *drvr_pin,
const Pin *pin = parasitics_->connectionPin(node);
if (from_res && pin) {
if (network_->isLoad(pin)) {
debugPrint2(debug_, "parasitic_reduce", 2,
" Load %s elmore=%.3g\n",
debugPrint2(debug_, "parasitic_reduce", 2, " Load %s elmore=%.3g",
network_->pathName(pin),
elmore);
parasitics_->setElmore(pi_elmore, pin, elmore);
@ -469,8 +466,7 @@ reduceToPiPoleResidue2(Parasitic *parasitic_network,
Parasitics *parasitics = sta->parasitics();
ParasiticNode *drvr_node = parasitics->findNode(parasitic_network, drvr_pin);
if (drvr_node) {
debugPrint1(sta->debug(), "parasitic_reduce", 1,
"Reduce driver %s\n",
debugPrint1(sta->debug(), "parasitic_reduce", 1, "Reduce driver %s",
sta->network()->pathName(drvr_pin));
ReduceToPiPoleResidue2 reducer(sta);
reducer.makePiPoleResidue2(parasitic_network, drvr_pin, drvr_node,
@ -591,8 +587,7 @@ ReduceToPiPoleResidue2::findBranchCurrents(const Pin *drvr_pin,
leave(node);
if (from_res) {
setCurrent(from_res, branch_i);
debugPrint1(debug_, "parasitic_reduce", 3,
" res i=%.3g\n", branch_i);
debugPrint1(debug_, "parasitic_reduce", 3, " res i=%.3g", branch_i);
}
return branch_i;
}
@ -620,8 +615,7 @@ ReduceToPiPoleResidue2::findMoments(const Pin *drvr_pin,
double r_volt = r * current(device);
double onode_volt = from_volt - r_volt;
setMoment(onode, onode_volt, moment_index);
debugPrint3(debug_, "parasitic_reduce", 3,
" moment %s %d %.3g\n",
debugPrint3(debug_, "parasitic_reduce", 3, " moment %s %d %.3g",
parasitics_->name(onode),
moment_index,
onode_volt);
@ -689,8 +683,7 @@ ReduceToPiPoleResidue2::findPolesResidues(Parasitic *pi_pole_residue,
|| m1 / m2 == m2 / m3) {
double p1 = -1.0 / m1;
double k1 = 1.0;
debugPrint3(debug_, "parasitic_reduce", 3,
" load %s p1=%.3g k1=%.3g\n",
debugPrint3(debug_, "parasitic_reduce", 3, " load %s p1=%.3g k1=%.3g",
network_->pathName(load_pin), p1, k1);
ComplexFloatSeq *poles = new ComplexFloatSeq(1);
ComplexFloatSeq *residues = new ComplexFloatSeq(1);
@ -710,7 +703,7 @@ ReduceToPiPoleResidue2::findPolesResidues(Parasitic *pi_pole_residue,
k1 = k;
}
debugPrint5(debug_, "parasitic_reduce", 3,
" load %s p1=%.3g p2=%.3g k1=%.3g k2=%.3g\n",
" load %s p1=%.3g p2=%.3g k1=%.3g k2=%.3g",
network_->pathName(load_pin), p1, p2, k1, k2);
ComplexFloatSeq *poles = new ComplexFloatSeq(2);

View File

@ -46,7 +46,7 @@ CycleAccting::findDelays(StaState *sta)
{
Debug *debug = sta->debug();
const Unit *time_unit = sta->units()->timeUnit();
debugPrint2(debug, "cycle_acct", 1, "%s -> %s\n",
debugPrint2(debug, "cycle_acct", 1, "%s -> %s",
src_->name(),
tgt_->name());
const int setup_index = TimingRole::setup()->index();
@ -88,14 +88,14 @@ CycleAccting::findDelays(StaState *sta)
if (tgt_past_src && src_past_tgt
// Synchronicity achieved.
&& fuzzyEqual(src_cycle_start, tgt_cycle_start)) {
debugPrint2(debug, "cycle_acct", 1, " setup = %s, required = %s\n",
debugPrint2(debug, "cycle_acct", 1, " setup = %s, required = %s",
time_unit->asString(delay_[setup_index]),
time_unit->asString(required_[setup_index]));
debugPrint2(debug, "cycle_acct", 1, " hold = %s, required = %s\n",
debugPrint2(debug, "cycle_acct", 1, " hold = %s, required = %s",
time_unit->asString(delay_[hold_index]),
time_unit->asString(required_[hold_index]));
debugPrint2(debug, "cycle_acct", 1,
" converged at src cycles = %d tgt cycles = %d\n",
" converged at src cycles = %d tgt cycles = %d",
src_cycle, tgt_cycle);
return;
}
@ -103,13 +103,13 @@ CycleAccting::findDelays(StaState *sta)
if (fuzzyGreater(src_cycle_start, tgt_cycle_start + tgt_period)
&& src_past_tgt)
break;
debugPrint5(debug, "cycle_acct", 2, " %s src cycle %d %s + %s = %s\n",
debugPrint5(debug, "cycle_acct", 2, " %s src cycle %d %s + %s = %s",
src_->name(),
src_cycle,
time_unit->asString(src_cycle_start),
time_unit->asString(src_->time()),
time_unit->asString(src_time));
debugPrint5(debug, "cycle_acct", 2, " %s tgt cycle %d %s + %s = %s\n",
debugPrint5(debug, "cycle_acct", 2, " %s tgt cycle %d %s + %s = %s",
tgt_->name(),
tgt_cycle,
time_unit->asString(tgt_cycle_start),
@ -124,7 +124,7 @@ CycleAccting::findDelays(StaState *sta)
double required = tgt_time - src_cycle_start;
setSetupAccting(src_cycle, tgt_cycle, delay, required);
debugPrint2(debug, "cycle_acct", 2,
" setup min delay = %s, required = %s\n",
" setup min delay = %s, required = %s",
time_unit->asString(delay_[setup_index]),
time_unit->asString(required_[setup_index]));
}
@ -160,7 +160,7 @@ CycleAccting::findDelays(StaState *sta)
setAccting(TimingRole::latchSetup(),
src_cycle, latch_tgt_cycle, delay, required);
debugPrint2(debug, "cycle_acct", 2,
" latch setup min delay = %s, required = %s\n",
" latch setup min delay = %s, required = %s",
time_unit->asString(delay_[latch_setup_index]),
time_unit->asString(required_[latch_setup_index]));
}
@ -174,7 +174,7 @@ CycleAccting::findDelays(StaState *sta)
double required = tgt_time - src_cycle_start;
setHoldAccting(src_cycle, tgt_cycle, delay, required);
debugPrint2(debug, "cycle_acct", 2,
" hold min delay = %s, required = %s\n",
" hold min delay = %s, required = %s",
time_unit->asString(delay_[hold_index]),
time_unit->asString(required_[hold_index]));
}
@ -189,7 +189,7 @@ CycleAccting::findDelays(StaState *sta)
setAccting(TimingRole::gatedClockHold(),
src_cycle, tgt_cycle, delay, required);
debugPrint2(debug, "cycle_acct", 2,
" gated clk hold min delay = %s, required = %s\n",
" gated clk hold min delay = %s, required = %s",
time_unit->asString(delay_[gclk_hold_index]),
time_unit->asString(required_[gclk_hold_index]));
}
@ -198,7 +198,7 @@ CycleAccting::findDelays(StaState *sta)
}
max_cycles_exceeded_ = true;
debugPrint2(debug, "cycle_acct", 1,
" max cycles exceeded after %d src cycles, %d tgt_cycles\n",
" max cycles exceeded after %d src cycles, %d tgt_cycles",
src_cycle, tgt_cycle);
}
else if (tgt_period > 0.0)

View File

@ -4243,7 +4243,7 @@ Sdc::makeLoopExceptions()
void
Sdc::makeLoopExceptions(GraphLoop *loop)
{
debugPrint0(debug_, "loop", 2, "Loop false path\n");
debugPrint0(debug_, "loop", 2, "Loop false path");
EdgeSeq::Iterator loop_edge_iter(loop->edges());
while (loop_edge_iter.hasNext()) {
Edge *edge = loop_edge_iter.next();
@ -4289,7 +4289,7 @@ void
Sdc::makeLoopExceptionThru(Pin *pin,
ExceptionThruSeq *thrus)
{
debugPrint1(debug_, "levelize", 2, " %s\n", network_->pathName(pin));
debugPrint1(debug_, "levelize", 2, " %s", network_->pathName(pin));
PinSet *pins = new PinSet;
pins->insert(pin);
ExceptionThru *thru = makeExceptionThru(pins, nullptr, nullptr,
@ -4313,7 +4313,7 @@ Sdc::deleteLoopExceptions()
void
Sdc::addException(ExceptionPath *exception)
{
debugPrint1(debug_, "exception_merge", 1, "add exception for %s\n",
debugPrint1(debug_, "exception_merge", 1, "add exception for %s",
exception->asString(network_));
if (exception->isPathDelay()) {
@ -4339,7 +4339,7 @@ Sdc::addException(ExceptionPath *exception)
ExceptionTo *to = exception->to();
ExceptionTo *to1 = to ? to->clone() : nullptr;
ExceptionPath *exception1 = exception->clone(from1, thrus1, to1, true);
debugPrint1(debug_, "exception_merge", 1, " split exception for %s\n",
debugPrint1(debug_, "exception_merge", 1, " split exception for %s",
exception1->asString(network_));
addException1(exception1);
@ -4349,7 +4349,7 @@ Sdc::addException(ExceptionPath *exception)
ExceptionThruSeq *thrus2 = exceptionThrusClone(exception->thrus(), network_);
ExceptionTo *to2 = to ? to->clone() : nullptr;
ExceptionPath *exception2 = exception->clone(from2, thrus2, to2, true);
debugPrint1(debug_, "exception_merge", 1, " split exception for %s\n",
debugPrint1(debug_, "exception_merge", 1, " split exception for %s",
exception2->asString(network_));
addException1(exception2);
@ -4374,7 +4374,7 @@ Sdc::addException1(ExceptionPath *exception)
to->transition(),
to->endTransition(), true);
ExceptionPath *exception1 = exception->clone(from1, thrus1, to1, true);
debugPrint1(debug_, "exception_merge", 1, " split exception for %s\n",
debugPrint1(debug_, "exception_merge", 1, " split exception for %s",
exception1->asString(network_));
addException2(exception1);
@ -4384,7 +4384,7 @@ Sdc::addException1(ExceptionPath *exception)
ExceptionTo *to2 = new ExceptionTo(nullptr, clks2, nullptr, to->transition(),
to->endTransition(), true);
ExceptionPath *exception2 = exception->clone(from2, thrus2, to2, true);
debugPrint1(debug_, "exception_merge", 1, " split exception for %s\n",
debugPrint1(debug_, "exception_merge", 1, " split exception for %s",
exception2->asString(network_));
addException2(exception2);
@ -4447,7 +4447,7 @@ Sdc::addException2(ExceptionPath *exception)
void
Sdc::deleteMatchingExceptions(ExceptionPath *exception)
{
debugPrint1(debug_, "exception_merge", 1, "find matches for %s\n",
debugPrint1(debug_, "exception_merge", 1, "find matches for %s",
exception->asString(network_));
ExceptionPathSet matches;
findMatchingExceptions(exception, matches);
@ -4751,7 +4751,7 @@ Sdc::recordMergeHash(ExceptionPath *exception,
{
size_t hash = exception->hash(missing_pt);
debugPrint3(debug_, "exception_merge", 3,
"record merge hash %zu %s missing %s\n",
"record merge hash %zu %s missing %s",
hash,
exception->asString(network_),
missing_pt->asString(network_));
@ -4977,9 +4977,9 @@ Sdc::findMergeMatch(ExceptionPath *exception)
// search at the endpoint.
&& exception->mergeable(match)
&& match->mergeablePts(exception, missing_pt, match_missing_pt)) {
debugPrint1(debug_, "exception_merge", 1, "merge %s\n",
debugPrint1(debug_, "exception_merge", 1, "merge %s",
exception->asString(network_));
debugPrint1(debug_, "exception_merge", 1, " with %s\n",
debugPrint1(debug_, "exception_merge", 1, " with %s",
match->asString(network_));
// Unrecord the exception that is being merged away.
unrecordException(exception);
@ -5158,7 +5158,7 @@ Sdc::deleteExceptionsReferencing(Clock *clk)
void
Sdc::deleteException(ExceptionPath *exception)
{
debugPrint1(debug_, "exception_merge", 2, "delete %s\n",
debugPrint1(debug_, "exception_merge", 2, "delete %s",
exception->asString(network_));
unrecordException(exception);
delete exception;
@ -5188,7 +5188,7 @@ Sdc::unrecordMergeHash(ExceptionPath *exception,
{
size_t hash = exception->hash(missing_pt);
debugPrint3(debug_, "exception_merge", 3,
"unrecord merge hash %zu %s missing %s\n",
"unrecord merge hash %zu %s missing %s",
hash,
exception->asString(network_),
missing_pt->asString(network_));
@ -5380,7 +5380,7 @@ Sdc::resetPath(ExceptionFrom *from,
while (except_iter.hasNext()) {
ExceptionPath *match = except_iter.next();
if (match->resetMatch(from, thrus, to, min_max)) {
debugPrint1(debug_, "exception_match", 3, "reset match %s\n",
debugPrint1(debug_, "exception_match", 3, "reset match %s",
match->asString(network_));
ExceptionPathSet expansions;
expandException(match, expansions);

View File

@ -176,12 +176,12 @@ ReportAnnotated::reportDelayCounts()
total, annotated_total);
reportCount("net arcs to primary outputs", count_output_net,
total, annotated_total);
report_->print("----------------------------------------------------------------\n");
report_->print("%-28s %10u %10u %10u\n",
" ",
total,
annotated_total,
total - annotated_total);
report_->reportLine("----------------------------------------------------------------");
report_->reportLine("%-28s %10u %10u %10u",
" ",
total,
annotated_total,
total - annotated_total);
}
////////////////////////////////////////////////////////////////
@ -267,12 +267,12 @@ ReportAnnotated::reportCheckCounts()
reportCheckCount(TimingRole::period(), total, annotated_total);
reportCheckCount(TimingRole::skew(), total, annotated_total);
report_->print("----------------------------------------------------------------\n");
report_->print("%-28s %10u %10u %10u\n",
" ",
total,
annotated_total,
total - annotated_total);
report_->reportLine("----------------------------------------------------------------");
report_->reportLine("%-28s %10u %10u %10u",
" ",
total,
annotated_total,
total - annotated_total);
}
void
@ -433,19 +433,19 @@ ReportAnnotated::reportCount(const char *title,
if (report_role_[index]) {
int count = edge_count_[index];
int annotated_count = edge_annotated_count_[index];
report_->print("%-28s %10u %10u %10u\n",
title,
count,
annotated_count,
count - annotated_count);
report_->reportLine("%-28s %10u %10u %10u",
title,
count,
annotated_count,
count - annotated_count);
if (report_constant_arcs_) {
int const_count = edge_constant_count_[index];
int const_annotated_count = edge_constant_annotated_count_[index];
report_->print("%-28s %10s %10u %10u\n",
"constant arcs",
"",
const_annotated_count,
const_count - const_annotated_count);
report_->reportLine("%-28s %10s %10u %10u",
"constant arcs",
"",
const_annotated_count,
const_count - const_annotated_count);
}
total += count;
annotated_total += annotated_count;
@ -512,14 +512,12 @@ ReportAnnotated::reportArcs(Vertex *vertex,
}
else
role_name = "delay";
report_->print(" %-18s %s -> %s",
role_name,
network_->pathName(from_pin),
network_->pathName(to_pin));
const char *cond = edge->timingArcSet()->sdfCond();
if (cond)
report_->print(" %s", cond);
report_->print("\n");
report_->reportLine(" %-18s %s -> %s %s",
role_name,
network_->pathName(from_pin),
network_->pathName(to_pin),
cond ? cond : "");
i++;
}
}
@ -545,9 +543,9 @@ ReportAnnotated::reportWidthPeriodArcs(Pin *pin,
edge_count_[period_index]++;
graph_->periodCheckAnnotation(pin, ap_index, value, annotated);
if (annotated == report_annotated) {
report_->print(" %-18s %s\n",
"period",
network_->pathName(pin));
report_->reportLine(" %-18s %s",
"period",
network_->pathName(pin));
i++;
}
}
@ -567,9 +565,9 @@ ReportAnnotated::reportWidthPeriodArcs(Pin *pin,
}
}
if (report) {
report_->print(" %-18s %s\n",
"min width",
network_->pathName(pin));
report_->reportLine(" %-18s %s",
"min width",
network_->pathName(pin));
i++;
}
}

View File

@ -232,7 +232,7 @@ BfsIterator::findNext(Level to_level)
void
BfsIterator::enqueue(Vertex *vertex)
{
debugPrint1(debug_, "bfs", 2, "enqueue %s\n", vertex->name(sdc_network_));
debugPrint1(debug_, "bfs", 2, "enqueue %s", vertex->name(sdc_network_));
if (!vertex->bfsInQueue(bfs_index_)) {
Level level = vertex->level();
UniqueLock lock(queue_lock_);

View File

@ -253,7 +253,7 @@ visitMinPulseWidthChecks(MinPulseWidthCheckVisitor *visitor)
while (vertex_iter.hasNext()) {
Vertex *vertex = vertex_iter.next();
if (isClkEnd(vertex, graph)) {
debugPrint1(debug, "mpw", 1, "check mpw %s\n", vertex->name(sdc_network));
debugPrint1(debug, "mpw", 1, "check mpw %s", vertex->name(sdc_network));
visitMinPulseWidthChecks(vertex, visitor);
}
}
@ -348,16 +348,16 @@ MinPulseWidthCheck::closePath(const StaState *sta,
open_tag->isSegmentStart(),
open_tag->states(),
false, sta);
debugPrint1(sta->debug(), "mpw", 3, " open %s\n",
debugPrint1(sta->debug(), "mpw", 3, " open %s",
open_tag->asString(sta));
debugPrint1(sta->debug(), "mpw", 3, " close %s\n",
debugPrint1(sta->debug(), "mpw", 3, " close %s",
close_tag.asString(sta));
VertexPathIterator close_iter(open_path_.vertex(sta), close_rf,
close_ap, sta);
while (close_iter.hasNext()) {
PathVertex *close_path = close_iter.next();
if (tagMatchNoPathAp(close_path->tag(sta), &close_tag)) {
debugPrint1(sta->debug(), "mpw", 3, " match %s\n",
debugPrint1(sta->debug(), "mpw", 3, " match %s",
close_path->tag(sta)->asString(sta));
close = close_path;
break;

View File

@ -51,7 +51,7 @@ ClkNetwork::clear()
void
ClkNetwork::clkPinsInvalid()
{
debugPrint0(debug_, "clk_network", 1, "clk network invalid\n");
debugPrint0(debug_, "clk_network", 1, "clk network invalid");
clk_pins_valid_ = false;
}
@ -98,7 +98,7 @@ ClkSearchPred::searchTo(const Vertex *to)
void
ClkNetwork::findClkPins()
{
debugPrint0(debug_, "clk_network", 1, "find clk network\n");
debugPrint0(debug_, "clk_network", 1, "find clk network");
clear();
findClkPins(false, pin_clks_map_);
findClkPins(true, pin_ideal_clks_map_);

View File

@ -140,28 +140,29 @@ ClkSkews::reportClkSkew(ClockSet *clks,
ClockSeq::Iterator clk_iter2(sorted_clks);
while (clk_iter2.hasNext()) {
Clock *clk = clk_iter2.next();
report_->print("Clock %s\n", clk->name());
report_->reportLine("Clock %s", clk->name());
ClkSkew *clk_skew = skews.findKey(clk);
if (clk_skew) {
report_->print("Latency CRPR Skew\n");
report_->reportLine("Latency CRPR Skew");
PathVertex *src_path = clk_skew->srcPath();
PathVertex *tgt_path = clk_skew->tgtPath();
report_->print("%s %s\n",
sdc_network_->pathName(src_path->pin(this)),
src_path->transition(this)->asString());
report_->print("%7s\n",
time_unit->asString(clk_skew->srcLatency(this), digits));
report_->print("%s %s\n",
sdc_network_->pathName(tgt_path->pin(this)),
tgt_path->transition(this)->asString());
report_->print("%7s %7s %7s\n",
time_unit->asString(clk_skew->tgtLatency(this), digits),
time_unit->asString(delayAsFloat(-clk_skew->crpr(this)), digits),
time_unit->asString(clk_skew->skew(), digits));
report_->reportLine("%s %s",
sdc_network_->pathName(src_path->pin(this)),
src_path->transition(this)->asString());
report_->reportLine("%7s",
time_unit->asString(clk_skew->srcLatency(this), digits));
report_->reportLine("%s %s",
sdc_network_->pathName(tgt_path->pin(this)),
tgt_path->transition(this)->asString());
report_->reportLine("%7s %7s %7s",
time_unit->asString(clk_skew->tgtLatency(this), digits),
time_unit->asString(delayAsFloat(-clk_skew->crpr(this)),
digits),
time_unit->asString(clk_skew->skew(), digits));
}
else
report_->print("No launch/capture paths found.\n");
report_->print("\n");
report_->reportLine("No launch/capture paths found.");
report_->reportLine("");
}
skews.deleteContents();
@ -276,7 +277,8 @@ ClkSkews::findClkSkew(Vertex *src_vertex,
&& tgt_path->pathAnalysisPt(this)->corner() == src_corner) {
ClkSkew probe(src_path, tgt_path, this);
ClkSkew *clk_skew = skews.findKey(src_clk);
debugPrint8(debug_, "clk_skew", 2, "%s %s %s -> %s %s %s crpr = %s skew = %s\n",
debugPrint8(debug_, "clk_skew", 2,
"%s %s %s -> %s %s %s crpr = %s skew = %s",
network_->pathName(src_path->pin(this)),
src_path->transition(this)->asString(),
time_unit->asString(probe.srcLatency(this)),
@ -325,7 +327,7 @@ ClkSkews::findFanout(Vertex *from,
// Return value.
VertexSet &endpoints)
{
debugPrint1(debug_, "fanout", 1, "%s\n",
debugPrint1(debug_, "fanout", 1, "%s",
from->name(sdc_network_));
FanOutSrchPred pred(this);
BfsFwdIterator fanout_iter(BfsIndex::other, &pred, this);
@ -333,7 +335,7 @@ ClkSkews::findFanout(Vertex *from,
while (fanout_iter.hasNext()) {
Vertex *fanout = fanout_iter.next();
if (fanout->hasChecks()) {
debugPrint1(debug_, "fanout", 1, " endpoint %s\n",
debugPrint1(debug_, "fanout", 1, " endpoint %s",
fanout->name(sdc_network_));
endpoints.insert(fanout);
}

View File

@ -257,7 +257,7 @@ CheckCrpr::findCrpr(const PathVertex *src_clk_path,
if (src_clk_path2 && tgt_clk_path2
&& (src_clk_path2->transition(this) == tgt_clk_path2->transition(this)
|| same_pin)) {
debugPrint1(debug_, "crpr", 2, "crpr pin %s\n",
debugPrint1(debug_, "crpr", 2, "crpr pin %s",
network_->pathName(src_clk_path2->pin(this)));
crpr = findCrpr1(src_clk_path2, tgt_clk_path2);
crpr_pin = src_clk_path2->pin(this);
@ -311,12 +311,12 @@ CheckCrpr::findCrpr1(const PathVertex *src_clk_path,
// is the min of the source and target max-min delay.
float src_delta = crprArrivalDiff(src_clk_path);
float tgt_delta = crprArrivalDiff(tgt_clk_path);
debugPrint1(debug_, "crpr", 2, " src delta %s\n",
debugPrint1(debug_, "crpr", 2, " src delta %s",
delayAsString(src_delta, this));
debugPrint1(debug_, "crpr", 2, " tgt delta %s\n",
debugPrint1(debug_, "crpr", 2, " tgt delta %s",
delayAsString(tgt_delta, this));
float common_delay = min(src_delta, tgt_delta);
debugPrint2(debug_, "crpr", 2, " %s delta %s\n",
debugPrint2(debug_, "crpr", 2, " %s delta %s",
network_->pathName(src_clk_path->pin(this)),
delayAsString(common_delay, this));
return common_delay;

View File

@ -195,7 +195,7 @@ Genclks::ensureInsertionDelays()
{
if (!found_insertion_delays_) {
Stats stats(debug_);
debugPrint0(debug_, "genclk", 1, "find generated clk insertion delays\n");
debugPrint0(debug_, "genclk", 1, "find generated clk insertion delays");
ClockSeq gclks;
for (auto clk : sdc_->clks()) {
@ -314,7 +314,7 @@ Genclks::ensureMaster(Clock *gclk)
// Master source pin can actually be a clock source pin.
if (master_clk != gclk) {
gclk->setInferedMasterClk(master_clk);
debugPrint2(debug_, "genclk", 2, " %s master clk %s\n",
debugPrint2(debug_, "genclk", 2, " %s master clk %s",
gclk->name(),
master_clk->name());
found_master = true;
@ -341,7 +341,7 @@ Genclks::ensureMaster(Clock *gclk)
// Master source pin can actually be a clock source pin.
if (master_clk != gclk) {
gclk->setInferedMasterClk(master_clk);
debugPrint2(debug_, "genclk", 2, " %s master clk %s\n",
debugPrint2(debug_, "genclk", 2, " %s master clk %s",
gclk->name(),
master_clk->name());
found_master = true;
@ -366,7 +366,7 @@ Genclks::ensureMaster(Clock *gclk)
// Master source pin can actually be a clock source pin.
if (master_clk != gclk) {
gclk->setInferedMasterClk(master_clk);
debugPrint2(debug_, "genclk", 2, " %s master clk %s\n",
debugPrint2(debug_, "genclk", 2, " %s master clk %s",
gclk->name(),
master_clk->name());
master_clk_count++;
@ -463,7 +463,7 @@ Genclks::findFanin(Clock *gclk,
Vertex *vertex = iter.next();
if (!fanins->hasKey(vertex)) {
fanins->insert(vertex);
debugPrint2(debug_, "genclk", 2, "gen clk %s fanin %s\n",
debugPrint2(debug_, "genclk", 2, "gen clk %s fanin %s",
gclk->name(), vertex->name(sdc_network_));
iter.enqueueAdjacentVertices(vertex);
}
@ -568,7 +568,7 @@ GenClkInsertionSearchPred::isNonGeneratedClkPin(const Pin *pin) const
void
Genclks::findInsertionDelays(Clock *gclk)
{
debugPrint1(debug_, "genclk", 2, "find gen clk %s insertion\n",
debugPrint1(debug_, "genclk", 2, "find gen clk %s insertion",
gclk->name());
GenclkInfo *genclk_info = makeGenclkInfo(gclk);
FilterPath *src_filter = genclk_info->srcFilter();
@ -670,7 +670,7 @@ Genclks::findLatchFdbkEdges(Vertex *from_vertex,
Edge *edge = edge_iter.next();
Vertex *to_vertex = edge->to(graph_);
if (path_vertices.hasKey(to_vertex)) {
debugPrint2(debug_, "genclk", 2, " found feedback edge %s -> %s\n",
debugPrint2(debug_, "genclk", 2, " found feedback edge %s -> %s",
from_vertex->name(sdc_network_),
to_vertex->name(sdc_network_));
if (fdbk_edges == nullptr)
@ -716,7 +716,7 @@ Genclks::seedSrcPins(Clock *gclk,
Clock *master_clk = gclk->masterClk();
for (Pin *master_pin : master_clk->leafPins()) {
Vertex *vertex = graph_->pinDrvrVertex(master_pin);
debugPrint1(debug_, "genclk", 2, " seed src pin %s\n",
debugPrint1(debug_, "genclk", 2, " seed src pin %s",
network_->pathName(master_pin));
TagGroupBldr tag_bldr(true, this);
tag_bldr.init(vertex);
@ -868,7 +868,7 @@ GenclkSrcArrivalVisitor::visit(Vertex *vertex)
const Graph *graph = sta_->graph();
Search *search = sta_->search();
Genclks *genclks = search->genclks();
debugPrint1(debug, "genclk", 2, "find gen clk insert arrival %s\n",
debugPrint1(debug, "genclk", 2, "find gen clk insert arrival %s",
vertex->name(sdc_network));
tag_bldr_->init(vertex);
has_fanin_one_ = graph->hasFaninOne(vertex);
@ -973,7 +973,7 @@ Genclks::recordSrcPaths(Clock *gclk)
src_path.arrival(this),
early_late,
this))) {
debugPrint4(debug_, "genclk", 2, " %s insertion %s %s %s\n",
debugPrint4(debug_, "genclk", 2, " %s insertion %s %s %s",
network_->pathName(gclk_pin),
early_late->asString(),
rf->asString(),
@ -1096,7 +1096,7 @@ Genclks::insertionDelay(const Clock *clk,
void
Genclks::findPllDelays(Clock *gclk)
{
debugPrint1(debug_, "genclk", 2, "find gen clk %s pll delay\n",
debugPrint1(debug_, "genclk", 2, "find gen clk %s pll delay",
gclk->name());
FilterPath *pll_filter = makePllFilter(gclk);
GenclkInfo *genclk_info = genclkInfo(gclk);
@ -1131,7 +1131,7 @@ Genclks::seedPllPin(const Clock *gclk,
{
Pin *pll_out_pin = gclk->pllOut();
Vertex *vertex = graph_->pinDrvrVertex(pll_out_pin);
debugPrint1(debug_, "genclk", 2, " seed pllout pin %s\n",
debugPrint1(debug_, "genclk", 2, " seed pllout pin %s",
network_->pathName(pll_out_pin));
TagGroupBldr tag_bldr(true, this);
tag_bldr.init(vertex);
@ -1191,7 +1191,7 @@ PllArrivalVisitor::visit(Vertex *vertex)
Graph *graph = sta_->graph();
Search *search = sta_->search();
Genclks *genclks = search->genclks();
debugPrint1(debug, "genclk", 2, "find gen clk pll arrival %s\n",
debugPrint1(debug, "genclk", 2, "find gen clk pll arrival %s",
vertex->name(sdc_network));
tag_bldr_->init(vertex);
genclks->copyGenClkSrcPaths(vertex, tag_bldr_);

View File

@ -94,7 +94,7 @@ Latches::latchRequired(const Path *data_path,
+ PathEnd::checkSetupMcpAdjustment(data_clk_edge, enable_clk_edge, mcp,
1, sdc_)
+ open_crpr;
debugPrint3(debug_, "latch", 1, "latch data %s %s enable %s\n",
debugPrint3(debug_, "latch", 1, "latch data %s %s enable %s",
network_->pathName(data_path->pin(this)),
delayAsString(data_arrival, this),
delayAsString(enable_arrival, this));

View File

@ -115,7 +115,7 @@ void
Levelize::levelize()
{
Stats stats(debug_);
debugPrint0(debug_, "levelize", 1, "levelize\n");
debugPrint0(debug_, "levelize", 1, "levelize");
max_level_ = 0;
clearLoopEdges();
deleteLoops();
@ -145,7 +145,7 @@ Levelize::findRoots()
Vertex *vertex = vertex_iter.next();
setLevel(vertex, 0);
if (isRoot(vertex)) {
debugPrint1(debug_, "levelize", 2, "root %s\n", vertex->name(sdc_network_));
debugPrint1(debug_, "levelize", 2, "root %s", vertex->name(sdc_network_));
roots_.insert(vertex);
if (hasFanout(vertex, search_pred_, graph_))
// Color roots with no fanout black so that they are
@ -209,7 +209,7 @@ Levelize::visit(Vertex *vertex,
EdgeSeq &path)
{
Pin *from_pin = vertex->pin();
debugPrint2(debug_, "levelize", 3, "level %d %s\n",
debugPrint2(debug_, "levelize", 3, "level %d %s",
level, vertex->name(sdc_network_));
vertex->setColor(LevelColor::gray);
setLevel(vertex, level);
@ -254,7 +254,7 @@ void
Levelize::recordLoop(Edge *edge,
EdgeSeq &path)
{
debugPrint3(debug_, "levelize", 2, "Loop edge %s -> %s (%s)\n",
debugPrint3(debug_, "levelize", 2, "Loop edge %s -> %s (%s)",
edge->from(graph_)->name(sdc_network_),
edge->to(graph_)->name(sdc_network_),
edge->role()->asString());
@ -276,7 +276,7 @@ EdgeSeq *
Levelize::loopEdges(EdgeSeq &path,
Edge *closing_edge)
{
debugPrint0(debug_, "loop", 2, "Loop\n");
debugPrint0(debug_, "loop", 2, "Loop");
EdgeSeq *loop_edges = new EdgeSeq;
// Skip the "head" of the path up to where closing_edge closes the loop.
Pin *loop_pin = closing_edge->to(graph_)->pin();
@ -288,14 +288,14 @@ Levelize::loopEdges(EdgeSeq &path,
if (from_pin == loop_pin)
copy = true;
if (copy) {
debugPrint2(debug_, "loop", 2, " %s -> %s\n",
debugPrint2(debug_, "loop", 2, " %s -> %s",
edge->from(graph_)->name(sdc_network_),
edge->to(graph_)->name(sdc_network_));
loop_edges->push_back(edge);
loop_edges_.insert(edge);
}
}
debugPrint2(debug_, "loop", 2, " %s -> %s\n",
debugPrint2(debug_, "loop", 2, " %s -> %s",
closing_edge->from(graph_)->name(sdc_network_),
closing_edge->to(graph_)->name(sdc_network_));
loop_edges->push_back(closing_edge);
@ -355,14 +355,14 @@ Levelize::levelizeCycles()
void
Levelize::invalid()
{
debugPrint0(debug_, "levelize", 1, "levels invalid\n");
debugPrint0(debug_, "levelize", 1, "levels invalid");
clear();
}
void
Levelize::invalidFrom(Vertex *vertex)
{
debugPrint1(debug_, "levelize", 1, "level invalid from %s\n",
debugPrint1(debug_, "levelize", 1, "level invalid from %s",
vertex->name(sdc_network_));
VertexInEdgeIterator edge_iter(vertex, graph_);
while (edge_iter.hasNext()) {
@ -384,7 +384,7 @@ Levelize::deleteVertexBefore(Vertex *vertex)
void
Levelize::relevelizeFrom(Vertex *vertex)
{
debugPrint1(debug_, "levelize", 1, "invalid relevelize from %s\n",
debugPrint1(debug_, "levelize", 1, "invalid relevelize from %s",
vertex->name(sdc_network_));
relevelize_from_.insert(vertex);
levels_valid_ = false;
@ -416,7 +416,7 @@ Levelize::relevelize()
VertexSet::Iterator vertex_iter(relevelize_from_);
while (vertex_iter.hasNext()) {
Vertex *vertex = vertex_iter.next();
debugPrint1(debug_, "levelize", 1, "relevelize from %s\n",
debugPrint1(debug_, "levelize", 1, "relevelize from %s",
vertex->name(sdc_network_));
if (search_pred_->searchFrom(vertex)) {
if (isRoot(vertex)) {
@ -487,8 +487,8 @@ GraphLoop::report(Report *report,
while (loop_edge_iter.hasNext()) {
Edge *edge = loop_edge_iter.next();
if (first_edge)
report->print(" %s\n", edge->from(graph)->name(network));
report->print(" %s\n", edge->to(graph)->name(network));
report->reportLine(" %s", edge->from(graph)->name(network));
report->reportLine(" %s", edge->to(graph)->name(network));
first_edge = false;
}
}

View File

@ -119,9 +119,9 @@ PathEnum::PathEnum(int group_count,
void
PathEnum::insert(PathEnd *path_end)
{
debugPrint1(debug_, "path_enum", 1, "insert %s\n",
debugPrint1(debug_, "path_enum", 1, "insert %s",
path_end->path()->name(this));
debugPrint3(debug_, "path_enum", 2, "diversion %s %s %s\n",
debugPrint3(debug_, "path_enum", 2, "diversion %s %s %s",
path_end->path()->name(this),
cmp_slack_ ? "slack" : "delay",
delayAsString(cmp_slack_ ? path_end->slack(this) :
@ -195,7 +195,7 @@ PathEnum::findNext()
}
else {
// We have endpoint_count paths for this endpoint, so we are done with it.
debugPrint1(debug_, "path_enum", 1, "endpoint_count reached for %s\n",
debugPrint1(debug_, "path_enum", 1, "endpoint_count reached for %s",
vertex->name(sdc_network_));
deleteDiversionPathEnd(div);
}
@ -330,7 +330,7 @@ PathEnumFaninVisitor::visitFromToPath(const Pin *,
const PathAnalysisPt *path_ap)
{
const Debug *debug = sta_->debug();
debugPrint4(debug, "path_enum", 3, "visit fanin %s -> %s %s %s\n",
debugPrint4(debug, "path_enum", 3, "visit fanin %s -> %s %s %s",
from_path->name(sta_),
to_vertex->name(sta_->network()),
to_rf->asString(),
@ -433,7 +433,7 @@ PathEnum::makeDiversion(PathEnd *div_end,
void
PathEnum::pruneDiversionQueue()
{
debugPrint0(debug_, "path_enum", 2, "prune queue\n");
debugPrint0(debug_, "path_enum", 2, "prune queue");
VertexPathCountMap path_counts;
int end_count = 0;
// Collect endpoint_count diversions per vertex.
@ -589,7 +589,7 @@ PathEnum::updatePathHeadDelays(PathEnumedSeq &paths,
ArcDelay arc_delay = search_->deratedDelay(edge->from(graph_),
arc, edge, false, path_ap);
Arrival arrival = prev_arrival + arc_delay;
debugPrint3(debug_, "path_enum", 3, "update arrival %s %s -> %s\n",
debugPrint3(debug_, "path_enum", 3, "update arrival %s %s -> %s",
path->name(this),
delayAsString(path->arrival(this), this),
delayAsString(arrival, this));

View File

@ -686,7 +686,7 @@ MakePathEndsAll::vertexEnd(Vertex *)
// Only save the worst path end for each crpr tag.
// PathEnum will peel the others.
if (!unique_ends.hasKey(path_end)) {
debugPrint4(debug, "path_enum", 5, "insert %s %s %s %d\n",
debugPrint4(debug, "path_enum", 5, "insert %s %s %s %d",
path_end->vertex(sta_)->name(network),
path_end->typeName(),
path_end->transition(sta_)->asString(),
@ -700,7 +700,7 @@ MakePathEndsAll::vertexEnd(Vertex *)
}
}
else
debugPrint4(debug, "path_enum", 5, "prune %s %s %s %d\n",
debugPrint4(debug, "path_enum", 5, "prune %s %s %s %d",
path_end->vertex(sta_)->name(network),
path_end->typeName(),
path_end->transition(sta_)->asString(),

View File

@ -344,7 +344,7 @@ void
PropActivityVisitor::visit(Vertex *vertex)
{
Pin *pin = vertex->pin();
debugPrint1(debug_, "power_activity", 3, "visit %s\n",
debugPrint1(debug_, "power_activity", 3, "visit %s",
vertex->name(network_));
if (power_->hasUserActivity(pin))
power_->setActivity(pin, power_->userActivity(pin));
@ -369,7 +369,7 @@ PropActivityVisitor::visit(Vertex *vertex)
Instance *inst = network_->instance(pin);
auto cell = network_->libertyCell(inst);
if (cell && cell->hasSequentials()) {
debugPrint1(debug_, "power_activity", 3, "pending reg %s\n",
debugPrint1(debug_, "power_activity", 3, "pending reg %s",
network_->pathName(inst));
visited_regs_->insert(inst);
found_reg_without_activity_ = input_without_activity;
@ -383,7 +383,7 @@ PropActivityVisitor::visit(Vertex *vertex)
Instance *inst = network_->instance(pin);
PwrActivity activity = power_->evalActivity(func, inst);
power_->setActivity(pin, activity);
debugPrint3(debug_, "power_activity", 3, "set %s %.2e %.2f\n",
debugPrint3(debug_, "power_activity", 3, "set %s %.2e %.2f",
vertex->name(network_),
activity.activity(),
activity.duty());
@ -530,7 +530,7 @@ Power::seedActivities(BfsFwdIterator &bfs)
// Clock activities are baked in.
if (!sdc_->isLeafPinClock(pin)
&& !network_->direction(pin)->isInternal()) {
debugPrint1(debug_, "power_activity", 3, "seed %s\n",
debugPrint1(debug_, "power_activity", 3, "seed %s",
vertex->name(network_));
if (hasUserActivity(pin))
setActivity(pin, userActivity(pin));
@ -564,7 +564,7 @@ Power::seedRegOutputActivities(const Instance *inst,
Vertex *vertex = graph_->pinDrvrVertex(pin);
if (func->port() == seq->output()
|| func->port() == seq->outputInv()) {
debugPrint1(debug_, "power_activity", 3, "enqueue reg output %s\n",
debugPrint1(debug_, "power_activity", 3, "enqueue reg output %s",
vertex->name(network_));
bfs.enqueue(vertex);
}
@ -652,16 +652,16 @@ Power::findInputInternalPower(const Pin *pin,
const LibertyPort *corner_port = port->cornerPort(lib_ap_index);
auto internal_pwrs = corner_cell->internalPowers(corner_port);
if (!internal_pwrs->empty()) {
debugPrint3(debug_, "power", 2, "internal input %s/%s (%s)\n",
debugPrint3(debug_, "power", 2, "internal input %s/%s (%s)",
network_->pathName(inst),
port->name(),
corner_cell->name());
const DcalcAnalysisPt *dcalc_ap = corner->findDcalcAnalysisPt(MinMax::max());
const Pvt *pvt = dcalc_ap->operatingConditions();
Vertex *vertex = graph_->pinLoadVertex(pin);
debugPrint1(debug_, "power", 2, " cap = %s\n",
debugPrint1(debug_, "power", 2, " cap = %s",
units_->capacitanceUnit()->asString(load_cap));
debugPrint0(debug_, "power", 2, " whena act/ns duty energy power\n");
debugPrint0(debug_, "power", 2, " whena act/ns duty energy power");
float internal = 0.0;
for (InternalPower *pwr : *internal_pwrs) {
const char *related_pg_pin = pwr->relatedPgPin();
@ -694,7 +694,7 @@ Power::findInputInternalPower(const Pin *pin,
duty = evalActivity(when, inst).duty();
}
float port_internal = energy * duty * activity.activity();
debugPrint7(debug_, "power", 2, " %3s %6s %.2f %.2f %9.2e %9.2e %s\n",
debugPrint7(debug_, "power", 2, " %3s %6s %.2f %.2f %9.2e %9.2e %s",
port->name(),
when ? when->asString() : "",
activity.activity() * 1e-9,
@ -768,7 +768,7 @@ Power::findOutputInternalPower(const Pin *to_pin,
// Return values.
PowerResult &result)
{
debugPrint3(debug_, "power", 2, "internal output %s/%s (%s)\n",
debugPrint3(debug_, "power", 2, "internal output %s/%s (%s)",
network_->pathName(inst),
to_port->name(),
cell->name());
@ -777,7 +777,7 @@ Power::findOutputInternalPower(const Pin *to_pin,
int lib_ap_index = corner->libertyIndex(MinMax::max());
LibertyCell *corner_cell = cell->cornerCell(lib_ap_index);
const LibertyPort *to_corner_port = to_port->cornerPort(lib_ap_index);
debugPrint1(debug_, "power", 2, " cap = %s\n",
debugPrint1(debug_, "power", 2, " cap = %s",
units_->capacitanceUnit()->asString(load_cap));
FuncExpr *func = to_port->function();
@ -806,7 +806,7 @@ Power::findOutputInternalPower(const Pin *to_pin,
}
float energy = 0.0;
int tr_count = 0;
debugPrint0(debug_, "power", 2, " when act/ns duty wgt energy power\n");
debugPrint0(debug_, "power", 2, " when act/ns duty wgt energy power");
for (auto to_rf : RiseFall::range()) {
// Use unateness to find from_rf.
RiseFall *from_rf = positive_unate ? to_rf : to_rf->opposite();
@ -830,7 +830,7 @@ Power::findOutputInternalPower(const Pin *to_pin,
weight = duty / duty_sum;
}
float port_internal = weight * energy * to_activity.activity();
debugPrint9(debug_, "power", 2, "%3s -> %-3s %6s %.2f %.2f %.2f %9.2e %9.2e %s\n",
debugPrint9(debug_, "power", 2, "%3s -> %-3s %6s %.2f %.2f %.2f %9.2e %9.2e %s",
from_corner_port->name(),
to_port->name(),
when ? when->asString() : "",
@ -942,7 +942,7 @@ Power::findLeakagePower(const Instance *,
if (port->direction()->isAnyInput())
duty *= port->isClock() ? 0.25 : 0.5;
}
debugPrint4(debug_, "power", 2, "leakage %s %s %.3e * %.2f\n",
debugPrint4(debug_, "power", 2, "leakage %s %s %.3e * %.2f",
cell->name(),
when->asString(),
leak->power(),
@ -951,7 +951,7 @@ Power::findLeakagePower(const Instance *,
found_cond = true;
}
else {
debugPrint2(debug_, "power", 2, "leakage default %s %.3e\n",
debugPrint2(debug_, "power", 2, "leakage default %s %.3e",
cell->name(),
leak->power());
default_leakage += leak->power();
@ -963,7 +963,7 @@ Power::findLeakagePower(const Instance *,
bool cell_leakage_exists;
cell->leakagePower(cell_leakage, cell_leakage_exists);
if (cell_leakage_exists)
debugPrint2(debug_, "power", 2, "leakage cell %s %.3e\n",
debugPrint2(debug_, "power", 2, "leakage cell %s %.3e",
cell->name(),
cell_leakage);
// Ignore default leakages unless there are no conditional leakage groups.
@ -973,7 +973,7 @@ Power::findLeakagePower(const Instance *,
leakage = default_leakage;
else if (cell_leakage_exists)
leakage = cell_leakage;
debugPrint2(debug_, "power", 2, "leakage cell %s %.3e\n",
debugPrint2(debug_, "power", 2, "leakage cell %s %.3e",
cell->name(),
leakage);
result.leakage() += leakage;
@ -994,7 +994,7 @@ Power::findSwitchingPower(LibertyCell *cell,
LibertyCell *corner_cell = cell->cornerCell(lib_ap_index);
float volt = portVoltage(corner_cell, to_port, dcalc_ap);
float switching = .5 * load_cap * volt * volt * activity.activity();
debugPrint5(debug_, "power", 2, "switching %s/%s activity = %.2e volt = %.2f %.3e\n",
debugPrint5(debug_, "power", 2, "switching %s/%s activity = %.2e volt = %.2f %.3e",
cell->name(),
to_port->name(),
activity.activity(),

View File

@ -388,9 +388,10 @@ ReportPath::reportEndpointHeader(PathEnd *end,
const char *setup_hold = (end->minMax(this) == MinMax::min())
? "min_delay/hold"
: "max_delay/setup";
report_->print("%s group %s\n\n",
setup_hold,
group->name());
report_->reportLine("%s group %s",
setup_hold,
group->name());
report_->reportLine("");
string header;
reportEndHeader(header);
report_->print(header);

View File

@ -392,7 +392,7 @@ Search::copyState(const StaState *sta)
void
Search::deletePaths()
{
debugPrint0(debug_, "search", 1, "delete paths\n");
debugPrint0(debug_, "search", 1, "delete paths");
if (arrivals_exist_) {
VertexIterator vertex_iter(graph_);
while (vertex_iter.hasNext()) {
@ -565,10 +565,10 @@ Search::findFilteredArrivals()
// Iterate until data arrivals at all latches stop changing.
for (int pass = 1; pass <= 2 || havePendingLatchOutputs() ; pass++) {
enqueuePendingLatchOutputs();
debugPrint1(debug_, "search", 1, "find arrivals pass %d\n", pass);
debugPrint1(debug_, "search", 1, "find arrivals pass %d", pass);
int arrival_count = arrival_iter_->visitParallel(max_level,
arrival_visitor_);
debugPrint1(debug_, "search", 1, "found %d arrivals\n", arrival_count);
debugPrint1(debug_, "search", 1, "found %d arrivals", arrival_count);
}
arrivals_exist_ = true;
}
@ -655,7 +655,7 @@ void
Search::arrivalsInvalid()
{
if (arrivals_exist_) {
debugPrint0(debug_, "search", 1, "arrivals invalid\n");
debugPrint0(debug_, "search", 1, "arrivals invalid");
// Delete paths to make sure no state is left over.
// For example, set_disable_timing strands a vertex, which means
// the search won't revisit it to clear the previous arrival.
@ -682,7 +682,7 @@ Search::arrivalsInvalid()
void
Search::requiredsInvalid()
{
debugPrint0(debug_, "search", 1, "requireds invalid\n");
debugPrint0(debug_, "search", 1, "requireds invalid");
requireds_exist_ = false;
requireds_seeded_ = false;
invalid_requireds_.clear();
@ -695,7 +695,7 @@ void
Search::arrivalInvalid(Vertex *vertex)
{
if (arrivals_exist_) {
debugPrint1(debug_, "search", 2, "arrival invalid %s\n",
debugPrint1(debug_, "search", 2, "arrival invalid %s",
vertex->name(sdc_network_));
if (!arrival_iter_->inQueue(vertex)) {
// Lock for StaDelayCalcObserver called by delay calc threads.
@ -765,7 +765,7 @@ void
Search::requiredInvalid(Vertex *vertex)
{
if (requireds_exist_) {
debugPrint1(debug_, "search", 2, "required invalid %s\n",
debugPrint1(debug_, "search", 2, "required invalid %s",
vertex->name(sdc_network_));
if (!required_iter_->inQueue(vertex)) {
// Lock for StaDelayCalcObserver called by delay calc threads.
@ -784,7 +784,7 @@ Search::findClkArrivals()
if (!clk_arrivals_valid_) {
genclks_->ensureInsertionDelays();
Stats stats(debug_);
debugPrint0(debug_, "search", 1, "find clk arrivals\n");
debugPrint0(debug_, "search", 1, "find clk arrivals");
arrival_iter_->clear();
seedClkVertexArrivals();
ClkArrivalSearchPred search_clk(this);
@ -916,7 +916,7 @@ Search::findAllArrivals(VertexVisitor *arrival_visitor)
// Iterate until data arrivals at all latches stop changing.
for (int pass = 1; pass == 1 || havePendingLatchOutputs(); pass++) {
enqueuePendingLatchOutputs();
debugPrint1(debug_, "search", 1, "find arrivals pass %d\n", pass);
debugPrint1(debug_, "search", 1, "find arrivals pass %d", pass);
findArrivals(levelize_->maxLevel(), arrival_visitor);
}
}
@ -958,7 +958,7 @@ void
Search::findArrivals(Level level,
VertexVisitor *arrival_visitor)
{
debugPrint1(debug_, "search", 1, "find arrivals to level %d\n", level);
debugPrint1(debug_, "search", 1, "find arrivals to level %d", level);
findArrivals1();
Stats stats(debug_);
int arrival_count = arrival_iter_->visitParallel(level, arrival_visitor);
@ -969,7 +969,7 @@ Search::findArrivals(Level level,
arrivals_at_endpoints_exist_ = true;
}
arrivals_exist_ = true;
debugPrint1(debug_, "search", 1, "found %u arrivals\n", arrival_count);
debugPrint1(debug_, "search", 1, "found %u arrivals", arrival_count);
}
void
@ -1061,7 +1061,7 @@ ArrivalVisitor::visit(Vertex *vertex)
const Graph *graph = sta_->graph();
const Sdc *sdc = sta_->sdc();
Search *search = sta_->search();
debugPrint1(debug, "search", 2, "find arrivals %s\n",
debugPrint1(debug, "search", 2, "find arrivals %s",
vertex->name(sdc_network));
Pin *pin = vertex->pin();
// Don't clobber clock sources.
@ -1101,7 +1101,7 @@ ArrivalVisitor::visit(Vertex *vertex)
// For example, "set_max_delay -to" from an unclocked source register.
bool is_clk = tag_bldr_->hasClkTag();
if (vertex->isRegClk() && !is_clk) {
debugPrint1(debug, "search", 2, "arrival seed unclked reg clk %s\n",
debugPrint1(debug, "search", 2, "arrival seed unclked reg clk %s",
network->pathName(pin));
search->makeUnclkedPaths(vertex, true, tag_bldr_);
}
@ -1122,7 +1122,7 @@ ArrivalVisitor::visit(Vertex *vertex)
|| !sdc->isPathDelayInternalEndpoint(pin)))
search->arrivalIterator()->enqueueAdjacentVertices(vertex, adj_pred_);
if (arrivals_changed) {
debugPrint0(debug, "search", 4, "arrival changed\n");
debugPrint0(debug, "search", 4, "arrival changed");
// Only update arrivals when delays change by more than
// fuzzyEqual can distinguish.
search->setVertexArrivals(vertex, tag_bldr_);
@ -1221,15 +1221,15 @@ ArrivalVisitor::visitFromToPath(const Pin *,
{
const Debug *debug = sta_->debug();
const Network *sdc_network = sta_->sdcNetwork();
debugPrint1(debug, "search", 3, " %s\n",
debugPrint1(debug, "search", 3, " %s",
from_vertex->name(sdc_network));
debugPrint3(debug, "search", 3, " %s -> %s %s\n",
debugPrint3(debug, "search", 3, " %s -> %s %s",
from_rf->asString(),
to_rf->asString(),
min_max->asString());
debugPrint1(debug, "search", 3, " from tag: %s\n",
debugPrint1(debug, "search", 3, " from tag: %s",
from_tag->asString(sta_));
debugPrint1(debug, "search", 3, " to tag : %s\n",
debugPrint1(debug, "search", 3, " to tag : %s",
to_tag->asString(sta_));
ClkInfo *to_clk_info = to_tag->clkInfo();
bool to_is_clk = to_tag->isClock();
@ -1239,7 +1239,7 @@ ArrivalVisitor::visitFromToPath(const Pin *,
tag_bldr_->tagMatchArrival(to_tag, tag_match, arrival, arrival_index);
if (tag_match == nullptr
|| delayGreater(to_arrival, arrival, min_max, sta_)) {
debugPrint5(debug, "search", 3, " %s + %s = %s %s %s\n",
debugPrint5(debug, "search", 3, " %s + %s = %s %s %s",
delayAsString(from_path->arrival(sta_), sta_),
delayAsString(arc_delay, sta_),
delayAsString(to_arrival, sta_),
@ -1294,14 +1294,14 @@ ArrivalVisitor::pruneCrprArrivals()
Arrival max_arrival_max_crpr = (min_max == MinMax::max())
? max_arrival - max_crpr
: max_arrival + max_crpr;
debugPrint4(debug, "search", 4, " cmp %s %s - %s = %s\n",
debugPrint4(debug, "search", 4, " cmp %s %s - %s = %s",
tag->asString(sta_),
delayAsString(max_arrival, sta_),
delayAsString(max_crpr, sta_),
delayAsString(max_arrival_max_crpr, sta_));
Arrival arrival = tag_bldr_->arrival(arrival_index);
if (delayGreater(max_arrival_max_crpr, arrival, min_max, sta_)) {
debugPrint1(debug, "search", 3, " pruned %s\n",
debugPrint1(debug, "search", 3, " pruned %s",
tag->asString(sta_));
tag_bldr_->deleteArrival(tag);
}
@ -1423,7 +1423,7 @@ Search::seedArrival(Vertex *vertex)
// Internal roots isolated by disabled pins are seeded with no clock.
|| (unconstrained_paths_
&& !network_->isTopLevelPort(pin))) {
debugPrint1(debug_, "search", 2, "arrival seed unclked root %s\n",
debugPrint1(debug_, "search", 2, "arrival seed unclked root %s",
network_->pathName(pin));
TagGroupBldr tag_bldr(true, this);
tag_bldr.init(vertex);
@ -1439,7 +1439,7 @@ Search::seedArrival(Vertex *vertex)
}
}
else {
debugPrint1(debug_, "search", 2, "arrival enqueue %s\n",
debugPrint1(debug_, "search", 2, "arrival enqueue %s",
network_->pathName(pin));
arrival_iter_->enqueue(vertex);
}
@ -1462,7 +1462,7 @@ Search::seedClkArrivals(const Pin *pin,
TagGroupBldr *tag_bldr)
{
for (Clock *clk : *sdc_->findLeafPinClocks(pin)) {
debugPrint2(debug_, "search", 2, "arrival seed clk %s pin %s\n",
debugPrint2(debug_, "search", 2, "arrival seed clk %s pin %s",
clk->name(), network_->pathName(pin));
for (PathAnalysisPt *path_ap : corners_->pathAnalysisPts()) {
const MinMax *min_max = path_ap->pathMinMax();
@ -1739,8 +1739,8 @@ Search::seedInputDelayArrival(const Pin *pin,
{
debugPrint1(debug_, "search", 2,
input_delay
? "arrival seed input arrival %s\n"
: "arrival seed input %s\n",
? "arrival seed input arrival %s"
: "arrival seed input %s",
vertex->name(sdc_network_));
ClockEdge *clk_edge = nullptr;
const Pin *ref_pin = nullptr;
@ -1990,7 +1990,7 @@ PathVisitor::visitFanoutPaths(Vertex *from_vertex)
if (pred_->searchTo(to_vertex)
&& pred_->searchThru(edge)) {
debugPrint1(sta_->debug(), "search", 3,
" %s\n", to_vertex->name(sta_->network()));
" %s", to_vertex->name(sta_->network()));
if (!visitEdge(from_pin, from_vertex, edge, to_pin, to_vertex))
break;
}
@ -2714,11 +2714,11 @@ Search::setVertexArrivals(Vertex *vertex,
void
Search::reportArrivals(Vertex *vertex) const
{
report_->print("Vertex %s\n", vertex->name(sdc_network_));
report_->reportLine("Vertex %s", vertex->name(sdc_network_));
TagGroup *tag_group = tagGroup(vertex);
Arrival *arrivals = graph_->arrivals(vertex);
if (tag_group) {
report_->print("Group %u\n", tag_group->index());
report_->reportLine("Group %u", tag_group->index());
ArrivalMap::Iterator arrival_iter(tag_group->arrivalMap());
while (arrival_iter.hasNext()) {
Tag *tag;
@ -2726,31 +2726,34 @@ Search::reportArrivals(Vertex *vertex) const
arrival_iter.next(tag, arrival_index);
PathAnalysisPt *path_ap = tag->pathAnalysisPt(this);
const RiseFall *rf = tag->transition();
report_->print(" %d %s %s %s",
arrival_index,
rf->asString(),
path_ap->pathMinMax()->asString(),
delayAsString(arrivals[arrival_index], this));
const char *req = "?";
if (vertex->hasRequireds()) {
int req_index;
bool exists;
tag_group->requiredIndex(tag, req_index, exists);
if (exists)
report_->print(" / %s", delayAsString(arrivals[req_index], this));
req = delayAsString(arrivals[req_index], this);
}
report_->print(" %s", tag->asString(true, false, this));
bool report_clk_prev = false;
const char *clk_prev = "";
if (report_clk_prev
&& tag_group->hasClkTag()) {
PathVertex prev = check_crpr_->clkPathPrev(vertex, arrival_index);
report_->print(" clk_prev=[%s]",
prev.isNull() ? "NULL" : prev.name(this));
if (!prev.isNull())
clk_prev = prev.name(this);
}
report_->print("\n");
report_->reportLine(" %d %s %s %s / %s %s %s",
arrival_index,
rf->asString(),
path_ap->pathMinMax()->asString(),
delayAsString(arrivals[arrival_index], this),
req,
tag->asString(true, false, this),
clk_prev);
}
}
else
report_->print(" no arrivals\n");
report_->reportLine(" no arrivals");
}
TagGroup *
@ -2781,17 +2784,17 @@ Search::reportTagGroups() const
for (TagGroupIndex i = 0; i < tag_group_next_; i++) {
TagGroup *tag_group = tag_groups_[i];
if (tag_group) {
report_->print("Group %4u hash = %4u (%4u)\n",
i,
tag_group->hash(),
tag_group->hash() % tag_group_set_->capacity());
report_->reportLine("Group %4u hash = %4u (%4u)",
i,
tag_group->hash(),
tag_group->hash() % tag_group_set_->capacity());
tag_group->reportArrivalMap(this);
}
}
size_t long_hash = tag_group_set_->longestBucketHash();
report_->print("Longest hash bucket length %lu hash=%lu\n",
tag_group_set_->bucketLength(long_hash),
long_hash);
report_->reportLine("Longest hash bucket length %lu hash=%lu",
tag_group_set_->bucketLength(long_hash),
long_hash);
}
void
@ -2813,7 +2816,7 @@ Search::reportArrivalCountHistogram() const
for (size_t arrival_count = 0; arrival_count < vertex_counts.size(); arrival_count++) {
int vertex_count = vertex_counts[arrival_count];
if (vertex_count > 0)
report_->print("%6d %6d\n", arrival_count, vertex_count);
report_->reportLine("%6d %6d", arrival_count, vertex_count);
}
}
@ -2896,12 +2899,12 @@ Search::reportTags() const
for (TagIndex i = 0; i < tag_next_; i++) {
Tag *tag = tags_[i];
if (tag)
report_->print("%s\n", tag->asString(this)) ;
report_->reportLine("%s", tag->asString(this)) ;
}
size_t long_hash = tag_set_->longestBucketHash();
printf("Longest hash bucket length %d hash=%zu\n",
tag_set_->bucketLength(long_hash),
long_hash);
report_->reportLine("Longest hash bucket length %d hash=%zu",
tag_set_->bucketLength(long_hash),
long_hash);
}
void
@ -2913,10 +2916,8 @@ Search::reportClkInfos() const
clk_infos.push_back(clk_info);
sort(clk_infos, ClkInfoLess(this));
for (ClkInfo *clk_info : clk_infos)
report_->print("ClkInfo %s\n",
clk_info->asString(this));
printf("%lu clk infos\n",
clk_info_set_->size());
report_->reportLine("ClkInfo %s", clk_info->asString(this));
report_->reportLine("%lu clk infos", clk_info_set_->size());
}
ClkInfo *
@ -3070,14 +3071,14 @@ void
Search::findRequireds(Level level)
{
Stats stats(debug_);
debugPrint1(debug_, "search", 1, "find requireds to level %d\n", level);
debugPrint1(debug_, "search", 1, "find requireds to level %d", level);
RequiredVisitor req_visitor(this);
if (!requireds_seeded_)
seedRequireds();
seedInvalidRequireds();
int required_count = required_iter_->visitParallel(level, &req_visitor);
requireds_exist_ = true;
debugPrint1(debug_, "search", 1, "found %d requireds\n", required_count);
debugPrint1(debug_, "search", 1, "found %d requireds", required_count);
stats.report("Find requireds");
}
@ -3101,7 +3102,7 @@ Search::endpoints()
while (vertex_iter.hasNext()) {
Vertex *vertex = vertex_iter.next();
if (isEndpoint(vertex)) {
debugPrint1(debug_, "endpoint", 2, "insert %s\n",
debugPrint1(debug_, "endpoint", 2, "insert %s",
vertex->name(sdc_network_));
endpoints_->insert(vertex);
}
@ -3110,7 +3111,7 @@ Search::endpoints()
if (invalid_endpoints_) {
for (Vertex *vertex : *invalid_endpoints_) {
if (isEndpoint(vertex)) {
debugPrint1(debug_, "endpoint", 2, "insert %s\n",
debugPrint1(debug_, "endpoint", 2, "insert %s",
vertex->name(sdc_network_));
endpoints_->insert(vertex);
}
@ -3130,7 +3131,7 @@ void
Search::endpointInvalid(Vertex *vertex)
{
if (invalid_endpoints_) {
debugPrint1(debug_, "endpoint", 2, "invalid %s\n",
debugPrint1(debug_, "endpoint", 2, "invalid %s",
vertex->name(sdc_network_));
invalid_endpoints_->insert(vertex);
}
@ -3252,7 +3253,7 @@ FindEndRequiredVisitor::visit(PathEnd *path_end)
void
Search::seedRequired(Vertex *vertex)
{
debugPrint1(debug_, "search", 2, "required seed %s\n",
debugPrint1(debug_, "search", 2, "required seed %s",
vertex->name(sdc_network_));
RequiredCmp required_cmp;
FindEndRequiredVisitor seeder(&required_cmp, this);
@ -3339,7 +3340,7 @@ RequiredCmp::requiredsSave(Vertex *vertex,
if (prev_reqs) {
Required prev_req = path->required(sta);
if (!delayEqual(prev_req, req)) {
debugPrint2(debug, "search", 3, "required save %s -> %s\n",
debugPrint2(debug, "search", 3, "required save %s -> %s",
delayAsString(prev_req, sta),
delayAsString(req, sta));
path->setRequired(req, sta);
@ -3347,7 +3348,7 @@ RequiredCmp::requiredsSave(Vertex *vertex,
}
}
else {
debugPrint1(debug, "search", 3, "required save MIA -> %s\n",
debugPrint1(debug, "search", 3, "required save MIA -> %s",
delayAsString(req, sta));
path->setRequired(req, sta);
}
@ -3392,7 +3393,7 @@ RequiredVisitor::visit(Vertex *vertex)
{
Search *search = sta_->search();
const Debug *debug = sta_->debug();
debugPrint1(debug, "search", 2, "find required %s\n",
debugPrint1(debug, "search", 2, "find required %s",
vertex->name(sta_->network()));
required_cmp_->requiredsInit(vertex, sta_);
vertex->setRequiredsPruned(false);
@ -3429,11 +3430,11 @@ RequiredVisitor::visitFromToPath(const Pin *,
// Don't propagate required times through latch D->Q edges.
if (edge->role() != TimingRole::latchDtoQ()) {
const Debug *debug = sta_->debug();
debugPrint3(debug, "search", 3, " %s -> %s %s\n",
debugPrint3(debug, "search", 3, " %s -> %s %s",
from_rf->asString(),
to_rf->asString(),
min_max->asString());
debugPrint2(debug, "search", 3, " from tag %2u: %s\n",
debugPrint2(debug, "search", 3, " from tag %2u: %s",
from_tag->index(),
from_tag->asString(sta_));
int arrival_index;
@ -3446,10 +3447,10 @@ RequiredVisitor::visitFromToPath(const Pin *,
PathVertex to_path(to_vertex, to_tag, sta_);
Required to_required = to_path.required(sta_);
Required from_required = to_required - arc_delay;
debugPrint2(debug, "search", 3, " to tag %2u: %s\n",
debugPrint2(debug, "search", 3, " to tag %2u: %s",
to_tag->index(),
to_tag->asString(sta_));
debugPrint5(debug, "search", 3, " %s - %s = %s %s %s\n",
debugPrint5(debug, "search", 3, " %s - %s = %s %s %s",
delayAsString(to_required, sta_),
delayAsString(arc_delay, sta_),
delayAsString(from_required, sta_),
@ -3469,10 +3470,10 @@ RequiredVisitor::visitFromToPath(const Pin *,
if (tagMatchNoCrpr(to_path_tag, to_tag)) {
Required to_required = to_path->required(sta_);
Required from_required = to_required - arc_delay;
debugPrint2(debug, "search", 3, " to tag %2u: %s\n",
debugPrint2(debug, "search", 3, " to tag %2u: %s",
to_path_tag->index(),
to_path_tag->asString(sta_));
debugPrint5(debug, "search", 3, " %s - %s = %s %s %s\n",
debugPrint5(debug, "search", 3, " %s - %s = %s %s %s",
delayAsString(to_required, sta_),
delayAsString(arc_delay, sta_),
delayAsString(from_required, sta_),
@ -3667,7 +3668,7 @@ Search::tnsInvalid(Vertex *vertex)
{
if ((tns_exists_ || worst_slacks_)
&& isEndpoint(vertex)) {
debugPrint1(debug_, "tns", 2, "tns invalid %s\n",
debugPrint1(debug_, "tns", 2, "tns invalid %s",
vertex->name(sdc_network_));
UniqueLock lock(tns_lock_);
invalid_tns_.insert(vertex);
@ -3681,7 +3682,7 @@ Search::updateInvalidTns()
for (Vertex *vertex : invalid_tns_) {
// Network edits can change endpointedness since tnsInvalid was called.
if (isEndpoint(vertex)) {
debugPrint1(debug_, "tns", 2, "update tns %s\n",
debugPrint1(debug_, "tns", 2, "update tns %s",
vertex->name(sdc_network_));
SlackSeq slacks(path_ap_count);
wnsSlacks(vertex, slacks);
@ -3730,7 +3731,7 @@ Search::tnsIncr(Vertex *vertex,
PathAPIndex path_ap_index)
{
if (delayLess(slack, 0.0, this)) {
debugPrint2(debug_, "tns", 3, "tns+ %s %s\n",
debugPrint2(debug_, "tns", 3, "tns+ %s %s",
delayAsString(slack, this),
vertex->name(sdc_network_));
tns_[path_ap_index] += slack;
@ -3749,7 +3750,7 @@ Search::tnsDecr(Vertex *vertex,
tns_slacks_[path_ap_index].findKey(vertex, slack, found);
if (found
&& delayLess(slack, 0.0, this)) {
debugPrint2(debug_, "tns", 3, "tns- %s %s\n",
debugPrint2(debug_, "tns", 3, "tns- %s %s",
delayAsString(slack, this),
vertex->name(sdc_network_));
tns_[path_ap_index] -= slack;
@ -3810,7 +3811,7 @@ Search::wnsTnsPreamble()
// Required times are only needed at endpoints.
if (requireds_seeded_) {
for (Vertex *vertex : invalid_requireds_) {
debugPrint1(debug_, "search", 2, "tns update required %s\n",
debugPrint1(debug_, "search", 2, "tns update required %s",
vertex->name(sdc_network_));
if (isEndpoint(vertex)) {
seedRequired(vertex);

View File

@ -66,7 +66,7 @@ Sim::functionSense(const FuncExpr *expr,
const Pin *input_pin,
const Instance *inst)
{
debugPrint2(debug_, "sim", 4, "find sense pin %s %s\n",
debugPrint2(debug_, "sim", 4, "find sense pin %s %s",
network_->pathName(input_pin),
expr->asString());
bool increasing, decreasing;
@ -92,7 +92,7 @@ Sim::functionSense(const FuncExpr *expr,
sense = TimingSense::negative_unate;
else
sense = TimingSense::non_unate;
debugPrint1(debug_, "sim", 4, " %s\n", timingSenseString(sense));
debugPrint1(debug_, "sim", 4, " %s", timingSenseString(sense));
return sense;
}
@ -755,7 +755,7 @@ Sim::setConstraintConstPins(LogicValueMap *value_map,
LogicValue value;
const Pin *pin;
value_iter.next(pin, value);
debugPrint2(debug_, "sim", 2, "case pin %s = %c\n",
debugPrint2(debug_, "sim", 2, "case pin %s = %c",
network_->pathName(pin),
logicValueString(value));
if (network_->isHierarchical(pin)) {
@ -789,12 +789,12 @@ Sim::setConstFuncPins(bool propagate)
if (port) {
FuncExpr *expr = port->function();
if (expr->op() == FuncExpr::op_zero) {
debugPrint1(debug_, "sim", 2, "func pin %s = 0\n",
debugPrint1(debug_, "sim", 2, "func pin %s = 0",
network_->pathName(pin));
setPinValue(pin, LogicValue::zero, propagate);
}
else if (expr->op() == FuncExpr::op_one) {
debugPrint1(debug_, "sim", 2, "func pin %s = 1\n",
debugPrint1(debug_, "sim", 2, "func pin %s = 1",
network_->pathName(pin));
setPinValue(pin, LogicValue::one, propagate);
}
@ -810,7 +810,7 @@ Sim::enqueueConstantPinInputs(bool propagate)
LogicValue value;
Pin *pin;
const_iter->next(pin, value);
debugPrint2(debug_, "sim", 2, "network constant pin %s = %c\n",
debugPrint2(debug_, "sim", 2, "network constant pin %s = %c",
network_->pathName(pin),
logicValueString(value));
setPinValue(pin, value, propagate);
@ -832,7 +832,7 @@ Sim::removePropagatedValue(const Pin *pin)
if (!exists) {
sdc_->logicValue(pin, constraint_value, exists);
if (!exists) {
debugPrint1(debug_, "sim", 2, "pin %s remove prop constant\n",
debugPrint1(debug_, "sim", 2, "pin %s remove prop constant",
network_->pathName(pin));
Vertex *vertex, *bidirect_drvr_vertex;
graph_->pinVertices(pin, vertex, bidirect_drvr_vertex);
@ -864,7 +864,7 @@ Sim::setPinValue(const Pin *pin,
sdc_network_->pathName(pin));
}
else {
debugPrint2(debug_, "sim", 3, "pin %s = %c\n",
debugPrint2(debug_, "sim", 3, "pin %s = %c",
network_->pathName(pin),
logicValueString(value));
Vertex *vertex, *bidirect_drvr_vertex;
@ -903,7 +903,7 @@ Sim::setPinValue(const Pin *pin,
void
Sim::evalInstance(const Instance *inst)
{
debugPrint1(debug_, "sim", 2, "eval %s\n", network_->pathName(inst));
debugPrint1(debug_, "sim", 2, "eval %s", network_->pathName(inst));
InstancePinIterator *pin_iter = network_->pinIterator(inst);
while (pin_iter->hasNext()) {
Pin *pin = pin_iter->next();
@ -918,7 +918,7 @@ Sim::evalInstance(const Instance *inst)
if (tri_en_expr) {
if (evalExpr(tri_en_expr, inst) == LogicValue::one) {
value = evalExpr(expr, inst);
debugPrint3(debug_, "sim", 2, " %s tri_en=1 %s = %c\n",
debugPrint3(debug_, "sim", 2, " %s tri_en=1 %s = %c",
port->name(),
expr->asString(),
logicValueString(value));
@ -926,7 +926,7 @@ Sim::evalInstance(const Instance *inst)
}
else {
value = evalExpr(expr, inst);
debugPrint3(debug_, "sim", 2, " %s %s = %c\n",
debugPrint3(debug_, "sim", 2, " %s %s = %c",
port->name(),
expr->asString(),
logicValueString(value));
@ -934,14 +934,14 @@ Sim::evalInstance(const Instance *inst)
}
else if (port->isClockGateOutPin()) {
value = clockGateOutValue(inst);
debugPrint2(debug_, "sim", 2, " %s gated_clk = %c\n",
debugPrint2(debug_, "sim", 2, " %s gated_clk = %c",
port->name(),
logicValueString(value));
}
FuncExpr *tri_en_expr = port->tristateEnable();
if (tri_en_expr == nullptr
|| evalExpr(tri_en_expr, inst) == LogicValue::one) {
debugPrint3(debug_, "sim", 2, " %s %s = %c\n",
debugPrint3(debug_, "sim", 2, " %s %s = %c",
port->name(),
expr ? expr->asString() : "gated_clk",
logicValueString(value));
@ -1093,7 +1093,7 @@ Sim::clearSimValues()
void
Sim::clearInstSimValues(const Instance *inst)
{
debugPrint1(debug_, "sim", 4, "clear %s\n",
debugPrint1(debug_, "sim", 4, "clear %s",
network_->pathName(inst));
InstancePinIterator *pin_iter = network_->pinIterator(inst);
while (pin_iter->hasNext()) {
@ -1123,7 +1123,7 @@ void
Sim::annotateVertexEdges(const Instance *inst,
bool annotate)
{
debugPrint2(debug_, "sim", 4, "annotate %s %s\n",
debugPrint2(debug_, "sim", 4, "annotate %s %s",
network_->pathName(inst),
annotate ? "true" : "false");
InstancePinIterator *pin_iter = network_->pinIterator(inst);

View File

@ -3006,7 +3006,7 @@ Sta::findRequired(Vertex *vertex)
// path pruning on fanout vertices with DFS.
int fanout = 0;
disableFanoutCrprPruning(vertex, fanout);
debugPrint2(debug_, "search", 1, "resurrect pruned required %s fanout %d\n",
debugPrint2(debug_, "search", 1, "resurrect pruned required %s fanout %d",
vertex->name(sdc_network_),
fanout);
// Find fanout arrivals and requireds with pruning disabled.
@ -4613,7 +4613,7 @@ Sta::findFaninPins(Vertex *to,
int inst_level,
int pin_level)
{
debugPrint1(debug_, "fanin", 1, "%s\n",
debugPrint1(debug_, "fanin", 1, "%s",
to->name(sdc_network_));
if (!visited.hasKey(to)) {
visited.insert(to);
@ -4723,7 +4723,7 @@ Sta::findFanoutPins(Vertex *from,
int inst_level,
int pin_level)
{
debugPrint1(debug_, "fanout", 1, "%s\n",
debugPrint1(debug_, "fanout", 1, "%s",
from->name(sdc_network_));
if (!visited.hasKey(from)) {
visited.insert(from);

View File

@ -106,7 +106,7 @@ void
TagGroup::report(const StaState *sta) const
{
Report *report = sta->report();
report->print("Group %u hash = %u\n", index_, hash_);
report->reportLine("Group %u hash = %u", index_, hash_);
arrivalMapReport(arrival_map_, sta);
}
@ -126,11 +126,11 @@ arrivalMapReport(const ArrivalMap *arrival_map,
Tag *tag;
int arrival_index;
arrival_iter.next(tag, arrival_index);
report->print(" %2u %s\n",
arrival_index,
tag->asString(sta));
report->reportLine(" %2u %s",
arrival_index,
tag->asString(sta));
}
report->print("\n");
report->reportLine("");
}
////////////////////////////////////////////////////////////////

View File

@ -56,7 +56,7 @@ VisitPathEnds::visitPathEnds(Vertex *vertex,
// Ignore slack on bidirect driver vertex. The load vertex gets the slack.
if (!vertex->isBidirectDriver()) {
const Pin *pin = vertex->pin();
debugPrint1(debug_, "search", 2, "find end slack %s\n",
debugPrint1(debug_, "search", 2, "find end slack %s",
vertex->name(sdc_network_));
visitor->vertexBegin(vertex);
bool is_constrained = false;

View File

@ -247,7 +247,7 @@ PathGroupPathVisitor::visit(Vertex *vertex)
visitFanoutPaths(vertex);
if (vertex_matches_) {
const Debug *debug = sta_->debug();
debugPrint1(debug, "visit_path_group", 1, "visit %s\n",
debugPrint1(debug, "visit_path_group", 1, "visit %s",
vertex->name(sta_->network()));
visitor_->visit(vertex);
bkwd_iter_->enqueueAdjacentVertices(vertex);
@ -279,7 +279,7 @@ PathGroupPathVisitor::visitFromToPath(const Pin *,
if (!to_path.isNull()) {
if (matching_paths->hasKey(&to_path)) {
const Debug *debug = sta_->debug();
debugPrint4(debug, "visit_path_group", 2, "match %s %s -> %s %s\n",
debugPrint4(debug, "visit_path_group", 2, "match %s %s -> %s %s",
from_vertex->name(sta_->network()),
from_tag->asString(sta_),
to_vertex->name(sta_->network()),
@ -295,7 +295,7 @@ PathGroupPathVisitor::visitFromToPath(const Pin *,
&& matching_paths->hasKey(to_path)) {
const Debug *debug = sta_->debug();
debugPrint4(debug, "visit_path_group", 2,
"match crpr %s %s -> %s %s\n",
"match crpr %s %s -> %s %s",
from_vertex->name(sta_->network()),
from_tag->asString(sta_),
to_vertex->name(sta_->network()),

View File

@ -149,7 +149,7 @@ WorstSlack::initQueue(PathAPIndex path_ap_index,
{
Search *search = sta->search();
const Debug *debug = sta->debug();
debugPrint0(debug, "wns", 3, "init queue\n");
debugPrint0(debug, "wns", 3, "init queue");
queue_.clear();
worst_vertex_ = nullptr;
@ -169,7 +169,7 @@ WorstSlack::initQueue(PathAPIndex path_ap_index,
sortQueue(path_ap_index, sta);
}
}
debugPrint1(debug, "wns", 3, "threshold %s\n",
debugPrint1(debug, "wns", 3, "threshold %s",
delayAsString(slack_threshold_, sta));
// checkQueue();
}
@ -181,7 +181,7 @@ WorstSlack::sortQueue(PathAPIndex path_ap_index,
if (queue_.size() > 0) {
Search *search = sta->search();
const Debug *debug = sta->debug();
debugPrint0(debug, "wns", 3, "sort queue\n");
debugPrint0(debug, "wns", 3, "sort queue");
VertexSeq vertices;
vertices.reserve(queue_.size());
@ -197,7 +197,7 @@ WorstSlack::sortQueue(PathAPIndex path_ap_index,
int threshold_index = min(min_queue_size_, vertex_count - 1);
Vertex *threshold_vertex = vertices[threshold_index];
slack_threshold_ = search->wnsSlack(threshold_vertex, path_ap_index);
debugPrint1(debug, "wns", 3, "threshold %s\n",
debugPrint1(debug, "wns", 3, "threshold %s",
delayAsString(slack_threshold_, sta));
// Reinsert vertices with slack < threshold.
@ -223,7 +223,7 @@ WorstSlack::findWorstInQueue(PathAPIndex path_ap_index,
{
Search *search = sta->search();
const Debug *debug = sta->debug();
debugPrint0(debug, "wns", 3, "find worst in queue\n");
debugPrint0(debug, "wns", 3, "find worst in queue");
worst_vertex_ = nullptr;
worst_slack_ = slack_init_;
@ -263,20 +263,20 @@ WorstSlack::checkQueue(PathAPIndex path_ap_index,
if (!queue_.hasKey(end)
&& delayLessEqual(search->wnsSlack(end, path_ap_index),
slack_threshold_, sta))
report->print("WorstSlack queue missing %s %s < %s\n",
end->name(network),
delayAsString(search->wnsSlack(end, path_ap_index), sta),
delayAsString(slack_threshold_, sta));
report->reportLine("WorstSlack queue missing %s %s < %s",
end->name(network),
delayAsString(search->wnsSlack(end, path_ap_index), sta),
delayAsString(slack_threshold_, sta));
}
VertexSet::Iterator queue_iter(queue_);
while (queue_iter.hasNext()) {
Vertex *end = queue_iter.next();
if (!end_set.hasKey(end))
report->print("WorstSlack queue extra %s %s > %s\n",
end->name(network),
delayAsString(search->wnsSlack(end, path_ap_index), sta),
delayAsString(slack_threshold_, sta));
report->reportLine("WorstSlack queue extra %s %s > %s",
end->name(network),
delayAsString(search->wnsSlack(end, path_ap_index), sta),
delayAsString(slack_threshold_, sta));
}
}
@ -302,13 +302,13 @@ WorstSlack::updateWorstSlack(Vertex *vertex,
if (!delayEqual(slack, slack_init_)
&& delayLessEqual(slack, slack_threshold_, sta)) {
debugPrint2(debug, "wns", 3, "insert %s %s\n",
debugPrint2(debug, "wns", 3, "insert %s %s",
vertex->name(network),
delayAsString(slack, sta));
queue_.insert(vertex);
}
else {
debugPrint2(debug, "wns", 3, "delete %s %s\n",
debugPrint2(debug, "wns", 3, "delete %s %s",
vertex->name(network),
delayAsString(slack, sta));
queue_.erase(vertex);
@ -321,7 +321,7 @@ WorstSlack::setWorstSlack(Vertex *vertex,
Slack slack,
const StaState *sta)
{
debugPrint2(sta->debug(), "wns", 3, "%s %s\n",
debugPrint2(sta->debug(), "wns", 3, "%s %s",
vertex->name(sta->network()),
delayAsString(slack, sta));
worst_vertex_ = vertex;

View File

@ -859,11 +859,11 @@ WritePathSpice::writeSubcktInstVoltSrcs(Stage stage,
const char *drvr_port_name = drvr_port->name();
const char *inst_name = network_->pathName(inst);
debugPrint1(debug_, "write_spice", 2, "subckt %s\n", cell->name());
debugPrint1(debug_, "write_spice", 2, "subckt %s", cell->name());
for (string subckt_port_sname : *spice_port_names) {
const char *subckt_port_name = subckt_port_sname.c_str();
LibertyPgPort *pg_port = cell->findPgPort(subckt_port_name);
debugPrint2(debug_, "write_spice", 2, " port %s%s\n",
debugPrint2(debug_, "write_spice", 2, " port %s%s",
subckt_port_name,
pg_port ? " pwr/gnd" : "");
if (pg_port)
@ -1383,7 +1383,7 @@ WritePathSpice::writeSubckts()
report_->error(28, "The following subkcts are missing from %s",
lib_subckt_filename_);
for (const char *cell_name : path_cell_names)
report_->print(" %s\n", cell_name);
report_->reportLine(" %s", cell_name);
}
}
else {
@ -1404,7 +1404,7 @@ WritePathSpice::findPathCellnames(// Return values.
if (arc) {
LibertyCell *cell = arc->set()->libertyCell();
if (cell) {
debugPrint1(debug_, "write_spice", 2, "cell %s\n", cell->name());
debugPrint1(debug_, "write_spice", 2, "cell %s", cell->name());
path_cell_names.insert(cell->name());
}
// Include side receivers.

View File

@ -113,7 +113,7 @@ proc report_power_row { type row_result design_total field_width digits } {
} else {
set percent [expr $total / $design_total * 100]
}
report_line "[format %-20s $type][power_col $internal $field_width $digits][power_col $switching $field_width $digits][power_col $leakage $field_width $digits][power_col $total $field_width $digits] [format %5.1f%% $percent]"
report_line "[format %-20s $type][power_col $internal $field_width $digits][power_col $switching $field_width $digits][power_col $leakage $field_width $digits][power_col $total $field_width $digits] [format %5.1f $percent]%"
}
proc is_nan { str } {

View File

@ -1983,7 +1983,7 @@ void
report_line(const char *msg)
{
Report *report = Sta::sta()->report();
report->printLine(msg);
report->reportLineString(msg);
}
void
@ -4397,7 +4397,7 @@ set_report_path_field_properties(const char *field_name,
if (field)
field->setProperties(title, width, left_justify);
else
sta->report()->print("Error: unknown report path field %s\n", field_name);
sta->report()->error(607, "unknown report path field %s", field_name);
}
void
@ -4409,7 +4409,7 @@ set_report_path_field_width(const char *field_name,
if (field)
field->setWidth(width);
else
sta->report()->print("Error: unknown report path field %s\n", field_name);
sta->report()->error(608, "unknown report path field %s", field_name);
}
void
@ -5187,7 +5187,7 @@ report_loops()
while (loop_iter.hasNext()) {
GraphLoop *loop = loop_iter.next();
loop->report(report, network, graph);
report->print("\n");
report->reportLine("");
}
}

View File

@ -62,12 +62,12 @@ int
Debug::level(const char *what)
{
if (debug_map_) {
const char *key;
int dbg_level;
bool exists;
debug_map_->findKey(what, key, dbg_level, exists);
if (exists)
return dbg_level;
const char *key;
int dbg_level;
bool exists;
debug_map_->findKey(what, key, dbg_level, exists);
if (exists)
return dbg_level;
}
return 0;
}
@ -112,4 +112,18 @@ Debug::print(const char *fmt,
va_end(args);
}
void
Debug::reportLine(const char *what,
const char *fmt,
...) const
{
va_list args;
va_start(args, fmt);
report_->printToBuffer(what);
report_->printToBufferAppend(": ");
report_->printToBufferAppend(fmt, args);
report_->printToBufferAppend("\n");
report_->printBuffer();
}
} // namespace

View File

@ -44,6 +44,64 @@ Report::~Report()
delete [] buffer_;
}
size_t
Report::printString(const char *buffer,
size_t length)
{
size_t ret = length;
if (redirect_to_string_)
redirectStringPrint(buffer, length);
else {
if (redirect_stream_)
ret = min(ret, fwrite(buffer, sizeof(char), length, redirect_stream_));
else
ret = min(ret, printConsole(buffer, length));
if (log_stream_)
ret = min(ret, fwrite(buffer, sizeof(char), length, log_stream_));
}
return ret;
}
void
Report::print(const string *str)
{
printString(str->c_str(), str->size());
}
void
Report::print(const string &str)
{
printString(str.c_str(), str.size());
}
void
Report::vprint(const char *fmt,
va_list args)
{
std::unique_lock<std::mutex> lock(buffer_lock_);
printToBuffer(fmt, args);
printString(buffer_, buffer_length_);
}
void
Report::reportLine(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vprint(fmt, args);
printString("\n", 1);
va_end(args);
}
void
Report::reportLineString(const char *line)
{
printString(line, strlen(line));
printString("\n", 1);
}
////////////////////////////////////////////////////////////////
void
Report::printToBuffer(const char *fmt,
...)
@ -96,61 +154,6 @@ Report::printBuffer()
printString(buffer_, buffer_length_);
}
size_t
Report::printString(const char *buffer,
size_t length)
{
size_t ret = length;
if (redirect_to_string_)
redirectStringPrint(buffer, length);
else {
if (redirect_stream_)
ret = min(ret, fwrite(buffer, sizeof(char), length, redirect_stream_));
else
ret = min(ret, printConsole(buffer, length));
if (log_stream_)
ret = min(ret, fwrite(buffer, sizeof(char), length, log_stream_));
}
return ret;
}
void
Report::print(const string *str)
{
printString(str->c_str(), str->size());
}
void
Report::print(const string &str)
{
printString(str.c_str(), str.size());
}
void
Report::vprint(const char *fmt,
va_list args)
{
std::unique_lock<std::mutex> lock(buffer_lock_);
printToBuffer(fmt, args);
printString(buffer_, buffer_length_);
}
void
Report::print(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vprint(fmt, args);
va_end(args);
}
void
Report::printLine(const char *line)
{
printString(line, strlen(line));
printString("\n", 1);
}
////////////////////////////////////////////////////////////////
void