Changeset 752
- Timestamp:
- Jul 18, 2014, 11:38:54 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r740 r752 29 29 30 30 #include <cassert> 31 #include <signal.h> 32 31 33 #include "arithmetics.h" 32 34 #include "../include/vci_cc_vcache_wrapper.h" … … 1142 1144 // We register processor request 1143 1145 r_icache_vaddr_save = m_ireq.addr; 1146 paddr = (paddr_t) m_ireq.addr; 1144 1147 1145 1148 // sytematic itlb access (if activated) … … 1157 1160 &tlb_set ); // unused 1158 1161 } 1159 else 1160 { 1161 if (vci_param::N > 32) 1162 { 1163 paddr = (paddr_t)m_ireq.addr | 1164 ((paddr_t)r_icache_paddr_ext.read() << 32); 1165 } 1166 else 1167 { 1168 paddr = (paddr_t)m_ireq.addr; 1169 } 1162 else if (vci_param::N > 32) 1163 { 1164 paddr = paddr | ((paddr_t) r_icache_paddr_ext.read() << 32); 1170 1165 } 1171 1166 … … 2249 2244 // updt_request, wbuf_request, wbuf_write_miss. 2250 2245 { 2251 paddr_t paddr; // physical address2246 paddr_t paddr; 2252 2247 pte_info_t tlb_flags; 2253 2248 size_t tlb_way; … … 2267 2262 2268 2263 // physical address computation : systematic DTLB access if activated) 2264 paddr = (paddr_t) m_dreq.addr; 2269 2265 if ( m_dreq.valid ) 2270 2266 { … … 2283 2279 else // identity mapping 2284 2280 { 2285 paddr = (paddr_t)m_dreq.addr;2286 2281 // we take into account the paddr extension 2287 2282 if (vci_param::N > 32) … … 2293 2288 if ( r_mmu_mode.read() & DATA_CACHE_MASK) 2294 2289 { 2290 2295 2291 if ( m_dreq.valid and r_dcache_updt_req.read() ) // read DIR and write DATA 2296 2292 { -
trunk/modules/vci_mem_cache/caba/source/include/mem_cache_directory.h
r499 r752 650 650 { 651 651 m_cache_data[i][j] = new uint32_t [words]; 652 // Init to avoid potential errors from memory checkers 653 std::memset(m_cache_data[i][j], 0, sizeof(uint32_t) * words); 652 654 } 653 655 } -
trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r722 r752 404 404 405 405 // instrumentation counters 406 uint 32_t m_cpt_cycles; // Counter of cycles407 uint 32_t m_cpt_reset_count; // Cycle at which the counters were last reset406 uint64_t m_cpt_cycles; // Counter of cycles 407 uint64_t m_cpt_reset_count; // Cycle at which the counters were last reset 408 408 409 409 // Counters accessible in software (not yet but eventually) -
trunk/platforms/almos-tsar-mipsel/top.cpp
r614 r752 201 201 ///////////////////////////////////////////////////////// 202 202 // There is 3 segments replicated in all clusters 203 // and 5 specific segments in the "IO" cluster 203 // and 5 specific segments in the "IO" cluster 204 204 // (containing address 0xBF000000) 205 205 ///////////////////////////////////////////////////////// 206 206 // Physical Address Decoding: 8 GID + 8 LID + 16 offset. 207 207 ///////////////////////////////////////////////////////// 208 #define RAM_BASE 0x00000000 208 #define RAM_BASE 0x00000000 209 209 #define RAM_SIZE 0x00C00000 210 210 211 #define BROM_BASE 0xBFC00000 211 #define BROM_BASE 0xBFC00000 212 212 #define BROM_SIZE 0x00100000 213 213 214 #define FBUF_BASE 0xBFD00000 214 #define FBUF_BASE 0xBFD00000 215 215 #define FBUF_SIZE 0x00200000 216 216 217 #define XICU_BASE 0x00F00000 217 #define XICU_BASE 0x00F00000 218 218 #define XICU_SIZE 0x00002000 219 219 … … 221 221 #define BDEV_SIZE 0x00000100 222 222 223 #define MTTY_BASE 0xBFF20000 223 #define MTTY_BASE 0xBFF20000 224 224 #define MTTY_SIZE 0x00000100 225 225 … … 227 227 #define MDMA_SIZE 0x00001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 228 228 229 #define MEMC_BASE 0x00F40000 229 #define MEMC_BASE 0x00F40000 230 230 #define MEMC_SIZE 0x00001000 231 231 … … 233 233 #define SIMH_SIZE 0x00001000 234 234 235 #define CDMA_BASE 0xBFF60000 235 #define CDMA_BASE 0xBFF60000 236 236 #define CDMA_SIZE 0x00000100 237 237 … … 255 255 bool debug_ok = false; // trace activated 256 256 size_t debug_period = 1; // trace period 257 size_t debug_memc_id = 0; // index of memc to be traced 257 size_t debug_memc_id = 0; // index of memc to be traced 258 258 size_t debug_proc_id = 0; // index of proc to be traced 259 259 uint32_t debug_from = 0; // trace start cycle … … 596 596 { 597 597 for (size_t y = 0; y < ymax ; y++) 598 { 598 { 599 599 600 600 sc_uint<vci_address_width> offset; … … 781 781 } 782 782 } 783 std::cout << std::endl << "Horizontal connections established" << std::endl; 783 std::cout << std::endl << "Horizontal connections established" << std::endl; 784 784 785 785 // Inter Clusters vertical connections -
trunk/platforms/tsar_generic_xbar/scripts/run_simus.py
r749 r752 4 4 import os 5 5 import sys 6 import shutil 6 7 7 8 #TODO: recopier les fichiers d'entrees dans le script en fonction de l'appli selectionnee … … 14 15 15 16 nb_procs = [ 4 ] 16 #nb_procs = [ 1 , 4, 8, 16, 32, 64, 128, 256 ]17 #nb_procs = [ 16, 32, 64, 128, 256 ] 17 18 rerun_stats = True 18 19 use_omp = False … … 25 26 # to come: 'barnes', 'fmm', 'ocean', 'raytrace', 'radiosity', 'waters', 'watern' 26 27 27 apps = [ ' histogram', 'pca' ]28 apps = [ 'cholesky' ] 28 29 29 30 … … 155 156 os.symlink(target, link_name) 156 157 157 target = hdd_img_name 158 link_name = 'hdd-img.bin' 159 if not os.path.isfile(link_name): 160 print "ln -s", target, link_name 161 os.symlink(target, link_name) 158 copied_hdd = 'hdd-img.bin' 159 print "cp", hdd_img_name, copied_hdd 160 shutil.copy(hdd_img_name, copied_hdd) 162 161 163 162 os.chdir(old_path) … … 255 254 shrc = "exec -p 0 /bin/lu -n%(nproc)d -m512\n" % dict(nproc = nprocs) 256 255 elif (app_name == "radix"): 257 shrc = "exec -p 0 /bin/radix -n%(nproc)d -k 2097152\n" % dict(nproc = nprocs) # test : 1024 ; simu : 2097152256 shrc = "exec -p 0 /bin/radix -n%(nproc)d -k1024\n" % dict(nproc = nprocs) # test : 1024 ; simu : 2097152 258 257 elif (app_name == "radix_ga"): 259 258 shrc = "exec -p 0 /bin/radix_ga -n%(nproc)d -k2097152\n" % dict(nproc = nprocs) # p = proc, n = num_keys -
trunk/platforms/tsar_generic_xbar/top.cpp
r749 r752 632 632 { 633 633 for (size_t y = 0; y < Y_SIZE ; y++) 634 { 634 { 635 635 636 636 sc_uint<vci_address_width> offset; … … 676 676 // Mesh boundaries DSPIN signals 677 677 DspinSignals<dspin_cmd_width>**** signal_dspin_false_cmd_in = 678 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_in" , X_SIZE, Y_SIZE, 4, 3);678 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_in" , X_SIZE, Y_SIZE, 4, 3); 679 679 DspinSignals<dspin_cmd_width>**** signal_dspin_false_cmd_out = 680 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_out", X_SIZE, Y_SIZE, 4, 3);680 alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_out", X_SIZE, Y_SIZE, 4, 3); 681 681 DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_in = 682 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_in" , X_SIZE, Y_SIZE, 4, 2);682 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_in" , X_SIZE, Y_SIZE, 4, 2); 683 683 DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_out = 684 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_out", X_SIZE, Y_SIZE, 4, 2); 685 684 alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_out", X_SIZE, Y_SIZE, 4, 2); 686 685 687 686 //////////////////////////// … … 730 729 sc.str().c_str(), 731 730 NB_PROCS_MAX, 732 NB_TTY_CHANNELS, 733 NB_DMA_CHANNELS, 731 NB_TTY_CHANNELS, 732 NB_DMA_CHANNELS, 734 733 x, 735 734 y, … … 772 771 debug_from, 773 772 debug_ok and (cluster(x,y) == debug_memc_id), 774 debug_ok and (cluster(x,y) == debug_proc_id) 773 debug_ok and (cluster(x,y) == debug_proc_id) 775 774 ); 776 775 … … 815 814 } 816 815 } 817 std::cout << std::endl << "Horizontal connections established" << std::endl; 816 std::cout << std::endl << "Horizontal connections established" << std::endl; 818 817 819 818 // Inter Clusters vertical connections … … 844 843 for (size_t k = 0; k < 3; k++) 845 844 { 846 clusters[0][y]->p_cmd_in[WEST][k] (signal_dspin_false_cmd_in [0][y][WEST][k]);845 clusters[0][y]->p_cmd_in[WEST][k] (signal_dspin_false_cmd_in [0][y][WEST][k]); 847 846 clusters[0][y]->p_cmd_out[WEST][k] (signal_dspin_false_cmd_out[0][y][WEST][k]); 848 clusters[X_SIZE-1][y]->p_cmd_in[EAST][k] (signal_dspin_false_cmd_in[X_SIZE-1][y][EAST][k]);849 clusters[X_SIZE-1][y]->p_cmd_out[EAST][k] 847 clusters[X_SIZE-1][y]->p_cmd_in[EAST][k] (signal_dspin_false_cmd_in [X_SIZE-1][y][EAST][k]); 848 clusters[X_SIZE-1][y]->p_cmd_out[EAST][k](signal_dspin_false_cmd_out[X_SIZE-1][y][EAST][k]); 850 849 } 851 850 852 851 for (size_t k = 0; k < 2; k++) 853 852 { 854 clusters[0][y]->p_rsp_in[WEST][k] (signal_dspin_false_rsp_in [0][y][WEST][k]);853 clusters[0][y]->p_rsp_in[WEST][k] (signal_dspin_false_rsp_in [0][y][WEST][k]); 855 854 clusters[0][y]->p_rsp_out[WEST][k] (signal_dspin_false_rsp_out[0][y][WEST][k]); 856 clusters[X_SIZE-1][y]->p_rsp_in[EAST][k] (signal_dspin_false_rsp_in[X_SIZE-1][y][EAST][k]);857 clusters[X_SIZE-1][y]->p_rsp_out[EAST][k] 855 clusters[X_SIZE-1][y]->p_rsp_in[EAST][k] (signal_dspin_false_rsp_in [X_SIZE-1][y][EAST][k]); 856 clusters[X_SIZE-1][y]->p_rsp_out[EAST][k](signal_dspin_false_rsp_out[X_SIZE-1][y][EAST][k]); 858 857 } 859 858 } … … 864 863 for (size_t k = 0; k < 3; k++) 865 864 { 866 clusters[x][0]->p_cmd_in[SOUTH][k] (signal_dspin_false_cmd_in[x][0][SOUTH][k]);867 clusters[x][0]->p_cmd_out[SOUTH][k] (signal_dspin_false_cmd_out[x][0][SOUTH][k]);868 clusters[x][Y_SIZE-1]->p_cmd_in[NORTH][k] (signal_dspin_false_cmd_in[x][Y_SIZE-1][NORTH][k]);869 clusters[x][Y_SIZE-1]->p_cmd_out[NORTH][k] 865 clusters[x][0]->p_cmd_in[SOUTH][k] (signal_dspin_false_cmd_in [x][0][SOUTH][k]); 866 clusters[x][0]->p_cmd_out[SOUTH][k] (signal_dspin_false_cmd_out[x][0][SOUTH][k]); 867 clusters[x][Y_SIZE-1]->p_cmd_in[NORTH][k] (signal_dspin_false_cmd_in [x][Y_SIZE-1][NORTH][k]); 868 clusters[x][Y_SIZE-1]->p_cmd_out[NORTH][k](signal_dspin_false_cmd_out[x][Y_SIZE-1][NORTH][k]); 870 869 } 871 870 872 871 for (size_t k = 0; k < 2; k++) 873 872 { 874 clusters[x][0]->p_rsp_in[SOUTH][k] (signal_dspin_false_rsp_in[x][0][SOUTH][k]);875 clusters[x][0]->p_rsp_out[SOUTH][k] (signal_dspin_false_rsp_out[x][0][SOUTH][k]);876 clusters[x][Y_SIZE-1]->p_rsp_in[NORTH][k] (signal_dspin_false_rsp_in[x][Y_SIZE-1][NORTH][k]);877 clusters[x][Y_SIZE-1]->p_rsp_out[NORTH][k] 873 clusters[x][0]->p_rsp_in[SOUTH][k] (signal_dspin_false_rsp_in [x][0][SOUTH][k]); 874 clusters[x][0]->p_rsp_out[SOUTH][k] (signal_dspin_false_rsp_out[x][0][SOUTH][k]); 875 clusters[x][Y_SIZE-1]->p_rsp_in[NORTH][k] (signal_dspin_false_rsp_in [x][Y_SIZE-1][NORTH][k]); 876 clusters[x][Y_SIZE-1]->p_rsp_out[NORTH][k](signal_dspin_false_rsp_out[x][Y_SIZE-1][NORTH][k]); 878 877 } 879 878 } … … 899 898 signal_dspin_false_cmd_out[x][y][a][k].read = true; 900 899 } 901 902 900 for (size_t k = 0; k < 2; k++){ 903 901 signal_dspin_false_rsp_in [x][y][a][k].write = false; … … 913 911 signal_resetn = true; 914 912 913 #define SC_TRACE 914 #ifdef SC_TRACE 915 sc_trace_file * tf = sc_create_vcd_trace_file("my_trace_file"); 916 917 if (X_SIZE > 1){ 918 for (size_t x = 0; x < (X_SIZE-1); x++){ 919 for (size_t y = 0; y < Y_SIZE; y++){ 920 for (size_t k = 0; k < 3; k++){ 921 signal_dspin_h_cmd_inc[x][y][k].trace(tf, "dspin_h_cmd_inc"); 922 signal_dspin_h_cmd_dec[x][y][k].trace(tf, "dspin_h_cmd_dec"); 923 } 924 925 for (size_t k = 0; k < 2; k++){ 926 signal_dspin_h_rsp_inc[x][y][k].trace(tf, "dspin_h_rsp_inc"); 927 signal_dspin_h_rsp_dec[x][y][k].trace(tf, "dspin_h_rsp_dec"); 928 } 929 } 930 } 931 } 932 933 if (Y_SIZE > 1) { 934 for (size_t y = 0; y < (Y_SIZE-1); y++){ 935 for (size_t x = 0; x < X_SIZE; x++){ 936 for (size_t k = 0; k < 3; k++){ 937 signal_dspin_v_cmd_inc[x][y][k].trace(tf, "dspin_v_cmd_inc"); 938 signal_dspin_v_cmd_dec[x][y][k].trace(tf, "dspin_v_cmd_dec"); 939 } 940 941 for (size_t k = 0; k < 2; k++){ 942 signal_dspin_v_rsp_inc[x][y][k].trace(tf, "dspin_v_rsp_inc"); 943 signal_dspin_v_rsp_dec[x][y][k].trace(tf, "dspin_v_rsp_dec"); 944 } 945 } 946 } 947 } 948 949 for (size_t x = 0; x < (X_SIZE); x++){ 950 for (size_t y = 0; y < Y_SIZE; y++){ 951 std::ostringstream signame; 952 signame << "cluster" << x << "_" << y; 953 clusters[x][y]->trace(tf, signame.str()); 954 } 955 } 956 #endif 957 915 958 if (debug_ok) { 916 959 #if USE_OPENMP … … 932 975 { 933 976 934 if (gettimeofday(&t2, NULL) != 0) 977 if (gettimeofday(&t2, NULL) != 0) 935 978 { 936 979 perror("gettimeofday"); … … 942 985 std::cerr << "platform clock frequency " << (double) 5000000 / (double) (ms2 - ms1) << "Khz" << std::endl; 943 986 944 if (gettimeofday(&t1, NULL) != 0) 987 if (gettimeofday(&t1, NULL) != 0) 945 988 { 946 989 perror("gettimeofday"); … … 966 1009 } 967 1010 968 if ( debug_ok and(n > debug_from) and (n % debug_period == 0))1011 if ((n > debug_from) and (n % debug_period == 0)) 969 1012 { 970 1013 std::cout << "****************** cycle " << std::dec << n ; 971 1014 std::cout << " ************************************************" << std::endl; 972 1015 973 // trace proc[debug_proc_id] 1016 // trace proc[debug_proc_id] 974 1017 size_t l = debug_proc_id % NB_PROCS_MAX ; 975 1018 size_t y = (debug_proc_id / NB_PROCS_MAX) % Y_SIZE ; … … 992 1035 //clusters[x][y]->signal_dspin_rsp_g2l_d.print_trace("[SIG]G2L RSP"); 993 1036 994 // trace memc[debug_memc_id] 1037 // trace memc[debug_memc_id] 995 1038 x = debug_memc_id / Y_SIZE; 996 1039 y = debug_memc_id % Y_SIZE; -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/include/tsar_xbar_cluster.h
r706 r752 211 211 212 212 ~TsarXbarCluster(); 213 void trace(sc_trace_file * tf, const std::string & name); 213 214 214 215 }; -
trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
r706 r752 669 669 670 670 671 template<size_t dspin_cmd_width, 672 size_t dspin_rsp_width, 673 typename vci_param_int, 674 typename vci_param_ext> 675 void TsarXbarCluster<dspin_cmd_width, 676 dspin_rsp_width, 677 vci_param_int, 678 vci_param_ext>::trace(sc_core::sc_trace_file * tf, const std::string & name) { 679 680 #define __trace(x) sc_core::sc_trace(tf, x, name + "_" + #x) 681 __trace(signal_vci_l2g_d); 682 __trace(signal_vci_g2l_d); 683 __trace(signal_vci_tgt_memc); 684 __trace(signal_vci_tgt_xicu); 685 __trace(signal_vci_tgt_mdma); 686 __trace(signal_vci_ini_mdma); 687 688 for (size_t p = 0; p < n_procs; p++) { 689 std::ostringstream signame; 690 signame << "vci_ini_proc_" << p; 691 sc_core::sc_trace(tf, signal_vci_ini_proc[p], signame.str()); 692 } 693 __trace(signal_vci_tgt_mtty); 694 __trace(signal_vci_tgt_brom); 695 __trace(signal_vci_tgt_bdev); 696 __trace(signal_vci_tgt_fbuf); 697 __trace(signal_vci_tgt_simh); 698 __trace(signal_vci_ini_bdev); 699 __trace(signal_vci_tgt_memc); 700 __trace(signal_vci_xram); 701 #undef trace 702 703 } 704 705 706 707 671 708 }} 672 709 … … 680 717 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 681 718 682 683
Note: See TracChangeset
for help on using the changeset viewer.