From 575d47b57ca7ab1886c811f3d1ce3741b0cb362e Mon Sep 17 00:00:00 2001 From: Staf Verhaegen Date: Mon, 25 Jun 2018 18:46:28 +0200 Subject: [PATCH] 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 --- .gitignore | 1 + sim/cocotb/controller/Makefile | 11 +++++++---- sim/cocotb/dual_parallel/Makefile | 11 +++++++---- sim/cocotb/dual_serial/TODO | 0 4 files changed, 15 insertions(+), 8 deletions(-) delete mode 100644 sim/cocotb/dual_serial/TODO 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 -- 2.30.2