From f3213d5057e037f7e20e4ec04ba8e5bb2b944db8 Mon Sep 17 00:00:00 2001 From: Emil J Date: Tue, 22 Oct 2024 12:45:06 +0200 Subject: [PATCH 1/5] README: tell macOS users to use brew clang with LTO --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3845d2502..02495c71a 100644 --- a/README.md +++ b/README.md @@ -130,9 +130,15 @@ lld by enabling LTO: $ make ENABLE_LTO=1 +On macOS, LTO requires using clang from homebrew which isn't in PATH +rather than xcode clang. + +$ make ENABLE_LTO=1 CXX=$(brew --prefix)/opt/llvm/bin/clang++ + For other compilers and build configurations it might be necessary to make some changes to the config section of the -Makefile. +Makefile. It's also an alternative way to set the make variables +mentioned above. $ vi Makefile # ..or.. $ vi Makefile.conf From b34e2603ab808f0bf80008f2b0eab1c07f4fc05f Mon Sep 17 00:00:00 2001 From: Emil J Date: Tue, 22 Oct 2024 12:52:50 +0200 Subject: [PATCH 2/5] Makefile: add -rdynamic on macOS to fix plugins with LTO --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 5be8c64e9..82b0ce58b 100644 --- a/Makefile +++ b/Makefile @@ -118,6 +118,7 @@ AWK ?= awk ifeq ($(OS), Darwin) PLUGIN_LINKFLAGS += -undefined dynamic_lookup +LINKFLAGS += -rdynamic # homebrew search paths ifneq ($(shell :; command -v brew),) From ee73a91f44f7fb46e94346c77941046fcf34432a Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:36:31 +1300 Subject: [PATCH 3/5] Remove references to ilang --- backends/btor/test_cells.sh | 4 ++-- backends/rtlil/rtlil_backend.cc | 15 --------------- backends/smt2/test_cells.sh | 2 +- backends/smv/test_cells.sh | 4 ++-- docs/source/_images/internals/overview_flow.tex | 8 ++++---- frontends/rtlil/rtlil_frontend.cc | 15 --------------- tests/arch/ecp5/bug1630.ys | 2 +- tests/arch/ecp5/opt_lut_ins.ys | 2 +- tests/arch/ice40/bug1626.ys | 2 +- tests/arch/ice40/bug1644.ys | 2 +- tests/arch/xilinx/opt_lut_ins.ys | 2 +- tests/opt/bug2920.ys | 2 +- tests/opt/memory_bmux2rom.ys | 2 +- tests/opt/opt_lut_elim.ys | 2 +- tests/opt/opt_lut_ins.ys | 2 +- tests/opt/opt_lut_port.ys | 2 +- tests/opt/opt_reduce_bmux.ys | 10 +++++----- tests/opt/opt_reduce_demux.ys | 8 ++++---- tests/proc/bug2962.ys | 2 +- tests/proc/proc_rom.ys | 2 +- tests/rpc/frontend.py | 2 +- tests/sat/bug2595.ys | 2 +- tests/smv/run-single.sh | 2 +- tests/techmap/bmuxmap_pmux.ys | 4 ++-- tests/various/autoname.ys | 2 +- tests/various/bug1496.ys | 2 +- tests/various/equiv_opt_undef.ys | 2 +- tests/verilog/assign_to_reg.ys | 2 +- 28 files changed, 39 insertions(+), 69 deletions(-) diff --git a/backends/btor/test_cells.sh b/backends/btor/test_cells.sh index f8bd79782..fc7f5b75c 100755 --- a/backends/btor/test_cells.sh +++ b/backends/btor/test_cells.sh @@ -10,11 +10,11 @@ cd test_cells.tmp for fn in test_*.il; do ../../../yosys -p " - read_ilang $fn + read_rtlil $fn rename gold gate synth - read_ilang $fn + read_rtlil $fn miter -equiv -make_assert -flatten gold gate main hierarchy -top main write_btor ${fn%.il}.btor diff --git a/backends/rtlil/rtlil_backend.cc b/backends/rtlil/rtlil_backend.cc index 462401fb6..113f1a615 100644 --- a/backends/rtlil/rtlil_backend.cc +++ b/backends/rtlil/rtlil_backend.cc @@ -464,21 +464,6 @@ struct RTLILBackend : public Backend { } } RTLILBackend; -struct IlangBackend : public Backend { - IlangBackend() : Backend("ilang", "(deprecated) alias of write_rtlil") { } - void help() override - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log("See `help write_rtlil`.\n"); - log("\n"); - } - void execute(std::ostream *&f, std::string filename, std::vector args, RTLIL::Design *design) override - { - RTLILBackend.execute(f, filename, args, design); - } -} IlangBackend; - struct DumpPass : public Pass { DumpPass() : Pass("dump", "print parts of the design in RTLIL format") { } void help() override diff --git a/backends/smt2/test_cells.sh b/backends/smt2/test_cells.sh index 3f84d65a2..33c1b9989 100644 --- a/backends/smt2/test_cells.sh +++ b/backends/smt2/test_cells.sh @@ -21,7 +21,7 @@ EOT for x in $(set +x; ls test_*.il | sort -R); do x=${x%.il} cat > $x.ys <<- EOT - read_ilang $x.il + read_rtlil $x.il copy gold gate cd gate diff --git a/backends/smv/test_cells.sh b/backends/smv/test_cells.sh index 1347b7044..f2c5ff09d 100644 --- a/backends/smv/test_cells.sh +++ b/backends/smv/test_cells.sh @@ -17,11 +17,11 @@ EOT for fn in test_*.il; do ../../../yosys -p " - read_ilang $fn + read_rtlil $fn rename gold gate synth - read_ilang $fn + read_rtlil $fn miter -equiv -flatten gold gate main hierarchy -top main write_smv -tpl template.txt ${fn#.il}.smv diff --git a/docs/source/_images/internals/overview_flow.tex b/docs/source/_images/internals/overview_flow.tex index ac0afde5f..b3f12626a 100644 --- a/docs/source/_images/internals/overview_flow.tex +++ b/docs/source/_images/internals/overview_flow.tex @@ -15,23 +15,23 @@ \tikzstyle{data} = [draw, fill=blue!10, ellipse, minimum height=3em, minimum width=7em, node distance=15em] \node[process] (vlog) {Verilog Frontend}; \node[process, dashed, fill=green!5] (vhdl) [right of=vlog] {VHDL Frontend}; - \node[process] (ilang) [right of=vhdl] {RTLIL Frontend}; + \node[process] (rtlilfe) [right of=vhdl] {RTLIL Frontend}; \node[data] (ast) [below of=vlog, node distance=5em, xshift=7.5em] {AST}; \node[process] (astfe) [below of=ast, node distance=5em] {AST Frontend}; \node[data] (rtlil) [below of=astfe, node distance=5em, xshift=7.5em] {RTLIL}; \node[process] (pass) [right of=rtlil, node distance=5em, xshift=7.5em] {Passes}; \node[process] (vlbe) [below of=rtlil, node distance=7em, xshift=-13em] {Verilog Backend}; - \node[process] (ilangbe) [below of=rtlil, node distance=7em, xshift=0em] {RTLIL Backend}; + \node[process] (rtlilbe) [below of=rtlil, node distance=7em, xshift=0em] {RTLIL Backend}; \node[process, dashed, fill=green!5] (otherbe) [below of=rtlil, node distance=7em, xshift=+13em] {Other Backends}; \draw[-latex] (vlog) -- (ast); \draw[-latex] (vhdl) -- (ast); \draw[-latex] (ast) -- (astfe); \draw[-latex] (astfe) -- (rtlil); - \draw[-latex] (ilang) -- (rtlil); + \draw[-latex] (rtlilfe) -- (rtlil); \draw[latex-latex] (rtlil) -- (pass); \draw[-latex] (rtlil) -- (vlbe); - \draw[-latex] (rtlil) -- (ilangbe); + \draw[-latex] (rtlil) -- (rtlilbe); \draw[-latex] (rtlil) -- (otherbe); \end{tikzpicture} \end{document} diff --git a/frontends/rtlil/rtlil_frontend.cc b/frontends/rtlil/rtlil_frontend.cc index 5f85ca2b8..170ed560f 100644 --- a/frontends/rtlil/rtlil_frontend.cc +++ b/frontends/rtlil/rtlil_frontend.cc @@ -96,20 +96,5 @@ struct RTLILFrontend : public Frontend { } } RTLILFrontend; -struct IlangFrontend : public Frontend { - IlangFrontend() : Frontend("ilang", "(deprecated) alias of read_rtlil") { } - void help() override - { - // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| - log("\n"); - log("See `help read_rtlil`.\n"); - log("\n"); - } - void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design *design) override - { - RTLILFrontend.execute(f, filename, args, design); - } -} IlangFrontend; - YOSYS_NAMESPACE_END diff --git a/tests/arch/ecp5/bug1630.ys b/tests/arch/ecp5/bug1630.ys index 63df1ad5b..651e7c635 100644 --- a/tests/arch/ecp5/bug1630.ys +++ b/tests/arch/ecp5/bug1630.ys @@ -1,2 +1,2 @@ -read_ilang bug1630.il.gz +read_rtlil bug1630.il.gz abc9 -lut 4 diff --git a/tests/arch/ecp5/opt_lut_ins.ys b/tests/arch/ecp5/opt_lut_ins.ys index 2bc546912..622b5406c 100644 --- a/tests/arch/ecp5/opt_lut_ins.ys +++ b/tests/arch/ecp5/opt_lut_ins.ys @@ -1,4 +1,4 @@ -read_ilang << EOF +read_rtlil << EOF module \top diff --git a/tests/arch/ice40/bug1626.ys b/tests/arch/ice40/bug1626.ys index 27b6fb5e8..16f8283a0 100644 --- a/tests/arch/ice40/bug1626.ys +++ b/tests/arch/ice40/bug1626.ys @@ -1,4 +1,4 @@ -read_ilang < $1.ys < Date: Wed, 6 Nov 2024 17:35:00 -0800 Subject: [PATCH 4/5] Include cstdlib for free() --- libs/subcircuit/subcircuit.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/subcircuit/subcircuit.cc b/libs/subcircuit/subcircuit.cc index f38da3fcc..60f27fd55 100644 --- a/libs/subcircuit/subcircuit.cc +++ b/libs/subcircuit/subcircuit.cc @@ -21,6 +21,7 @@ #include "subcircuit.h" #include +#include #include #include #include From cef87cc179dcc45d742cfcd73d5378acb3f4068e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 00:20:23 +0000 Subject: [PATCH 5/5] Bump version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 636c93b64..a02fd108c 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ ifeq ($(OS), Haiku) CXXFLAGS += -D_DEFAULT_SOURCE endif -YOSYS_VER := 0.47+3 +YOSYS_VER := 0.47+22 # Note: We arrange for .gitcommit to contain the (short) commit hash in # tarballs generated with git-archive(1) using .gitattributes. The git repo