mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-02-10 18:30:11 +00:00
Improve log messages, move many messages to verbose mode
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
@@ -64,11 +64,13 @@ void print_utilisation(const Context *ctx)
|
||||
for (auto bel : ctx->getBels()) {
|
||||
available_types[ctx->getBelType(bel)]++;
|
||||
}
|
||||
log("\nDesign utilisation:\n");
|
||||
log_break();
|
||||
log_info("Device utilisation:\n");
|
||||
for (auto type : available_types) {
|
||||
log("\t%20s: %5d/%5d\n", ctx->belTypeToId(type.first).c_str(ctx),
|
||||
get_or_default(used_types, type.first, 0), type.second);
|
||||
log_info("\t%20s: %5d/%5d\n", ctx->belTypeToId(type.first).c_str(ctx),
|
||||
get_or_default(used_types, type.first, 0), type.second);
|
||||
}
|
||||
log_break();
|
||||
}
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
|
||||
@@ -212,7 +212,7 @@ void log_cmd_error(const char *format, ...)
|
||||
logv_error(format, ap);
|
||||
}
|
||||
|
||||
void log_spacer()
|
||||
void log_break()
|
||||
{
|
||||
if (log_newline_count < 2)
|
||||
log("\n");
|
||||
@@ -220,12 +220,6 @@ void log_spacer()
|
||||
log("\n");
|
||||
}
|
||||
|
||||
void log_push() {}
|
||||
|
||||
void log_pop() { log_flush(); }
|
||||
|
||||
void log_reset_stack() { log_flush(); }
|
||||
|
||||
void log_flush()
|
||||
{
|
||||
for (auto f : log_files)
|
||||
@@ -235,8 +229,4 @@ void log_flush()
|
||||
f->flush();
|
||||
}
|
||||
|
||||
void log_cell(CellInfo *cell, std::string indent) {}
|
||||
|
||||
void log_net(NetInfo *net, std::string indent) {}
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
|
||||
18
common/log.h
18
common/log.h
@@ -71,25 +71,9 @@ NXP_NORETURN void log_error(const char *format, ...)
|
||||
NXP_NORETURN void log_cmd_error(const char *format, ...)
|
||||
NXP_ATTRIBUTE(format(printf, 1, 2), noreturn);
|
||||
|
||||
void log_spacer();
|
||||
void log_push();
|
||||
void log_pop();
|
||||
|
||||
void log_backtrace(const char *prefix, int levels);
|
||||
void log_reset_stack();
|
||||
void log_break();
|
||||
void log_flush();
|
||||
|
||||
/*
|
||||
const char *log_id(RTLIL::IdString id);
|
||||
|
||||
template<typename T> static inline const char *log_id(T *obj) {
|
||||
return log_id(obj->name);
|
||||
}
|
||||
*/
|
||||
|
||||
void log_cell(CellInfo *cell, std::string indent = "");
|
||||
void log_net(NetInfo *net, std::string indent = "");
|
||||
|
||||
#ifndef NDEBUG
|
||||
static inline void log_assert_worker(bool cond, const char *expr,
|
||||
const char *file, int line)
|
||||
|
||||
@@ -77,6 +77,8 @@ class SAPlacer
|
||||
|
||||
bool place()
|
||||
{
|
||||
log_break();
|
||||
|
||||
size_t placed_cells = 0;
|
||||
// Initial constraints placer
|
||||
for (auto cell_entry : ctx->cells) {
|
||||
@@ -408,9 +410,9 @@ class SAPlacer
|
||||
delta = new_wirelength - curr_wirelength;
|
||||
n_move++;
|
||||
// SA acceptance criterea
|
||||
if (delta < 0 ||
|
||||
(temp > 1e-6 && (ctx->rng() / float(0x3fffffff)) <=
|
||||
std::exp(-(delta / 2) / temp))) {
|
||||
if (delta < 0 || (temp > 1e-6 &&
|
||||
(ctx->rng() / float(0x3fffffff)) <=
|
||||
std::exp(-(delta / 2) / temp))) {
|
||||
n_accept++;
|
||||
if (delta < 2)
|
||||
improved = true;
|
||||
|
||||
@@ -406,6 +406,7 @@ bool route_design(Context *ctx)
|
||||
delay_t ripup_penalty = ctx->getRipupDelayPenalty();
|
||||
RipupScoreboard scores;
|
||||
|
||||
log_break();
|
||||
log_info("Routing..\n");
|
||||
|
||||
std::unordered_set<IdString> netsQueue;
|
||||
|
||||
Reference in New Issue
Block a user