From fa77a5ae4a714e738b65186eb73c7650c3447163 Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 24 Jun 2019 11:43:01 +0100 Subject: clangformat Signed-off-by: David Shah --- common/timing.cc | 3 ++- gui/application.cc | 4 ++-- ice40/bitstream.cc | 5 +++-- ice40/cells.h | 5 ++++- ice40/pack.cc | 8 +++++--- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/common/timing.cc b/common/timing.cc index 997061e6..e67ac231 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -546,7 +546,8 @@ struct Timing for (size_t i = 0; i < sink_net->users.size(); i++) { auto &user = sink_net->users.at(i); if (user.cell == drv.cell && user.port == port.first) { - sink_nd.min_required.at(i) = std::min(sink_nd.min_required.at(i), net_min_required - comb_delay.maxDelay()); + sink_nd.min_required.at(i) = std::min(sink_nd.min_required.at(i), + net_min_required - comb_delay.maxDelay()); break; } } diff --git a/gui/application.cc b/gui/application.cc index d5f0f6a9..33a106bc 100644 --- a/gui/application.cc +++ b/gui/application.cc @@ -20,12 +20,12 @@ */ #include "application.h" -#include "log.h" -#include #include +#include #include #include #include +#include "log.h" NEXTPNR_NAMESPACE_BEGIN diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc index d35c43aa..7632b443 100644 --- a/ice40/bitstream.cc +++ b/ice40/bitstream.cc @@ -611,10 +611,11 @@ void write_asc(const Context *ctx, std::ostream &out) set_config(ti_ramt, config.at(y + 1).at(x), "RamConfig.CBIT_2", read_mode & 0x1); set_config(ti_ramt, config.at(y + 1).at(x), "RamConfig.CBIT_3", read_mode & 0x2); } else if (cell.second->type == ctx->id("SB_LED_DRV_CUR")) { - set_ec_cbit(config, ctx, get_ec_config(ctx->chip_info, cell.second->bel), "LED_DRV_CUR_EN", true, "IpConfig."); + set_ec_cbit(config, ctx, get_ec_config(ctx->chip_info, cell.second->bel), "LED_DRV_CUR_EN", true, + "IpConfig."); } else if (cell.second->type == ctx->id("SB_RGB_DRV")) { const std::vector> rgb_params = { - {"RGB0_CURRENT", 6}, {"RGB1_CURRENT", 6}, {"RGB2_CURRENT", 6}}; + {"RGB0_CURRENT", 6}, {"RGB1_CURRENT", 6}, {"RGB2_CURRENT", 6}}; configure_extra_cell(config, ctx, cell.second.get(), rgb_params, true, std::string("IpConfig.")); set_ec_cbit(config, ctx, get_ec_config(ctx->chip_info, cell.second->bel), "RGB_DRV_EN", true, "IpConfig."); } else if (cell.second->type == ctx->id("SB_RGBA_DRV")) { diff --git a/ice40/cells.h b/ice40/cells.h index 25a98573..3d9358da 100644 --- a/ice40/cells.h +++ b/ice40/cells.h @@ -78,7 +78,10 @@ inline bool is_sb_rgba_drv(const BaseCtx *ctx, const CellInfo *cell) { return ce inline bool is_sb_rgb_drv(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_RGB_DRV"); } -inline bool is_sb_led_drv_cur(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_LED_DRV_CUR"); } +inline bool is_sb_led_drv_cur(const BaseCtx *ctx, const CellInfo *cell) +{ + return cell->type == ctx->id("SB_LED_DRV_CUR"); +} inline bool is_sb_ledda_ip(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_LEDDA_IP"); } diff --git a/ice40/pack.cc b/ice40/pack.cc index 9a77048b..f520b295 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -450,7 +450,8 @@ static void pack_io(Context *ctx) } else if (ci->type == ctx->id("$nextpnr_obuf")) { NetInfo *net = ci->ports.at(ctx->id("I")).net; sb = net_only_drives(ctx, net, is_ice_iob, ctx->id("PACKAGE_PIN"), true, ci); - if (net && net->driver.cell && (is_sb_rgba_drv(ctx, net->driver.cell) || is_sb_rgb_drv(ctx, net->driver.cell))) + if (net && net->driver.cell && + (is_sb_rgba_drv(ctx, net->driver.cell) || is_sb_rgb_drv(ctx, net->driver.cell))) rgb = net->driver.cell; } if (sb != nullptr) { @@ -476,7 +477,8 @@ static void pack_io(Context *ctx) } } } else if (rgb != nullptr) { - log_info("%s use by SB_RGBA_DRV/SB_RGB_DRV %s, not creating SB_IO\n", ci->name.c_str(ctx), rgb->name.c_str(ctx)); + log_info("%s use by SB_RGBA_DRV/SB_RGB_DRV %s, not creating SB_IO\n", ci->name.c_str(ctx), + rgb->name.c_str(ctx)); disconnect_port(ctx, ci, ctx->id("I")); packed_cells.insert(ci->name); continue; @@ -1157,7 +1159,7 @@ static void pack_special(Context *ctx) } if (is_sb_rgb_drv(ctx, ci) && !ci->ledInfo.ledCurConnected) - log_error("Port RGBPU of SB_RGB_DRV should be driven by port LEDPU of SB_LED_DRV_CUR!\n"); + log_error("Port RGBPU of SB_RGB_DRV should be driven by port LEDPU of SB_LED_DRV_CUR!\n"); ci->ports.erase(ctx->id("RGBPU")); ci->ports.erase(ctx->id("RGB0")); -- cgit v1.2.3