Changeset 836 for trunk/platforms/tsar_generic_xbar/scripts
- Timestamp:
- Oct 15, 2014, 11:41:49 AM (10 years ago)
- Location:
- trunk/platforms/tsar_generic_xbar/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/scripts/counter_defs.py
r790 r836 9 9 m_prot_name['dhccp'] = "DHCCP" 10 10 m_prot_name['rwt'] = "RWT" 11 m_prot_name[' mesi'] = "HMESI"11 m_prot_name['hmesi'] = "HMESI" 12 12 13 13 m_app_name = {} -
trunk/platforms/tsar_generic_xbar/scripts/create_graphs.py
r790 r836 7 7 8 8 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' ]9 apps = [ 'filter', 'lu', 'fft_ga' ] 10 #apps = [ 'histogram', 'mandel', 'filter', 'fft', 'fft_ga', 'filt_ga', 'pca', 'lu' ] # radix radix_ga kmeans 11 #apps = [ 'filt_ga' ] 12 nb_procs = [ 1, 4, 8, 16, 32, 64 ] 13 single_protocols = ['dhccp', 'rwt' ] 14 joint_protocols = ['dhccp', 'rwt' ] 15 15 #joint_protocols = [] 16 16 … … 403 403 gp_stacked_name = os.path.join(scripts_path, gen_dir, prot + '_stacked.gp') 404 404 405 norm_factor_value = 256405 norm_factor_value = nb_procs[-1] 406 406 407 407 # Creating the gp file … … 616 616 gp_cost_filename = os.path.join(scripts_path, gen_dir, 'joint_relative_cost.gp') 617 617 618 direct_cost_metrics = [ 'read_cost', 'write_cost' ]619 coherence_cost_metrics = ['update_cost', 'm_inv_cost', 'broadcast_cost' ]620 618 direct_cost_metrics = [ 'read_cost', 'write_cost', 'getm_cost' ] 619 coherence_cost_metrics = ['update_cost', 'm_inv_cost', 'broadcast_cost', 'inval_ro_cost', 'cleanup_cost', 'cleanup_d_cost' ] 620 621 621 # Creating the gp file 622 622 template_file = open(stacked_tmpl, 'r') … … 702 702 703 703 704 705 704 ################################################################################# 705 ### Graph 9 : ### 706 ################################################################################# 707 708 709 data_metric_filename = os.path.join(scripts_path, gen_dir, 'single_metric.dat') 710 gp_metric_filename = os.path.join(scripts_path, gen_dir, 'single_metric.gp') 711 712 metric = 'total_write' 713 714 # Creating the gp file 715 template_file = open(stacked_tmpl, 'r') 716 template = template_file.read() 717 718 xtics_str = "(" 719 first = True 720 xpos = 0 # successive x position of the center of the first bar in a application 721 app_labels = "" 722 prot_labels = "" 723 for 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 743 xtics_str += ")" 744 745 n = 1 746 plot_str = "newhistogram \"\"" 747 for 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 751 ylabel_str = "%(m)s" % dict(m = m_metric_name[metric]) 752 content = 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 754 create_file(gp_metric_filename, content) 755 756 # Creating the data file 757 content = "#" + metric 758 content += "\n" 759 for 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 778 create_file(data_metric_filename, content) 779 # Calling gnuplot 780 print "gnuplot", gp_metric_filename 781 subprocess.call([ 'gnuplot', gp_metric_filename ]) 782 783 784 785 -
trunk/platforms/tsar_generic_xbar/scripts/run_simus.py
r790 r836 12 12 # User parameters 13 13 nb_procs = [ 4 ] 14 #nb_procs = [ 1 6, 32, 64, 128, 256 ]14 #nb_procs = [ 1, 4, 8, 16, 32, 64, 128, 256 ] 15 15 rerun_stats = False 16 16 use_omp = False 17 protocol = ' dhccp'17 protocol = 'wtidl' 18 18 19 19 #apps = [ 'histogram', 'mandel', 'filter', 'radix_ga', 'fft_ga', 'kmeans' ] … … 32 32 # to come: 'barnes', 'fmm', 'ocean', 'raytrace', 'radiosity', 'waters', 'watern' 33 33 34 all_protocols = [ 'dhccp', 'rwt', 'hmesi' ]34 all_protocols = [ 'dhccp', 'rwt', 'hmesi', 'wtidl' ] 35 35 36 36 top_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..") … … 66 66 - apps_dir: path to almos-tsar-mipsel/apps directory 67 67 - 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 70 Optional 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 69 74 *** Stopping execution 70 75 ''' … … 98 103 if not os.path.exists(hmesi_dir): 99 104 print "*** Error: variable hmesi_dir does not define a valid path" 105 sys.exit() 106 107 if 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" 100 113 sys.exit() 101 114 … … 156 169 'modules/vci_io_bridge', 157 170 'modules/vci_iox_network', 158 'modules/vci_spi' 171 'modules/vci_spi', 159 172 'platforms/tsar_generic_xbar/tsar_xbar_cluster' 160 173 ] … … 164 177 'lib/generic_cache_tsar', 165 178 'modules/vci_cc_vcache_wrapper', 166 'modules/vci_mem_cache' 179 'modules/vci_mem_cache', 167 180 ] 168 181 … … 179 192 elif protocol == "hmesi": 180 193 arch_dir = hmesi_dir 194 elif protocol == "wtidl": 195 arch_dir = wtidl_dir 181 196 else: 182 197 assert(False) … … 213 228 #define IOMMU_ACTIVE 0 214 229 215 #define IRQ_PER_PROCESSOR 1 216 217 #endif //_HD_CONFIG_H 230 #define IRQ_PER_PROCESSOR 1 218 231 ''' % 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 219 238 file = open(hard_config, 'w') 220 239 file.write(header) 221 240 file.close() 241 222 242 223 243
Note: See TracChangeset
for help on using the changeset viewer.