From 4a7f94f1c16cc70fdc1b47b95c9735002f1a22fe Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 28 Aug 2023 16:50:25 +0200 Subject: [PATCH] Enable synth_ecp5 wrapper and copy sim files for backwards compatibility --- Makefile | 7 +++++++ techlibs/lattice/Makefile.inc | 8 ++++++++ techlibs/lattice/synth_lattice.cc | 2 -- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 02f8fa0e9..6a0c1d058 100644 --- a/Makefile +++ b/Makefile @@ -561,6 +561,13 @@ $(subst //,/,$(1)/$(notdir $(2))): $(2) $$(Q) cp "$(YOSYS_SRC)"/$(2) $(subst //,/,$(1)/$(notdir $(2))) endef +define add_share_file_and_rename +EXTRA_TARGETS += $(subst //,/,$(1)/$(3)) +$(subst //,/,$(1)/$(3)): $(2) + $$(P) mkdir -p $(1) + $$(Q) cp "$(YOSYS_SRC)"/$(2) $(subst //,/,$(1)/$(3)) +endef + define add_gen_share_file EXTRA_TARGETS += $(subst //,/,$(1)/$(notdir $(2))) $(subst //,/,$(1)/$(notdir $(2))): $(2) diff --git a/techlibs/lattice/Makefile.inc b/techlibs/lattice/Makefile.inc index fd9ec2ed5..7cb034f4e 100644 --- a/techlibs/lattice/Makefile.inc +++ b/techlibs/lattice/Makefile.inc @@ -26,3 +26,11 @@ $(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/latches_map.v)) $(eval $(call add_share_file,share/lattice,techlibs/lattice/dsp_map_18x18.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)) diff --git a/techlibs/lattice/synth_lattice.cc b/techlibs/lattice/synth_lattice.cc index b13c22518..f08970118 100644 --- a/techlibs/lattice/synth_lattice.cc +++ b/techlibs/lattice/synth_lattice.cc @@ -500,7 +500,6 @@ struct SynthLatticePass : public ScriptPass } } SynthLatticePass; -/* struct SynthEcp5Pass : public Pass { SynthEcp5Pass() : Pass("synth_ecp5", "synthesis for ECP5 FPGAs") { } @@ -515,6 +514,5 @@ struct SynthEcp5Pass : public Pass Pass::call(design, args); } } SynthEcp5Pass; -*/ PRIVATE_NAMESPACE_END