3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-20 04:43:40 +00:00

Signed extension

This commit is contained in:
Eddie Hung 2019-07-16 15:54:07 -07:00
parent 6390c535ba
commit 3f677fb0db
2 changed files with 6 additions and 6 deletions

View file

@ -9,10 +9,10 @@ endmatch
match ffA
select ffA->type.in($dff, $dffe)
select param(ffA, \CLK_POLARITY).as_bool()
// select nusers(port(ffA, \Q)) == 2
index <SigSpec> port(ffA, \Q).extend_u0(30) === port(dsp, \A)
index <SigSpec> port(ffA, \Q).extend_u0(25, true) === port(dsp, \A).extract(0, 25)
// DSP48E1 does not support clock inversion
index <Const> param(ffA, \CLK_POLARITY).as_bool() === true
optional
endmatch
@ -23,9 +23,9 @@ endcode
match ffB
select ffB->type.in($dff, $dffe)
select param(ffB, \CLK_POLARITY).as_bool()
// select nusers(port(ffB, \Q)) == 2
index <SigSpec> port(ffB, \Q).extend_u0(18) === port(dsp, \B)
index <Const> param(ffB, \CLK_POLARITY).as_bool() === true
index <SigSpec> port(ffB, \Q).extend_u0(18, true) === port(dsp, \B)
optional
endmatch