Skip to content

Commit 24c6980

Browse files
Fix: add error check for multiple verilog_file/sdc_file entries in ChipletInst
Address review feedback on #10107 (osamahammad21: "please address") asking that the cardinality check applied to verilog_file in dbvParser.cpp and to def_file in dbxParser.cpp be extended to the remaining external fields for ChipletInst. Matches the behaviour requested by the 3DBlox external spec tracked in #10078. Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
1 parent 8a69e15 commit 24c6980

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ void DbxParser::parseChipletInstExternal(ChipletInstExternal& external,
145145
if (external_node["verilog_file"]) {
146146
std::vector<std::string> verilog_files;
147147
extractValue(external_node, "verilog_file", verilog_files);
148+
if (verilog_files.size() > 1) {
149+
logError(
150+
"Multiple verilog_file entries for a single chiplet are currently "
151+
"unsupported.");
152+
}
148153
if (!verilog_files.empty()) {
149154
external.verilog_file = resolvePath(verilog_files[0]);
150155
}
@@ -153,6 +158,11 @@ void DbxParser::parseChipletInstExternal(ChipletInstExternal& external,
153158
if (external_node["sdc_file"]) {
154159
std::vector<std::string> sdc_files;
155160
extractValue(external_node, "sdc_file", sdc_files);
161+
if (sdc_files.size() > 1) {
162+
logError(
163+
"Multiple sdc_file entries for a single chiplet are currently "
164+
"unsupported.");
165+
}
156166
if (!sdc_files.empty()) {
157167
external.sdc_file = resolvePath(sdc_files[0]);
158168
}

0 commit comments

Comments
 (0)