Updates from clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
bfae4663fc
commit
2c98231f88
@ -69,8 +69,8 @@ void print_utilisation(const Context *ctx)
|
|||||||
for (auto type : available_types) {
|
for (auto type : available_types) {
|
||||||
IdString type_id = ctx->belTypeToId(type.first);
|
IdString type_id = ctx->belTypeToId(type.first);
|
||||||
int used_bels = get_or_default(used_types, type.first, 0);
|
int used_bels = get_or_default(used_types, type.first, 0);
|
||||||
log_info("\t%20s: %5d/%5d %5d%%\n", type_id.c_str(ctx),
|
log_info("\t%20s: %5d/%5d %5d%%\n", type_id.c_str(ctx), used_bels,
|
||||||
used_bels, type.second, 100*used_bels/type.second);
|
type.second, 100 * used_bels / type.second);
|
||||||
}
|
}
|
||||||
log_break();
|
log_break();
|
||||||
}
|
}
|
||||||
|
@ -66,8 +66,7 @@ uint32_t Context::checksum() const
|
|||||||
uint32_t cksum = xorshift32(123456789);
|
uint32_t cksum = xorshift32(123456789);
|
||||||
|
|
||||||
uint32_t cksum_nets_sum = 0;
|
uint32_t cksum_nets_sum = 0;
|
||||||
for (auto &it : nets)
|
for (auto &it : nets) {
|
||||||
{
|
|
||||||
auto &ni = *it.second;
|
auto &ni = *it.second;
|
||||||
uint32_t x = 123456789;
|
uint32_t x = 123456789;
|
||||||
x = xorshift32(x + xorshift32(it.first.index));
|
x = xorshift32(x + xorshift32(it.first.index));
|
||||||
@ -117,8 +116,7 @@ uint32_t Context::checksum() const
|
|||||||
cksum = xorshift32(cksum + xorshift32(cksum_nets_sum));
|
cksum = xorshift32(cksum + xorshift32(cksum_nets_sum));
|
||||||
|
|
||||||
uint32_t cksum_cells_sum = 0;
|
uint32_t cksum_cells_sum = 0;
|
||||||
for (auto &it : cells)
|
for (auto &it : cells) {
|
||||||
{
|
|
||||||
auto &ci = *it.second;
|
auto &ci = *it.second;
|
||||||
uint32_t x = 123456789;
|
uint32_t x = 123456789;
|
||||||
x = xorshift32(x + xorshift32(it.first.index));
|
x = xorshift32(x + xorshift32(it.first.index));
|
||||||
@ -131,7 +129,8 @@ uint32_t Context::checksum() const
|
|||||||
port_x = xorshift32(port_x + xorshift32(p.first.index));
|
port_x = xorshift32(port_x + xorshift32(p.first.index));
|
||||||
port_x = xorshift32(port_x + xorshift32(p.second.name.index));
|
port_x = xorshift32(port_x + xorshift32(p.second.name.index));
|
||||||
if (p.second.net)
|
if (p.second.net)
|
||||||
port_x = xorshift32(port_x + xorshift32(p.second.net->name.index));
|
port_x = xorshift32(port_x +
|
||||||
|
xorshift32(p.second.net->name.index));
|
||||||
port_x = xorshift32(port_x + xorshift32(p.second.type));
|
port_x = xorshift32(port_x + xorshift32(p.second.type));
|
||||||
port_x_sum += port_x;
|
port_x_sum += port_x;
|
||||||
}
|
}
|
||||||
|
@ -129,12 +129,13 @@ struct Router
|
|||||||
int thisVisitCnt = 0;
|
int thisVisitCnt = 0;
|
||||||
int thisVisitCntLimit = 0;
|
int thisVisitCntLimit = 0;
|
||||||
|
|
||||||
while (!queue.empty() && (thisVisitCntLimit == 0 || thisVisitCnt < thisVisitCntLimit)) {
|
while (!queue.empty() &&
|
||||||
|
(thisVisitCntLimit == 0 || thisVisitCnt < thisVisitCntLimit)) {
|
||||||
QueuedWire qw = queue.top();
|
QueuedWire qw = queue.top();
|
||||||
queue.pop();
|
queue.pop();
|
||||||
|
|
||||||
if (thisVisitCntLimit == 0 && visited.count(dst_wire))
|
if (thisVisitCntLimit == 0 && visited.count(dst_wire))
|
||||||
thisVisitCntLimit = (thisVisitCnt*3)/2;
|
thisVisitCntLimit = (thisVisitCnt * 3) / 2;
|
||||||
|
|
||||||
for (auto pip : ctx->getPipsDownhill(qw.wire)) {
|
for (auto pip : ctx->getPipsDownhill(qw.wire)) {
|
||||||
delay_t next_delay =
|
delay_t next_delay =
|
||||||
@ -500,7 +501,8 @@ bool route_design(Context *ctx)
|
|||||||
if (ctx->verbose)
|
if (ctx->verbose)
|
||||||
log_info("-- %d --\n", iterCnt);
|
log_info("-- %d --\n", iterCnt);
|
||||||
|
|
||||||
int visitCnt = 0, revisitCnt = 0, overtimeRevisitCnt = 0, netCnt = 0;
|
int visitCnt = 0, revisitCnt = 0, overtimeRevisitCnt = 0,
|
||||||
|
netCnt = 0;
|
||||||
|
|
||||||
std::unordered_set<IdString> ripupQueue;
|
std::unordered_set<IdString> ripupQueue;
|
||||||
|
|
||||||
@ -549,8 +551,10 @@ bool route_design(Context *ctx)
|
|||||||
netCnt, normalRouteCnt, int(ripupQueue.size()));
|
netCnt, normalRouteCnt, int(ripupQueue.size()));
|
||||||
|
|
||||||
if (ctx->verbose)
|
if (ctx->verbose)
|
||||||
log_info(" visited %d PIPs (%.2f%% revisits, %.2f%% overtime revisits).\n",
|
log_info(" visited %d PIPs (%.2f%% revisits, %.2f%% overtime "
|
||||||
visitCnt, (100.0 * revisitCnt) / visitCnt, (100.0 * overtimeRevisitCnt) / visitCnt);
|
"revisits).\n",
|
||||||
|
visitCnt, (100.0 * revisitCnt) / visitCnt,
|
||||||
|
(100.0 * overtimeRevisitCnt) / visitCnt);
|
||||||
|
|
||||||
if (!ripupQueue.empty()) {
|
if (!ripupQueue.empty()) {
|
||||||
if (ctx->verbose || iterCnt == 1)
|
if (ctx->verbose || iterCnt == 1)
|
||||||
@ -616,8 +620,10 @@ bool route_design(Context *ctx)
|
|||||||
ripCnt);
|
ripCnt);
|
||||||
|
|
||||||
if (ctx->verbose)
|
if (ctx->verbose)
|
||||||
log_info(" visited %d PIPs (%.2f%% revisits, %.2f%% overtime revisits).\n",
|
log_info(" visited %d PIPs (%.2f%% revisits, %.2f%% "
|
||||||
visitCnt, (100.0 * revisitCnt) / visitCnt, (100.0 * overtimeRevisitCnt) / visitCnt);
|
"overtime revisits).\n",
|
||||||
|
visitCnt, (100.0 * revisitCnt) / visitCnt,
|
||||||
|
(100.0 * overtimeRevisitCnt) / visitCnt);
|
||||||
|
|
||||||
if (ctx->verbose && !netsQueue.empty())
|
if (ctx->verbose && !netsQueue.empty())
|
||||||
log_info(" ripped up %d previously routed nets. continue "
|
log_info(" ripped up %d previously routed nets. continue "
|
||||||
|
15
ice40/arch.h
15
ice40/arch.h
@ -515,10 +515,7 @@ struct Arch : BaseCtx
|
|||||||
return id(chip_info->bel_data[bel.index].name.get());
|
return id(chip_info->bel_data[bel.index].name.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getBelChecksum(BelId bel) const
|
uint32_t getBelChecksum(BelId bel) const { return bel.index; }
|
||||||
{
|
|
||||||
return bel.index;
|
|
||||||
}
|
|
||||||
|
|
||||||
void bindBel(BelId bel, IdString cell)
|
void bindBel(BelId bel, IdString cell)
|
||||||
{
|
{
|
||||||
@ -612,10 +609,7 @@ struct Arch : BaseCtx
|
|||||||
return id(chip_info->wire_data[wire.index].name.get());
|
return id(chip_info->wire_data[wire.index].name.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getWireChecksum(WireId wire) const
|
uint32_t getWireChecksum(WireId wire) const { return wire.index; }
|
||||||
{
|
|
||||||
return wire.index;
|
|
||||||
}
|
|
||||||
|
|
||||||
void bindWire(WireId wire, IdString net)
|
void bindWire(WireId wire, IdString net)
|
||||||
{
|
{
|
||||||
@ -656,10 +650,7 @@ struct Arch : BaseCtx
|
|||||||
PipId getPipByName(IdString name) const;
|
PipId getPipByName(IdString name) const;
|
||||||
IdString getPipName(PipId pip) const;
|
IdString getPipName(PipId pip) const;
|
||||||
|
|
||||||
uint32_t getPipChecksum(PipId pip) const
|
uint32_t getPipChecksum(PipId pip) const { return pip.index; }
|
||||||
{
|
|
||||||
return pip.index;
|
|
||||||
}
|
|
||||||
|
|
||||||
void bindPip(PipId pip, IdString net)
|
void bindPip(PipId pip, IdString net)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user