aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/cells.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-23 16:12:52 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-23 16:12:52 +0200
commit1e8840b0f9400a1dc17ba6c7496314f82f0db2e1 (patch)
tree73e00ef273a99badcb10c08e28188ab4061d0f47 /ice40/cells.cc
parent727f99267caf3de2d3884f00ac61fad1175705fc (diff)
downloadnextpnr-1e8840b0f9400a1dc17ba6c7496314f82f0db2e1.tar.gz
nextpnr-1e8840b0f9400a1dc17ba6c7496314f82f0db2e1.tar.bz2
nextpnr-1e8840b0f9400a1dc17ba6c7496314f82f0db2e1.zip
Update from increased clangformat line length
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/cells.cc')
-rw-r--r--ice40/cells.cc25
1 files changed, 9 insertions, 16 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc
index f34b7511..faaabba0 100644
--- a/ice40/cells.cc
+++ b/ice40/cells.cc
@@ -24,8 +24,7 @@
NEXTPNR_NAMESPACE_BEGIN
-void add_port(const Context *ctx, CellInfo *cell, std::string name,
- PortType dir)
+void add_port(const Context *ctx, CellInfo *cell, std::string name, PortType dir)
{
IdString id = ctx->id(name);
cell->ports[id] = PortInfo{id, nullptr, dir};
@@ -36,8 +35,7 @@ CellInfo *create_ice_cell(Context *ctx, IdString type, std::string name)
static int auto_idx = 0;
CellInfo *new_cell = new CellInfo();
if (name.empty()) {
- new_cell->name = ctx->id("$nextpnr_" + type.str(ctx) + "_" +
- std::to_string(auto_idx++));
+ new_cell->name = ctx->id("$nextpnr_" + type.str(ctx) + "_" + std::to_string(auto_idx++));
} else {
new_cell->name = ctx->id(name);
}
@@ -143,8 +141,7 @@ void lut_to_lc(const Context *ctx, CellInfo *lut, CellInfo *lc, bool no_dff)
}
}
-void dff_to_lc(const Context *ctx, CellInfo *dff, CellInfo *lc,
- bool pass_thru_lut)
+void dff_to_lc(const Context *ctx, CellInfo *dff, CellInfo *lc, bool pass_thru_lut)
{
lc->params[ctx->id("DFF_ENABLE")] = "1";
std::string config = dff->type.str(ctx).substr(6);
@@ -214,22 +211,18 @@ void nxio_to_sb(Context *ctx, CellInfo *nxio, CellInfo *sbio)
assert(false);
}
NetInfo *donet = sbio->ports.at(ctx->id("D_OUT_0")).net;
- CellInfo *tbuf =
- net_driven_by(ctx, donet,
- [](const Context *ctx, const CellInfo *cell) {
- return cell->type == ctx->id("$_TBUF_");
- },
- ctx->id("Y"));
+ CellInfo *tbuf = net_driven_by(
+ ctx, donet, [](const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("$_TBUF_"); },
+ ctx->id("Y"));
if (tbuf) {
sbio->params[ctx->id("PIN_TYPE")] = "41";
replace_port(tbuf, ctx->id("A"), sbio, ctx->id("D_OUT_0"));
replace_port(tbuf, ctx->id("E"), sbio, ctx->id("OUTPUT_ENABLE"));
ctx->nets.erase(donet->name);
if (!donet->users.empty())
- log_error(
- "unsupported tristate IO pattern for IO buffer '%s', "
- "instantiate SB_IO manually to ensure correct behaviour\n",
- nxio->name.c_str(ctx));
+ log_error("unsupported tristate IO pattern for IO buffer '%s', "
+ "instantiate SB_IO manually to ensure correct behaviour\n",
+ nxio->name.c_str(ctx));
ctx->cells.erase(tbuf->name);
}
}