mirror of https://github.com/YosysHQ/yosys.git
flatten: only prepend $flatten once per wire.
This commit is contained in:
parent
e558905598
commit
8d821dbbdb
|
@ -32,8 +32,12 @@ IdString concat_name(RTLIL::Cell *cell, IdString object_name)
|
||||||
{
|
{
|
||||||
if (object_name[0] == '\\')
|
if (object_name[0] == '\\')
|
||||||
return stringf("%s.%s", cell->name.c_str(), object_name.c_str() + 1);
|
return stringf("%s.%s", cell->name.c_str(), object_name.c_str() + 1);
|
||||||
else
|
else {
|
||||||
return stringf("$flatten%s.%s", cell->name.c_str(), object_name.c_str());
|
std::string object_name_str = object_name.str();
|
||||||
|
if (object_name_str.substr(0, 8) == "$flatten")
|
||||||
|
object_name_str.erase(0, 8);
|
||||||
|
return stringf("$flatten%s.%s", cell->name.c_str(), object_name_str.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|
Loading…
Reference in New Issue