Merge pull request #6088 from YosysHQ/revert-slop

Revert slop being committed in `main`
This commit is contained in:
Catherine 2026-08-05 20:36:45 +00:00 committed by GitHub
commit c2071b80ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 48 deletions

View File

@ -684,30 +684,24 @@ void hierarchy_clean(RTLIL::Design *design, RTLIL::Module *top, bool purge_lib)
bool set_keep_print(std::map<RTLIL::Module*, bool> &cache, RTLIL::Module *mod)
{
auto it = cache.find(mod);
if (it != cache.end())
return it->second;
cache[mod] = false;
for (auto c : mod->cells()) {
RTLIL::Module *m = mod->design->module(c->type);
if ((m != nullptr && set_keep_print(cache, m)) || c->type == ID($print))
return cache[mod] = true;
}
return false;
if (cache.count(mod) == 0)
for (auto c : mod->cells()) {
RTLIL::Module *m = mod->design->module(c->type);
if ((m != nullptr && set_keep_print(cache, m)) || c->type == ID($print))
return cache[mod] = true;
}
return cache[mod];
}
bool set_keep_assert(std::map<RTLIL::Module*, bool> &cache, RTLIL::Module *mod)
{
auto it = cache.find(mod);
if (it != cache.end())
return it->second;
cache[mod] = false;
for (auto c : mod->cells()) {
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)))
return cache[mod] = true;
}
return false;
if (cache.count(mod) == 0)
for (auto c : mod->cells()) {
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)))
return cache[mod] = true;
}
return cache[mod];
}
int find_top_mod_score(Design *design, Module *module, dict<Module*, int> &db)

View File

@ -1,3 +0,0 @@
module top(input x, output y);
top top_i(.x(x), .y(y));
endmodule

View File

@ -1,25 +0,0 @@
read_verilog hierarchy_recursive.v
hierarchy -auto-top
select -assert-any top
select -assert-none a:keep
design -reset
read_verilog <<EOT
module top(input x, output y);
top top_i(.x(x), .y(y));
always @(x) $display("x=%d", x);
endmodule
EOT
hierarchy -auto-top
select -assert-any top %% a:keep
design -reset
read_verilog -formal <<EOT
module a(input x); b b_i(.x(x)); endmodule
module b(input x); a a_i(.x(x)); always @(x) assert (x == x); endmodule
module top(input x); a a_i(.x(x)); endmodule
EOT
hierarchy -top top
select -assert-any a %% a:keep
select -assert-any b %% a:keep
select -assert-any top %% a:keep