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

Merge pull request #5472 from Anhijkt/arst-fsm-handling

fsm_detect: add adff detection
This commit is contained in:
Miodrag Milanović 2025-11-14 13:47:08 +01:00 committed by GitHub
commit 4bfdc62f65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 130 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)