Changeset 836 for trunk/platforms/tsar_generic_xbar/top.cpp
- Timestamp:
- Oct 15, 2014, 11:41:49 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/top.cpp
r779 r836 397 397 #else 398 398 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); 400 400 401 401 assert( (x <= X_SIZE) and (y <= Y_SIZE) && … … 411 411 #else 412 412 size_t cluster_xy = debug_proc_id / NB_PROCS_MAX ; 413 size_t x 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); 415 415 416 416 assert( (x <= X_SIZE) and (y <= Y_SIZE) && … … 635 635 sc_uint<vci_address_width> offset; 636 636 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); 638 638 639 639 std::ostringstream sh; … … 699 699 dspin_rsp_width, 700 700 vci_param_int, 701 vci_param_ext> *clusters[X_SIZE][Y_SIZE];701 vci_param_ext> * clusters[X_SIZE][Y_SIZE]; 702 702 703 703 #if USE_OPENMP … … 769 769 frozen_cycles, 770 770 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 773 773 ); 774 774 … … 880 880 881 881 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 882 904 //#define SC_TRACE 883 905 #ifdef SC_TRACE … … 943 965 signal_dspin_false_cmd_out[x][y][a][k].read = true; 944 966 } 945 946 947 948 949 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 } 951 973 } 952 974 } … … 968 990 for (int64_t n = 1; n < ncycles && !stop_called; n++) 969 991 { 970 // Monitor a specific address for L1 & L2 caches971 //clusters[0][0]->proc[0]->cache_monitor(0x800002c000ULL);972 //clusters[1][0]->memc->copies_monitor(0x800002C000ULL);973 974 992 if ((n % max_cycles) == 0) 975 993 { … … 1012 1030 { 1013 1031 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 } 1072 1069 } 1073 1070
Note: See TracChangeset
for help on using the changeset viewer.