Ignore:
Timestamp:
Oct 24, 2014, 11:00:06 AM (9 years ago)
Author:
cfuguet
Message:

reconf: introducing a FAULTY_MASK parameter in tsar_generic_iob

  • This parameter allows to disable selectively the faulty router's interfaces/channels.
File:
1 edited

Legend:

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

    r855 r859  
    318318
    319319
    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
    337336
    338337   assert( (X_WIDTH == 4) and (Y_WIDTH == 4) and
     
    420419            {
    421420                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;
    422430                exit(0);
    423431            }
     
    517525                                   vci_trdid_width,
    518526                                   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
    519530
    520531   /////////////////////////////////////////////////////////////////////
     
    11201131       int faulty_x = faulty_router_id >> Y_WIDTH;
    11211132       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);
    11231134    }
    11241135
Note: See TracChangeset for help on using the changeset viewer.