mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-06-27 17:01:10 -04:00
bug fix
Some checks are pending
CI / setup (push) Waiting to run
CI / build (32) (push) Blocked by required conditions
CI / build (64) (push) Blocked by required conditions
CI / tests (cache, 32) (push) Blocked by required conditions
CI / tests (cache, 64) (push) Blocked by required conditions
CI / tests (config1, 32) (push) Blocked by required conditions
CI / tests (config1, 64) (push) Blocked by required conditions
CI / tests (config2, 32) (push) Blocked by required conditions
CI / tests (config2, 64) (push) Blocked by required conditions
CI / tests (cupbop, 32) (push) Blocked by required conditions
CI / tests (cupbop, 64) (push) Blocked by required conditions
CI / tests (debug, 32) (push) Blocked by required conditions
CI / tests (debug, 64) (push) Blocked by required conditions
CI / tests (opencl, 32) (push) Blocked by required conditions
CI / tests (opencl, 64) (push) Blocked by required conditions
CI / tests (regression, 32) (push) Blocked by required conditions
CI / tests (regression, 64) (push) Blocked by required conditions
CI / tests (scope, 32) (push) Blocked by required conditions
CI / tests (scope, 64) (push) Blocked by required conditions
CI / tests (stress, 32) (push) Blocked by required conditions
CI / tests (stress, 64) (push) Blocked by required conditions
CI / tests (synthesis, 32) (push) Blocked by required conditions
CI / tests (synthesis, 64) (push) Blocked by required conditions
CI / tests (tensor, 32) (push) Blocked by required conditions
CI / tests (tensor, 64) (push) Blocked by required conditions
CI / tests (vector, 32) (push) Blocked by required conditions
CI / tests (vector, 64) (push) Blocked by required conditions
CI / tests (vm, 32) (push) Blocked by required conditions
CI / tests (vm, 64) (push) Blocked by required conditions
CI / complete (push) Blocked by required conditions
Some checks are pending
CI / setup (push) Waiting to run
CI / build (32) (push) Blocked by required conditions
CI / build (64) (push) Blocked by required conditions
CI / tests (cache, 32) (push) Blocked by required conditions
CI / tests (cache, 64) (push) Blocked by required conditions
CI / tests (config1, 32) (push) Blocked by required conditions
CI / tests (config1, 64) (push) Blocked by required conditions
CI / tests (config2, 32) (push) Blocked by required conditions
CI / tests (config2, 64) (push) Blocked by required conditions
CI / tests (cupbop, 32) (push) Blocked by required conditions
CI / tests (cupbop, 64) (push) Blocked by required conditions
CI / tests (debug, 32) (push) Blocked by required conditions
CI / tests (debug, 64) (push) Blocked by required conditions
CI / tests (opencl, 32) (push) Blocked by required conditions
CI / tests (opencl, 64) (push) Blocked by required conditions
CI / tests (regression, 32) (push) Blocked by required conditions
CI / tests (regression, 64) (push) Blocked by required conditions
CI / tests (scope, 32) (push) Blocked by required conditions
CI / tests (scope, 64) (push) Blocked by required conditions
CI / tests (stress, 32) (push) Blocked by required conditions
CI / tests (stress, 64) (push) Blocked by required conditions
CI / tests (synthesis, 32) (push) Blocked by required conditions
CI / tests (synthesis, 64) (push) Blocked by required conditions
CI / tests (tensor, 32) (push) Blocked by required conditions
CI / tests (tensor, 64) (push) Blocked by required conditions
CI / tests (vector, 32) (push) Blocked by required conditions
CI / tests (vector, 64) (push) Blocked by required conditions
CI / tests (vm, 32) (push) Blocked by required conditions
CI / tests (vm, 64) (push) Blocked by required conditions
CI / complete (push) Blocked by required conditions
This commit is contained in:
parent
a08eefd97e
commit
279588e538
9 changed files with 72 additions and 53 deletions
|
@ -19,7 +19,7 @@ ROOT_DIR=$SCRIPT_DIR/..
|
|||
show_usage()
|
||||
{
|
||||
echo "Vortex BlackBox Test Driver v1.0"
|
||||
echo "Usage: $0 [[--clusters=#n] [--cores=#n] [--warps=#n] [--threads=#n] [--l2cache] [--l3cache] [[--driver=#name] [--app=#app] [--args=#args] [--debug=#level] [--scope] [--perf=#class] [--rebuild=#n] [--log=logfile] [--help]]"
|
||||
echo "Usage: $0 [[--clusters=#n] [--cores=#n] [--warps=#n] [--threads=#n] [--l2cache] [--l3cache] [[--driver=#name] [--app=#app] [--args=#args] [--debug=#level] [--scope] [--perf=#class] [--log=logfile] [--help]]"
|
||||
}
|
||||
|
||||
show_help()
|
||||
|
@ -29,7 +29,6 @@ show_help()
|
|||
echo "--driver: gpu, simx, rtlsim, oape, xrt"
|
||||
echo "--app: any subfolder test under regression or opencl"
|
||||
echo "--class: 0=disable, 1=pipeline, 2=memsys"
|
||||
echo "--rebuild: 0=disable, 1=force, 2=auto, 3=temp"
|
||||
}
|
||||
|
||||
add_option() {
|
||||
|
@ -49,7 +48,6 @@ DEFAULTS() {
|
|||
HAS_ARGS=0
|
||||
PERF_CLASS=0
|
||||
CONFIGS="$CONFIGS"
|
||||
REBUILD=2
|
||||
TEMPBUILD=0
|
||||
LOGFILE=run.log
|
||||
}
|
||||
|
@ -70,18 +68,11 @@ parse_args() {
|
|||
--debug=*) DEBUG=1; DEBUG_LEVEL=${i#*=} ;;
|
||||
--scope) SCOPE=1; ;;
|
||||
--args=*) HAS_ARGS=1; ARGS=${i#*=} ;;
|
||||
--rebuild=*) REBUILD=${i#*=} ;;
|
||||
--log=*) LOGFILE=${i#*=} ;;
|
||||
--help) show_help; exit 0 ;;
|
||||
*) show_usage; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $REBUILD -eq 3 ];
|
||||
then
|
||||
REBUILD=1
|
||||
TEMPBUILD=1
|
||||
fi
|
||||
}
|
||||
|
||||
set_driver_path() {
|
||||
|
@ -148,16 +139,6 @@ main() {
|
|||
echo "CONFIGS=$CONFIGS"
|
||||
fi
|
||||
|
||||
if [ $REBUILD -ne 0 ]; then
|
||||
BLACKBOX_CACHE=blackbox.$DRIVER.cache
|
||||
LAST_CONFIGS=$(cat "$BLACKBOX_CACHE" 2>/dev/null || echo "")
|
||||
|
||||
if [ $REBUILD -eq 1 ] || [ "$CONFIGS+$DEBUG+$SCOPE" != "$LAST_CONFIGS" ]; then
|
||||
make -j4 -C $DRIVER_PATH clean-driver > /dev/null
|
||||
echo "$CONFIGS+$DEBUG+$SCOPE" > "$BLACKBOX_CACHE"
|
||||
fi
|
||||
fi
|
||||
|
||||
export VORTEX_PROFILING=$PERF_CLASS
|
||||
|
||||
make -C "$ROOT_DIR/hw" config > /dev/null
|
||||
|
|
|
@ -47,6 +47,8 @@ endif
|
|||
|
||||
PROJECT := libvortex-opae.so
|
||||
|
||||
.PHONY: all force driver clean-driver clean-runtime clean
|
||||
|
||||
all: $(DESTDIR)/$(PROJECT)
|
||||
|
||||
$(ROOT_DIR)/hw/syn/altera/opae/vortex_afu.h:
|
||||
|
@ -54,7 +56,7 @@ $(ROOT_DIR)/hw/syn/altera/opae/vortex_afu.h:
|
|||
|
||||
driver: $(DESTDIR)/libopae-c-sim.so
|
||||
|
||||
$(DESTDIR)/libopae-c-sim.so:
|
||||
$(DESTDIR)/libopae-c-sim.so: force
|
||||
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/opaesim $(DESTDIR)/libopae-c-sim.so
|
||||
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(BUILD_DEPS)
|
||||
|
@ -66,6 +68,4 @@ clean-driver:
|
|||
clean-runtime:
|
||||
rm -f $(DESTDIR)/$(PROJECT)
|
||||
|
||||
clean: clean-driver clean-runtime
|
||||
|
||||
.PHONY: all driver clean-driver clean-runtime clean
|
||||
clean: clean-driver clean-runtime
|
|
@ -28,11 +28,13 @@ endif
|
|||
|
||||
PROJECT := libvortex-rtlsim.so
|
||||
|
||||
.PHONY: all force driver clean-driver clean-runtime clean
|
||||
|
||||
all: $(DESTDIR)/$(PROJECT)
|
||||
|
||||
driver: $(DESTDIR)/librtlsim.so
|
||||
|
||||
$(DESTDIR)/librtlsim.so:
|
||||
$(DESTDIR)/librtlsim.so: force
|
||||
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/rtlsim $(DESTDIR)/librtlsim.so
|
||||
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(DESTDIR)/librtlsim.so
|
||||
|
@ -44,6 +46,4 @@ clean-driver:
|
|||
clean-runtime:
|
||||
rm -f $(DESTDIR)/$(PROJECT)
|
||||
|
||||
clean: clean-driver clean-runtime
|
||||
|
||||
.PHONY: all driver clean-driver clean-runtime clean
|
||||
clean: clean-driver clean-runtime
|
|
@ -24,7 +24,7 @@ endif
|
|||
|
||||
PROJECT := libvortex-simx.so
|
||||
|
||||
.PHONY: all clean force clean-driver clean-runtime
|
||||
.PHONY: all force driver clean-driver clean-runtime clean
|
||||
|
||||
all: $(DESTDIR)/$(PROJECT)
|
||||
|
||||
|
@ -42,6 +42,4 @@ clean-driver:
|
|||
clean-runtime:
|
||||
rm -f $(DESTDIR)/$(PROJECT)
|
||||
|
||||
clean: clean-driver clean-runtime
|
||||
|
||||
.PHONY: all driver clean-driver clean-runtime clean
|
||||
clean: clean-driver clean-runtime
|
|
@ -45,11 +45,13 @@ ifdef CHIPSCOPE
|
|||
CXXFLAGS += -DCHIPSCOPE
|
||||
endif
|
||||
|
||||
.PHONY: all force driver clean-driver clean-runtime clean
|
||||
|
||||
all: $(DESTDIR)/$(PROJECT)
|
||||
|
||||
driver: $(DESTDIR)/libxrtsim.so
|
||||
|
||||
$(DESTDIR)/libxrtsim.so:
|
||||
$(DESTDIR)/libxrtsim.so: force
|
||||
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/xrtsim $(DESTDIR)/libxrtsim.so
|
||||
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(XRTSIM)
|
||||
|
@ -61,6 +63,4 @@ clean-driver:
|
|||
clean-runtime:
|
||||
rm -f $(DESTDIR)/$(PROJECT)
|
||||
|
||||
clean: clean-driver clean-runtime
|
||||
|
||||
.PHONY: all driver clean-driver clean-runtime clean
|
||||
clean: clean-driver clean-runtime
|
|
@ -93,8 +93,20 @@ endif
|
|||
VL_FLAGS += -DNOPAE
|
||||
CXXFLAGS += -DNOPAE
|
||||
|
||||
# Config flags tracking
|
||||
CONFIG_HASH := $(shell echo '$(VL_FLAGS)' | md5sum | cut -d' ' -f1)
|
||||
ifneq ($(shell cat $(CONFIG_FILE) 2>/dev/null),$(CONFIG_HASH))
|
||||
.PHONY: FORCE_VL
|
||||
FORCE_VL:
|
||||
$(CONFIG_FILE): FORCE_VL
|
||||
@mkdir -p $(@D)
|
||||
@echo $(VL_HASH) > $@
|
||||
endif
|
||||
|
||||
PROJECT := libopae-c-sim.so
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(DESTDIR)/$(PROJECT)
|
||||
|
||||
$(DESTDIR)/vortex.xml:
|
||||
|
@ -106,7 +118,7 @@ $(DESTDIR)/scope.json: $(DESTDIR)/vortex.xml
|
|||
$(DESTDIR)/vortex_afu.h : $(AFU_DIR)/vortex_afu.vh
|
||||
$(SCRIPT_DIR)/gen_config.py -i $^ -o $@
|
||||
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(DESTDIR)/vortex_afu.h $(SCOPE_JSON)
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(DESTDIR)/vortex_afu.h $(SCOPE_JSON) $(CONFIG_FILE)
|
||||
verilator --build --exe $(VL_FLAGS) --cc $(TOP) --top-module $(TOP) $(SRCS) -CFLAGS '$(CXXFLAGS)' -LDFLAGS '$(LDFLAGS)' --Mdir $@.obj_dir -o $@
|
||||
|
||||
clean:
|
||||
|
|
|
@ -2,6 +2,7 @@ include ../common.mk
|
|||
|
||||
DESTDIR ?= $(CURDIR)
|
||||
|
||||
CONFIG_FILE = $(DESTDIR)/rtlsim_config.stamp
|
||||
SRC_DIR = $(VORTEX_HOME)/sim/rtlsim
|
||||
|
||||
CXXFLAGS += -std=c++17 -Wall -Wextra -Wfatal-errors -Wno-array-bounds
|
||||
|
@ -80,15 +81,27 @@ ifdef PERF
|
|||
CXXFLAGS += -DPERF_ENABLE
|
||||
endif
|
||||
|
||||
# Config flags tracking
|
||||
CONFIG_HASH := $(shell echo '$(VL_FLAGS)' | md5sum | cut -d' ' -f1)
|
||||
ifneq ($(shell cat $(CONFIG_FILE) 2>/dev/null),$(CONFIG_HASH))
|
||||
.PHONY: FORCE_VL
|
||||
FORCE_VL:
|
||||
$(CONFIG_FILE): FORCE_VL
|
||||
@mkdir -p $(@D)
|
||||
@echo $(VL_HASH) > $@
|
||||
endif
|
||||
|
||||
PROJECT := rtlsim
|
||||
|
||||
.PHONY: all clean clean-lib clean-exe
|
||||
|
||||
all: $(DESTDIR)/$(PROJECT)
|
||||
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(SRC_DIR)/main.cpp
|
||||
verilator --build $(VL_FLAGS) $^ -CFLAGS '$(CXXFLAGS) -DSTARTUP_ADDR=0x80000000' -LDFLAGS '$(LDFLAGS)' --Mdir $@.obj_dir -o $@
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(SRC_DIR)/main.cpp $(CONFIG_FILE)
|
||||
verilator --build $(VL_FLAGS) $(SRCS) $(SRC_DIR)/main.cpp -CFLAGS '$(CXXFLAGS) -DSTARTUP_ADDR=0x80000000' -LDFLAGS '$(LDFLAGS)' --Mdir $@.obj_dir -o $@
|
||||
|
||||
$(DESTDIR)/lib$(PROJECT).so: $(SRCS)
|
||||
verilator --build $(VL_FLAGS) $^ -CFLAGS '$(CXXFLAGS)' -LDFLAGS '-shared $(LDFLAGS)' --Mdir $@.obj_dir -o $@
|
||||
$(DESTDIR)/lib$(PROJECT).so: $(SRCS) $(CONFIG_FILE)
|
||||
verilator --build $(VL_FLAGS) $(SRCS) -CFLAGS '$(CXXFLAGS)' -LDFLAGS '-shared $(LDFLAGS)' --Mdir $@.obj_dir -o $@
|
||||
|
||||
clean-lib:
|
||||
rm -rf $(DESTDIR)/lib$(PROJECT).so.obj_dir
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
include ../common.mk
|
||||
|
||||
DESTDIR ?= $(CURDIR)
|
||||
OBJ_DIR = $(DESTDIR)/obj
|
||||
CONFIG_FILE = $(OBJ_DIR)/config_flags
|
||||
|
||||
OBJ_DIR = $(DESTDIR)/obj
|
||||
CONFIG_FILE = $(DESTDIR)/simx_config.stamp
|
||||
SRC_DIR = $(VORTEX_HOME)/sim/simx
|
||||
|
||||
CXXFLAGS += -std=c++17 -Wall -Wextra -Wfatal-errors
|
||||
|
@ -68,9 +68,19 @@ CXXFLAGS += -MMD -MP -MF $(@:.o=.d)
|
|||
# optional: pipe through ccache if you have it
|
||||
CXX := $(if $(shell which ccache),ccache $(CXX),$(CXX))
|
||||
|
||||
# Config flags tracking
|
||||
CONFIG_HASH := $(shell echo '$(VL_FLAGS)' | md5sum | cut -d' ' -f1)
|
||||
ifneq ($(shell cat $(CONFIG_FILE) 2>/dev/null),$(CONFIG_HASH))
|
||||
.PHONY: FORCE_VL
|
||||
FORCE_VL:
|
||||
$(CONFIG_FILE): FORCE_VL
|
||||
@mkdir -p $(@D)
|
||||
@echo $(CXXFLAGS) > $@
|
||||
endif
|
||||
|
||||
PROJECT := simx
|
||||
|
||||
.PHONY: all clean force
|
||||
.PHONY: all clean clean-lib clean-exe clean-obj
|
||||
|
||||
all: $(DESTDIR)/$(PROJECT)
|
||||
|
||||
|
@ -89,14 +99,6 @@ $(MAIN_OBJ): $(SRC_DIR)/main.cpp $(CONFIG_FILE)
|
|||
@mkdir -p $(@D)
|
||||
$(CXX) $(CXXFLAGS) -DSTARTUP_ADDR=0x80000000 -c $< -o $@
|
||||
|
||||
# Config flags tracking
|
||||
$(CONFIG_FILE): force
|
||||
@mkdir -p $(@D)
|
||||
@test -f $@ && cp $@ $@.old || true
|
||||
@echo "$(CXXFLAGS)" > $@.tmp
|
||||
@diff -q $@.tmp $@.old 2>/dev/null || cp $@.tmp $@
|
||||
@rm -f $@.tmp $@.old
|
||||
|
||||
# Main executable
|
||||
$(DESTDIR)/$(PROJECT): $(OBJS) $(MAIN_OBJ)
|
||||
$(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -o $@
|
||||
|
|
|
@ -2,6 +2,7 @@ include ../common.mk
|
|||
|
||||
DESTDIR ?= $(CURDIR)
|
||||
|
||||
CONFIG_FILE = $(DESTDIR)/rtlsim_config.stamp
|
||||
SRC_DIR := $(VORTEX_HOME)/sim/xrtsim
|
||||
AFU_DIR := $(RTL_DIR)/afu/xrt
|
||||
|
||||
|
@ -92,8 +93,20 @@ endif
|
|||
VL_FLAGS += -DNOXRT
|
||||
CXXFLAGS += -DNOXRT
|
||||
|
||||
# Config flags tracking
|
||||
CONFIG_HASH := $(shell echo '$(VL_FLAGS)' | md5sum | cut -d' ' -f1)
|
||||
ifneq ($(shell cat $(CONFIG_FILE) 2>/dev/null),$(CONFIG_HASH))
|
||||
.PHONY: FORCE_VL
|
||||
FORCE_VL:
|
||||
$(CONFIG_FILE): FORCE_VL
|
||||
@mkdir -p $(@D)
|
||||
@echo $(VL_HASH) > $@
|
||||
endif
|
||||
|
||||
PROJECT := libxrtsim.so
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(DESTDIR)/$(PROJECT)
|
||||
|
||||
$(DESTDIR)/vortex.xml:
|
||||
|
@ -102,7 +115,7 @@ $(DESTDIR)/vortex.xml:
|
|||
$(DESTDIR)/scope.json: $(DESTDIR)/vortex.xml
|
||||
$(SCRIPT_DIR)/scope.py $^ -o $@
|
||||
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(SCOPE_JSON)
|
||||
$(DESTDIR)/$(PROJECT): $(SRCS) $(SCOPE_JSON) $(CONFIG_FILE)
|
||||
verilator --build --exe $(VL_FLAGS) --cc $(TOP) --top-module $(TOP) $(SRCS) -CFLAGS '$(CXXFLAGS)' -LDFLAGS '$(LDFLAGS)' --Mdir $@.obj_dir -o $@
|
||||
|
||||
clean:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue