From dbaabae23594dc3ac058abeb9f3de2db756a4636 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 6 Dec 2018 10:51:17 +0000 Subject: ice40: Put debug logging behind ctx->debug Signed-off-by: David Shah --- ice40/chains.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ice40/chains.cc') diff --git a/ice40/chains.cc b/ice40/chains.cc index 3ef367f1..b3b54d6b 100644 --- a/ice40/chains.cc +++ b/ice40/chains.cc @@ -134,11 +134,13 @@ class ChainConstrainer // Find the user corresponding to the next CIN int replaced_ports = 0; - log_info("cell: %s\n", cin_cell->name.c_str(ctx)); + if (ctx->debug) + log_info("cell: %s\n", cin_cell->name.c_str(ctx)); for (auto port : {id_CIN, id_I3}) { auto &usr = lc->ports.at(id_O).net->users; - for (auto user : usr) - log_info("%s.%s\n", user.cell->name.c_str(ctx), user.port.c_str(ctx)); + if (ctx->debug) + for (auto user : usr) + log_info("%s.%s\n", user.cell->name.c_str(ctx), user.port.c_str(ctx)); auto fnd_user = std::find_if(usr.begin(), usr.end(), [&](const PortRef &pr) { return pr.cell == cin_cell && pr.port == port; }); if (fnd_user != usr.end()) { -- cgit v1.2.3