aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-07-31 20:57:36 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-07-31 20:57:36 -0700
commit92ec2cd13825ef996ebf0d88246d975a19352800 (patch)
treedb4a1c7447eff669bf47c64de95747b3edab6438 /common
parentf646ec790a79f29d6964f3b7e30088f044b4a4e9 (diff)
downloadnextpnr-92ec2cd13825ef996ebf0d88246d975a19352800.tar.gz
nextpnr-92ec2cd13825ef996ebf0d88246d975a19352800.tar.bz2
nextpnr-92ec2cd13825ef996ebf0d88246d975a19352800.zip
clangformat for stuff I've touched
Diffstat (limited to 'common')
-rw-r--r--common/nextpnr.cc4
-rw-r--r--common/nextpnr.h9
-rw-r--r--common/place_common.cc3
-rw-r--r--common/router1.cc3
-rw-r--r--common/timing.cc8
5 files changed, 13 insertions, 14 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index 4e15a594..dbea26d8 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -70,7 +70,7 @@ WireId Context::getNetinfoSourceWire(const NetInfo *net_info) const
return getBelPinWire(src_bel, portPinFromId(driver_port));
}
-WireId Context::getNetinfoSinkWire(const NetInfo *net_info, const PortRef& user_info) const
+WireId Context::getNetinfoSinkWire(const NetInfo *net_info, const PortRef &user_info) const
{
auto dst_bel = user_info.cell->bel;
@@ -87,7 +87,7 @@ WireId Context::getNetinfoSinkWire(const NetInfo *net_info, const PortRef& user_
return getBelPinWire(dst_bel, portPinFromId(user_port));
}
-delay_t Context::getNetinfoRouteDelay(const NetInfo *net_info, const PortRef& user_info) const
+delay_t Context::getNetinfoRouteDelay(const NetInfo *net_info, const PortRef &user_info) const
{
WireId src_wire = getNetinfoSourceWire(net_info);
if (src_wire == WireId())
diff --git a/common/nextpnr.h b/common/nextpnr.h
index 9044e545..f01173e6 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -205,10 +205,7 @@ struct DecalXY
DecalId decal;
float x = 0, y = 0;
- bool operator==(const DecalXY &other) const
- {
- return (decal == other.decal && x == other.x && y == other.y);
- }
+ bool operator==(const DecalXY &other) const { return (decal == other.decal && x == other.x && y == other.y); }
};
struct BelPin
@@ -483,8 +480,8 @@ struct Context : Arch, DeterministicRNG
// --------------------------------------------------------------
WireId getNetinfoSourceWire(const NetInfo *net_info) const;
- WireId getNetinfoSinkWire(const NetInfo *net_info, const PortRef& sink) const;
- delay_t getNetinfoRouteDelay(const NetInfo *net_info, const PortRef& sink) const;
+ WireId getNetinfoSinkWire(const NetInfo *net_info, const PortRef &sink) const;
+ delay_t getNetinfoRouteDelay(const NetInfo *net_info, const PortRef &sink) const;
// provided by router1.cc
bool getActualRouteDelay(WireId src_wire, WireId dst_wire, delay_t &delay);
diff --git a/common/place_common.cc b/common/place_common.cc
index b8886e1b..fd38429f 100644
--- a/common/place_common.cc
+++ b/common/place_common.cc
@@ -66,7 +66,8 @@ wirelen_t get_net_metric(const Context *ctx, const NetInfo *net, MetricType type
ymax = std::max(ymax, load_loc.y);
}
if (ctx->timing_driven && type == MetricType::COST) {
- wirelength = wirelen_t((((ymax - ymin) + (xmax - xmin)) * std::min(5.0, (1.0 + std::exp(-ctx->getDelayNS(worst_slack) / 5)))));
+ wirelength = wirelen_t(
+ (((ymax - ymin) + (xmax - xmin)) * std::min(5.0, (1.0 + std::exp(-ctx->getDelayNS(worst_slack) / 5)))));
} else {
wirelength = wirelen_t((ymax - ymin) + (xmax - xmin));
}
diff --git a/common/router1.cc b/common/router1.cc
index 3a55afcd..a246f1d3 100644
--- a/common/router1.cc
+++ b/common/router1.cc
@@ -779,7 +779,8 @@ bool router1(Context *ctx)
if (ctx->verbose)
log_info(" arc %s -> %s has %f ns slack (delay %f, budget %f)\n",
ctx->getWireName(ctx->getNetinfoSourceWire(net_info)).c_str(ctx),
- ctx->getWireName(ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx])).c_str(ctx),
+ ctx->getWireName(ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx]))
+ .c_str(ctx),
ctx->getDelayNS(arc_slack), ctx->getDelayNS(arc_delay),
ctx->getDelayNS(arc_budget));
tns += ctx->getDelayNS(arc_slack);
diff --git a/common/timing.cc b/common/timing.cc
index be57f445..2beaeee9 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -57,8 +57,8 @@ static delay_t follow_user_port(Context *ctx, PortRef &user, int path_length, de
if (is_path) {
NetInfo *net = port.second.net;
if (net) {
- delay_t path_budget = follow_net(ctx, net, path_length, slack - comb_delay.maxDelay(), update, min_slack,
- current_path, crit_path);
+ delay_t path_budget = follow_net(ctx, net, path_length, slack - comb_delay.maxDelay(), update,
+ min_slack, current_path, crit_path);
value = std::min(value, path_budget);
}
}
@@ -162,8 +162,8 @@ void assign_budget(Context *ctx, bool quiet)
if (!ctx->user_freq && ctx->slack_redist_iter > 0) {
ctx->target_freq = 1e12 / (default_slack - min_slack);
/*if (ctx->verbose)*/
- log_info("minimum slack for this assign = %d, target Fmax for next update = %.2f MHz\n", min_slack,
- ctx->target_freq / 1e6);
+ log_info("minimum slack for this assign = %d, target Fmax for next update = %.2f MHz\n", min_slack,
+ ctx->target_freq / 1e6);
}
if (!quiet)