mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	added some preliminary support for coremark XLEN=32, made sure rv64 not impacted
This commit is contained in:
		
							parent
							
								
									a310ef4ded
								
							
						
					
					
						commit
						191c7a2ee3
					
				| @ -8,12 +8,13 @@ sources=$(cmbase)/core_main.c $(cmbase)/core_list_join.c $(cmbase)/coremark.h  \ | ||||
| 	$(PORT_DIR)/core_portme.h $(PORT_DIR)/core_portme.c $(PORT_DIR)/core_portme.mak \
 | ||||
| 	$(PORT_DIR)/crt.S $(PORT_DIR)/encoding.h $(PORT_DIR)/util.h $(PORT_DIR)/syscalls.c | ||||
| ABI := $(if $(findstring "64","$(XLEN)"),lp64,ilp32) | ||||
| PORT_CFLAGS = -g -march=rv$(XLEN)im -mabi=$(ABI) -march=rv$(XLEN)im -static -falign-functions=16 \
 | ||||
| ARCH := rv$(XLEN)im | ||||
| PORT_CFLAGS = -g -march=rv$(XLEN)im -mabi=$(ABI) -march=$(ARCH) -static -falign-functions=16 \
 | ||||
| 	-mbranch-cost=1 -DSKIP_DEFAULT_MEMSET -mtune=sifive-3-series -O3 -funroll-all-loops -finline-functions -falign-jumps=4 \
 | ||||
| 	-fno-delete-null-pointer-checks -fno-rename-registers --param=loop-max-datarefs-for-datadeps=0 \
 | ||||
| 	-funroll-all-loops --param=uninlined-function-insns=8 -fno-tree-vrp -fwrapv -fipa-pta \
 | ||||
| 	-nostdlib -nostartfiles -ffreestanding -mstrict-align \
 | ||||
| 	-DTOTAL_DATA_SIZE=2000 -DMAIN_HAS_NOARGC=1 -DPERFORMANCE_RUN=1 | ||||
| 	-DTOTAL_DATA_SIZE=2000 -DMAIN_HAS_NOARGC=1 -DPERFORMANCE_RUN=1 -DXLEN=$(XLEN) | ||||
| 
 | ||||
| # flags that cause build errors mcmodel=medlow
 | ||||
| 
 | ||||
|  | ||||
| @ -66,6 +66,9 @@ typedef size_t CORE_TICKS; | ||||
| #elif HAS_TIME_H | ||||
| #include <time.h> | ||||
| typedef clock_t CORE_TICKS; | ||||
| // #elif (XLEN==32) 
 | ||||
| // 	#include <sys/types.h>
 | ||||
| // 	typedef ee_u32 CORE_TICKS;
 | ||||
| #else | ||||
| /* Configuration: size_t and clock_t
 | ||||
|      Note these need to match the size of the clock output and the xLen the processor supports | ||||
| @ -105,11 +108,16 @@ typedef signed int ee_s32; | ||||
| typedef double ee_f32; | ||||
| typedef unsigned char ee_u8; | ||||
| typedef unsigned int ee_u32; | ||||
| typedef unsigned long long ee_ptr_int; | ||||
| #if (XLEN==64)  | ||||
| 	typedef unsigned long long ee_ptr_int; | ||||
| #else | ||||
| 	typedef ee_u32 ee_ptr_int; | ||||
| #endif | ||||
| typedef size_t ee_size_t; | ||||
| /* align an offset to point to a 32b value */ | ||||
| #define align_mem(x) (void *)(4 + (((ee_ptr_int)(x) - 1) & ~3)) | ||||
| 
 | ||||
| 
 | ||||
| /* Configuration: SEED_METHOD
 | ||||
| 	Defines method to get seed values that cannot be computed at compile time. | ||||
| 
 | ||||
|  | ||||
| @ -33,13 +33,13 @@ CC = $(RISCVTOOLS)/bin/$(RISCVTYPE)-gcc | ||||
| # Flag: CFLAGS
 | ||||
| #	Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
 | ||||
| #PORT_CFLAGS = -O2 -static -std=gnu99
 | ||||
| PORT_CFLAGS = -O2 -mcmodel=medany -static -fno-tree-loop-distribute-patterns -std=gnu99 -fno-common -nostartfiles -lm -lgcc -T $(PORT_DIR)/link.ld | ||||
| PORT_CFLAGS = -mcmodel=medany -fno-tree-loop-distribute-patterns -fno-common -lm -lgcc -T $(PORT_DIR)/link.ld | ||||
| FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)" | ||||
| CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\" | ||||
| #Flag: LFLAGS_END
 | ||||
| #	Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts).
 | ||||
| #	Note: On certain platforms, the default clock_gettime implementation is supported but requires linking of librt.
 | ||||
| LFLAGS_END += | ||||
| LFLAGS_END += -static-libgcc -lgcc | ||||
| # Flag: PORT_SRCS
 | ||||
| # Port specific source files can be added here
 | ||||
| PORT_SRCS = $(PORT_DIR)/core_portme.c $(PORT_DIR)/syscalls.c $(PORT_DIR)/crt.S | ||||
|  | ||||
| @ -123,6 +123,7 @@ logic [3:0] dummy; | ||||
|         "wally32priv":                    tests = wally32priv; | ||||
|         "wally32periph":                   tests = wally32periph; | ||||
|         "embench":                        tests = embench; | ||||
|         "coremark":                       tests = coremark; | ||||
|       endcase | ||||
|     end | ||||
|     if (tests.size() == 0) begin | ||||
|  | ||||
| @ -36,7 +36,7 @@ string tvpaths[] = '{ | ||||
|     "../../tests/riscof/work/riscv-arch-test/", | ||||
|     "../../tests/wally-riscv-arch-test/work/", //"../../tests/riscof/work/wally-riscv-arch-test/",  | ||||
|     "../../tests/imperas-riscv-tests/work/", | ||||
|     "../../benchmarks/coremark/work/", //"../../benchmarks/coremark/work/", | ||||
|     "../../benchmarks/coremark/work/", | ||||
|     "../../addins/embench-iot/" | ||||
|     }; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user