3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-22 21:51:28 +00:00

fsm_detect: add adff detection

This commit is contained in:
Anhijkt 2025-11-06 23:29:47 +02:00
parent a16fc9b4f3
commit 7d10a72490
2 changed files with 142 additions and 2 deletions

View file

@ -199,8 +199,15 @@ static void detect_fsm(RTLIL::Wire *wire, bool ignore_self_reset=false)
}
SigSpec sig_y = sig_d, sig_undef;
if (!ignore_self_reset && ce.eval(sig_y, sig_undef))
is_self_resetting = true;
if (!ignore_self_reset) {
if (cellport.first->type == ID($adff)) {
SigSpec sig_arst = assign_map(cellport.first->getPort(ID::ARST));
if (ce.eval(sig_arst, sig_undef))
is_self_resetting = true;
}
else if (ce.eval(sig_y, sig_undef))
is_self_resetting = true;
}
}
if (has_fsm_encoding_attr)