mirror of https://github.com/YosysHQ/yosys.git
Fix nusers condition in ffP
This commit is contained in:
parent
cdc1e1f5c2
commit
39a5d046ea
|
@ -228,6 +228,8 @@ code sigC sigP
|
||||||
endcode
|
endcode
|
||||||
|
|
||||||
match ffPmux
|
match ffPmux
|
||||||
|
if param(dsp, \PREG).as_int() == 0
|
||||||
|
if nusers(sigP) == 2
|
||||||
select ffPmux->type.in($mux)
|
select ffPmux->type.in($mux)
|
||||||
choice <IdString> BA {\B, \A}
|
choice <IdString> BA {\B, \A}
|
||||||
// new-value net must have exactly two users: dsp and ffP
|
// new-value net must have exactly two users: dsp and ffP
|
||||||
|
@ -253,13 +255,14 @@ endcode
|
||||||
|
|
||||||
match ffP
|
match ffP
|
||||||
if param(dsp, \PREG).as_int() == 0
|
if param(dsp, \PREG).as_int() == 0
|
||||||
|
if nusers(sigP) == 2
|
||||||
select ffP->type.in($dff)
|
select ffP->type.in($dff)
|
||||||
// DSP48E1 does not support clock inversion
|
// DSP48E1 does not support clock inversion
|
||||||
select param(ffP, \CLK_POLARITY).as_bool()
|
select param(ffP, \CLK_POLARITY).as_bool()
|
||||||
select nusers(port(ffP, \D)) == 2
|
|
||||||
filter GetSize(port(ffP, \D)) >= GetSize(sigP)
|
filter GetSize(port(ffP, \D)) >= GetSize(sigP)
|
||||||
slice offset GetSize(port(ffP, \D))
|
slice offset GetSize(port(ffP, \D))
|
||||||
filter offset+GetSize(sigP) <= GetSize(port(ffP, \D)) && port(ffP, \D).extract(offset, GetSize(sigP)) == sigP
|
filter offset+GetSize(sigP) <= GetSize(port(ffP, \D))
|
||||||
|
filter port(ffP, \D).extract(offset, GetSize(sigP)) == sigP
|
||||||
// Check ffPmux (when present) is a $dff enable mux
|
// Check ffPmux (when present) is a $dff enable mux
|
||||||
filter !ffPmux || port(ffP, \Q) == port(ffPmux, ffPenpol ? \A : \B)
|
filter !ffPmux || port(ffP, \Q) == port(ffPmux, ffPenpol ? \A : \B)
|
||||||
optional
|
optional
|
||||||
|
|
Loading…
Reference in New Issue