Skip to content

Commit

Permalink
target/common: Update paths to allow usage in derived repos
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca authored and GiannaP committed Jul 12, 2023
1 parent f244294 commit 5c459ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions target/common/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

LOGS_DIR ?= logs
TB_DIR ?= $(SNITCH_ROOT)/target/common/test
UTIL_DIR ?= $(SNITCH_ROOT)/util

# Support for local override
BENDER ?= bender
DASM ?= spike-dasm
VLT ?= verilator
VERIBLE_FMT ?= verible-verilog-format
BIN2JTAG ?= $(ROOT)/util/bin2jtag.py
ANNOTATE ?= ${ROOT}/util/trace/annotate.py
GENTRACE ?= ${ROOT}/util/trace/gen_trace.py
BIN2JTAG ?= $(UTIL_DIR)/bin2jtag.py
ANNOTATE ?= $(UTIL_DIR)/trace/annotate.py
GENTRACE ?= $(UTIL_DIR)/trace/gen_trace.py
CLANG_FORMAT ?= clang-format

VERILATOR_ROOT ?= $(dir $(shell which $(VLT)))/../share/verilator
VLT_ROOT ?= ${VERILATOR_ROOT}

LOGS_DIR ?= logs

MATCH_END := '/+incdir+/ s/$$/\/*\/*/'
MATCH_BGN := 's/+incdir+//g'
SED_SRCS := sed -e ${MATCH_END} -e ${MATCH_BGN}
TB_SRCS := $(wildcard ${ROOT}/hw/ip/test/*.sv)
TB_DIR := ${ROOT}/target/common/test

VSIM_BENDER += -t test -t rtl -t simulation -t vsim
VSIM_SOURCES = $(shell ${BENDER} script flist ${VSIM_BENDER} | ${SED_SRCS})
Expand Down
1 change: 1 addition & 0 deletions target/snitch_cluster/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ clean: clean-sw clean-work clean-vsim clean-vlt clean-vcs clean-logs clean-bende
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MKFILE_DIR := $(dir $(MKFILE_PATH))
ROOT := ${MKFILE_DIR}../..
SNITCH_ROOT := $(ROOT)

include $(ROOT)/target/common/common.mk

Expand Down

0 comments on commit 5c459ad

Please sign in to comment.