From 1d57a7cf6b386a2734aa65b6b6c8bf11d25f7f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Povi=C5=A1er?= Date: Mon, 27 Jan 2025 15:52:49 +0100 Subject: [PATCH] macc_v2: Relax and fix cell check --- kernel/macc.h | 2 +- kernel/rtlil.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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__);