Switch to LOADMEM=1, LOADARCH=loadarch flags

This commit is contained in:
Jerry Zhao
2023-04-12 16:22:39 -07:00
parent b41806b6a0
commit 7aaa233d73
4 changed files with 25 additions and 25 deletions

View File

@@ -248,6 +248,21 @@ BINARY ?=
override SIM_FLAGS += +dramsim +dramsim_ini_dir=$(TESTCHIP_DIR)/src/main/resources/dramsim2_ini +max-cycles=$(timeout_cycles)
VERBOSE_FLAGS ?= +verbose
sim_out_name = $(output_dir)/$(subst $() $(),_,$(notdir $(basename $(BINARY))))
LOADMEM ?=
LOADARCH ?=
ifneq ($(LOADARCH),)
override BINARY = $(LOADARCH)/mem.elf
override SIM_FLAGS += +loadarch=$(LOADARCH)/loadarch
endif
ifeq ($(LOADMEM),1)
# If LOADMEM=1, assume BINARY is the loadmem elf
override SIM_FLAGS += +loadmem=$(BINARY)
else ifneq ($(LOADMEM),)
# Otherwise, assume the variable points to an elf file
override SIM_FLAGS += +loadmem=$(LOADMEM)
endif
#########################################################################################
# build output directory for compilation