mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Merge pull request #1961 from whitequark/paramod-original-name
ast, rpc: record original name of $paramod\* as \hdlname attribute
This commit is contained in:
commit
abc8f1fcb6
3 changed files with 7 additions and 11 deletions
|
@ -306,17 +306,8 @@ struct FirrtlWorker
|
|||
// If this is a parameterized module, its parent module is encoded in the cell type
|
||||
if (cell->type.begins_with("$paramod"))
|
||||
{
|
||||
std::string::iterator it;
|
||||
for (it = cell_type.begin(); it < cell_type.end(); it++)
|
||||
{
|
||||
switch (*it) {
|
||||
case '\\': /* FALL_THROUGH */
|
||||
case '=': /* FALL_THROUGH */
|
||||
case '\'': /* FALL_THROUGH */
|
||||
case '$': instanceOf.append("_"); break;
|
||||
default: instanceOf.append(1, *it); break;
|
||||
}
|
||||
}
|
||||
log_assert(cell->has_attribute(ID::hdlname));
|
||||
instanceOf = cell->get_string_attribute(ID::hdlname);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue