Skip to content

Commit

Permalink
Add alias write_ilang -> write_rtlil and update Yosys version
Browse files Browse the repository at this point in the history
  • Loading branch information
Szelwiga committed Nov 21, 2024
1 parent 3a19d15 commit 071d737
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ set(synlig_SRC
${PROJECT_SOURCE_DIR}/src/frontends/systemverilog/uhdm_common_frontend.cc
${PROJECT_SOURCE_DIR}/src/mods/yosys_ast/synlig_const2ast.cc
${PROJECT_SOURCE_DIR}/src/mods/yosys_ast/synlig_edif.cc
${PROJECT_SOURCE_DIR}/src/mods/yosys_ast/synlig_simplify.cc)
${PROJECT_SOURCE_DIR}/src/mods/yosys_ast/synlig_simplify.cc
${PROJECT_SOURCE_DIR}/src/mods/yosys_ast/synlig_write_ilang.cc)

add_library(synlig SHARED ${synlig_SRC})

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CONFIG := none
# CONFIG := gcc

# --- add synlig cxxflags --- #
CXXFLAGS += -DSYNLIG_STANDALONE_BINARY -I $(SYNLIG_SRC)/frontends/*/ -I $(SYNLIG_SRC)/mods/* -I $(SYNLIG_SRC)/utils
CXXFLAGS += -DSYNLIG_STANDALONE_BINARY -I $(SYNLIG_SRC)/utils

# --- add static option --- #
CXXFLAGS += -static
Expand Down
3 changes: 2 additions & 1 deletion src/frontends/systemverilog/Build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ ${ts}.sources := \
${${ts}.src_dir}uhdm_surelog_ast_frontend.cc \
${${ts}.mod_dir}synlig_const2ast.cc \
${${ts}.mod_dir}synlig_edif.cc \
${${ts}.mod_dir}synlig_simplify.cc
${${ts}.mod_dir}synlig_simplify.cc \
${${ts}.mod_dir}synlig_write_ilang.cc

define ${ts}.env =
export PKG_CONFIG_PATH=$(call ShQuote,${$(call GetTargetStructName,surelog).output_vars.PKG_CONFIG_PATH}$(if ${PKG_CONFIG_PATH},:${PKG_CONFIG_PATH}))
Expand Down
2 changes: 2 additions & 0 deletions src/frontends/systemverilog/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

CXXFLAGS += -I $(SYNLIG_SRC)/frontends/systemverilog

SYNLIG_OBJS += frontends/systemverilog/uhdm_ast.o
SYNLIG_OBJS += frontends/systemverilog/uhdm_ast_frontend.o
SYNLIG_OBJS += frontends/systemverilog/uhdm_common_frontend.o
Expand Down
3 changes: 3 additions & 0 deletions src/mods/yosys_ast/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

CXXFLAGS += -I $(SYNLIG_SRC)/mods/yosys_ast

SYNLIG_OBJS += mods/yosys_ast/synlig_const2ast.o
SYNLIG_OBJS += mods/yosys_ast/synlig_edif.o
SYNLIG_OBJS += mods/yosys_ast/synlig_simplify.o
SYNLIG_OBJS += mods/yosys_ast/synlig_write_ilang.o
24 changes: 24 additions & 0 deletions src/mods/yosys_ast/synlig_write_ilang.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include "kernel/yosys.h"

namespace Synlig
{

using namespace ::Yosys;
struct WriteIlangAlias : public Pass {
WriteIlangAlias() : Pass("write_ilang", "alias for write_rtlil pass") {}
void help() override
{
log_warning("write_ilang pass is an alias for write_rtlil pass.\n\n");
run_pass("help write_rtlil");
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
log_warning("write_ilang pass is an alias for write_rtlil pass.\n\n");
std::string cmd = "write_rtlil";
for (int i = 1; i < args.size(); i++)
cmd += " " + args[i];
run_pass(cmd, design);
}
} WriteIlangAliasPass;

} // namespace Synlig
2 changes: 1 addition & 1 deletion third_party/yosys
Submodule yosys updated 40 files
+4 −4 Makefile
+17 −1 README.md
+5 −1 backends/btor/btor.cc
+2 −2 backends/cxxrtl/cxxrtl_backend.cc
+9 −1 backends/json/json.cc
+5 −4 backends/smt2/smt2.cc
+8 −12 backends/verilog/verilog_backend.cc
+3 −3 docs/source/code_examples/fifo/fifo.v
+8 −0 docs/source/getting_started/example_synth.rst
+5 −0 docs/source/introduction.rst
+37 −15 frontends/liberty/liberty.cc
+1 −1 frontends/verific/verific.cc
+2 −0 kernel/constids.inc
+1 −1 kernel/fmt.cc
+11 −11 kernel/functional.cc
+3 −3 kernel/rtlil.cc
+8 −0 kernel/timinginfo.h
+1 −0 libs/subcircuit/subcircuit.cc
+12 −7 misc/py_wrap_generator.py
+1 −0 passes/cmds/Makefile.inc
+1 −1 passes/cmds/glift.cc
+310 −0 passes/cmds/portarcs.cc
+1 −0 passes/pmgen/Makefile.inc
+21 −5 passes/pmgen/peepopt.cc
+59 −0 passes/pmgen/peepopt_formal_clockgateff.pmg
+15 −0 passes/sat/clk2fflogic.cc
+14 −7 passes/techmap/bufnorm.cc
+153 −28 passes/techmap/dfflibmap.cc
+154 −1 passes/techmap/libparse.cc
+47 −0 passes/techmap/libparse.h
+1 −0 techlibs/gatemate/synth_gatemate.cc
+1 −1 tests/liberty/.gitignore
+2 −0 tests/liberty/foundry_data/.gitignore
+ tests/liberty/foundry_data/RM_IHPSG13_1P_64x64_c2_bm_bist_typ_1p20V_25C.lib.filtered.gz
+16 −0 tests/liberty/foundry_data/rules.txt
+ tests/liberty/foundry_data/sg13g2_stdcell_typ_1p20V_25C.lib.filtered.gz
+23 −0 tests/liberty/options_test.ys
+0 −3 tests/liberty/unit_delay.ys
+9 −0 tests/memories/nordports.ys
+45 −0 tests/various/peepopt_formal.ys

0 comments on commit 071d737

Please sign in to comment.