diff --git a/kernel/macc.h b/kernel/macc.h index 5cf8d634d..5fc6036ed 100644 --- a/kernel/macc.h +++ b/kernel/macc.h @@ -231,7 +231,7 @@ struct Macc if (a_signed.empty()) a_signed = {RTLIL::Sx}; if (b_signed.empty()) - a_signed = {RTLIL::Sx}; + b_signed = {RTLIL::Sx}; if (c_signed.empty()) c_signed = {RTLIL::Sx}; if (a_widths.empty()) diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index d197660bd..3b9a4a8b1 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1468,7 +1468,7 @@ namespace { } if (cell->type == ID($macc_v2)) { - if (param(ID::NPRODUCTS) <= 0) + if (param(ID::NPRODUCTS) < 0) error(__LINE__); if (param(ID::NADDENDS) < 0) error(__LINE__);