aboutsummaryrefslogtreecommitdiffstats
path: root/common/archcheck.cc
diff options
context:
space:
mode:
authorD. Shah <dave@ds0.me>2021-01-28 14:38:20 +0000
committerD. Shah <dave@ds0.me>2021-01-28 14:38:20 +0000
commit0d9790421699a22fc6a5962b41910c3b7d089353 (patch)
tree62ec831daf16806e16535eeca8764e20bdbce757 /common/archcheck.cc
parentb671d8f59d425b6faf07167b7360cecd12366151 (diff)
downloadnextpnr-0d9790421699a22fc6a5962b41910c3b7d089353.tar.gz
nextpnr-0d9790421699a22fc6a5962b41910c3b7d089353.tar.bz2
nextpnr-0d9790421699a22fc6a5962b41910c3b7d089353.zip
clangformat
Signed-off-by: D. Shah <dave@ds0.me>
Diffstat (limited to 'common/archcheck.cc')
-rw-r--r--common/archcheck.cc35
1 files changed, 17 insertions, 18 deletions
diff --git a/common/archcheck.cc b/common/archcheck.cc
index 12d4b5d3..9c943e86 100644
--- a/common/archcheck.cc
+++ b/common/archcheck.cc
@@ -38,7 +38,7 @@ void archcheck_names(const Context *ctx)
for (BelId bel : ctx->getBels()) {
IdString name = ctx->getBelName(bel);
BelId bel2 = ctx->getBelByName(name);
- if(bel != bel2) {
+ if (bel != bel2) {
log_error("bel != bel2, name = %s\n", name.c_str(ctx));
}
}
@@ -47,7 +47,7 @@ void archcheck_names(const Context *ctx)
for (WireId wire : ctx->getWires()) {
IdString name = ctx->getWireName(wire);
WireId wire2 = ctx->getWireByName(name);
- if(wire != wire2) {
+ if (wire != wire2) {
log_error("wire != wire2, name = %s\n", name.c_str(ctx));
}
}
@@ -56,7 +56,7 @@ void archcheck_names(const Context *ctx)
for (PipId pip : ctx->getPips()) {
IdString name = ctx->getPipName(pip);
PipId pip2 = ctx->getPipByName(name);
- if(pip != pip2) {
+ if (pip != pip2) {
log_error("pip != pip2, name = %s\n", name.c_str(ctx));
}
}
@@ -127,19 +127,18 @@ void archcheck_conn(const Context *ctx)
log_info("Checking all wires...\n");
- for (WireId wire : ctx->getWires())
- {
- for(BelPin belpin : ctx->getWireBelPins(wire)) {
+ for (WireId wire : ctx->getWires()) {
+ for (BelPin belpin : ctx->getWireBelPins(wire)) {
WireId wire2 = ctx->getBelPinWire(belpin.bel, belpin.pin);
log_assert(wire == wire2);
}
- for(PipId pip : ctx->getPipsDownhill(wire)) {
+ for (PipId pip : ctx->getPipsDownhill(wire)) {
WireId wire2 = ctx->getPipSrcWire(pip);
log_assert(wire == wire2);
}
- for(PipId pip : ctx->getPipsUphill(wire)) {
+ for (PipId pip : ctx->getPipsUphill(wire)) {
WireId wire2 = ctx->getPipDstWire(pip);
log_assert(wire == wire2);
}
@@ -147,16 +146,16 @@ void archcheck_conn(const Context *ctx)
log_info("Checking all BELs...\n");
for (BelId bel : ctx->getBels()) {
- for(IdString pin : ctx->getBelPins(bel)) {
+ for (IdString pin : ctx->getBelPins(bel)) {
WireId wire = ctx->getBelPinWire(bel, pin);
- if(wire == WireId()) {
+ if (wire == WireId()) {
continue;
}
bool found_belpin = false;
- for(BelPin belpin : ctx->getWireBelPins(wire)) {
- if(belpin.bel == bel && belpin.pin == pin) {
+ for (BelPin belpin : ctx->getWireBelPins(wire)) {
+ if (belpin.bel == bel && belpin.pin == pin) {
found_belpin = true;
break;
}
@@ -169,10 +168,10 @@ void archcheck_conn(const Context *ctx)
log_info("Checking all PIPs...\n");
for (PipId pip : ctx->getPips()) {
WireId src_wire = ctx->getPipSrcWire(pip);
- if(src_wire != WireId()) {
+ if (src_wire != WireId()) {
bool found_pip = false;
- for(PipId downhill_pip : ctx->getPipsDownhill(src_wire)) {
- if(pip == downhill_pip) {
+ for (PipId downhill_pip : ctx->getPipsDownhill(src_wire)) {
+ if (pip == downhill_pip) {
found_pip = true;
break;
}
@@ -182,10 +181,10 @@ void archcheck_conn(const Context *ctx)
}
WireId dst_wire = ctx->getPipDstWire(pip);
- if(dst_wire != WireId()) {
+ if (dst_wire != WireId()) {
bool found_pip = false;
- for(PipId uphill_pip : ctx->getPipsUphill(dst_wire)) {
- if(pip == uphill_pip) {
+ for (PipId uphill_pip : ctx->getPipsUphill(dst_wire)) {
+ if (pip == uphill_pip) {
found_pip = true;
break;
}