aboutsummaryrefslogtreecommitdiffstats
path: root/common/design_utils.h
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 /common/design_utils.h
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 'common/design_utils.h')
-rw-r--r--common/design_utils.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/common/design_utils.h b/common/design_utils.h
index 13e4ec1d..cb802a1a 100644
--- a/common/design_utils.h
+++ b/common/design_utils.h
@@ -32,8 +32,7 @@ Utilities for design manipulation, intended for use inside packing algorithms
*/
// Disconnect a net (if connected) from old, and connect it to rep
-void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell,
- IdString rep_name);
+void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell, IdString rep_name);
// If a net drives a given port of a cell matching a predicate (in many
// cases more than one cell type, e.g. SB_DFFxx so a predicate is used), return
@@ -41,8 +40,7 @@ void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell,
// true, then this cell must be the only load. If ignore_cell is set, that cell
// is not considered
template <typename F1>
-CellInfo *net_only_drives(const Context *ctx, NetInfo *net, F1 cell_pred,
- IdString port, bool exclusive = false,
+CellInfo *net_only_drives(const Context *ctx, NetInfo *net, F1 cell_pred, IdString port, bool exclusive = false,
CellInfo *exclude = nullptr)
{
if (net == nullptr)
@@ -56,16 +54,13 @@ CellInfo *net_only_drives(const Context *ctx, NetInfo *net, F1 cell_pred,
return nullptr;
} else if (net->users.size() == 2) {
if (std::find_if(net->users.begin(), net->users.end(),
- [exclude](const PortRef &ref) {
- return ref.cell == exclude;
- }) == net->users.end())
+ [exclude](const PortRef &ref) { return ref.cell == exclude; }) == net->users.end())
return nullptr;
}
}
}
for (const auto &load : net->users) {
- if (load.cell != exclude && cell_pred(ctx, load.cell) &&
- load.port == port) {
+ if (load.cell != exclude && cell_pred(ctx, load.cell) && load.port == port) {
return load.cell;
}
}
@@ -74,9 +69,7 @@ CellInfo *net_only_drives(const Context *ctx, NetInfo *net, F1 cell_pred,
// If a net is driven by a given port of a cell matching a predicate, return
// that cell, otherwise nullptr
-template <typename F1>
-CellInfo *net_driven_by(const Context *ctx, const NetInfo *net, F1 cell_pred,
- IdString port)
+template <typename F1> CellInfo *net_driven_by(const Context *ctx, const NetInfo *net, F1 cell_pred, IdString port)
{
if (net == nullptr)
return nullptr;