Changeset 859 for branches/reconfiguration/platforms/tsar_generic_iob
- Timestamp:
- Oct 24, 2014, 11:00:06 AM (10 years ago)
- Location:
- branches/reconfiguration/platforms/tsar_generic_iob
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py
r855 r859 43 43 '--faulty-router', '-f', dest='faultyrouter', default=-1, 44 44 help='ID (X,Y) of faulty router') 45 46 parser.add_argument( 47 '--faulty-mask', '-m', dest='faultymask', default=0x1F, 48 help='Disable mask for faulty router interfaces') 45 49 46 50 parser.add_argument( … … 128 132 if args.faultyrouter != -1: 129 133 command.extend(["-FAULTY_ROUTER", str(args.faultyrouter)]) 134 command.extend(["-FAULTY_MASK", str(args.faultymask)]) 130 135 131 136 if args.debug != None: -
branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
r855 r859 318 318 319 319 320 char soft_name[256] = BOOT_SOFT_NAME; // pathname: binary code 321 size_t ncycles = UINT_MAX; // simulated cycles 322 char disk_name[256] = BDEV_IMAGE_NAME; // pathname: disk image 323 char nic_rx_name[256] = NIC_RX_NAME; // pathname: rx packets file 324 char nic_tx_name[256] = NIC_TX_NAME; // pathname: tx packets file 325 ssize_t threads_nr = 1; // simulator's threads number 326 size_t faulty_router_id = 0xFFFFFFFF; // faulty router coordinates 327 bool debug_ok = false; // trace activated 328 size_t debug_period = 1; // trace period 329 size_t debug_memc_id = 0xFFFFFFFF; // index of traced memc 330 size_t debug_proc_id = 0xFFFFFFFF; // index of traced proc 331 size_t debug_xram_id = 0xFFFFFFFF; // index of traced xram 332 bool debug_iob = false; // trace iob0 & iob1 when true 333 uint32_t debug_from = 0; // trace start cycle 334 uint32_t frozen_cycles = MAX_FROZEN_CYCLES; // monitoring frozen processor 335 size_t cluster_iob0 = cluster(0, 0); // cluster containing IOB0 336 size_t cluster_iob1 = cluster(X_SIZE-1, Y_SIZE-1); // cluster containing IOB1 320 char soft_name[256] = BOOT_SOFT_NAME; // pathname: binary code 321 size_t ncycles = UINT_MAX; // simulated cycles 322 char disk_name[256] = BDEV_IMAGE_NAME; // pathname: disk image 323 char nic_rx_name[256] = NIC_RX_NAME; // pathname: rx packets file 324 char nic_tx_name[256] = NIC_TX_NAME; // pathname: tx packets file 325 ssize_t threads_nr = 1; // simulator's threads number 326 size_t faulty_router_id = 0xFFFFFFFF; // faulty router coordinates 327 size_t faulty_mask = 0x1F; // interface mask for the faulty router 328 bool debug_ok = false; // trace activated 329 size_t debug_period = 1; // trace period 330 size_t debug_memc_id = 0xFFFFFFFF; // index of traced memc 331 size_t debug_proc_id = 0xFFFFFFFF; // index of traced proc 332 size_t debug_xram_id = 0xFFFFFFFF; // index of traced xram 333 bool debug_iob = false; // trace iob0 & iob1 when true 334 uint32_t debug_from = 0; // trace start cycle 335 uint32_t frozen_cycles = MAX_FROZEN_CYCLES; // monitoring frozen processor 337 336 338 337 assert( (X_WIDTH == 4) and (Y_WIDTH == 4) and … … 420 419 { 421 420 std::cout << "FAULTY_ROUTER parameter doesn't fit X_SIZE/Y_SIZE" << std::endl; 421 exit(0); 422 } 423 } 424 else if ((strcmp(argv[n], "-FAULTY_MASK") == 0) && (n+1 < argc) ) 425 { 426 faulty_mask = strtol(argv[n+1], NULL, 0); 427 if( faulty_mask > 0x1F ) 428 { 429 std::cout << "FAULTY_MASK parameter max value is 0x1F" << std::endl; 422 430 exit(0); 423 431 } … … 517 525 vci_trdid_width, 518 526 vci_wrplen_width> vci_param_ext; 527 528 const size_t cluster_iob0 = cluster(0, 0); // cluster containing IOB0 529 const size_t cluster_iob1 = cluster(X_SIZE-1, Y_SIZE-1); // cluster containing IOB1 519 530 520 531 ///////////////////////////////////////////////////////////////////// … … 1120 1131 int faulty_x = faulty_router_id >> Y_WIDTH; 1121 1132 int faulty_y = faulty_router_id & ((1 << Y_WIDTH) - 1); 1122 clusters[faulty_x][faulty_y]->int_router_cmd[0]->set_disable_mask( 0x1F);1133 clusters[faulty_x][faulty_y]->int_router_cmd[0]->set_disable_mask(faulty_mask); 1123 1134 } 1124 1135
Note: See TracChangeset
for help on using the changeset viewer.