From 4c96546717546e5e0327559235c2a990c9cd980c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Povi=C5=A1er?= Date: Wed, 21 Feb 2024 12:03:37 +0100 Subject: [PATCH 1/3] equiv_simple: Take FFs into account for driver map This fixes an issue introduced in commit 26644ea due to which flip-flops are inadvertently ignored when building up driver map. The mentioned commit wasn't without functional change after all. --- passes/equiv/equiv_simple.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/passes/equiv/equiv_simple.cc b/passes/equiv/equiv_simple.cc index 2c9d82914..59974a1e6 100644 --- a/passes/equiv/equiv_simple.cc +++ b/passes/equiv/equiv_simple.cc @@ -339,6 +339,8 @@ struct EquivSimplePass : public Pass { CellTypes ct; ct.setup_internals(); ct.setup_stdcells(); + ct.setup_internals_ff(); + ct.setup_stdcells_mem(); for (auto module : design->selected_modules()) { From a02d4e78531550b4ff658aa6fff8806f05715330 Mon Sep 17 00:00:00 2001 From: Jason Thorpe Date: Sun, 3 Mar 2024 07:54:39 -0800 Subject: [PATCH 2/3] Tweak the FreeBSD version of proc_self_dirname() to work on NetBSD use it. --- kernel/yosys.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/yosys.cc b/kernel/yosys.cc index 20f9791c6..57433d0d9 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -55,7 +55,7 @@ # include #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) # include #endif @@ -901,10 +901,14 @@ std::string proc_self_dirname() buflen--; return std::string(path, buflen); } -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) std::string proc_self_dirname() { +#ifdef __NetBSD__ + int mib[4] = {CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_PATHNAME}; +#else int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1}; +#endif size_t buflen; char *buffer; std::string path; From 9b47f3204ee349650d3cb9fb894efe9d9b9cea48 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:28:41 +1300 Subject: [PATCH 3/3] Makefile: Fix emcc build Remove deprecated (and unnecessary?) `--memory-init-file 0` from `EMCC_LINKFLAGS`. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c4b46cc13..9e9cc7116 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ CXX = emcc CXXFLAGS := -std=$(CXXSTD) $(filter-out -fPIC -ggdb,$(CXXFLAGS)) ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H -DABC_MEMALIGN=8 -Wno-c++11-narrowing" EMCC_CXXFLAGS := -Os -Wno-warn-absolute-paths -EMCC_LINKFLAGS := --memory-init-file 0 --embed-file share +EMCC_LINKFLAGS := --embed-file share EMCC_LINKFLAGS += -s NO_EXIT_RUNTIME=1 EMCC_LINKFLAGS += -s EXPORTED_FUNCTIONS="['_main','_run','_prompt','_errmsg','_memset']" EMCC_LINKFLAGS += -s TOTAL_MEMORY=134217728