aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/arch.cc4
-rw-r--r--ecp5/arch.h32
-rw-r--r--ecp5/arch_pybindings.cc4
-rw-r--r--ecp5/archdefs.h8
4 files changed, 21 insertions, 27 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index fc618dac..25f95c53 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -117,11 +117,11 @@ Arch::Arch(ArchArgs args) : args(args)
bel_to_cell.resize(chip_info->height * chip_info->width * max_loc_bels, nullptr);
std::unordered_set<IdString> bel_types;
- for(BelId bel : getBels()) {
+ for (BelId bel : getBels()) {
bel_types.insert(getBelType(bel));
}
- for(IdString bel_type : bel_types) {
+ for (IdString bel_type : bel_types) {
cell_types.push_back(bel_type);
BelBucketId bucket;
diff --git a/ecp5/arch.h b/ecp5/arch.h
index e91def74..18a70fe8 100644
--- a/ecp5/arch.h
+++ b/ecp5/arch.h
@@ -950,44 +950,40 @@ struct Arch : BaseCtx
// -------------------------------------------------
// Placement validity checks
- bool isValidBelForCellType(IdString cell_type, BelId bel) const {
- return cell_type == getBelType(bel);
- }
+ bool isValidBelForCellType(IdString cell_type, BelId bel) const { return cell_type == getBelType(bel); }
- const std::vector<IdString> &getCellTypes() const {
- return cell_types;
- }
+ const std::vector<IdString> &getCellTypes() const { return cell_types; }
- std::vector<BelBucketId> getBelBuckets() const {
- return buckets;
- }
+ std::vector<BelBucketId> getBelBuckets() const { return buckets; }
- IdString getBelBucketName(BelBucketId bucket) const {
- return bucket.name;
- }
+ IdString getBelBucketName(BelBucketId bucket) const { return bucket.name; }
- BelBucketId getBelBucketByName(IdString name) const {
+ BelBucketId getBelBucketByName(IdString name) const
+ {
BelBucketId bucket;
bucket.name = name;
return bucket;
}
- BelBucketId getBelBucketForBel(BelId bel) const {
+ BelBucketId getBelBucketForBel(BelId bel) const
+ {
BelBucketId bucket;
bucket.name = getBelType(bel);
return bucket;
}
- BelBucketId getBelBucketForCellType(IdString cell_type) const {
+ BelBucketId getBelBucketForCellType(IdString cell_type) const
+ {
BelBucketId bucket;
bucket.name = cell_type;
return bucket;
}
- std::vector<BelId> getBelsInBucket(BelBucketId bucket) const {
+ std::vector<BelId> getBelsInBucket(BelBucketId bucket) const
+ {
std::vector<BelId> bels;
- for(BelId bel : getBels()) {
- if(getBelType(bel) == bucket.name) {
+ for (BelId bel : getBels()) {
+ if (getBelType(bel) == bucket.name) {
bels.push_back(bel);
}
}
diff --git a/ecp5/arch_pybindings.cc b/ecp5/arch_pybindings.cc
index b000ea78..e1adbb46 100644
--- a/ecp5/arch_pybindings.cc
+++ b/ecp5/arch_pybindings.cc
@@ -59,8 +59,8 @@ void arch_wrap_python(py::module &m)
typedef const PipRange UphillPipRange;
typedef const PipRange DownhillPipRange;
- typedef const std::vector<BelBucketId> & BelBucketRange;
- typedef const std::vector<BelId> & BelRangeForBelBucket;
+ typedef const std::vector<BelBucketId> &BelBucketRange;
+ typedef const std::vector<BelId> &BelRangeForBelBucket;
#include "arch_pybindings_shared.h"
WRAP_RANGE(m, Bel, conv_to_str<BelId>);
diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h
index f766dee2..3bc75ab4 100644
--- a/ecp5/archdefs.h
+++ b/ecp5/archdefs.h
@@ -126,15 +126,13 @@ struct PipId
}
};
-struct BelBucketId {
+struct BelBucketId
+{
IdString name;
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;
- }
+ bool operator<(const BelBucketId &other) const { return name < other.name; }
};
struct GroupId