Skip to content

Commit 801ae97

Browse files
committed
odb: fix the failures in cpp/Test3DBloxParser.cpp
Account for the bmap centering Use 2000 dbu/um for consistency Signed-off-by: Matt Liberty <[email protected]>
1 parent b5cc428 commit 801ae97

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/odb/test/cpp/Test3DBloxParser.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DbvFixture : public tst::Fixture
2727
TEST_F(DbvFixture, test_3dbv)
2828
{
2929
// Test that database precision was set correctly
30-
EXPECT_EQ(db_->getDbuPerMicron(), 100000);
30+
EXPECT_EQ(db_->getDbuPerMicron(), 2000);
3131

3232
auto chips = db_->getChips();
3333
EXPECT_EQ(chips.size(), 2);
@@ -118,8 +118,11 @@ TEST_F(DbvFixture, test_bump_map_parser)
118118
auto bump = *region->getChipBumps().begin();
119119
EXPECT_EQ(bump->getInst()->getName(), "bump1");
120120
EXPECT_EQ(bump->getInst()->getMaster()->getName(), "BUMP");
121-
EXPECT_EQ(bump->getInst()->getOrigin().x(), 100.0 * db_->getDbuPerMicron());
122-
EXPECT_EQ(bump->getInst()->getOrigin().y(), 200.0 * db_->getDbuPerMicron());
121+
const double bump_size2 = 29.0 / 2;
122+
EXPECT_EQ(bump->getInst()->getOrigin().x(),
123+
(100.0 - bump_size2) * db_->getDbuPerMicron());
124+
EXPECT_EQ(bump->getInst()->getOrigin().y(),
125+
(200.0 - bump_size2) * db_->getDbuPerMicron());
123126
EXPECT_EQ(bump->getNet(), nullptr);
124127
EXPECT_EQ(bump->getBTerm(), nullptr);
125128
auto soc_inst = db_->getChip()->findChipInst("soc_inst");

src/odb/test/data/example.3dbv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Header:
55
version: 2.5
66
unit: micron
7-
precision: 100000
7+
precision: 2000
88

99
ChipletDef:
1010
SoC:

src/odb/test/data/example.3dbx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Header:
22
version: "1.0"
33
unit: "micron"
4-
precision: 1000
4+
precision: 2000
55
include:
66
- example.3dbv
77

0 commit comments

Comments
 (0)