3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-18 06:39:03 +00:00

Merge pull request #62 from alaindargelas/ungrouping_fixes

Fixes to enable keep_hierarchy
This commit is contained in:
Akash Levy 2025-03-11 10:30:11 -07:00 committed by GitHub
commit b20d916c41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View file

@ -101,6 +101,13 @@ static bool is_free(RTLIL::IdString type)
type.in(ID($specrule), ID($specify2), ID($specify3)));
}
static bool is_mem(RTLIL::IdString type)
{
return (
// tags
type.in(ID($memrd), ID($memrd_v2), ID($memwr), ID($memwr_v2), ID($meminit), ID($meminit_v2), ID($mem), ID($mem_v2)));
}
unsigned int max_inp_width(RTLIL::Cell *cell)
{
unsigned int max = 0;
@ -186,8 +193,12 @@ unsigned int CellCosts::get(RTLIL::Cell *cell)
} else if (is_free(cell->type)) {
log_debug("%s is free\n", cell->name.c_str());
return 0;
} else if (is_mem(cell->type)) {
// SILIMATE: Memory cells have no bearing on cross module optimizations
log_debug("%s is mem\n", cell->name.c_str());
return 1;
}
// TODO: $fsm $mem.* $macc
// TODO: $fsm $macc
// ignored: $pow
log_warning("Can't determine cost of %s cell (%d parameters).\n", log_id(cell->type), GetSize(cell->parameters));

View file

@ -42,7 +42,9 @@ struct ThresholdHierarchyKeeping {
return 0;
if (module->get_blackbox_attribute())
log_error("Missing cost information on instanced blackbox %s\n", log_id(module));
// SILIMATE: Blackboxes have no bearing on cross module optimizations
// log_error("Missing cost information on instanced blackbox %s\n", log_id(module));
return 1;
if (done.count(module))
return done.at(module);