Changeset 509 for trunk/modules/vci_mem_cache/caba
- Timestamp:
- Sep 2, 2013, 1:40:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r507 r509 546 546 547 547 ///////////////////////////////////////////////////// 548 tmpl(void) 548 tmpl(void)::cache_monitor(addr_t addr) 549 549 ///////////////////////////////////////////////////// 550 550 { … … 614 614 ///////////////////////////////////////////////////// 615 615 { 616 uint8_t self_x_srcid = m_cc_global_id >> (14 - m_xwidth); 617 uint8_t self_y_srcid = ((m_cc_global_id << m_xwidth) >> (14 - m_ywidth)); 618 619 uint8_t x_srcid = req_srcid >> (14 - m_xwidth); 620 uint8_t y_srcid = ((req_srcid << m_xwidth) >> (14 - m_ywidth)); 616 const uint32_t srcid_width = vci_param_int::S; 617 uint8_t self_x_srcid = m_cc_global_id >> (srcid_width - m_xwidth); 618 uint8_t self_y_srcid = (m_cc_global_id >> (srcid_width - m_ywidth)) & ((1 << m_xwidth) - 1); 619 620 uint8_t x_srcid = req_srcid >> (srcid_width - m_xwidth); 621 uint8_t y_srcid = (req_srcid >> (srcid_width - m_ywidth - m_xwidth)) & ((1 << m_xwidth) - 1); 621 622 return abs(self_x_srcid - x_srcid) + abs(self_y_srcid - y_srcid); 622 623 } … … 665 666 std::cout << "**********************************" << std::dec << std::endl; 666 667 if (activity_counters) { 667 std::cout << " 668 std::cout << " 669 std::cout << " 668 std::cout << "----------------------------------" << std::dec << std::endl; 669 std::cout << "--- Activity Counters ---" << std::dec << std::endl; 670 std::cout << "----------------------------------" << std::dec << std::endl; 670 671 std::cout 671 << " -NUMBER OF CYCLES = " << m_cpt_cycles << std::endl672 << "[001] NUMBER OF CYCLES = " << m_cpt_cycles << std::endl 672 673 << std::endl 673 << " -LOCAL READ = " << m_cpt_read_local << std::endl674 << " -REMOTE READ = " << m_cpt_read_remote << std::endl675 << " -READ COST (FLITS * DIST) = " << m_cpt_read_cost << std::endl674 << "[002] LOCAL READ = " << m_cpt_read_local << std::endl 675 << "[003] REMOTE READ = " << m_cpt_read_remote << std::endl 676 << "[004] READ COST (FLITS * DIST) = " << m_cpt_read_cost << std::endl 676 677 << std::endl 677 << " -LOCAL WRITE = " << m_cpt_write_local << std::endl678 << " -REMOTE WRITE = " << m_cpt_write_remote << std::endl679 << " -WRITE FLITS LOCAL = " << m_cpt_write_flits_local << std::endl680 << " -WRITE FLITS REMOTE = " << m_cpt_write_flits_remote << std::endl681 << " -WRITE COST (FLITS * DIST) = " << m_cpt_write_cost << std::endl678 << "[005] LOCAL WRITE = " << m_cpt_write_local << std::endl 679 << "[006] REMOTE WRITE = " << m_cpt_write_remote << std::endl 680 << "[007] WRITE FLITS LOCAL = " << m_cpt_write_flits_local << std::endl 681 << "[008] WRITE FLITS REMOTE = " << m_cpt_write_flits_remote << std::endl 682 << "[009] WRITE COST (FLITS * DIST) = " << m_cpt_write_cost << std::endl 682 683 << std::endl 683 << " -LOCAL LL = " << m_cpt_ll_local << std::endl684 << " -REMOTE LL = " << m_cpt_ll_remote << std::endl685 << " -LL COST (FLITS * DIST) = " << m_cpt_ll_cost << std::endl684 << "[010] LOCAL LL = " << m_cpt_ll_local << std::endl 685 << "[011] REMOTE LL = " << m_cpt_ll_remote << std::endl 686 << "[012] LL COST (FLITS * DIST) = " << m_cpt_ll_cost << std::endl 686 687 << std::endl 687 << " -LOCAL SC = " << m_cpt_sc_local << std::endl688 << " -REMOTE SC = " << m_cpt_sc_remote << std::endl689 << " -SC COST (FLITS * DIST) = " << m_cpt_sc_cost << std::endl688 << "[013] LOCAL SC = " << m_cpt_sc_local << std::endl 689 << "[014] REMOTE SC = " << m_cpt_sc_remote << std::endl 690 << "[015] SC COST (FLITS * DIST) = " << m_cpt_sc_cost << std::endl 690 691 << std::endl 691 << " -LOCAL CAS = " << m_cpt_cas_local << std::endl692 << " -REMOTE CAS = " << m_cpt_cas_remote << std::endl693 << " -CAS COST (FLITS * DIST) = " << m_cpt_cas_cost << std::endl692 << "[016] LOCAL CAS = " << m_cpt_cas_local << std::endl 693 << "[017] REMOTE CAS = " << m_cpt_cas_remote << std::endl 694 << "[018] CAS COST (FLITS * DIST) = " << m_cpt_cas_cost << std::endl 694 695 << std::endl 695 << " -REQUESTS TRIG. UPDATE = " << m_cpt_update << std::endl696 << " -LOCAL UPDATE = " << m_cpt_update_local << std::endl697 << " -REMOTE UPDATE = " << m_cpt_update_remote << std::endl698 << " -UPDT COST (FLITS * DIST) = " << m_cpt_update_cost << std::endl696 << "[019] REQUESTS TRIG. UPDATE = " << m_cpt_update << std::endl 697 << "[020] LOCAL UPDATE = " << m_cpt_update_local << std::endl 698 << "[021] REMOTE UPDATE = " << m_cpt_update_remote << std::endl 699 << "[022] UPDT COST (FLITS * DIST) = " << m_cpt_update_cost << std::endl 699 700 << std::endl 700 << " -REQUESTS TRIG. M_INV = " << m_cpt_m_inval << std::endl701 << " -LOCAL M_INV = " << m_cpt_m_inval_local << std::endl702 << " -REMOTE M_INV = " << m_cpt_m_inval_remote << std::endl703 << " -M_INV COST (FLITS * DIST) = " << m_cpt_m_inval_cost << std::endl701 << "[023] REQUESTS TRIG. M_INV = " << m_cpt_m_inval << std::endl 702 << "[024] LOCAL M_INV = " << m_cpt_m_inval_local << std::endl 703 << "[025] REMOTE M_INV = " << m_cpt_m_inval_remote << std::endl 704 << "[026] M_INV COST (FLITS * DIST) = " << m_cpt_m_inval_cost << std::endl 704 705 << std::endl 705 << " -BROADCAT INVAL = " << m_cpt_br_inval << std::endl706 << "[027] BROADCAT INVAL = " << m_cpt_br_inval << std::endl 706 707 << std::endl 707 << " -LOCAL CLEANUP = " << m_cpt_cleanup_local << std::endl708 << " -REMOTE CLEANUP = " << m_cpt_cleanup_remote << std::endl709 << " -CLNUP COST (FLITS * DIST) = " << m_cpt_cleanup_cost << std::endl708 << "[028] LOCAL CLEANUP = " << m_cpt_cleanup_local << std::endl 709 << "[029] REMOTE CLEANUP = " << m_cpt_cleanup_remote << std::endl 710 << "[030] CLNUP COST (FLITS * DIST) = " << m_cpt_cleanup_cost << std::endl 710 711 << std::endl 711 712 << std::endl 712 << " - READ MISS = " << m_cpt_read_miss << std::endl 713 << " - WRITE MISS = " << m_cpt_write_miss << std::endl 714 << " - WRITE DIRTY = " << m_cpt_write_dirty << std::endl 715 << " - RD BLOCKED BY HIT IN TRT = " << m_cpt_trt_rb << std::endl 716 << " - TRANS BLOCKED BY FULL TRT = " << m_cpt_trt_full << std::endl 717 << " - PUT = " << m_cpt_put << std::endl 718 << " - GET = " << m_cpt_get << std::endl; 713 << "[031] READ MISS = " << m_cpt_read_miss << std::endl 714 << "[032] WRITE MISS = " << m_cpt_write_miss << std::endl 715 << "[033] WRITE DIRTY = " << m_cpt_write_dirty << std::endl 716 << "[034] RD BLOCKED BY HIT IN TRT = " << m_cpt_trt_rb << std::endl 717 << "[035] TRANS BLOCKED BY FULL TRT = " << m_cpt_trt_full << std::endl 718 << "[036] PUT (UNIMPLEMENTED) = " << m_cpt_put << std::endl 719 << "[037] GET (UNIMPLEMENTED) = " << m_cpt_get << std::endl 720 << std::endl; 719 721 } 720 722 721 723 if (stats) { 722 std::cout << " 723 std::cout << " 724 std::cout << " 724 std::cout << "----------------------------------" << std::dec << std::endl; 725 std::cout << "--- Calculated Stats ---" << std::dec << std::endl; 726 std::cout << "----------------------------------" << std::dec << std::endl; 725 727 std::cout 726 << " -READ TOTAL = " << m_cpt_read_local + m_cpt_read_remote << std::endl727 << " -READ RATE = " << (double) (m_cpt_read_local + m_cpt_read_remote) / m_cpt_cycles << std::endl728 << " -LOCAL READ RATE = " << (double) m_cpt_read_local / m_cpt_cycles << std::endl729 << " -REMOTE READ RATE = " << (double) m_cpt_read_remote / m_cpt_cycles << std::endl730 << " -READ MISS RATE = " << (double) m_cpt_read_miss / (m_cpt_read_local + m_cpt_read_remote) << std::endl728 << "[100] READ TOTAL = " << m_cpt_read_local + m_cpt_read_remote << std::endl 729 << "[101] READ RATE = " << (double) (m_cpt_read_local + m_cpt_read_remote) / m_cpt_cycles << std::endl 730 << "[102] LOCAL READ RATE = " << (double) m_cpt_read_local / m_cpt_cycles << std::endl 731 << "[103] REMOTE READ RATE = " << (double) m_cpt_read_remote / m_cpt_cycles << std::endl 732 << "[104] READ MISS RATE = " << (double) m_cpt_read_miss / (m_cpt_read_local + m_cpt_read_remote) << std::endl 731 733 << std::endl 732 << " -WRITE TOTAL = " << m_cpt_write_local + m_cpt_write_remote << std::endl733 << " -WRITE RATE = " << (double) (m_cpt_write_local + m_cpt_write_remote) / m_cpt_cycles << std::endl734 << " -LOCAL WRITE RATE = " << (double) m_cpt_write_local / m_cpt_cycles << std::endl735 << " -REMOTE WRITE RATE = " << (double) m_cpt_write_remote / m_cpt_cycles << std::endl736 << " -WRITE MISS RATE = " << (double) m_cpt_write_miss / (m_cpt_write_local + m_cpt_write_remote) << std::endl737 << " -WRITE BURST TOTAL = " << m_cpt_write_flits_local + m_cpt_write_flits_remote << std::endl738 << " -WRITE BURST AVERAGE = " << (double) (m_cpt_write_flits_local + m_cpt_write_flits_remote) / (m_cpt_write_local + m_cpt_write_remote) << std::endl739 << " -LOCAL WRITE BURST AV. = " << (double) m_cpt_write_flits_local / (m_cpt_write_local + m_cpt_write_remote) << std::endl740 << " -REMOTE WRITE BURST AV = " << (double) m_cpt_write_flits_remote / (m_cpt_write_local + m_cpt_write_remote) << std::endl734 << "[105] WRITE TOTAL = " << m_cpt_write_local + m_cpt_write_remote << std::endl 735 << "[106] WRITE RATE = " << (double) (m_cpt_write_local + m_cpt_write_remote) / m_cpt_cycles << std::endl 736 << "[107] LOCAL WRITE RATE = " << (double) m_cpt_write_local / m_cpt_cycles << std::endl 737 << "[108] REMOTE WRITE RATE = " << (double) m_cpt_write_remote / m_cpt_cycles << std::endl 738 << "[109] WRITE MISS RATE = " << (double) m_cpt_write_miss / (m_cpt_write_local + m_cpt_write_remote) << std::endl 739 << "[110] WRITE BURST TOTAL = " << m_cpt_write_flits_local + m_cpt_write_flits_remote << std::endl 740 << "[111] WRITE BURST AVERAGE = " << (double) (m_cpt_write_flits_local + m_cpt_write_flits_remote) / (m_cpt_write_local + m_cpt_write_remote) << std::endl 741 << "[112] LOCAL WRITE BURST AV. = " << (double) m_cpt_write_flits_local / (m_cpt_write_local + m_cpt_write_remote) << std::endl 742 << "[113] REMOTE WRITE BURST AV = " << (double) m_cpt_write_flits_remote / (m_cpt_write_local + m_cpt_write_remote) << std::endl 741 743 << std::endl 742 << " -UPDATE RATE = " << (double) m_cpt_update / m_cpt_cycles << std::endl743 << " -AV. UPDATE PER UP REQ = " << (double) (m_cpt_update_local + m_cpt_update_remote) / m_cpt_update << std::endl744 << " -AV. LOC UPDT PER UP REQ = " << (double) m_cpt_update_local / m_cpt_update << std::endl745 << " -AV. REMOTE UPDT PER UP REQ = " << (double) m_cpt_update_remote / m_cpt_update << std::endl744 << "[114] UPDATE RATE = " << (double) m_cpt_update / m_cpt_cycles << std::endl 745 << "[115] AV. UPDATE PER UP REQ = " << (double) (m_cpt_update_local + m_cpt_update_remote) / m_cpt_update << std::endl 746 << "[116] AV. LOC UPDT PER UP REQ = " << (double) m_cpt_update_local / m_cpt_update << std::endl 747 << "[117] AV. REMOTE UPDT PER UP REQ = " << (double) m_cpt_update_remote / m_cpt_update << std::endl 746 748 << std::endl 747 << " -INVAL MULTICAST RATE = " << (double) m_cpt_m_inval / m_cpt_cycles << std::endl748 << " -AVE. INVAL PER M_INV = " << (double) (m_cpt_m_inval_local + m_cpt_m_inval_remote) / m_cpt_m_inval << std::endl749 << " -AV. LOC INV PER M_INV = " << (double) m_cpt_m_inval_local / m_cpt_m_inval << std::endl750 << " -AV. REM INV PER M_INV = " << (double) m_cpt_m_inval_remote / m_cpt_m_inval << std::endl749 << "[118] INVAL MULTICAST RATE = " << (double) m_cpt_m_inval / m_cpt_cycles << std::endl 750 << "[119] AVE. INVAL PER M_INV = " << (double) (m_cpt_m_inval_local + m_cpt_m_inval_remote) / m_cpt_m_inval << std::endl 751 << "[120] AV. LOC INV PER M_INV = " << (double) m_cpt_m_inval_local / m_cpt_m_inval << std::endl 752 << "[121] AV. REM INV PER M_INV = " << (double) m_cpt_m_inval_remote / m_cpt_m_inval << std::endl 751 753 << std::endl 752 << " -INVAL BROADCAST RATE = " << (double) m_cpt_br_inval / m_cpt_cycles << std::endl753 << " -WRITE DIRTY RATE = " << (double) m_cpt_write_dirty / m_cpt_cycles << std::endl754 << "[122] INVAL BROADCAST RATE = " << (double) m_cpt_br_inval / m_cpt_cycles << std::endl 755 << "[123] WRITE DIRTY RATE = " << (double) m_cpt_write_dirty / m_cpt_cycles << std::endl 754 756 << std::endl 755 << " - CLEANUP RATE = " << (double) (m_cpt_cleanup_local + m_cpt_cleanup_remote) / m_cpt_cycles << std::endl 756 << " - LOCAL CLEANUP RATE = " << (double) m_cpt_cleanup_local / m_cpt_cycles << std::endl 757 << " - REMOTE CLEANUP RATE = " << (double) m_cpt_cleanup_remote / m_cpt_cycles << std::endl 758 << " - LL RATE = " << (double) (m_cpt_ll_local + m_cpt_ll_remote) / m_cpt_cycles << std::endl 759 << " - LOCAL LL RATE = " << (double) m_cpt_ll_local / m_cpt_cycles << std::endl 760 << " - REMOTE LL RATE = " << (double) m_cpt_ll_remote / m_cpt_cycles << std::endl 761 << " - SC RATE = " << (double) (m_cpt_sc_local + m_cpt_sc_remote) / m_cpt_cycles << std::endl 762 << " - LOCAL SC RATE = " << (double) m_cpt_sc_local / m_cpt_cycles << std::endl 763 << " - REMOTE SC RATE = " << (double) m_cpt_sc_remote / m_cpt_cycles << std::endl 764 << " - CAS RATE = " << (double) (m_cpt_cas_local + m_cpt_cas_remote) / m_cpt_cycles << std::endl 765 << " - LOCAL CAS RATE = " << (double) m_cpt_cas_local / m_cpt_cycles << std::endl 766 << " - REMOTE CAS RATE = " << (double) m_cpt_cas_remote / m_cpt_cycles << std::endl; 757 << "[124] CLEANUP RATE = " << (double) (m_cpt_cleanup_local + m_cpt_cleanup_remote) / m_cpt_cycles << std::endl 758 << "[125] LOCAL CLEANUP RATE = " << (double) m_cpt_cleanup_local / m_cpt_cycles << std::endl 759 << "[126] REMOTE CLEANUP RATE = " << (double) m_cpt_cleanup_remote / m_cpt_cycles << std::endl 760 << "[127] LL RATE = " << (double) (m_cpt_ll_local + m_cpt_ll_remote) / m_cpt_cycles << std::endl 761 << "[128] LOCAL LL RATE = " << (double) m_cpt_ll_local / m_cpt_cycles << std::endl 762 << "[129] REMOTE LL RATE = " << (double) m_cpt_ll_remote / m_cpt_cycles << std::endl 763 << "[130] SC RATE = " << (double) (m_cpt_sc_local + m_cpt_sc_remote) / m_cpt_cycles << std::endl 764 << "[131] LOCAL SC RATE = " << (double) m_cpt_sc_local / m_cpt_cycles << std::endl 765 << "[132] REMOTE SC RATE = " << (double) m_cpt_sc_remote / m_cpt_cycles << std::endl 766 << "[133] CAS RATE = " << (double) (m_cpt_cas_local + m_cpt_cas_remote) / m_cpt_cycles << std::endl 767 << "[134] LOCAL CAS RATE = " << (double) m_cpt_cas_local / m_cpt_cycles << std::endl 768 << "[135] REMOTE CAS RATE = " << (double) m_cpt_cas_remote / m_cpt_cycles << std::endl 769 << std::endl 770 << std::endl; 767 771 } 768 772 }
Note: See TracChangeset
for help on using the changeset viewer.