aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.cc
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-01-28 19:24:00 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-02 07:34:56 -0800
commit0338368afa369d097dfb35e0705fef10baa3d20e (patch)
tree961e59d870aa6df324ef723c72dd008390588f16 /ice40/arch.cc
parentd03d9d839b7e49a4bf3428e949bda85574adf403 (diff)
downloadnextpnr-0338368afa369d097dfb35e0705fef10baa3d20e.tar.gz
nextpnr-0338368afa369d097dfb35e0705fef10baa3d20e.tar.bz2
nextpnr-0338368afa369d097dfb35e0705fef10baa3d20e.zip
Add Partition APIs to ice40, nexus, gowin archs.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r--ice40/arch.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index e450e682..fcf6506d 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -115,6 +115,19 @@ Arch::Arch(ArchArgs args) : args(args)
wire_to_net.resize(chip_info->wire_data.size());
pip_to_net.resize(chip_info->pip_data.size());
switches_locked.resize(chip_info->num_switches);
+
+ 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(partition);
+ }
}
// -----------------------------------------------------------------------