Ignore:
Timestamp:
Jan 14, 2016, 10:13:09 AM (8 years ago)
Author:
cfuguet
Message:

Improving the configuration infrastructure of the coremark application

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/coremark/mach/core_portme.c

    r753 r756  
    3535        during the benchmark's execution
    3636*/
    37 volatile ee_s32 seed4_volatile=0;
     37volatile ee_s32 seed4_volatile=ITERATIONS;
    3838
    3939
     
    5656*/
    5757#define TIMER_RES_DIVIDER 1
    58 #define NSECS_PER_SEC 1000000 /* 1 GHz */
     58#define NSECS_PER_SEC 833000000 /* 833 MHz */
    5959#define EE_TICKS_PER_SEC (NSECS_PER_SEC / TIMER_RES_DIVIDER)
    6060#define GETMYTIME(_t) (*_t=giet_proctime())
     
    113113}
    114114
    115 ee_u32 default_num_contexts=1;
     115ee_u32 default_num_contexts=MULTITHREAD;
    116116
    117117
     
    136136        giet_procs_number( &x_size, &y_size, &nprocs );
    137137       
    138         // one context per core when using multiple threads
    139         default_num_contexts = x_size * y_size * nprocs;
    140 
    141138        // initialize distributed heaps
    142139        int x, y;
     
    146143                }
    147144        }
    148        
    149         // FIXME: init a lock to access the TTY, and create a printf wrapper,
    150         // requiring and releasing the lock
    151145#else
    152146        // initialize local heap
     
    165159void portable_fini(core_portable *p)
    166160{
     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
    167170        p->portable_id=0;
    168171}
     
    177180__attribute__ ((constructor)) 
    178181void *__iterate(void *pres) {
     182        core_results *res = (core_results*)pres;
     183        GETMYTIME(&(res->port.start_time));
    179184        iterate(pres);
     185        GETMYTIME(&(res->port.stop_time));
    180186        giet_pthread_exit(NULL);
    181187        return NULL;
Note: See TracChangeset for help on using the changeset viewer.