Changeset 904 for branches


Ignore:
Timestamp:
Dec 11, 2014, 4:52:15 PM (10 years ago)
Author:
cfuguet
Message:

reconf: any router in any NoC can be faulty. Moreover, each NoC has its
own config register in the XICU.

Location:
branches/reconfiguration/platforms/tsar_generic_iob
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/platforms/tsar_generic_iob/Makefile

    r890 r904  
    11TAGS := cscope.out
     2
     3SOCLIB_CC_ARGS :=
     4SOCLIB_CC_ARGS += "-b caba:reconf:vci_xicu"
    25
    36all: simul.x
     
    58
    69simul.x: top.cpp top.desc
    7         soclib-cc -P -p top.desc -I. -o simul.x
     10        soclib-cc $(SOCLIB_CC_ARGS) -p top.desc -I. -o simul.x
    811
    912$(TAGS): top.desc
  • branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py

    r902 r904  
    2121    compileonly  -- stops after platform's compilation
    2222    batchmode    -- TTY and FB are only redirected to FILES
    23     faultyrouter -- a list containing faulty routers' coordinates (x, y)
     23    faultyrouter -- a list containing faulty routers' coordinates (t, x, y)
    2424    faultymask   -- a mask of disabled routers' interfaces
    2525    faultycore   -- a list containing faulty cores' coordinates (x, y, l)
     
    103103        command.extend(["-FAULTY_MASK", str(args.faultymask)])
    104104        for f in args.faultyrouter:
    105             command.extend(["-FAULTY_ROUTER", str(f[0]), str(f[1])])
     105            command.extend(["-FAULTY_ROUTER", str(f[0]), str(f[1]), str(f[2])])
    106106
    107107    if args.debug != None:
     
    112112    else:
    113113        # by observation, the procedure grows linearly with the diameter of the mesh.
    114         maxcycles = 150000 + (args.x + args.y) * 20000;
     114        maxcycles = 400000 + (args.x + args.y) * 20000;
    115115        command.extend(["-NCYCLES", str(maxcycles)])
    116116
     
    158158
    159159    parser.add_argument(
    160         '--faulty-router', '-fr', dest='faultyrouter', action='append', nargs=2,
    161         help='ID (X,Y) of faulty router')
     160        '--faulty-router', '-fr', dest='faultyrouter', action='append', nargs=3,
     161        help='ID (T,X,Y) of faulty router. The T is 0:CMD, 1:RSP')
    162162
    163163    parser.add_argument(
  • branches/reconfiguration/platforms/tsar_generic_iob/scripts/random_faulty_core_router.py

    r902 r904  
    8484SIM_FAULTFREE = False
    8585SIM_FAULTCORES = False
    86 SIM_FAULTROUTERS = False
    87 SIM_FAULTMIXED = True
     86SIM_FAULTROUTERS = True
     87SIM_FAULTMIXED = False
    8888
    8989# probability of faulty router (for mixed simul)
    9090SIM_FAULTMIXED_PROBROUTER = 0.05 # 5%
     91
     92# NoC index for faulty routers
     93CMD = 0
     94RSP = 1
    9195
    9296for xsize, ysize in [(4, 4), (4, 8), (8, 8), (8, 16), (16, 16)]:
     
    135139                cx = random.randint(0, args.xmax)
    136140                cy = random.randint(0, args.ymax)
    137                 if args.add_faultyrouter((cx, cy)): n += 1
     141                if args.add_faultyrouter((CMD, cx, cy)): n += 1
    138142
    139143            onerun.run(args)
     
    159163                    # add faulty router
    160164                    fr += 1
    161                     while not args.add_faultyrouter((cx, cy)):
     165                    while not args.add_faultyrouter((CMD, cx, cy)):
    162166                        cx = random.randint(0, args.xmax)
    163167                        cy = random.randint(0, args.ymax)
  • branches/reconfiguration/platforms/tsar_generic_iob/top.cpp

    r900 r904  
    415415            debug_period = strtol(argv[n+1], NULL, 0);
    416416         }
    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++;
     417         else if ((strcmp(argv[n], "-FAULTY_ROUTER") == 0) && (n+3 < argc) )
     418         {
     419            size_t t = strtol(argv[n+1], NULL, 0);
     420            size_t x = strtol(argv[n+2], NULL, 0);
     421            size_t y = strtol(argv[n+3], NULL, 0);
     422            n+=2;
     423            if( (t > 4) )
     424            {
     425                std::cout << "FAULTY_ROUTER NoC index is too big (index > 4)" << std::endl;
     426                exit(0);
     427            }
    422428            if( (x>=X_SIZE) || (y>=Y_SIZE) )
    423429            {
     
    425431                exit(0);
    426432            }
    427             faulty_routers.push_back((x << Y_WIDTH) | y);
     433            faulty_routers.push_back((t << (X_WIDTH + Y_WIDTH)) |
     434                                     (x << (Y_WIDTH)) |
     435                                     (y));
    428436         }
    429437         else if ((strcmp(argv[n], "-FAULTY_MASK") == 0) && (n+1 < argc) )
     
    11311139#endif
    11321140
    1133     // disable all interfaces of the faulty router
     1141    // disable all interfaces of the faulty CMD routers
     1142    std::cout << "\n*** List of deactivated routers ***\n";
    11341143    for (std::vector<size_t>::iterator it = faulty_routers.begin();
    11351144         it != faulty_routers.end();
    11361145         ++it)
    11371146    {
    1138        int router_id = *it;
    1139        int router_x = router_id >> Y_WIDTH;
    1140        int router_y = router_id & ((1 << Y_WIDTH) - 1);
    1141        clusters[router_x][router_y]->int_router_cmd[0]->set_disable_mask(faulty_mask);
     1147       int ry = (*it) & ((1 << Y_WIDTH) - 1);
     1148       int rx = (*it >> Y_WIDTH) & ((1 << X_WIDTH) - 1);
     1149       int rt = (*it) >> (X_WIDTH + Y_WIDTH);
     1150
     1151       if (rt == 0)
     1152       {
     1153          std::cout << "Deactivate CMD router (" << rx << "," << ry << ")"
     1154                    << std::endl;
     1155          clusters[rx][ry]->int_router_cmd[0]->set_disable_mask(faulty_mask);
     1156          continue;
     1157       }
     1158       if (rt == 1)
     1159       {
     1160          std::cout << "Deactivate RSP router (" << rx << "," << ry << ")"
     1161                    << std::endl;
     1162          clusters[rx][ry]->int_router_rsp[0]->set_disable_mask(faulty_mask);
     1163          continue;
     1164       }
     1165       if (rt == 2)
     1166       {
     1167          std::cout << "Deactivate M2P router (" << rx << "," << ry << ")"
     1168                    << std::endl;
     1169          clusters[rx][ry]->int_router_cmd[1]->set_disable_mask(faulty_mask);
     1170          continue;
     1171       }
     1172       if (rt == 3)
     1173       {
     1174          std::cout << "Deactivate P2M router (" << rx << "," << ry << ")"
     1175                    << std::endl;
     1176          clusters[rx][ry]->int_router_rsp[1]->set_disable_mask(faulty_mask);
     1177          continue;
     1178       }
     1179       if (rt == 4)
     1180       {
     1181          std::cout << "Deactivate CLACK router (" << rx << "," << ry << ")"
     1182                    << std::endl;
     1183          clusters[rx][ry]->int_router_cmd[2]->set_disable_mask(faulty_mask);
     1184          continue;
     1185       }
    11421186    }
    11431187
     
    14751519            uint64_t ms2 = (uint64_t) t2.tv_sec  * 1000ULL +
    14761520               (uint64_t) t2.tv_usec / 1000;
    1477             std::cerr << "### cycle = " << n << " / frequency (Khz) = "
     1521            std::cerr << "### cycle = " << std::dec << n << " / frequency (Khz) = "
    14781522               << (double) stats_period / (double) (ms2 - ms1) << std::endl;
    14791523         }
  • branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h

    r884 r904  
    7373    sc_signal<bool>                       signal_irq_mdma[8];
    7474    sc_signal<bool>                       signal_irq_memc;
    75     sc_signal<uint32_t>                   signal_cfg_router;
     75    sc_signal<uint32_t>                   signal_cfg_router_cmd[3];
     76    sc_signal<uint32_t>                   signal_cfg_router_rsp[2];
    7677
    7778    // INT network DSPIN signals between DSPIN routers and DSPIN local_crossbars
  • branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp

    r884 r904  
    197197                     xcu_nb_inputs,                       // number of soft IRQs
    198198                     16,                                  // number of output IRQs
    199                      1);                                  // number of config regs
     199                     5);                                  // number of config regs
    200200
    201201    ////////////  MDMA
     
    431431        int_router_cmd[k]->p_clk                 (this->p_clk);
    432432        int_router_cmd[k]->p_resetn              (this->p_resetn);
    433         (*int_router_cmd[k]->p_blackhole_pos)    (signal_cfg_router);
     433        (*int_router_cmd[k]->p_blackhole_pos)    (signal_cfg_router_cmd[k]);
    434434        for (int i = 0; i < 4; i++)
    435435        {
     
    443443        int_router_rsp[k]->p_clk                 (this->p_clk);
    444444        int_router_rsp[k]->p_resetn              (this->p_resetn);
    445         (*int_router_rsp[k]->p_blackhole_pos)    (signal_cfg_router);
     445        (*int_router_rsp[k]->p_blackhole_pos)    (signal_cfg_router_rsp[k]);
    446446        for (int i = 0; i < 4; i++)
    447447        {
     
    554554        else                     xicu->p_hwi[i]  (signal_false);
    555555    }
    556     xicu->p_cfg[0]                               (signal_cfg_router);
     556    xicu->p_cfg[0]                               (signal_cfg_router_cmd[0]); // CMD
     557    xicu->p_cfg[1]                               (signal_cfg_router_rsp[0]); // RSP
     558    xicu->p_cfg[2]                               (signal_cfg_router_cmd[1]); // M2P
     559    xicu->p_cfg[3]                               (signal_cfg_router_rsp[1]); // P2M
     560    xicu->p_cfg[4]                               (signal_cfg_router_cmd[2]); // CLACK
    557561
    558562    ///////////////////////////////////// MEMC
Note: See TracChangeset for help on using the changeset viewer.