Skip to content

Commit 6c40a4a

Browse files
author
osamahammad21
committed
Merge remote-tracking branch 'origin/master' into drt-warning-rules
2 parents 346efc9 + 9d1af8f commit 6c40a4a

13 files changed

Lines changed: 102 additions & 26 deletions

File tree

src/dbSta/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ cc_library(
134134
cc_library(
135135
name = "ui",
136136
srcs = [
137-
"include/db_sta/IpChecker.hh",
138137
"src/MakeDbSta.cc",
139138
":swig",
140139
":tcl",

src/dft/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ cc_library(
4040
cc_library(
4141
name = "ui",
4242
srcs = [
43-
"include/dft/Dft.hh",
4443
"src/MakeDft.cpp",
4544
":swig",
4645
":tcl",
@@ -53,6 +52,7 @@ cc_library(
5352
"src",
5453
],
5554
deps = [
55+
":dft",
5656
"//:ord",
5757
"//src/dbSta",
5858
"//src/dft/src/architect",

src/dst/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ cc_library(
5353
cc_library(
5454
name = "ui",
5555
srcs = [
56-
"include/dst/Distributed.h",
5756
"src/MakeDistributed.cc",
5857
":swig",
5958
":tcl",
@@ -65,6 +64,7 @@ cc_library(
6564
"include",
6665
],
6766
deps = [
67+
":dst",
6868
"//:ord",
6969
"//src/utl",
7070
"@boost.asio",

src/exa/BUILD

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,25 @@ package(
1111
features = ["layering_check"],
1212
)
1313

14+
cc_library(
15+
name = "exa_private_hdrs",
16+
hdrs = [
17+
"src/observer.h",
18+
],
19+
includes = [
20+
"src",
21+
],
22+
visibility = ["//visibility:private"],
23+
deps = [
24+
"//src/odb/src/db",
25+
"//src/utl",
26+
],
27+
)
28+
1429
cc_library(
1530
name = "exa",
1631
srcs = [
1732
"src/example.cpp",
18-
"src/observer.h",
1933
],
2034
hdrs = [
2135
"include/exa/example.h",
@@ -24,6 +38,7 @@ cc_library(
2438
"include",
2539
],
2640
deps = [
41+
":exa_private_hdrs",
2742
"//src/odb/src/db",
2843
"//src/utl",
2944
],
@@ -35,7 +50,6 @@ cc_library(
3550
"src/MakeExample.cpp",
3651
"src/graphics.cpp",
3752
"src/graphics.h",
38-
"src/observer.h",
3953
":swig",
4054
":tcl",
4155
],
@@ -48,6 +62,7 @@ cc_library(
4862
],
4963
deps = [
5064
":exa",
65+
":exa_private_hdrs",
5166
"//:ord",
5267
"//src/gui",
5368
"//src/odb/src/db",

src/odb/src/lefin/CellEdgeSpacingTableParser.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,23 @@ void CellEdgeSpacingTableParser::setString(
5353
// [OPTIONAL] [SOFT] [EXACT] <spacing> ;
5454
bool CellEdgeSpacingTableParser::parseEntry(const std::string& s)
5555
{
56+
// Edge-type group names may be any non-blank token, including ones that are
57+
// numeric or a single character (e.g. "1"). The shared _string rule requires
58+
// an alphabetic first character, so use a dedicated rule here that accepts
59+
// any non-blank, non-semicolon token per the LEF/DEF 5.8 reference.
60+
qi::rule<std::string::const_iterator, std::string(), space_type> edge_type
61+
= lexeme[+(char_ - blank - '\n' - ';')];
5662
qi::rule<std::string::const_iterator, space_type> ENTRY
5763
= lit("EDGETYPE")[boost::bind(&CellEdgeSpacingTableParser::createEntry,
5864
this)]
59-
>> _string[boost::bind(&CellEdgeSpacingTableParser::setString,
60-
this,
61-
_1,
62-
&dbCellEdgeSpacing::setFirstEdgeType)]
63-
>> _string[boost::bind(&CellEdgeSpacingTableParser::setString,
64-
this,
65-
_1,
66-
&dbCellEdgeSpacing::setSecondEdgeType)]
65+
>> edge_type[boost::bind(&CellEdgeSpacingTableParser::setString,
66+
this,
67+
_1,
68+
&dbCellEdgeSpacing::setFirstEdgeType)]
69+
>> edge_type[boost::bind(&CellEdgeSpacingTableParser::setString,
70+
this,
71+
_1,
72+
&dbCellEdgeSpacing::setSecondEdgeType)]
6773
>> -lit(
6874
"EXCEPTABUTTED")[boost::bind(&CellEdgeSpacingTableParser::setBool,
6975
this,

src/odb/src/swig/common/containers.i

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,9 @@ WRAP_DB_CONTAINER(odb::dbChipRegionInst)
8686
WRAP_DB_CONTAINER(odb::dbChipBump)
8787
WRAP_DB_CONTAINER(odb::dbChipBumpInst)
8888
WRAP_DB_CONTAINER(odb::dbChipConn)
89-
WRAP_DB_CONTAINER(odb::dbChipNet)
89+
WRAP_DB_CONTAINER(odb::dbChipNet)
90+
WRAP_DB_CONTAINER(odb::dbUnfoldedChipInst)
91+
WRAP_DB_CONTAINER(odb::dbUnfoldedChipRegionInst)
92+
WRAP_DB_CONTAINER(odb::dbUnfoldedChipBumpInst)
93+
WRAP_DB_CONTAINER(odb::dbUnfoldedChipConn)
94+
WRAP_DB_CONTAINER(odb::dbUnfoldedChipNet)

src/odb/test/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ filegroup(
301301
"data/gscl45nm_ext_macros.lef",
302302
"data/gscl45nm_polygon.lef",
303303
"data/lef58_antennagateplusdiff.lef",
304+
"data/lef58_celledgespacing_numeric.lef",
304305
"data/lef58class_gscl45nm.lef",
305306
"data/mask.lef",
306307
"data/ndr.def",

src/odb/test/cpp/TestLef58Properties.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,4 +645,36 @@ TEST_F(Fixture, TestLef58AntennaGatePlusDiff)
645645
EXPECT_EQ(pwl.ratios[1], 4.0);
646646
}
647647

648+
// Regression test for issue #10668: a CELLEDGESPACINGTABLE EDGETYPE group name
649+
// that is numeric or a single character (e.g. "1") must parse correctly and
650+
// must not trigger ODB-0299 (parse mismatch).
651+
TEST_F(Fixture, TestLef58CellEdgeSpacingNumericEdgeType)
652+
{
653+
const char* libname = "lef58_celledgespacing_numeric.lef";
654+
loadTechAndLib(
655+
"tech", libname, prefix + "data/lef58_celledgespacing_numeric.lef");
656+
657+
dbTech* tech = db_->getTech();
658+
auto cell_edge_spacing_tbl = tech->getCellEdgeSpacingTable();
659+
// All three entries must be parsed (numeric, mixed numeric/alpha, and alpha).
660+
EXPECT_EQ(cell_edge_spacing_tbl.size(), 3);
661+
662+
auto it = cell_edge_spacing_tbl.begin();
663+
auto edge_spc = *it;
664+
EXPECT_EQ(edge_spc->getFirstEdgeType(), "1");
665+
EXPECT_EQ(edge_spc->getSecondEdgeType(), "1");
666+
EXPECT_EQ(edge_spc->getSpacing(), 0.4 * 1000);
667+
668+
edge_spc = *(++it);
669+
EXPECT_EQ(edge_spc->getFirstEdgeType(), "1");
670+
EXPECT_EQ(edge_spc->getSecondEdgeType(), "G2");
671+
EXPECT_EQ(edge_spc->getSpacing(), 0.2 * 1000);
672+
673+
// Alpha/multi-char group names (the pre-existing form) must still work.
674+
edge_spc = *(++it);
675+
EXPECT_EQ(edge_spc->getFirstEdgeType(), "G1");
676+
EXPECT_EQ(edge_spc->getSecondEdgeType(), "G1");
677+
EXPECT_EQ(edge_spc->getSpacing(), 0.1 * 1000);
678+
}
679+
648680
} // namespace odb
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
VERSION 5.8 ;
2+
NAMESCASESENSITIVE ON ;
3+
4+
PROPERTYDEFINITIONS
5+
LIBRARY LEF58_CELLEDGESPACINGTABLE STRING
6+
"CELLEDGESPACINGTABLE
7+
EDGETYPE 1 1 0.400
8+
EDGETYPE 1 G2 0.200
9+
EDGETYPE G1 G1 0.100 ;" ;
10+
END PROPERTYDEFINITIONS
11+
12+
UNITS
13+
DATABASE MICRONS 1000 ;
14+
END UNITS
15+
16+
LAYER metal1
17+
TYPE ROUTING ;
18+
WIDTH 0.1 ;
19+
END metal1
20+
21+
END LIBRARY

src/odb/test/read_3dbx.tcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@ if { [$db getChip] == "NULL" } {
77
puts "FAIL: Read 3dbx Failed"
88
exit 1
99
}
10+
check "Unfolded Chip Insts Count " { llength [$db getUnfoldedChipInsts] } 2
11+
check "Unfolded Chip Conns Count " { llength [$db getUnfoldedChipConns] } 2
12+
check "Unfolded Chip Regions Count " { llength [$db getUnfoldedChipRegionInsts] } 4
13+
check "Unfolded Chip Bumps Count " { llength [$db getUnfoldedChipBumpInsts] } 4
14+
check "Unfolded Chip Bumps Count " { llength [$db getUnfoldedChipNets] } 0
1015

1116
puts "pass"

0 commit comments

Comments
 (0)