From 4b42bf355fe6078800743b1f58c31758c862d6c9 Mon Sep 17 00:00:00 2001 From: Luca Colagrande Date: Fri, 9 Aug 2024 12:57:42 +0200 Subject: [PATCH] target: Generate iDMA dependencies --- .github/workflows/ci.yml | 1 + .gitlab-ci.yml | 1 + iis-setup.sh | 4 +--- target/common/common.mk | 5 ++--- target/snitch_cluster/Makefile | 10 ++++++++++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f267c22a5d..de4e731239 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: - name: Build Hardware working-directory: target/snitch_cluster run: | + pip install -r $($BENDER path idma)/requirements.txt make CFG_OVERRIDE=cfg/github-ci.hjson VLT_JOBS=1 bin/snitch_cluster.vlt - name: Run Tests working-directory: target/snitch_cluster diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 656558761a..5856df67e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,7 @@ variables: before_script: source iis-setup.sh + pip install $($BENDER path idma)/requirements.txt ############## # Build docs # diff --git a/iis-setup.sh b/iis-setup.sh index d56886c722..cf376b1a16 100755 --- a/iis-setup.sh +++ b/iis-setup.sh @@ -20,11 +20,9 @@ source .venv/bin/activate # occurring when the /tmp folder is filled by other processes. mkdir tmp TMPDIR=tmp pip install -r python-requirements.txt +TMPDIR=tmp pip install -r $($BENDER path idma)/requirements.txt rm -rf tmp -# Bender initialization -$BENDER vendor init - # Install spike-dasm mkdir tools/ cd tools/ diff --git a/target/common/common.mk b/target/common/common.mk index aac1e5d595..4c2b2c95be 100644 --- a/target/common/common.mk +++ b/target/common/common.mk @@ -47,9 +47,8 @@ VLT_ROOT ?= ${VERILATOR_ROOT} VLT_JOBS ?= $(shell nproc) VLT_NUM_THREADS ?= 1 -MATCH_END := '/+incdir+/ s/$$/\/*\/*/' -MATCH_BGN := 's/+incdir+//g' -SED_SRCS := sed -e ${MATCH_END} -e ${MATCH_BGN} +MATCH_REMOVE := 's/+incdir+\/[^ ]*//g' +SED_SRCS := sed -e ${MATCH_REMOVE} COMMON_BENDER_FLAGS += -t rtl diff --git a/target/snitch_cluster/Makefile b/target/snitch_cluster/Makefile index 60c49d8dc4..552e169b57 100644 --- a/target/snitch_cluster/Makefile +++ b/target/snitch_cluster/Makefile @@ -151,9 +151,19 @@ include $(ROOT)/target/snitch_cluster/sw.mk # RTL # ####### +# Include iDMA Makefile to generate prerequisite iDMA sources +include $(shell $(BENDER) path idma)/idma.mk + GENERATED_RTL_SOURCES = $(PERIPH_DIR)/snitch_cluster_peripheral_reg_top.sv GENERATED_RTL_SOURCES += $(PERIPH_DIR)/snitch_cluster_peripheral_reg_pkg.sv GENERATED_RTL_SOURCES += $(GENERATED_DIR)/snitch_cluster_wrapper.sv +GENERATED_RTL_SOURCES += $(IDMA_ROOT)/target/rtl/idma_inst64_top.sv +GENERATED_RTL_SOURCES += $(IDMA_ROOT)/target/rtl/include/idma/tracer.svh + +# Add dependency on DMA header files +VSIM_SOURCES += $(IDMA_ROOT)/target/rtl/include/idma/tracer.svh +VLT_SOURCES += $(IDMA_ROOT)/target/rtl/include/idma/tracer.svh +VCS_SOURCES += $(IDMA_ROOT)/target/rtl/include/idma/tracer.svh .PHONY: rtl clean-rtl