diff options
author | ZipCPU <dgisselq@ieee.org> | 2018-06-07 15:38:24 -0400 |
---|---|---|
committer | ZipCPU <dgisselq@ieee.org> | 2018-06-07 15:38:24 -0400 |
commit | 4499864024a5b658bf5772ed87e218bcdaedc262 (patch) | |
tree | 493bb4dc9e86cfc14466a4c7be5252dcd6843a74 /common/place.cc | |
parent | a4f687548e31b64a7684fdfbb64ea82f46370e2a (diff) | |
download | nextpnr-4499864024a5b658bf5772ed87e218bcdaedc262.tar.gz nextpnr-4499864024a5b658bf5772ed87e218bcdaedc262.tar.bz2 nextpnr-4499864024a5b658bf5772ed87e218bcdaedc262.zip |
Applied clang-format to my own contributions
Diffstat (limited to 'common/place.cc')
-rw-r--r-- | common/place.cc | 89 |
1 files changed, 45 insertions, 44 deletions
diff --git a/common/place.cc b/common/place.cc index 172001a6..310a75e9 100644 --- a/common/place.cc +++ b/common/place.cc @@ -18,63 +18,64 @@ */ #include <iostream> +#include <list> +#include <map> #include <ostream> -#include <stdlib.h> +#include <set> +#include <stdarg.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <vector> -#include <list> -#include <map> -#include <set> -#include "log.h" #include "design.h" +#include "log.h" #include "place.h" -void place_design(Design *design) { - std::set<IdString> types_used; - std::set<IdString>::iterator not_found, element; - std::set<BelType> used_bels; +void place_design(Design *design) +{ + std::set<IdString> types_used; + std::set<IdString>::iterator not_found, element; + std::set<BelType> used_bels; - for(auto cell_entry : design->cells) { - CellInfo *cell = cell_entry.second; - BelType bel_type; + for (auto cell_entry : design->cells) { + CellInfo *cell = cell_entry.second; + BelType bel_type; - element = types_used.find(cell->type); - if (element != types_used.end()) { - continue; - } + element = types_used.find(cell->type); + if (element != types_used.end()) { + continue; + } - bel_type = belTypeFromId(cell->type); - if (bel_type == BelType()) { - log_error("No Bel of type \'%s\' defined for " - "this chip\n", cell->type.c_str()); - } - types_used.insert(cell->type); - std::cout << cell->type << std::endl; - } + bel_type = belTypeFromId(cell->type); + if (bel_type == BelType()) { + log_error("No Bel of type \'%s\' defined for " + "this chip\n", + cell->type.c_str()); + } + types_used.insert(cell->type); + std::cout << cell->type << std::endl; + } - for(auto bel_type_name : types_used) { - auto blist = design->chip.getBels(); - BelType bel_type = belTypeFromId(bel_type_name); - auto bi = blist.begin(); + for (auto bel_type_name : types_used) { + auto blist = design->chip.getBels(); + BelType bel_type = belTypeFromId(bel_type_name); + auto bi = blist.begin(); - for(auto cell_entry : design->cells) { - CellInfo *cell = cell_entry.second; + for (auto cell_entry : design->cells) { + CellInfo *cell = cell_entry.second; - // Only place one type of Bel at a time - if (cell->type.compare(bel_type_name)!=0) - continue; + // Only place one type of Bel at a time + if (cell->type.compare(bel_type_name) != 0) + continue; - while((bi != blist.end()) - &&(design->chip.getBelType(*bi) != bel_type)) - bi++; - if (bi == blist.end()) - log_error("Too many \'%s\' used in design\n", - cell->type.c_str()); - cell->bel = *bi++; - } - } + while ((bi != blist.end()) && + (design->chip.getBelType(*bi) != bel_type)) + bi++; + if (bi == blist.end()) + log_error("Too many \'%s\' used in design\n", + cell->type.c_str()); + cell->bel = *bi++; + } + } } - |