sigM.append(P[i]);
}
log_assert(nusers(P.extract_end(i)) <= 1);
+ log_assert(!sigM.empty());
}
else
sigM = P;
- // TODO: Check if necessary
- // This sigM could have no users if downstream $add
- // is narrower than $mul result, for example
- if (sigM.empty())
- reject;
clock = port(dsp, \CLK, SigBit());
endcode
endmatch
code sigA sigD
- // TODO: Check if this is necessary?
if (preAdd) {
sigA = port(preAdd, \A);
sigD = port(preAdd, \B);
- if (GetSize(sigA) < GetSize(sigD))
- std::swap(sigA, sigD);
}
endcode
// (attached to at most two $mux cells that implement clock-enable or
// reset functionality, using the in_dffe subpattern)
code argQ ffC ffCcemux ffCrstmux ffCcepol ffCrstpol sigC clock
- // TODO: Any downside to allowing this?
- // If this DSP implements an accumulator, do not attempt to match
- if (sigC == sigP)
- reject;
-
argQ = sigC;
subpattern(in_dffe);
if (dff) {