Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/database/manager/builder/builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ IdbBuilder::IdbBuilder()

IdbBuilder::~IdbBuilder()
{
delete _def_service;
_def_service = nullptr;

delete _lef_service;
_lef_service = nullptr;
}

void IdbBuilder::log()
Expand Down
12 changes: 12 additions & 0 deletions src/operation/iSTA/source/module/sta/StaAnalyze.cc
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,21 @@ unsigned StaAnalyze::analyzeSetupHold(StaVertex* end_vertex, StaArc* check_arc,
StaClockData* launch_clock_data =
(dynamic_cast<StaPathDelayData*>(delay_data))
->get_launch_clock_data();
if (!launch_clock_data) {
DLOG_INFO_FIRST_N(10)
<< "skip setup/hold analysis without launch clock data at "
<< end_vertex->getName();
continue;
}

auto* launch_clock = (dynamic_cast<StaClockData*>(launch_clock_data))
->get_prop_clock();
if (!launch_clock || !capture_clock) {
DLOG_INFO_FIRST_N(10)
<< "skip setup/hold analysis with incomplete clock binding at "
<< end_vertex->getName();
continue;
}

std::optional<int> cppr;
if (launch_clock == capture_clock) {
Expand Down
63 changes: 62 additions & 1 deletion src/operation/iSTA/source/module/sta/StaCharacterTiming.cc
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,69 @@ unsigned StaCharacterTiming::init(StaGraph* the_graph) {
}

auto io_delays = ista->getIODelayConstrain(the_vertex);
bool created = false;
auto synthesize_default_input_arrival = [this, ista,
the_vertex]() -> bool {
if (!the_vertex || the_vertex->is_clock() || the_vertex->is_sdc_clock_pin()) {
return false;
}

auto clocks = ista->getClocks();
if (clocks.size() != 1) {
return false;
}

auto* launch_clock = clocks.front();
if (!launch_clock) {
return false;
}

auto ensure_launch_clock_data =
[this, the_vertex, launch_clock](AnalysisMode analysis_mode)
-> StaClockData* {
auto clock_datas = the_vertex->getClockData(analysis_mode, TransType::kRise);
for (auto* clock_data : clock_datas) {
auto* candidate_clock_data = dynamic_cast<StaClockData*>(clock_data);
if (candidate_clock_data &&
candidate_clock_data->get_prop_clock() == launch_clock) {
return candidate_clock_data;
}
}

auto* launch_clock_data = new StaClockData(
analysis_mode, TransType::kRise, 0, the_vertex, launch_clock);
launch_clock_data->set_data_epoch(_characterization_epoch);
launch_clock_data->set_clock_wave_type(TransType::kRise);
the_vertex->addData(launch_clock_data);
return launch_clock_data;
};

auto add_default_delay_data =
[this, the_vertex, &ensure_launch_clock_data](AnalysisMode analysis_mode) {
auto* launch_clock_data = ensure_launch_clock_data(analysis_mode);
if (!launch_clock_data) {
return false;
}

for (auto data_trans_type : {TransType::kRise, TransType::kFall}) {
auto* path_delay_data = new StaPathDelayData(
analysis_mode, data_trans_type, 0, launch_clock_data, the_vertex);
path_delay_data->set_data_epoch(_characterization_epoch);
path_delay_data->set_launch_delay_data(path_delay_data);
the_vertex->addData(path_delay_data);
}

return true;
};

return add_default_delay_data(AnalysisMode::kMax) |
add_default_delay_data(AnalysisMode::kMin);
};

if (io_delays.empty()) {
return synthesize_default_input_arrival();
}

bool created = false;
for (auto* io_delay : io_delays) {
if (!io_delay) {
continue;
Expand Down
8 changes: 8 additions & 0 deletions src/operation/iSTA/test/CharacterTimingTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "CharacterTimingTestCommon.hh"
#include "gtest/gtest.h"
#include "log/Log.hh"
#include "idm.h"
#include "sta/Sta.hh"
#include "sta/StaVertex.hh"
#include "usage/usage.hh"

Expand All @@ -37,6 +39,9 @@ class CharacterTimingTest : public testing::Test {
}
void TearDown() final {
ieval::TimingAPI::destroyInst();
TimingEngine::destroyTimingEngine();
Sta::destroySta();
dmInst->reset();
Log::end();
}
};
Expand All @@ -56,6 +61,9 @@ TimingEngine* buildGoldenCaseTimingWithSdc(const std::filesystem::path& sdc_path
}

ieval::TimingAPI::destroyInst();
TimingEngine::destroyTimingEngine();
Sta::destroySta();
dmInst->reset();
auto* timing_api = ieval::TimingAPI::getInst();

EXPECT_TRUE(dmInst->init(db_config_path.string()))
Expand Down
Loading
Loading