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 /ecp5 | |
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 'ecp5')
-rw-r--r-- | ecp5/arch.cc | 4 | ||||
-rw-r--r-- | ecp5/arch.h | 32 | ||||
-rw-r--r-- | ecp5/arch_pybindings.cc | 4 | ||||
-rw-r--r-- | ecp5/archdefs.h | 8 |
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 |