mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-25 11:26:22 +00:00
hierarchy: tolerance for apparent recursive instances in techmap files
This commit is contained in:
parent
0eb215dd97
commit
81b99d83f5
1 changed files with 4 additions and 0 deletions
|
|
@ -686,6 +686,8 @@ bool set_keep_print(std::map<RTLIL::Module*, bool> &cache, RTLIL::Module *mod)
|
||||||
{
|
{
|
||||||
if (cache.count(mod) == 0)
|
if (cache.count(mod) == 0)
|
||||||
for (auto c : mod->cells()) {
|
for (auto c : mod->cells()) {
|
||||||
|
if (mod->name == c->type)
|
||||||
|
continue;
|
||||||
RTLIL::Module *m = mod->design->module(c->type);
|
RTLIL::Module *m = mod->design->module(c->type);
|
||||||
if ((m != nullptr && set_keep_print(cache, m)) || c->type == ID($print))
|
if ((m != nullptr && set_keep_print(cache, m)) || c->type == ID($print))
|
||||||
return cache[mod] = true;
|
return cache[mod] = true;
|
||||||
|
|
@ -697,6 +699,8 @@ bool set_keep_assert(std::map<RTLIL::Module*, bool> &cache, RTLIL::Module *mod)
|
||||||
{
|
{
|
||||||
if (cache.count(mod) == 0)
|
if (cache.count(mod) == 0)
|
||||||
for (auto c : mod->cells()) {
|
for (auto c : mod->cells()) {
|
||||||
|
if (mod->name == c->type)
|
||||||
|
continue;
|
||||||
RTLIL::Module *m = mod->design->module(c->type);
|
RTLIL::Module *m = mod->design->module(c->type);
|
||||||
if ((m != nullptr && set_keep_assert(cache, m)) || c->type.in(ID($check), ID($assert), ID($assume), ID($live), ID($fair), ID($cover)))
|
if ((m != nullptr && set_keep_assert(cache, m)) || c->type.in(ID($check), ID($assert), ID($assume), ID($live), ID($fair), ID($cover)))
|
||||||
return cache[mod] = true;
|
return cache[mod] = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue