Skip to content

Commit 5393a7e

Browse files
committed
Merge remote-tracking branch 'origin/master' into pdn-unique
2 parents 48dc7f1 + d9dc0c8 commit 5393a7e

File tree

5 files changed

+39
-1
lines changed

5 files changed

+39
-1
lines changed

src/odb/src/db/dbJournal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ void dbJournal::undo_deleteObject()
19531953
_log.pop(group_id);
19541954
_log.pop(module_id);
19551955
_log.pop(region_id);
1956-
inst->setLocation(x, y);
1956+
inst->setOrigin(x, y);
19571957
if (group_id != 0) {
19581958
auto group = dbGroup::getGroup(_block, group_id);
19591959
group->addInst(inst);

src/odb/test/cpp/TestJournal.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ TEST_F(JournalFixture, test_undo_inst_destroy)
4242
{
4343
auto module = dbModule::create(block, "m");
4444
auto inst = dbInst::create(block, and2, "a", false, module);
45+
inst->setOrigin(100, 200);
4546
// Ensure non-default values are restored
4647
inst->setPlacementStatus(dbPlacementStatus::PLACED);
4748
auto group = dbGroup::create(block, "g");
@@ -56,6 +57,7 @@ TEST_F(JournalFixture, test_undo_inst_destroy)
5657
EXPECT_EQ(inst->getGroup(), group);
5758
EXPECT_EQ(inst->getModule(), module);
5859
EXPECT_EQ(inst->getRegion(), region);
60+
EXPECT_EQ(inst->getLocation(), Point(100, 200));
5961
}
6062

6163
TEST_F(JournalFixture, test_undo_mod_inst_destroy)

src/stt/src/pdr/src/pd.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "lemon/list_graph.h"
1919
#include "odb/geom.h"
2020
#include "stt/SteinerTreeBuilder.h"
21+
#include "utl/Logger.h"
2122

2223
namespace pdr {
2324

@@ -434,6 +435,15 @@ Tree primDijkstra(const vector<int>& x,
434435
const float alpha,
435436
Logger* logger)
436437
{
438+
if (x.size() != y.size()) {
439+
logger->error(
440+
utl::STT, 8, "x size ({}) != y size ({})", x.size(), y.size());
441+
}
442+
443+
if (x.empty()) {
444+
logger->error(utl::STT, 9, "Invalid request for an empty Steiner tree.");
445+
}
446+
437447
ListGraph graph;
438448
ListGraph::NodeMap<Point> node_point(graph); // Node -> location
439449

test/orfs/mock-array/mock-array.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ MACROS = [
221221
POWER_TESTS = [
222222
"power",
223223
"power_instances",
224+
"path_groups",
224225
]
225226

226227
def mock_array(name, config):
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
source $::env(LOAD_POWER_TCL)
2+
3+
# Various checks on path groups
4+
set first_path [lindex [find_timing_paths] 0]
5+
set from [get_property [get_property $first_path startpoint] full_name]
6+
set to [get_property [get_property $first_path endpoint] full_name]
7+
puts "Checking if we can find timing paths from $from to $to"
8+
if { [llength [find_timing_paths -from $from -to $to]] == 0 } {
9+
puts "Error: find_timing_paths -from $from -to $to failed"
10+
exit 1
11+
}
12+
puts "Checking if we can create a group_path from $from to $to"
13+
14+
# There is no guarantee that the first node in the
15+
# tcl path structure is an exception start point, so use -through
16+
# to ensure we capture a valid path for our testing purposes.
17+
group_path -name test_group -through $from -to $to
18+
if { [llength [find_timing_paths -path_group test_group]] == 0 } {
19+
puts "Error: find_timing_paths -path_group test_group failed"
20+
exit 1
21+
}
22+
23+
set f [open $::env(OUTPUT) w]
24+
puts $f OK
25+
close $f

0 commit comments

Comments
 (0)