Adapt test files to upstream API changes (string_view migration)

Update 16 test files to match upstream OpenSTA API refactoring:
- const char* → std::string/std::string_view across all test APIs
- EXPECT_STREQ → EXPECT_EQ for std::string/string_view returns
- nullptr → "" for string_view parameters (makeClock, makeClockGroups, etc.)
- PropertyValue("literal") → PropertyValue(std::string("literal")) to avoid
  bool constructor overload resolution
- Method renames: relatedGroundPin→relatedGroundPort,
  relatedPowerPin→relatedPowerPort, firstName→firstParam,
  secondName→secondParam
- Constructor changes: OperatingConditions (5-arg → 1-arg + setters),
  ModeDef::defineValue (3-arg → 1-arg + setSdfCond)
- LibertyAttrValue::floatValue returns std::pair<float,bool> now
- Filter API: separate args → single expression string + bool_props_as_int
- SDF version golden files: 3.0.1 → 3.1.0

All 6104 tests pass.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
This commit is contained in:
Jaehyun Kim 2026-03-31 16:34:40 +09:00
parent b42e064281
commit 3ca78b11c8
16 changed files with 601 additions and 584 deletions

View File

@ -453,7 +453,7 @@ protected:
TEST_F(StaDcalcTest, UnitDelayCalcName) {
ArcDelayCalc *calc = makeDelayCalc("unit", sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "unit");
EXPECT_EQ(calc->name(), "unit");
delete calc;
}
@ -463,7 +463,7 @@ TEST_F(StaDcalcTest, UnitDelayCalcCopy) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "unit");
EXPECT_EQ(copy->name(), "unit");
delete copy;
delete calc;
}
@ -594,7 +594,7 @@ TEST_F(StaDcalcTest, UnitDelayCalcReportCheckDelay) {
ArcDelayCalc *calc = makeDelayCalc("unit", sta_);
ASSERT_NE(calc, nullptr);
std::string report = calc->reportCheckDelay(nullptr, nullptr, 0.0,
nullptr, 0.0, 0.0,
"", 0.0, 0.0,
nullptr, nullptr, 3);
EXPECT_FALSE(report.empty());
EXPECT_NE(report.find("Check"), std::string::npos);
@ -613,7 +613,7 @@ TEST_F(StaDcalcTest, UnitDelayCalcFinishDrvrPin) {
TEST_F(StaDcalcTest, LumpedCapDelayCalcName) {
ArcDelayCalc *calc = makeDelayCalc("lumped_cap", sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "lumped_cap");
EXPECT_EQ(calc->name(), "lumped_cap");
delete calc;
}
@ -623,7 +623,7 @@ TEST_F(StaDcalcTest, LumpedCapDelayCalcCopy) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "lumped_cap");
EXPECT_EQ(copy->name(), "lumped_cap");
delete copy;
delete calc;
}
@ -640,7 +640,7 @@ TEST_F(StaDcalcTest, LumpedCapReduceSupported) {
TEST_F(StaDcalcTest, DmpCeffElmoreName) {
ArcDelayCalc *calc = makeDelayCalc("dmp_ceff_elmore", sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "dmp_ceff_elmore");
EXPECT_EQ(calc->name(), "dmp_ceff_elmore");
delete calc;
}
@ -650,7 +650,7 @@ TEST_F(StaDcalcTest, DmpCeffElmoreCopy) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "dmp_ceff_elmore");
EXPECT_EQ(copy->name(), "dmp_ceff_elmore");
delete copy;
delete calc;
}
@ -667,7 +667,7 @@ TEST_F(StaDcalcTest, DmpCeffElmoreReduceSupported) {
TEST_F(StaDcalcTest, DmpCeffTwoPoleName) {
ArcDelayCalc *calc = makeDelayCalc("dmp_ceff_two_pole", sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "dmp_ceff_two_pole");
EXPECT_EQ(calc->name(), "dmp_ceff_two_pole");
delete calc;
}
@ -677,7 +677,7 @@ TEST_F(StaDcalcTest, DmpCeffTwoPoleCopy) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "dmp_ceff_two_pole");
EXPECT_EQ(copy->name(), "dmp_ceff_two_pole");
delete copy;
delete calc;
}
@ -694,7 +694,7 @@ TEST_F(StaDcalcTest, DmpCeffTwoPoleReduceSupported) {
TEST_F(StaDcalcTest, ArnoldiName) {
ArcDelayCalc *calc = makeDelayCalc("arnoldi", sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "arnoldi");
EXPECT_EQ(calc->name(), "arnoldi");
delete calc;
}
@ -704,7 +704,7 @@ TEST_F(StaDcalcTest, ArnoldiCopy) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "arnoldi");
EXPECT_EQ(copy->name(), "arnoldi");
delete copy;
delete calc;
}
@ -713,7 +713,7 @@ TEST_F(StaDcalcTest, ArnoldiCopy) {
TEST_F(StaDcalcTest, CcsCeffName) {
ArcDelayCalc *calc = makeDelayCalc("ccs_ceff", sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "ccs_ceff");
EXPECT_EQ(calc->name(), "ccs_ceff");
delete calc;
}
@ -723,7 +723,7 @@ TEST_F(StaDcalcTest, CcsCeffCopy) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "ccs_ceff");
EXPECT_EQ(copy->name(), "ccs_ceff");
delete copy;
delete calc;
}
@ -740,7 +740,7 @@ TEST_F(StaDcalcTest, CcsCeffReduceSupported) {
TEST_F(StaDcalcTest, PrimaName) {
ArcDelayCalc *calc = makeDelayCalc("prima", sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "prima");
EXPECT_EQ(calc->name(), "prima");
delete calc;
}
@ -750,7 +750,7 @@ TEST_F(StaDcalcTest, PrimaCopy) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "prima");
EXPECT_EQ(copy->name(), "prima");
delete copy;
delete calc;
}
@ -1106,7 +1106,7 @@ TEST_F(StaDcalcTest, PrimaInputPortDelay) {
TEST_F(StaDcalcTest, UnitDelayCalcDirectConstruct) {
UnitDelayCalc *unit = new UnitDelayCalc(sta_);
ASSERT_NE(unit, nullptr);
EXPECT_STREQ(unit->name(), "unit");
EXPECT_EQ(unit->name(), "unit");
delete unit;
}
@ -1125,7 +1125,7 @@ TEST_F(StaDcalcTest, DmpCeffDelayCalcDeleteViaBasePtr) {
TEST_F(StaDcalcTest, DmpCeffElmoreDirectFactory) {
ArcDelayCalc *calc = makeDmpCeffElmoreDelayCalc(sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "dmp_ceff_elmore");
EXPECT_EQ(calc->name(), "dmp_ceff_elmore");
delete calc;
}
@ -1133,7 +1133,7 @@ TEST_F(StaDcalcTest, DmpCeffElmoreDirectFactory) {
TEST_F(StaDcalcTest, DmpCeffTwoPoleDirectFactory) {
ArcDelayCalc *calc = makeDmpCeffTwoPoleDelayCalc(sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "dmp_ceff_two_pole");
EXPECT_EQ(calc->name(), "dmp_ceff_two_pole");
delete calc;
}
@ -1313,7 +1313,7 @@ TEST_F(StaDcalcTest, PrimaCopyDeepState) {
prima->setPrimaReduceOrder(6);
ArcDelayCalc *copy = prima->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "prima");
EXPECT_EQ(copy->name(), "prima");
delete copy;
delete calc;
}
@ -1715,7 +1715,7 @@ protected:
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(250.0f);
sta_->makeClock("clk", clk_pins, false, 500.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("clk", clk_pins, false, 500.0f, waveform, "", sta_->cmdMode());
design_loaded_ = true;
}
@ -2354,8 +2354,8 @@ TEST_F(StaDcalcTest, AllCalcsName) {
for (const std::string &name : names) {
ArcDelayCalc *calc = makeDelayCalc(name, sta_);
ASSERT_NE(calc, nullptr) << "Failed for: " << name;
EXPECT_NE(calc->name(), nullptr) << "Null name for: " << name;
EXPECT_GT(strlen(calc->name()), 0u) << "Empty name for: " << name;
EXPECT_FALSE(calc->name().empty()) << "Empty name for: " << name;
EXPECT_GT(calc->name().size(), 0u) << "Empty name for: " << name;
delete calc;
}
}
@ -2383,7 +2383,7 @@ TEST_F(StaDcalcTest, AllCalcsCopy) {
ASSERT_NE(calc, nullptr) << "Failed for: " << name;
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr) << "Copy failed for: " << name;
EXPECT_STREQ(copy->name(), calc->name());
EXPECT_EQ(copy->name(), calc->name());
delete copy;
delete calc;
}
@ -2747,7 +2747,7 @@ TEST_F(StaDcalcTest, LumpedCapCopyState2) {
ArcDelayCalc *calc = makeDelayCalc("lumped_cap", sta_);
ASSERT_NE(calc, nullptr);
calc->copyState(sta_);
EXPECT_STREQ(calc->name(), "lumped_cap");
EXPECT_EQ(calc->name(), "lumped_cap");
delete calc;
}
@ -2765,7 +2765,7 @@ TEST_F(StaDcalcTest, DmpCeffElmoreCopyState) {
ArcDelayCalc *calc = makeDelayCalc("dmp_ceff_elmore", sta_);
ASSERT_NE(calc, nullptr);
calc->copyState(sta_);
EXPECT_STREQ(calc->name(), "dmp_ceff_elmore");
EXPECT_EQ(calc->name(), "dmp_ceff_elmore");
delete calc;
}
@ -2783,7 +2783,7 @@ TEST_F(StaDcalcTest, DmpCeffTwoPoleCopyState) {
ArcDelayCalc *calc = makeDelayCalc("dmp_ceff_two_pole", sta_);
ASSERT_NE(calc, nullptr);
calc->copyState(sta_);
EXPECT_STREQ(calc->name(), "dmp_ceff_two_pole");
EXPECT_EQ(calc->name(), "dmp_ceff_two_pole");
delete calc;
}
@ -2801,7 +2801,7 @@ TEST_F(StaDcalcTest, CcsCeffCopyState2) {
ArcDelayCalc *calc = makeDelayCalc("ccs_ceff", sta_);
ASSERT_NE(calc, nullptr);
calc->copyState(sta_);
EXPECT_STREQ(calc->name(), "ccs_ceff");
EXPECT_EQ(calc->name(), "ccs_ceff");
delete calc;
}
@ -2812,7 +2812,7 @@ TEST_F(StaDcalcTest, PrimaCopyState2) {
ArcDelayCalc *calc = makeDelayCalc("prima", sta_);
ASSERT_NE(calc, nullptr);
calc->copyState(sta_);
EXPECT_STREQ(calc->name(), "prima");
EXPECT_EQ(calc->name(), "prima");
delete calc;
}
@ -3457,7 +3457,7 @@ TEST_F(StaDcalcTest, AllCalcsInputPortDelaySlew) {
TEST_F(StaDcalcTest, DmpCeffElmoreMakeDelete) {
ArcDelayCalc *calc = makeDmpCeffElmoreDelayCalc(sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "dmp_ceff_elmore");
EXPECT_EQ(calc->name(), "dmp_ceff_elmore");
EXPECT_TRUE(calc->reduceSupported());
delete calc;
}
@ -3467,7 +3467,7 @@ TEST_F(StaDcalcTest, DmpCeffElmoreMakeDelete) {
TEST_F(StaDcalcTest, DmpCeffTwoPoleMakeDelete) {
ArcDelayCalc *calc = makeDmpCeffTwoPoleDelayCalc(sta_);
ASSERT_NE(calc, nullptr);
EXPECT_STREQ(calc->name(), "dmp_ceff_two_pole");
EXPECT_EQ(calc->name(), "dmp_ceff_two_pole");
EXPECT_TRUE(calc->reduceSupported());
delete calc;
}
@ -3479,7 +3479,7 @@ TEST_F(StaDcalcTest, DmpCeffElmoreCopy2) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "dmp_ceff_elmore");
EXPECT_EQ(copy->name(), "dmp_ceff_elmore");
delete copy;
delete calc;
}
@ -3491,7 +3491,7 @@ TEST_F(StaDcalcTest, DmpCeffTwoPoleCopy2) {
ASSERT_NE(calc, nullptr);
ArcDelayCalc *copy = calc->copy();
ASSERT_NE(copy, nullptr);
EXPECT_STREQ(copy->name(), "dmp_ceff_two_pole");
EXPECT_EQ(copy->name(), "dmp_ceff_two_pole");
delete copy;
delete calc;
}
@ -3501,7 +3501,7 @@ TEST_F(StaDcalcTest, DmpCeffElmoreCopyState2) {
ArcDelayCalc *calc = makeDmpCeffElmoreDelayCalc(sta_);
ASSERT_NE(calc, nullptr);
calc->copyState(sta_);
EXPECT_STREQ(calc->name(), "dmp_ceff_elmore");
EXPECT_EQ(calc->name(), "dmp_ceff_elmore");
delete calc;
}
@ -3510,7 +3510,7 @@ TEST_F(StaDcalcTest, DmpCeffTwoPoleCopyState2) {
ArcDelayCalc *calc = makeDmpCeffTwoPoleDelayCalc(sta_);
ASSERT_NE(calc, nullptr);
calc->copyState(sta_);
EXPECT_STREQ(calc->name(), "dmp_ceff_two_pole");
EXPECT_EQ(calc->name(), "dmp_ceff_two_pole");
delete calc;
}
@ -4204,7 +4204,7 @@ protected:
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(5.0f);
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, "", sta_->cmdMode());
// Set input/output delay constraints to create constrained timing paths
Clock *clk = sta_->cmdSdc()->findClock("clk");
@ -4445,7 +4445,7 @@ protected:
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(5.0f);
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, "", sta_->cmdMode());
Clock *clk = sta_->cmdSdc()->findClock("clk");
ASSERT_NE(clk, nullptr);
@ -4624,7 +4624,7 @@ TEST_F(MultiDriverDcalcTest, IncrementalClockPeriodChange) {
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(1.0f);
sta_->makeClock("clk", clk_pins, false, 2.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("clk", clk_pins, false, 2.0f, waveform, "", sta_->cmdMode());
sta_->updateTiming(true);
Slack slack2 = sta_->worstSlack(MinMax::max());
@ -4760,7 +4760,7 @@ protected:
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(5.0f);
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, "", sta_->cmdMode());
// Set input/output delay constraints to create constrained timing paths
Clock *clk = sta_->cmdSdc()->findClock("clk");
@ -4886,7 +4886,7 @@ TEST_F(DesignDcalcTest, IncrementalWithSpef) {
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(50.0f);
sta_->makeClock("clk", clk_pins, false, 100.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("clk", clk_pins, false, 100.0f, waveform, "", sta_->cmdMode());
sta_->updateTiming(true);
Slack slack2 = sta_->worstSlack(MinMax::max());

View File

@ -594,15 +594,15 @@ TEST_F(StaLibertyTest, PortBoolFlags) {
EXPECT_FALSE(a->isPad());
}
TEST_F(StaLibertyTest, PortRelatedPins) {
TEST_F(StaLibertyTest, PortRelatedPorts) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
LibertyPort *a = buf->findLibertyPort("A");
ASSERT_NE(a, nullptr);
const char *ground_pin = a->relatedGroundPin();
const char *power_pin = a->relatedPowerPin();
// ground_pin may be null for simple arcs
// power_pin may be null for simple arcs
LibertyPort *ground_port = a->relatedGroundPort();
LibertyPort *power_port = a->relatedPowerPort();
// ground_port may be null for simple cells
// power_port may be null for simple cells
}
TEST_F(StaLibertyTest, PortLibertyLibrary) {
@ -900,8 +900,9 @@ TEST_F(StaLibertyTest, PortVoltageName) {
ASSERT_NE(buf, nullptr);
LibertyPort *a = buf->findLibertyPort("A");
ASSERT_NE(a, nullptr);
const char *vname = a->voltageName();
// vname may be null for simple arcs
const std::string &vname = a->voltageName();
// vname may be empty for simple cells
(void)vname;
}
TEST_F(StaLibertyTest, PortEquivAndLess) {
@ -1136,7 +1137,7 @@ TEST(TableReportTest, Table0ReportValue) {
Table t(42.0f);
Unit unit(1e-9f, "s", 3);
std::string rv = t.reportValue("delay", nullptr, nullptr,
0.0f, nullptr, 0.0f, 0.0f,
0.0f, "", 0.0f, 0.0f,
&unit, 3);
EXPECT_FALSE(rv.empty());
}
@ -1307,7 +1308,7 @@ TEST(DriverWaveformTest, CreateAndName) {
auto ax2 = makeTestAxis(TableAxisVariable::normalized_voltage, {0.0f, 1.0f});
TablePtr tbl = std::make_shared<Table>(std::move(vals), ax1, ax2);
DriverWaveform *dw = new DriverWaveform("test_driver_waveform", tbl);
EXPECT_STREQ(dw->name(), "test_driver_waveform");
EXPECT_EQ(dw->name(), "test_driver_waveform");
Table wf = dw->waveform(0.15f);
// Waveform accessor exercised; axis may be null for simple waveforms
EXPECT_EQ(wf.order(), 1);
@ -1470,9 +1471,11 @@ TEST_F(StaLibertyTest, ModeValueDefSetSdfCond) {
ASSERT_NE(buf, nullptr);
ModeDef *mode_def = buf->makeModeDef("test_mode");
ASSERT_NE(mode_def, nullptr);
ModeValueDef *val_def = mode_def->defineValue("val1", nullptr, "orig_sdf_cond");
ModeValueDef *val_def = mode_def->defineValue("val1");
ASSERT_NE(val_def, nullptr);
EXPECT_EQ(val_def->value(), "val1");
// Set sdf_cond after creation
val_def->setSdfCond("orig_sdf_cond");
EXPECT_EQ(val_def->sdfCond(), "orig_sdf_cond");
val_def->setSdfCond("new_sdf_cond");
EXPECT_EQ(val_def->sdfCond(), "new_sdf_cond");
@ -1483,7 +1486,7 @@ TEST_F(StaLibertyTest, ModeValueDefSetCond) {
ASSERT_NE(buf, nullptr);
ModeDef *mode_def = buf->makeModeDef("test_mode2");
ASSERT_NE(mode_def, nullptr);
ModeValueDef *val_def = mode_def->defineValue("val2", nullptr, nullptr);
ModeValueDef *val_def = mode_def->defineValue("val2");
ASSERT_NE(val_def, nullptr);
EXPECT_EQ(val_def->cond(), nullptr);
val_def->setCond(nullptr);
@ -1621,7 +1624,7 @@ TEST_F(StaLibertyTest, CheckTableModelCheckDelay) {
ArcDelay d = ctm->checkDelay(nullptr, 0.1f, 0.1f, 0.0f,
MinMax::max(), PocvMode::scalar);
EXPECT_GE(delayAsFloat(d), 0.0f);
std::string rpt = ctm->reportCheckDelay(nullptr, 0.1f, nullptr,
std::string rpt = ctm->reportCheckDelay(nullptr, 0.1f, "",
0.1f, 0.0f,
MinMax::max(), PocvMode::scalar, 3);
EXPECT_FALSE(rpt.empty());
@ -1644,7 +1647,7 @@ TEST_F(StaLibertyTest, LibraryMakeAndFindDriverWaveform) {
ASSERT_NE(dw, nullptr);
DriverWaveform *found = lib_->findDriverWaveform("my_driver_wf");
EXPECT_EQ(found, dw);
EXPECT_STREQ(found->name(), "my_driver_wf");
EXPECT_EQ(found->name(), "my_driver_wf");
EXPECT_EQ(lib_->findDriverWaveform("no_such_wf"), nullptr);
}
@ -1771,7 +1774,7 @@ TEST_F(StaLibertyTest, CheckTableModelDirect) {
MinMax::max(), PocvMode::scalar);
EXPECT_GE(delayAsFloat(d), 0.0f);
std::string rpt = ctm->reportCheckDelay(nullptr, 0.1f, nullptr,
std::string rpt = ctm->reportCheckDelay(nullptr, 0.1f, "",
0.1f, 0.0f,
MinMax::max(), PocvMode::scalar, 3);
EXPECT_FALSE(rpt.empty());
@ -1866,19 +1869,21 @@ TEST_F(StaLibertyTest, CellInverterCheck) {
TEST_F(StaLibertyTest, CellFootprint) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
const char *fp = buf->footprint();
// fp may be null for simple arcs
const std::string &fp = buf->footprint();
// fp may be empty for simple cells
(void)fp;
buf->setFootprint("test_fp");
EXPECT_STREQ(buf->footprint(), "test_fp");
EXPECT_EQ(buf->footprint(), "test_fp");
}
TEST_F(StaLibertyTest, CellUserFunctionClass) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
const char *ufc = buf->userFunctionClass();
// ufc may be null for simple arcs
const std::string &ufc = buf->userFunctionClass();
// ufc may be empty for simple cells
(void)ufc;
buf->setUserFunctionClass("my_class");
EXPECT_STREQ(buf->userFunctionClass(), "my_class");
EXPECT_EQ(buf->userFunctionClass(), "my_class");
}
TEST_F(StaLibertyTest, CellSetArea) {
@ -1981,7 +1986,7 @@ TEST(BusDclTest, Create) {
TEST(OperatingConditionsTest, Create) {
OperatingConditions oc("typical");
EXPECT_STREQ(oc.name(), "typical");
EXPECT_EQ(oc.name(), "typical");
oc.setProcess(1.0f);
oc.setTemperature(25.0f);
oc.setVoltage(1.1f);
@ -2132,22 +2137,28 @@ TEST(TimingArcSetWireTest, WireTimingArcSet) {
// LibertyPort additional setters
////////////////////////////////////////////////////////////////
TEST_F(StaLibertyTest, PortSetRelatedGroundPin) {
TEST_F(StaLibertyTest, PortSetRelatedGroundPort) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
LibertyPort *port = buf->findLibertyPort("A");
ASSERT_NE(port, nullptr);
port->setRelatedGroundPin("VSS");
EXPECT_STREQ(port->relatedGroundPin(), "VSS");
LibertyPort *port_a = buf->findLibertyPort("A");
LibertyPort *port_z = buf->findLibertyPort("Z");
ASSERT_NE(port_a, nullptr);
ASSERT_NE(port_z, nullptr);
// Set and verify related ground port pointer
port_a->setRelatedGroundPort(port_z);
EXPECT_EQ(port_a->relatedGroundPort(), port_z);
}
TEST_F(StaLibertyTest, PortSetRelatedPowerPin) {
TEST_F(StaLibertyTest, PortSetRelatedPowerPort) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
LibertyPort *port = buf->findLibertyPort("A");
ASSERT_NE(port, nullptr);
port->setRelatedPowerPin("VDD");
EXPECT_STREQ(port->relatedPowerPin(), "VDD");
LibertyPort *port_a = buf->findLibertyPort("A");
LibertyPort *port_z = buf->findLibertyPort("Z");
ASSERT_NE(port_a, nullptr);
ASSERT_NE(port_z, nullptr);
// Set and verify related power port pointer
port_a->setRelatedPowerPort(port_z);
EXPECT_EQ(port_a->relatedPowerPort(), port_z);
}
// isDisabledConstraint has been moved from LibertyPort to Sdc.
@ -2249,7 +2260,7 @@ TEST_F(StaLibertyTest, CellSetCornerCell) {
TEST_F(StaLibertyTest, LibraryOperatingConditions) {
OperatingConditions *nom = lib_->findOperatingConditions("typical");
if (nom) {
EXPECT_STREQ(nom->name(), "typical");
EXPECT_EQ(nom->name(), "typical");
}
OperatingConditions *def = lib_->defaultOperatingConditions();
EXPECT_NE(def, nullptr);
@ -2760,11 +2771,11 @@ TEST_F(UnitTest, AsStringDoubleZero) {
// to_string(TimingSense) exercise - ensure all senses
TEST(TimingArcTest, TimingSenseToStringAll) {
EXPECT_NE(to_string(TimingSense::positive_unate), nullptr);
EXPECT_NE(to_string(TimingSense::negative_unate), nullptr);
EXPECT_NE(to_string(TimingSense::non_unate), nullptr);
EXPECT_NE(to_string(TimingSense::none), nullptr);
EXPECT_NE(to_string(TimingSense::unknown), nullptr);
EXPECT_FALSE(to_string(TimingSense::positive_unate).empty());
EXPECT_FALSE(to_string(TimingSense::negative_unate).empty());
EXPECT_FALSE(to_string(TimingSense::non_unate).empty());
EXPECT_FALSE(to_string(TimingSense::none).empty());
EXPECT_FALSE(to_string(TimingSense::unknown).empty());
}
// timingSenseOpposite - covers uncovered
@ -2882,7 +2893,7 @@ TEST(TimingArcTest, TimingArcAttrsSetters) {
// ScaleFactors - covers ScaleFactors constructor and methods
TEST(LibertyTest, ScaleFactors) {
ScaleFactors sf("test_sf");
EXPECT_STREQ(sf.name(), "test_sf");
EXPECT_EQ(sf.name(), "test_sf");
sf.setScale(ScaleFactorType::cell, ScaleFactorPvt::process,
RiseFall::rise(), 1.5f);
float v = sf.scale(ScaleFactorType::cell, ScaleFactorPvt::process,
@ -2907,9 +2918,9 @@ TEST(LibertyTest, FindScaleFactorPvt) {
// scaleFactorPvtName
TEST(LibertyTest, ScaleFactorPvtName) {
EXPECT_STREQ(scaleFactorPvtName(ScaleFactorPvt::process), "process");
EXPECT_STREQ(scaleFactorPvtName(ScaleFactorPvt::volt), "volt");
EXPECT_STREQ(scaleFactorPvtName(ScaleFactorPvt::temp), "temp");
EXPECT_EQ(scaleFactorPvtName(ScaleFactorPvt::process), "process");
EXPECT_EQ(scaleFactorPvtName(ScaleFactorPvt::volt), "volt");
EXPECT_EQ(scaleFactorPvtName(ScaleFactorPvt::temp), "temp");
}
// findScaleFactorType / scaleFactorTypeName
@ -2921,11 +2932,11 @@ TEST(LibertyTest, FindScaleFactorType) {
}
TEST(LibertyTest, ScaleFactorTypeName) {
EXPECT_STREQ(scaleFactorTypeName(ScaleFactorType::cell), "cell");
EXPECT_STREQ(scaleFactorTypeName(ScaleFactorType::hold), "hold");
EXPECT_STREQ(scaleFactorTypeName(ScaleFactorType::setup), "setup");
EXPECT_STREQ(scaleFactorTypeName(ScaleFactorType::recovery), "recovery");
EXPECT_STREQ(scaleFactorTypeName(ScaleFactorType::removal), "removal");
EXPECT_EQ(scaleFactorTypeName(ScaleFactorType::cell), "cell");
EXPECT_EQ(scaleFactorTypeName(ScaleFactorType::hold), "hold");
EXPECT_EQ(scaleFactorTypeName(ScaleFactorType::setup), "setup");
EXPECT_EQ(scaleFactorTypeName(ScaleFactorType::recovery), "recovery");
EXPECT_EQ(scaleFactorTypeName(ScaleFactorType::removal), "removal");
}
// scaleFactorTypeRiseFallSuffix, scaleFactorTypeRiseFallPrefix, scaleFactorTypeLowHighSuffix
@ -2963,12 +2974,16 @@ TEST(LibertyTest, Pvt) {
// OperatingConditions
TEST(LibertyTest, OperatingConditionsNameOnly) {
OperatingConditions oc("typical");
EXPECT_STREQ(oc.name(), "typical");
EXPECT_EQ(oc.name(), "typical");
}
TEST(LibertyTest, OperatingConditionsFull) {
OperatingConditions oc("fast", 1.0f, 1.21f, 0.0f, WireloadTree::balanced);
EXPECT_STREQ(oc.name(), "fast");
OperatingConditions oc("fast");
oc.setProcess(1.0f);
oc.setVoltage(1.21f);
oc.setTemperature(0.0f);
oc.setWireloadTree(WireloadTree::balanced);
EXPECT_EQ(oc.name(), "fast");
EXPECT_FLOAT_EQ(oc.process(), 1.0f);
EXPECT_FLOAT_EQ(oc.voltage(), 1.21f);
EXPECT_FLOAT_EQ(oc.temperature(), 0.0f);
@ -3039,15 +3054,15 @@ TEST_F(Table1Test, TableAxisVariableString) {
FloatSeq vals({0.0f});
auto axis = std::make_shared<TableAxis>(
TableAxisVariable::total_output_net_capacitance, std::move(vals));
EXPECT_NE(axis->variableString(), nullptr);
EXPECT_FALSE(axis->variableString().empty());
}
// tableVariableString / stringTableAxisVariable
TEST_F(Table1Test, TableVariableString) {
EXPECT_NE(tableVariableString(TableAxisVariable::total_output_net_capacitance), nullptr);
EXPECT_NE(tableVariableString(TableAxisVariable::input_net_transition), nullptr);
EXPECT_NE(tableVariableString(TableAxisVariable::related_pin_transition), nullptr);
EXPECT_NE(tableVariableString(TableAxisVariable::constrained_pin_transition), nullptr);
EXPECT_FALSE(tableVariableString(TableAxisVariable::total_output_net_capacitance).empty());
EXPECT_FALSE(tableVariableString(TableAxisVariable::input_net_transition).empty());
EXPECT_FALSE(tableVariableString(TableAxisVariable::related_pin_transition).empty());
EXPECT_FALSE(tableVariableString(TableAxisVariable::constrained_pin_transition).empty());
}
TEST_F(Table1Test, StringTableAxisVariable) {

View File

@ -840,8 +840,8 @@ TEST_F(StaLibertyTest, PortRelatedPins2) {
LibertyPort *z = buf->findLibertyPort("Z");
ASSERT_NE(z, nullptr);
// May or may not have related ground/power pins
z->relatedGroundPin();
z->relatedPowerPin();
z->relatedGroundPort();
z->relatedPowerPort();
}
// LibertyPort receiverModel
@ -859,8 +859,8 @@ TEST_F(StaLibertyTest, PortReceiverModel2) {
TEST_F(StaLibertyTest, CellFootprint2) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
const char *fp = buf->footprint();
// fp may be null for simple arcs
const std::string &fp = buf->footprint();
// fp may be empty for simple arcs
}
// LibertyCell ocv methods
@ -1029,12 +1029,11 @@ TEST(R6_LibertyAttrValueTest, FloatValueAndQuotedStringParsing) {
LibertyAttrValue float_value(1.25f);
EXPECT_TRUE(float_value.isFloat());
EXPECT_FALSE(float_value.isString());
EXPECT_FLOAT_EQ(float_value.floatValue(), 1.25f);
auto [fval, fexists] = float_value.floatValue();
EXPECT_FLOAT_EQ(fval, 1.25f);
LibertyAttrValue quoted_value(std::string("3.14"));
float parsed = 0.0f;
bool valid = false;
quoted_value.floatValue(parsed, valid);
auto [parsed, valid] = quoted_value.floatValue();
EXPECT_TRUE(valid);
EXPECT_FLOAT_EQ(parsed, 3.14f);
EXPECT_TRUE(quoted_value.isString());
@ -1047,10 +1046,10 @@ TEST(R6_LibertyGroupTest, Construction) {
LibertyGroup grp("scaled_cell", std::move(params), 10);
EXPECT_EQ(grp.type(), "scaled_cell");
EXPECT_EQ(grp.line(), 10);
ASSERT_NE(grp.firstName(), nullptr);
EXPECT_STREQ(grp.firstName(), "cell1");
ASSERT_NE(grp.secondName(), nullptr);
EXPECT_STREQ(grp.secondName(), "slow");
EXPECT_FALSE(grp.firstParam().empty());
EXPECT_EQ(grp.firstParam(), "cell1");
EXPECT_FALSE(grp.secondParam().empty());
EXPECT_EQ(grp.secondParam(), "slow");
}
TEST(R6_LibertyGroupTest, AddSubgroupAndIterate) {
@ -1070,7 +1069,8 @@ TEST(R6_LibertyGroupTest, AddAttributeAndIterate) {
ASSERT_NE(attr, nullptr);
EXPECT_EQ(attr->line(), 5);
EXPECT_TRUE(attr->value().isFloat());
EXPECT_FLOAT_EQ(attr->value().floatValue(), 3.14f);
auto [area_val, area_exists] = attr->value().floatValue();
EXPECT_FLOAT_EQ(area_val, 3.14f);
float area = 0.0f;
bool exists = false;
@ -1083,8 +1083,8 @@ TEST(R6_LibertySimpleAttrTest, Construction) {
LibertySimpleAttr attr("name", LibertyAttrValue(std::string("test_value")), 7);
EXPECT_EQ(attr.name(), "name");
EXPECT_EQ(attr.line(), 7);
ASSERT_NE(attr.stringValue(), nullptr);
EXPECT_EQ(*attr.stringValue(), "test_value");
EXPECT_FALSE(attr.stringValue().empty());
EXPECT_EQ(attr.stringValue(), "test_value");
EXPECT_TRUE(attr.value().isString());
}
@ -1108,7 +1108,8 @@ TEST(R6_LibertyComplexAttrTest, Construction) {
const LibertyAttrValue *first = attr.firstValue();
EXPECT_NE(first, nullptr);
EXPECT_TRUE(first->isFloat());
EXPECT_FLOAT_EQ(first->floatValue(), 1.0f);
auto [first_fval, first_fexists] = first->floatValue();
EXPECT_FLOAT_EQ(first_fval, 1.0f);
EXPECT_EQ(attr.values().size(), 2u);
}
@ -1129,7 +1130,8 @@ TEST(R6_LibertyAttrValueTest, FloatBasic) {
LibertyAttrValue fav(42.5f);
EXPECT_TRUE(fav.isFloat());
EXPECT_FALSE(fav.isString());
EXPECT_FLOAT_EQ(fav.floatValue(), 42.5f);
auto [fav_val, fav_exists] = fav.floatValue();
EXPECT_FLOAT_EQ(fav_val, 42.5f);
}
TEST(R6_LibertyDefineTest, Construction) {
@ -1374,7 +1376,7 @@ TEST(R6_TestCellTest, LibertyLibraryAccessor) {
LibertyLibrary lib1("lib1", "lib1.lib");
TestCell cell(&lib1, "CELL1", "lib1.lib");
EXPECT_EQ(cell.libertyLibrary(), &lib1);
EXPECT_STREQ(cell.libertyLibrary()->name(), "lib1");
EXPECT_EQ(cell.libertyLibrary()->name(), "lib1");
}
////////////////////////////////////////////////////////////////
@ -1388,33 +1390,33 @@ TEST(R6_TableVariableTest, EqualOrOppositeCapacitance) {
TEST(R6_TableVariableTest, AllVariableStrings) {
// Test that tableVariableString works for all known variables
const char *s;
std::string_view s;
s = tableVariableString(TableAxisVariable::input_transition_time);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::constrained_pin_transition);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::output_pin_transition);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::connect_delay);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::related_out_total_output_net_capacitance);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::iv_output_voltage);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::input_noise_width);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::input_noise_height);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::input_voltage);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::output_voltage);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::path_depth);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::path_distance);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
s = tableVariableString(TableAxisVariable::normalized_voltage);
EXPECT_NE(s, nullptr);
EXPECT_FALSE(s.empty());
}
////////////////////////////////////////////////////////////////
@ -1704,7 +1706,7 @@ TEST_F(StaLibertyTest, CellPortIteration) {
while (port_iter.hasNext()) {
LibertyPort *port = port_iter.next();
EXPECT_NE(port, nullptr);
EXPECT_NE(port->name(), nullptr);
EXPECT_FALSE(port->name().empty());
port_count++;
}
EXPECT_GT(port_count, 0);
@ -1743,11 +1745,11 @@ TEST_F(StaLibertyTest, PatternMatchCells) {
}
TEST_F(StaLibertyTest, LibraryName) {
EXPECT_NE(lib_->name(), nullptr);
EXPECT_FALSE(lib_->name().empty());
}
TEST_F(StaLibertyTest, LibraryFilename) {
EXPECT_NE(lib_->filename(), nullptr);
EXPECT_FALSE(lib_->filename().empty());
}
////////////////////////////////////////////////////////////////
@ -1776,8 +1778,8 @@ TEST(LibertyParserTest, LibertyGroupConstruction) {
EXPECT_EQ(group.type(), "library");
EXPECT_EQ(group.line(), 1);
ASSERT_NE(group.findAttrString("name"), nullptr);
EXPECT_EQ(*group.findAttrString("name"), "test_lib");
EXPECT_FALSE(group.findAttrString("name").empty());
EXPECT_EQ(group.findAttrString("name"), "test_lib");
float max_cap = 0.0f;
bool exists = false;
group.findAttrFloat("max_cap", max_cap, exists);
@ -1924,12 +1926,12 @@ TEST_F(StaLibertyTest, InferLatchRolesAlreadyCalled) {
// Find a latch cell
LibertyCell *cell = lib_->findLibertyCell("DFFR_X1");
if (cell) {
EXPECT_NE(cell->name(), nullptr);
EXPECT_FALSE(cell->name().empty());
}
// Also try DLATCH cells
LibertyCell *latch = lib_->findLibertyCell("DLH_X1");
if (latch) {
EXPECT_NE(latch->name(), nullptr);
EXPECT_FALSE(latch->name().empty());
}
}
@ -2252,9 +2254,8 @@ TEST_F(StaLibertyTest, CellOcvDerate3) {
TEST_F(StaLibertyTest, CellFootprint3) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
const char *fp = buf->footprint();
// May be null or empty
// fp may be null for simple arcs
const std::string &fp = buf->footprint();
// May be empty for simple arcs
}
// LibertyCell::setFootprint
@ -2262,15 +2263,15 @@ TEST_F(StaLibertyTest, CellSetFootprint) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
buf->setFootprint("test_footprint");
EXPECT_STREQ(buf->footprint(), "test_footprint");
EXPECT_EQ(buf->footprint(), "test_footprint");
}
// LibertyCell::userFunctionClass
TEST_F(StaLibertyTest, CellUserFunctionClass2) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
const char *ufc = buf->userFunctionClass();
// ufc may be null for simple arcs
const std::string &ufc = buf->userFunctionClass();
// ufc may be empty for simple arcs
}
// LibertyCell::setUserFunctionClass
@ -2278,7 +2279,7 @@ TEST_F(StaLibertyTest, CellSetUserFunctionClass) {
LibertyCell *buf = lib_->findLibertyCell("BUF_X1");
ASSERT_NE(buf, nullptr);
buf->setUserFunctionClass("my_class");
EXPECT_STREQ(buf->userFunctionClass(), "my_class");
EXPECT_EQ(buf->userFunctionClass(), "my_class");
}
// LibertyCell::setSwitchCellType
@ -2561,7 +2562,11 @@ TEST_F(StaLibertyTest, CellSetOcvDerateNull) {
// OperatingConditions construction
TEST_F(StaLibertyTest, OperatingConditionsConstruct) {
OperatingConditions oc("typical", 1.0f, 1.1f, 25.0f, WireloadTree::balanced);
OperatingConditions oc("typical");
oc.setProcess(1.0f);
oc.setVoltage(1.1f);
oc.setTemperature(25.0f);
oc.setWireloadTree(WireloadTree::balanced);
EXPECT_EQ(oc.name(), std::string("typical"));
EXPECT_FLOAT_EQ(oc.process(), 1.0f);
EXPECT_FLOAT_EQ(oc.voltage(), 1.1f);
@ -3083,12 +3088,12 @@ TEST_F(StaLibertyTest, TimingTypeIsCheck) {
// to_string(TimingSense)
TEST_F(StaLibertyTest, TimingSenseToString) {
const char *s = to_string(TimingSense::positive_unate);
EXPECT_NE(s, nullptr);
s = to_string(TimingSense::negative_unate);
EXPECT_NE(s, nullptr);
s = to_string(TimingSense::non_unate);
EXPECT_NE(s, nullptr);
const std::string &s1 = to_string(TimingSense::positive_unate);
EXPECT_FALSE(s1.empty());
const std::string &s2 = to_string(TimingSense::negative_unate);
EXPECT_FALSE(s2.empty());
const std::string &s3 = to_string(TimingSense::non_unate);
EXPECT_FALSE(s3.empty());
}
// timingSenseOpposite
@ -3101,9 +3106,9 @@ TEST_F(StaLibertyTest, TimingSenseOpposite) {
// ScaleFactorPvt names
TEST_F(StaLibertyTest, ScaleFactorPvtNames) {
EXPECT_STREQ(scaleFactorPvtName(ScaleFactorPvt::process), "process");
EXPECT_STREQ(scaleFactorPvtName(ScaleFactorPvt::volt), "volt");
EXPECT_STREQ(scaleFactorPvtName(ScaleFactorPvt::temp), "temp");
EXPECT_EQ(scaleFactorPvtName(ScaleFactorPvt::process), "process");
EXPECT_EQ(scaleFactorPvtName(ScaleFactorPvt::volt), "volt");
EXPECT_EQ(scaleFactorPvtName(ScaleFactorPvt::temp), "temp");
}
// findScaleFactorPvt
@ -3115,8 +3120,8 @@ TEST_F(StaLibertyTest, FindScaleFactorPvt) {
// ScaleFactorType names
TEST_F(StaLibertyTest, ScaleFactorTypeNames) {
const char *name = scaleFactorTypeName(ScaleFactorType::cell);
EXPECT_NE(name, nullptr);
const std::string &name = scaleFactorTypeName(ScaleFactorType::cell);
EXPECT_FALSE(name.empty());
}
// findScaleFactorType
@ -3397,16 +3402,16 @@ TEST_F(StaLibertyTest, PortScanSignalType2) {
// scanSignalTypeName
TEST_F(StaLibertyTest, ScanSignalTypeName) {
const char *name = scanSignalTypeName(ScanSignalType::enable);
EXPECT_NE(name, nullptr);
name = scanSignalTypeName(ScanSignalType::clock);
EXPECT_NE(name, nullptr);
const std::string &scan_name1 = scanSignalTypeName(ScanSignalType::enable);
EXPECT_FALSE(scan_name1.empty());
const std::string &scan_name2 = scanSignalTypeName(ScanSignalType::clock);
EXPECT_FALSE(scan_name2.empty());
}
// pwrGndTypeName and findPwrGndType
TEST_F(StaLibertyTest, PwrGndTypeName) {
const char *name = pwrGndTypeName(PwrGndType::primary_power);
EXPECT_NE(name, nullptr);
const std::string &pwr_name = pwrGndTypeName(PwrGndType::primary_power);
EXPECT_FALSE(pwr_name.empty());
PwrGndType t = findPwrGndType("primary_power");
EXPECT_EQ(t, PwrGndType::primary_power);
}

View File

@ -1522,8 +1522,8 @@ TEST_F(StaLibertyTest, LibertyStmtTypes) {
LibertyGroup grp("cell", std::move(params), 1);
EXPECT_EQ(grp.type(), "cell");
EXPECT_EQ(grp.line(), 1);
ASSERT_NE(grp.firstName(), nullptr);
EXPECT_STREQ(grp.firstName(), "TEST");
EXPECT_FALSE(grp.firstParam().empty());
EXPECT_EQ(grp.firstParam(), "TEST");
EXPECT_TRUE(grp.subgroups().empty());
}
@ -1532,8 +1532,8 @@ TEST_F(StaLibertyTest, LibertySimpleAttrIsComplex) {
LibertySimpleAttr attr("name", LibertyAttrValue(std::string("test")), 1);
EXPECT_EQ(attr.name(), "name");
EXPECT_EQ(attr.line(), 1);
ASSERT_NE(attr.stringValue(), nullptr);
EXPECT_EQ(*attr.stringValue(), "test");
EXPECT_FALSE(attr.stringValue().empty());
EXPECT_EQ(attr.stringValue(), "test");
EXPECT_TRUE(attr.value().isString());
}
@ -1545,7 +1545,7 @@ TEST_F(StaLibertyTest, LibertyComplexAttrIsSimple) {
LibertyComplexAttr attr("name", std::move(values), 1);
ASSERT_NE(attr.firstValue(), nullptr);
EXPECT_TRUE(attr.firstValue()->isFloat());
EXPECT_FLOAT_EQ(attr.firstValue()->floatValue(), 1.0f);
EXPECT_FLOAT_EQ(attr.firstValue()->floatValue().first, 1.0f);
EXPECT_EQ(attr.values().size(), 2u);
}
@ -1555,15 +1555,13 @@ TEST_F(StaLibertyTest, AttrValueCrossType) {
EXPECT_TRUE(sval.isString());
EXPECT_FALSE(sval.isFloat());
EXPECT_EQ(sval.stringValue(), "hello");
float parsed = 0.0f;
bool valid = true;
sval.floatValue(parsed, valid);
auto [parsed, valid] = sval.floatValue();
EXPECT_FALSE(valid);
LibertyAttrValue fval(3.14f);
EXPECT_FALSE(fval.isString());
EXPECT_TRUE(fval.isFloat());
EXPECT_FLOAT_EQ(fval.floatValue(), 3.14f);
EXPECT_FLOAT_EQ(fval.floatValue().first, 3.14f);
}
// R9_46: LibertyDefine isDefine
@ -3528,19 +3526,19 @@ TEST_F(StaLibertyTest, TimingGroupOutputWaveforms) {
// R11_1: timingTypeString - the free function in TimingArc.cc
// It is not declared in a public header, so we declare it extern here.
extern const char *timingTypeString(TimingType type);
extern std::string_view timingTypeString(TimingType type);
TEST_F(StaLibertyTest, TimingTypeString) {
// timingTypeString is defined in TimingArc.cc
// We test several timing types to cover the function
EXPECT_STREQ(timingTypeString(TimingType::combinational), "combinational");
EXPECT_STREQ(timingTypeString(TimingType::clear), "clear");
EXPECT_STREQ(timingTypeString(TimingType::rising_edge), "rising_edge");
EXPECT_STREQ(timingTypeString(TimingType::falling_edge), "falling_edge");
EXPECT_STREQ(timingTypeString(TimingType::setup_rising), "setup_rising");
EXPECT_STREQ(timingTypeString(TimingType::hold_falling), "hold_falling");
EXPECT_STREQ(timingTypeString(TimingType::three_state_enable), "three_state_enable");
EXPECT_STREQ(timingTypeString(TimingType::unknown), "unknown");
EXPECT_EQ(timingTypeString(TimingType::combinational), "combinational");
EXPECT_EQ(timingTypeString(TimingType::clear), "clear");
EXPECT_EQ(timingTypeString(TimingType::rising_edge), "rising_edge");
EXPECT_EQ(timingTypeString(TimingType::falling_edge), "falling_edge");
EXPECT_EQ(timingTypeString(TimingType::setup_rising), "setup_rising");
EXPECT_EQ(timingTypeString(TimingType::hold_falling), "hold_falling");
EXPECT_EQ(timingTypeString(TimingType::three_state_enable), "three_state_enable");
EXPECT_EQ(timingTypeString(TimingType::unknown), "unknown");
}
// R11_2: writeLiberty exercises LibertyWriter constructor, destructor,
@ -3604,8 +3602,8 @@ TEST_F(StaLibertyTest, LibertyParserDirect) {
EXPECT_EQ(visitor.complex_attrs.size(), 1u);
EXPECT_EQ(visitor.variables.size(), 1u);
ASSERT_NE(library->firstName(), nullptr);
EXPECT_STREQ(library->firstName(), "test_r11_parser");
EXPECT_FALSE(library->firstParam().empty());
EXPECT_EQ(library->firstParam(), "test_r11_parser");
EXPECT_EQ(library->defineMap().size(), 1u);
EXPECT_EQ(library->findSubgroup("cell"), cell);
float area = 0.0f;

View File

@ -140,7 +140,7 @@ TEST_F(NetworkAdapterTest, AdapterTopInstance) {
// NetworkNameAdapter: name(Library) forwarding
TEST_F(NetworkAdapterTest, AdapterLibraryName) {
EXPECT_STREQ(sdc_net_->name(lib_), "adapter_lib");
EXPECT_EQ(sdc_net_->name(lib_), "adapter_lib");
}
// NetworkNameAdapter: id(Library) forwarding
@ -198,7 +198,7 @@ TEST_F(NetworkAdapterTest, AdapterLibertyLibraryIterator) {
// NetworkNameAdapter: name(Cell) forwarding
TEST_F(NetworkAdapterTest, AdapterCellName) {
EXPECT_STREQ(sdc_net_->name(inv_cell_), "BUF");
EXPECT_EQ(sdc_net_->name(inv_cell_), "BUF");
}
// NetworkNameAdapter: id(Cell) forwarding
@ -229,8 +229,8 @@ TEST_F(NetworkAdapterTest, AdapterCellLibrary) {
// NetworkNameAdapter: filename(Cell) forwarding
TEST_F(NetworkAdapterTest, AdapterCellFilename) {
const char *fn = sdc_net_->filename(inv_cell_);
EXPECT_STREQ(fn, "adapter.lib");
std::string_view fn = sdc_net_->filename(inv_cell_);
EXPECT_EQ(fn, "adapter.lib");
}
// NetworkNameAdapter: findPort forwarding
@ -285,7 +285,7 @@ TEST_F(NetworkAdapterTest, AdapterPortBitCount) {
// NetworkNameAdapter: name(Port) forwarding
TEST_F(NetworkAdapterTest, AdapterPortName) {
EXPECT_STREQ(sdc_net_->name(port_a_), "A");
EXPECT_EQ(sdc_net_->name(port_a_), "A");
}
// NetworkNameAdapter: id(Port) forwarding
@ -324,9 +324,9 @@ TEST_F(NetworkAdapterTest, AdapterPortSize) {
// NetworkNameAdapter: busName(Port) scalar forwarding
TEST_F(NetworkAdapterTest, AdapterPortBusName) {
const char *bn = sdc_net_->busName(port_a_);
const std::string &bn = sdc_net_->busName(port_a_);
// Scalar port returns name (not nullptr) through SdcNetwork
EXPECT_NE(bn, nullptr);
EXPECT_FALSE(bn.empty());
}
// NetworkNameAdapter: fromIndex(Port) forwarding (scalar ports return -1)
@ -652,15 +652,15 @@ TEST_F(NetworkAdapterTest, SdcNetworkTopInstance) {
// SdcNetwork: name(Port) forwarding with sdc namespace
TEST_F(NetworkAdapterTest, SdcNetworkPortName) {
const char *name = sdc_net_->name(port_a_);
EXPECT_NE(name, nullptr);
const std::string &name = sdc_net_->name(port_a_);
EXPECT_FALSE(name.empty());
}
// SdcNetwork: busName(Port) forwarding
TEST_F(NetworkAdapterTest, SdcNetworkPortBusName) {
const char *bn = sdc_net_->busName(port_a_);
const std::string &bn = sdc_net_->busName(port_a_);
// SdcNetwork busName returns name for scalar port
EXPECT_NE(bn, nullptr);
EXPECT_FALSE(bn.empty());
}
// SdcNetwork: findPort forwarding
@ -685,38 +685,38 @@ TEST_F(NetworkAdapterTest, SdcNetworkFindNet) {
// SdcNetwork: name(Instance) forwarding
TEST_F(NetworkAdapterTest, SdcNetworkInstanceName) {
const char *name = sdc_net_->name(u1_);
EXPECT_NE(name, nullptr);
const std::string &name = sdc_net_->name(u1_);
EXPECT_FALSE(name.empty());
}
// SdcNetwork: pathName(Instance) forwarding
TEST_F(NetworkAdapterTest, SdcNetworkInstancePathName) {
const char *path = sdc_net_->pathName(u1_);
EXPECT_NE(path, nullptr);
const std::string &path = sdc_net_->pathName(u1_);
EXPECT_FALSE(path.empty());
}
// SdcNetwork: pathName(Pin) forwarding
TEST_F(NetworkAdapterTest, SdcNetworkPinPathName) {
const char *path = sdc_net_->pathName(pin_b1_a_);
EXPECT_NE(path, nullptr);
const std::string &path = sdc_net_->pathName(pin_b1_a_);
EXPECT_FALSE(path.empty());
}
// SdcNetwork: portName(Pin) forwarding
TEST_F(NetworkAdapterTest, SdcNetworkPinPortName) {
const char *port_name = sdc_net_->portName(pin_b1_a_);
EXPECT_NE(port_name, nullptr);
const std::string &port_name = sdc_net_->portName(pin_b1_a_);
EXPECT_FALSE(port_name.empty());
}
// SdcNetwork: name(Net) forwarding
TEST_F(NetworkAdapterTest, SdcNetworkNetName) {
const char *name = sdc_net_->name(net1_);
EXPECT_NE(name, nullptr);
const std::string &name = sdc_net_->name(net1_);
EXPECT_FALSE(name.empty());
}
// SdcNetwork: pathName(Net) forwarding
TEST_F(NetworkAdapterTest, SdcNetworkNetPathName) {
const char *path = sdc_net_->pathName(net1_);
EXPECT_NE(path, nullptr);
const std::string &path = sdc_net_->pathName(net1_);
EXPECT_FALSE(path.empty());
}
// SdcNetwork: findChild forwarding
@ -842,7 +842,7 @@ TEST_F(ConcreteNetworkLinkedTest, AddConstantAndIterate) {
TEST_F(ConcreteNetworkLinkedTest, ConcreteInstanceCell) {
Cell *cell = network_.cell(u1_);
EXPECT_NE(cell, nullptr);
EXPECT_STREQ(network_.name(cell), "INV");
EXPECT_EQ(network_.name(cell), "INV");
}
// ConcreteInstance: findChild returns nullptr on leaf
@ -894,17 +894,16 @@ TEST_F(ConcreteNetworkLinkedTest, SetCellViaReplace) {
network_.disconnectPin(pin_u1_y_);
network_.replaceCell(u1_, buf_cell);
Cell *new_cell = network_.cell(u1_);
EXPECT_STREQ(network_.name(new_cell), "BUF_R6");
EXPECT_EQ(network_.name(new_cell), "BUF_R6");
}
// ConcretePin: name() via Network base class
TEST_F(ConcreteNetworkLinkedTest, ConcretePinName) {
const Network &net = network_;
const char *name = net.name(pin_u1_a_);
EXPECT_NE(name, nullptr);
const std::string &name = net.name(pin_u1_a_);
EXPECT_FALSE(name.empty());
// Pin name is instance/port
std::string name_str(name);
EXPECT_NE(name_str.find("A"), std::string::npos);
EXPECT_NE(name.find("A"), std::string::npos);
}
// ConcretePin: setVertexId
@ -927,8 +926,8 @@ TEST_F(ConcreteNetworkLinkedTest, ConcreteTermName) {
Term *term = network_.makeTerm(pin, net);
EXPECT_NE(term, nullptr);
const Network &base_net = network_;
const char *tname = base_net.name(term);
EXPECT_NE(tname, nullptr);
const std::string &tname = base_net.name(term);
EXPECT_FALSE(tname.empty());
}
// Network: name(Term), pathName(Term), portName(Term)
@ -942,14 +941,14 @@ TEST_F(ConcreteNetworkLinkedTest, TermPathAndPortName) {
EXPECT_NE(term, nullptr);
const Network &base_net = network_;
const char *tname = base_net.name(term);
EXPECT_NE(tname, nullptr);
const std::string &tname = base_net.name(term);
EXPECT_FALSE(tname.empty());
const char *tpath = base_net.pathName(term);
EXPECT_NE(tpath, nullptr);
const std::string &tpath = base_net.pathName(term);
EXPECT_FALSE(tpath.empty());
const char *tport = base_net.portName(term);
EXPECT_NE(tport, nullptr);
const std::string &tport = base_net.portName(term);
EXPECT_FALSE(tport.empty());
}
// Network: id(Term)
@ -1480,9 +1479,9 @@ TEST_F(ConcreteNetworkLinkedTest, FindPinByPort3) {
// ConcretePin::name() - exercises the name() method on concrete pins
TEST_F(ConcreteNetworkLinkedTest, PinName2) {
const char *name = network_.name(network_.port(pin_u1_a_));
EXPECT_NE(name, nullptr);
EXPECT_STREQ(name, "A");
const std::string &name = network_.name(network_.port(pin_u1_a_));
EXPECT_FALSE(name.empty());
EXPECT_EQ(name, "A");
}
// ConcretePin::setVertexId - exercises via Network::setVertexId
@ -1635,9 +1634,9 @@ TEST_F(ConcreteNetworkLinkedTest, ReplaceCell2) {
network_.makePort(buf_cell, "A");
network_.makePort(buf_cell, "Y");
Instance *inst = network_.makeInstance(inv_cell, "r7_replace", network_.topInstance());
EXPECT_STREQ(network_.name(network_.cell(inst)), "INV");
EXPECT_EQ(network_.name(network_.cell(inst)), "INV");
network_.replaceCell(inst, buf_cell);
EXPECT_STREQ(network_.name(network_.cell(inst)), "R7_BUF");
EXPECT_EQ(network_.name(network_.cell(inst)), "R7_BUF");
}
// ConcreteInstance::addNet via makeNet and findNet on child instance
@ -1668,15 +1667,15 @@ TEST_F(NetworkAdapterTest, AdapterFindPortsMatching2) {
// NetworkNameAdapter: name(Port) forwarding
TEST_F(NetworkAdapterTest, AdapterPortName2) {
const char *name = sdc_net_->name(port_a_);
EXPECT_NE(name, nullptr);
EXPECT_STREQ(name, "A");
const std::string &name = sdc_net_->name(port_a_);
EXPECT_FALSE(name.empty());
EXPECT_EQ(name, "A");
}
// NetworkNameAdapter: busName(Port) forwarding
TEST_F(NetworkAdapterTest, AdapterPortBusName2) {
const char *bname = sdc_net_->busName(port_a_);
EXPECT_NE(bname, nullptr);
const std::string &bname = sdc_net_->busName(port_a_);
EXPECT_FALSE(bname.empty());
}
// R7_AdapterFindBusBit removed (segfault)
@ -1829,8 +1828,8 @@ TEST_F(ConcreteNetworkLinkedTest, NetInstance2) {
// Network: cellName convenience
TEST_F(ConcreteNetworkLinkedTest, CellNameConvenience) {
const char *name = network_.cellName(u2_);
EXPECT_STREQ(name, "INV");
const std::string &name = network_.cellName(u2_);
EXPECT_EQ(name, "INV");
}
// ConcreteNetwork: pin direction
@ -1972,7 +1971,7 @@ TEST_F(ConcreteNetworkLinkedTest, InstanceCell2) {
Cell *cell = network_.cell(u1_);
EXPECT_NE(cell, nullptr);
// Verify it's the INV cell
EXPECT_STREQ(network_.name(cell), "INV");
EXPECT_EQ(network_.name(cell), "INV");
}
// ConcreteInstance::findChild - exercise child lookup
@ -2331,14 +2330,14 @@ TEST_F(NetworkAdapterTest, AdapterFindPortsMatching3) {
// NetworkNameAdapter::name(Port*) forwarding
TEST_F(NetworkAdapterTest, AdapterPortNameForward) {
const char *name = sdc_net_->name(port_a_);
EXPECT_STREQ(name, "A");
const std::string &name = sdc_net_->name(port_a_);
EXPECT_EQ(name, "A");
}
// NetworkNameAdapter::busName(Port*) forwarding
TEST_F(NetworkAdapterTest, AdapterBusNameForward) {
const char *bname = sdc_net_->busName(port_a_);
EXPECT_STREQ(bname, "A"); // scalar port
const std::string &bname = sdc_net_->busName(port_a_);
EXPECT_EQ(bname, "A"); // scalar port
}
// R8_AdapterFindBusBit removed (segfault)
@ -2352,7 +2351,7 @@ TEST_F(NetworkAdapterTest, AdapterMakeNetForward) {
Instance *top = sdc_net_->topInstance();
Net *net = sdc_net_->makeNet("adapter_net_r8", top);
EXPECT_NE(net, nullptr);
EXPECT_STREQ(network_.name(net), "adapter_net_r8");
EXPECT_EQ(network_.name(net), "adapter_net_r8");
sdc_net_->deleteNet(net);
}
@ -2521,8 +2520,8 @@ TEST_F(ConcreteNetworkLinkedTest, ConnectedPinIteratorMultiPin) {
// NetworkNameAdapter: various forwarding methods
TEST_F(NetworkAdapterTest, AdapterCellName2) {
const char *name = sdc_net_->name(inv_cell_);
EXPECT_STREQ(name, "BUF");
const std::string &name = sdc_net_->name(inv_cell_);
EXPECT_EQ(name, "BUF");
}
TEST_F(NetworkAdapterTest, AdapterCellId2) {
@ -2665,11 +2664,11 @@ TEST_F(ConcreteNetworkLinkedTest, ClearAndRebuild) {
TEST_F(ConcreteNetworkLinkedTest, InstanceCellAccessor) {
Cell *cell = network_.cell(u1_);
ASSERT_NE(cell, nullptr);
EXPECT_STREQ(network_.name(cell), "INV");
EXPECT_EQ(network_.name(cell), "INV");
// Also test on top instance
Cell *top_cell = network_.cell(network_.topInstance());
ASSERT_NE(top_cell, nullptr);
EXPECT_STREQ(network_.name(top_cell), "TOP");
EXPECT_EQ(network_.name(top_cell), "TOP");
}
// R10_ ConcreteInstance: findChild via network interface
@ -2754,7 +2753,7 @@ TEST_F(ConcreteNetworkLinkedTest, SetCellOnInstance) {
// Replace cell of u1
network_.replaceCell(u1_, buf_cell);
Cell *new_cell = network_.cell(u1_);
EXPECT_STREQ(network_.name(new_cell), "BUF2");
EXPECT_EQ(network_.name(new_cell), "BUF2");
}
// R10_ ConcretePin: port name via port accessor
@ -2762,8 +2761,8 @@ TEST_F(ConcreteNetworkLinkedTest, SetCellOnInstance) {
TEST_F(ConcreteNetworkLinkedTest, PinPortName2) {
Port *port = network_.port(pin_u1_a_);
ASSERT_NE(port, nullptr);
const char *name = network_.name(port);
EXPECT_STREQ(name, "A");
const std::string &name = network_.name(port);
EXPECT_EQ(name, "A");
}
// R10_ ConcretePin: setVertexId
@ -3016,17 +3015,17 @@ TEST_F(NetworkAdapterTest, AdapterPortSize2) {
// R10_ NetworkAdapter: name(Port) forwarding
// Covers: NetworkNameAdapter::name(Port const*) const
TEST_F(NetworkAdapterTest, AdapterPortName3) {
const char *name = sdc_net_->name(port_a_);
EXPECT_STREQ(name, "A");
const std::string &name = sdc_net_->name(port_a_);
EXPECT_EQ(name, "A");
}
// R10_ NetworkAdapter: busName forwarding
// Covers: NetworkNameAdapter::busName(Port const*) const
TEST_F(NetworkAdapterTest, AdapterBusName) {
const char *name = sdc_net_->busName(port_a_);
// Scalar port busName may be nullptr or same as port name
if (name != nullptr) {
EXPECT_STREQ(name, "A");
const std::string &name = sdc_net_->busName(port_a_);
// Scalar port busName may be empty or same as port name
if (!name.empty()) {
EXPECT_EQ(name, "A");
}
}

View File

@ -127,7 +127,7 @@ protected:
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(5.0f);
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, "", sta_->cmdMode());
Pin *in1 = network->findPin(top, "in1");
Clock *clk = sta_->cmdSdc()->findClock("clk");
@ -173,7 +173,7 @@ TEST_F(SdcDesignTest, CycleAcctingSourceTargetCycle) {
FloatSeq *waveform2 = new FloatSeq;
waveform2->push_back(0.0f);
waveform2->push_back(2.5f);
sta_->makeClock("clk2", clk2_pins, false, 5.0f, waveform2, nullptr, sta_->cmdMode());
sta_->makeClock("clk2", clk2_pins, false, 5.0f, waveform2, "", sta_->cmdMode());
sta_->updateTiming(true);
// Forces CycleAccting to compute inter-clock accounting
}
@ -231,14 +231,14 @@ TEST_F(SdcInitTest, ExceptionFromHash) {
TEST_F(SdcInitTest, ExceptionPathMergeable) {
Sdc *sdc = sta_->cmdSdc();
FalsePath *fp1 = new FalsePath(nullptr, nullptr, nullptr,
MinMaxAll::all(), true, nullptr);
MinMaxAll::all(), true, "");
FalsePath *fp2 = new FalsePath(nullptr, nullptr, nullptr,
MinMaxAll::all(), true, nullptr);
MinMaxAll::all(), true, "");
bool m = fp1->mergeable(fp2);
EXPECT_TRUE(m);
// Different type should not be mergeable
PathDelay *pd = new PathDelay(nullptr, nullptr, nullptr,
MinMax::max(), false, false, 5.0, true, nullptr);
MinMax::max(), false, false, 5.0, true, "");
bool m2 = fp1->mergeable(pd);
EXPECT_FALSE(m2);
delete fp1;
@ -276,7 +276,7 @@ TEST_F(SdcInitTest, ExceptionFromToDestructor) {
TEST_F(SdcInitTest, ExceptionPathDestructor) {
ASSERT_NO_THROW(( [&](){
FalsePath *fp = new FalsePath(nullptr, nullptr, nullptr,
MinMaxAll::all(), true, nullptr);
MinMaxAll::all(), true, "");
delete fp;
}() ));
@ -335,7 +335,7 @@ TEST_F(SdcInitTest, ClockEdgeAccessors) {
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(5.0f);
sta_->makeClock("test_clk_edge", clk_pins, false, 10.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("test_clk_edge", clk_pins, false, 10.0f, waveform, "", sta_->cmdMode());
Clock *clk = sdc->findClock("test_clk_edge");
ASSERT_NE(clk, nullptr);
ClockEdge *rise_edge = clk->edge(RiseFall::rise());
@ -389,12 +389,12 @@ TEST_F(SdcInitTest, SdcInterClockUncertainty) {
FloatSeq *waveform1 = new FloatSeq;
waveform1->push_back(0.0f);
waveform1->push_back(5.0f);
sta_->makeClock("clk_a", pins1, false, 10.0f, waveform1, nullptr, sta_->cmdMode());
sta_->makeClock("clk_a", pins1, false, 10.0f, waveform1, "", sta_->cmdMode());
PinSet *pins2 = new PinSet(sta_->cmdNetwork());
FloatSeq *waveform2 = new FloatSeq;
waveform2->push_back(0.0f);
waveform2->push_back(2.5f);
sta_->makeClock("clk_b", pins2, false, 5.0f, waveform2, nullptr, sta_->cmdMode());
sta_->makeClock("clk_b", pins2, false, 5.0f, waveform2, "", sta_->cmdMode());
Clock *clk_a = sdc->findClock("clk_a");
Clock *clk_b = sdc->findClock("clk_b");
@ -413,7 +413,7 @@ TEST_F(SdcInitTest, SdcInterClockUncertainty) {
// --- Sdc: clearClkGroupExclusions (via removeClockGroupsLogicallyExclusive) ---
TEST_F(SdcInitTest, SdcClearClkGroupExclusions) {
ClockGroups *cg = sta_->makeClockGroups("grp_exc", true, false, false, false, nullptr, sta_->cmdSdc());
ClockGroups *cg = sta_->makeClockGroups("grp_exc", true, false, false, false, "", sta_->cmdSdc());
EXPECT_NE(cg, nullptr);
sta_->removeClockGroupsLogicallyExclusive("grp_exc", sta_->cmdSdc());
}
@ -437,7 +437,7 @@ TEST_F(SdcDesignTest, SdcFalsePathExercise) {
ExceptionTo *to = sta_->makeExceptionTo(to_pins, nullptr, nullptr,
RiseFallBoth::riseFall(),
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, to, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, to, MinMaxAll::all(), "", sta_->cmdSdc());
// Write SDC to exercise the path delay annotation
const char *fn = "/tmp/test_sdc_r10_falsepath_exercise.sdc";
sta_->writeSdc(sta_->cmdSdc(), fn, false, false, 4, false, true);
@ -483,7 +483,7 @@ TEST_F(SdcDesignTest, WriteSdcNative) {
}
TEST_F(SdcDesignTest, WriteSdcWithFalsePath) {
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
const char *filename = "/tmp/test_write_sdc_sdc_r10_fp.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
FILE *f = fopen(filename, "r");
@ -795,7 +795,7 @@ TEST_F(SdcDesignTest, WriteSdcWithClockInsertion) {
TEST_F(SdcDesignTest, WriteSdcWithMulticycle) {
sta_->makeMulticyclePath(nullptr, nullptr, nullptr,
MinMaxAll::max(), true, 2, nullptr, sta_->cmdSdc());
MinMaxAll::max(), true, 2, "", sta_->cmdSdc());
const char *filename = "/tmp/test_write_sdc_sdc_r10_mcp.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
FILE *f = fopen(filename, "r");
@ -845,7 +845,7 @@ TEST_F(SdcInitTest, SdcDeleteLatchBorrowLimits) {
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(5.0f);
sta_->makeClock("clk_borrow", clk_pins, false, 10.0f, waveform, nullptr, sta_->cmdMode());
sta_->makeClock("clk_borrow", clk_pins, false, 10.0f, waveform, "", sta_->cmdMode());
Clock *clk = sdc->findClock("clk_borrow");
ASSERT_NE(clk, nullptr);
// Set latch borrow limit on clock
@ -1173,7 +1173,7 @@ TEST_F(SdcDesignTest, ClockAccessors) {
Sdc *sdc = sta_->cmdSdc();
Clock *clk = sdc->findClock("clk");
ASSERT_NE(clk, nullptr);
EXPECT_STREQ(clk->name(), "clk");
EXPECT_EQ(clk->name(), "clk");
EXPECT_FLOAT_EQ(clk->period(), 10.0f);
const FloatSeq *wave = clk->waveform();
ASSERT_NE(wave, nullptr);
@ -1351,7 +1351,7 @@ TEST_F(SdcDesignTest, SdcClocksList) {
const ClockSeq &clks = sdc->clocks();
EXPECT_GT(clks.size(), 0u);
for (Clock *c : clks) {
EXPECT_NE(c->name(), nullptr);
EXPECT_FALSE(c->name().empty());
}
}
@ -1515,11 +1515,11 @@ TEST_F(SdcDesignTest, WriteSdcWithClockGroupsMembers) {
FloatSeq *waveform2 = new FloatSeq;
waveform2->push_back(0.0f);
waveform2->push_back(2.5f);
sta_->makeClock("clk2", clk2_pins, false, 5.0f, waveform2, nullptr, sta_->cmdMode());
sta_->makeClock("clk2", clk2_pins, false, 5.0f, waveform2, "", sta_->cmdMode());
Clock *clk2 = sdc->findClock("clk2");
if (clk2) {
ClockGroups *cg = sta_->makeClockGroups("grp1", true, false, false,
false, nullptr, sta_->cmdSdc());
false, "", sta_->cmdSdc());
ClockSet *group1 = new ClockSet;
group1->insert(clk);
sta_->makeClockGroup(cg, group1, sta_->cmdSdc());
@ -1568,7 +1568,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathFromThruTo) {
ExceptionTo *to = sta_->makeExceptionTo(to_pins, nullptr, nullptr,
RiseFallBoth::riseFall(),
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makeFalsePath(from, thrus, to, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, thrus, to, MinMaxAll::all(), "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_fp_fromthru.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1591,7 +1591,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathThruNet) {
ExceptionThru *thru = sta_->makeExceptionThru(nullptr, nets, nullptr,
RiseFallBoth::riseFall(), sta_->cmdSdc());
thrus->push_back(thru);
sta_->makeFalsePath(nullptr, thrus, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, thrus, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
delete net_iter;
const char *filename = "/tmp/test_sdc_r11_fp_thrunet.sdc";
@ -1610,7 +1610,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathFromClock) {
from_clks->insert(clk);
ExceptionFrom *from = sta_->makeExceptionFrom(nullptr, from_clks, nullptr,
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_fp_fromclk.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1631,7 +1631,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathFromInstance) {
from_insts->insert(inst);
ExceptionFrom *from = sta_->makeExceptionFrom(nullptr, nullptr, from_insts,
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
delete iter;
const char *filename = "/tmp/test_sdc_r11_fp_frominst.sdc";
@ -1653,7 +1653,7 @@ TEST_F(SdcDesignTest, WriteSdcMulticycleWithFrom) {
ExceptionFrom *from = sta_->makeExceptionFrom(from_pins, nullptr, nullptr,
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makeMulticyclePath(from, nullptr, nullptr,
MinMaxAll::max(), true, 3, nullptr, sta_->cmdSdc());
MinMaxAll::max(), true, 3, "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_mcp_from.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1680,7 +1680,7 @@ TEST_F(SdcDesignTest, WriteSdcPathDelay) {
RiseFallBoth::riseFall(),
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makePathDelay(from, nullptr, to, MinMax::max(), false, false,
5.0f, nullptr, sta_->cmdSdc());
5.0f, "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_pathdelay.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1700,7 +1700,7 @@ TEST_F(SdcDesignTest, WriteSdcGroupPath) {
from_pins->insert(in1);
ExceptionFrom *from = sta_->makeExceptionFrom(from_pins, nullptr, nullptr,
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makeGroupPath("mygroup", false, from, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("mygroup", false, from, nullptr, nullptr, "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_grouppath.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1805,7 +1805,7 @@ TEST_F(SdcDesignTest, SdcConnectedCapNet) {
// --- ExceptionPath::mergeable ---
TEST_F(SdcDesignTest, ExceptionPathMergeable) {
// Create two false paths and check mergeability
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
Sdc *sdc = sta_->cmdSdc();
const ExceptionPathSet &exceptions = sdc->exceptions();
ExceptionPath *first = nullptr;
@ -1855,7 +1855,7 @@ TEST_F(SdcDesignTest, WriteSdcMinDelay) {
RiseFallBoth::riseFall(),
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makePathDelay(from, nullptr, to, MinMax::min(), false, false,
1.0f, nullptr, sta_->cmdSdc());
1.0f, "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_mindelay.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1868,7 +1868,7 @@ TEST_F(SdcDesignTest, WriteSdcMinDelay) {
// (triggers the hold branch in writeExceptionCmd) ---
TEST_F(SdcDesignTest, WriteSdcMulticycleHold) {
sta_->makeMulticyclePath(nullptr, nullptr, nullptr,
MinMaxAll::min(), true, 0, nullptr, sta_->cmdSdc());
MinMaxAll::min(), true, 0, "", sta_->cmdSdc());
const char *filename = "/tmp/test_sdc_r11_mcp_hold.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
FILE *f = fopen(filename, "r");
@ -1880,7 +1880,7 @@ TEST_F(SdcDesignTest, WriteSdcMulticycleHold) {
// (triggers the start branch in writeExceptionCmd) ---
TEST_F(SdcDesignTest, WriteSdcMulticycleStart) {
sta_->makeMulticyclePath(nullptr, nullptr, nullptr,
MinMaxAll::max(), false, 2, nullptr, sta_->cmdSdc());
MinMaxAll::max(), false, 2, "", sta_->cmdSdc());
const char *filename = "/tmp/test_sdc_r11_mcp_start.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
FILE *f = fopen(filename, "r");
@ -1891,7 +1891,7 @@ TEST_F(SdcDesignTest, WriteSdcMulticycleStart) {
// --- WriteSdc with group path default
// (triggers isDefault branch in writeExceptionCmd) ---
TEST_F(SdcDesignTest, WriteSdcGroupPathDefault) {
sta_->makeGroupPath("", true, nullptr, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("", true, nullptr, nullptr, nullptr, "", sta_->cmdSdc());
const char *filename = "/tmp/test_sdc_r11_grppath_default.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
FILE *f = fopen(filename, "r");
@ -1910,7 +1910,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathRiseFrom) {
from_pins->insert(in1);
ExceptionFrom *from = sta_->makeExceptionFrom(from_pins, nullptr, nullptr,
RiseFallBoth::rise(), sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_fp_risefrom.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1930,7 +1930,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathFallFrom) {
from_pins->insert(in1);
ExceptionFrom *from = sta_->makeExceptionFrom(from_pins, nullptr, nullptr,
RiseFallBoth::fall(), sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_fp_fallfrom.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1943,7 +1943,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathFallFrom) {
// (triggers the ignoreClkLatency branch) ---
TEST_F(SdcDesignTest, WriteSdcPathDelayIgnoreClkLat) {
sta_->makePathDelay(nullptr, nullptr, nullptr, MinMax::max(), true, false,
8.0f, nullptr, sta_->cmdSdc());
8.0f, "", sta_->cmdSdc());
const char *filename = "/tmp/test_sdc_r11_pathdelay_ignoreclk.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
FILE *f = fopen(filename, "r");
@ -1963,7 +1963,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathToRise) {
ExceptionTo *to = sta_->makeExceptionTo(to_pins, nullptr, nullptr,
RiseFallBoth::riseFall(),
RiseFallBoth::rise(), sta_->cmdSdc());
sta_->makeFalsePath(nullptr, nullptr, to, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, nullptr, to, MinMaxAll::all(), "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_fp_torise.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -1984,7 +1984,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathMultiFrom) {
from_pins->insert(in2);
ExceptionFrom *from = sta_->makeExceptionFrom(from_pins, nullptr, nullptr,
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_fp_multifrom.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
@ -2242,7 +2242,7 @@ TEST_F(SdcDesignTest, WriteSdcMegaComprehensive) {
// Clock groups
if (clk) {
ClockGroups *cg = sta_->makeClockGroups("mega_grp", false, true, false,
false, nullptr, sta_->cmdSdc());
false, "", sta_->cmdSdc());
ClockSet *g1 = new ClockSet;
g1->insert(clk);
sta_->makeClockGroup(cg, g1, sta_->cmdSdc());
@ -2270,7 +2270,7 @@ TEST_F(SdcDesignTest, WriteSdcMegaComprehensive) {
ExceptionTo *to = sta_->makeExceptionTo(to_pins, nullptr, nullptr,
RiseFallBoth::riseFall(),
RiseFallBoth::rise(), sta_->cmdSdc());
sta_->makeFalsePath(from, thrus, to, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, thrus, to, MinMaxAll::all(), "", sta_->cmdSdc());
}
// Max/min delay
@ -2285,15 +2285,15 @@ TEST_F(SdcDesignTest, WriteSdcMegaComprehensive) {
RiseFallBoth::riseFall(),
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makePathDelay(from, nullptr, to, MinMax::max(), true, false,
6.0f, nullptr, sta_->cmdSdc());
6.0f, "", sta_->cmdSdc());
}
// Multicycle
sta_->makeMulticyclePath(nullptr, nullptr, nullptr,
MinMaxAll::max(), false, 4, nullptr, sta_->cmdSdc());
MinMaxAll::max(), false, 4, "", sta_->cmdSdc());
// Group path
sta_->makeGroupPath("mega", false, nullptr, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("mega", false, nullptr, nullptr, nullptr, "", sta_->cmdSdc());
// Clock gating check
sta_->setClockGatingCheck(RiseFallBoth::riseFall(), MinMax::max(), 0.15f, sta_->cmdSdc());
@ -2343,7 +2343,7 @@ TEST_F(SdcDesignTest, SdcRemoveClockGroups) {
Clock *clk = sdc->findClock("clk");
if (clk) {
ClockGroups *cg = sta_->makeClockGroups("rm_grp", true, false, false,
false, nullptr, sta_->cmdSdc());
false, "", sta_->cmdSdc());
ClockSet *g1 = new ClockSet;
g1->insert(clk);
sta_->makeClockGroup(cg, g1, sta_->cmdSdc());
@ -2361,7 +2361,7 @@ TEST_F(SdcDesignTest, SdcRemovePhysExclClkGroups) {
Clock *clk = sdc->findClock("clk");
if (clk) {
ClockGroups *cg = sta_->makeClockGroups("phys_grp", false, true, false,
false, nullptr, sta_->cmdSdc());
false, "", sta_->cmdSdc());
ClockSet *g1 = new ClockSet;
g1->insert(clk);
sta_->makeClockGroup(cg, g1, sta_->cmdSdc());
@ -2378,7 +2378,7 @@ TEST_F(SdcDesignTest, SdcRemoveAsyncClkGroups) {
Clock *clk = sdc->findClock("clk");
if (clk) {
ClockGroups *cg = sta_->makeClockGroups("async_grp", false, false, true,
false, nullptr, sta_->cmdSdc());
false, "", sta_->cmdSdc());
ClockSet *g1 = new ClockSet;
g1->insert(clk);
sta_->makeClockGroup(cg, g1, sta_->cmdSdc());
@ -2419,8 +2419,8 @@ TEST_F(SdcDesignTest, ExceptionFromMatching) {
ExceptionFrom *from2 = sta_->makeExceptionFrom(pins2, nullptr, nullptr,
RiseFallBoth::riseFall(), sta_->cmdSdc());
// Make false paths - internally triggers findHash
sta_->makeFalsePath(from1, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from2, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from1, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
sta_->makeFalsePath(from2, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
}() ));
@ -2581,7 +2581,7 @@ TEST_F(SdcDesignTest, SdcCapLimitPin) {
// --- WriteSdc with set_false_path -hold only
// (triggers writeSetupHoldFlag for hold) ---
TEST_F(SdcDesignTest, WriteSdcFalsePathHold) {
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::min(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::min(), "", sta_->cmdSdc());
const char *filename = "/tmp/test_sdc_r11_fp_hold.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
std::string text = readTextFile(filename);
@ -2592,7 +2592,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathHold) {
// --- WriteSdc with set_false_path -setup only
// (triggers writeSetupHoldFlag for setup) ---
TEST_F(SdcDesignTest, WriteSdcFalsePathSetup) {
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::max(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::max(), "", sta_->cmdSdc());
const char *filename = "/tmp/test_sdc_r11_fp_setup.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);
std::string text = readTextFile(filename);
@ -2613,7 +2613,7 @@ TEST_F(SdcDesignTest, WriteSdcFalsePathRiseThru) {
ExceptionThru *thru = sta_->makeExceptionThru(thru_pins, nullptr, nullptr,
RiseFallBoth::rise(), sta_->cmdSdc());
thrus->push_back(thru);
sta_->makeFalsePath(nullptr, thrus, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, thrus, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
const char *filename = "/tmp/test_sdc_r11_fp_risethru.sdc";
sta_->writeSdc(sta_->cmdSdc(), filename, false, false, 4, false, true);

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ group_path_names = grp_io grp_reg2reg
is_path_group_name grp_reg2reg = 1
is_path_group_name nonexistent = 0
filter_ports direction == input: 5
filter_clocks period == 10: 0
filter_clocks is_virtual == 0: 2
filter_lib_cells is_buffer: 9
filter_insts ref_name =~ BUF*: 1
filter_pins direction == input: 1

View File

@ -138,32 +138,32 @@ puts "is_path_group_name nonexistent = $is_gp"
# filter_ports
set all_ports [get_ports *]
set filtered [sta::filter_ports direction == input $all_ports]
set filtered [sta::filter_ports "direction==input" $all_ports 0]
puts "filter_ports direction == input: [llength $filtered]"
# filter_clocks
set all_clks [get_clocks *]
set filtered [sta::filter_clocks period == 10.000 $all_clks]
puts "filter_clocks period == 10: [llength $filtered]"
set filtered [sta::filter_clocks "is_virtual==0" $all_clks 1]
puts "filter_clocks is_virtual == 0: [llength $filtered]"
# filter_lib_cells
set all_cells [get_lib_cells NangateOpenCellLibrary/*]
set filtered [sta::filter_lib_cells is_buffer == 1 $all_cells]
set filtered [sta::filter_lib_cells "is_buffer==1" $all_cells 1]
puts "filter_lib_cells is_buffer: [llength $filtered]"
# filter_insts
set all_insts [get_cells *]
set filtered [sta::filter_insts ref_name =~ "BUF*" $all_insts]
set filtered [sta::filter_insts "ref_name=~BUF*" $all_insts 0]
puts "filter_insts ref_name =~ BUF*: [llength $filtered]"
# filter_pins
set all_pins [get_pins buf1/*]
set filtered [sta::filter_pins direction == input $all_pins]
set filtered [sta::filter_pins "direction==input" $all_pins 0]
puts "filter_pins direction == input: [llength $filtered]"
# filter_nets
set all_nets [get_nets *]
set filtered [sta::filter_nets full_name =~ n* $all_nets]
set filtered [sta::filter_nets "full_name=~n*" $all_nets 0]
puts "filter_nets full_name =~ n*: [llength $filtered]"
############################################################

View File

@ -1,3 +1,3 @@
Differences found at line 7.
(VERSION "2.7.0")
(VERSION "3.0.1")
(VERSION "3.1.0")

View File

@ -52,7 +52,7 @@ protected:
waveform->push_back(0.0f);
waveform->push_back(5.0f);
Sdc *sdc = sta_->cmdSdc();
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, nullptr,
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, "",
sta_->cmdMode());
Clock *clk = sdc->findClock("clk");
@ -441,7 +441,7 @@ TEST_F(IncrementalTimingTest, ClockConstraintAfterEdit) {
FloatSeq *tight_waveform = new FloatSeq;
tight_waveform->push_back(0.0f);
tight_waveform->push_back(1.0f); // 2ns period
sta_->makeClock("clk", clk_pins, false, 2.0f, tight_waveform, nullptr,
sta_->makeClock("clk", clk_pins, false, 2.0f, tight_waveform, "",
sta_->cmdMode());
Slack tight_slack = sta_->worstSlack(MinMax::max());
@ -455,7 +455,7 @@ TEST_F(IncrementalTimingTest, ClockConstraintAfterEdit) {
FloatSeq *loose_waveform = new FloatSeq;
loose_waveform->push_back(0.0f);
loose_waveform->push_back(50.0f); // 100ns period
sta_->makeClock("clk", clk_pins2, false, 100.0f, loose_waveform, nullptr,
sta_->makeClock("clk", clk_pins2, false, 100.0f, loose_waveform, "",
sta_->cmdMode());
Slack loose_slack = sta_->worstSlack(MinMax::max());
@ -1023,7 +1023,7 @@ TEST_F(IncrementalTimingTest, TnsUpdatesIncrementally) {
FloatSeq *tight_waveform = new FloatSeq;
tight_waveform->push_back(0.0f);
tight_waveform->push_back(0.2f); // 0.4ns period (very tight)
sta_->makeClock("clk", clk_pins, false, 0.4f, tight_waveform, nullptr,
sta_->makeClock("clk", clk_pins, false, 0.4f, tight_waveform, "",
sta_->cmdMode());
Slack tight_tns = sta_->totalNegativeSlack(MinMax::max());
@ -1447,7 +1447,7 @@ TEST_F(IncrementalTimingTest, EndpointViolationCountChanges) {
FloatSeq *tight_waveform = new FloatSeq;
tight_waveform->push_back(0.0f);
tight_waveform->push_back(0.1f); // 0.2ns period
sta_->makeClock("clk", clk_pins, false, 0.2f, tight_waveform, nullptr,
sta_->makeClock("clk", clk_pins, false, 0.2f, tight_waveform, "",
sta_->cmdMode());
int tight_violations = sta_->endpointViolationCount(MinMax::max());
@ -1460,7 +1460,7 @@ TEST_F(IncrementalTimingTest, EndpointViolationCountChanges) {
FloatSeq *loose_waveform = new FloatSeq;
loose_waveform->push_back(0.0f);
loose_waveform->push_back(50.0f);
sta_->makeClock("clk", clk_pins2, false, 100.0f, loose_waveform, nullptr,
sta_->makeClock("clk", clk_pins2, false, 100.0f, loose_waveform, "",
sta_->cmdMode());
int loose_violations = sta_->endpointViolationCount(MinMax::max());

View File

@ -159,7 +159,7 @@ protected:
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(5.0f);
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, nullptr,
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, "",
sta_->cmdMode());
// Set input delays

View File

@ -161,7 +161,7 @@ protected:
FloatSeq *waveform = new FloatSeq;
waveform->push_back(0.0f);
waveform->push_back(5.0f);
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, nullptr,
sta_->makeClock("clk", clk_pins, false, 10.0f, waveform, "",
sta_->cmdMode());
// Set input delays
@ -1491,9 +1491,9 @@ TEST_F(StaDesignTest, PropertyValueConstructors) {
PropertyValue pv1;
EXPECT_EQ(pv1.type(), PropertyValue::Type::none);
PropertyValue pv2("test");
PropertyValue pv2(std::string("test"));
EXPECT_EQ(pv2.type(), PropertyValue::Type::string);
EXPECT_STREQ(pv2.stringValue(), "test");
EXPECT_EQ(pv2.stringValue(), "test");
PropertyValue pv3(true);
EXPECT_EQ(pv3.type(), PropertyValue::Type::bool_);
@ -1647,7 +1647,7 @@ TEST_F(StaDesignTest, PropertyUnknownException) {
TEST_F(StaDesignTest, PropertyTypeWrongException) {
// Cover PropertyTypeWrong constructor and what()
PropertyValue pv("test_string");
PropertyValue pv(std::string("test_string"));
EXPECT_EQ(pv.type(), PropertyValue::Type::string);
try {
float val = pv.floatValue();
@ -1837,7 +1837,7 @@ TEST_F(StaDesignTest, PathEndUnconstrainedMethods) {
TEST_F(StaDesignTest, PathEndPathDelay) {
sta_->makePathDelay(nullptr, nullptr, nullptr,
MinMax::max(), false, false, 5.0, nullptr,
MinMax::max(), false, false, 5.0, "",
sta_->cmdSdc());
sta_->updateTiming(true);
const SceneSeq &corners = sta_->scenes();
@ -2248,7 +2248,7 @@ TEST_F(StaDesignTest, WriteSdcWithConstraints) {
false, false, MinMaxAll::all(), true, 2.0f,
sta_->cmdSdc());
}
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), nullptr,
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), "",
sta_->cmdSdc());
if (out) {
@ -2454,7 +2454,7 @@ TEST_F(StaDesignTest, ReportPathEndShorter) {
TEST_F(StaDesignTest, WriteSdcWithClockGroups) {
Clock *clk = sta_->cmdSdc()->findClock("clk");
if (clk) {
ClockGroups *cg = sta_->makeClockGroups("test_group", true, false, false, false, nullptr, sta_->cmdSdc());
ClockGroups *cg = sta_->makeClockGroups("test_group", true, false, false, false, "", sta_->cmdSdc());
EXPECT_NE(cg, nullptr);
sta_->updateTiming(true);
std::string filename = makeUniqueSdcPath("test_write_sdc_r10_clkgrp.sdc");
@ -2984,7 +2984,7 @@ TEST_F(StaDesignTest, MakeGeneratedClock) {
divide_by->push_back(2);
FloatSeq *edges = nullptr;
sta_->makeGeneratedClock("gen_clk", gen_pins, false, clk2, clk,
2, 0, 0.0, false, false, divide_by, edges, nullptr,
2, 0, 0.0, false, false, divide_by, edges, "",
sta_->cmdMode());
Clock *gen = sdc->findClock("gen_clk");
EXPECT_NE(gen, nullptr);
@ -3995,7 +3995,7 @@ TEST_F(StaDesignTest, WriteSdcComprehensive) {
thrus->push_back(thru);
}
delete nit;
sta_->makeFalsePath(from, thrus, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(from, thrus, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
// Max delay
@ -4010,13 +4010,13 @@ TEST_F(StaDesignTest, WriteSdcComprehensive) {
RiseFallBoth::riseFall(),
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makePathDelay(from, nullptr, to, MinMax::max(), false, false,
7.0f, nullptr, sta_->cmdSdc());
7.0f, "", sta_->cmdSdc());
}
// Clock groups with actual clocks
if (clk) {
ClockGroups *cg = sta_->makeClockGroups("search_grp", true, false, false,
false, nullptr, sta_->cmdSdc());
false, "", sta_->cmdSdc());
ClockSet *g1 = new ClockSet;
g1->insert(clk);
sta_->makeClockGroup(cg, g1, sta_->cmdSdc());
@ -4024,10 +4024,10 @@ TEST_F(StaDesignTest, WriteSdcComprehensive) {
// Multicycle
sta_->makeMulticyclePath(nullptr, nullptr, nullptr,
MinMaxAll::max(), true, 2, nullptr, sta_->cmdSdc());
MinMaxAll::max(), true, 2, "", sta_->cmdSdc());
// Group path
sta_->makeGroupPath("search_group", false, nullptr, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("search_group", false, nullptr, nullptr, nullptr, "", sta_->cmdSdc());
// Voltage
sta_->setVoltage(MinMax::max(), 1.1f, sta_->cmdSdc());
@ -4194,7 +4194,7 @@ TEST_F(StaDesignTest, FindPathEndsUnconstrained3) {
TEST_F(StaDesignTest, FindPathEndsGroupFilter) {
ASSERT_NO_THROW(( [&](){
// Create a group path first
sta_->makeGroupPath("r11_grp", false, nullptr, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("r11_grp", false, nullptr, nullptr, nullptr, "", sta_->cmdSdc());
Scene *corner = sta_->cmdScene();
PathEndSeq ends = sta_->findPathEnds(
@ -4208,7 +4208,7 @@ TEST_F(StaDesignTest, FindPathEndsGroupFilter) {
// --- Sta: pathGroupNames ---
TEST_F(StaDesignTest, PathGroupNames) {
sta_->makeGroupPath("test_group_r11", false, nullptr, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("test_group_r11", false, nullptr, nullptr, nullptr, "", sta_->cmdSdc());
StringSeq names = sta_->pathGroupNames(sta_->cmdSdc());
bool found = false;
for (const auto &name : names) {
@ -4220,7 +4220,7 @@ TEST_F(StaDesignTest, PathGroupNames) {
// --- Sta: isPathGroupName ---
TEST_F(StaDesignTest, IsPathGroupName) {
sta_->makeGroupPath("test_pg_r11", false, nullptr, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("test_pg_r11", false, nullptr, nullptr, nullptr, "", sta_->cmdSdc());
bool is_group = sta_->isPathGroupName("test_pg_r11", sta_->cmdSdc());
EXPECT_TRUE(is_group);
bool not_group = sta_->isPathGroupName("nonexistent_group", sta_->cmdSdc());
@ -4245,7 +4245,7 @@ TEST_F(StaDesignTest, ReportPathWithMaxDelay) {
RiseFallBoth::riseFall(),
RiseFallBoth::riseFall(), sta_->cmdSdc());
sta_->makePathDelay(from, nullptr, to, MinMax::max(), false, false,
8.0f, nullptr, sta_->cmdSdc());
8.0f, "", sta_->cmdSdc());
sta_->updateTiming(true);
Scene *corner = sta_->cmdScene();

View File

@ -1156,12 +1156,12 @@ TEST_F(StaInitTest, MakeClockWithComment) {
// Make false path exercises ExceptionPath creation in Sta.cc
TEST_F(StaInitTest, MakeFalsePath) {
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
}
// Make group path
TEST_F(StaInitTest, MakeGroupPath) {
sta_->makeGroupPath("test_grp", false, nullptr, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("test_grp", false, nullptr, nullptr, nullptr, "", sta_->cmdSdc());
EXPECT_TRUE(sta_->isPathGroupName("test_grp", sta_->cmdSdc()));
}
@ -1172,7 +1172,7 @@ TEST_F(StaInitTest, MakePathDelay) {
false, // ignore_clk_latency
false, // break_path
5.0, // delay
nullptr, sta_->cmdSdc());
"", sta_->cmdSdc());
}
@ -1182,7 +1182,7 @@ TEST_F(StaInitTest, MakeMulticyclePath) {
MinMaxAll::max(),
true, // use_end_clk
2, // path_multiplier
nullptr, sta_->cmdSdc());
"", sta_->cmdSdc());
}
@ -1775,7 +1775,7 @@ TEST_F(StaInitTest, PropertyValueUnitGetter) {
}
TEST_F(StaInitTest, PropertyValueToStringBasic) {
PropertyValue pv_str("hello");
PropertyValue pv_str(std::string("hello"));
Network *network = sta_->network();
std::string result = pv_str.to_string(network);
EXPECT_EQ(result, "hello");
@ -2067,10 +2067,10 @@ TEST_F(StaInitTest, PathLessComparator) {
// PathGroup static names
TEST_F(StaInitTest, PathGroupsStaticNames) {
EXPECT_NE(PathGroups::asyncPathGroupName(), nullptr);
EXPECT_NE(PathGroups::pathDelayGroupName(), nullptr);
EXPECT_NE(PathGroups::gatedClkGroupName(), nullptr);
EXPECT_NE(PathGroups::unconstrainedGroupName(), nullptr);
EXPECT_FALSE(PathGroups::asyncPathGroupName().empty());
EXPECT_FALSE(PathGroups::pathDelayGroupName().empty());
EXPECT_FALSE(PathGroups::gatedClkGroupName().empty());
EXPECT_FALSE(PathGroups::unconstrainedGroupName().empty());
}
TEST_F(StaInitTest, PathGroupMaxPathsDefault) {
@ -2758,7 +2758,7 @@ TEST_F(StaInitTest, StaWorstSlackSingleValue) {
TEST_F(StaInitTest, StaMakeClockGroupsAndRemove) {
ClockGroups *cg = sta_->makeClockGroups("test_cg",
true, false, false,
false, nullptr, sta_->cmdSdc());
false, "", sta_->cmdSdc());
EXPECT_NE(cg, nullptr);
sta_->removeClockGroupsLogicallyExclusive("test_cg", sta_->cmdSdc());
}
@ -3455,7 +3455,7 @@ TEST_F(StaInitTest, StaDelaysInvalid) {
// --- Sta.cc: clock groups ---
TEST_F(StaInitTest, StaMakeClockGroupsDetailed) {
ClockGroups *groups = sta_->makeClockGroups("test_group",
true, false, false, false, nullptr, sta_->cmdSdc());
true, false, false, false, "", sta_->cmdSdc());
EXPECT_NE(groups, nullptr);
}
@ -3741,7 +3741,7 @@ TEST_F(StaInitTest, GraphLoopEmpty) {
// --- Sta.cc: makeFalsePath ---
TEST_F(StaInitTest, StaMakeFalsePath) {
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), nullptr, sta_->cmdSdc());
sta_->makeFalsePath(nullptr, nullptr, nullptr, MinMaxAll::all(), "", sta_->cmdSdc());
// No crash (with all null args)
@ -3749,7 +3749,7 @@ TEST_F(StaInitTest, StaMakeFalsePath) {
// --- Sta.cc: makeMulticyclePath ---
TEST_F(StaInitTest, StaMakeMulticyclePath) {
sta_->makeMulticyclePath(nullptr, nullptr, nullptr, MinMaxAll::all(), false, 2, nullptr, sta_->cmdSdc());
sta_->makeMulticyclePath(nullptr, nullptr, nullptr, MinMaxAll::all(), false, 2, "", sta_->cmdSdc());
// No crash
}
@ -3763,7 +3763,7 @@ TEST_F(StaInitTest, StaResetPath) {
// --- Sta.cc: makeGroupPath ---
TEST_F(StaInitTest, StaMakeGroupPath) {
sta_->makeGroupPath("test_group", false, nullptr, nullptr, nullptr, nullptr, sta_->cmdSdc());
sta_->makeGroupPath("test_group", false, nullptr, nullptr, nullptr, "", sta_->cmdSdc());
// No crash
}
@ -3802,8 +3802,8 @@ TEST_F(StaInitTest, LogicValueStringOne) {
// --- ReportPath.cc: ReportField constructor and setEnabled ---
TEST_F(StaInitTest, ReportFieldConstruct) {
ReportField rf("test_field", "Test Field", 10, false, nullptr, true);
EXPECT_STREQ(rf.name(), "test_field");
EXPECT_STREQ(rf.title(), "Test Field");
EXPECT_EQ(rf.name(), "test_field");
EXPECT_EQ(rf.title(), "Test Field");
EXPECT_EQ(rf.width(), 10);
EXPECT_FALSE(rf.leftJustify());
EXPECT_EQ(rf.unit(), nullptr);
@ -3829,15 +3829,15 @@ TEST_F(StaInitTest, ReportFieldSetWidth) {
TEST_F(StaInitTest, ReportFieldSetProperties) {
ReportField rf("f3", "F3", 5, false, nullptr, true);
rf.setProperties("New Title", 20, true);
EXPECT_STREQ(rf.title(), "New Title");
EXPECT_EQ(rf.title(), "New Title");
EXPECT_EQ(rf.width(), 20);
EXPECT_TRUE(rf.leftJustify());
}
TEST_F(StaInitTest, ReportFieldBlank) {
ReportField rf("f4", "F4", 3, false, nullptr, true);
const char *blank = rf.blank();
EXPECT_NE(blank, nullptr);
const std::string &blank = rf.blank();
EXPECT_FALSE(blank.empty());
}
// --- Sta.cc: idealClockMode is protected, test via public API ---
@ -4117,7 +4117,7 @@ TEST_F(StaInitTest, PropertiesGetPropertyLibraryExists) {
TEST_F(StaInitTest, PropertiesGetPropertyCellExists) {
// getProperty(Cell*) segfaults on nullptr - verify method exists via function pointer
using FnType = PropertyValue (Properties::*)(const Cell*, const std::string&);
using FnType = PropertyValue (Properties::*)(const Cell*, std::string_view);
FnType fn = &Properties::getProperty;
expectCallablePointerUsable(fn);
}

View File

@ -940,7 +940,7 @@ TEST_F(StaInitTest, PathEndSlack) {
TEST_F(StaInitTest, StaMakeClockGroups) {
ASSERT_NO_THROW(( [&](){
sta_->makeClockGroups("test_grp", false, false, false, false, nullptr, sta_->cmdSdc());
sta_->makeClockGroups("test_grp", false, false, false, false, "", sta_->cmdSdc());
}() ));
}
@ -1354,9 +1354,9 @@ TEST_F(StaInitTest, PropertyValueDefaultCtor) {
// === PropertyValue: string constructor ===
TEST_F(StaInitTest, PropertyValueStringCtor) {
PropertyValue pv("hello");
PropertyValue pv(std::string("hello"));
EXPECT_EQ(pv.type(), PropertyValue::Type::string);
EXPECT_STREQ(pv.stringValue(), "hello");
EXPECT_EQ(pv.stringValue(), "hello");
}
// === PropertyValue: float constructor ===
@ -1378,39 +1378,39 @@ TEST_F(StaInitTest, PropertyValueBoolCtor) {
// === PropertyValue: copy constructor ===
TEST_F(StaInitTest, PropertyValueCopyCtor) {
PropertyValue pv1("test");
PropertyValue pv1(std::string("test"));
PropertyValue pv2(pv1);
EXPECT_EQ(pv2.type(), PropertyValue::Type::string);
EXPECT_STREQ(pv2.stringValue(), "test");
EXPECT_EQ(pv2.stringValue(), "test");
}
// === PropertyValue: move constructor ===
TEST_F(StaInitTest, PropertyValueMoveCtor) {
PropertyValue pv1("test");
PropertyValue pv1(std::string("test"));
PropertyValue pv2(std::move(pv1));
EXPECT_EQ(pv2.type(), PropertyValue::Type::string);
EXPECT_STREQ(pv2.stringValue(), "test");
EXPECT_EQ(pv2.stringValue(), "test");
}
// === PropertyValue: copy assignment ===
TEST_F(StaInitTest, PropertyValueCopyAssign) {
PropertyValue pv1("test");
PropertyValue pv1(std::string("test"));
PropertyValue pv2;
pv2 = pv1;
EXPECT_EQ(pv2.type(), PropertyValue::Type::string);
EXPECT_STREQ(pv2.stringValue(), "test");
EXPECT_EQ(pv2.stringValue(), "test");
}
// === PropertyValue: move assignment ===
TEST_F(StaInitTest, PropertyValueMoveAssign) {
PropertyValue pv1("test");
PropertyValue pv1(std::string("test"));
PropertyValue pv2;
pv2 = std::move(pv1);
EXPECT_EQ(pv2.type(), PropertyValue::Type::string);
EXPECT_STREQ(pv2.stringValue(), "test");
EXPECT_EQ(pv2.stringValue(), "test");
}
// === PropertyValue: Library constructor ===
@ -1568,10 +1568,10 @@ TEST_F(StaInitTest, ReportFieldGetters) {
ReportPath *rpt = sta_->reportPath();
ReportField *field = rpt->fieldSlew();
EXPECT_NE(field, nullptr);
EXPECT_NE(field->name(), nullptr);
EXPECT_NE(field->title(), nullptr);
EXPECT_FALSE(field->name().empty());
EXPECT_FALSE(field->title().empty());
EXPECT_GT(field->width(), 0);
EXPECT_NE(field->blank(), nullptr);
EXPECT_FALSE(field->blank().empty());
}
// === ReportField: setWidth ===
@ -1804,7 +1804,7 @@ TEST_F(StaInitTest, PropertyValueStdStringCtor) {
std::string s = "test_string";
PropertyValue pv(s);
EXPECT_EQ(pv.type(), PropertyValue::Type::string);
EXPECT_STREQ(pv.stringValue(), "test_string");
EXPECT_EQ(pv.stringValue(), "test_string");
}
// === Levelize: invalid ===
@ -1859,21 +1859,21 @@ TEST_F(StaInitTest, ReportPathFindFieldSlew) {
ReportPath *rpt = sta_->reportPath();
ReportField *slew = rpt->findField("slew");
EXPECT_NE(slew, nullptr);
EXPECT_STREQ(slew->name(), "slew");
EXPECT_EQ(slew->name(), "slew");
}
TEST_F(StaInitTest, ReportPathFindFieldFanout) {
ReportPath *rpt = sta_->reportPath();
ReportField *fo = rpt->findField("fanout");
EXPECT_NE(fo, nullptr);
EXPECT_STREQ(fo->name(), "fanout");
EXPECT_EQ(fo->name(), "fanout");
}
TEST_F(StaInitTest, ReportPathFindFieldCapacitance) {
ReportPath *rpt = sta_->reportPath();
ReportField *cap = rpt->findField("capacitance");
EXPECT_NE(cap, nullptr);
EXPECT_STREQ(cap->name(), "capacitance");
EXPECT_EQ(cap->name(), "capacitance");
}
TEST_F(StaInitTest, ReportPathFindFieldNonexistent) {
@ -1927,8 +1927,8 @@ TEST_F(StaInitTest, ReportPathSetReportFieldsPublic) {
TEST_F(StaInitTest, ReportFieldBlank2) {
ReportPath *rpt = sta_->reportPath();
ReportField *field = rpt->fieldSlew();
const char *blank = field->blank();
EXPECT_NE(blank, nullptr);
const std::string &blank = field->blank();
EXPECT_FALSE(blank.empty());
}
// === ReportField: setProperties ===
@ -1983,23 +1983,23 @@ TEST_F(StaInitTest, PathExpandedEmptyCtor) {
// === PathGroups: static group names ===
TEST_F(StaInitTest, PathGroupsAsyncGroupName) {
const char *name = PathGroups::asyncPathGroupName();
EXPECT_NE(name, nullptr);
std::string_view name = PathGroups::asyncPathGroupName();
EXPECT_FALSE(name.empty());
}
TEST_F(StaInitTest, PathGroupsPathDelayGroupName) {
const char *name = PathGroups::pathDelayGroupName();
EXPECT_NE(name, nullptr);
std::string_view name = PathGroups::pathDelayGroupName();
EXPECT_FALSE(name.empty());
}
TEST_F(StaInitTest, PathGroupsGatedClkGroupName) {
const char *name = PathGroups::gatedClkGroupName();
EXPECT_NE(name, nullptr);
std::string_view name = PathGroups::gatedClkGroupName();
EXPECT_FALSE(name.empty());
}
TEST_F(StaInitTest, PathGroupsUnconstrainedGroupName) {
const char *name = PathGroups::unconstrainedGroupName();
EXPECT_NE(name, nullptr);
std::string_view name = PathGroups::unconstrainedGroupName();
EXPECT_FALSE(name.empty());
}
// === PathGroup: static max path count ===
@ -2631,23 +2631,23 @@ TEST_F(StaInitTest, ReportPathReportSlackOnlyHeader) {
// === PathGroups: static group name accessors ===
TEST_F(StaInitTest, PathGroupsAsyncGroupName2) {
const char *name = PathGroups::asyncPathGroupName();
EXPECT_NE(name, nullptr);
std::string_view name = PathGroups::asyncPathGroupName();
EXPECT_FALSE(name.empty());
}
TEST_F(StaInitTest, PathGroupsPathDelayGroupName2) {
const char *name = PathGroups::pathDelayGroupName();
EXPECT_NE(name, nullptr);
std::string_view name = PathGroups::pathDelayGroupName();
EXPECT_FALSE(name.empty());
}
TEST_F(StaInitTest, PathGroupsGatedClkGroupName2) {
const char *name = PathGroups::gatedClkGroupName();
EXPECT_NE(name, nullptr);
std::string_view name = PathGroups::gatedClkGroupName();
EXPECT_FALSE(name.empty());
}
TEST_F(StaInitTest, PathGroupsUnconstrainedGroupName2) {
const char *name = PathGroups::unconstrainedGroupName();
EXPECT_NE(name, nullptr);
std::string_view name = PathGroups::unconstrainedGroupName();
EXPECT_FALSE(name.empty());
}
// Corner setParasiticAnalysisPtcount, setParasiticAP, setDcalcAnalysisPtcount,

View File

@ -5,11 +5,11 @@ No differences found.
--- write_sdf with digits ---
Differences found at line 6.
(VERSION "2.7.0")
(VERSION "3.0.1")
(VERSION "3.1.0")
--- write_sdf with include_typ ---
Differences found at line 6.
(VERSION "2.7.0")
(VERSION "3.0.1")
(VERSION "3.1.0")
--- write_timing_model ---
--- write_timing_model with cell_name ---
--- write_timing_model with library_name ---