Ignore:
Timestamp:
Oct 15, 2014, 11:41:49 AM (10 years ago)
Author:
meunier
Message:

Trunk:

  • Cosmetic in mem_cache_directory.h and xram_transaction.h
  • Renamed mem_cache param dspin_in_width and dspin_out_width to memc_dspin_in_width and memc_dspin_out_width (because of a bug in soclib-cc ?). Should have updated these names in the .sd or .py files of all platforms
  • Updated the scripts for tsar_generic_xbar to take into account the ideal write-through + added a graph in create_graphs.py
Location:
trunk/platforms/tsar_generic_xbar
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_xbar/scripts/counter_defs.py

    r790 r836  
    99m_prot_name['dhccp'] = "DHCCP"
    1010m_prot_name['rwt'] = "RWT"
    11 m_prot_name['mesi'] = "HMESI"
     11m_prot_name['hmesi'] = "HMESI"
    1212
    1313m_app_name = {}
  • trunk/platforms/tsar_generic_xbar/scripts/create_graphs.py

    r790 r836  
    77
    88
    9 #apps = [ 'histogram', 'mandel', 'filter', 'radix', 'fft_ga' ]
    10 #apps = [ 'histogram', 'mandel', 'filter', 'radix', 'radix_ga', 'fft', 'fft_ga', 'filt_ga', 'kmeans', 'pca', 'lu' ]
    11 apps = [ 'fft', 'fft_ga' ]
    12 nb_procs = [ 1, 4, 8, 16, 32, 64, 128, 256 ]
    13 single_protocols = ['dhccp', 'rwt']
    14 joint_protocols = ['dhccp', 'rwt']
     9apps = [ 'filter', 'lu', 'fft_ga' ]
     10#apps = [ 'histogram', 'mandel', 'filter', 'fft', 'fft_ga', 'filt_ga', 'pca', 'lu' ]  # radix radix_ga kmeans
     11#apps = [ 'filt_ga' ]
     12nb_procs = [ 1, 4, 8, 16, 32, 64 ]
     13single_protocols = ['dhccp', 'rwt' ]
     14joint_protocols = ['dhccp', 'rwt' ]
    1515#joint_protocols = []
    1616
     
    403403   gp_stacked_name   = os.path.join(scripts_path, gen_dir, prot + '_stacked.gp')
    404404   
    405    norm_factor_value = 256
     405   norm_factor_value = nb_procs[-1]
    406406   
    407407   # Creating the gp file
     
    616616gp_cost_filename   = os.path.join(scripts_path, gen_dir, 'joint_relative_cost.gp')
    617617   
    618 direct_cost_metrics = [ 'read_cost', 'write_cost' ]
    619 coherence_cost_metrics = ['update_cost', 'm_inv_cost', 'broadcast_cost' ]
    620   
     618direct_cost_metrics = [ 'read_cost', 'write_cost', 'getm_cost' ]
     619coherence_cost_metrics = ['update_cost', 'm_inv_cost', 'broadcast_cost', 'inval_ro_cost', 'cleanup_cost', 'cleanup_d_cost' ]
     620 
    621621# Creating the gp file
    622622template_file = open(stacked_tmpl, 'r')
     
    702702
    703703
    704 
    705 
     704#################################################################################
     705### Graph 9 :         ###
     706#################################################################################
     707
     708
     709data_metric_filename = os.path.join(scripts_path, gen_dir, 'single_metric.dat')
     710gp_metric_filename   = os.path.join(scripts_path, gen_dir, 'single_metric.gp')
     711   
     712metric = 'total_write'
     713 
     714# Creating the gp file
     715template_file = open(stacked_tmpl, 'r')
     716template = template_file.read()
     717   
     718xtics_str = "("
     719first = True
     720xpos = 0 # successive x position of the center of the first bar in a application
     721app_labels = ""
     722prot_labels = ""
     723for num_appli in range(0, len(apps)):
     724   first_proc = True
     725   for i in nb_procs:
     726      x = 0 # local var for computing position of protocol names
     727      #for prot in joint_protocols:
     728         #prot_labels += "set label \"%s\" at first %f, character 2 center font \"Times,10\"\n" % (m_prot_name[prot], float((xpos - 0.5)) + x) # -0.5 instead of +0.5, don't know why... (bug gnuplot?)
     729         #x += 1
     730
     731      if not first:
     732         xtics_str += ", "
     733      first = False
     734      if first_proc:
     735         first_proc = False
     736         xpos_first = xpos
     737      xtics_str += "\"%d\" %f -1" % (i, float(xpos - 0.5 + len(joint_protocols)))
     738      xpos_last = xpos
     739      xpos += 1 + len(joint_protocols)
     740   app_name_xpos = float((xpos_first + xpos_last)) / 2
     741   app_labels += "set label \"%s\" at first %f,character 1 center font \"Times,12\"\n" % (m_app_name[apps[num_appli]], app_name_xpos)
     742   xpos += 1
     743xtics_str += ")"
     744
     745n = 1
     746plot_str = "newhistogram \"\""
     747for prot in joint_protocols:
     748   plot_str += ", \\\n    " + "'" + data_metric_filename + "'" + " using " + str(n) + " lc rgb " + colors[n] + " title \"" + m_metric_name[metric] + " for " + m_prot_name[prot] + "\""
     749   n += 1
     750
     751ylabel_str = "%(m)s" % dict(m = m_metric_name[metric])
     752content = template % dict(svg_name = os.path.join(graph_dir, 'single_metric'), xtics_str = xtics_str, plot_str = plot_str, ylabel_str = ylabel_str, app_labels = app_labels, prot_labels = prot_labels)
     753
     754create_file(gp_metric_filename, content)
     755
     756# Creating the data file
     757content = "#" + metric
     758content += "\n"
     759for app in apps:
     760   if app != apps[0]:
     761      for prot in joint_protocols:
     762         for p in joint_protocols:
     763            content += "%-15f " % 0.0
     764         content += "\n"
     765   for i in nb_procs:
     766      for prot in joint_protocols:
     767         for p in joint_protocols:
     768            if p != prot:
     769               content += "%-15f " % 0
     770            else:
     771               content += "%-15f " % (float(metrics_val[prot][app][i][metric]))
     772         content += "\n"
     773      if i != nb_procs[-1]:
     774         for p in joint_protocols:
     775            content += "%-15f " % 0.0
     776         content += "\n"
     777
     778create_file(data_metric_filename, content)
     779# Calling gnuplot
     780print "gnuplot", gp_metric_filename
     781subprocess.call([ 'gnuplot', gp_metric_filename ])
     782
     783
     784
     785
  • trunk/platforms/tsar_generic_xbar/scripts/run_simus.py

    r790 r836  
    1212# User parameters
    1313nb_procs = [ 4 ]
    14 #nb_procs = [ 16, 32, 64, 128, 256 ]
     14#nb_procs = [ 1, 4, 8, 16, 32, 64, 128, 256 ]
    1515rerun_stats = False
    1616use_omp = False
    17 protocol = 'dhccp'
     17protocol = 'wtidl'
    1818
    1919#apps = [ 'histogram', 'mandel', 'filter', 'radix_ga', 'fft_ga', 'kmeans' ]
     
    3232# to come: 'barnes', 'fmm', 'ocean', 'raytrace', 'radiosity', 'waters', 'watern'
    3333
    34 all_protocols = [ 'dhccp', 'rwt', 'hmesi' ]
     34all_protocols = [ 'dhccp', 'rwt', 'hmesi', 'wtidl' ]
    3535
    3636top_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..")
     
    6666 - apps_dir:      path to almos-tsar-mipsel/apps directory
    6767 - almos_src_dir: path to almos source directory (for kernel and bootloader binaries)
    68  - hdd_img_name:  path to the hdd image to use
     68 - hdd_img_name:  path to the hdd image to use (will be copied but not modified)
     69 - tsar_dir:      path to tsar repository
     70Optional definitions (necessary if you want to use alternative protocols):
     71 - rwt_dir:       path to the RWT repository
     72 - hmesi_dir:     path to HMESI directory
     73 - wtidl_dir:     path to the ideal write-through protocol directory
    6974*** Stopping execution
    7075'''
     
    98103    if not os.path.exists(hmesi_dir):
    99104        print "*** Error: variable hmesi_dir does not define a valid path"
     105        sys.exit()
     106
     107if protocol == "wtidl":
     108    if wtidl_dir == "":
     109        print "*** Error: variable wtidl_dir not defined in config file"
     110        sys.exit()
     111    if not os.path.exists(wtidl_dir):
     112        print "*** Error: variable wtidl_dir does not define a valid path"
    100113        sys.exit()
    101114
     
    156169            'modules/vci_io_bridge',
    157170            'modules/vci_iox_network',
    158             'modules/vci_spi'
     171            'modules/vci_spi',
    159172            'platforms/tsar_generic_xbar/tsar_xbar_cluster'
    160173    ]
     
    164177            'lib/generic_cache_tsar',
    165178            'modules/vci_cc_vcache_wrapper',
    166             'modules/vci_mem_cache'
     179            'modules/vci_mem_cache',
    167180    ]
    168181
     
    179192    elif protocol == "hmesi":
    180193        arch_dir = hmesi_dir
     194    elif protocol == "wtidl":
     195        arch_dir = wtidl_dir
    181196    else:
    182197        assert(False)
     
    213228#define IOMMU_ACTIVE        0
    214229
    215 #define   IRQ_PER_PROCESSOR   1
    216 
    217 #endif //_HD_CONFIG_H
     230#define IRQ_PER_PROCESSOR   1
    218231''' % dict(x = x, y = y, nb_clus = x * y)
     232
     233   if protocol == 'wtidl':
     234       header += '#define WT_IDL\n'
     235
     236   header += '#endif //_HD_CONFIG_H\n'
     237
    219238   file = open(hard_config, 'w')
    220239   file.write(header)
    221240   file.close()
     241
    222242
    223243
  • trunk/platforms/tsar_generic_xbar/soclib.conf

    r779 r836  
    11
    22# DescPath modified by a script
     3
     4
     5
     6config.default = config.mysystemcass
    37
    48config.addDescPath("/users/cao/meunier/src/tsar/lib/generic_llsc_global_table")
     
    913config.addDescPath("/users/cao/meunier/src/tsar/modules/vci_io_bridge")
    1014config.addDescPath("/users/cao/meunier/src/tsar/modules/vci_iox_network")
    11 config.addDescPath("/users/cao/meunier/src/tsar/modules/vci_spiplatforms/tsar_generic_xbar/tsar_xbar_cluster")
    12 config.addDescPath("/users/cao/meunier/src/rwt/communication")
    13 config.addDescPath("/users/cao/meunier/src/rwt/lib/generic_cache_tsar")
    14 config.addDescPath("/users/cao/meunier/src/rwt/modules/vci_cc_vcache_wrapper")
    15 config.addDescPath("/users/cao/meunier/src/rwt/modules/vci_mem_cache")
    16 
     15config.addDescPath("/users/cao/meunier/src/tsar/modules/vci_spi")
     16config.addDescPath("/users/cao/meunier/src/tsar/platforms/tsar_generic_xbar/tsar_xbar_cluster")
     17config.addDescPath("/users/cao/meunier/src/wt_ideal/communication")
     18config.addDescPath("/users/cao/meunier/src/wt_ideal/lib/generic_cache_tsar")
     19config.addDescPath("/users/cao/meunier/src/wt_ideal/modules/vci_cc_vcache_wrapper")
     20config.addDescPath("/users/cao/meunier/src/wt_ideal/modules/vci_mem_cache")
  • trunk/platforms/tsar_generic_xbar/top.cpp

    r779 r836  
    397397#else
    398398            size_t x = debug_memc_id >> Y_WIDTH;
    399             size_t y = debug_memc_id & ((1<<Y_WIDTH)-1);
     399            size_t y = debug_memc_id & ((1 << Y_WIDTH) - 1);
    400400
    401401            assert( (x <= X_SIZE) and (y <= Y_SIZE) &&
     
    411411#else
    412412            size_t cluster_xy = debug_proc_id / NB_PROCS_MAX ;
    413             size_t x          = cluster_xy >> Y_WIDTH;
    414             size_t y          = cluster_xy & ((1<<Y_WIDTH)-1);
     413            size_t x = cluster_xy >> Y_WIDTH;
     414            size_t y = cluster_xy & ((1 << Y_WIDTH) - 1);
    415415
    416416            assert( (x <= X_SIZE) and (y <= Y_SIZE) &&
     
    635635         sc_uint<vci_address_width> offset;
    636636         offset = (sc_uint<vci_address_width>)cluster(x,y)
    637                    << (vci_address_width-x_width-y_width);
     637                   << (vci_address_width - x_width - y_width);
    638638
    639639         std::ostringstream sh;
     
    699699                   dspin_rsp_width,
    700700                   vci_param_int,
    701                    vci_param_ext>*          clusters[X_SIZE][Y_SIZE];
     701                   vci_param_ext> * clusters[X_SIZE][Y_SIZE];
    702702
    703703#if USE_OPENMP
     
    769769                frozen_cycles,
    770770                debug_from,
    771                 debug_ok and (cluster(x,y) == debug_memc_id),
    772                 debug_ok and (cluster(x,y) == debug_proc_id)
     771                debug_ok,
     772                debug_ok
    773773            );
    774774
     
    880880
    881881
     882#ifdef WT_IDL
     883    std::list<VciCcVCacheWrapper<vci_param_int,
     884        dspin_cmd_width,
     885        dspin_rsp_width,
     886        GdbServer<Mips32ElIss> > * > l1_caches;
     887
     888   for (size_t x = 0; x < X_SIZE; x++) {
     889      for (size_t y = 0; y < Y_SIZE; y++) {
     890         for (int proc = 0; proc < NB_PROCS_MAX; proc++) {
     891            l1_caches.push_back(clusters[x][y]->proc[proc]);
     892         }
     893      }
     894   }
     895
     896   for (size_t x = 0; x < X_SIZE; x++) {
     897      for (size_t y = 0; y < Y_SIZE; y++) {
     898         clusters[x][y]->memc->set_vcache_list(l1_caches);
     899      }
     900   }
     901#endif
     902
     903
    882904//#define SC_TRACE
    883905#ifdef SC_TRACE
     
    943965               signal_dspin_false_cmd_out[x][y][a][k].read  = true;
    944966            }
    945              for (size_t k = 0; k < 2; k++){
    946                 signal_dspin_false_rsp_in [x][y][a][k].write = false;
    947                 signal_dspin_false_rsp_in [x][y][a][k].read  = true;
    948                 signal_dspin_false_rsp_out[x][y][a][k].write = false;
    949                 signal_dspin_false_rsp_out[x][y][a][k].read  = true;
    950              }
     967            for (size_t k = 0; k < 2; k++){
     968               signal_dspin_false_rsp_in [x][y][a][k].write = false;
     969               signal_dspin_false_rsp_in [x][y][a][k].read  = true;
     970               signal_dspin_false_rsp_out[x][y][a][k].write = false;
     971               signal_dspin_false_rsp_out[x][y][a][k].read  = true;
     972            }
    951973         }
    952974      }
     
    968990      for (int64_t n = 1; n < ncycles && !stop_called; n++)
    969991      {
    970          // Monitor a specific address for L1 & L2 caches
    971          //clusters[0][0]->proc[0]->cache_monitor(0x800002c000ULL);
    972          //clusters[1][0]->memc->copies_monitor(0x800002C000ULL);
    973 
    974992         if ((n % max_cycles) == 0)
    975993         {
     
    10121030         {
    10131031            std::cout << "****************** cycle " << std::dec << n ;
    1014             std::cout << " ************************************************" << std::endl;
    1015 
    1016             // trace proc[debug_proc_id]
    1017             size_t l = debug_proc_id % NB_PROCS_MAX ;
    1018             size_t y = (debug_proc_id / NB_PROCS_MAX) % Y_SIZE ;
    1019             size_t x = debug_proc_id / (Y_SIZE * NB_PROCS_MAX) ;
    1020 
    1021             std::ostringstream proc_signame;
    1022             proc_signame << "[SIG]PROC_" << x << "_" << y << "_" << l ;
    1023             std::ostringstream p2m_signame;
    1024             p2m_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " P2M" ;
    1025             std::ostringstream m2p_signame;
    1026             m2p_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " M2P" ;
    1027 
    1028             //clusters[x][y]->signal_vci_ini_proc[l].print_trace(proc_signame.str());
    1029             //clusters[x][y]->signal_dspin_p2m_proc[l].print_trace(p2m_signame.str());
    1030             //clusters[x][y]->signal_dspin_m2p_proc[l].print_trace(m2p_signame.str());
    1031 
    1032             //clusters[x][y]->signal_dspin_cmd_l2g_d.print_trace("[SIG]L2G CMD");
    1033             //clusters[x][y]->signal_dspin_cmd_g2l_d.print_trace("[SIG]G2L CMD");
    1034             //clusters[x][y]->signal_dspin_rsp_l2g_d.print_trace("[SIG]L2G RSP");
    1035             //clusters[x][y]->signal_dspin_rsp_g2l_d.print_trace("[SIG]G2L RSP");
    1036 
    1037             // trace memc[debug_memc_id]
    1038             x = debug_memc_id / Y_SIZE;
    1039             y = debug_memc_id % Y_SIZE;
    1040 
    1041             std::ostringstream smemc;
    1042             smemc << "[SIG]MEMC_" << x << "_" << y;
    1043             std::ostringstream sxram;
    1044             sxram << "[SIG]XRAM_" << x << "_" << y;
    1045             std::ostringstream sm2p;
    1046             sm2p << "[SIG]MEMC_" << x << "_" << y << " M2P" ;
    1047             std::ostringstream sp2m;
    1048             sp2m << "[SIG]MEMC_" << x << "_" << y << " P2M" ;
    1049 
    1050             //clusters[x][y]->memc->print_trace();
    1051             //clusters[x][y]->signal_vci_tgt_memc.print_trace(smemc.str());
    1052             //clusters[x][y]->signal_vci_xram.print_trace(sxram.str());
    1053             //clusters[x][y]->signal_dspin_p2m_memc.print_trace(sp2m.str());
    1054             //clusters[x][y]->signal_dspin_m2p_memc.print_trace(sm2p.str());
    1055 
    1056             // trace replicated peripherals
    1057             //clusters[1][1]->mdma->print_trace();
    1058             //clusters[1][1]->signal_vci_tgt_mdma.print_trace("[SIG]MDMA_TGT_1_1");
    1059             //clusters[1][1]->signal_vci_ini_mdma.print_trace("[SIG]MDMA_INI_1_1");
    1060 
    1061 
    1062             // trace external peripherals
    1063             //size_t io_x   = cluster_io_id / Y_SIZE;
    1064             //size_t io_y   = cluster_io_id % Y_SIZE;
    1065 
    1066             //clusters[io_x][io_y]->brom->print_trace();
    1067             //clusters[io_x][io_y]->signal_vci_tgt_brom.print_trace("[SIG]BROM");
    1068 
    1069             //clusters[io_x][io_y]->bdev->print_trace();
    1070             //clusters[io_x][io_y]->signal_vci_tgt_bdev.print_trace("[SIG]BDEV_TGT");
    1071             //clusters[io_x][io_y]->signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI");
     1032            std::cout << "************************************************" << std::endl;
     1033
     1034            for (size_t x = 0; x < X_SIZE ; x++){
     1035               for (size_t y = 0; y < Y_SIZE ; y++){
     1036                  for (int proc = 0; proc < NB_PROCS_MAX; proc++) {
     1037
     1038                     clusters[x][y]->proc[proc]->print_trace();
     1039                     
     1040                     std::ostringstream proc_signame;
     1041                     proc_signame << "[SIG]PROC_" << x << "_" << y << "_" << proc ;
     1042                     std::ostringstream p2m_signame;
     1043                     p2m_signame << "[SIG]PROC_" << x << "_" << y << "_" << proc << " P2M";
     1044                     std::ostringstream m2p_signame;
     1045                     m2p_signame << "[SIG]PROC_" << x << "_" << y << "_" << proc << " M2P";
     1046
     1047                     clusters[x][y]->signal_vci_ini_proc[proc].print_trace(proc_signame.str());
     1048                     clusters[x][y]->signal_dspin_p2m_proc[proc].print_trace(p2m_signame.str());
     1049                     clusters[x][y]->signal_dspin_m2p_proc[proc].print_trace(m2p_signame.str());
     1050                  }
     1051
     1052                  clusters[x][y]->memc->print_trace();
     1053
     1054                  std::ostringstream smemc;
     1055                  smemc << "[SIG]MEMC_" << x << "_" << y;
     1056                  std::ostringstream sxram;
     1057                  sxram << "[SIG]XRAM_" << x << "_" << y;
     1058                  std::ostringstream sm2p;
     1059                  sm2p << "[SIG]MEMC_" << x << "_" << y << " M2P";
     1060                  std::ostringstream sp2m;
     1061                  sp2m << "[SIG]MEMC_" << x << "_" << y << " P2M";
     1062
     1063                  clusters[x][y]->signal_vci_tgt_memc.print_trace(smemc.str());
     1064                  clusters[x][y]->signal_vci_xram.print_trace(sxram.str());
     1065                  clusters[x][y]->signal_dspin_p2m_memc.print_trace(sp2m.str());
     1066                  clusters[x][y]->signal_dspin_m2p_memc.print_trace(sm2p.str());
     1067               }
     1068            }
    10721069         }
    10731070
  • trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/metadata/tsar_xbar_cluster.sd

    r779 r836  
    3232                memc_cell_size_int = parameter.Reference('vci_data_width_int'),
    3333                memc_cell_size_ext = parameter.Reference('vci_data_width_ext'),
    34                 dspin_in_width  = parameter.Reference('dspin_rsp_width'),
    35                 dspin_out_width = parameter.Reference('dspin_cmd_width')),
     34                memc_dspin_in_width  = parameter.Reference('dspin_rsp_width'),
     35                memc_dspin_out_width = parameter.Reference('dspin_cmd_width')),
    3636
    3737        Uses('caba:vci_simple_rom',
  • trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp

    r752 r836  
    142142                     IntTab(cluster_id),                 // SRCID external space
    143143                     IntTab(cluster_id, tgtid_memc),     // TGTID direct space
    144                      //(cluster_id << l_width) + nb_procs, // CC_GLOBAL_ID
    145144                     x_width,                            // Number of x bits in platform
    146145                     y_width,                            // Number of y bits in platform
     
    215214    wt_xbar_d = new VciDspinTargetWrapper<vci_param_int, dspin_cmd_width, dspin_rsp_width>(
    216215                swtxbar.str().c_str(),
    217                 x_width + y_width + l_width );
     216                x_width + y_width + l_width);
    218217
    219218    std::ostringstream swixbar;
Note: See TracChangeset for help on using the changeset viewer.