Ignore:
Timestamp:
Mar 28, 2011, 6:46:33 PM (13 years ago)
Author:
kane
Message:

fix bug in ccxcachev4, save cpu_info in memcachev4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_cc_xcache_wrapper_v4/caba/source/include/vci_cc_xcache_wrapper_v4.h

    r140 r143  
    4343
    4444/*
    45  * CC_XCACHE_WRAPPER_SELECT_VICTIM :
    46  *   The selection and the update of cache (after a read miss)
    47  *   are separated in two step
    48  *   Also, the cleanup can be send in parallel at the read miss.
    49  *
    5045 * CC_XCACHE_WRAPPER_FIFO_RSP
    5146 *   Two simple fifo (each 2x32 depth) receive the cache line from
    5247 *   RAM. Instead of two buffers (m_icache_words and m_dcache_words)
     48 *    1     - nb_icache+nb_dcache simple fifo
     49 *    2     - 2 simple fifo
     50 *    else  - two buffers  (m_icache_words and m_dcache_words)
    5351 *   
    5452 * CC_XCACHE_WRAPPER_CC_UPDATE_MULTI_CYCLE
     
    6765 * CC_XCACHE_WRAPPER_VCI_CMD_PRIORITY
    6866 *   Write buffer access is conditionnal with dcache_miss_req and icache_miss_req
    69  *     1    - two access authorized
    70  *     2    - one access with static priority (dcache prior)
    71  *     3    - one access with static priority (icache prior)
    72  *     4    - one access with round robin priority
     67 *     1    - one access with static priority (dcache prior)
     68 *     2    - one access with static priority (icache prior)
     69 *     3    - one access with round robin priority
     70 *     4    - two access authorized
    7371 *
    7472 * CC_XCACHE_WRAPPER_MULTI_CACHE :
     
    9593
    9694// implementation
    97 #ifndef CC_XCACHE_WRAPPER_SELECT_VICTIM
    98 #define CC_XCACHE_WRAPPER_SELECT_VICTIM               1
    99 #endif
    10095#ifndef CC_XCACHE_WRAPPER_FIFO_RSP
    10196#define CC_XCACHE_WRAPPER_FIFO_RSP                    1
     
    111106#endif
    112107#ifndef CC_XCACHE_WRAPPER_VCI_CMD_PRIORITY
    113 #define CC_XCACHE_WRAPPER_VCI_CMD_PRIORITY            4
     108#define CC_XCACHE_WRAPPER_VCI_CMD_PRIORITY            3
    114109#endif 
    115110#ifndef CC_XCACHE_WRAPPER_MULTI_CACHE
    116111#define CC_XCACHE_WRAPPER_MULTI_CACHE                 2
    117 #endif 
     112// if multi_cache :
     113// <tsar toplevel>/modules/vci_mem_cache_v4/caba/source/include/mem_cache_directory_v4.h : L1_MULTI_CACHE 1
     114// <soclib toplevel>/soclib/lib/multi_write_buffer/include/multi_write_buffer.h          : CC_XCACHE_MULTI_CACHE 1
     115#endif
     116 
    118117// debugging
     118#ifndef CC_XCACHE_WRAPPER_VERBOSE
     119#define CC_XCACHE_WRAPPER_VERBOSE                     1
     120#endif
    119121#ifndef CC_XCACHE_WRAPPER_STOP_SIMULATION
    120122#define CC_XCACHE_WRAPPER_STOP_SIMULATION             1
     
    124126#endif
    125127#ifndef CC_XCACHE_WRAPPER_DEBUG_CYCLE_MIN
    126 #define CC_XCACHE_WRAPPER_DEBUG_CYCLE_MIN             949900
     128#define CC_XCACHE_WRAPPER_DEBUG_CYCLE_MIN             1500
    127129#endif
    128130#ifndef CC_XCACHE_WRAPPER_DEBUG_FILE_TRANSACTION
     
    158160        DCACHE_IDLE,
    159161        DCACHE_WRITE_UPDT,
    160 #if CC_XCACHE_WRAPPER_SELECT_VICTIM
    161162        DCACHE_MISS_VICTIM,
    162 #endif
    163163        DCACHE_MISS_WAIT,
    164164        DCACHE_MISS_UPDT,
     
    176176    enum icache_fsm_state_e {
    177177        ICACHE_IDLE,
    178 #if CC_XCACHE_WRAPPER_SELECT_VICTIM
    179178        ICACHE_MISS_VICTIM,
    180 #endif
    181179        ICACHE_MISS_WAIT,
    182180        ICACHE_MISS_UPDT,
     
    341339    sc_signal<bool>       * r_vci_rsp_data_error; //[m_nb_dcache]
    342340
    343 #if CC_XCACHE_WRAPPER_FIFO_RSP
     341#if   (CC_XCACHE_WRAPPER_FIFO_RSP==1)
    344342    std::queue<data_t>    * r_icache_miss_buf;    //[m_nb_icache]
    345343    std::queue<data_t>    * r_dcache_miss_buf;    //[m_nb_dcache]
     344#elif (CC_XCACHE_WRAPPER_FIFO_RSP==2)
     345    typedef struct
     346    {
     347        data_t   data;
     348        uint32_t num_cache;
     349    } miss_buf_t;
     350
     351    std::queue<miss_buf_t>  r_icache_miss_buf;
     352    std::queue<miss_buf_t>  r_dcache_miss_buf;
    346353#else
    347354    bool                 ** r_icache_miss_val;    //[m_nb_icache][m_icache_words]
Note: See TracChangeset for help on using the changeset viewer.