mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
[NFCI] Deduplicate builtin FF cell types list
A few passes included the same list of FF cell types. Make it a global const instead. The zinit pass also seems to include a list like that, but given that it seems to be completely broken at the time (see #1568 discussion), I'm going to pretend I didn't see that.
This commit is contained in:
parent
7f33d43e3b
commit
516857f3ba
5 changed files with 52 additions and 73 deletions
|
@ -118,9 +118,7 @@ struct OptMergeWorker
|
|||
for (auto &it : *conn) {
|
||||
RTLIL::SigSpec sig;
|
||||
if (cell->output(it.first)) {
|
||||
if (it.first == ID::Q && (cell->type.begins_with("$dff") || cell->type.begins_with("$dlatch") ||
|
||||
cell->type.begins_with("$_DFF") || cell->type.begins_with("$_DLATCH") || cell->type.begins_with("$_SR_") ||
|
||||
cell->type.in(ID($adff), ID($sr), ID($ff), ID($_FF_)))) {
|
||||
if (it.first == ID::Q && RTLIL::builtin_ff_cell_types().count(cell->type)) {
|
||||
// For the 'Q' output of state elements,
|
||||
// use its (* init *) attribute value
|
||||
for (const auto &b : dff_init_map(it.second))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue