3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 04:28:18 +00:00
This commit is contained in:
Eddie Hung 2019-07-19 20:25:28 -07:00
parent 47fd042b9f
commit f9d08a5e5e

View file

@ -23,10 +23,10 @@ code sigA clock clock_pol
sigA = port(mul, \A); sigA = port(mul, \A);
if (ffA) { if (ffA) {
sigA.replace(port(ffA, \Q), port(ffA, \D));
clock = port(ffA, \CLK).as_bit(); clock = port(ffA, \CLK).as_bit();
clock_pol = param(ffA, \CLK_POLARITY).as_bool(); clock_pol = param(ffA, \CLK_POLARITY).as_bool();
sigA.replace(port(ffA, \Q), port(ffA, \D));
} }
endcode endcode
@ -41,8 +41,6 @@ code sigB clock clock_pol
sigB = port(mul, \B); sigB = port(mul, \B);
if (ffB) { if (ffB) {
sigB.replace(port(ffB, \Q), port(ffB, \D));
SigBit c = port(ffB, \CLK).as_bit(); SigBit c = port(ffB, \CLK).as_bit();
bool cp = param(ffB, \CLK_POLARITY).as_bool(); bool cp = param(ffB, \CLK_POLARITY).as_bool();
@ -51,6 +49,8 @@ code sigB clock clock_pol
clock = c; clock = c;
clock_pol = cp; clock_pol = cp;
sigB.replace(port(ffB, \Q), port(ffB, \D));
} }
endcode endcode
@ -62,7 +62,7 @@ code sigY sigYused
for (i = GetSize(sigY); i > 0; i--) for (i = GetSize(sigY); i > 0; i--)
if (nusers(sigY[i-1]) > 1) if (nusers(sigY[i-1]) > 1)
break; break;
sigYused = sigY.extract(0, i).remove_const(); sigYused = sigY.extract(0, i);
endcode endcode
match ffY match ffY