Ignore:
Timestamp:
Jul 26, 2013, 5:03:12 PM (11 years ago)
Author:
lgarcia
Message:

Reintroducing RWT branch merging the last modifications of the
trunk (CLACK channel)
WARNING: bugs remaining (with 1c16p and small caches (L2:16*16; L1:4*4))

Location:
branches/RWT
Files:
2 added
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/RWT/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h

    r468 r477  
    131131        CC_SEND_XRAM_RSP_INVAL_HEADER,
    132132        CC_SEND_XRAM_RSP_INVAL_NLINE,
     133        CC_SEND_READ_NCC_INVAL_HEADER,
     134        CC_SEND_READ_NCC_INVAL_NLINE,
     135        CC_SEND_WRITE_NCC_INVAL_HEADER,
     136        CC_SEND_WRITE_NCC_INVAL_NLINE,
    133137        CC_SEND_WRITE_BRDCAST_HEADER,
    134138        CC_SEND_WRITE_BRDCAST_NLINE,
     
    178182        READ_DIR_REQ,
    179183        READ_DIR_LOCK,
     184        READ_IVT_LOCK,
     185        READ_WAIT,
    180186        READ_DIR_HIT,
    181187        READ_HEAP_REQ,
     
    197203        WRITE_DIR_REQ,
    198204        WRITE_DIR_LOCK,
     205        WRITE_IVT_LOCK_HIT_WB,
    199206        WRITE_DIR_READ,
    200207        WRITE_DIR_HIT,
     
    205212        WRITE_UPT_DEC,
    206213        WRITE_RSP,
     214        WRITE_MISS_IVT_LOCK,
    207215        WRITE_MISS_TRT_LOCK,
    208216        WRITE_MISS_TRT_DATA,
     
    253261        IXR_CMD_CAS_IDLE,
    254262        IXR_CMD_XRAM_IDLE,
     263        IXR_CMD_CLEANUP_IDLE,
    255264        IXR_CMD_READ,
    256265        IXR_CMD_WRITE,
    257266        IXR_CMD_CAS,
    258         IXR_CMD_XRAM
     267        IXR_CMD_XRAM,
     268        IXR_CMD_CLEANUP_DATA
    259269      };
    260270
     
    290300        CLEANUP_IDLE,
    291301        CLEANUP_GET_NLINE,
     302        CLEANUP_GET_DATA,
    292303        CLEANUP_DIR_REQ,
    293304        CLEANUP_DIR_LOCK,
    294305        CLEANUP_DIR_WRITE,
     306        CLEANUP_IVT_LOCK_DATA,
     307        CLEANUP_IVT_CLEAR_DATA,
     308        CLEANUP_READ_RSP,
    295309        CLEANUP_HEAP_REQ,
    296310        CLEANUP_HEAP_LOCK,
     
    302316        CLEANUP_IVT_CLEAR,
    303317        CLEANUP_WRITE_RSP,
     318        CLEANUP_IXR_REQ,
     319        CLEANUP_WAIT,
    304320        CLEANUP_CONFIG_ACK,
    305321        CLEANUP_SEND_CLACK
     
    325341        ALLOC_TRT_CAS,
    326342        ALLOC_TRT_XRAM_RSP,
    327         ALLOC_TRT_IXR_RSP
     343        ALLOC_TRT_IXR_RSP,
     344        ALLOC_TRT_CLEANUP
    328345      };
    329346
     
    340357      {
    341358        ALLOC_IVT_WRITE,
     359        ALLOC_IVT_READ,
    342360        ALLOC_IVT_XRAM_RSP,
    343361        ALLOC_IVT_CLEANUP,
     
    434452      uint32_t     m_cpt_sc;            // Number of SC transactions
    435453      uint32_t     m_cpt_cas;           // Number of CAS transactions
     454     
     455      uint32_t     m_cpt_read_fsm_dir_lock;        // wait DIR LOCK
     456      uint32_t     m_cpt_read_fsm_n_dir_lock;      // NB DIR LOCK
     457      uint32_t     m_cpt_write_fsm_dir_lock;       // wait DIR LOCK
     458      uint32_t     m_cpt_write_fsm_n_dir_lock;     // NB DIR LOCK
     459      uint32_t     m_cpt_xram_rsp_fsm_dir_lock;    // wait DIR LOCK
     460      uint32_t     m_cpt_xram_rsp_fsm_n_dir_lock;  // NB DIR LOCK
     461      uint32_t     m_cpt_cas_fsm_dir_lock;         // wait DIR LOCK
     462      uint32_t     m_cpt_cas_fsm_n_dir_lock;       // NB DIR LOCK
     463      uint32_t     m_cpt_cleanup_fsm_dir_lock;     // wait DIR LOCK
     464      uint32_t     m_cpt_cleanup_fsm_n_dir_lock;   // NB DIR LOCK
     465     
     466      uint32_t     m_cpt_dir_unused;            // NB cycles DIR LOCK unused
     467      uint32_t     m_cpt_read_fsm_dir_used;     // NB cycles DIR LOCK used
     468      uint32_t     m_cpt_write_fsm_dir_used;    // NB cycles DIR LOCK used
     469      uint32_t     m_cpt_cas_fsm_dir_used;      // NB cycles DIR LOCK used
     470      uint32_t     m_cpt_xram_rsp_fsm_dir_used; // NB cycles DIR LOCK used
     471      uint32_t     m_cpt_cleanup_fsm_dir_used;  // NB cycles DIR LOCK used
     472
     473      uint32_t     m_cpt_read_fsm_trt_lock;      // wait TRT LOCK
     474      uint32_t     m_cpt_write_fsm_trt_lock;     // wait TRT LOCK
     475      uint32_t     m_cpt_cas_fsm_trt_lock;       // wait TRT LOCK
     476      uint32_t     m_cpt_xram_rsp_fsm_trt_lock;  // wait TRT LOCK
     477      uint32_t     m_cpt_ixr_fsm_trt_lock;       // wait TRT LOCK
     478     
     479      uint32_t     m_cpt_read_fsm_n_trt_lock;      // NB TRT LOCK
     480      uint32_t     m_cpt_write_fsm_n_trt_lock;     // NB TRT LOCK
     481      uint32_t     m_cpt_cas_fsm_n_trt_lock;       // NB TRT LOCK
     482      uint32_t     m_cpt_xram_rsp_fsm_n_trt_lock;  // NB TRT LOCK
     483      uint32_t     m_cpt_ixr_fsm_n_trt_lock;       // NB TRT LOCK
     484
     485      uint32_t     m_cpt_read_fsm_trt_used;      // NB cycles TRT LOCK used
     486      uint32_t     m_cpt_write_fsm_trt_used;     // NB cycles TRT LOCK used
     487      uint32_t     m_cpt_cas_fsm_trt_used;       // NB cycles TRT LOCK used
     488      uint32_t     m_cpt_xram_rsp_fsm_trt_used;  // NB cycles TRT LOCK used
     489      uint32_t     m_cpt_ixr_fsm_trt_used;       // NB cycles TRT LOCK used
     490     
     491      uint32_t     m_cpt_trt_unused;            // NB cycles TRT LOCK unused
     492
     493      uint32_t     m_cpt_write_fsm_upt_lock;     // wait UPT LOCK
     494      uint32_t     m_cpt_xram_rsp_fsm_upt_lock;  // wait UPT LOCK
     495      uint32_t     m_cpt_multi_ack_fsm_upt_lock; // wait UPT LOCK
     496      uint32_t     m_cpt_cleanup_fsm_ivt_lock;   // wait UPT LOCK
     497      uint32_t     m_cpt_cas_fsm_upt_lock;       // wait UPT LOCK
     498     
     499      uint32_t     m_cpt_write_fsm_n_upt_lock;     // NB UPT LOCK
     500      uint32_t     m_cpt_xram_rsp_fsm_n_upt_lock;  // NB UPT LOCK
     501      uint32_t     m_cpt_multi_ack_fsm_n_upt_lock; // NB UPT LOCK
     502      uint32_t     m_cpt_cleanup_fsm_n_upt_lock;   // NB UPT LOCK
     503      uint32_t     m_cpt_cas_fsm_n_upt_lock;       // NB UPT LOCK
     504     
     505      uint32_t     m_cpt_write_fsm_upt_used;     // NB cycles UPT LOCK used
     506      uint32_t     m_cpt_xram_rsp_fsm_upt_used;  // NB cycles UPT LOCK used
     507      uint32_t     m_cpt_multi_ack_fsm_upt_used; // NB cycles UPT LOCK used
     508      uint32_t     m_cpt_cleanup_fsm_ivt_used;   // NB cycles UPT LOCK used
     509      uint32_t     m_cpt_cas_fsm_upt_used;       // NB cycles UPT LOCK used
     510     
     511      uint32_t     m_cpt_ivt_unused;            // NB cycles UPT LOCK unused
     512      uint32_t     m_cpt_upt_unused;            // NB cycles UPT LOCK unused
     513
     514      uint32_t     m_cpt_read_fsm_heap_lock;     // wait HEAP LOCK
     515      uint32_t     m_cpt_write_fsm_heap_lock;    // wait HEAP LOCK
     516      uint32_t     m_cpt_cas_fsm_heap_lock;      // wait HEAP LOCK
     517      uint32_t     m_cpt_cleanup_fsm_heap_lock;  // wait HEAP LOCK
     518      uint32_t     m_cpt_xram_rsp_fsm_heap_lock; // wait HEAP LOCK
     519     
     520      uint32_t     m_cpt_read_fsm_n_heap_lock;     // NB HEAP LOCK
     521      uint32_t     m_cpt_write_fsm_n_heap_lock;    // NB HEAP LOCK
     522      uint32_t     m_cpt_cas_fsm_n_heap_lock;      // NB HEAP LOCK
     523      uint32_t     m_cpt_cleanup_fsm_n_heap_lock;  // NB HEAP LOCK
     524      uint32_t     m_cpt_xram_rsp_fsm_n_heap_lock; // NB HEAP LOCK
     525     
     526      uint32_t     m_cpt_read_fsm_heap_used;     // NB cycles HEAP LOCK used
     527      uint32_t     m_cpt_write_fsm_heap_used;    // NB cycles HEAP LOCK used
     528      uint32_t     m_cpt_cas_fsm_heap_used;      // NB cycles HEAP LOCK used
     529      uint32_t     m_cpt_cleanup_fsm_heap_used;  // NB cycles HEAP LOCK used
     530      uint32_t     m_cpt_xram_rsp_fsm_heap_used; // NB cycles HEAP LOCK used
     531     
     532      uint32_t     m_cpt_heap_unused;            // NB cycles HEAP LOCK unused
     533
     534      //RWT
     535      uint32_t     m_cpt_cleanup_data;   
     536      uint32_t     m_cpt_ncc_to_cc_read;         // NB change from NCC to CC caused by a READ
     537      uint32_t     m_cpt_ncc_to_cc_write;        // NB change from NCC to CC caused by a WRITE
     538      uint32_t     m_cpt_ncc_to_cc;              // NB change from NCC to CC
     539
     540      uint32_t     m_cpt_read_data_unc;
     541      uint32_t     m_cpt_read_data_miss_CC;
     542      uint32_t     m_cpt_read_ins_unc;
     543      uint32_t     m_cpt_read_ins_miss;
     544      uint32_t     m_cpt_read_ll_CC;
     545      uint32_t     m_cpt_read_data_miss_NCC;
     546      uint32_t     m_cpt_read_ll_NCC;
     547      uint32_t     m_cpt_read_WTF;
    436548
    437549      uint32_t     m_cpt_cleanup_cost;  // Number of (flits * distance) for CLEANUPs
     
    481593      ~VciMemCache();
    482594
     595      void clear_stats();
    483596      void print_stats();
    484597      void print_trace();
     
    657770      sc_signal<addr_t>   r_read_to_tgt_rsp_ll_key; // LL key from the llsc_global_table
    658771
     772      //RWT: Buffer between READ fsm and CC_SEND fsm (send inval)
     773      sc_signal<bool>     r_read_to_cc_send_req;
     774      sc_signal<size_t>   r_read_to_cc_send_dest;
     775      sc_signal<addr_t>   r_read_to_cc_send_nline;
     776      sc_signal<bool>     r_read_to_cc_send_inst;
     777
     778      //RWT: Buffer between READ fsm and CLEANUP fsm (wait for the data coming from L1 cache)
     779      sc_signal<bool>     r_read_to_cleanup_req;    // valid request
     780      sc_signal<addr_t>   r_read_to_cleanup_nline;  // cache line index
     781      sc_signal<size_t>   r_read_to_cleanup_srcid;
     782      sc_signal<size_t>   r_read_to_cleanup_length;
     783      sc_signal<size_t>   r_read_to_cleanup_first_word;
     784      sc_signal<bool>     r_read_to_cleanup_cached_read;   
     785      sc_signal<bool>     r_read_to_cleanup_is_ll;
     786      sc_signal<addr_t>   r_read_to_cleanup_addr;
     787      sc_signal<addr_t>   r_read_to_cleanup_ll_key;
     788
     789      //RWT:
     790      sc_signal<bool>     r_read_coherent;          // State of the cache slot after transaction
     791      sc_signal<bool>     r_read_ll_done;
     792
    659793      ///////////////////////////////////////////////////////////////
    660794      // Registers controlled by the WRITE fsm
     
    721855      sc_signal<size_t>   r_write_to_multi_ack_upt_index; // index in update table
    722856
     857      // RWT: Buffer between WRITE fsm and CLEANUP fsm (change slot state)
     858      sc_signal<bool>     r_write_to_cleanup_req;         // valid request
     859      sc_signal<addr_t>   r_write_to_cleanup_nline;       // cache line index
     860
     861      // RWT
     862      sc_signal<bool>     r_write_coherent;               // cache slot state after transaction
     863
     864      //Buffer between WRITE fsm and CC_SEND fsm (INVAL for RWT)
     865      sc_signal<bool>     r_write_to_cc_send_req;
     866      sc_signal<size_t>   r_write_to_cc_send_dest;
     867
     868
    723869      /////////////////////////////////////////////////////////
    724870      // Registers controlled by MULTI_ACK fsm
     
    788934      sc_signal<size_t>   r_cleanup_to_tgt_rsp_trdid; // transaction trdid
    789935      sc_signal<size_t>   r_cleanup_to_tgt_rsp_pktid; // transaction pktid
     936      sc_signal<addr_t>     r_cleanup_to_tgt_rsp_ll_key;
     937
     938      //RWT
     939      sc_signal<size_t>   r_cleanup_read_srcid;
     940      sc_signal<size_t>   r_cleanup_read_trdid;
     941      sc_signal<size_t>   r_cleanup_read_pktid;
     942      sc_signal<bool>     r_cleanup_read_need_rsp;
     943      sc_signal<bool>     r_cleanup_to_tgt_rsp_type;
     944      sc_signal<data_t> * r_cleanup_to_tgt_rsp_data;
     945      sc_signal<size_t>   r_cleanup_to_tgt_rsp_length;
     946      sc_signal<size_t>   r_cleanup_to_tgt_rsp_first_word;
    790947
    791948      ///////////////////////////////////////////////////////
     
    813970      sc_signal<data_t> * r_cas_data;       // cache line data
    814971
     972      sc_signal<bool>     r_cas_coherent;
     973
    815974      // Buffer between CAS fsm and IXR_CMD fsm (XRAM write)
    816975      sc_signal<bool>     r_cas_to_ixr_cmd_req;   // valid request
     
    9061065      sc_signal<size_t>   r_xram_rsp_to_ixr_cmd_trdid; // index in transaction table
    9071066
     1067      //RWT
     1068      sc_signal<bool>     r_xram_rsp_victim_coherent;      // victim's cache slot state
     1069      sc_signal<bool>     r_xram_rsp_coherent;             // coherence of the read
    9081070      ////////////////////////////////////////////////////
    9091071      // Registers controlled by the IXR_CMD fsm
     
    9661128      sc_signal<int>      r_alloc_heap_fsm;
    9671129      sc_signal<unsigned> r_alloc_heap_reset_cpt;
     1130
     1131
     1132      ////////////////////////////////////////////////////
     1133      // REGISTERS FOR ODCCP
     1134      ////////////////////////////////////////////////////
     1135
     1136      sc_signal<uint32_t>  r_cleanup_data_index;
     1137      sc_signal<uint32_t>  r_cleanup_trdid;
     1138      sc_signal<uint32_t>  r_cleanup_pktid;
     1139      sc_signal<bool>      r_cleanup_coherent;
     1140      sc_signal<data_t>    *r_cleanup_data;
     1141      sc_signal<data_t>    *r_cleanup_old_data;
     1142      sc_signal<bool>      r_cleanup_contains_data;
     1143     
     1144      sc_signal<bool>      r_cleanup_ncc;
     1145      sc_signal<bool>      r_cleanup_to_ixr_cmd_ncc_l1_dirty;
     1146      sc_signal<bool>      r_xram_rsp_to_ixr_cmd_inval_ncc_pending;
     1147     
     1148      sc_signal<bool>      r_cleanup_to_ixr_cmd_req;
     1149      sc_signal<data_t>    *r_cleanup_to_ixr_cmd_data;
     1150      sc_signal<uint32_t>  r_cleanup_to_ixr_cmd_srcid;
     1151      sc_signal<uint32_t>  r_cleanup_to_ixr_cmd_trdid;
     1152      sc_signal<uint32_t>  r_cleanup_to_ixr_cmd_pktid;
     1153      sc_signal<addr_t>    r_cleanup_to_ixr_cmd_nline;
    9681154    }; // end class VciMemCache
    9691155
Note: See TracChangeset for help on using the changeset viewer.