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

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

Location:
trunk/Softwares/Common/src
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Softwares/Common/src/asm/cpu_info.s

    r81 r101  
    1010_get_cpu_id :
    1111        l.jr    r9
    12         l.mfspr r11,r0,0xF800  /* R11 <- SPR[31][0] */
    13 
     12        l.mfspr r11,r0,21      /* R11 <- SPR[0][21] */
     13       
    1414        .global _set_cpu_id
    1515_set_cpu_id :
    1616        l.jr    r9
    17         l.mtspr r0 ,r3,0xF800  /* SPR[31][0] <- r3  */
     17        l.mtspr r0 ,r3,21  /* SPR[0][21] <- r3  */
    1818
  • trunk/Softwares/Common/src/asm/find_one.s

    r81 r101  
    1212        l.ff1   r11,r3
    1313
    14 /*
     14/*       
    1515        .global _find_last_one
    1616_find_last_one :
  • trunk/Softwares/Common/src/asm/thread_info.s

    r81 r101  
    1010_get_thread_id :
    1111        l.jr    r9                             
    12         l.mfspr r11,r0,0xF801                   /* R11 <- SPR[31][1] */
    13        
     12        l.mfspr r11,r0,22                       /* R11 <- SPR[0][22] */
     13       
    1414        .global _set_thread_id
    1515_set_thread_id :
    1616        l.jr    r9
    17         l.mtspr r0 ,r3,0xF801                   /* SPR[31][1] <- r3  */
     17        l.mtspr r0 ,r3,22                       /* SPR[0][22] <- r3  */
    1818
    1919        .global _get_thread_priority
    2020_get_thread_priority :
    2121        l.jr    r9
    22         l.mfspr r11,r0,0xF802                   /* R11 <- SPR[31][2] */
     22        l.mfspr r11,r0,23                       /* R11 <- SPR[0][23] */
    2323
    2424        .global _set_thread_priority
    2525_set_thread_priority :
    2626        l.jr    r9
    27         l.mtspr r0 ,r3,0xF802                   /* SPR[31][2] <- r3  */
     27        l.mtspr r0 ,r3,23                       /* SPR[0][23] <- r3  */
    2828       
  • trunk/Softwares/Common/src/c/func_io.c

    r81 r101  
    22#include "thread_info.h"
    33
    4 void print(int data)
     4void tty (unsigned char data)
    55{
    6   int *show   =(int*)(TTY_BASE + (get_thread_id() << 4) + 8);
     6  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 0);
    77
    8   *(show) = data;
     8  *(addr) = data;
    99}
    1010
    11 void quit (int data)
     11void print (char * data)
    1212{
    13   int *stop   =(int*)(TTY_BASE + (get_thread_id() << 4) + 4);
     13  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 0);
    1414
    15   *(stop) = data;
     15  while ((*data) != '\0')
     16    {
     17      *(addr) = (*data);
     18      data++;
     19    }
    1620}
     21
     22void show (unsigned int data)
     23{
     24  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 8);
     25
     26  *(addr) = data;
     27}
     28
     29void quit (unsigned int data)
     30{
     31  unsigned int * addr = (unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 4);
     32
     33  *(addr) = data;
     34}
  • 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.