aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2021-02-02 16:55:13 +0000
committerGitHub <noreply@github.com>2021-02-02 16:55:13 +0000
commitd1ef3ae1bac8f108b642c42c4fbfbdd4899c7641 (patch)
tree3657232a91e97f839cd9114f40aa0c565afc23d4 /ecp5/arch.cc
parentefc98c517eb1d2eb4a8ecc2ae82e770aaa1a0edd (diff)
parentda74a425d23352d7cddf9d1c4b0b7c86dd567c40 (diff)
downloadnextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.tar.gz
nextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.tar.bz2
nextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.zip
Merge pull request #557 from litghost/refactor_placer_arch_api
RFC: Initial refactoring of placer API.
Diffstat (limited to 'ecp5/arch.cc')
-rw-r--r--ecp5/arch.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index 74a1b17f..25f95c53 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -115,6 +115,19 @@ Arch::Arch(ArchArgs args) : args(args)
log_error("Unsupported package '%s' for '%s'.\n", args.package.c_str(), getChipName().c_str());
bel_to_cell.resize(chip_info->height * chip_info->width * max_loc_bels, nullptr);
+
+ std::unordered_set<IdString> bel_types;
+ for (BelId bel : getBels()) {
+ bel_types.insert(getBelType(bel));
+ }
+
+ for (IdString bel_type : bel_types) {
+ cell_types.push_back(bel_type);
+
+ BelBucketId bucket;
+ bucket.name = bel_type;
+ buckets.push_back(bucket);
+ }
}
// -----------------------------------------------------------------------