aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chip.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-13 11:51:09 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-13 11:51:09 +0200
commit5435a970246081f9239bca86519aed4c12ad0a03 (patch)
tree7a44fc6f81d933dc64c4c7bf3d98db88efc7a03f /ice40/chip.cc
parent696aaee24c3e859283e79f9a753e8402524d8f2b (diff)
downloadnextpnr-5435a970246081f9239bca86519aed4c12ad0a03.tar.gz
nextpnr-5435a970246081f9239bca86519aed4c12ad0a03.tar.bz2
nextpnr-5435a970246081f9239bca86519aed4c12ad0a03.zip
ice40: Add package selection
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/chip.cc')
-rw-r--r--ice40/chip.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/ice40/chip.cc b/ice40/chip.cc
index 918a7fb4..464b226c 100644
--- a/ice40/chip.cc
+++ b/ice40/chip.cc
@@ -98,6 +98,16 @@ Chip::Chip(ChipArgs args) : args(args)
}
#endif
+ package_info = nullptr;
+ for (int i = 0; i < chip_info.num_packages; i++) {
+ if (chip_info.packages_data[i].name == args.package) {
+ package_info = &(chip_info.packages_data[i]);
+ break;
+ }
+ }
+ if (package_info == nullptr)
+ log_error("Unsupported package '%s'.\n", args.package.c_str());
+
bel_to_cell.resize(chip_info.num_bels);
wire_to_net.resize(chip_info.num_wires);
pip_to_net.resize(chip_info.num_pips);