Ignore:
Timestamp:
Jan 24, 2011, 5:36:50 PM (14 years ago)
Author:
kane
Message:

add multi write buffer in cc_xcache_v4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp

    r116 r134  
    3333//#define DDEBUG // Directory debug
    3434//#define LOCK_DEBUG // Lock debug
    35 //#define DEBUG_VCI_MEM_CACHE 1
    36 #define DEBUG_START_CYCLE 8750000
     35#define DEBUG_VCI_MEM_CACHE 0
     36#define DEBUG_START_CYCLE   200000
    3737#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
    3845namespace soclib { namespace caba {
    3946
     
    641648        {
    642649          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
    643653            assert( (p_vci_tgt.srcid.read() < m_initiators) &&
    644654            "VCI_MEM_CACHE error in direct request : received SRCID is larger than the number of initiators");
     
    653663              }
    654664            }
    655 
    656665
    657666            if ( !reached )
     
    666675              r_tgt_cmd_fsm = TGT_CMD_READ;
    667676            }
    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 )
    669679            { 
    670680              r_tgt_cmd_fsm = TGT_CMD_WRITE;
     
    838848    ////////////////////////////////////////////////////////////////////////////////////
    839849
     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
    840852    switch ( r_read_fsm.read() ) {
    841853
     
    844856        {
    845857          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
    846860            m_cpt_read++;
    847861            r_read_fsm = READ_DIR_LOCK;
     
    25912605            hit_inval = m_update_tab.search_inval(r_cleanup_nline.read(),index);
    25922606            if(!hit_inval) {
    2593 #ifdef DEBUG_VCI_MEM_CACHE
     2607#if DEBUG_VCI_MEM_CACHE
    25942608if(m_cpt_cycles > DEBUG_START_CYCLE)
    25952609              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.