aboutsummaryrefslogtreecommitdiffstats
path: root/nexus
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-01-29 14:55:10 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-02 07:34:56 -0800
commit9fe546f279cd643a308322ffa6af622630892315 (patch)
tree8a9d7ad300ecf376f4b75b3cc7d6e237b47e6813 /nexus
parent11c80c048b31261da14c04f79566b9e1debb29f9 (diff)
downloadnextpnr-9fe546f279cd643a308322ffa6af622630892315.tar.gz
nextpnr-9fe546f279cd643a308322ffa6af622630892315.tar.bz2
nextpnr-9fe546f279cd643a308322ffa6af622630892315.zip
Rename Partition -> BelBucket.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'nexus')
-rw-r--r--nexus/arch.cc6
-rw-r--r--nexus/arch.h38
-rw-r--r--nexus/archdefs.h14
3 files changed, 29 insertions, 29 deletions
diff --git a/nexus/arch.cc b/nexus/arch.cc
index 659703de..79e00e0d 100644
--- a/nexus/arch.cc
+++ b/nexus/arch.cc
@@ -180,9 +180,9 @@ Arch::Arch(ArchArgs args) : args(args)
for(IdString bel_type : bel_types) {
cell_types.push_back(bel_type);
- PartitionId partition;
- partition.name = bel_type;
- partitions.push_back(partition);
+ BelBucketId bucket;
+ bucket.name = bel_type;
+ buckets.push_back(bucket);
}
}
diff --git a/nexus/arch.h b/nexus/arch.h
index dfd00f90..9b3aea20 100644
--- a/nexus/arch.h
+++ b/nexus/arch.h
@@ -1344,36 +1344,36 @@ struct Arch : BaseCtx
return cell_types;
}
- std::vector<PartitionId> getPartitions() const {
- return partitions;
+ std::vector<BelBucketId> getBelBuckets() const {
+ return buckets;
}
- IdString getPartitionName(PartitionId partition) const {
- return partition.name;
+ IdString getBelBucketName(BelBucketId bucket) const {
+ return bucket.name;
}
- PartitionId getPartitionByName(IdString name) const {
- PartitionId partition;
- partition.name = name;
- return partition;
+ BelBucketId getBelBucketByName(IdString name) const {
+ BelBucketId bucket;
+ bucket.name = name;
+ return bucket;
}
- PartitionId getPartitionForBel(BelId bel) const {
- PartitionId partition;
- partition.name = getBelType(bel);
- return partition;
+ BelBucketId getBelBucketForBel(BelId bel) const {
+ BelBucketId bucket;
+ bucket.name = getBelType(bel);
+ return bucket;
}
- PartitionId getPartitionForCellType(IdString cell_type) const {
- PartitionId partition;
- partition.name = cell_type;
- return partition;
+ BelBucketId getBelBucketForCellType(IdString cell_type) const {
+ BelBucketId bucket;
+ bucket.name = cell_type;
+ return bucket;
}
- std::vector<BelId> getBelsForPartition(PartitionId partition) const {
+ std::vector<BelId> getBelsInBucket(BelBucketId bucket) const {
std::vector<BelId> bels;
for(BelId bel : getBels()) {
- if(getBelType(bel) == partition.name) {
+ if(getBelType(bel) == bucket.name) {
bels.push_back(bel);
}
}
@@ -1583,7 +1583,7 @@ struct Arch : BaseCtx
void write_fasm(std::ostream &out) const;
std::vector<IdString> cell_types;
- std::vector<PartitionId> partitions;
+ std::vector<BelBucketId> buckets;
};
NEXTPNR_NAMESPACE_END
diff --git a/nexus/archdefs.h b/nexus/archdefs.h
index 12bbd228..52f5cf58 100644
--- a/nexus/archdefs.h
+++ b/nexus/archdefs.h
@@ -114,12 +114,12 @@ struct PipId
}
};
-struct PartitionId {
+struct BelBucketId {
IdString name;
- bool operator==(const PartitionId &other) const { return (name == other.name); }
- bool operator!=(const PartitionId &other) const { return (name != other.name); }
- bool operator<(const PartitionId &other) const
+ bool operator==(const BelBucketId &other) const { return (name == other.name); }
+ bool operator!=(const BelBucketId &other) const { return (name != other.name); }
+ bool operator<(const BelBucketId &other) const
{
return name < other.name;
}
@@ -262,12 +262,12 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX DecalId>
}
};
-template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PartitionId>
+template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelBucketId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PartitionId &partition) const noexcept
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelBucketId &bucket) const noexcept
{
std::size_t seed = 0;
- boost::hash_combine(seed, hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(partition.name));
+ boost::hash_combine(seed, hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(bucket.name));
return seed;
}
};