clangformat
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
parent
176a23936c
commit
082b8bf272
@ -156,7 +156,8 @@ bool place_single_cell(Context *ctx, CellInfo *cell, bool require_legality)
|
|||||||
all_placed = true;
|
all_placed = true;
|
||||||
}
|
}
|
||||||
if (ctx->verbose)
|
if (ctx->verbose)
|
||||||
log_info(" placed single cell '%s' at '%s'\n", cell->name.c_str(ctx), ctx->getBelName(best_bel).c_str(ctx));
|
log_info(" placed single cell '%s' at '%s'\n", cell->name.c_str(ctx),
|
||||||
|
ctx->getBelName(best_bel).c_str(ctx));
|
||||||
ctx->bindBel(best_bel, cell->name, STRENGTH_WEAK);
|
ctx->bindBel(best_bel, cell->name, STRENGTH_WEAK);
|
||||||
|
|
||||||
cell = ripup_target;
|
cell = ripup_target;
|
||||||
@ -452,7 +453,6 @@ class ConstraintLegaliseWorker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool legalise_constraints()
|
bool legalise_constraints()
|
||||||
{
|
{
|
||||||
log_info("Legalising relative constraints...\n");
|
log_info("Legalising relative constraints...\n");
|
||||||
@ -472,8 +472,7 @@ class ConstraintLegaliseWorker
|
|||||||
for (auto rippedCell : rippedCells) {
|
for (auto rippedCell : rippedCells) {
|
||||||
bool res = place_single_cell(ctx, ctx->cells.at(rippedCell).get(), true);
|
bool res = place_single_cell(ctx, ctx->cells.at(rippedCell).get(), true);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
log_error("failed to place cell '%s' after relative constraint legalisation\n",
|
log_error("failed to place cell '%s' after relative constraint legalisation\n", rippedCell.c_str(ctx));
|
||||||
rippedCell.c_str(ctx));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ NEXTPNR_NAMESPACE_BEGIN
|
|||||||
|
|
||||||
class SAPlacer
|
class SAPlacer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SAPlacer(Context *ctx, Placer1Cfg cfg) : ctx(ctx), cfg(cfg)
|
SAPlacer(Context *ctx, Placer1Cfg cfg) : ctx(ctx), cfg(cfg)
|
||||||
{
|
{
|
||||||
int num_bel_types = 0;
|
int num_bel_types = 0;
|
||||||
@ -60,11 +60,11 @@ public:
|
|||||||
type_idx = bel_types.at(type);
|
type_idx = bel_types.at(type);
|
||||||
}
|
}
|
||||||
if (int(fast_bels.size()) < type_idx + 1)
|
if (int(fast_bels.size()) < type_idx + 1)
|
||||||
fast_bels.resize(type_idx + 1);
|
fast_bels.resize(type_idx + 1);
|
||||||
if (int(fast_bels.at(type_idx).size()) < (loc.x + 1))
|
if (int(fast_bels.at(type_idx).size()) < (loc.x + 1))
|
||||||
fast_bels.at(type_idx).resize(loc.x + 1);
|
fast_bels.at(type_idx).resize(loc.x + 1);
|
||||||
if (int(fast_bels.at(type_idx).at(loc.x).size()) < (loc.y + 1))
|
if (int(fast_bels.at(type_idx).at(loc.x).size()) < (loc.y + 1))
|
||||||
fast_bels.at(type_idx).at(loc.x).resize(loc.y + 1);
|
fast_bels.at(type_idx).at(loc.x).resize(loc.y + 1);
|
||||||
max_x = std::max(max_x, loc.x);
|
max_x = std::max(max_x, loc.x);
|
||||||
max_y = std::max(max_y, loc.y);
|
max_y = std::max(max_y, loc.y);
|
||||||
fast_bels.at(type_idx).at(loc.x).at(loc.y).push_back(bel);
|
fast_bels.at(type_idx).at(loc.x).at(loc.y).push_back(bel);
|
||||||
@ -281,7 +281,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Initial random placement
|
// Initial random placement
|
||||||
void place_initial(CellInfo *cell)
|
void place_initial(CellInfo *cell)
|
||||||
{
|
{
|
||||||
@ -290,7 +290,7 @@ private:
|
|||||||
while (!all_placed) {
|
while (!all_placed) {
|
||||||
BelId best_bel = BelId();
|
BelId best_bel = BelId();
|
||||||
uint64_t best_score = std::numeric_limits<uint64_t>::max(),
|
uint64_t best_score = std::numeric_limits<uint64_t>::max(),
|
||||||
best_ripup_score = std::numeric_limits<uint64_t>::max();
|
best_ripup_score = std::numeric_limits<uint64_t>::max();
|
||||||
CellInfo *ripup_target = nullptr;
|
CellInfo *ripup_target = nullptr;
|
||||||
BelId ripup_bel = BelId();
|
BelId ripup_bel = BelId();
|
||||||
if (cell->bel != BelId()) {
|
if (cell->bel != BelId()) {
|
||||||
@ -410,7 +410,7 @@ private:
|
|||||||
metrics.at(new_wl.first) = new_wl.second;
|
metrics.at(new_wl.first) = new_wl.second;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
swap_fail:
|
swap_fail:
|
||||||
ctx->bindBel(oldBel, cell->name, STRENGTH_WEAK);
|
ctx->bindBel(oldBel, cell->name, STRENGTH_WEAK);
|
||||||
if (other != IdString()) {
|
if (other != IdString()) {
|
||||||
ctx->bindBel(newBel, other, STRENGTH_WEAK);
|
ctx->bindBel(newBel, other, STRENGTH_WEAK);
|
||||||
|
@ -659,7 +659,8 @@ delay_t Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, de
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
bool Arch::place() {
|
bool Arch::place()
|
||||||
|
{
|
||||||
Placer1Cfg cfg;
|
Placer1Cfg cfg;
|
||||||
cfg.constraintWeight = placer_constraintWeight;
|
cfg.constraintWeight = placer_constraintWeight;
|
||||||
return placer1(getCtx(), cfg);
|
return placer1(getCtx(), cfg);
|
||||||
|
@ -799,7 +799,6 @@ struct Arch : BaseCtx
|
|||||||
}
|
}
|
||||||
|
|
||||||
float placer_constraintWeight = 10;
|
float placer_constraintWeight = 10;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
@ -106,7 +106,8 @@ int main(int argc, char *argv[])
|
|||||||
options.add_options()("seed", po::value<int>(), "seed value for random number generator");
|
options.add_options()("seed", po::value<int>(), "seed value for random number generator");
|
||||||
options.add_options()("slack_redist_iter", po::value<int>(),
|
options.add_options()("slack_redist_iter", po::value<int>(),
|
||||||
"number of iterations between slack redistribution");
|
"number of iterations between slack redistribution");
|
||||||
options.add_options()("cstrweight", po::value<float>(), "placer weighting for relative constraint satisfaction");
|
options.add_options()("cstrweight", po::value<float>(),
|
||||||
|
"placer weighting for relative constraint satisfaction");
|
||||||
|
|
||||||
options.add_options()("version,V", "show version");
|
options.add_options()("version,V", "show version");
|
||||||
options.add_options()("tmfuzz", "run path delay estimate fuzzer");
|
options.add_options()("tmfuzz", "run path delay estimate fuzzer");
|
||||||
|
Loading…
Reference in New Issue
Block a user