mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-26 03:11:30 +00:00
Merge pull request #5357 from rocallahan/builtin-ff
Instead of using `builtin_ff_cell_types()` directly, go through a method `Cell::is_builtin_ff()`
This commit is contained in:
commit
73e47ac3fe
32 changed files with 61 additions and 51 deletions
|
@ -373,7 +373,7 @@ void AbcModuleState::mark_port(const AbcSigMap &assign_map, RTLIL::SigSpec sig)
|
|||
|
||||
bool AbcModuleState::extract_cell(const AbcSigMap &assign_map, RTLIL::Module *module, RTLIL::Cell *cell, bool keepff)
|
||||
{
|
||||
if (RTLIL::builtin_ff_cell_types().count(cell->type)) {
|
||||
if (cell->is_builtin_ff()) {
|
||||
FfData ff(&initvals, cell);
|
||||
gate_type_t type = G(FF);
|
||||
if (!ff.has_clk)
|
||||
|
@ -2427,7 +2427,7 @@ struct AbcPass : public Pass {
|
|||
}
|
||||
}
|
||||
|
||||
if (!RTLIL::builtin_ff_cell_types().count(cell->type))
|
||||
if (!cell->is_builtin_ff())
|
||||
continue;
|
||||
|
||||
FfData ff(&initvals, cell);
|
||||
|
|
|
@ -224,7 +224,7 @@ void prep_hier(RTLIL::Design *design, bool dff_mode)
|
|||
}
|
||||
else if (derived_module->get_bool_attribute(ID::abc9_box)) {
|
||||
for (auto derived_cell : derived_module->cells())
|
||||
if (derived_cell->is_mem_cell() || RTLIL::builtin_ff_cell_types().count(derived_cell->type)) {
|
||||
if (derived_cell->is_mem_cell() || derived_cell->is_builtin_ff()) {
|
||||
derived_module->set_bool_attribute(ID::abc9_box, false);
|
||||
derived_module->set_bool_attribute(ID::abc9_bypass);
|
||||
break;
|
||||
|
|
|
@ -333,7 +333,7 @@ struct ClockgatePass : public Pass {
|
|||
int gated_flop_count = 0;
|
||||
for (auto module : design->selected_unboxed_whole_modules()) {
|
||||
for (auto cell : module->cells()) {
|
||||
if (!RTLIL::builtin_ff_cell_types().count(cell->type))
|
||||
if (!cell->is_builtin_ff())
|
||||
continue;
|
||||
|
||||
FfData ff(nullptr, cell);
|
||||
|
|
|
@ -1196,7 +1196,7 @@ unrecognized:
|
|||
srst_used.clear();
|
||||
|
||||
for (auto cell : module->cells()) {
|
||||
if (!RTLIL::builtin_ff_cell_types().count(cell->type))
|
||||
if (!cell->is_builtin_ff())
|
||||
continue;
|
||||
|
||||
FfData ff(&initvals, cell);
|
||||
|
@ -1208,7 +1208,7 @@ unrecognized:
|
|||
}
|
||||
for (auto cell : module->selected_cells())
|
||||
{
|
||||
if (!RTLIL::builtin_ff_cell_types().count(cell->type))
|
||||
if (!cell->is_builtin_ff())
|
||||
continue;
|
||||
FfData ff(&initvals, cell);
|
||||
legalize_ff(ff);
|
||||
|
|
|
@ -74,7 +74,7 @@ struct DffunmapPass : public Pass {
|
|||
|
||||
for (auto cell : mod->selected_cells())
|
||||
{
|
||||
if (!RTLIL::builtin_ff_cell_types().count(cell->type))
|
||||
if (!cell->is_builtin_ff())
|
||||
continue;
|
||||
|
||||
FfData ff(&initvals, cell);
|
||||
|
|
|
@ -63,7 +63,7 @@ struct ZinitPass : public Pass {
|
|||
|
||||
for (auto cell : module->selected_cells())
|
||||
{
|
||||
if (!RTLIL::builtin_ff_cell_types().count(cell->type))
|
||||
if (!cell->is_builtin_ff())
|
||||
continue;
|
||||
|
||||
FfData ff(&initvals, cell);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue