3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 04:28:18 +00:00

Do not enforce !EN_POLARITY on $dffe

This commit is contained in:
Eddie Hung 2019-08-23 18:11:28 -07:00
parent 188b49378a
commit 70ce3d0670

View file

@ -176,7 +176,6 @@ endcode
match first match first
select first->type.in($_DFF_N_, $_DFF_P_, $_DFFE_NN_, $_DFFE_NP_, $_DFFE_PN_, $_DFFE_PP_, $dff, $dffe) select first->type.in($_DFF_N_, $_DFF_P_, $_DFFE_NN_, $_DFFE_NP_, $_DFFE_PN_, $_DFFE_PP_, $dff, $dffe)
select !first->has_keep_attr() select !first->has_keep_attr()
select !first->type.in($dffe) || !param(first, \EN_POLARITY).as_bool()
slice idx GetSize(port(first, \Q)) slice idx GetSize(port(first, \Q))
select nusers(port(first, \Q)[idx]) <= 2 select nusers(port(first, \Q)[idx]) <= 2
index <SigBit> port(first, \Q)[idx] === port(shiftx, \A)[shiftx_width-1] index <SigBit> port(first, \Q)[idx] === port(shiftx, \A)[shiftx_width-1]
@ -220,7 +219,6 @@ match next
select next->type.in($_DFF_N_, $_DFF_P_, $_DFFE_NN_, $_DFFE_NP_, $_DFFE_PN_, $_DFFE_PP_, $dff, $dffe) select next->type.in($_DFF_N_, $_DFF_P_, $_DFFE_NN_, $_DFFE_NP_, $_DFFE_PN_, $_DFFE_PP_, $dff, $dffe)
select !next->has_keep_attr() select !next->has_keep_attr()
select !port(next, \D)[0].wire->get_bool_attribute(\keep) select !port(next, \D)[0].wire->get_bool_attribute(\keep)
select !next->type.in($dffe) || !param(next, \EN_POLARITY).as_bool()
slice idx GetSize(port(next, \Q)) slice idx GetSize(port(next, \Q))
select nusers(port(next, \Q)[idx]) <= 3 select nusers(port(next, \Q)[idx]) <= 3
index <IdString> next->type === chain.back().first->type index <IdString> next->type === chain.back().first->type