mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 01:54:10 +00:00
ice40_dsp: fix log_assert issue
This commit is contained in:
parent
6884c98e08
commit
725c489c7e
|
@ -46,17 +46,19 @@ code sigA sigB sigH
|
||||||
|
|
||||||
// Only care about those bits that are used
|
// Only care about those bits that are used
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < GetSize(O); i++) {
|
for (i = GetSize(O) - 1; i > 0 && nusers(O[i]) <= 1; i--)
|
||||||
if (nusers(O[i]) <= 1)
|
;
|
||||||
break;
|
|
||||||
sigH.append(O[i]);
|
|
||||||
}
|
|
||||||
// This sigM could have no users if downstream sinks (e.g. $add) is
|
// This sigM could have no users if downstream sinks (e.g. $add) is
|
||||||
// narrower than $mul result, for example
|
// narrower than $mul result, for example
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
reject;
|
reject;
|
||||||
|
|
||||||
log_assert(nusers(O.extract_end(i)) <= 1);
|
for (int j = 0; j <= i; j++)
|
||||||
|
if (nusers(O[j]) == 0)
|
||||||
|
sigH.append(module->addWire(NEW_ID));
|
||||||
|
else
|
||||||
|
sigH.append(O[j]);
|
||||||
|
|
||||||
endcode
|
endcode
|
||||||
|
|
||||||
code argQ ffA sigA clock clock_pol
|
code argQ ffA sigA clock clock_pol
|
||||||
|
|
Loading…
Reference in a new issue