mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-04-29 21:26:40 +00:00
clangformat for stuff I've touched
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user