Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions vpr/src/base/read_blif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ struct BlifAllocCallback : public blifparse::Callback {
}

void blackbox() override {
LogicalModelId arch_model_id = models_.get_model_by_name(curr_model().netlist_name());
if (!arch_model_id.is_valid()) {
vpr_throw(VPR_ERROR_BLIF_F, filename_.c_str(), lineno_, "Blackbox BLIF model '%s' has no equivalent architecture model.",
curr_model().netlist_name().c_str());
}

//We treat black-boxes as netlists during parsing so they should contain
//only inpads/outpads
for (const auto& blk_id : curr_model().blocks()) {
Expand Down Expand Up @@ -537,12 +543,6 @@ struct BlifAllocCallback : public blifparse::Callback {

bool verify_blackbox_model(AtomNetlist& blif_model) {
LogicalModelId arch_model_id = models_.get_model_by_name(blif_model.netlist_name());

if (!arch_model_id.is_valid()) {
vpr_throw(VPR_ERROR_BLIF_F, filename_.c_str(), lineno_, "BLIF model '%s' has no equivalent architecture model.",
blif_model.netlist_name().c_str());
}

const t_model& arch_model = models_.get_model(arch_model_id);

//Verify each port on the model
Expand Down