From 55382be0555d573d00102e4b3320e9988705d926 Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Thu, 3 Feb 2022 08:32:48 -0600 Subject: [PATCH] Completed makefile updates to accelerate the generation of memfiles. There are two makefiles in the regression directory. Makefile calls the submakefiles for generating elf files. The second makefile-memfiles generates the memfiles, addr, and label files. --- pipelined/regression/Makefile | 4 ++- .../regression/{makefile => makefile-memfile} | 25 ++++--------------- 2 files changed, 8 insertions(+), 21 deletions(-) rename pipelined/regression/{makefile => makefile-memfile} (67%) diff --git a/pipelined/regression/Makefile b/pipelined/regression/Makefile index 19531441b..610571691 100644 --- a/pipelined/regression/Makefile +++ b/pipelined/regression/Makefile @@ -27,7 +27,9 @@ make all: # Build wally-riscv-arch-test make -C ../../tests/wally-riscv-arch-test/ --jobs make -C ../../tests/wally-riscv-arch-test/ XLEN=32 --jobs - make -f makefile wally-sim-files + +# build the memfiles and address files. + make -f makefile-memfile wally-sim-files --jobs #cd ../../tests/wally-riscv-arch-test; elf2hex.sh #cd ../../tests/wally-riscv-arch-test; extractFunctionRadix.sh work/*/*/*.elf.objdump # ***extractFunctionRadix diff --git a/pipelined/regression/makefile b/pipelined/regression/makefile-memfile similarity index 67% rename from pipelined/regression/makefile rename to pipelined/regression/makefile-memfile index ed0913f9d..030cf8d57 100644 --- a/pipelined/regression/makefile +++ b/pipelined/regression/makefile-memfile @@ -3,13 +3,7 @@ SUFFIX := work ARCHDIR := $(ROOT)/addins/riscv-arch-test WALLYDIR:= $(ROOT)/tests/wally-riscv-arch-test IMPERASDIR := $(ROOT)/tests/imperas-riscv-tests -DIR1 := $(ROOT)/addins/riscv-arch-test/$(SUFFIX) -DIR2 := $(ROOT)/tests/wally-riscv-arch-test/$(SUFFIX) -DIR3 := $(ROOT)/tests/imperas-riscv-tests/$(SUFFIX) -ALLDIRS := $(DIR1) $(DIR2) $(DIR3) - - -#ALLDIRS := . +ALLDIRS := $(ARCHDIR)/$(SUFFIX) $(WALLYDIR)/$(SUFFIX) $(IMPERASDIR)/$(SUFFIX) ELFFILES ?= $(shell find $(ALLDIRS) -type f -regex ".*\.elf") MEMFILES ?= $(ELFFILES:.elf=.elf.memfile) @@ -19,22 +13,12 @@ print: echo "files in $(ALLDIRS) are $(ELFFILES)." echo "memfiles are $(MEMFILES)" -.PHONY: all -#.NOTPARALLEL: all -all: elfs wally-sim-files +.PHONY: all wally-sim-files +all: wally-sim-files wally-sim-files: $(MEMFILES) $(ADDRFILES) echo "$@" -.PHONY: elfs -elfs: - make -C $(ARCHDIR) --jobs - make -C $(ARCHDIR) XLEN=32 --jobs - make -C $(WALLYDIR) --jobs - make -C $(WALLYDIR) XLEN=32 --jobs - make -C $(IMPERASDIR) --jobs - make -C $(IMPERASDIR) XLEN=64 --jobs - # notes to self on how this works. # The find command locates all of the *.elf files in directory DIR1. A list of .memfiles and # .addr files are generated from the .elf. These are used as targets. @@ -49,4 +33,5 @@ elfs: %.elf.objdump.addr: %.elf.objdump extractFunctionRadix.sh $< -#riscv64-unknown-elf-elf2hex --bit-width $(shell echo $* | head -c 4 | tail -c 2) --input $< --output $@ +.PHONY: clean +clean: