diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/macc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/macc.h b/kernel/macc.h index 271141112..7d70a2686 100644 --- a/kernel/macc.h +++ b/kernel/macc.h @@ -45,6 +45,9 @@ struct Macc if (SIZE(port.in_a) == 0 && SIZE(port.in_b) == 0) continue; + if (SIZE(port.in_a) < SIZE(port.in_b)) + std::swap(port.in_a, port.in_b); + if (SIZE(port.in_a) == 1 && SIZE(port.in_b) == 0 && !port.is_signed && !port.do_subtract) { bit_ports.append(port.in_a); continue; @@ -224,6 +227,12 @@ struct Macc return true; } + + Macc(RTLIL::Cell *cell = nullptr) + { + if (cell != nullptr) + from_cell(cell); + } }; YOSYS_NAMESPACE_END |