Changeset 134 for trunk/modules/vci_mem_cache_v4/caba/source/src
- Timestamp:
- Jan 24, 2011, 5:36:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp
r116 r134 33 33 //#define DDEBUG // Directory debug 34 34 //#define LOCK_DEBUG // Lock debug 35 //#define DEBUG_VCI_MEM_CACHE 1 36 #define DEBUG_START_CYCLE 875000035 #define DEBUG_VCI_MEM_CACHE 0 36 #define DEBUG_START_CYCLE 200000 37 37 #define RANDOMIZE_SC 38 39 #if DEBUG_VCI_MEM_CACHE 40 # define PRINTF(msg...) do { if (m_cpt_cycles > DEBUG_START_CYCLE) printf(msg); } while (0); 41 #else 42 # define PRINTF(msg...) 43 #endif 44 38 45 namespace soclib { namespace caba { 39 46 … … 641 648 { 642 649 if ( p_vci_tgt.cmdval ) { 650 651 PRINTF(" * <TGT> Request from %d at address %llx\n",(uint32_t)p_vci_tgt.srcid.read(),(uint64_t)p_vci_tgt.address.read()); 652 643 653 assert( (p_vci_tgt.srcid.read() < m_initiators) && 644 654 "VCI_MEM_CACHE error in direct request : received SRCID is larger than the number of initiators"); … … 653 663 } 654 664 } 655 656 665 657 666 if ( !reached ) … … 666 675 r_tgt_cmd_fsm = TGT_CMD_READ; 667 676 } 668 else if (( p_vci_tgt.cmd.read() == vci_param::CMD_WRITE ) && ( p_vci_tgt.trdid.read() == 0x0 )) 677 // else if (( p_vci_tgt.cmd.read() == vci_param::CMD_WRITE ) && ( p_vci_tgt.trdid.read() == 0x0 )) 678 else if ( p_vci_tgt.cmd.read() == vci_param::CMD_WRITE ) 669 679 { 670 680 r_tgt_cmd_fsm = TGT_CMD_WRITE; … … 838 848 //////////////////////////////////////////////////////////////////////////////////// 839 849 850 PRINTF(" * TOP : Request from %d at address %llx\n",(uint32_t)m_cmd_read_srcid_fifo.read(),(uint64_t)m_cmd_read_addr_fifo.read()); 851 840 852 switch ( r_read_fsm.read() ) { 841 853 … … 844 856 { 845 857 if (m_cmd_read_addr_fifo.rok()) { 858 PRINTF(" * <READ> Request from %d at address %llx\n",(uint32_t)m_cmd_read_srcid_fifo.read(),(uint64_t)m_cmd_read_addr_fifo.read()); 859 846 860 m_cpt_read++; 847 861 r_read_fsm = READ_DIR_LOCK; … … 2591 2605 hit_inval = m_update_tab.search_inval(r_cleanup_nline.read(),index); 2592 2606 if(!hit_inval) { 2593 #if defDEBUG_VCI_MEM_CACHE2607 #if DEBUG_VCI_MEM_CACHE 2594 2608 if(m_cpt_cycles > DEBUG_START_CYCLE) 2595 2609 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;
Note: See TracChangeset
for help on using the changeset viewer.