diff options
author | Keith Rothman <537074+litghost@users.noreply.github.com> | 2021-02-01 14:28:32 -0800 |
---|---|---|
committer | Keith Rothman <537074+litghost@users.noreply.github.com> | 2021-02-02 07:44:49 -0800 |
commit | da74a425d23352d7cddf9d1c4b0b7c86dd567c40 (patch) | |
tree | 3657232a91e97f839cd9114f40aa0c565afc23d4 /nexus | |
parent | 01509ec7c991f0ec674fd933095dfe52be28b46f (diff) | |
download | nextpnr-da74a425d23352d7cddf9d1c4b0b7c86dd567c40.tar.gz nextpnr-da74a425d23352d7cddf9d1c4b0b7c86dd567c40.tar.bz2 nextpnr-da74a425d23352d7cddf9d1c4b0b7c86dd567c40.zip |
Run "make clangformat".
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'nexus')
-rw-r--r-- | nexus/arch.cc | 4 | ||||
-rw-r--r-- | nexus/arch.h | 32 | ||||
-rw-r--r-- | nexus/arch_pybindings.cc | 4 | ||||
-rw-r--r-- | nexus/archdefs.h | 8 |
4 files changed, 21 insertions, 27 deletions
diff --git a/nexus/arch.cc b/nexus/arch.cc index 79e00e0d..95b409bf 100644 --- a/nexus/arch.cc +++ b/nexus/arch.cc @@ -173,11 +173,11 @@ Arch::Arch(ArchArgs args) : args(args) log_error("Unknown speed grade '%s'.\n", speed.c_str()); 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/nexus/arch.h b/nexus/arch.h index 9b3aea20..ee66599a 100644 --- a/nexus/arch.h +++ b/nexus/arch.h @@ -1336,44 +1336,40 @@ struct Arch : BaseCtx // implemented in arch_place.cc) // Whether this cell type can be placed at this BEL. - 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/nexus/arch_pybindings.cc b/nexus/arch_pybindings.cc index cf0badae..b07031f7 100644 --- a/nexus/arch_pybindings.cc +++ b/nexus/arch_pybindings.cc @@ -55,8 +55,8 @@ void arch_wrap_python(py::module &m) typedef UpDownhillPipRange DownhillPipRange; typedef WireBelPinRange BelPinRange; - 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" diff --git a/nexus/archdefs.h b/nexus/archdefs.h index 52f5cf58..7e427e06 100644 --- a/nexus/archdefs.h +++ b/nexus/archdefs.h @@ -114,15 +114,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 |