mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-05 17:47:44 +00:00
wrapcell.cc: Avoid format name collision
This commit is contained in:
parent
7fb6c1ee52
commit
d70f132792
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ struct ContextData {
|
|||
std::string unused_outputs;
|
||||
};
|
||||
|
||||
std::optional<std::string> format(std::string fmt, const dict<IdString, Const> ¶meters,
|
||||
std::optional<std::string> format_with_params(std::string fmt, const dict<IdString, Const> ¶meters,
|
||||
const ContextData &context)
|
||||
{
|
||||
std::stringstream result;
|
||||
|
@ -230,7 +230,7 @@ struct WrapcellPass : Pass {
|
|||
context.unused_outputs += "_" + RTLIL::unescape_id(chunk.format(cell));
|
||||
}
|
||||
|
||||
std::optional<std::string> unescaped_name = format(name_fmt, cell->parameters, context);
|
||||
std::optional<std::string> unescaped_name = format_with_params(name_fmt, cell->parameters, context);
|
||||
if (!unescaped_name)
|
||||
log_error("Formatting error when processing cell '%s' in module '%s'\n",
|
||||
log_id(cell), log_id(module));
|
||||
|
@ -270,7 +270,7 @@ struct WrapcellPass : Pass {
|
|||
if (rule.value_fmt.empty()) {
|
||||
subm->set_bool_attribute(rule.name);
|
||||
} else {
|
||||
std::optional<std::string> value = format(rule.value_fmt, cell->parameters, context);
|
||||
std::optional<std::string> value = format_with_params(rule.value_fmt, cell->parameters, context);
|
||||
|
||||
if (!value)
|
||||
log_error("Formatting error when processing cell '%s' in module '%s'\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue