Ignore:
Timestamp:
Jun 27, 2014, 4:48:54 PM (10 years ago)
Author:
cfuguet
Message:

fault_tolerance/tsar_generic_iob:

main arguments


  • Replacing atoi function by strtol to accept hexadecimal numeric arguments

config files


Introducing:

  • configuration files (conf/preloader*) for compiling preloader.
  • configuration file (soclib.conf) for compiling with soclib-cc.
  • description file (arch.py) for generating hard and soft configuration files using GIET_VM genmap script
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fault_tolerance/platforms/tsar_generic_iob/top.cpp

    r724 r728  
    363363         if ((strcmp(argv[n],"-NCYCLES") == 0) && (n+1<argc))
    364364         {
    365             ncycles = atoi(argv[n+1]);
     365            ncycles = strtol(argv[n+1], NULL, 0);
    366366         }
    367367         else if ((strcmp(argv[n],"-SOFT") == 0) && (n+1<argc) )
     
    372372         {
    373373            debug_ok = true;
    374             debug_from = atoi(argv[n+1]);
     374            debug_from = strtol(argv[n+1], NULL, 0);
    375375         }
    376376         else if ((strcmp(argv[n],"-DISK") == 0) && (n+1<argc) )
     
    380380         else if ((strcmp(argv[n],"-MEMCID") == 0) && (n+1<argc) )
    381381         {
    382             debug_memc_id = atoi(argv[n+1]);
     382            debug_memc_id = strtol(argv[n+1], NULL, 0);
    383383            size_t x = debug_memc_id >> 4;
    384384            size_t y = debug_memc_id & 0xF;
     
    391391         else if ((strcmp(argv[n],"-XRAMID") == 0) && (n+1<argc) )
    392392         {
    393             debug_xram_id = atoi(argv[n+1]);
     393            debug_xram_id = strtol(argv[n+1], NULL, 0);
    394394            size_t x = debug_xram_id >> 4;
    395395            size_t y = debug_xram_id & 0xF;
     
    402402         else if ((strcmp(argv[n],"-IOB") == 0) && (n+1<argc) )
    403403         {
    404             debug_iob = atoi(argv[n+1]);
     404            debug_iob = strtol(argv[n+1], NULL, 0);
    405405         }
    406406         else if ((strcmp(argv[n],"-PROCID") == 0) && (n+1<argc) )
    407407         {
    408             debug_proc_id     = atoi(argv[n+1]);
     408            debug_proc_id     = strtol(argv[n+1], NULL, 0);
    409409            size_t cluster_xy = debug_proc_id / NB_PROCS_MAX ;
    410410            size_t x          = cluster_xy >> 4;
     
    418418         else if ((strcmp(argv[n], "-THREADS") == 0) && ((n+1) < argc))
    419419         {
    420             threads_nr = atoi(argv[n+1]);
     420            threads_nr = strtol(argv[n+1], NULL, 0);
    421421            threads_nr = (threads_nr < 1) ? 1 : threads_nr;
    422422         }
    423423         else if ((strcmp(argv[n], "-FROZEN") == 0) && (n+1 < argc))
    424424         {
    425             frozen_cycles = atoi(argv[n+1]);
     425            frozen_cycles = strtol(argv[n+1], NULL, 0);
    426426         }
    427427         else if ((strcmp(argv[n], "-PERIOD") == 0) && (n+1 < argc))
    428428         {
    429             debug_period = atoi(argv[n+1]);
     429            debug_period = strtol(argv[n+1], NULL, 0);
    430430         }
    431431         else
Note: See TracChangeset for help on using the changeset viewer.