Changeset 767 for branches/RWT/modules/vci_mem_cache/caba
- Timestamp:
- Aug 25, 2014, 5:58:16 PM (10 years ago)
- Location:
- branches/RWT/modules/vci_mem_cache/caba/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RWT/modules/vci_mem_cache/caba/source/include/update_tab.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/RWT/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
- Property svn:mergeinfo changed
/trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h merged: 597,599,601,605
r644 r767 83 83 TGT_CMD_WRITE, 84 84 TGT_CMD_CAS, 85 TGT_CMD_ ERROR,86 TGT_CMD_ CONFIG85 TGT_CMD_CONFIG, 86 TGT_CMD_ERROR 87 87 }; 88 88 … … 96 96 TGT_RSP_MULTI_ACK_IDLE, 97 97 TGT_RSP_CLEANUP_IDLE, 98 TGT_RSP_TGT_CMD_IDLE, 98 99 TGT_RSP_CONFIG_IDLE, 99 TGT_RSP_TGT_CMD_IDLE,100 100 TGT_RSP_READ, 101 101 TGT_RSP_WRITE, … … 104 104 TGT_RSP_MULTI_ACK, 105 105 TGT_RSP_CLEANUP, 106 TGT_RSP_ CONFIG,107 TGT_RSP_ TGT_CMD106 TGT_RSP_TGT_CMD, 107 TGT_RSP_CONFIG 108 108 }; 109 109 … … 122 122 CC_SEND_XRAM_RSP_IDLE, 123 123 CC_SEND_WRITE_IDLE, 124 CC_SEND_READ_IDLE, 124 125 CC_SEND_CAS_IDLE, 125 126 CC_SEND_CONFIG_IDLE, … … 437 438 uint32_t m_cpt_write_flits_remote; // number of flits for remote WRITEs 438 439 uint32_t m_cpt_write_cost; // Number of (flits * distance) for WRITEs 440 uint32_t m_cpt_write_ncc_miss; // Number of write on ncc line 439 441 440 442 uint32_t m_cpt_ll_local; // Number of local LL transactions … … 552 554 uint32_t m_cpt_xram_rsp_fsm_heap_used; // NB cycles HEAP LOCK used 553 555 554 uint32_t m_cpt_heap_unused; // NB cycles HEAP LOCK unused 556 uint32_t m_cpt_heap_unused; // NB cycles HEAP LOCK unused 557 uint32_t m_cpt_heap_slot_available; // NB HEAP slot available refresh at each cycles 558 uint32_t m_cpt_heap_min_slot_available; // NB HEAP : Min of slot available 555 559 556 560 //RWT … … 584 588 sc_in<bool> p_clk; 585 589 sc_in<bool> p_resetn; 586 sc_ in<bool>p_irq;590 sc_out<bool> p_irq; 587 591 soclib::caba::VciTarget<vci_param_int> p_vci_tgt; 588 592 soclib::caba::VciInitiator<vci_param_ext> p_vci_ixr; … … 618 622 const soclib::common::IntTab &srcid_x, // global index RAM network 619 623 const soclib::common::IntTab &tgtid_d, // global index INT network 620 const size_t cc_global_id, // global index CC network621 624 const size_t x_width, // X width in platform 622 625 const size_t y_width, // Y width in platform … … 635 638 636 639 void reset_counters(); 637 void print_stats(bool activity_counters , bool stats);640 void print_stats(bool activity_counters = true, bool stats = false); 638 641 void print_trace( size_t detailled = 0 ); 639 642 void cache_monitor(addr_t addr); … … 647 650 void check_monitor(addr_t addr, data_t data, bool read); 648 651 uint32_t req_distance(uint32_t req_srcid); 652 uint32_t min_value(uint32_t old_value, uint32_t new_value); 649 653 bool is_local_req(uint32_t req_srcid); 650 654 int read_instrumentation(uint32_t regr, uint32_t & rdata); … … 661 665 const size_t m_sets; // Number of cache sets 662 666 const size_t m_words; // Number of words in a line 663 const size_t m_cc_global_id; // global_index on cc network 664 const size_t m_xwidth; // number of x bits in platform 665 const size_t m_ywidth; // number of y bits in platform 667 size_t m_x_self; // X self coordinate 668 size_t m_y_self; // Y self coordinate 669 const size_t m_x_width; // number of x bits in platform 670 const size_t m_y_width; // number of y bits in platform 666 671 size_t m_debug_start_cycle; 667 672 bool m_debug_ok; … … 834 839 sc_signal<addr_t> r_read_to_cleanup_nline; // cache line index 835 840 sc_signal<size_t> r_read_to_cleanup_srcid; 841 sc_signal<size_t> r_read_to_cleanup_inst; 836 842 sc_signal<size_t> r_read_to_cleanup_length; 837 843 sc_signal<size_t> r_read_to_cleanup_first_word; … … 1069 1075 sc_signal<size_t> r_xram_rsp_ivt_index; // IVT entry index 1070 1076 sc_signal<size_t> r_xram_rsp_next_ptr; // Next pointer to the heap 1077 sc_signal<bool> r_xram_rsp_rerror_irq; // WRITE MISS rerror irq 1078 sc_signal<bool> r_xram_rsp_rerror_irq_enable; // WRITE MISS rerror irq enable 1079 sc_signal<addr_t> r_xram_rsp_rerror_address; // WRITE MISS rerror address 1080 sc_signal<size_t> r_xram_rsp_rerror_rsrcid; // WRITE MISS rerror srcid 1071 1081 1072 1082 // Buffer between XRAM_RSP fsm and TGT_RSP fsm (response to L1 cache) - Property svn:mergeinfo changed
-
branches/RWT/modules/vci_mem_cache/caba/source/include/xram_transaction.h
r495 r767 426 426 void write_rsp(const size_t index, 427 427 const size_t word, 428 const wide_data_t data) 428 const wide_data_t data, 429 const bool rerror) 429 430 { 430 431 data_t value; … … 442 443 assert( (tab[index].xram_read ) and 443 444 "MEMC ERROR: TRT entry is not a GET in TRT write_rsp()"); 445 446 if ( rerror ) 447 { 448 tab[index].rerror = true; 449 return; 450 } 444 451 445 452 // first 32 bits word -
branches/RWT/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
- Property svn:mergeinfo changed
/trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp merged: 597,599,601,603,605,617
r646 r767 56 56 #define RANDOMIZE_CAS 1 57 57 58 // RWT configuration 59 #define REVERT_CC_MECANISM 0 60 61 // Configuration 62 #define REVERT_BC_MECANISM 0 63 58 64 namespace soclib { namespace caba { 59 65 … … 64 70 "TGT_CMD_WRITE", 65 71 "TGT_CMD_CAS", 66 "TGT_CMD_ ERROR",67 "TGT_CMD_ CONFIG"72 "TGT_CMD_CONFIG", 73 "TGT_CMD_ERROR" 68 74 }; 69 75 const char *tgt_rsp_fsm_str[] = … … 75 81 "TGT_RSP_MULTI_ACK_IDLE", 76 82 "TGT_RSP_CLEANUP_IDLE", 83 "TGT_RSP_TGT_CMD_IDLE", 77 84 "TGT_RSP_CONFIG_IDLE", 78 "TGT_RSP_TGT_CMD_IDLE",79 85 "TGT_RSP_READ", 80 86 "TGT_RSP_WRITE", … … 83 89 "TGT_RSP_MULTI_ACK", 84 90 "TGT_RSP_CLEANUP", 85 "TGT_RSP_ CONFIG",86 "TGT_RSP_ TGT_CMD"91 "TGT_RSP_TGT_CMD", 92 "TGT_RSP_CONFIG" 87 93 }; 88 94 const char *cc_receive_fsm_str[] = … … 97 103 "CC_SEND_XRAM_RSP_IDLE", 98 104 "CC_SEND_WRITE_IDLE", 105 "CC_SEND_READ_IDLE", 99 106 "CC_SEND_CAS_IDLE", 100 107 "CC_SEND_CONFIG_IDLE", … … 353 360 const IntTab &srcid_x, // global index on external network 354 361 const IntTab &tgtid_d, // global index on direct network 355 const size_t cc_global_id, // global index on cc network356 362 const size_t x_width, // number of x bits in platform 357 363 const size_t y_width, // number of x bits in platform … … 378 384 p_dspin_clack( "p_dspin_clack" ), 379 385 380 m_seglist( mtp.getSegmentList(tgtid_d) ), 381 m_nseg( 0 ), 382 m_srcid_x( mtx.indexForId(srcid_x) ), 383 m_initiators( 1 << vci_param_int::S ), 384 m_heap_size( heap_size ), 385 m_ways( nways ), 386 m_sets( nsets ), 387 m_words( nwords ), 388 m_cc_global_id( cc_global_id ), 389 m_xwidth(x_width), 390 m_ywidth(y_width), 386 m_seglist(mtp.getSegmentList(tgtid_d)), 387 m_nseg(0), 388 m_srcid_x( mtx.indexForId(srcid_x)), 389 m_initiators(1 << vci_param_int::S), 390 m_heap_size(heap_size), 391 m_ways(nways), 392 m_sets(nsets), 393 m_words(nwords), 394 m_x_width(x_width), 395 m_y_width(y_width), 391 396 m_debug_start_cycle( debug_start_cycle ), 392 397 m_debug_ok( debug_ok ), … … 547 552 } 548 553 554 assert( (m_nseg > 0) and 555 "MEMC ERROR : At least one segment must be mapped to this component"); 556 549 557 m_seg = new soclib::common::Segment*[m_nseg]; 550 558 … … 555 563 i++; 556 564 } 565 566 addr_t gid = m_seg[0]->baseAddress() >> (vci_param_int::N - x_width - y_width); 567 m_x_self = (gid >> m_y_width) & ((1 << m_x_width) - 1); 568 m_y_self = gid & ((1 << m_y_width) - 1); 557 569 558 570 // Allocation for IXR_RSP FSM … … 664 676 } 665 677 678 ///////////////////////////////////////////////////// 679 tmpl(uint32_t)::min_value(uint32_t old_value, uint32_t new_value) 680 ///////////////////////////////////////////////////// 681 { 682 if (old_value < new_value) 683 return old_value; 684 else 685 return new_value; 686 } 666 687 667 688 ///////////////////////////////////////////////////// … … 670 691 { 671 692 const uint32_t srcid_width = vci_param_int::S; 672 uint8_t self_x_srcid = m_cc_global_id >> (srcid_width - m_xwidth); 673 uint8_t self_y_srcid = (m_cc_global_id >> (srcid_width - m_ywidth)) & ((1 << m_xwidth) - 1); 674 675 uint8_t x_srcid = req_srcid >> (srcid_width - m_xwidth); 676 uint8_t y_srcid = (req_srcid >> (srcid_width - m_ywidth - m_xwidth)) & ((1 << m_xwidth) - 1); 677 return abs(self_x_srcid - x_srcid) + abs(self_y_srcid - y_srcid); 693 694 uint8_t req_x = (req_srcid >> (srcid_width - m_x_width)); 695 uint8_t req_y = (req_srcid >> (srcid_width - m_x_width - m_y_width)) & ((1 << m_y_width) - 1); 696 697 return abs(m_x_self - req_x) + abs(m_y_self - req_y); 678 698 } 679 699 … … 865 885 m_cpt_ncc_to_cc_write = 0; 866 886 m_cpt_ncc_to_cc = 0; 887 m_cpt_write_ncc_miss = 0; 867 888 } 868 889 869 890 870 891 ///////////////////////////////////////// 871 tmpl(void)::print_stats(bool activity_counters = true, bool stats = true)892 tmpl(void)::print_stats(bool activity_counters, bool stats) 872 893 { 873 894 std::cout << "**********************************" << std::dec << std::endl; … … 891 912 << "[008] WRITE FLITS REMOTE = " << m_cpt_write_flits_remote << std::endl 892 913 << "[009] WRITE COST (FLITS * DIST) = " << m_cpt_write_cost << std::endl 914 << "[XXX] WRITE L1 MISS NCC = " << m_cpt_write_ncc_miss << std::endl 893 915 << std::endl 894 916 << "[010] LOCAL LL = " << m_cpt_ll_local << std::endl … … 929 951 << "[037] GET (UNIMPLEMENTED) = " << m_cpt_get << std::endl 930 952 << "[038] WRITE BROADCAST = " << m_cpt_write_broadcast << std::endl 953 << "[039] MIN HEAP SLOT AVAILABLE = " << m_cpt_heap_min_slot_available << std::endl 931 954 << std::endl 932 << "[0 39] CLEANUP DATA (FLITS) = " << m_cpt_cleanup_data * 16 << std::endl933 << "[04 0] NCC TO CC (READ) = " << m_cpt_ncc_to_cc_read << std::endl934 << "[04 1] NCC TO CC (WRITE) = " << m_cpt_ncc_to_cc_write << std::endl935 << "[04 2] NCC TO CC (TOTAL) = " << m_cpt_ncc_to_cc << std::endl955 << "[040] CLEANUP DATA (FLITS) = " << m_cpt_cleanup_data * 16 << std::endl 956 << "[041] NCC TO CC (READ) = " << m_cpt_ncc_to_cc_read << std::endl 957 << "[042] NCC TO CC (WRITE) = " << m_cpt_ncc_to_cc_write << std::endl 958 << "[043] NCC TO CC (TOTAL) = " << m_cpt_ncc_to_cc << std::endl 936 959 << std::endl; 937 960 } … … 1017 1040 delete [] m_debug_previous_data; 1018 1041 delete [] m_debug_data; 1019 1020 print_stats();1021 1042 } 1022 1043 … … 1137 1158 r_xram_rsp_to_ixr_cmd_req = false; 1138 1159 r_xram_rsp_trt_index = 0; 1160 r_xram_rsp_rerror_irq = false; 1161 r_xram_rsp_rerror_irq_enable = false; 1139 1162 1140 1163 m_xram_rsp_to_cc_send_inst_fifo.init(); … … 1175 1198 m_cpt_write_flits_local = 0; 1176 1199 m_cpt_write_flits_remote = 0; 1200 m_cpt_write_ncc_miss = 0; 1177 1201 m_cpt_write_cost = 0; 1178 1202 m_cpt_ll_local = 0; … … 1253 1277 m_cpt_ncc_to_cc_write = 0; 1254 1278 m_cpt_ncc_to_cc = 0; 1279 1280 m_cpt_heap_min_slot_available = m_heap_size; 1281 m_cpt_heap_slot_available = m_heap_size; 1282 1255 1283 return; 1256 1284 } … … 1360 1388 #endif 1361 1389 // checking segmentation violation 1362 addr_t address = p_vci_tgt.address.read(); 1363 uint32_t plen = p_vci_tgt.plen.read(); 1364 bool found = false; 1365 bool config = false; 1366 1367 for (size_t seg_id = 0; (seg_id < m_nseg) && !found; seg_id++) 1390 addr_t address = p_vci_tgt.address.read(); 1391 uint32_t plen = p_vci_tgt.plen.read(); 1392 bool config = false; 1393 1394 for (size_t seg_id = 0; (seg_id < m_nseg) ; seg_id++) 1368 1395 { 1369 1396 if (m_seg[seg_id]->contains(address) && 1370 1397 m_seg[seg_id]->contains(address + plen - vci_param_int::B) ) 1371 1398 { 1372 found = true;1373 1399 if ( m_seg[seg_id]->special() ) config = true; 1374 1400 } 1375 1401 } 1376 1402 1377 if (!found) /////////// out of segment error 1378 { 1379 r_tgt_cmd_fsm = TGT_CMD_ERROR; 1380 } 1381 else if ( config ) /////////// configuration command 1403 if (config) /////////// configuration command 1382 1404 { 1383 1405 if (!p_vci_tgt.eop.read()) r_tgt_cmd_fsm = TGT_CMD_ERROR; 1384 else 1406 else r_tgt_cmd_fsm = TGT_CMD_CONFIG; 1385 1407 } 1386 1408 else //////////// memory access … … 1404 1426 // ==> TYPE_WRITE = X100 with the TSAR encoding 1405 1427 // ==> mask = 0b0111 = 0x7 1406 assert((( p_vci_tgt.pktid.read() & 0x7) == 0x4 or (p_vci_tgt.pktid.read() == 0x0)) and1428 assert((((p_vci_tgt.pktid.read() & 0x7) == 0x4) or ((p_vci_tgt.pktid.read() & 0x7) == 0x0)) and 1407 1429 "The type specified in the pktid field is incompatible with the WRITE CMD"); 1408 1430 r_tgt_cmd_fsm = TGT_CMD_WRITE; … … 1620 1642 } 1621 1643 1644 // xram GET bus error registers 1645 case MEMC_RERROR: 1646 { 1647 need_rsp = true; 1648 error = 0; 1649 1650 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_WRITE) 1651 { 1652 switch (regr) 1653 { 1654 case MEMC_RERROR_IRQ_ENABLE: 1655 r_xram_rsp_rerror_irq_enable = 1656 (p_vci_tgt.wdata.read() != 0); 1657 1658 break; 1659 1660 default: 1661 error = 1; 1662 break; 1663 } 1664 } 1665 else if (p_vci_tgt.cmd.read() == vci_param_int::CMD_READ) 1666 { 1667 switch (regr) 1668 { 1669 case MEMC_RERROR_SRCID: 1670 rdata = (uint32_t) 1671 r_xram_rsp_rerror_rsrcid.read(); 1672 1673 break; 1674 1675 case MEMC_RERROR_ADDR_LO: 1676 rdata = (uint32_t) 1677 (r_xram_rsp_rerror_address.read()) & 1678 ((1ULL<<32)-1); 1679 1680 break; 1681 1682 case MEMC_RERROR_ADDR_HI: 1683 rdata = (uint32_t) 1684 (r_xram_rsp_rerror_address.read() >> 32) & 1685 ((1ULL<<32)-1); 1686 1687 break; 1688 1689 case MEMC_RERROR_IRQ_RESET: 1690 if (not r_xram_rsp_rerror_irq.read()) break; 1691 1692 r_xram_rsp_rerror_irq = false; 1693 1694 break; 1695 1696 case MEMC_RERROR_IRQ_ENABLE: 1697 rdata = (uint32_t) 1698 (r_xram_rsp_rerror_irq_enable.read()) ? 1 : 0; 1699 1700 break; 1701 1702 default: 1703 error = 1; 1704 break; 1705 } 1706 } 1707 else 1708 { 1709 error = 1; 1710 } 1711 1712 break; 1713 } 1714 1622 1715 //unknown function 1623 1716 default: … … 2100 2193 // is signaled by the CLEANUP FSM by decrementing the r_config_rsp_lines counter. 2101 2194 // The CONFIG INVAL response is sent only when the last line has been invalidated. 2195 // There is no PUT transaction to XRAM, even if the invalidated line is dirty... 2102 2196 // TODO : The target buffer address must be aligned on a cache line boundary. 2103 2197 // This constraint can be released, but it requires to make 2 PUT transactions … … 2559 2653 r_config_heap_next = entry.next; 2560 2654 if ( last_copy ) r_config_fsm = CONFIG_HEAP_LAST; 2655 2656 // <Activity counters> 2657 m_cpt_heap_slot_available++; 2658 // </Activity counters> 2561 2659 } 2562 2660 … … 2684 2782 { 2685 2783 r_read_ll_key = m_llsc_table.ll(m_cmd_read_addr_fifo.read()); 2686 /**//*std::cout << "MEMCACHE : from proc " << m_cmd_read_srcid_fifo.read()2687 << " | @ " << std::hex << m_cmd_read_addr_fifo.read()2688 << " | LL" << std::endl;*/2689 2784 r_read_ll_done = true; 2690 2785 } … … 2708 2803 { 2709 2804 r_read_coherent = entry.cache_coherent; 2710 if (entry.cache_coherent or (entry.count == 0))// or (entry.owner.srcid == m_cmd_read_srcid_fifo.read())) //hit on a WT line or the owner has no more copy (if LL, the owner must be invalidated even if he made the request) 2805 2806 // hit on a WT line or the owner has no more copy (if LL, the owner must be invalidated even if he made the request) 2807 if (entry.cache_coherent or (entry.count == 0))// or (entry.owner.srcid == m_cmd_read_srcid_fifo.read())) 2711 2808 { 2712 2809 // test if we need to register a new copy in the heap … … 2717 2814 else 2718 2815 { 2719 //std::cout << "is LL = " << ((m_cmd_read_pktid_fifo.read() & 0x7) == TYPE_LL) << std::endl;2720 //std::cout << "coherent = " << entry.cache_coherent << " | count = " << std::dec << entry.count << " | cached = " << cached_read << std::endl;2721 2816 r_read_fsm = READ_HEAP_REQ; 2722 2817 } … … 2755 2850 size_t index; 2756 2851 addr_t nline = m_nline[(addr_t)(m_cmd_read_addr_fifo.read())]; 2757 /*std::cout << "nline = " << std::dec << nline << std::endl2758 << "inval en cours sur la ligne = " << m_upt.search_inval(nline, index) << std::endl2759 << "UPT full = " << m_upt.is_full() << std::endl2760 << "CC_SEND req = " << r_read_to_cc_send_req.read() << std::endl2761 << "CLENAUP req = " <<r_read_to_cleanup_req.read() << std::endl;*/2762 2852 if(m_ivt.search_inval(nline, index) or m_ivt.is_full() or r_read_to_cc_send_req.read() or r_read_to_cleanup_req.read()) //Check pending inval 2763 2853 { … … 2782 2872 r_read_to_cleanup_nline = nline; 2783 2873 r_read_to_cleanup_srcid = m_cmd_read_srcid_fifo.read(); 2874 r_read_to_cleanup_inst = ((m_cmd_read_pktid_fifo.read() & 0x2) != 0); 2784 2875 r_read_to_cleanup_length = m_cmd_read_length_fifo.read(); 2785 2876 r_read_to_cleanup_first_word = m_x[(addr_t) m_cmd_read_addr_fifo.read()]; … … 2788 2879 r_read_to_cleanup_is_ll= ((m_cmd_read_pktid_fifo.read() & 0x7) == TYPE_LL); 2789 2880 r_read_to_cleanup_ll_key = r_read_ll_key.read(); 2790 //std::cout << "cleanup req (read) on line " << nline << " /on proc " << r_read_copy.read() << std::endl;2791 2881 2792 2882 m_ivt.set(false, // it's an inval transaction … … 2807 2897 { 2808 2898 std::cout 2809 << " <MEMC " << name() << " READ_IVT_LOCK>" 2899 << " <MEMC " << name() << " READ_IVT_LOCK>" 2900 << std::hex 2810 2901 << " Inval req on an NCC line" 2902 << " | owner = " << r_read_copy.read() 2903 << " | nline = " << nline 2904 << std::dec 2811 2905 << std::endl; 2812 2906 } … … 2861 2955 DirectoryEntry entry; 2862 2956 entry.valid = true; 2863 entry.cache_coherent = r_read_coherent.read() or inst_read or (!(cached_read)) or (r_read_copy.read() != m_cmd_read_srcid_fifo.read()); 2864 r_read_coherent = r_read_coherent.read() or inst_read or (!(cached_read)) or (r_read_copy.read() != m_cmd_read_srcid_fifo.read()); 2957 //entry.cache_coherent = r_read_coherent.read() or inst_read or (!(cached_read)) or (r_read_copy.read() != m_cmd_read_srcid_fifo.read()); 2958 //r_read_coherent = r_read_coherent.read() or inst_read or (!(cached_read)) or (r_read_copy.read() != m_cmd_read_srcid_fifo.read()); 2959 2960 entry.cache_coherent = r_read_coherent.read() or inst_read or (!(cached_read)); 2961 r_read_coherent = r_read_coherent.read() or inst_read or (!(cached_read)); 2962 2865 2963 entry.is_cnt = is_cnt; 2866 2964 entry.dirty = r_read_dirty.read(); … … 2984 3082 else // switching to counter mode 2985 3083 { 2986 if(r_read_count.read() > 1) // heap must be cleared3084 if(r_read_count.read() > 1) // heap must be cleared 2987 3085 { 2988 3086 HeapEntry next_entry = m_heap.read(r_read_ptr.read()); … … 3043 3141 m_heap.write_free_entry(heap_entry); 3044 3142 m_heap.write_free_ptr(r_read_next_ptr.read()); 3045 if(r_read_last_free.read()) m_heap.set_full(); 3143 3144 if(r_read_last_free.read()) { 3145 m_heap.set_full(); 3146 } 3147 3148 // <Activity counters> 3149 m_cpt_heap_slot_available--; 3150 // </Activity counters> 3046 3151 3047 3152 r_read_fsm = READ_RSP; … … 3107 3212 m_heap.write(r_read_ptr.read(),last_entry); 3108 3213 r_read_fsm = READ_RSP; 3214 3215 // <Activity counters> 3216 m_cpt_heap_slot_available = m_cpt_heap_slot_available + (r_read_count.read() - 1); 3217 // </Activity counters> 3109 3218 } 3110 3219 else … … 3125 3234 r_read_to_tgt_rsp_length = m_cmd_read_length_fifo.read(); 3126 3235 r_read_to_tgt_rsp_srcid = m_cmd_read_srcid_fifo.read(); 3127 /*RWT*/ 3128 //BUG pktid 3236 3129 3237 if (r_read_coherent.read()) 3130 3238 { 3131 3239 r_read_to_tgt_rsp_pktid = 0x0 + m_cmd_read_pktid_fifo.read(); 3132 //std::cout << "READ RSP COHERENT on word" << std::hex << m_x[(addr_t) m_cmd_read_addr_fifo.read()] << std::dec << std::endl;3133 3240 } 3134 3241 else … … 3442 3549 r_write_coherent = entry.cache_coherent; 3443 3550 3551 if((entry.cache_coherent == false) and (entry.count != 0)) 3552 { 3553 m_cpt_write_ncc_miss++; 3554 } 3555 3444 3556 if (entry.cache_coherent or (entry.owner.srcid == r_write_srcid.read()) or (entry.count == 0)) // hit WT 3445 3557 { … … 3462 3574 { 3463 3575 r_write_fsm = WRITE_IVT_LOCK_HIT_WB; 3464 // if(r_write_pktid.read() == TYPE_SC)3465 // {3466 // r_write_sc_fail = true;3467 // }3468 3576 } 3469 3577 } … … 3500 3608 addr_t nline = m_nline[(addr_t)(r_write_address.read())]; 3501 3609 3502 //std::cout << "WRITE on NCC on line" << std::hex << nline << std::dec << std::endl;3503 3610 //if there is a matched updt req, we should wait until it is over. Because 3504 3611 //we need the lastest updt data. … … 3508 3615 3509 3616 if( not match_inval and 3617 not m_ivt.is_full() and 3510 3618 not r_write_to_cc_send_req.read() and 3511 3619 not r_write_to_cc_send_multi_req.read() and … … 3533 3641 if(m_debug) 3534 3642 { 3535 std::cout << " <MEMC " << name() << " WRITE_IVT_LOCK_HIT_WB> get access to the UPT: "3643 std::cout << " <MEMC " << name() << " WRITE_IVT_LOCK_HIT_WB> get access to the IVT: " 3536 3644 << " Inval requested = " << (not match_inval and not r_write_to_cc_send_req.read()) 3537 3645 << std::endl; … … 4808 4916 r_ixr_rsp_trt_index = p_vci_ixr.rtrdid.read(); 4809 4917 4810 assert( ((p_vci_ixr.rerror.read() & 0x1) == 0) and 4811 "MEMC ERROR in IXR_RSP state: XRAM response error !"); 4812 4813 if(p_vci_ixr.reop.read()) // PUT 4918 if (p_vci_ixr.reop.read() and not 4919 p_vci_ixr.rerror.read()) // PUT 4814 4920 { 4815 4921 r_ixr_rsp_fsm = IXR_RSP_TRT_ERASE; … … 4836 4942 } 4837 4943 4838 ////////////////////////4839 case IXR_RSP_TRT_ERASE: 4840 // decrease the line counter if config request4944 /////////////////////// 4945 case IXR_RSP_TRT_ERASE: // erase the entry in the TRT 4946 // decrease the line counter if config request 4841 4947 { 4842 4948 if(r_alloc_trt_fsm.read() == ALLOC_TRT_IXR_RSP) … … 4846 4952 { 4847 4953 config_rsp_lines_ixr_rsp_decr = true; 4848 m_trt.erase(index); 4849 r_ixr_rsp_fsm = IXR_RSP_IDLE; 4850 } 4851 else // not a config transaction 4852 { 4853 m_trt.erase(index); 4854 r_ixr_rsp_fsm = IXR_RSP_IDLE; 4855 } 4954 } 4955 m_trt.erase(index); 4956 r_ixr_rsp_fsm = IXR_RSP_IDLE; 4856 4957 4857 4958 #if DEBUG_MEMC_IXR_RSP … … 4872 4973 bool eop = p_vci_ixr.reop.read(); 4873 4974 wide_data_t data = p_vci_ixr.rdata.read(); 4874 bool error= ((p_vci_ixr.rerror.read() & 0x1) == 1);4875 4876 assert(((eop == (word == (m_words-2))) or error) and4975 bool rerror = ((p_vci_ixr.rerror.read() & 0x1) == 1); 4976 4977 assert(((eop == (word == (m_words-2))) or rerror) and 4877 4978 "MEMC ERROR in IXR_RSP_TRT_READ state : invalid response from XRAM"); 4878 4979 4879 m_trt.write_rsp( index, 4880 word, 4881 data ); 4980 m_trt.write_rsp( index, word, data, rerror ); 4882 4981 4883 4982 r_ixr_rsp_cpt = word + 2; … … 5009 5108 r_xram_rsp_victim_is_cnt = victim.is_cnt; 5010 5109 r_xram_rsp_victim_inval = inval ; 5011 r_xram_rsp_victim_dirty = victim.dirty or (!victim.cache_coherent && (victim.count == 1)); //a NCC line is by default considered as dirty in the L1: we must take a reservation on a TRT entry 5012 5013 if( not r_xram_rsp_trt_buf.rerror ) r_xram_rsp_fsm = XRAM_RSP_IVT_LOCK; 5014 else r_xram_rsp_fsm = XRAM_RSP_ERROR_ERASE; 5110 // a NCC line is by default considered as dirty in the L1: we must take a reservation on a TRT entry 5111 r_xram_rsp_victim_dirty = victim.dirty or (!victim.cache_coherent && (victim.count == 1)); 5112 5113 5114 // A line that undergoes a change in its state (ncc to cc), should not be evicted from the memory cache. 5115 if((victim.tag * m_sets + set) == r_read_to_cleanup_nline.read() and r_read_to_cleanup_req.read()) 5116 { 5117 r_xram_rsp_fsm = XRAM_RSP_INVAL_WAIT; 5118 5119 #if DEBUG_MEMC_XRAM_RSP 5120 if(m_debug) 5121 std::cout << " <MEMC " << name() << " XRAM_RSP_TRT_COPY>" 5122 << " Victim line is in ncc to cc mecanism" 5123 << " / nline = " << std::hex << (victim.tag * m_sets + set) 5124 << std::endl; 5125 #endif 5126 } 5127 else if( not r_xram_rsp_trt_buf.rerror ) 5128 { 5129 r_xram_rsp_fsm = XRAM_RSP_IVT_LOCK; 5130 } 5131 else 5132 { 5133 r_xram_rsp_fsm = XRAM_RSP_ERROR_ERASE; 5134 } 5015 5135 5016 5136 #if DEBUG_MEMC_XRAM_RSP … … 5195 5315 #endif 5196 5316 5197 // If the victim is not dirty (RWT: if it is not coherent, we can not know wether it is dirty or not), we don't need another XRAM put transaction, 5198 // and we can erase the TRT entry 5317 // If the victim is not dirty (RWT: if it is not coherent, 5318 // we can not know wether it is dirty or not), we don't 5319 // need another XRAM put transaction, and we can erase the 5320 // TRT entry 5199 5321 if(!r_xram_rsp_victim_dirty.read() and (r_xram_rsp_victim_coherent.read() or (r_xram_rsp_victim_count.read() == 0))) m_trt.erase(r_xram_rsp_trt_index.read()); 5200 5322 5201 5323 // Next state 5202 if(r_xram_rsp_victim_dirty.read() or (!r_xram_rsp_victim_coherent.read() and (r_xram_rsp_victim_count.read() == 1))) 5324 if(r_xram_rsp_victim_dirty.read() or (!r_xram_rsp_victim_coherent.read() and (r_xram_rsp_victim_count.read() == 1))) r_xram_rsp_fsm = XRAM_RSP_TRT_DIRTY; 5203 5325 else if(r_xram_rsp_trt_buf.proc_read) r_xram_rsp_fsm = XRAM_RSP_DIR_RSP; 5204 5326 else if(r_xram_rsp_victim_inval.read()) r_xram_rsp_fsm = XRAM_RSP_INVAL; … … 5235 5357 #endif 5236 5358 5237 // if( not r_xram_rsp_victim_coherent )5238 // std::cout << "a victim coherent not sent trt index =" << r_xram_rsp_trt_index.read() << std::endl;5239 5359 if(r_xram_rsp_trt_buf.proc_read) r_xram_rsp_fsm = XRAM_RSP_DIR_RSP; 5240 5360 else if(r_xram_rsp_victim_inval.read()) r_xram_rsp_fsm = XRAM_RSP_INVAL; … … 5311 5431 else r_xram_rsp_fsm = XRAM_RSP_IDLE; 5312 5432 5313 // std::cout << "cleanup sent for trt index =" << r_xram_rsp_trt_index.read() << std::endl;5314 5433 #if DEBUG_MEMC_XRAM_RSP 5315 5434 if(m_debug) … … 5373 5492 HeapEntry entry = m_heap.read(r_xram_rsp_next_ptr.read()); 5374 5493 5375 xram_rsp_to_cc_send_fifo_srcid 5494 xram_rsp_to_cc_send_fifo_srcid = entry.owner.srcid; 5376 5495 xram_rsp_to_cc_send_fifo_inst = entry.owner.inst; 5377 5496 xram_rsp_to_cc_send_fifo_put = true; … … 5387 5506 { 5388 5507 r_xram_rsp_fsm = XRAM_RSP_HEAP_ERASE; 5508 5389 5509 } 5390 5510 } … … 5431 5551 m_heap.write(r_xram_rsp_next_ptr.read(),last_entry); 5432 5552 5553 // <Activity counters> 5554 m_cpt_heap_slot_available = m_cpt_heap_slot_available + (r_xram_rsp_victim_count.read() - 1); 5555 // </Activity counters> 5556 5433 5557 r_xram_rsp_fsm = XRAM_RSP_IDLE; 5434 5558 … … 5446 5570 5447 5571 // Next state 5448 if(r_xram_rsp_trt_buf.proc_read) r_xram_rsp_fsm = XRAM_RSP_ERROR_RSP; 5449 else r_xram_rsp_fsm = XRAM_RSP_IDLE; 5572 if (r_xram_rsp_trt_buf.proc_read) 5573 { 5574 r_xram_rsp_fsm = XRAM_RSP_ERROR_RSP; 5575 } 5576 else 5577 { 5578 // Trigger an interruption to signal a bus error from 5579 // the XRAM because a processor WRITE MISS (XRAM GET 5580 // transaction and not processor read). 5581 // 5582 // To avoid deadlocks we do not wait an error to be 5583 // acknowledged before signaling another one. 5584 // Therefore, when there is an active error, and other 5585 // errors arrive, these are not considered 5586 5587 if (!r_xram_rsp_rerror_irq.read() && r_xram_rsp_rerror_irq_enable.read() 5588 && r_xram_rsp_trt_buf.xram_read ) 5589 { 5590 r_xram_rsp_rerror_irq = true; 5591 r_xram_rsp_rerror_address = r_xram_rsp_trt_buf.nline * m_words * 4; 5592 r_xram_rsp_rerror_rsrcid = r_xram_rsp_trt_buf.srcid; 5450 5593 5451 5594 #if DEBUG_MEMC_XRAM_RSP 5452 if(m_debug) 5595 if (m_debug) 5596 std::cout 5597 << " <MEMC " << name() << " XRAM_RSP_ERROR_ERASE>" 5598 << " Triggering interrupt to signal WRITE MISS bus error" 5599 << " / irq_enable = " << r_xram_rsp_rerror_irq_enable.read() 5600 << " / nline = " << r_xram_rsp_trt_buf.nline 5601 << " / rsrcid = " << r_xram_rsp_trt_buf.srcid 5602 << std::endl; 5603 #endif 5604 } 5605 5606 r_xram_rsp_fsm = XRAM_RSP_IDLE; 5607 } 5608 5609 #if DEBUG_MEMC_XRAM_RSP 5610 if (m_debug) 5453 5611 std::cout << " <MEMC " << name() << " XRAM_RSP_ERROR_ERASE>" 5454 5612 << " Error reported by XRAM / erase the TRT entry" << std::endl; … … 5572 5730 DspinDhccpParam::dspin_get(flit, DspinDhccpParam::CLEANUP_NLINE_LSB); 5573 5731 5574 //A MODIFIER POUR DIRTY //5575 5732 bool eop = 5576 5733 DspinDhccpParam::dspin_get(flit, DspinDhccpParam::P2M_EOP) == 0x1; 5734 5577 5735 if (! eop) 5578 5736 { … … 5643 5801 5644 5802 r_cleanup_fsm = CLEANUP_DIR_LOCK; 5645 //std::cout << " MEM_CACHE : CLEANUP_DIR_REQ" << std::endl;5646 5803 5647 5804 #if DEBUG_MEMC_CLEANUP … … 5668 5825 exit(0); 5669 5826 } 5670 //std::cout << " MEM_CACHE : CLEANUP_DIR_LOCK" << std::endl;5671 5827 5672 5828 // Read the directory … … 5709 5865 } 5710 5866 } 5711 else // miss : check UPT for a pending invalidation transaction5867 else // miss : check IVT for a pending invalidation transaction 5712 5868 { 5713 5869 r_cleanup_fsm = CLEANUP_IVT_LOCK; … … 5769 5925 /*RWT*/ 5770 5926 bool inval_request = (r_read_to_cleanup_req.read() and (r_cleanup_nline.read() == r_read_to_cleanup_nline.read())) // NCC to CC initiated by a read transaction 5771 or (r_write_to_cleanup_req.read() and (r_cleanup_nline.read() == r_write_to_cleanup_nline.read())); //NCC to CC initiated by a wrtie transaction5927 or (r_write_to_cleanup_req.read() and (r_cleanup_nline.read() == r_write_to_cleanup_nline.read())); // NCC to CC initiated by a write transaction 5772 5928 5773 5929 … … 5794 5950 if (r_read_to_cleanup_cached_read.read()) 5795 5951 { 5796 entry.count 5797 entry.owner.srcid 5798 entry.owner.inst = 0;5952 entry.count = r_cleanup_count.read(); 5953 entry.owner.srcid = r_read_to_cleanup_srcid.read(); 5954 entry.owner.inst = r_read_to_cleanup_inst.read(); 5799 5955 } 5800 5956 else 5801 5957 { 5802 entry.count 5803 entry.owner.srcid 5804 entry.owner.inst 5958 entry.count = r_cleanup_count.read() - 1; 5959 entry.owner.srcid = r_cleanup_copy.read(); 5960 entry.owner.inst = r_cleanup_copy_inst.read(); 5805 5961 } 5806 5962 if (r_read_to_cleanup_is_ll.read()) … … 5811 5967 else 5812 5968 { 5813 entry.count = r_cleanup_count.read() - 1; 5814 entry.owner.srcid = 0; 5815 entry.owner.inst = 0; 5969 entry.count = r_cleanup_count.read() - 1; 5970 entry.owner.srcid = 0; 5971 entry.owner.inst = 0; 5972 5973 #if REVERT_CC_MECANISM 5974 // Revert CC to NCC if : 5975 // - no more copy in L1 caches 5976 // - this line is not in counter mode (broadcast) 5977 // - this line is not in NCC to CC mecanism 5978 if (((r_cleanup_count.read() - 1) == 0) and (r_cleanup_is_cnt == false) and (inval_request == false)) 5979 { 5980 entry.cache_coherent = false; 5981 } 5982 #endif 5983 5984 #if REVERT_BC_MECANISM 5985 if ((r_cleanup_count.read() - 1) == 0) 5986 { 5987 entry.is_cnt = false; 5988 } 5989 #endif 5990 5816 5991 } 5817 5992 … … 5852 6027 << " / is_cnt = " << entry.is_cnt 5853 6028 << " / match_inval = " << inval_request 6029 << " / is_coherent = " << entry.cache_coherent 6030 << std::dec 5854 6031 << std::endl; 5855 6032 } … … 5861 6038 case CLEANUP_IVT_LOCK_DATA://RWT 5862 6039 { 5863 //Search for a matching inval in the UPT (there must be one) and check if there is a pending read.6040 //Search for a matching inval in the IVT (there must be one) and check if there is a pending read. 5864 6041 if(r_alloc_ivt_fsm.read() == ALLOC_IVT_CLEANUP) 5865 6042 { … … 5877 6054 r_cleanup_fsm = CLEANUP_IVT_CLEAR_DATA; 5878 6055 } 5879 #if DEBUG_M C_CLEANUP6056 #if DEBUG_MEMC_CLEANUP 5880 6057 if (m_debug) 5881 6058 { … … 5902 6079 r_cleanup_fsm = CLEANUP_SEND_CLACK; 5903 6080 } 5904 #if DEBUG_M C_CLEANUP6081 #if DEBUG_MEMC_CLEANUP 5905 6082 if (m_debug) 5906 6083 { 5907 6084 std::cout 5908 6085 << " <MEMC " << name() 5909 << " CLEANUP_IVT_CLEAR_DATA> clear UPT entry"6086 << " CLEANUP_IVT_CLEAR_DATA> clear IVT entry" 5910 6087 << std::endl; 5911 6088 } … … 5922 6099 r_cleanup_to_tgt_rsp_srcid = r_cleanup_read_srcid.read(); 5923 6100 r_cleanup_to_tgt_rsp_trdid = r_cleanup_read_trdid.read(); 5924 r_cleanup_to_tgt_rsp_pktid = 0x0 + r_cleanup_read_pktid.read();// WT6101 r_cleanup_to_tgt_rsp_pktid = 0x0 + r_cleanup_read_pktid.read();//RWT 5925 6102 r_cleanup_to_tgt_rsp_type = 0; //Read instruction 5926 6103 r_cleanup_to_tgt_rsp_length = r_read_to_cleanup_length.read(); … … 5945 6122 r_cleanup_fsm = CLEANUP_SEND_CLACK; 5946 6123 5947 #if DEBUG_M C_CLEANUP6124 #if DEBUG_MEMC_CLEANUP 5948 6125 if (m_debug) 5949 6126 { … … 6197 6374 m_heap.write_free_ptr(r_cleanup_next_ptr.read()); 6198 6375 m_heap.unset_full(); 6376 6377 // <Activity counters> 6378 m_cpt_heap_slot_available++; 6379 // </Activity counters> 6199 6380 6200 6381 r_cleanup_fsm = CLEANUP_SEND_CLACK; … … 6322 6503 if(r_cleanup_to_tgt_rsp_req.read()) break; 6323 6504 6505 assert ( (r_cleanup_ncc.read() == false) and 6506 "CLEANUP_WRITE_RSP : Cleanup on NCC line invalid in " 6507 "MEM_CACHE with write_rsp needed. STRANGE BEHAVIOUR"); 6324 6508 // no pending request 6325 6509 r_cleanup_to_tgt_rsp_req = true; … … 6385 6569 data_vector); 6386 6570 } 6387 //std::cout << "cleanup with a non coherent ligne in trt index = " << index << std::endl;6388 6571 r_cleanup_to_ixr_cmd_srcid = r_cleanup_srcid.read(); 6389 6572 r_cleanup_to_ixr_cmd_index = index; … … 7242 7425 // 7243 7426 // It implements a round-robin priority between the four possible client FSMs 7244 // XRAM_RSP > CAS > WRITE > CONFIG7427 // XRAM_RSP > CAS > READ > WRITE > CONFIG 7245 7428 // 7246 7429 // Each FSM can request the next services: … … 7369 7552 break; 7370 7553 } 7371 // WRITE7554 // READ 7372 7555 if(r_read_to_cc_send_req.read()) 7373 7556 { … … 7375 7558 break; 7376 7559 } 7377 7560 // WRITE 7378 7561 if(r_write_to_cc_send_req.read()) 7379 7562 { … … 7395 7578 } 7396 7579 /////////////////////////// 7397 case CC_SEND_XRAM_RSP_IDLE: // CAS FSM has highest priority 7398 { 7580 case CC_SEND_READ_IDLE: 7581 { 7582 // WRITE 7583 if(r_write_to_cc_send_req.read()) 7584 { 7585 r_cc_send_fsm = CC_SEND_WRITE_NCC_INVAL_HEADER; 7586 break; 7587 } 7588 if(m_write_to_cc_send_inst_fifo.rok() or 7589 r_write_to_cc_send_multi_req.read()) 7590 { 7591 r_cc_send_fsm = CC_SEND_WRITE_UPDT_HEADER; 7592 break; 7593 } 7594 if(r_write_to_cc_send_brdcast_req.read()) 7595 { 7596 r_cc_send_fsm = CC_SEND_WRITE_BRDCAST_HEADER; 7597 break; 7598 } 7599 // CONFIG 7600 if(r_config_to_cc_send_multi_req.read()) 7601 { 7602 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_HEADER; 7603 break; 7604 } 7605 if(r_config_to_cc_send_brdcast_req.read()) 7606 { 7607 r_cc_send_fsm = CC_SEND_CONFIG_BRDCAST_HEADER; 7608 break; 7609 } 7610 // XRAM_RSP 7611 if(m_xram_rsp_to_cc_send_inst_fifo.rok() or 7612 r_xram_rsp_to_cc_send_multi_req.read()) 7613 { 7614 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_HEADER; 7615 break; 7616 } 7617 if(r_xram_rsp_to_cc_send_brdcast_req.read()) 7618 { 7619 r_cc_send_fsm = CC_SEND_XRAM_RSP_BRDCAST_HEADER; 7620 break; 7621 } 7399 7622 // CAS 7400 7623 if(m_cas_to_cc_send_inst_fifo.rok() or … … 7409 7632 break; 7410 7633 } 7411 7634 // READ 7412 7635 if(r_read_to_cc_send_req.read()) 7413 7636 { … … 7415 7638 break; 7416 7639 } 7417 7418 if(r_write_to_cc_send_req.read()) 7419 { 7420 r_cc_send_fsm = CC_SEND_WRITE_NCC_INVAL_HEADER; 7640 break; 7641 7642 } 7643 /////////////////////////// 7644 case CC_SEND_XRAM_RSP_IDLE: // CAS FSM has highest priority 7645 { 7646 // CAS 7647 if(m_cas_to_cc_send_inst_fifo.rok() or 7648 r_cas_to_cc_send_multi_req.read()) 7649 { 7650 r_cc_send_fsm = CC_SEND_CAS_UPDT_HEADER; 7421 7651 break; 7422 7652 } 7423 7424 7425 // WRITE 7653 if(r_cas_to_cc_send_brdcast_req.read()) 7654 { 7655 r_cc_send_fsm = CC_SEND_CAS_BRDCAST_HEADER; 7656 break; 7657 } 7658 7659 // READ 7426 7660 if(r_read_to_cc_send_req.read()) 7427 7661 { … … 7430 7664 } 7431 7665 7666 // WRITE 7432 7667 if(r_write_to_cc_send_req.read()) 7433 7668 { … … 7473 7708 } 7474 7709 ////////////////////// 7475 case CC_SEND_CAS_IDLE: // CLEANUP FSM has highest priority 7476 { 7477 7710 case CC_SEND_CAS_IDLE: // READ FSM has highest priority 7711 { 7712 7713 // READ 7478 7714 if(r_read_to_cc_send_req.read()) 7479 7715 { … … 7481 7717 break; 7482 7718 } 7483 7719 // WRITE 7484 7720 if(r_write_to_cc_send_req.read()) 7485 7721 { … … 7488 7724 } 7489 7725 7490 7491 7726 if(m_write_to_cc_send_inst_fifo.rok() or 7492 7727 r_write_to_cc_send_multi_req.read()) … … 7511 7746 break; 7512 7747 } 7748 // XRAM RSP 7513 7749 if(m_xram_rsp_to_cc_send_inst_fifo.rok() or 7514 7750 r_xram_rsp_to_cc_send_multi_req.read()) … … 7522 7758 break; 7523 7759 } 7760 // CAS 7524 7761 if(m_cas_to_cc_send_inst_fifo.rok() or 7525 7762 r_cas_to_cc_send_multi_req.read()) … … 7683 7920 7684 7921 r_read_to_cc_send_req = false; 7685 r_cc_send_fsm = CC_SEND_ WRITE_IDLE;7922 r_cc_send_fsm = CC_SEND_READ_IDLE; 7686 7923 7687 7924 #if DEBUG_MEMC_CC_SEND … … 7691 7928 << " <MEMC " << name() 7692 7929 << " CC_SEND_READ_NCC_INVAL_HEADER> Inval for line " 7693 << r_read_to_cc_send_nline.read()7930 << std::hex <<r_read_to_cc_send_nline.read() << std::dec 7694 7931 << std::endl; 7695 7932 } … … 7720 7957 << " <MEMC " << name() 7721 7958 << " CC_SEND_WRITE_NCC_INVAL_HEADER> Inval for line " 7722 << r_write_to_cc_send_nline.read()7959 << std::hex << r_write_to_cc_send_nline.read() << std::dec 7723 7960 << std::endl; 7724 7961 } … … 8369 8606 } 8370 8607 ///////////////////// 8371 case TGT_RSP_CLEANUP: // pas clair pour moi (AG)8608 case TGT_RSP_CLEANUP: 8372 8609 { 8373 8610 if(p_vci_tgt.rspack) … … 9616 9853 } 9617 9854 } 9618 //m_cc_receive_to_cleanup_fifo.update( cc_receive_to_cleanup_fifo_get,9619 // cc_receive_to_cleanup_fifo_put,9620 // p_dspin_p2m.data.read() );9621 9855 9622 9856 //////////////////////////////////////////////////////////////////////////////////// … … 9679 9913 r_config_rsp_lines = r_config_rsp_lines.read() - 1; 9680 9914 } 9915 9916 //////////////////////////////////////////////////////////////////////////////////// 9917 // Update min m_cpt_heap_min_slot_available. 9918 // The four sources of (increment / decrement) are READ / CLEANUP / XRAM_RSP / CONFIG FSMs 9919 //////////////////////////////////////////////////////////////////////////////////// 9920 assert((m_cpt_heap_slot_available <= m_heap_size) and "m_cpt_heap_slot_available > m_heap_size"); 9921 assert((m_cpt_heap_min_slot_available <= m_heap_size) and "m_cpt_heap_min_slot_available > m_heap_size"); 9922 m_cpt_heap_min_slot_available = min_value(m_cpt_heap_min_slot_available, m_cpt_heap_slot_available); 9681 9923 9682 9924 } // end transition() … … 9759 10001 p_vci_ixr.cmd = vci_param_ext::CMD_WRITE; 9760 10002 p_vci_ixr.cmdval = true; 9761 /*p_vci_ixr.address = (addr_t)((r_cleanup_to_ixr_cmd_nline.read() * m_words +9762 r_ixr_cmd_word.read()) * 4);*/9763 10003 p_vci_ixr.address = (addr_t)r_ixr_cmd_address.read() + (r_ixr_cmd_word.read()<<2); 9764 10004 p_vci_ixr.wdata = ((wide_data_t)(r_ixr_cmd_wdata[r_ixr_cmd_word.read()].read()) | … … 9988 10228 9989 10229 //////////////////////////////////////////////////////////////////// 10230 // p_irq port 10231 // 10232 // WRITE MISS response error signaling 10233 //////////////////////////////////////////////////////////////////// 10234 10235 p_irq = 10236 r_xram_rsp_rerror_irq.read() && 10237 r_xram_rsp_rerror_irq_enable.read(); 10238 10239 //////////////////////////////////////////////////////////////////// 9990 10240 // p_dspin_m2p port (CC_SEND FSM) 9991 10241 //////////////////////////////////////////////////////////////////// … … 10026 10276 DspinDhccpParam::MULTI_INVAL_DEST); 10027 10277 10028 DspinDhccpParam::dspin_set( flit,10029 m_cc_global_id,10030 DspinDhccpParam::MULTI_INVAL_SRCID);10031 10032 10278 // MODIFIED FOR CONFIG INVAL (solution 1 bit in flit multi_inval) 10033 10279 DspinDhccpParam::dspin_set( flit, … … 10082 10328 10083 10329 DspinDhccpParam::dspin_set( flit, 10084 m_cc_global_id,10085 DspinDhccpParam::MULTI_INVAL_SRCID);10086 10087 DspinDhccpParam::dspin_set( flit,10088 10330 r_xram_rsp_to_cc_send_trdid.read(), 10089 10331 DspinDhccpParam::MULTI_INVAL_UPDT_INDEX); … … 10119 10361 m_broadcast_boundaries, 10120 10362 DspinDhccpParam::BROADCAST_BOX); 10121 // MODIFIED FOR CONFIG INVAL (solution 1 bit in flit multi_inval)10363 10122 10364 DspinDhccpParam::dspin_set( flit, 10123 10365 1, 10124 10366 DspinDhccpParam::MULTI_INVAL_IS_CONFIG); 10125 10126 DspinDhccpParam::dspin_set( flit,10127 m_cc_global_id,10128 DspinDhccpParam::BROADCAST_SRCID);10129 10367 10130 10368 DspinDhccpParam::dspin_set( flit, … … 10145 10383 m_broadcast_boundaries, 10146 10384 DspinDhccpParam::BROADCAST_BOX); 10147 10148 DspinDhccpParam::dspin_set( flit,10149 m_cc_global_id,10150 DspinDhccpParam::BROADCAST_SRCID);10151 10385 10152 10386 DspinDhccpParam::dspin_set( flit, … … 10204 10438 DspinDhccpParam::dspin_set( 10205 10439 flit, 10206 m_cc_global_id,10207 DspinDhccpParam::MULTI_INVAL_SRCID);10208 10209 DspinDhccpParam::dspin_set(10210 flit,10211 10440 DspinDhccpParam::TYPE_MULTI_INVAL_DATA, 10212 10441 DspinDhccpParam::M2P_TYPE); … … 10246 10475 r_write_to_cc_send_dest.read(), 10247 10476 DspinDhccpParam::MULTI_INVAL_DEST); 10248 10249 DspinDhccpParam::dspin_set(10250 flit,10251 m_cc_global_id,10252 DspinDhccpParam::MULTI_INVAL_SRCID);10253 10477 10254 10478 DspinDhccpParam::dspin_set( … … 10333 10557 DspinDhccpParam::dspin_set( 10334 10558 flit, 10335 m_cc_global_id,10336 DspinDhccpParam::MULTI_UPDT_SRCID);10337 10338 DspinDhccpParam::dspin_set(10339 flit,10340 10559 r_write_to_cc_send_trdid.read(), 10341 10560 DspinDhccpParam::MULTI_UPDT_UPDT_INDEX); … … 10423 10642 dest, 10424 10643 DspinDhccpParam::MULTI_UPDT_DEST); 10425 10426 DspinDhccpParam::dspin_set(10427 flit,10428 m_cc_global_id,10429 DspinDhccpParam::MULTI_UPDT_SRCID);10430 10644 10431 10645 DspinDhccpParam::dspin_set( - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.