clangformat for stuff I've touched

This commit is contained in:
Eddie Hung 2018-07-31 20:57:36 -07:00
parent f646ec790a
commit 92ec2cd138
9 changed files with 31 additions and 29 deletions

View File

@ -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

View File

@ -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));
}

View File

@ -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);

View File

@ -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);
}
}

View File

@ -636,8 +636,10 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const
// offset = 500;
// }
if (driver.port == id_o) offset += 330;
if (sink.port == id_i0 || sink.port == id_i1 || sink.port == id_i2 || sink.port == id_i3) offset += 260;
if (driver.port == id_o)
offset += 330;
if (sink.port == id_i0 || sink.port == id_i1 || sink.port == id_i2 || sink.port == id_i3)
offset += 260;
return xscale * abs(xd) + yscale * abs(yd) + offset;
}

View File

@ -105,7 +105,8 @@ int main(int argc, char *argv[])
options.add_options()("asc", po::value<std::string>(), "asc bitstream file to write");
options.add_options()("read", po::value<std::string>(), "asc bitstream file to read");
options.add_options()("seed", po::value<int>(), "seed value for random number generator");
options.add_options()("slack_redist_iter", po::value<int>(), "number of iterations between slack redistribution");
options.add_options()("slack_redist_iter", po::value<int>(),
"number of iterations between slack redistribution");
options.add_options()("version,V", "show version");
options.add_options()("tmfuzz", "run path delay estimate fuzzer");
options.add_options()("test", "check architecture database integrity");