- Timestamp:
- Nov 26, 2014, 6:54:56 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
r889 r890 415 415 debug_period = strtol(argv[n+1], NULL, 0); 416 416 } 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++; 422 422 if( (x>=X_SIZE) || (y>=Y_SIZE) ) 423 423 { … … 425 425 exit(0); 426 426 } 427 faulty_routers.push_back( faulty_router_id);427 faulty_routers.push_back((x << Y_WIDTH) | y); 428 428 } 429 429 else if ((strcmp(argv[n], "-FAULTY_MASK") == 0) && (n+1 < argc) )
Note: See TracChangeset
for help on using the changeset viewer.