From: Staf Verhaegen Date: Mon, 25 Jun 2018 16:46:28 +0000 (+0200) Subject: Simulation setup improvements: X-Git-Tag: 24jan2021ls180~59 X-Git-Url: https://git.libre-soc.org/?p=c4m-jtag.git;a=commitdiff_plain;h=575d47b57ca7ab1886c811f3d1ce3741b0cb362e;hp=c412840d70267efc14843383e16933992ec1be7c;ds=sidebyside Simulation setup improvements: * Use cocotb-path to get cocotb install dir * Use relative paths to find source code for simulation * Remove rm dual_serial test * Ignore build directory --- diff --git a/.gitignore b/.gitignore index d703adb..b0de9bd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ results.xml *.ghw sim/ghdl/bench_idcode +build \ No newline at end of file diff --git a/sim/cocotb/controller/Makefile b/sim/cocotb/controller/Makefile index 336d7e5..708e50d 100644 --- a/sim/cocotb/controller/Makefile +++ b/sim/cocotb/controller/Makefile @@ -1,5 +1,6 @@ -COCOTB=$(HOME)/eda/code/cocotb -VHDLDIR=$(HOME)/eda/code/c4m_jtag/rtl/vhdl +PWD=$(realpath .) +TOPDIR=$(realpath ../../..) +VHDLDIR=$(TOPDIR)/rtl/vhdl VHDL_SOURCES = \ $(VHDLDIR)/c4m_jtag_pkg.vhdl \ $(VHDLDIR)/c4m_jtag_tap_fsm.vhdl \ @@ -15,5 +16,7 @@ SIM=ghdl GPI_IMPL=vhpi SIM_ARGS=--wave=test.ghw -include $(COCOTB)/makefiles/Makefile.inc -include $(COCOTB)/makefiles/Makefile.sim +COCOTBDIR=$(shell cocotb-path) + +include $(COCOTBDIR)/makefiles/Makefile.inc +include $(COCOTBDIR)/makefiles/Makefile.sim diff --git a/sim/cocotb/dual_parallel/Makefile b/sim/cocotb/dual_parallel/Makefile index f692e4f..e7da7cd 100644 --- a/sim/cocotb/dual_parallel/Makefile +++ b/sim/cocotb/dual_parallel/Makefile @@ -1,5 +1,6 @@ -COCOTB=$(HOME)/eda/code/cocotb -VHDLDIR=$(HOME)/eda/code/c4m_jtag/rtl/vhdl +PWD=$(realpath .) +TOPDIR=$(realpath ../../..) +VHDLDIR=$(TOPDIR)/rtl/vhdl VHDL_SOURCES = \ $(VHDLDIR)/c4m_jtag_pkg.vhdl \ $(VHDLDIR)/c4m_jtag_tap_fsm.vhdl \ @@ -16,5 +17,7 @@ SIM=ghdl GPI_IMPL=vhpi SIM_ARGS=--wave=test.ghw -include $(COCOTB)/makefiles/Makefile.inc -include $(COCOTB)/makefiles/Makefile.sim +COCOTBDIR=$(shell cocotb-path) + +include $(COCOTBDIR)/makefiles/Makefile.inc +include $(COCOTBDIR)/makefiles/Makefile.sim diff --git a/sim/cocotb/dual_serial/TODO b/sim/cocotb/dual_serial/TODO deleted file mode 100644 index e69de29..0000000