diff --git a/doc/CodingGuidelines.txt b/doc/CodingGuidelines.txt index 1c6f8dce..001e5900 100644 --- a/doc/CodingGuidelines.txt +++ b/doc/CodingGuidelines.txt @@ -8,6 +8,7 @@ member variable - snake case with trailing underscore (member_variable_) Trailing underscore prevents conflict with accessor member function name. function - lower camel case (functionName) +variable - snake case comments - use capitalized sentences that end with periods C++ code files should use a .cc file extension @@ -55,7 +56,7 @@ this: instead, write this: foo = (char *) malloc (sizeof *foo); - if (foo == 0) + if (foo == nullptr) fatal ("virtual memory exhausted"); diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index b5aadae3..30debd8f 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -1236,7 +1236,7 @@ public: void setCmdCorner(Corner *corner); Corner *findCorner(const char *corner_name); bool multiCorner(); - void makeCorners(StringSet *corner_names); + virtual void makeCorners(StringSet *corner_names); // Find all arc delays and vertex slews with delay calculator. virtual void findDelays(); // Find arc delays and vertex slews thru to level of to_vertex. diff --git a/liberty/Liberty.cc b/liberty/Liberty.cc index 5e0edffa..8bad4c35 100644 --- a/liberty/Liberty.cc +++ b/liberty/Liberty.cc @@ -1852,10 +1852,15 @@ 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); - debugPrint(debug, "liberty", 2, "latch d=%s en=%s %s q=%s", + debugPrint(debug, "liberty_latch", 1, + "latch %s -> %s | %s %s -> %s | %s %s -> %s setup", d->name(), + q->name(), en->name(), - en_rf->name(), + en_rf->shortName(), + q->name(), + en->name(), + setup_check->arcs()[0]->fromEdge()->asRiseFall()->shortName(), q->name()); return latch_enable; } diff --git a/sdf/SdfReader.cc b/sdf/SdfReader.cc index 195f51be..859ba47c 100644 --- a/sdf/SdfReader.cc +++ b/sdf/SdfReader.cc @@ -425,13 +425,15 @@ void SdfReader::timingCheck(TimingRole *role, SdfPortSpec *data_edge, SdfPortSpec *clk_edge, SdfTriple *triple) { - const char *data_port_name = data_edge->port(); - const char *clk_port_name = clk_edge->port(); - Cell *cell = network_->cell(instance_); - Port *data_port = findPort(cell, data_port_name); - Port *clk_port = findPort(cell, clk_port_name); - if (data_port && clk_port) - timingCheck1(role, data_port, data_edge, clk_port, clk_edge, triple); + if (instance_) { + const char *data_port_name = data_edge->port(); + const char *clk_port_name = clk_edge->port(); + Cell *cell = network_->cell(instance_); + Port *data_port = findPort(cell, data_port_name); + Port *clk_port = findPort(cell, clk_port_name); + if (data_port && clk_port) + timingCheck1(role, data_port, data_edge, clk_port, clk_edge, triple); + } deletePortSpec(data_edge); deletePortSpec(clk_edge); deleteTriple(triple);