Changeset 673 for branches


Ignore:
Timestamp:
Apr 9, 2014, 12:18:00 AM (10 years ago)
Author:
haoliu
Message:

MESI Bug fixed in vci_mem_cache component

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MESI/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp

    r671 r673  
    30993099                        r_read_ll_done  = true;
    31003100                    }
     3101
     3102                    bool s_getm_hit         = m_cmd_read_pktid_fifo.read() & 0x8;
     3103
    31013104                    r_read_is_cnt           = entry.is_cnt;
    31023105                    r_read_dirty            = entry.dirty;
     
    31203123                        {
    31213124                                // Invalid the line in the others processors and put the line in trt with data.
    3122                                 if( entry.count == 0 or ((entry.count == 1) and (entry.state == ENTRY_SHARED) and (entry.owner.srcid == m_cmd_read_srcid_fifo.read())))
     3125                                if( (entry.count == 0) or
     3126                                    ((entry.count == 1) and not entry.is_cnt and (entry.state == ENTRY_SHARED) and (entry.owner.srcid == m_cmd_read_srcid_fifo.read())) or
     3127                                    (entry.count == 1 and entry.is_cnt and entry.state == ENTRY_SHARED and s_getm_hit))
    31233128                                {
    31243129                                    r_read_fsm = READ_DIR_HIT;
     
    36223627                        entry.lock   = r_read_lock.read();
    36233628                        entry.count  = r_read_count.read() + 1;
    3624                    
    3625                         r_read_shared = true;
    3626 
     3629
     3630                        r_read_shared = true;  //ack to cache L1 with shared state
     3631   
    36273632                        if(not go_cnt)         // Not entering counter mode
    36283633                        {
     
    50785083                    if( not r_write_to_ixr_cmd_req.read() )
    50795084                    {
     5085                        if((r_write_state.read() == ENTRY_EXCLUSIVE) and (r_write_count.read() == 1))
     5086                        {
     5087                            std::cout << "can't send a trt req when the line state is exlusive"<< std::endl;
     5088                            exit(0);
     5089                        }
     5090 
    50805091                        r_write_to_ixr_cmd_req     = true;
    50815092                        r_write_to_ixr_cmd_index   = r_write_trt_index.read();
     
    60606071                    if ( not r_xram_rsp_to_ixr_cmd_req.read() )
    60616072                    {
     6073                        if((r_xram_rsp_victim_state.read() == ENTRY_EXCLUSIVE) and (r_xram_rsp_victim_count.read() == 1))
     6074                        {
     6075                            std::cout << "can't send a trt req when the line state is exlusive" << std::endl;
     6076                            exit(0);
     6077                        }
    60626078                        r_xram_rsp_to_ixr_cmd_req = true;
    60636079                        r_xram_rsp_to_ixr_cmd_index = r_xram_rsp_trt_index.read();
     
    72187234                            r_cleanup_to_ixr_cmd_req     = true;
    72197235
    7220                             if( (r_write_to_cleanup_req == true) and (r_write_to_cleanup_nline == r_cleanup_nline.read()) )
     7236                            if( (r_write_to_cleanup_req == true) and (r_write_to_cleanup_nline.read() == r_cleanup_nline.read()) )
    72217237                            {
    72227238                                r_write_to_cleanup_req   = false;
Note: See TracChangeset for help on using the changeset viewer.