Ignore:
Timestamp:
Nov 26, 2014, 6:54:56 PM (8 years ago)
Author:
cfuguet
Message:

reconf: improve the onerun.py script in the tsar_generic_iob

  • Now, this module defines a run function which can be either called by the onerun's main function or by another module, if it has been imported.
  • Faulty cores are now passed as an argument. For each faulty core, pass the argument -fc X Y L, where X Y L are the core's coordinates.
  • Faulty routers are now passed as a pair X Y instead of XY integer. For each faulty router, pass the argument -fr X Y. This modification affects both, the top.cpp and onerun.py files.
File:
1 edited

Legend:

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

    r889 r890  
    415415            debug_period = strtol(argv[n+1], NULL, 0);
    416416         }
    417          else if ((strcmp(argv[n], "-FAULTY_ROUTER") == 0) && (n+1 < argc) )
    418          {
    419             size_t faulty_router_id = strtol(argv[n+1], NULL, 0);
    420             size_t x = faulty_router_id >> Y_WIDTH;
    421             size_t y = faulty_router_id & ((1 << Y_WIDTH) - 1);
     417         else if ((strcmp(argv[n], "-FAULTY_ROUTER") == 0) && (n+2 < argc) )
     418         {
     419            size_t x = strtol(argv[n+1], NULL, 0);
     420            size_t y = strtol(argv[n+2], NULL, 0);
     421            n++;
    422422            if( (x>=X_SIZE) || (y>=Y_SIZE) )
    423423            {
     
    425425                exit(0);
    426426            }
    427             faulty_routers.push_back(faulty_router_id);
     427            faulty_routers.push_back((x << Y_WIDTH) | y);
    428428         }
    429429         else if ((strcmp(argv[n], "-FAULTY_MASK") == 0) && (n+1 < argc) )
Note: See TracChangeset for help on using the changeset viewer.