Changeset 756 for soft/giet_vm/applications/coremark/mach
- Timestamp:
- Jan 14, 2016, 10:13:09 AM (9 years ago)
- Location:
- soft/giet_vm/applications/coremark/mach
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.