Merge pull request #124 from smunaut/ice40_warn_sbio_misuse

ice40: Add warning if an instanciated SB_IO has its PACKAGE_PIN used elsewhere
This commit is contained in:
David Shah 2018-11-16 15:56:45 +00:00 committed by GitHub
commit 1851ebb1c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -438,6 +438,11 @@ static void pack_io(Context *ctx)
}
packed_cells.insert(ci->name);
std::copy(ci->attrs.begin(), ci->attrs.end(), std::inserter(sb->attrs, sb->attrs.begin()));
} else if (is_sb_io(ctx, ci)) {
NetInfo *net = ci->ports.at(ctx->id("PACKAGE_PIN")).net;
if ((net != nullptr) && (net->users.size() > 1))
log_error("PACKAGE_PIN of SB_IO '%s' connected to more than a single top level IO.\n",
ci->name.c_str(ctx));
}
}
for (auto pcell : packed_cells) {