From e594e90293bcc7cb9e58b8b3cace8ae08d62c8fd Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 12 Feb 2025 16:10:36 +0100 Subject: [PATCH] CMake: Add most of passes --- CMakeLists.txt | 25 +++++++++ passes/cmds/CMakeLists.txt | 84 ++++++++++++++--------------- passes/hierarchy/CMakeLists.txt | 10 ++++ techlibs/achronix/CMakeLists.txt | 7 +++ techlibs/anlogic/CMakeLists.txt | 9 ++++ techlibs/coolrunner2/CMakeLists.txt | 9 ++++ techlibs/easic/CMakeLists.txt | 7 +++ techlibs/ecp5/CMakeLists.txt | 7 +++ techlibs/efinix/CMakeLists.txt | 8 +++ techlibs/fabulous/CMakeLists.txt | 7 +++ techlibs/gatemate/CMakeLists.txt | 8 +++ techlibs/gowin/CMakeLists.txt | 7 +++ techlibs/greenpak4/CMakeLists.txt | 8 +++ techlibs/ice40/CMakeLists.txt | 9 ++++ techlibs/intel/CMakeLists.txt | 7 +++ techlibs/intel_alm/CMakeLists.txt | 7 +++ techlibs/lattice/CMakeLists.txt | 8 +++ techlibs/microchip/CMakeLists.txt | 8 +++ techlibs/nanoxplore/CMakeLists.txt | 8 +++ techlibs/nexus/CMakeLists.txt | 7 +++ techlibs/quicklogic/CMakeLists.txt | 12 +++++ techlibs/sf2/CMakeLists.txt | 7 +++ techlibs/xilinx/CMakeLists.txt | 8 +++ 23 files changed, 235 insertions(+), 42 deletions(-) create mode 100644 passes/hierarchy/CMakeLists.txt create mode 100644 techlibs/achronix/CMakeLists.txt create mode 100644 techlibs/anlogic/CMakeLists.txt create mode 100644 techlibs/coolrunner2/CMakeLists.txt create mode 100644 techlibs/easic/CMakeLists.txt create mode 100644 techlibs/ecp5/CMakeLists.txt create mode 100644 techlibs/efinix/CMakeLists.txt create mode 100644 techlibs/fabulous/CMakeLists.txt create mode 100644 techlibs/gatemate/CMakeLists.txt create mode 100644 techlibs/gowin/CMakeLists.txt create mode 100644 techlibs/greenpak4/CMakeLists.txt create mode 100644 techlibs/ice40/CMakeLists.txt create mode 100644 techlibs/intel/CMakeLists.txt create mode 100644 techlibs/intel_alm/CMakeLists.txt create mode 100644 techlibs/lattice/CMakeLists.txt create mode 100644 techlibs/microchip/CMakeLists.txt create mode 100644 techlibs/nanoxplore/CMakeLists.txt create mode 100644 techlibs/nexus/CMakeLists.txt create mode 100644 techlibs/quicklogic/CMakeLists.txt create mode 100644 techlibs/sf2/CMakeLists.txt create mode 100644 techlibs/xilinx/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index a9401fa7c..b4134f904 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ add_compile_definitions(_YOSYS_) add_subdirectory(kernel) add_subdirectory(libs) + add_subdirectory(frontends/aiger) add_subdirectory(frontends/aiger2) add_subdirectory(frontends/ast) @@ -34,6 +35,7 @@ add_subdirectory(frontends/liberty) add_subdirectory(frontends/rpc) add_subdirectory(frontends/rtlil) add_subdirectory(frontends/verilog) + add_subdirectory(backends/aiger) add_subdirectory(backends/aiger2) add_subdirectory(backends/blif) @@ -52,9 +54,11 @@ add_subdirectory(backends/smv) add_subdirectory(backends/spice) add_subdirectory(backends/table) add_subdirectory(backends/verilog) + add_subdirectory(passes/cmds) add_subdirectory(passes/equiv) add_subdirectory(passes/fsm) +add_subdirectory(passes/hierarchy) add_subdirectory(passes/memory) add_subdirectory(passes/opt) #add_subdirectory(passes/pmgen) @@ -62,6 +66,27 @@ add_subdirectory(passes/proc) add_subdirectory(passes/sat) add_subdirectory(passes/techmap) add_subdirectory(passes/tests) + +add_subdirectory(techlibs/achronix) +add_subdirectory(techlibs/anlogic) add_subdirectory(techlibs/common) +add_subdirectory(techlibs/coolrunner2) +add_subdirectory(techlibs/easic) +add_subdirectory(techlibs/ecp5) +add_subdirectory(techlibs/efinix) +add_subdirectory(techlibs/fabulous) +add_subdirectory(techlibs/gatemate) +add_subdirectory(techlibs/gowin) +add_subdirectory(techlibs/greenpak4) +add_subdirectory(techlibs/ice40) +add_subdirectory(techlibs/intel) +add_subdirectory(techlibs/intel_alm) +add_subdirectory(techlibs/lattice) +add_subdirectory(techlibs/microchip) +add_subdirectory(techlibs/nanoxplore) +add_subdirectory(techlibs/nexus) +add_subdirectory(techlibs/quicklogic) +add_subdirectory(techlibs/sf2) +add_subdirectory(techlibs/xilinx) target_link_libraries(yosys PRIVATE z) diff --git a/passes/cmds/CMakeLists.txt b/passes/cmds/CMakeLists.txt index 8945bd1d1..4bb31879f 100644 --- a/passes/cmds/CMakeLists.txt +++ b/passes/cmds/CMakeLists.txt @@ -1,56 +1,56 @@ add_library(yosys_passes_cmds INTERFACE) target_sources(yosys_passes_cmds INTERFACE + exec.cc add.cc - autoname.cc - blackbox.cc - box_derive.cc - bugpoint.cc - check.cc - chformal.cc - chtype.cc - clean_zerowidth.cc - connect.cc - connwrappers.cc - copy.cc - cover.cc delete.cc design.cc - dft_tag.cc - edgetypes.cc - example_dt.cc - exec.cc - future.cc - glift.cc - internal_stats.cc - logcmd.cc - logger.cc - ltp.cc - plugin.cc - portarcs.cc - portlist.cc - printattrs.cc - rename.cc - scatter.cc - scc.cc - scratchpad.cc select.cc - setattr.cc - setenv.cc - setundef.cc show.cc - splice.cc - splitcells.cc - splitnets.cc - sta.cc - stat.cc - tee.cc - torder.cc - trace.cc viz.cc - wrapcell.cc + rename.cc + autoname.cc + connect.cc + scatter.cc + setundef.cc + splitnets.cc + splitcells.cc + stat.cc + internal_stats.cc + setattr.cc + copy.cc + splice.cc + scc.cc + glift.cc + torder.cc + logcmd.cc + tee.cc write_file.cc + connwrappers.cc + cover.cc + trace.cc + plugin.cc + check.cc + edgetypes.cc + portlist.cc + chformal.cc + chtype.cc + blackbox.cc + ltp.cc + bugpoint.cc + scratchpad.cc + logger.cc + printattrs.cc + sta.cc + clean_zerowidth.cc xprop.cc + dft_tag.cc + future.cc + box_derive.cc + example_dt.cc + portarcs.cc + wrapcell.cc + setenv.cc ) target_link_libraries(yosys PRIVATE yosys_passes_cmds) diff --git a/passes/hierarchy/CMakeLists.txt b/passes/hierarchy/CMakeLists.txt new file mode 100644 index 000000000..d8125bd35 --- /dev/null +++ b/passes/hierarchy/CMakeLists.txt @@ -0,0 +1,10 @@ +add_library(yosys_passes_hierarchy INTERFACE) + +target_sources(yosys_passes_hierarchy INTERFACE + hierarchy.cc + uniquify.cc + submod.cc + keep_hierarchy.cc +) + +target_link_libraries(yosys PRIVATE yosys_passes_hierarchy) diff --git a/techlibs/achronix/CMakeLists.txt b/techlibs/achronix/CMakeLists.txt new file mode 100644 index 000000000..16d125880 --- /dev/null +++ b/techlibs/achronix/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_achronix INTERFACE) + +target_sources(yosys_techlibs_achronix INTERFACE + synth_achronix.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_achronix) diff --git a/techlibs/anlogic/CMakeLists.txt b/techlibs/anlogic/CMakeLists.txt new file mode 100644 index 000000000..047e76da6 --- /dev/null +++ b/techlibs/anlogic/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(yosys_techlibs_anlogic INTERFACE) + +target_sources(yosys_techlibs_anlogic INTERFACE + synth_anlogic.cc + anlogic_eqn.cc + anlogic_fixcarry.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_anlogic) diff --git a/techlibs/coolrunner2/CMakeLists.txt b/techlibs/coolrunner2/CMakeLists.txt new file mode 100644 index 000000000..9656d3b86 --- /dev/null +++ b/techlibs/coolrunner2/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(yosys_techlibs_coolrunner2 INTERFACE) + +target_sources(yosys_techlibs_coolrunner2 INTERFACE + synth_coolrunner2.cc + coolrunner2_sop.cc + coolrunner2_fixup.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_coolrunner2) diff --git a/techlibs/easic/CMakeLists.txt b/techlibs/easic/CMakeLists.txt new file mode 100644 index 000000000..646d65de3 --- /dev/null +++ b/techlibs/easic/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_easic INTERFACE) + +target_sources(yosys_techlibs_easic INTERFACE + synth_easic.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_easic) diff --git a/techlibs/ecp5/CMakeLists.txt b/techlibs/ecp5/CMakeLists.txt new file mode 100644 index 000000000..33350aa23 --- /dev/null +++ b/techlibs/ecp5/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_ecp5 INTERFACE) + +target_sources(yosys_techlibs_ecp5 INTERFACE + synth_ecp5.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_ecp5) diff --git a/techlibs/efinix/CMakeLists.txt b/techlibs/efinix/CMakeLists.txt new file mode 100644 index 000000000..69f1a6cc9 --- /dev/null +++ b/techlibs/efinix/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(yosys_techlibs_efinix INTERFACE) + +target_sources(yosys_techlibs_efinix INTERFACE + synth_efinix.cc + efinix_fixcarry.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_efinix) diff --git a/techlibs/fabulous/CMakeLists.txt b/techlibs/fabulous/CMakeLists.txt new file mode 100644 index 000000000..3b2b4cbc0 --- /dev/null +++ b/techlibs/fabulous/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_fabulous INTERFACE) + +target_sources(yosys_techlibs_fabulous INTERFACE + synth_fabulous.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_fabulous) diff --git a/techlibs/gatemate/CMakeLists.txt b/techlibs/gatemate/CMakeLists.txt new file mode 100644 index 000000000..52dc9763e --- /dev/null +++ b/techlibs/gatemate/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(yosys_techlibs_gatemate INTERFACE) + +target_sources(yosys_techlibs_gatemate INTERFACE + synth_gatemate.cc + gatemate_foldinv.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_gatemate) diff --git a/techlibs/gowin/CMakeLists.txt b/techlibs/gowin/CMakeLists.txt new file mode 100644 index 000000000..74b7505e4 --- /dev/null +++ b/techlibs/gowin/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_gowin INTERFACE) + +target_sources(yosys_techlibs_gowin INTERFACE + synth_gowin.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_gowin) diff --git a/techlibs/greenpak4/CMakeLists.txt b/techlibs/greenpak4/CMakeLists.txt new file mode 100644 index 000000000..467a5fe5b --- /dev/null +++ b/techlibs/greenpak4/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(yosys_techlibs_greenpak4 INTERFACE) + +target_sources(yosys_techlibs_greenpak4 INTERFACE + synth_greenpak4.cc + greenpak4_dffinv.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_greenpak4) diff --git a/techlibs/ice40/CMakeLists.txt b/techlibs/ice40/CMakeLists.txt new file mode 100644 index 000000000..da0f12004 --- /dev/null +++ b/techlibs/ice40/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(yosys_techlibs_ice40 INTERFACE) + +target_sources(yosys_techlibs_ice40 INTERFACE + synth_ice40.cc + ice40_braminit.cc + ice40_opt.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_ice40) diff --git a/techlibs/intel/CMakeLists.txt b/techlibs/intel/CMakeLists.txt new file mode 100644 index 000000000..2d64b81fc --- /dev/null +++ b/techlibs/intel/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_intel INTERFACE) + +target_sources(yosys_techlibs_intel INTERFACE + synth_intel.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_intel) diff --git a/techlibs/intel_alm/CMakeLists.txt b/techlibs/intel_alm/CMakeLists.txt new file mode 100644 index 000000000..79bd1f175 --- /dev/null +++ b/techlibs/intel_alm/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_intel_alm INTERFACE) + +target_sources(yosys_techlibs_intel_alm INTERFACE + synth_intel_alm.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_intel_alm) diff --git a/techlibs/lattice/CMakeLists.txt b/techlibs/lattice/CMakeLists.txt new file mode 100644 index 000000000..08c00c74b --- /dev/null +++ b/techlibs/lattice/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(yosys_techlibs_lattice INTERFACE) + +target_sources(yosys_techlibs_lattice INTERFACE + synth_lattice.cc + lattice_gsr.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_lattice) diff --git a/techlibs/microchip/CMakeLists.txt b/techlibs/microchip/CMakeLists.txt new file mode 100644 index 000000000..c48687a4d --- /dev/null +++ b/techlibs/microchip/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(yosys_techlibs_microchip INTERFACE) + +target_sources(yosys_techlibs_microchip INTERFACE + synth_microchip.cc + microchip_dffopt.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_microchip) diff --git a/techlibs/nanoxplore/CMakeLists.txt b/techlibs/nanoxplore/CMakeLists.txt new file mode 100644 index 000000000..bfbafed06 --- /dev/null +++ b/techlibs/nanoxplore/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(yosys_techlibs_nanoxplore INTERFACE) + +target_sources(yosys_techlibs_nanoxplore INTERFACE + synth_nanoxplore.cc + nx_carry.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_nanoxplore) diff --git a/techlibs/nexus/CMakeLists.txt b/techlibs/nexus/CMakeLists.txt new file mode 100644 index 000000000..7ed93a18c --- /dev/null +++ b/techlibs/nexus/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_nexus INTERFACE) + +target_sources(yosys_techlibs_nexus INTERFACE + synth_nexus.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_nexus) diff --git a/techlibs/quicklogic/CMakeLists.txt b/techlibs/quicklogic/CMakeLists.txt new file mode 100644 index 000000000..710255f78 --- /dev/null +++ b/techlibs/quicklogic/CMakeLists.txt @@ -0,0 +1,12 @@ +add_library(yosys_techlibs_quicklogic INTERFACE) + +target_sources(yosys_techlibs_quicklogic INTERFACE + synth_quicklogic.cc + ql_bram_merge.cc + ql_bram_types.cc + ql_dsp_simd.cc + ql_dsp_io_regs.cc + #ql_dsp_macc.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_quicklogic) diff --git a/techlibs/sf2/CMakeLists.txt b/techlibs/sf2/CMakeLists.txt new file mode 100644 index 000000000..69701df7e --- /dev/null +++ b/techlibs/sf2/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(yosys_techlibs_sf2 INTERFACE) + +target_sources(yosys_techlibs_sf2 INTERFACE + synth_sf2.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_sf2) diff --git a/techlibs/xilinx/CMakeLists.txt b/techlibs/xilinx/CMakeLists.txt new file mode 100644 index 000000000..c7e4ee59a --- /dev/null +++ b/techlibs/xilinx/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(yosys_techlibs_xilinx INTERFACE) + +target_sources(yosys_techlibs_xilinx INTERFACE + synth_xilinx.cc + xilinx_dffopt.cc +) + +target_link_libraries(yosys PRIVATE yosys_techlibs_xilinx)