aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.cc
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-16 14:00:01 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-16 14:00:01 -0800
commit26a187e5ebcd1bdb6e079a91e25b610dc603aab2 (patch)
tree30f3816e4ae3d7b1dad5e9882b5c88534f6c2e81 /fpga_interchange/arch.cc
parentbb4fa7af5b17c9896ee2499cb13e7ca18f424220 (diff)
downloadnextpnr-26a187e5ebcd1bdb6e079a91e25b610dc603aab2.tar.gz
nextpnr-26a187e5ebcd1bdb6e079a91e25b610dc603aab2.tar.bz2
nextpnr-26a187e5ebcd1bdb6e079a91e25b610dc603aab2.zip
Require `--package` when arch BBA contains multiple packages.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'fpga_interchange/arch.cc')
-rw-r--r--fpga_interchange/arch.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/fpga_interchange/arch.cc b/fpga_interchange/arch.cc
index 8c8224ca..dc5b5c77 100644
--- a/fpga_interchange/arch.cc
+++ b/fpga_interchange/arch.cc
@@ -126,9 +126,17 @@ Arch::Arch(ArchArgs args) : args(args)
} else {
// Default to first package.
NPNR_ASSERT(chip_info->packages.size() > 0);
- IdString package_name(chip_info->packages[0].package);
- this->args.package = package_name.str(this);
- package_index = 0;
+ if(chip_info->packages.size() == 1) {
+ IdString package_name(chip_info->packages[0].package);
+ this->args.package = package_name.str(this);
+ package_index = 0;
+ } else {
+ log_info("Package must be specified (with --package arg) when multiple packages are available, packages:\n");
+ for(const auto &package : chip_info->packages) {
+ log_info(" - %s\n", IdString(package.package).c_str(this));
+ }
+ log_error("--package is required!\n");
+ }
}
std::unordered_set<SiteBelPair> site_bel_pads;