Changeset 772 for soft


Ignore:
Timestamp:
Feb 3, 2016, 9:59:18 AM (8 years ago)
Author:
meunier
Message:
  • Ajout de l'application rosenfeld
  • Changement du nom du flag O_CREATE en O_CREAT
Location:
soft/giet_vm
Files:
128 added
13 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/Makefile

    r753 r772  
    3535                 applications/raycast/raycast.py        \
    3636                 applications/router/router.py          \
     37                 applications/rosenfeld/rosenfeld.py    \
    3738                 applications/shell/shell.py            \
    3839                 applications/sort/sort.py              \
     
    195196        cd applications/raycast      && $(MAKE) clean && cd ../..
    196197        cd applications/router       && $(MAKE) clean && cd ../..
     198        cd applications/rosenfeld    && $(MAKE) clean && cd ../..
    197199        cd applications/shell        && $(MAKE) clean && cd ../..
    198200        cd applications/sort         && $(MAKE) clean && cd ../..
     
    222224        mmd -o -i $< ::/bin/raycast       || true
    223225        mmd -o -i $< ::/bin/router        || true
     226        mmd -o -i $< ::/bin/rosenfeld     || true
    224227        mmd -o -i $< ::/bin/shell         || true
    225228        mmd -o -i $< ::/bin/sort          || true
     
    240243        mcopy -o -i $< applications/raycast/appli.elf ::/bin/raycast          || true
    241244        mcopy -o -i $< applications/router/appli.elf ::/bin/router            || true
     245        mcopy -o -i $< applications/rosenfeld/appli.elf ::/bin/rosenfeld      || true
    242246        mcopy -o -i $< applications/shell/appli.elf ::/bin/shell              || true
    243247        mcopy -o -i $< applications/sort/appli.elf ::/bin/sort                || true
     
    422426
    423427########################################
     428### rosenfeld application compilation
     429applications/rosenfeld/appli.elf: build/libs/libmath.a build/libs/libuser.a
     430        $(MAKE) -C applications/rosenfeld
     431
     432########################################
    424433### shell  application compilation
    425434applications/shell/appli.elf: build/libs/libuser.a
  • soft/giet_vm/applications/mjpeg/mjpeg.c

    r748 r772  
    469469
    470470    // save on disk
    471     unsigned int fdout = giet_fat_open( "/home/mjpeg_instrumentation" , O_CREATE );
     471    unsigned int fdout = giet_fat_open( "/home/mjpeg_instrumentation" , O_CREAT);
    472472    if ( fdout < 0 )
    473473    PRINTF("\n[MJPEG ERROR] cannot open file /home/mjpeg_instrumentation\n");
  • soft/giet_vm/applications/shell/shell.c

    r768 r772  
    129129    size = info.size;
    130130
    131     dst_fd = giet_fat_open( argv[2] , O_CREATE | O_TRUNC );
     131    dst_fd = giet_fat_open( argv[2] , O_CREAT | O_TRUNC);
    132132
    133133    if (dst_fd < 0)
  • soft/giet_vm/applications/transpose/transpose.c

    r769 r772  
    276276 
    277277    // open instrumentation file
    278     unsigned int fd = giet_fat_open( "/home/transpose.inst" , O_CREATE );
     278    unsigned int fd = giet_fat_open( "/home/transpose.inst" , O_CREAT);
    279279    if ( fd < 0 )
    280280    {
     
    453453    }
    454454
    455     fd_out = giet_fat_open( output_file_name , O_CREATE );   // create if required
     455    fd_out = giet_fat_open( output_file_name , O_CREAT);   // create if required
    456456    if ( fd_out < 0 )
    457457    {
  • soft/giet_vm/applications/transpose/transpose_rw.c

    r764 r772  
    146146
    147147        // open output file
    148         fd_out = giet_fat_open( output_file_name , O_CREATE );   // create if required
     148        fd_out = giet_fat_open( output_file_name , O_CREAT );   // create if required
    149149        if ( fd_out < 0 )
    150150        {
  • soft/giet_vm/giet_common/kernel_locks.c

    r709 r772  
    309309
    310310#if GIET_DEBUG_SQT_LOCK
    311 _nolock_printf("\n[DEBUG SQT_LOCK] P[%d,%d,%d] initialises SQT node[%d,%d,%d] : \n"
    312       " parent = %x / childO = %x / child1 = %x / child2 = %x / child3 = %x\n",
    313       px , py , pl , x , y , level ,
    314       (unsigned int)node->parent ,
    315       (unsigned int)node->child[0] ,
    316       (unsigned int)node->child[1] ,
    317       (unsigned int)node->child[2] ,
    318       (unsigned int)node->child[3] );
    319 #endif
    320 
    321        // recursive calls for children nodes
     311        _nolock_printf("\n[DEBUG SQT_LOCK] P[%d,%d,%d] initialises SQT node[%d,%d,%d] : \n"
     312        " parent = %x / childO = %x / child1 = %x / child2 = %x / child3 = %x\n",
     313        px , py , pl , x , y , level ,
     314        (unsigned int)node->parent ,
     315        (unsigned int)node->child[0] ,
     316        (unsigned int)node->child[1] ,
     317        (unsigned int)node->child[2] ,
     318        (unsigned int)node->child[3] );
     319#endif
     320
     321        // recursive calls for children nodes
    322322        for ( i = 0 ; i < 4 ; i++ )
    323323        {
  • soft/giet_vm/giet_fat32/fat32.c

    r761 r772  
    27212721// This function implements the giet_fat_open() system call.
    27222722// The semantic is similar to the UNIX open() function, with some limitations:
    2723 // - only the O_CREATE, O_RDONLY, and O_TRUNC flags are supported.
     2723// - only the O_CREAT, O_RDONLY, and O_TRUNC flags are supported.
    27242724// - the UNIX access rights are not supported.
    27252725// If the file does not exist in the specified directory, it is created when
    2726 // the O_CREATE flag is set.
     2726// the O_CREAT flag is set.
    27272727// If the specified directory does not exist, an error is returned.
    27282728// It allocates a file descriptor to the calling task, for the file identified
     
    27402740///////////////////////////////////////////////////////////////////////////////
    27412741int _fat_open( char*        pathname,     // absolute path from root
    2742                unsigned int flags )       // O_CREATE and O_RDONLY
     2742               unsigned int flags )       // O_CREAT and O_RDONLY
    27432743{
    27442744    unsigned int         fd_id;            // index in File-Descriptor-Array
     
    27492749   
    27502750    // get flags
    2751     unsigned int create    = ((flags & O_CREATE) != 0);
     2751    unsigned int create    = ((flags & O_CREAT) != 0);
    27522752    unsigned int read_only = ((flags & O_RDONLY) != 0);
    27532753    unsigned int truncate  = ((flags & O_TRUNC)  != 0);
  • soft/giet_vm/giet_fat32/fat32.h

    r761 r772  
    228228
    229229extern int _fat_open( char*        pathname,                    // path from root
    230                       unsigned int flags );                     // O_CREATE/O_RDONLY
     230                      unsigned int flags );                     // O_CREAT/O_RDONLY
    231231
    232232extern int _fat_close( unsigned int fd_id );                    // file descriptor
  • soft/giet_vm/giet_fat32/fat32_shared.h

    r746 r772  
    3838#define O_RDONLY                0x01
    3939#define O_TRUNC                 0x10
    40 #define O_CREATE                0x20
     40#define O_CREAT                 0x20
    4141
    4242/********************************************************************************
  • soft/giet_vm/giet_libs/stdio.h

    r771 r772  
    161161                            int arg_3 )
    162162{
    163     register int reg_no_and_output asm("v0") = call_no;
    164     register int reg_a0 asm("a0") = arg_0;
    165     register int reg_a1 asm("a1") = arg_1;
    166     register int reg_a2 asm("a2") = arg_2;
    167     register int reg_a3 asm("a3") = arg_3;
    168 
    169     asm volatile(
     163    register int reg_no_and_output __asm__("v0") = call_no;
     164    register int reg_a0 __asm__("a0") = arg_0;
     165    register int reg_a1 __asm__("a1") = arg_1;
     166    register int reg_a2 __asm__("a2") = arg_2;
     167    register int reg_a3 __asm__("a3") = arg_3;
     168
     169    __asm__ volatile(
    170170            "syscall"
    171171            : "+r" (reg_no_and_output), /* input/output argument */
  • soft/giet_vm/giet_libs/stdlib.c

    r771 r772  
    113113
    114114///////////////////////////////////
    115 unsigned int strlen( char* string )
     115int strlen( const char* string )
    116116{
    117117    unsigned int i = 0;
     
    121121
    122122///////////////////////////////
    123 unsigned int strcmp( char * s1,
    124                     char * s2 )
     123int strcmp( const char * s1,
     124            const char * s2 )
    125125{
    126126    while (1)
     
    135135/////////////////////////
    136136char* strcpy( char* dest,
    137               char* source )
     137              const char* source )
    138138{
    139139    if (!dest || !source) return dest;
  • soft/giet_vm/giet_libs/stdlib.h

    r771 r772  
    4545// The terminating NUL character is not taken into account.
    4646////////////////////////////////////////////////////////////////////////////////////////
    47 unsigned int strlen( char* string );
     47int strlen( const char* string );
    4848
    4949////////////////////////////////////////////////////////////////////////////////////////
     
    5252// It returns 1 if they are not.
    5353////////////////////////////////////////////////////////////////////////////////////////
    54 unsigned int strcmp( char* s1,
    55                     char* s2 );
     54int strcmp( const char* s1,
     55            const char* s2 );
    5656
    5757////////////////////////////////////////////////////////////////////////////////////////
     
    6060////////////////////////////////////////////////////////////////////////////////////////
    6161char* strcpy( char* dest,
    62               char* source );
     62              const char* source );
    6363
    6464///////////////////////////////////////////////////////////////////////////////////////
  • soft/giet_vm/giet_python/genmap

    r753 r772  
    4040# - raycast
    4141# - router
     42# - rosenfeld
    4243# - sort
    4344# - shell
     
    151152                   default = False,
    152153                   help = 'map the "router" application for the GietVM' )
     154
     155parser.add_option( '--rosenfeld', action = 'store_true', dest = 'rosenfeld',     
     156                   default = False,
     157                   help = 'map the "rosenfeld" application for the GietVM' )
    153158
    154159parser.add_option( '--shell', action = 'store_true', dest = 'shell',     
     
    204209map_raycast    = options.raycast     # map "raycast" application if True
    205210map_router     = options.router      # map "router" application if True
     211map_rosenfeld  = options.rosenfeld   # map "rosenfeld" application if True
    206212map_shell      = options.shell       # map "shell" application if True
    207213map_sort       = options.sort        # map "sort" application if True
     
    281287    print '[genmap] application "router" will be loaded'
    282288
     289if ( map_rosenfeld ):     
     290    appli = __import__( 'rosenfeld' )
     291    appli.extend( mapping )
     292    print '[genmap] application "rosenfeld" will be loaded'
     293
    283294if ( map_shell ):
    284295    appli = __import__( 'shell' )
Note: See TracChangeset for help on using the changeset viewer.