From 4a4025192a4d832f7636225c5a26912975c96f21 Mon Sep 17 00:00:00 2001 From: gatecat Date: Tue, 26 Dec 2023 09:54:34 +0100 Subject: [PATCH] run clangformat Signed-off-by: gatecat --- common/kernel/pybindings.cc | 2 +- common/route/router2.cc | 6 ++++-- ecp5/pack.cc | 3 ++- gowin/pack.cc | 6 +++--- gui/fpgaviewwidget.cc | 4 ++-- ice40/arch.cc | 2 +- nexus/pack.cc | 4 ++-- 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/common/kernel/pybindings.cc b/common/kernel/pybindings.cc index 137c3e36..db233c1c 100644 --- a/common/kernel/pybindings.cc +++ b/common/kernel/pybindings.cc @@ -305,7 +305,7 @@ void (*python_sighandler)(int) = nullptr; void init_python(const char *executable) { #ifdef MAIN_EXECUTABLE - static const char* python_argv[1]; + static const char *python_argv[1]; python_argv[0] = executable; py::initialize_interpreter(true, 1, python_argv); py::module::import(TOSTRING(MODULE_NAME)); diff --git a/common/route/router2.cc b/common/route/router2.cc index d592dcb8..8dcec6e9 100644 --- a/common/route/router2.cc +++ b/common/route/router2.cc @@ -781,8 +781,10 @@ struct Router2 WireScore next_score; next_score.delay = curr.score.delay + cfg.get_base_cost(ctx, next, uh, crit_weight); next_score.cost = curr.score.cost + score_wire_for_arc(net, i, phys_pin, next, uh, crit_weight); - next_score.togo_cost = - const_mode ? 0 : cfg.estimate_weight * get_togo_cost(net, i, next_idx, src_wire, true, crit_weight); + next_score.togo_cost = const_mode + ? 0 + : cfg.estimate_weight * get_togo_cost(net, i, next_idx, src_wire, + true, crit_weight); if (was_visited_bwd(next_idx, next_score.delay)) { // Don't expand the same node twice. continue; diff --git a/ecp5/pack.cc b/ecp5/pack.cc index 69d7ccf8..7d7c044c 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -240,7 +240,8 @@ class Ecp5Packer ci->disconnectPort(id_M); ci->ports.erase(id_M); } - if (di && di->driver.cell != nullptr && di->driver.cell->type == id_TRELLIS_COMB && di->driver.port == id_F) { + if (di && di->driver.cell != nullptr && di->driver.cell->type == id_TRELLIS_COMB && + di->driver.port == id_F) { CellInfo *comb = di->driver.cell; if (comb->cluster != ClusterId()) { // Special procedure where the comb cell is part of an existing macro diff --git a/gowin/pack.cc b/gowin/pack.cc index d89992cc..951f94f3 100644 --- a/gowin/pack.cc +++ b/gowin/pack.cc @@ -19,9 +19,9 @@ */ #include +#include #include #include -#include #include "cells.h" #include "design_utils.h" #include "log.h" @@ -673,8 +673,8 @@ static void set_net_constant(const Context *ctx, NetInfo *orig, NetInfo *constne uc_init &= (1LL << uc_init_len) - 1; if (ctx->verbose) - log_info("%s lut config modified from 0x%" PRIX64 " to 0x%" PRIX64 "\n", ctx->nameOf(uc), it_param->second.intval, - uc_init); + log_info("%s lut config modified from 0x%" PRIX64 " to 0x%" PRIX64 "\n", ctx->nameOf(uc), + it_param->second.intval, uc_init); it_param->second = Property(uc_init, uc_init_len); uc->ports[user.port].net = nullptr; diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc index c06482c9..24f95338 100644 --- a/gui/fpgaviewwidget.cc +++ b/gui/fpgaviewwidget.cc @@ -574,8 +574,8 @@ void FPGAViewWidget::renderLines(void) } rendererData_->bbGlobal.setX0(-1.0f); rendererData_->bbGlobal.setY0(-1.0f); - rendererData_->bbGlobal.setX1(1.0f * (ctx_->getGridDimX()+1)); - rendererData_->bbGlobal.setY1(1.0f * (ctx_->getGridDimY()+1)); + rendererData_->bbGlobal.setX1(1.0f * (ctx_->getGridDimX() + 1)); + rendererData_->bbGlobal.setY1(1.0f * (ctx_->getGridDimY() + 1)); rendererData_->gfxGrid.last_render++; } if (highlightedOrSelectedChanged) { diff --git a/ice40/arch.cc b/ice40/arch.cc index 6f58cbbd..030849a5 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -674,7 +674,7 @@ bool Arch::place() { cfg.cell_groups.emplace_back(); - auto& comb = cfg.cell_groups.back(); + auto &comb = cfg.cell_groups.back(); comb.name = getCtx()->id("DSP"); comb.cell_area[id_ICESTORM_DSP] = StaticRect(0.9f, 5.0f); comb.bel_area[id_ICESTORM_DSP] = StaticRect(0.9f, 5.0f); diff --git a/nexus/pack.cc b/nexus/pack.cc index dad3722a..9991d49d 100644 --- a/nexus/pack.cc +++ b/nexus/pack.cc @@ -1321,8 +1321,8 @@ struct NexusPacker NetInfo *cin = ci->getPort(id_CIN); if (cin) { if (cin->driver.cell && cin->driver.cell->type != id_CCU2) { - log_error("CCU2 '%s' CIN net '%s' driven by non-CCU2 cell '%s'.\n", - ctx->nameOf(ci), ctx->nameOf(cin), ctx->nameOf(cin->driver.cell)); + log_error("CCU2 '%s' CIN net '%s' driven by non-CCU2 cell '%s'.\n", ctx->nameOf(ci), + ctx->nameOf(cin), ctx->nameOf(cin->driver.cell)); } continue; }