Ignore:
Timestamp:
Jan 15, 2009, 6:19:08 PM (15 years ago)
Author:
rosiere
Message:

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Softwares/Common/src/c/service_clock.c

    r81 r101  
    1 #include <time.h>
    2 #include <errno.h>
    3 #include <sys/lock.h>
    4 #include "mapping_memory.h"
    5 #include "sim2os.h"
    6 #include "service_clock.h"
     1/* #include <time.h> */
     2/* #include <errno.h> */
     3/* #include <sys/lock.h> */
     4/* #include "mapping_memory.h" */
     5/* #include "sim2os.h" */
     6/* #include "service_clock.h" */
    77
    8 unsigned int service_clock ()
    9 {
    10   unsigned int * addr   = (unsigned int *)(SIM2OS_BASE);
    11   unsigned int   result = -1;
     8/* unsigned int service_clock () */
     9/* { */
     10/*   unsigned int * addr   = (unsigned int *)(SIM2OS_BASE); */
     11/*   unsigned int   result = -1; */
    1212
    13   __lock_init    (service_lock);
     13/*   __lock_init    (service_lock); */
    1414 
    15   __lock_acquire (service_lock);
     15/*   __lock_acquire (service_lock); */
    1616
    17   *(addr+0) = (unsigned int)SERVICE_CLOCK;
     17/*   *(addr+0) = (unsigned int)SERVICE_CLOCK; */
    1818 
    19   // memory synchronisation
    20   // (else read (with an address that depend not of store address) can be lunch before a store)
    21   asm("l.msync;");
     19/*   // memory synchronisation */
     20/*   // (else read (with an address that depend not of store address) can be lunch before a store) */
     21/*   asm("l.msync;"); */
    2222
    23   result    = (clock_t) *(addr+1);
     23/*   result    = (clock_t) *(addr+1); */
    2424 
    25   if (result == (clock_t)-1)
    26     errno = (int) *(addr+2);
     25/*   if (result == (clock_t)-1) */
     26/*     errno = (int) *(addr+2); */
    2727
    28   __lock_release (service_lock);
     28/*   __lock_release (service_lock); */
    2929
    30   return result;
    31 }
     30/*   return result; */
     31/* } */
Note: See TracChangeset for help on using the changeset viewer.