3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-02 23:28:00 +00:00

Migrate build system to CMake

See #5895 for details.

This commit does not include CI or documentation changes.
This commit is contained in:
Catherine 2026-05-12 05:33:04 +00:00
parent 0ef0a8881e
commit a867291e4e
206 changed files with 5179 additions and 2302 deletions

View file

@ -0,0 +1,101 @@
pmgen_command(lattice_dsp_nexus
lattice_dsp_nexus.pmg
)
yosys_pass(lattice_dsp_nexus
lattice_dsp_nexus.cc
${PMGEN_lattice_dsp_nexus_OUTPUT}
)
yosys_pass(lattice_gsr
lattice_gsr.cc
)
yosys_pass(synth_lattice
synth_lattice.cc
REQUIRES
abc
abc9
alumacc
attrmvcp
autoname
blackbox
booth
check
clean
deminout
dfflegalize
flatten
fsm
hierarchy
iopadmap
lattice_dsp_nexus
lattice_gsr
memory
memory_libmap
memory_map
opt
opt_clean
opt_expr
opt_lut_ins
opt_merge
peepopt
proc
read_verilog
share
simplemap
stat
techmap
tribuf
wreduce
write_edif
write_json
zinit
DATA_EXPLICIT
lattice/cells_ff.vh cells_ff.vh
lattice/cells_io.vh cells_io.vh
lattice/cells_map_trellis.v cells_map_trellis.v
lattice/cells_map_nexus.v cells_map_nexus.v
lattice/common_sim.vh common_sim.vh
lattice/parse_init.vh parse_init.vh
lattice/ccu2d_sim.vh ccu2d_sim.vh
lattice/ccu2c_sim.vh ccu2c_sim.vh
lattice/cells_sim_ecp5.v cells_sim_ecp5.v
lattice/cells_sim_xo2.v cells_sim_xo2.v
lattice/cells_sim_xo3.v cells_sim_xo3.v
lattice/cells_sim_xo3d.v cells_sim_xo3d.v
lattice/cells_sim_nexus.v cells_sim_nexus.v
lattice/cells_bb_ecp5.v cells_bb_ecp5.v
lattice/cells_bb_xo2.v cells_bb_xo2.v
lattice/cells_bb_xo3.v cells_bb_xo3.v
lattice/cells_bb_xo3d.v cells_bb_xo3d.v
lattice/cells_bb_nexus.v cells_bb_nexus.v
lattice/lutrams_map_trellis.v lutrams_map_trellis.v
lattice/lutrams_trellis.txt lutrams_trellis.txt
lattice/lutrams_map_nexus.v lutrams_map_nexus.v
lattice/lutrams_nexus.txt lutrams_nexus.txt
lattice/lrams_map_nexus.v lrams_map_nexus.v
lattice/lrams_nexus.txt lrams_nexus.txt
lattice/brams_map_16kd.v brams_map_16kd.v
lattice/brams_16kd.txt brams_16kd.txt
lattice/brams_map_8kc.v brams_map_8kc.v
lattice/brams_8kc.txt brams_8kc.txt
lattice/brams_map_nexus.v brams_map_nexus.v
lattice/brams_nexus.txt brams_nexus.txt
lattice/arith_map_ccu2c.v arith_map_ccu2c.v
lattice/arith_map_ccu2d.v arith_map_ccu2d.v
lattice/arith_map_nexus.v arith_map_nexus.v
lattice/latches_map.v latches_map.v
lattice/dsp_map_18x18.v dsp_map_18x18.v
lattice/dsp_map_nexus.v dsp_map_nexus.v
ecp5/cells_ff.vh cells_ff.vh
ecp5/cells_io.vh cells_io.vh
ecp5/common_sim.vh common_sim.vh
ecp5/ccu2c_sim.vh ccu2c_sim.vh
ecp5/cells_sim.v cells_sim_ecp5.v
ecp5/cells_bb.v cells_bb_ecp5.v
nexus/parse_init.vh parse_init.vh
nexus/cells_sim.v cells_sim_nexus.v
nexus/cells_xtra.v cells_bb_nexus.v
)

View file

@ -1,60 +0,0 @@
OBJS += techlibs/lattice/synth_lattice.o
OBJS += techlibs/lattice/lattice_gsr.o
OBJS += techlibs/lattice/lattice_dsp_nexus.o
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_ff.vh))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_io.vh))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_map_trellis.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_map_nexus.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/common_sim.vh))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/parse_init.vh))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/ccu2d_sim.vh))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/ccu2c_sim.vh))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_sim_ecp5.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_sim_xo2.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_sim_xo3.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_sim_xo3d.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_sim_nexus.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_bb_ecp5.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_bb_xo2.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_bb_xo3.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_bb_xo3d.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/cells_bb_nexus.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/lutrams_map_trellis.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/lutrams_trellis.txt))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/lutrams_map_nexus.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/lutrams_nexus.txt))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/lrams_map_nexus.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/lrams_nexus.txt))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/brams_map_16kd.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/brams_16kd.txt))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/brams_map_8kc.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/brams_8kc.txt))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/brams_map_nexus.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/brams_nexus.txt))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/arith_map_ccu2c.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/arith_map_ccu2d.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/arith_map_nexus.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/latches_map.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/dsp_map_18x18.v))
$(eval $(call add_share_file,share/lattice,techlibs/lattice/dsp_map_nexus.v))
$(eval $(call add_share_file,share/ecp5,techlibs/lattice/cells_ff.vh))
$(eval $(call add_share_file,share/ecp5,techlibs/lattice/cells_io.vh))
$(eval $(call add_share_file,share/ecp5,techlibs/lattice/common_sim.vh))
$(eval $(call add_share_file,share/ecp5,techlibs/lattice/ccu2c_sim.vh))
$(eval $(call add_share_file_and_rename,share/ecp5,techlibs/lattice/cells_sim_ecp5.v,cells_sim.v))
$(eval $(call add_share_file_and_rename,share/ecp5,techlibs/lattice/cells_bb_ecp5.v,cells_bb.v))
$(eval $(call add_share_file,share/nexus,techlibs/lattice/parse_init.vh))
$(eval $(call add_share_file_and_rename,share/nexus,techlibs/lattice/cells_sim_nexus.v,cells_sim.v))
$(eval $(call add_share_file_and_rename,share/nexus,techlibs/lattice/cells_bb_nexus.v,cells_xtra.v))
techlibs/lattice/%_pm.h: passes/pmgen/pmgen.py techlibs/lattice/%.pmg
$(P) mkdir -p $(dir $@) && $(PYTHON_EXECUTABLE) $< -o $@ -p $(notdir $*) $(filter-out $<,$^)
GENFILES += techlibs/lattice/lattice_dsp_nexus_pm.h
techlibs/lattice/lattice_dsp_nexus.o: techlibs/lattice/lattice_dsp_nexus_pm.h
$(eval $(call add_extra_objs,techlibs/lattice/lattice_dsp_nexus_pm.h))