Ignore:
Timestamp:
Jul 19, 2013, 4:52:06 PM (11 years ago)
Author:
cfuguet
Message:

Modification in vci_cc_vcache_wrapper:

  • Optimization in DCACHE/ICACHE CC_CHECK state. If pending request to CC_SEND, we wait in the CC_CHECK state. Doing this, during the wait, we can handle incoming CLACK avoiding any deadlock situation.

The states CC_UPDT and CC_INVAL do not need to test anymore if
there is a pending request to CC_SEND.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/v5/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r462 r463  
    19001900        }
    19011901
     1902        // wait if pending request to CC_SEND. This way if there are pending
     1903        // CLACK they can be treated in this state and then a deadlock
     1904        // situation is avoided
     1905        if ( r_icache_cc_send_req.read() ) break;
     1906
    19021907        // CC request handler
    19031908
     
    19551960    case ICACHE_CC_INVAL:       // hit inval : switch slot to ZOMBI state
    19561961    {
    1957         // return to CC_CHECK if pending request to CC_SEND
    1958         // to handle possible pending CLACK and avoid deadlock
    1959         if (r_icache_cc_send_req.read())
    1960         {
    1961             r_icache_fsm = ICACHE_CC_CHECK;
    1962             break;
    1963         }
     1962        assert (not r_icache_cc_send_req.read() &&
     1963                "ERROR in ICACHE_CC_INVAL: the r_icache_cc_send_req "
     1964                "must not be set");
    19641965
    19651966#ifdef INSTRUMENTATION
     
    19961997    case ICACHE_CC_UPDT:        // hit update : write one word per cycle
    19971998    {
    1998 
    1999         // if pending request to CC_SEND or if the CC_UPDT data is not ready to
    2000         // handle possible pending CLACK and avoid deadlock
    2001         if ( r_icache_cc_send_req.read() )
    2002         {
    2003             r_icache_fsm = ICACHE_CC_CHECK;
    2004             break;
    2005         }
     1999        assert (not r_icache_cc_send_req.read() &&
     2000                "ERROR in ICACHE_CC_UPDT: the r_icache_cc_send_req "
     2001                "must not be set");
    20062002
    20072003        if ( not r_cc_receive_updt_fifo_be.rok() ) break;
     
    46574653        }
    46584654
     4655        // wait if pending request to CC_SEND. This way if there are pending
     4656        // CLACK they can be treated in this state and then a deadlock
     4657        // situation is avoided
     4658        if ( r_dcache_cc_send_req.read() ) break;
     4659
    46594660        // CC request handler
    46604661       
     
    47544755        }
    47554756
    4756         // return to CC_CHECK if pending request to CC_SEND
    4757         // to handle possible pending CLACK and avoid deadlock
    4758         if ( r_dcache_cc_send_req.read() )
    4759         {
    4760             r_dcache_fsm = DCACHE_CC_CHECK;
    4761             break;
    4762         }
     4757        assert (not r_dcache_cc_send_req.read() &&
     4758                "ERROR in DCACHE_CC_INVAL: the r_dcache_cc_send_req "
     4759                "must not be set");
    47634760
    47644761        // Switch slot state to ZOMBI and send CLEANUP command
     
    48214818        }
    48224819
    4823         // if pending request to CC_SEND or if the CC_UPDT data is not ready to
    4824         // handle possible pending CLACK and avoid deadlock
    4825         if ( r_dcache_cc_send_req.read() )
    4826         {
    4827             r_dcache_fsm = DCACHE_CC_CHECK;
    4828             break;
    4829         }
     4820        assert (not r_dcache_cc_send_req.read() &&
     4821                "ERROR in DCACHE_CC_INVAL: the r_dcache_cc_send_req "
     4822                "must not be set");
    48304823       
    48314824        if ( not r_cc_receive_updt_fifo_be.rok() ) break;
Note: See TracChangeset for help on using the changeset viewer.