Changeset 756 for soft/giet_vm/applications/coremark
- Timestamp:
- Jan 14, 2016, 10:13:09 AM (9 years ago)
- Location:
- soft/giet_vm/applications/coremark
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/coremark/Makefile
r753 r756 1 1 2 2 APP_NAME = coremark 3 TARGET = appli.elf 3 4 4 5 OBJS= core_main.o \ … … 10 11 11 12 LIBS= -L../../build/libs -luser 13 INCLUDES = -I. -I./mach -I../.. -I../../giet_libs -I../../giet_xml 12 14 13 INCLUDES = -I. -I./mach -I../.. -I../../giet_libs -I../../giet_xml 14 15 DEFS := -DFLAGS_STR="\"${CFLAGS}\"" -DTOTAL_DATA_SIZE=2000 15 LIBS := $(LIBS) $(XLIBS) 16 CFLAGS := $(CFLAGS) $(XCFLAGS) 16 17 17 18 COREMARK ?= RUN1 18 ifeq ($ {COREMARK},RUN1)19 ifeq ($(COREMARK),RUN1) 19 20 $(info Coremark Performance Run) 20 DEFS := ${DEFS}-DPERFORMANCE_RUN=121 CFLAGS := $(CFLAGS) -DPERFORMANCE_RUN=1 21 22 endif 22 ifeq ($ {COREMARK},RUN2)23 ifeq ($(COREMARK),RUN2) 23 24 $(info Coremark Validation Run) 24 DEFS := ${DEFS}-DVALIDATION_RUN=125 CFLAGS := $(CFLAGS) -DVALIDATION_RUN=1 25 26 endif 26 ifeq ($ {COREMARK},RUN3)27 ifeq ($(COREMARK),RUN3) 27 28 $(info Coremark Profile Run) 28 DEFS := ${DEFS}-DPROFILE_RUN=129 CFLAGS := $(CFLAGS) -DPROFILE_RUN=1 29 30 endif 30 31 31 #DEFS := ${DEFS} -DCORE_DEBUG=1 32 CFLAGS := $(CFLAGS) -DFLAGS_STR="\"$(CFLAGS)\"" 33 LDFLAGS := -Wl,-T $(APP_NAME).ld $(CFLAGS) 32 34 33 35 LIB_DEPS = ../../build/libs/libuser.a 34 36 35 appli.elf: $(OBJS) $(APP_NAME).ld $(LIBS_DEPS) 36 $( LD) -o $@ -T $(APP_NAME).ld$(OBJS) $(LIBS)37 $(TARGET): $(OBJS) $(APP_NAME).ld $(LIBS_DEPS) 38 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) 37 39 $(DU) -D $@ > $@.txt 38 40 39 41 check_coremark: coremark.md5 40 md5sum -c $< 42 md5sum -c $< 41 43 42 %.o: %.c 43 $(CC) $(INCLUDES) $(CFLAGS) ${DEFS}-c -o $@ $<44 %.o: %.c 45 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 44 46 45 47 clean: 46 rm -f *.o *.elf appli.elf.txt *.pyc core *~48 rm -f $(OBJS) $(TARGET) $(TARGET).txt $(APP_NAME).pyc -
soft/giet_vm/applications/coremark/coremark.py
r753 r756 90 90 'main_stack', 91 91 'coremark_heap_0_0', 92 1) # index in start_vector92 2 ) # index in start_vector 93 93 94 94 for x in xrange (x_size): … … 101 101 'coremark_stack_%d_%d_%d' % (x,y,p), 102 102 'coremark_heap_%d_%d' % (x,y), 103 0)103 1 ) 104 104 105 105 # extend mapping name -
soft/giet_vm/applications/coremark/mach/core_portme.c
r753 r756 35 35 during the benchmark's execution 36 36 */ 37 volatile ee_s32 seed4_volatile= 0;37 volatile ee_s32 seed4_volatile=ITERATIONS; 38 38 39 39 … … 56 56 */ 57 57 #define TIMER_RES_DIVIDER 1 58 #define NSECS_PER_SEC 1000000 /* 1 GHz */58 #define NSECS_PER_SEC 833000000 /* 833 MHz */ 59 59 #define EE_TICKS_PER_SEC (NSECS_PER_SEC / TIMER_RES_DIVIDER) 60 60 #define GETMYTIME(_t) (*_t=giet_proctime()) … … 113 113 } 114 114 115 ee_u32 default_num_contexts= 1;115 ee_u32 default_num_contexts=MULTITHREAD; 116 116 117 117 … … 136 136 giet_procs_number( &x_size, &y_size, &nprocs ); 137 137 138 // one context per core when using multiple threads139 default_num_contexts = x_size * y_size * nprocs;140 141 138 // initialize distributed heaps 142 139 int x, y; … … 146 143 } 147 144 } 148 149 // FIXME: init a lock to access the TTY, and create a printf wrapper,150 // requiring and releasing the lock151 145 #else 152 146 // initialize local heap … … 165 159 void portable_fini(core_portable *p) 166 160 { 161 core_results *res = (core_results*)((char*)p - 162 (sizeof(core_results) - sizeof(core_portable))); 163 164 int i; 165 for (i=0 ; i<default_num_contexts; i++) { 166 const CORE_TICKS total_time = res[i].port.stop_time - res[i].port.start_time; 167 printf("thread %d: total ticks = %d\n", i, total_time); 168 } 169 167 170 p->portable_id=0; 168 171 } … … 177 180 __attribute__ ((constructor)) 178 181 void *__iterate(void *pres) { 182 core_results *res = (core_results*)pres; 183 GETMYTIME(&(res->port.start_time)); 179 184 iterate(pres); 185 GETMYTIME(&(res->port.stop_time)); 180 186 giet_pthread_exit(NULL); 181 187 return NULL; -
soft/giet_vm/applications/coremark/mach/core_portme.h
r753 r756 182 182 183 183 184 /* Configuration : ITERATIONS 185 Valid values : 186 0 - the actual number of iterations is computed by the benchmark. 187 N > 0 - fixed number of iterations 188 */ 189 #ifndef ITERATIONS 190 #define ITERATIONS 0 191 #endif 192 193 194 /* Configuration : TOTAL_DATA_SIZE 195 */ 196 #ifndef TOTAL_DATA_SIZE 197 #define TOTAL_DATA_SIZE 2000 198 #endif 199 200 184 201 /* Variable : default_num_contexts 185 Not used for this simple port, must cintain the value 1.186 202 */ 187 203 extern ee_u32 default_num_contexts; … … 190 206 ee_u8 portable_id; 191 207 pthread_t thread; 208 209 CORE_TICKS start_time, stop_time; 192 210 } core_portable; 193 211
Note: See TracChangeset
for help on using the changeset viewer.