Skip to content

Commit f320a07

Browse files
committed
Move BLIF model existence check in arch.xml from end of BLIF parse
to point where corresponding blackbox model is read.
1 parent 0511c6d commit f320a07

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

vpr/src/base/read_blif.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,12 @@ struct BlifAllocCallback : public blifparse::Callback {
311311
}
312312

313313
void blackbox() override {
314+
LogicalModelId arch_model_id = models_.get_model_by_name(curr_model().netlist_name());
315+
if (!arch_model_id.is_valid()) {
316+
vpr_throw(VPR_ERROR_BLIF_F, filename_.c_str(), lineno_, "Blackbox BLIF model '%s' has no equivalent architecture model.",
317+
curr_model().netlist_name().c_str());
318+
}
319+
314320
//We treat black-boxes as netlists during parsing so they should contain
315321
//only inpads/outpads
316322
for (const auto& blk_id : curr_model().blocks()) {
@@ -537,12 +543,6 @@ struct BlifAllocCallback : public blifparse::Callback {
537543

538544
bool verify_blackbox_model(AtomNetlist& blif_model) {
539545
LogicalModelId arch_model_id = models_.get_model_by_name(blif_model.netlist_name());
540-
541-
if (!arch_model_id.is_valid()) {
542-
vpr_throw(VPR_ERROR_BLIF_F, filename_.c_str(), lineno_, "BLIF model '%s' has no equivalent architecture model.",
543-
blif_model.netlist_name().c_str());
544-
}
545-
546546
const t_model& arch_model = models_.get_model(arch_model_id);
547547

548548
//Verify each port on the model

0 commit comments

Comments
 (0)