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:
commit
4bfdc62f65
2 changed files with 130 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue