From a8ae6f05eab194c5e269f900e04f903d27fe8b05 Mon Sep 17 00:00:00 2001 From: RonxBulld <526677628@qq.com> Date: Tue, 22 Apr 2025 00:54:51 +0800 Subject: [PATCH 1/2] Fixed the problem of not calling abc correctly when using libyosys.so library (it will try to call yosys-abc as command line instead of calling abc::Abc_RealMain) --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 76ac4bb18..94dfe3993 100644 --- a/Makefile +++ b/Makefile @@ -396,6 +396,10 @@ ifeq ($(DISABLE_ABC_THREADS),1) ABCMKARGS += "ABC_USE_NO_PTHREADS=1" endif +ifeq ($(LINK_ABC),1) +ABCMKARGS += "ABC_USE_PIC=1" +endif + ifeq ($(DISABLE_SPAWN),1) CXXFLAGS += -DYOSYS_DISABLE_SPAWN endif From 7f8d0e31f69601534d5680e5f78832cd57210ffb Mon Sep 17 00:00:00 2001 From: KrystalDelusion <93062060+KrystalDelusion@users.noreply.github.com> Date: Tue, 22 Apr 2025 17:42:52 +1200 Subject: [PATCH 2/2] Fix #5046 `clean_zerowidth` had skipped $macc, but not $macc_v2 --- passes/cmds/clean_zerowidth.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passes/cmds/clean_zerowidth.cc b/passes/cmds/clean_zerowidth.cc index a15be8a39..48a8864c0 100644 --- a/passes/cmds/clean_zerowidth.cc +++ b/passes/cmds/clean_zerowidth.cc @@ -128,7 +128,7 @@ struct CleanZeroWidthPass : public Pass { // A and B to 1-bit if their width is 0. if (cell->getParam(ID::Y_WIDTH).as_int() == 0) { module->remove(cell); - } else if (cell->type == ID($macc)) { + } else if (cell->type.in(ID($macc), ID($macc_v2))) { // TODO: fixing zero-width A and B not supported. } else { if (cell->getParam(ID::A_WIDTH).as_int() == 0) {