Changeset 6
- Timestamp:
- Mar 30, 2010, 10:23:25 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp
r5 r6 34 34 //#define DEBUG_VCI_MEM_CACHE 1 35 35 #define RANDOMIZE_SC 36 #define NCYCLES -1 36 37 namespace soclib { namespace caba { 37 38 … … 579 580 580 581 #if DEBUG_VCI_MEM_CACHE 582 if(m_cpt_cycles > NCYCLES){ 581 583 std::cout << "---------------------------------------------" << std::dec << std::endl; 582 584 std::cout << "MEM_CACHE " << m_srcid_ini << " ; Time = " << m_cpt_cycles << std::endl … … 596 598 << " - ALLOC_UPT FSM = " << alloc_upt_fsm_str[r_alloc_upt_fsm] << std::endl 597 599 << " - ALLOC_HEAP FSM = " << alloc_heap_fsm_str[r_alloc_heap_fsm] << std::endl; 600 } 598 601 #endif 599 602 … … 2509 2512 if(!hit_inval) { 2510 2513 #ifdef DEBUG_VCI_MEM_CACHE 2514 if(m_cpt_total_cycles > NCYCLES) 2511 2515 std::cout << "MEM_CACHE WARNING: cleanup with no corresponding entry at address : " << std::hex << (r_cleanup_nline.read()*4*m_words) << std::dec << std::endl; 2512 2516 #endif … … 2704 2708 r_llsc_fsm = SC_TRT_LOCK; 2705 2709 } else { 2706 r_llsc_fsm = SC_UPT_LOCK; 2710 if( !r_llsc_to_init_cmd_multi_req.read() && 2711 !r_llsc_to_init_cmd_brdcast_req.read() ) 2712 r_llsc_fsm = SC_UPT_LOCK; 2713 else 2714 r_llsc_fsm = SC_WAIT; 2707 2715 } 2708 2716 } else { … … 2722 2730 size_t word = m_x[(vci_addr_t)(m_cmd_llsc_addr_fifo.read())]; 2723 2731 2724 if(!r_llsc_count.read()){ // no update 2725 // write data in cache 2726 m_cache_data[way][set][word] = r_llsc_wdata.read(); 2727 if(r_llsc_cpt.read()==4) 2728 m_cache_data[way][set][word+1] = m_cmd_llsc_wdata_fifo.read(); 2729 } 2732 m_cache_data[way][set][word] = r_llsc_wdata.read(); 2733 if(r_llsc_cpt.read()==4) 2734 m_cache_data[way][set][word+1] = m_cmd_llsc_wdata_fifo.read(); 2730 2735 2731 if(r_llsc_count.read()) { // Shared line 2732 #ifdef LOCK_DEBUG 2733 std::cout << "SC, shared line" << std::endl; 2734 #endif 2735 2736 if( !r_llsc_to_init_cmd_multi_req.read() && 2737 !r_llsc_to_init_cmd_brdcast_req.read() ) 2738 r_llsc_fsm = SC_UPT_LOCK; 2739 else 2740 r_llsc_fsm = SC_WAIT; 2741 } else { 2742 r_llsc_fsm = SC_RSP_TRUE; 2743 } 2736 r_llsc_fsm = SC_RSP_TRUE; 2744 2737 break; 2745 2738 }
Note: See TracChangeset
for help on using the changeset viewer.