Skip to content

Commit e8e7b0c

Browse files
committed
3dbx: parser ~ bottom region
Signed-off-by: osamahammad21 <[email protected]>
1 parent a1adbd5 commit e8e7b0c

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

src/odb/src/3dblox/3dblox.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void ThreeDBlox::readDbv(const std::string& dbv_file)
3434
} else {
3535
if (data.header.precision > db_->getDbuPerMicron()) {
3636
logger_->error(utl::ODB,
37-
515,
37+
526,
3838
"3DBV Parser Error: Precision is greater than dbu per "
3939
"micron already set for database");
4040
} else if (db_->getDbuPerMicron() % data.header.precision != 0) {
@@ -108,7 +108,7 @@ dbChip::ChipType getChipType(const std::string& type, utl::Logger* logger)
108108
return dbChip::ChipType::HIER;
109109
}
110110
logger->error(
111-
utl::ODB, 517, "3DBV Parser Error: Invalid chip type: {}", type);
111+
utl::ODB, 527, "3DBV Parser Error: Invalid chip type: {}", type);
112112
}
113113
void ThreeDBlox::createChiplet(const ChipletDef& chiplet)
114114
{
@@ -150,7 +150,7 @@ dbChipRegion::Side getChipRegionSide(const std::string& side,
150150
return dbChipRegion::Side::INTERNAL_EXT;
151151
}
152152
logger->error(
153-
utl::ODB, 518, "3DBV Parser Error: Invalid chip region side: {}", side);
153+
utl::ODB, 528, "3DBV Parser Error: Invalid chip region side: {}", side);
154154
}
155155
void ThreeDBlox::createRegion(const ChipletRegion& region, dbChip* chip)
156156
{

src/odb/test/cpp/Test3DBloxParser.cpp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,27 @@ BOOST_FIXTURE_TEST_CASE(test_3dbx, F_DBV_PARSER)
101101
300.0 * db->getDbuPerMicron());
102102
BOOST_CHECK_EQUAL(soc_inst_duplicate->getOrient().getString(), "MZ");
103103
auto connections = db->getChipConns();
104-
BOOST_CHECK_EQUAL(connections.size(), 1);
105-
auto connection = *connections.begin();
104+
BOOST_CHECK_EQUAL(connections.size(), 2);
105+
auto itr = connections.begin();
106+
auto connection = *itr++;
106107
BOOST_CHECK_EQUAL(connection->getName(), "soc_to_soc");
107108
BOOST_CHECK_EQUAL(connection->getTopRegion()->getChipInst()->getName(),
108109
"soc_inst_duplicate");
109110
BOOST_CHECK_EQUAL(connection->getBottomRegion()->getChipInst()->getName(),
110111
"soc_inst");
111112
BOOST_CHECK_EQUAL(connection->getThickness(), 2.0 * db->getDbuPerMicron());
113+
connection = *itr;
114+
BOOST_CHECK_EQUAL(connection->getName(), "soc_to_virtual");
115+
BOOST_CHECK_EQUAL(connection->getTopRegion()->getChipInst()->getName(),
116+
"soc_inst_duplicate");
117+
BOOST_CHECK_EQUAL(connection->getTopRegionPath().size(), 1);
118+
BOOST_CHECK_EQUAL(connection->getTopRegionPath()[0]->getName(),
119+
"soc_inst_duplicate");
120+
BOOST_CHECK_EQUAL(connection->getTopRegion()->getChipRegion()->getName(),
121+
"r1");
122+
BOOST_CHECK_EQUAL(connection->getBottomRegionPath().size(), 0);
123+
BOOST_CHECK_EQUAL(connection->getBottomRegion(), nullptr);
124+
BOOST_CHECK_EQUAL(connection->getThickness(), 0.0);
112125
}
113126

114127
BOOST_AUTO_TEST_SUITE_END()

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ Connection:
3838
soc_to_soc:
3939
top: soc_inst_duplicate.regions.r1
4040
bot: soc_inst.regions.r1
41-
thickness: 2.0
41+
thickness: 2.0
42+
soc_to_virtual:
43+
top: soc_inst_duplicate.regions.r1
44+
bot: ~
45+
thickness: 0.0

0 commit comments

Comments
 (0)