mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-24 10:21:29 +00:00
Remove .c_str() calls from parameters to log_warning()/log_warning_noprefix()
This commit is contained in:
parent
d1fd6de6da
commit
a7c46f7b4a
25 changed files with 54 additions and 54 deletions
|
@ -513,7 +513,7 @@ struct EdifBackend : public Backend {
|
||||||
if (sig.wire == NULL && sig != RTLIL::State::S0 && sig != RTLIL::State::S1) {
|
if (sig.wire == NULL && sig != RTLIL::State::S0 && sig != RTLIL::State::S1) {
|
||||||
if (sig == RTLIL::State::Sx) {
|
if (sig == RTLIL::State::Sx) {
|
||||||
for (auto &ref : it.second)
|
for (auto &ref : it.second)
|
||||||
log_warning("Exporting x-bit on %s as zero bit.\n", ref.first.c_str());
|
log_warning("Exporting x-bit on %s as zero bit.\n", ref.first);
|
||||||
sig = RTLIL::State::S0;
|
sig = RTLIL::State::S0;
|
||||||
} else if (sig == RTLIL::State::Sz) {
|
} else if (sig == RTLIL::State::Sz) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -465,7 +465,7 @@ struct FirrtlWorker
|
||||||
// If there is no instance for this, just return.
|
// If there is no instance for this, just return.
|
||||||
if (instModule == NULL)
|
if (instModule == NULL)
|
||||||
{
|
{
|
||||||
log_warning("No instance for %s.%s\n", cell_type.c_str(), cell_name.c_str());
|
log_warning("No instance for %s.%s\n", cell_type, cell_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ struct FirrtlWorker
|
||||||
const SigSpec *sinkSig = nullptr;
|
const SigSpec *sinkSig = nullptr;
|
||||||
switch (dir) {
|
switch (dir) {
|
||||||
case FD_INOUT:
|
case FD_INOUT:
|
||||||
log_warning("Instance port connection %s.%s is INOUT; treating as OUT\n", cell_type.c_str(), log_signal(it->second));
|
log_warning("Instance port connection %s.%s is INOUT; treating as OUT\n", cell_type, log_signal(it->second));
|
||||||
YS_FALLTHROUGH
|
YS_FALLTHROUGH
|
||||||
case FD_OUT:
|
case FD_OUT:
|
||||||
sourceExpr = firstName;
|
sourceExpr = firstName;
|
||||||
|
@ -498,7 +498,7 @@ struct FirrtlWorker
|
||||||
sinkSig = &secondSig;
|
sinkSig = &secondSig;
|
||||||
break;
|
break;
|
||||||
case FD_NODIRECTION:
|
case FD_NODIRECTION:
|
||||||
log_warning("Instance port connection %s.%s is NODIRECTION; treating as IN\n", cell_type.c_str(), log_signal(it->second));
|
log_warning("Instance port connection %s.%s is NODIRECTION; treating as IN\n", cell_type, log_signal(it->second));
|
||||||
YS_FALLTHROUGH
|
YS_FALLTHROUGH
|
||||||
case FD_IN:
|
case FD_IN:
|
||||||
sourceExpr = secondExpr;
|
sourceExpr = secondExpr;
|
||||||
|
|
|
@ -974,7 +974,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
||||||
message += stringf("%s%s", first_element ? " See " : ", ", place);
|
message += stringf("%s%s", first_element ? " See " : ", ", place);
|
||||||
first_element = false;
|
first_element = false;
|
||||||
}
|
}
|
||||||
log_warning("%s\n", message.c_str());
|
log_warning("%s\n", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
silent_activate:
|
silent_activate:
|
||||||
|
@ -1144,7 +1144,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
||||||
i--; // Adjust index since we removed an element
|
i--; // Adjust index since we removed an element
|
||||||
} else {
|
} else {
|
||||||
// If we can't find the package, just remove the import node to avoid errors later
|
// If we can't find the package, just remove the import node to avoid errors later
|
||||||
log_warning("Package `%s' not found for import, removing import statement\n", child->str.c_str());
|
log_warning("Package `%s' not found for import, removing import statement\n", child->str);
|
||||||
children.erase(children.begin() + i);
|
children.erase(children.begin() + i);
|
||||||
i--; // Adjust index since we removed an element
|
i--; // Adjust index since we removed an element
|
||||||
}
|
}
|
||||||
|
@ -1438,7 +1438,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
||||||
if ((type == AST_ASSIGN_LE || type == AST_ASSIGN_EQ) && children[0]->id2ast->is_logic)
|
if ((type == AST_ASSIGN_LE || type == AST_ASSIGN_EQ) && children[0]->id2ast->is_logic)
|
||||||
children[0]->id2ast->is_reg = true; // if logic type is used in a block asignment
|
children[0]->id2ast->is_reg = true; // if logic type is used in a block asignment
|
||||||
if ((type == AST_ASSIGN_LE || type == AST_ASSIGN_EQ) && !children[0]->id2ast->is_reg)
|
if ((type == AST_ASSIGN_LE || type == AST_ASSIGN_EQ) && !children[0]->id2ast->is_reg)
|
||||||
log_warning("wire '%s' is assigned in a block at %s.\n", children[0]->str.c_str(), loc_string().c_str());
|
log_warning("wire '%s' is assigned in a block at %s.\n", children[0]->str, loc_string());
|
||||||
if (type == AST_ASSIGN && children[0]->id2ast->is_reg) {
|
if (type == AST_ASSIGN && children[0]->id2ast->is_reg) {
|
||||||
bool is_rand_reg = false;
|
bool is_rand_reg = false;
|
||||||
if (children[1]->type == AST_FCALL) {
|
if (children[1]->type == AST_FCALL) {
|
||||||
|
@ -1452,7 +1452,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
||||||
is_rand_reg = true;
|
is_rand_reg = true;
|
||||||
}
|
}
|
||||||
if (!is_rand_reg)
|
if (!is_rand_reg)
|
||||||
log_warning("reg '%s' is assigned in a continuous assignment at %s.\n", children[0]->str.c_str(), loc_string().c_str());
|
log_warning("reg '%s' is assigned in a continuous assignment at %s.\n", children[0]->str, loc_string());
|
||||||
}
|
}
|
||||||
children[0]->was_checked = true;
|
children[0]->was_checked = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ void msg_func(msg_type_t msg_type, const char *message_id, linefile_type linefil
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (msg_type == VERIFIC_ERROR || msg_type == VERIFIC_WARNING || msg_type == VERIFIC_PROGRAM_ERROR)
|
if (msg_type == VERIFIC_ERROR || msg_type == VERIFIC_WARNING || msg_type == VERIFIC_PROGRAM_ERROR)
|
||||||
log_warning_noprefix("%s%s\n", message_prefix.c_str(), message.c_str());
|
log_warning_noprefix("%s%s\n", message_prefix, message);
|
||||||
else
|
else
|
||||||
log("%s%s\n", message_prefix, message);
|
log("%s%s\n", message_prefix, message);
|
||||||
}
|
}
|
||||||
|
@ -4098,7 +4098,7 @@ struct VerificPass : public Pass {
|
||||||
unsigned new_insertion = parameters.Insert(key.c_str(), value.c_str(),
|
unsigned new_insertion = parameters.Insert(key.c_str(), value.c_str(),
|
||||||
1 /* force_overwrite */);
|
1 /* force_overwrite */);
|
||||||
if (!new_insertion)
|
if (!new_insertion)
|
||||||
log_warning_noprefix("-chparam %s already specified: overwriting.\n", key.c_str());
|
log_warning_noprefix("-chparam %s already specified: overwriting.\n", key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (args[argidx] == "-V") {
|
if (args[argidx] == "-V") {
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ struct VerificSvaImporter
|
||||||
{
|
{
|
||||||
if (!importer->mode_keep)
|
if (!importer->mode_keep)
|
||||||
log_error("%s", errmsg);
|
log_error("%s", errmsg);
|
||||||
log_warning("%s", errmsg.c_str());
|
log_warning("%s", errmsg);
|
||||||
throw ParserErrorException();
|
throw ParserErrorException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ static void logv_string(std::string_view format, std::string str) {
|
||||||
if (!linebuffer.empty() && linebuffer.back() == '\n') {
|
if (!linebuffer.empty() && linebuffer.back() == '\n') {
|
||||||
for (auto &re : log_warn_regexes)
|
for (auto &re : log_warn_regexes)
|
||||||
if (std::regex_search(linebuffer, re))
|
if (std::regex_search(linebuffer, re))
|
||||||
log_warning("Found log message matching -W regex:\n%s", str.c_str());
|
log_warning("Found log message matching -W regex:\n%s", str);
|
||||||
|
|
||||||
for (auto &[_, item] : log_expect_log)
|
for (auto &[_, item] : log_expect_log)
|
||||||
if (std::regex_search(linebuffer, item.pattern))
|
if (std::regex_search(linebuffer, item.pattern))
|
||||||
|
@ -704,7 +704,7 @@ dict<std::string, std::pair<std::string, int>> get_coverage_data()
|
||||||
|
|
||||||
for (auto &it : extra_coverage_data) {
|
for (auto &it : extra_coverage_data) {
|
||||||
if (coverage_data.count(it.first))
|
if (coverage_data.count(it.first))
|
||||||
log_warning("found duplicate coverage id \"%s\".\n", it.first.c_str());
|
log_warning("found duplicate coverage id \"%s\".\n", it.first);
|
||||||
coverage_data[it.first].first = it.second.first;
|
coverage_data[it.first].first = it.second.first;
|
||||||
coverage_data[it.first].second += it.second.second;
|
coverage_data[it.first].second += it.second.second;
|
||||||
}
|
}
|
||||||
|
|
|
@ -972,7 +972,7 @@ struct HelpPass : public Pass {
|
||||||
}
|
}
|
||||||
for (auto &it : cell_help_messages.cell_help) {
|
for (auto &it : cell_help_messages.cell_help) {
|
||||||
if (cells.count(it.first) == 0) {
|
if (cells.count(it.first) == 0) {
|
||||||
log_warning("Found cell model '%s' without matching cell type.\n", it.first.c_str());
|
log_warning("Found cell model '%s' without matching cell type.\n", it.first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ static int tcl_yosys_cmd(ClientData, Tcl_Interp *interp, int argc, const char *a
|
||||||
if (err.empty()) {
|
if (err.empty()) {
|
||||||
Tcl_SetObjResult(interp, json_to_tcl(interp, json));
|
Tcl_SetObjResult(interp, json_to_tcl(interp, json));
|
||||||
} else
|
} else
|
||||||
log_warning("Ignoring result.json scratchpad value due to parse error: %s\n", err.c_str());
|
log_warning("Ignoring result.json scratchpad value due to parse error: %s\n", err);
|
||||||
} else if ((result = scratchpad.find("result.string")) != scratchpad.end()) {
|
} else if ((result = scratchpad.find("result.string")) != scratchpad.end()) {
|
||||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(result->second.data(), result->second.size()));
|
Tcl_SetObjResult(interp, Tcl_NewStringObj(result->second.data(), result->second.size()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,7 +323,7 @@ struct CheckPass : public Pass {
|
||||||
string message = stringf("Drivers conflicting with a constant %s driver:\n", log_signal(state));
|
string message = stringf("Drivers conflicting with a constant %s driver:\n", log_signal(state));
|
||||||
for (auto str : wire_drivers[state])
|
for (auto str : wire_drivers[state])
|
||||||
message += stringf(" %s\n", str);
|
message += stringf(" %s\n", str);
|
||||||
log_warning("%s", message.c_str());
|
log_warning("%s", message);
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ struct CheckPass : public Pass {
|
||||||
string message = stringf("multiple conflicting drivers for %s.%s:\n", log_id(module), log_signal(it.first));
|
string message = stringf("multiple conflicting drivers for %s.%s:\n", log_id(module), log_signal(it.first));
|
||||||
for (auto str : it.second)
|
for (auto str : it.second)
|
||||||
message += stringf(" %s\n", str);
|
message += stringf(" %s\n", str);
|
||||||
log_warning("%s", message.c_str());
|
log_warning("%s", message);
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ struct CheckPass : public Pass {
|
||||||
|
|
||||||
prev = bit;
|
prev = bit;
|
||||||
}
|
}
|
||||||
log_warning("%s", message.c_str());
|
log_warning("%s", message);
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -658,7 +658,7 @@ static void select_op_expand(RTLIL::Design *design, const std::string &arg, char
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rem_objects == 0)
|
if (rem_objects == 0)
|
||||||
log_warning("reached configured limit at `%s'.\n", arg.c_str());
|
log_warning("reached configured limit at `%s'.\n", arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void select_filter_active_mod(RTLIL::Design *design, RTLIL::Selection &sel)
|
static void select_filter_active_mod(RTLIL::Design *design, RTLIL::Selection &sel)
|
||||||
|
@ -1002,14 +1002,14 @@ static void select_stmt(RTLIL::Design *design, std::string arg, bool disable_emp
|
||||||
if (it.second == false && !disable_empty_warning) {
|
if (it.second == false && !disable_empty_warning) {
|
||||||
std::string selection_str = select_blackboxes ? "=" : "";
|
std::string selection_str = select_blackboxes ? "=" : "";
|
||||||
selection_str += it.first;
|
selection_str += it.first;
|
||||||
log_warning("Selection \"%s\" did not match any module.\n", selection_str.c_str());
|
log_warning("Selection \"%s\" did not match any module.\n", selection_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (auto &it : arg_memb_found) {
|
for (auto &it : arg_memb_found) {
|
||||||
if (it.second == false && !disable_empty_warning) {
|
if (it.second == false && !disable_empty_warning) {
|
||||||
std::string selection_str = select_blackboxes ? "=" : "";
|
std::string selection_str = select_blackboxes ? "=" : "";
|
||||||
selection_str += it.first;
|
selection_str += it.first;
|
||||||
log_warning("Selection \"%s\" did not match any object.\n", selection_str.c_str());
|
log_warning("Selection \"%s\" did not match any object.\n", selection_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1451,7 +1451,7 @@ struct SelectPass : public Pass {
|
||||||
while (std::getline(f, line)) {
|
while (std::getline(f, line)) {
|
||||||
size_t slash_pos = line.find('/');
|
size_t slash_pos = line.find('/');
|
||||||
if (slash_pos == string::npos) {
|
if (slash_pos == string::npos) {
|
||||||
log_warning("Ignoring line without slash in 'select -read': %s\n", line.c_str());
|
log_warning("Ignoring line without slash in 'select -read': %s\n", line);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
IdString mod_name = RTLIL::escape_id(line.substr(0, slash_pos));
|
IdString mod_name = RTLIL::escape_id(line.substr(0, slash_pos));
|
||||||
|
|
|
@ -228,7 +228,7 @@ struct statdata_t {
|
||||||
cell_area.at(cell_type).is_sequential = cell_data.is_sequential;
|
cell_area.at(cell_type).is_sequential = cell_data.is_sequential;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log_warning("too small single_parameter_area %s width: %d size: %d\n", cell_type.c_str(), max_width,
|
log_warning("too small single_parameter_area %s width: %d size: %d\n", cell_type, max_width,
|
||||||
(int)cell_data.single_parameter_area.size());
|
(int)cell_data.single_parameter_area.size());
|
||||||
cell_area.at(cell_type).area = cell_data.single_parameter_area.back();
|
cell_area.at(cell_type).area = cell_data.single_parameter_area.back();
|
||||||
cell_area.at(cell_type).is_sequential = cell_data.is_sequential;
|
cell_area.at(cell_type).is_sequential = cell_data.is_sequential;
|
||||||
|
@ -274,7 +274,7 @@ struct statdata_t {
|
||||||
cell_data.double_parameter_area.at(width_a - 1).at(width_b - 1);
|
cell_data.double_parameter_area.at(width_a - 1).at(width_b - 1);
|
||||||
cell_area.at(cell_type).is_sequential = cell_data.is_sequential;
|
cell_area.at(cell_type).is_sequential = cell_data.is_sequential;
|
||||||
} else {
|
} else {
|
||||||
log_warning("too small double_parameter_area %s, width_a: %d, width_b: %d, size_a: %d, size_b: %d\n", cell_type.c_str(),
|
log_warning("too small double_parameter_area %s, width_a: %d, width_b: %d, size_a: %d, size_b: %d\n", cell_type,
|
||||||
width_a, width_b, (int)cell_data.double_parameter_area.size(),
|
width_a, width_b, (int)cell_data.double_parameter_area.size(),
|
||||||
(int)cell_data.double_parameter_area.at(width_a - 1).size());
|
(int)cell_data.double_parameter_area.at(width_a - 1).size());
|
||||||
cell_area.at(cell_type).area = cell_data.double_parameter_area.back().back();
|
cell_area.at(cell_type).area = cell_data.double_parameter_area.back().back();
|
||||||
|
|
|
@ -403,7 +403,7 @@ struct TimeestPass : Pass {
|
||||||
|
|
||||||
for (auto m : d->selected_modules()) {
|
for (auto m : d->selected_modules()) {
|
||||||
if (!m->wire(RTLIL::escape_id(clk))) {
|
if (!m->wire(RTLIL::escape_id(clk))) {
|
||||||
log_warning("No domain '%s' in module %s\n", clk.c_str(), log_id(m));
|
log_warning("No domain '%s' in module %s\n", clk, log_id(m));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ struct EquivAddPass : public Pass {
|
||||||
|
|
||||||
if (gold_cell == nullptr) {
|
if (gold_cell == nullptr) {
|
||||||
if (try_mode) {
|
if (try_mode) {
|
||||||
log_warning("Can't find gold cell '%s'.\n", args[2].c_str());
|
log_warning("Can't find gold cell '%s'.\n", args[2]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log_cmd_error("Can't find gold cell '%s'.\n", args[2]);
|
log_cmd_error("Can't find gold cell '%s'.\n", args[2]);
|
||||||
|
@ -69,7 +69,7 @@ struct EquivAddPass : public Pass {
|
||||||
|
|
||||||
if (gate_cell == nullptr) {
|
if (gate_cell == nullptr) {
|
||||||
if (try_mode) {
|
if (try_mode) {
|
||||||
log_warning("Can't find gate cell '%s'.\n", args[3].c_str());
|
log_warning("Can't find gate cell '%s'.\n", args[3]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log_cmd_error("Can't find gate cell '%s'.\n", args[3]);
|
log_cmd_error("Can't find gate cell '%s'.\n", args[3]);
|
||||||
|
@ -126,7 +126,7 @@ struct EquivAddPass : public Pass {
|
||||||
|
|
||||||
if (!SigSpec::parse(gate_signal, module, args[2])) {
|
if (!SigSpec::parse(gate_signal, module, args[2])) {
|
||||||
if (try_mode) {
|
if (try_mode) {
|
||||||
log_warning("Error in gate signal: %s\n", args[2].c_str());
|
log_warning("Error in gate signal: %s\n", args[2]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log_cmd_error("Error in gate signal: %s\n", args[2]);
|
log_cmd_error("Error in gate signal: %s\n", args[2]);
|
||||||
|
@ -134,7 +134,7 @@ struct EquivAddPass : public Pass {
|
||||||
|
|
||||||
if (!SigSpec::parse_rhs(gate_signal, gold_signal, module, args[1])) {
|
if (!SigSpec::parse_rhs(gate_signal, gold_signal, module, args[1])) {
|
||||||
if (try_mode) {
|
if (try_mode) {
|
||||||
log_warning("Error in gold signal: %s\n", args[1].c_str());
|
log_warning("Error in gold signal: %s\n", args[1]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log_cmd_error("Error in gold signal: %s\n", args[1]);
|
log_cmd_error("Error in gold signal: %s\n", args[1]);
|
||||||
|
|
|
@ -225,7 +225,7 @@ static void detect_fsm(RTLIL::Wire *wire, bool ignore_self_reset=false)
|
||||||
if (!warnings.empty()) {
|
if (!warnings.empty()) {
|
||||||
string warnmsg = stringf("Regarding the user-specified fsm_encoding attribute on %s.%s:\n", log_id(wire->module), log_id(wire));
|
string warnmsg = stringf("Regarding the user-specified fsm_encoding attribute on %s.%s:\n", log_id(wire->module), log_id(wire));
|
||||||
for (auto w : warnings) warnmsg += " " + w;
|
for (auto w : warnings) warnmsg += " " + w;
|
||||||
log_warning("%s", warnmsg.c_str());
|
log_warning("%s", warnmsg);
|
||||||
} else {
|
} else {
|
||||||
log("FSM state register %s.%s already has fsm_encoding attribute.\n", log_id(wire->module), log_id(wire));
|
log("FSM state register %s.%s already has fsm_encoding attribute.\n", log_id(wire->module), log_id(wire));
|
||||||
}
|
}
|
||||||
|
|
|
@ -937,7 +937,7 @@ struct HierarchyPass : public Pass {
|
||||||
const std::string &value = args[++argidx];
|
const std::string &value = args[++argidx];
|
||||||
auto r = parameters.emplace(key, value);
|
auto r = parameters.emplace(key, value);
|
||||||
if (!r.second) {
|
if (!r.second) {
|
||||||
log_warning("-chparam %s already specified: overwriting.\n", key.c_str());
|
log_warning("-chparam %s already specified: overwriting.\n", key);
|
||||||
r.first->second = value;
|
r.first->second = value;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -95,7 +95,7 @@ struct SubmodWorker
|
||||||
for (auto &conn : cell->connections())
|
for (auto &conn : cell->connections())
|
||||||
flag_signal(conn.second, true, ct.cell_output(cell->type, conn.first), ct.cell_input(cell->type, conn.first), false, false);
|
flag_signal(conn.second, true, ct.cell_output(cell->type, conn.first), ct.cell_input(cell->type, conn.first), false, false);
|
||||||
} else {
|
} else {
|
||||||
log_warning("Port directions for cell %s (%s) are unknown. Assuming inout for all ports.\n", cell->name.c_str(), cell->type.c_str());
|
log_warning("Port directions for cell %s (%s) are unknown. Assuming inout for all ports.\n", cell->name, cell->type);
|
||||||
for (auto &conn : cell->connections())
|
for (auto &conn : cell->connections())
|
||||||
flag_signal(conn.second, true, true, true, false, false);
|
flag_signal(conn.second, true, true, true, false, false);
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ struct SubmodWorker
|
||||||
for (auto &conn : cell->connections())
|
for (auto &conn : cell->connections())
|
||||||
flag_signal(conn.second, false, false, false, true, true);
|
flag_signal(conn.second, false, false, false, true, true);
|
||||||
if (flag_found_something)
|
if (flag_found_something)
|
||||||
log_warning("Port directions for cell %s (%s) are unknown. Assuming inout for all ports.\n", cell->name.c_str(), cell->type.c_str());
|
log_warning("Port directions for cell %s (%s) are unknown. Assuming inout for all ports.\n", cell->name, cell->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1097,7 +1097,7 @@ Library MemLibrary::parse_library(const std::vector<std::string> &filenames, con
|
||||||
Parser(file, res, defines, defines_unused);
|
Parser(file, res, defines, defines_unused);
|
||||||
}
|
}
|
||||||
for (auto def: defines_unused) {
|
for (auto def: defines_unused) {
|
||||||
log_warning("define %s not used in the library.\n", def.c_str());
|
log_warning("define %s not used in the library.\n", def);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,7 +233,7 @@ void rmunused_module_cells(Module *module, bool verbose)
|
||||||
for (auto it : driver_driver_logs) {
|
for (auto it : driver_driver_logs) {
|
||||||
if (used_raw_bits.count(it.first))
|
if (used_raw_bits.count(it.first))
|
||||||
for (auto msg : it.second)
|
for (auto msg : it.second)
|
||||||
log_warning("%s\n", msg.c_str());
|
log_warning("%s\n", msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ QbfSolutionType call_qbf_solver(RTLIL::Module *mod, const QbfSolveOptions &opt,
|
||||||
ret.stdout_lines.push_back(line.substr(0, line.size()-1)); //don't include trailing newline
|
ret.stdout_lines.push_back(line.substr(0, line.size()-1)); //don't include trailing newline
|
||||||
auto warning_pos = line.find(smtbmc_warning);
|
auto warning_pos = line.find(smtbmc_warning);
|
||||||
if (warning_pos != std::string::npos)
|
if (warning_pos != std::string::npos)
|
||||||
log_warning("%s", line.substr(warning_pos + smtbmc_warning.size() + 1).c_str());
|
log_warning("%s", line.substr(warning_pos + smtbmc_warning.size() + 1));
|
||||||
else
|
else
|
||||||
if (opt.show_smtbmc && !quiet)
|
if (opt.show_smtbmc && !quiet)
|
||||||
log("smtbmc output: %s", line);
|
log("smtbmc output: %s", line);
|
||||||
|
|
|
@ -256,7 +256,7 @@ struct SimInstance
|
||||||
if ((shared->fst) && !(shared->hide_internal && wire->name[0] == '$')) {
|
if ((shared->fst) && !(shared->hide_internal && wire->name[0] == '$')) {
|
||||||
fstHandle id = shared->fst->getHandle(scope + "." + RTLIL::unescape_id(wire->name));
|
fstHandle id = shared->fst->getHandle(scope + "." + RTLIL::unescape_id(wire->name));
|
||||||
if (id==0 && wire->name.isPublic())
|
if (id==0 && wire->name.isPublic())
|
||||||
log_warning("Unable to find wire %s in input file.\n", (scope + "." + RTLIL::unescape_id(wire->name)).c_str());
|
log_warning("Unable to find wire %s in input file.\n", (scope + "." + RTLIL::unescape_id(wire->name)));
|
||||||
fst_handles[wire] = id;
|
fst_handles[wire] = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -927,7 +927,7 @@ struct SimInstance
|
||||||
if (shared->serious_asserts)
|
if (shared->serious_asserts)
|
||||||
log_error("Assertion %s.%s (%s) failed.\n", hiername(), log_id(cell), label);
|
log_error("Assertion %s.%s (%s) failed.\n", hiername(), log_id(cell), label);
|
||||||
else
|
else
|
||||||
log_warning("Assertion %s.%s (%s) failed.\n", hiername().c_str(), log_id(cell), label.c_str());
|
log_warning("Assertion %s.%s (%s) failed.\n", hiername(), log_id(cell), label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1244,7 +1244,7 @@ struct SimInstance
|
||||||
Const fst_val = Const::from_string(shared->fst->valueOf(item.second));
|
Const fst_val = Const::from_string(shared->fst->valueOf(item.second));
|
||||||
Const sim_val = get_state(item.first);
|
Const sim_val = get_state(item.first);
|
||||||
if (sim_val.size()!=fst_val.size()) {
|
if (sim_val.size()!=fst_val.size()) {
|
||||||
log_warning("Signal '%s.%s' size is different in gold and gate.\n", scope.c_str(), log_id(item.first));
|
log_warning("Signal '%s.%s' size is different in gold and gate.\n", scope, log_id(item.first));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (shared->sim_mode == SimulationMode::sim) {
|
if (shared->sim_mode == SimulationMode::sim) {
|
||||||
|
@ -1252,7 +1252,7 @@ struct SimInstance
|
||||||
} else if (shared->sim_mode == SimulationMode::gate && !fst_val.is_fully_def()) { // FST data contains X
|
} else if (shared->sim_mode == SimulationMode::gate && !fst_val.is_fully_def()) { // FST data contains X
|
||||||
for(int i=0;i<fst_val.size();i++) {
|
for(int i=0;i<fst_val.size();i++) {
|
||||||
if (fst_val[i]!=State::Sx && fst_val[i]!=sim_val[i]) {
|
if (fst_val[i]!=State::Sx && fst_val[i]!=sim_val[i]) {
|
||||||
log_warning("Signal '%s.%s' in file %s in simulation %s\n", scope.c_str(), log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
log_warning("Signal '%s.%s' in file %s in simulation %s\n", scope, log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
||||||
retVal = true;
|
retVal = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1260,14 +1260,14 @@ struct SimInstance
|
||||||
} else if (shared->sim_mode == SimulationMode::gold && !sim_val.is_fully_def()) { // sim data contains X
|
} else if (shared->sim_mode == SimulationMode::gold && !sim_val.is_fully_def()) { // sim data contains X
|
||||||
for(int i=0;i<sim_val.size();i++) {
|
for(int i=0;i<sim_val.size();i++) {
|
||||||
if (sim_val[i]!=State::Sx && fst_val[i]!=sim_val[i]) {
|
if (sim_val[i]!=State::Sx && fst_val[i]!=sim_val[i]) {
|
||||||
log_warning("Signal '%s.%s' in file %s in simulation %s\n", scope.c_str(), log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
log_warning("Signal '%s.%s' in file %s in simulation %s\n", scope, log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
||||||
retVal = true;
|
retVal = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fst_val!=sim_val) {
|
if (fst_val!=sim_val) {
|
||||||
log_warning("Signal '%s.%s' in file %s in simulation '%s'\n", scope.c_str(), log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
log_warning("Signal '%s.%s' in file %s in simulation '%s'\n", scope, log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
||||||
retVal = true;
|
retVal = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1607,7 +1607,7 @@ struct SimWorker : SimShared
|
||||||
escaped_s = RTLIL::escape_id(cell_name(symbol));
|
escaped_s = RTLIL::escape_id(cell_name(symbol));
|
||||||
Cell *c = topmod->cell(escaped_s);
|
Cell *c = topmod->cell(escaped_s);
|
||||||
if (!c)
|
if (!c)
|
||||||
log_warning("Wire/cell %s not present in module %s\n",symbol.c_str(),log_id(topmod));
|
log_warning("Wire/cell %s not present in module %s\n",symbol,log_id(topmod));
|
||||||
|
|
||||||
if (c->is_mem_cell()) {
|
if (c->is_mem_cell()) {
|
||||||
std::string memid = c->parameters.at(ID::MEMID).decode_string();
|
std::string memid = c->parameters.at(ID::MEMID).decode_string();
|
||||||
|
@ -1873,7 +1873,7 @@ struct SimWorker : SimShared
|
||||||
log("witness hierarchy: found wire %s\n", path.str());
|
log("witness hierarchy: found wire %s\n", path.str());
|
||||||
bool inserted = hierarchy.paths.emplace(path, {instance, item.wire, {}, INT_MIN}).second;
|
bool inserted = hierarchy.paths.emplace(path, {instance, item.wire, {}, INT_MIN}).second;
|
||||||
if (!inserted)
|
if (!inserted)
|
||||||
log_warning("Yosys witness path `%s` is ambiguous in this design\n", path.str().c_str());
|
log_warning("Yosys witness path `%s` is ambiguous in this design\n", path.str());
|
||||||
}
|
}
|
||||||
} else if (item.mem) {
|
} else if (item.mem) {
|
||||||
auto it = mem_paths.find(path);
|
auto it = mem_paths.find(path);
|
||||||
|
@ -1890,7 +1890,7 @@ struct SimWorker : SimShared
|
||||||
continue;
|
continue;
|
||||||
bool inserted = hierarchy.paths.emplace(word_path, {instance, nullptr, item.mem->memid, addr}).second;
|
bool inserted = hierarchy.paths.emplace(word_path, {instance, nullptr, item.mem->memid, addr}).second;
|
||||||
if (!inserted)
|
if (!inserted)
|
||||||
log_warning("Yosys witness path `%s` is ambiguous in this design\n", path.str().c_str());
|
log_warning("Yosys witness path `%s` is ambiguous in this design\n", path.str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1899,7 +1899,7 @@ struct SimWorker : SimShared
|
||||||
|
|
||||||
for (auto &path : paths)
|
for (auto &path : paths)
|
||||||
if (!hierarchy.paths.count(path))
|
if (!hierarchy.paths.count(path))
|
||||||
log_warning("Yosys witness path `%s` was not found in this design, ignoring\n", path.str().c_str());
|
log_warning("Yosys witness path `%s` was not found in this design, ignoring\n", path.str());
|
||||||
|
|
||||||
dict<IdPath, dict<int, bool>> clock_inputs;
|
dict<IdPath, dict<int, bool>> clock_inputs;
|
||||||
|
|
||||||
|
@ -1922,7 +1922,7 @@ struct SimWorker : SimShared
|
||||||
|
|
||||||
for (int t = 0; t < GetSize(yw.steps); t++) {
|
for (int t = 0; t < GetSize(yw.steps); t++) {
|
||||||
if (yw.get_bits(t, clock_bits_offset, 1) != expected)
|
if (yw.get_bits(t, clock_bits_offset, 1) != expected)
|
||||||
log_warning("Yosys witness trace has an unexpected value for the clock input `%s` in step %d.\n", signal.path.str().c_str(), t);
|
log_warning("Yosys witness trace has an unexpected value for the clock input `%s` in step %d.\n", signal.path.str(), t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2000,7 +2000,7 @@ struct SimWorker : SimShared
|
||||||
YwHierarchy hierarchy = prepare_yw_hierarchy(yw);
|
YwHierarchy hierarchy = prepare_yw_hierarchy(yw);
|
||||||
|
|
||||||
if (yw.steps.empty()) {
|
if (yw.steps.empty()) {
|
||||||
log_warning("Yosys witness file `%s` contains no time steps\n", yw.filename.c_str());
|
log_warning("Yosys witness file `%s` contains no time steps\n", yw.filename);
|
||||||
} else {
|
} else {
|
||||||
top->set_initstate_outputs(initstate ? State::S1 : State::S0);
|
top->set_initstate_outputs(initstate ? State::S1 : State::S0);
|
||||||
set_yw_state(yw, hierarchy, 0);
|
set_yw_state(yw, hierarchy, 0);
|
||||||
|
|
|
@ -329,7 +329,7 @@ void abc9_module(RTLIL::Design *design, std::string script_file, std::string exe
|
||||||
#endif
|
#endif
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
if (check_file_exists(stringf("%s/output.aig", tempdir_name)))
|
if (check_file_exists(stringf("%s/output.aig", tempdir_name)))
|
||||||
log_warning("ABC: execution of command \"%s\" failed: return code %d.\n", buffer.c_str(), ret);
|
log_warning("ABC: execution of command \"%s\" failed: return code %d.\n", buffer, ret);
|
||||||
else
|
else
|
||||||
log_error("ABC: execution of command \"%s\" failed: return code %d.\n", buffer, ret);
|
log_error("ABC: execution of command \"%s\" failed: return code %d.\n", buffer, ret);
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,7 @@ LibertyExpression LibertyExpression::parse(Lexer &s, int min_prio) {
|
||||||
s.next();
|
s.next();
|
||||||
lhs = parse(s);
|
lhs = parse(s);
|
||||||
if (s.peek() != ')') {
|
if (s.peek() != ')') {
|
||||||
log_warning("expected ')' instead of '%c' while parsing Liberty expression '%s'\n", s.peek(), s.full_expr().c_str());
|
log_warning("expected ')' instead of '%c' while parsing Liberty expression '%s'\n", s.peek(), s.full_expr());
|
||||||
return lhs;
|
return lhs;
|
||||||
}
|
}
|
||||||
s.next();
|
s.next();
|
||||||
|
@ -200,7 +200,7 @@ LibertyExpression LibertyExpression::parse(Lexer &s, int min_prio) {
|
||||||
lhs.kind = Kind::NOT;
|
lhs.kind = Kind::NOT;
|
||||||
lhs.children.push_back(parse(s, 7));
|
lhs.children.push_back(parse(s, 7));
|
||||||
} else {
|
} else {
|
||||||
log_warning("unrecognised character '%c' while parsing Liberty expression '%s'\n", c, s.full_expr().c_str());
|
log_warning("unrecognised character '%c' while parsing Liberty expression '%s'\n", c, s.full_expr());
|
||||||
return lhs;
|
return lhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1192,7 +1192,7 @@ struct TestCellPass : public Pass {
|
||||||
worst_abs = num_cells - num_cells_estimate;
|
worst_abs = num_cells - num_cells_estimate;
|
||||||
worst_rel = (float)(num_cells - num_cells_estimate) / (float)num_cells_estimate;
|
worst_rel = (float)(num_cells - num_cells_estimate) / (float)num_cells_estimate;
|
||||||
}
|
}
|
||||||
log_warning("Upper bound violated for %s: %d > %d\n", cell_type.c_str(), num_cells, num_cells_estimate);
|
log_warning("Upper bound violated for %s: %d > %d\n", cell_type, num_cells, num_cells_estimate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,7 +242,7 @@ struct SynthIntelPass : public ScriptPass {
|
||||||
run("memory_bram -rules +/intel/common/brams_m9k.txt", "(if applicable for family)");
|
run("memory_bram -rules +/intel/common/brams_m9k.txt", "(if applicable for family)");
|
||||||
run("techmap -map +/intel/common/brams_map_m9k.v", "(if applicable for family)");
|
run("techmap -map +/intel/common/brams_map_m9k.v", "(if applicable for family)");
|
||||||
} else {
|
} else {
|
||||||
log_warning("BRAM mapping is not currently supported for %s.\n", family_opt.c_str());
|
log_warning("BRAM mapping is not currently supported for %s.\n", family_opt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,7 @@ struct SynthXilinxPass : public ScriptPass
|
||||||
log_cmd_error("-widemux is not currently supported for LUT4-based architectures.\n");
|
log_cmd_error("-widemux is not currently supported for LUT4-based architectures.\n");
|
||||||
|
|
||||||
if (lut_size != 6) {
|
if (lut_size != 6) {
|
||||||
log_warning("Shift register inference not yet supported for family %s.\n", family.c_str());
|
log_warning("Shift register inference not yet supported for family %s.\n", family);
|
||||||
nosrl = true;
|
nosrl = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue