aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-07-28 14:11:43 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-07-28 14:11:43 -0700
commitbeabb429b0be91c597cb2a9f7726a159a6f40b32 (patch)
treeac314ed94a819bf91dffc3f005e04d6cbf137cb4
parentde6d0d20d7d8e4d79fe1f96bc44945326c230fc4 (diff)
downloadnextpnr-beabb429b0be91c597cb2a9f7726a159a6f40b32.tar.gz
nextpnr-beabb429b0be91c597cb2a9f7726a159a6f40b32.tar.bz2
nextpnr-beabb429b0be91c597cb2a9f7726a159a6f40b32.zip
clangformat
-rw-r--r--common/timing.cc19
-rw-r--r--ice40/arch.cc11
2 files changed, 16 insertions, 14 deletions
diff --git a/common/timing.cc b/common/timing.cc
index 5a9d8c02..c6e2b037 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -28,8 +28,8 @@ NEXTPNR_NAMESPACE_BEGIN
typedef std::list<const PortRef *> PortRefList;
-static delay_t follow_net(Context *ctx, NetInfo *net, int path_length, delay_t slack, bool update,
- delay_t &min_slack, PortRefList *current_path, PortRefList *crit_path);
+static delay_t follow_net(Context *ctx, NetInfo *net, int path_length, delay_t slack, bool update, delay_t &min_slack,
+ PortRefList *current_path, PortRefList *crit_path);
// Follow a path, returning budget to annotate
static delay_t follow_user_port(Context *ctx, PortRef &user, int path_length, delay_t slack, bool update,
@@ -68,8 +68,8 @@ static delay_t follow_user_port(Context *ctx, PortRef &user, int path_length, de
return value;
}
-static delay_t follow_net(Context *ctx, NetInfo *net, int path_length, delay_t slack, bool update,
- delay_t &min_slack, PortRefList *current_path, PortRefList *crit_path)
+static delay_t follow_net(Context *ctx, NetInfo *net, int path_length, delay_t slack, bool update, delay_t &min_slack,
+ PortRefList *current_path, PortRefList *crit_path)
{
delay_t net_budget = slack / (path_length + 1);
for (unsigned i = 0; i < net->users.size(); ++i) {
@@ -84,9 +84,8 @@ static delay_t follow_net(Context *ctx, NetInfo *net, int path_length, delay_t s
pl = std::max(1, path_length);
}
auto delay = ctx->getNetinfoRouteDelay(net, i);
- net_budget = std::min(net_budget,
- follow_user_port(ctx, usr, pl, slack - delay,
- update, min_slack, current_path, crit_path));
+ net_budget = std::min(
+ net_budget, follow_user_port(ctx, usr, pl, slack - delay, update, min_slack, current_path, crit_path));
if (update)
usr.budget = std::min(usr.budget, delay + net_budget);
if (crit_path)
@@ -195,8 +194,10 @@ delay_t timing_analysis(Context *ctx, bool print_fmax, bool print_path)
auto net = port.net;
unsigned i = 0;
for (auto &usr : net->users)
- if (&usr == sink) break;
- else ++i;
+ if (&usr == sink)
+ break;
+ else
+ ++i;
auto &driver = net->driver;
auto driver_cell = driver.cell;
delay_t comb_delay;
diff --git a/ice40/arch.cc b/ice40/arch.cc
index cfafa2d8..2ca8b665 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -585,7 +585,7 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
// }
// Estimate for output mux
- for (const auto& bp : getWireBelPins(src)) {
+ for (const auto &bp : getWireBelPins(src)) {
if (bp.pin == PIN_O && getBelType(bp.bel) == TYPE_ICESTORM_LC) {
offset += 330;
break;
@@ -593,8 +593,9 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
}
// Estimate for input mux
- for (const auto& bp : getWireBelPins(dst)) {
- if ((bp.pin == PIN_I0 || bp.pin == PIN_I1 || bp.pin == PIN_I2 || bp.pin == PIN_I3) && getBelType(bp.bel) == TYPE_ICESTORM_LC) {
+ for (const auto &bp : getWireBelPins(dst)) {
+ if ((bp.pin == PIN_I0 || bp.pin == PIN_I1 || bp.pin == PIN_I2 || bp.pin == PIN_I3) &&
+ getBelType(bp.bel) == TYPE_ICESTORM_LC) {
offset += 260;
break;
}
@@ -605,9 +606,9 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
delay_t Arch::getBudgetOverride(NetInfo *net_info, int user_idx, delay_t budget) const
{
- const auto& driver = net_info->driver;
+ const auto &driver = net_info->driver;
if (driver.port == id_cout) {
- const auto& sink = net_info->users[user_idx];
+ const auto &sink = net_info->users[user_idx];
auto driver_loc = getBelLocation(driver.cell->bel);
auto sink_loc = getBelLocation(sink.cell->bel);
if (driver_loc.y == sink_loc.y)