radiance.mk: Re-enable radpie; sync csrc/ as well
This commit is contained in:
25
radiance.mk
25
radiance.mk
@@ -5,13 +5,14 @@
|
|||||||
VORTEX_SRC_DIR = $(base_dir)/generators/radiance/src/main/resources/vsrc/vortex
|
VORTEX_SRC_DIR = $(base_dir)/generators/radiance/src/main/resources/vsrc/vortex
|
||||||
RADPIE_SRC_DIR = $(base_dir)/generators/radiance/radpie
|
RADPIE_SRC_DIR = $(base_dir)/generators/radiance/radpie
|
||||||
RADPIE_BUILD_DIR = $(RADPIE_SRC_DIR)/target/release
|
RADPIE_BUILD_DIR = $(RADPIE_SRC_DIR)/target/release
|
||||||
|
RADIANCE_CSRC_DIR = $(base_dir)/generators/radiance/src/main/resources/csrc
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# THE FOLLOWING MUST BE += operators
|
# THE FOLLOWING MUST BE += operators
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
# EXTRA_SIM_REQS += radpie
|
EXTRA_SIM_REQS += radpie
|
||||||
# EXTRA_SIM_LDFLAGS += -L$(RADPIE_BUILD_DIR) -Wl,-rpath,$(RADPIE_BUILD_DIR) -lradpie
|
EXTRA_SIM_LDFLAGS += -L$(RADPIE_BUILD_DIR) -Wl,-rpath,$(RADPIE_BUILD_DIR) -lradpie
|
||||||
ifeq ($(shell echo $(CONFIG) | grep -E "SynConfig$$"),$(CONFIG))
|
ifeq ($(shell echo $(CONFIG) | grep -E "SynConfig$$"),$(CONFIG))
|
||||||
EXTRA_SIM_PREPROC_DEFINES += +define+SYNTHESIS +define+NDEBUG +define+DPI_DISABLE
|
EXTRA_SIM_PREPROC_DEFINES += +define+SYNTHESIS +define+NDEBUG +define+DPI_DISABLE
|
||||||
endif
|
endif
|
||||||
@@ -36,16 +37,18 @@ radpie:
|
|||||||
cd $(RADPIE_SRC_DIR) && cargo build --release
|
cd $(RADPIE_SRC_DIR) && cargo build --release
|
||||||
|
|
||||||
EXTRA_SIM_REQS += vortex_vsrc.$(CONFIG)
|
EXTRA_SIM_REQS += vortex_vsrc.$(CONFIG)
|
||||||
# below manipulation of VORTEX_VLOG_SOURCES doesn't work if we try to reuse
|
# below manipulation of RADIANCE_EXTERNAL_SRCS doesn't work if we try to reuse
|
||||||
# $(call lookup_srcs) from common.mk, the variable doesn't expand somehow
|
# $(call lookup_srcs) from common.mk, the variable doesn't expand somehow
|
||||||
ifeq ($(shell which fd 2> /dev/null),)
|
ifeq ($(shell which fdfd 2> /dev/null),)
|
||||||
VORTEX_VLOG_SOURCES := $(shell find -L $(VORTEX_SRC_DIR) -type f -iname "*.sv" -o -iname "*.vh" -o -iname "*.v")
|
RADIANCE_EXTERNAL_SRCS := $(shell find -L $(VORTEX_SRC_DIR) -type f -iname "*.sv" -o -iname "*.vh" -o -iname "*.v")
|
||||||
|
RADIANCE_EXTERNAL_SRCS += $(shell find -L $(RADIANCE_CSRC_DIR) -type f)
|
||||||
else
|
else
|
||||||
VORTEX_VLOG_SOURCES := $(shell fd -L -t f -e "sv" -e "vh" -e "v" . $(VORTEX_SRC_DIR))
|
RADIANCE_EXTERNAL_SRCS := $(shell fdfind -L -t f -e "sv" -e "vh" -e "v" . $(VORTEX_SRC_DIR))
|
||||||
|
RADIANCE_EXTERNAL_SRCS += $(shell fdfind -L -t f . $(RADIANCE_CSRC_DIR))
|
||||||
endif
|
endif
|
||||||
# VORTEX_COLLATERAL := $(patsubst $(VORTEX_SRC_DIR)%,$(GEN_COLLATERAL_DIR)%,$(VORTEX_VLOG_SOURCES))
|
|
||||||
# check if expanded
|
# for debug; check if expanded
|
||||||
# $(info VORTEX_VLOG_SOURCES: $(VORTEX_VLOG_SOURCES))
|
# $(info RADIANCE_EXTERNAL_SRCS: $(RADIANCE_EXTERNAL_SRCS))
|
||||||
|
|
||||||
# For every Vortex verilog source file, if there's a matching file in
|
# For every Vortex verilog source file, if there's a matching file in
|
||||||
# gen-collateral/, copy them over. This is a hacky way to ensure the changes
|
# gen-collateral/, copy them over. This is a hacky way to ensure the changes
|
||||||
@@ -53,8 +56,8 @@ endif
|
|||||||
# necessary when common.mk does not trigger chipyard jar rebuild upon verilog
|
# necessary when common.mk does not trigger chipyard jar rebuild upon verilog
|
||||||
# source updates, in which case we need to manually ensure the up-to-date-ness
|
# source updates, in which case we need to manually ensure the up-to-date-ness
|
||||||
# of gen-collateral/.
|
# of gen-collateral/.
|
||||||
vortex_vsrc.$(CONFIG): $(VORTEX_VLOG_SOURCES)
|
vortex_vsrc.$(CONFIG): $(RADIANCE_EXTERNAL_SRCS)
|
||||||
@for file in $(VORTEX_VLOG_SOURCES); do \
|
@for file in $(RADIANCE_EXTERNAL_SRCS); do \
|
||||||
filename=$$(basename "$$file"); \
|
filename=$$(basename "$$file"); \
|
||||||
if [ -f $(GEN_COLLATERAL_DIR)/$$filename ]; then \
|
if [ -f $(GEN_COLLATERAL_DIR)/$$filename ]; then \
|
||||||
if ! diff $$file $(GEN_COLLATERAL_DIR)/$$filename &>/dev/null ; then \
|
if ! diff $$file $(GEN_COLLATERAL_DIR)/$$filename &>/dev/null ; then \
|
||||||
|
|||||||
Reference in New Issue
Block a user