Skip to content

Commit b474d46

Browse files
authored
Merge pull request #10206 from The-OpenROAD-Project-staging/update_or_sta_upstream0416_plus_my_test
update STA 4/20 and associated changes
2 parents 5f65c48 + 13a4dfd commit b474d46

6 files changed

Lines changed: 19 additions & 24 deletions

File tree

src/Timing.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,7 @@ std::vector<ClockInfo> Timing::getClockInfo()
458458
ClockInfo info;
459459
info.name = clk->name();
460460
info.period = clk->period();
461-
if (clk->waveform()) {
462-
info.waveform = *clk->waveform();
463-
}
461+
info.waveform = clk->waveform();
464462
for (const sta::Pin* pin : clk->pins()) {
465463
auto [iterm, bterm] = staToDBPin(pin);
466464
if (iterm) {

src/cut/test/cpp/TestAbc.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ class AbcTest : public tst::Fixture
9999
sta::Port* clk_port = network->findPort(top_cell, "clk");
100100
sta::Pin* clk_pin = network->findPin(network->topInstance(), clk_port);
101101

102-
sta::PinSet* pinset = new sta::PinSet(network);
103-
pinset->insert(clk_pin);
102+
sta::PinSet pinset(network);
103+
pinset.insert(clk_pin);
104104

105105
// 0.5ns
106106
double period = sta_->units()->timeUnit()->userToSta(0.5);
107-
sta::FloatSeq* waveform = new sta::FloatSeq;
108-
waveform->push_back(0);
109-
waveform->push_back(period / 2.0);
107+
sta::FloatSeq waveform;
108+
waveform.push_back(0);
109+
waveform.push_back(period / 2.0);
110110

111111
sta_->makeClock("core_clock",
112112
pinset,

src/rmp/test/cpp/TestAbc.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ class AbcTest : public tst::Fixture
9191
sta::Port* clk_port = network->findPort(top_cell, "clk");
9292
sta::Pin* clk_pin = network->findPin(network->topInstance(), clk_port);
9393

94-
sta::PinSet* pinset = new sta::PinSet(network);
95-
pinset->insert(clk_pin);
94+
sta::PinSet pinset(network);
95+
pinset.insert(clk_pin);
9696

9797
// 0.5ns
9898
double period = sta_->units()->timeUnit()->userToSta(0.5);
99-
sta::FloatSeq* waveform = new sta::FloatSeq;
100-
waveform->push_back(0);
101-
waveform->push_back(period / 2.0);
99+
sta::FloatSeq waveform;
100+
waveform.push_back(0);
101+
waveform.push_back(period / 2.0);
102102

103103
sta_->makeClock("core_clock",
104104
pinset,

src/rsz/src/Resizer.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
#include "sta/PortDirection.hh"
7979
#include "sta/Scene.hh"
8080
#include "sta/Sdc.hh"
81+
#include "sta/SdcClass.hh"
8182
#include "sta/Search.hh"
8283
#include "sta/SearchPred.hh"
8384
#include "sta/StringUtil.hh"
@@ -1225,7 +1226,7 @@ float Resizer::driveResistance(const sta::Pin* drvr_pin)
12251226
for (auto rf : sta::RiseFall::range()) {
12261227
const sta::LibertyCell* cell;
12271228
const sta::LibertyPort* from_port;
1228-
float* from_slews;
1229+
const sta::DriveCellSlews* from_slews;
12291230
const sta::LibertyPort* to_port;
12301231
drive->driveCell(rf, min_max, cell, from_port, from_slews, to_port);
12311232
if (to_port) {

src/sta

Submodule sta updated 394 files

src/tst/src/IntegratedFixture.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,14 @@ void IntegratedFixture::initStaDefaultSdc()
105105
sta::Pin* clk_pin
106106
= db_network_->findPin(db_network_->topInstance(), clk_port);
107107

108-
// STA frees the 'clk_pins' after use.
109-
// coverity[RESOURCE_LEAK: FALSE_POSITIVE]
110-
sta::PinSet* clk_pins = new sta::PinSet(db_network_);
111-
clk_pins->insert(clk_pin);
108+
sta::PinSet clk_pins(db_network_);
109+
clk_pins.insert(clk_pin);
112110

113111
// Clock period = 0.5ns
114112
double period = sta_->units()->timeUnit()->userToSta(0.5);
115-
// STA takes the ownership of 'waveform'.
116-
// coverity[RESOURCE_LEAK: FALSE_POSITIVE]
117-
sta::FloatSeq* waveform = new sta::FloatSeq;
118-
waveform->push_back(0);
119-
waveform->push_back(period / 2.0);
113+
sta::FloatSeq waveform;
114+
waveform.push_back(0);
115+
waveform.push_back(period / 2.0);
120116

121117
sta_->makeClock("clk",
122118
clk_pins,

0 commit comments

Comments
 (0)