Consistency

This commit is contained in:
Eddie Hung 2020-01-17 16:06:20 -08:00
parent ee500b6d8e
commit e17f3f8c63
2 changed files with 6 additions and 4 deletions

View File

@ -56,10 +56,12 @@ code sigA sigB sigH
break;
sigH.append(O[i]);
}
log_assert(nusers(O.extract_end(i)) <= 1);
if (sigH.empty())
// This sigM could have no users if downstream sinks (e.g. $add) is
// narrower than $mul result, for example
if (i == 0)
reject;
log_assert(nusers(O.extract_end(i)) <= 1);
endcode
code argQ ffA ffAholdmux ffArstmux ffAholdpol ffArstpol sigA clock clock_pol

View File

@ -460,7 +460,7 @@ arg argD argQ clock
code
dff = nullptr;
if (GetSize(argQ) == 0)
if (argQ.empty() == 0)
reject;
for (const auto &c : argQ.chunks()) {
// Abandon matches when 'Q' is a constant