3
0
Fork 0
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:
whitequark 2020-04-21 01:43:20 +00:00 committed by GitHub
commit abc8f1fcb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 11 deletions

View file

@ -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
{