aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch.cc
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-01-28 18:52:08 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-02 07:34:56 -0800
commit71e210dd4b12f1e91630f83396be236034f68e30 (patch)
tree04c8c16564ee0e0c92c231804b3a0c28d0e87fe5 /ecp5/arch.cc
parent878fcdd22dfab32234f2537892ae844b2b4495f3 (diff)
downloadnextpnr-71e210dd4b12f1e91630f83396be236034f68e30.tar.gz
nextpnr-71e210dd4b12f1e91630f83396be236034f68e30.tar.bz2
nextpnr-71e210dd4b12f1e91630f83396be236034f68e30.zip
Refactor ECP5 to new Partition API.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
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..4368f0d0 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);
+
+ PartitionId partition;
+ partition.name = bel_type;
+ partitions.push_back(partitions);
+ }
}
// -----------------------------------------------------------------------