mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 13:18:56 +00:00
Replaced RTLIL::Const::str with generic decoder method
This commit is contained in:
parent
a2d053694b
commit
93a70959f3
21 changed files with 125 additions and 84 deletions
|
@ -48,7 +48,9 @@ static bool match_ids(RTLIL::IdString id, std::string pattern)
|
|||
|
||||
static bool match_attr_val(const RTLIL::Const &value, std::string pattern)
|
||||
{
|
||||
if (!fnmatch(pattern.c_str(), value.str.c_str(), FNM_NOESCAPE))
|
||||
if ((value.flags & RTLIL::CONST_FLAG_STRING) == 0)
|
||||
return false;
|
||||
if (!fnmatch(pattern.c_str(), value.decode_string().c_str(), FNM_NOESCAPE))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -400,7 +400,7 @@ struct ShowWorker
|
|||
|
||||
std::string proc_src = RTLIL::unescape_id(proc->name);
|
||||
if (proc->attributes.count("\\src") > 0)
|
||||
proc_src = proc->attributes.at("\\src").str;
|
||||
proc_src = proc->attributes.at("\\src").decode_string();
|
||||
fprintf(f, "p%d [shape=box, style=rounded, label=\"PROC %s\\n%s\"];\n", pidx, escape(proc->name, true), proc_src.c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue