mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-25 16:42:35 +00:00
WIP
This commit is contained in:
parent
c3ffbf6fae
commit
d22805bd47
65 changed files with 739 additions and 718 deletions
|
|
@ -136,10 +136,10 @@ match preAdd
|
|||
// Output has to be 25 bits or less
|
||||
select GetSize(port(preAdd, \Y)) <= 25
|
||||
select nusers(port(preAdd, \Y)) == 2
|
||||
choice <IdString> AB {\A, \B}
|
||||
choice <TwineRef> AB {\A, \B}
|
||||
// A port has to be 30 bits or less
|
||||
select GetSize(port(preAdd, AB)) <= 30
|
||||
define <IdString> BA (AB == \A ? \B : \A)
|
||||
define <TwineRef> BA (AB == \A ? \B : \A)
|
||||
// D port has to be 25 bits or less
|
||||
select GetSize(port(preAdd, BA)) <= 25
|
||||
index <SigSpec> port(preAdd, \Y) === sigA
|
||||
|
|
@ -316,7 +316,7 @@ match postAdd
|
|||
|
||||
select postAdd->type.in($add)
|
||||
select GetSize(port(postAdd, \Y)) <= 48
|
||||
choice <IdString> AB {\A, \B}
|
||||
choice <TwineRef> AB {\A, \B}
|
||||
select nusers(port(postAdd, AB)) == 2
|
||||
|
||||
index <SigBit> port(postAdd, AB)[0] === sigP[0]
|
||||
|
|
@ -369,7 +369,7 @@ match postAddMux
|
|||
if ffP
|
||||
select postAddMux->type.in($mux)
|
||||
select nusers(port(postAddMux, \Y)) == 2
|
||||
choice <IdString> AB {\A, \B}
|
||||
choice <TwineRef> AB {\A, \B}
|
||||
index <SigSpec> port(postAddMux, AB) === sigP
|
||||
index <SigSpec> port(postAddMux, \Y) === sigC
|
||||
set postAddMuxAB AB
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ match postAdd
|
|||
|
||||
select postAdd->type.in($add)
|
||||
select GetSize(port(postAdd, \Y)) <= 48
|
||||
choice <IdString> AB {\A, \B}
|
||||
choice <TwineRef> AB {\A, \B}
|
||||
select nusers(port(postAdd, AB)) == 2
|
||||
|
||||
index <SigBit> port(postAdd, AB)[0] === sigP[0]
|
||||
|
|
@ -295,7 +295,7 @@ match postAddMux
|
|||
if ffP
|
||||
select postAddMux->type.in($mux)
|
||||
select nusers(port(postAddMux, \Y)) == 2
|
||||
choice <IdString> AB {\A, \B}
|
||||
choice <TwineRef> AB {\A, \B}
|
||||
index <SigSpec> port(postAddMux, AB) === sigP
|
||||
index <SigSpec> port(postAddMux, \Y) === sigC
|
||||
set postAddMuxAB AB
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ finally
|
|||
add_siguser(cascade, dsp);
|
||||
|
||||
if (dsp->type.in(\DSP48E1))
|
||||
dsp->setParam(\ACASCREG, AREG);
|
||||
dsp_pcin->setParam(\A_INPUT, Const("CASCADE"));
|
||||
setparam(dsp, \ACASCREG, AREG);
|
||||
setparam(dsp_pcin, \A_INPUT, Const("CASCADE"));
|
||||
|
||||
log_debug("ACOUT -> ACIN cascade for %s -> %s\n", dsp, dsp_pcin);
|
||||
}
|
||||
|
|
@ -149,7 +149,7 @@ finally
|
|||
add_siguser(cascade, dsp);
|
||||
|
||||
if (dsp->type.in(\DSP48E1)) {
|
||||
dsp->setParam(\BCASCREG, BREG);
|
||||
setparam(dsp, \BCASCREG, BREG);
|
||||
// According to UG389 p13 [https://www.xilinx.com/support/documentation/user_guides/ug389.pdf]
|
||||
// "The attribute is only used by place and route tools and
|
||||
// is not necessary for the users to set for synthesis. The
|
||||
|
|
@ -158,7 +158,7 @@ finally
|
|||
// BCOUT of another DSP48A1 slice, then the tools automatically
|
||||
// set the attribute to 'CASCADE', otherwise it is set to
|
||||
// 'DIRECT'".
|
||||
dsp_pcin->setParam(\B_INPUT, Const("CASCADE"));
|
||||
setparam(dsp_pcin, \B_INPUT, Const("CASCADE"));
|
||||
}
|
||||
|
||||
log_debug("BCOUT -> BCIN cascade for %s -> %s\n", dsp, dsp_pcin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue