Ignore:
Timestamp:
Jan 28, 2013, 1:59:32 PM (11 years ago)
Author:
joannou
Message:

Introducing new generic_llsc_local_table and generic_llsc_global_table components :
These two tables implement the new scalable LL/SC mechanism for TSAR.

  • generic_llsc_local_table, integrated in the vci_cc_vache_wrapper_v4 component. The table is accessed by the DCACHE_FSM. A two step registration (LL cmd/ LL rsp) sets a signature allocated by the global table for the pending LL/SC operation. An SC operation consumes the registration.
  • generic_llsc_global_table, integrated in the vci_mem_cache_v4 component. The table is accessed by the READ_FSM, WRITE_FSM, CAS_FSM, when accessing the directory. It generates a signature for LL registrations and performs SC operation by checking registration's valididty with that signature. SW operations simply invalidate a registrations.

N.B. :

  • The sizes of the tables are parameters, and are NOT a function of the architecture's size (scalable mechanism).
  • The LL are handled by the MEMCACHE in the READ_FSM.
  • The SC are handled by the MEMCACHE in the WRITE_FSM, and are no longer CAS emulated. CAS operation is now only performed by hardware mechanisms.
  • An extra field is added to the xram transaction table to save a pending LL's signature.
Location:
trunk/modules/vci_mem_cache_v4/caba/source/include
Files:
2 edited

Legend:

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

    r289 r291  
    5454#include "mapping_table.h"
    5555#include "int_tab.h"
     56#include "generic_llsc_global_table.h"
    5657#include "mem_cache_directory_v4.h"
    5758#include "xram_transaction_v4.h"
     
    422423      CacheData       m_cache_data;       // data array[set][way][word]
    423424      HeapDirectory   m_heap;             // heap for copies
     425      GenericLLSCGlobalTable
     426      <
     427        32  ,   // desired number of slots
     428        4096,   // number of processors in the system
     429        8000,   // registratioçn life span (in # of LL operations)
     430        typename vci_param::fast_addr_t // address type
     431      >
     432      m_llsc_table;       // ll/sc global registration table
    424433
    425434      // adress masks
     
    491500      sc_signal<size_t>   r_read_next_ptr;   // Next entry to point to
    492501      sc_signal<bool>     r_read_last_free;  // Last free entry
     502      sc_signal<typename vci_param::fast_addr_t>
     503                          r_read_ll_key;     // LL key returned by the llsc_global_table
    493504
    494505      // Buffer between READ fsm and IXR_CMD fsm (ask a missing cache line to XRAM)
     
    505516      sc_signal<size_t>   r_read_to_tgt_rsp_word;   // first word of the response
    506517      sc_signal<size_t>   r_read_to_tgt_rsp_length; // length of the response
     518      sc_signal<typename vci_param::fast_addr_t>
     519                          r_read_to_tgt_rsp_ll_key; // LL key returned by the llsc_global_table
    507520
    508521      ///////////////////////////////////////////////////////////////
     
    533546      sc_signal<size_t>   r_write_trt_index;  // index in Transaction Table
    534547      sc_signal<size_t>   r_write_upt_index;  // index in Update Table
     548      sc_signal<bool>     r_write_sc_fail;    // sc command failed
     549      sc_signal<bool>     r_write_pending_sc; // sc command pending in WRITE fsm
    535550
    536551      // Buffer between WRITE fsm and TGT_RSP fsm (acknowledge a write command from L1)
    537       sc_signal<bool>     r_write_to_tgt_rsp_req;   // valid request
    538       sc_signal<size_t>   r_write_to_tgt_rsp_srcid; // transaction srcid
    539       sc_signal<size_t>   r_write_to_tgt_rsp_trdid; // transaction trdid
    540       sc_signal<size_t>   r_write_to_tgt_rsp_pktid; // transaction pktid
     552      sc_signal<bool>     r_write_to_tgt_rsp_req;     // valid request
     553      sc_signal<size_t>   r_write_to_tgt_rsp_srcid;   // transaction srcid
     554      sc_signal<size_t>   r_write_to_tgt_rsp_trdid;   // transaction trdid
     555      sc_signal<size_t>   r_write_to_tgt_rsp_pktid;   // transaction pktid
     556      sc_signal<bool>     r_write_to_tgt_rsp_sc_fail; // sc command failed
    541557
    542558      // Buffer between WRITE fsm and IXR_CMD fsm (ask a missing cache line to XRAM)
     
    721737      sc_signal<size_t>   r_xram_rsp_to_tgt_rsp_length; // length of the response
    722738      sc_signal<bool>     r_xram_rsp_to_tgt_rsp_rerror; // send error to requester
     739      sc_signal<typename vci_param::fast_addr_t>
     740                          r_xram_rsp_to_tgt_rsp_ll_key; // LL key returned by the llsc_global_table
    723741
    724742      // Buffer between XRAM_RSP fsm and INIT_CMD fsm (Inval L1 Caches)
  • trunk/modules/vci_mem_cache_v4/caba/source/include/xram_transaction_v4.h

    r253 r291  
    3232    std::vector<be_t>   wdata_be;       // be for each data in the write buffer
    3333    bool                rerror;         // error returned by xram
     34    data_t              ll_key;         // LL key returned by the llsc_global_table
    3435
    3536    /////////////////////////////////////////////////////////////////////
     
    127128        wdata.assign(source.wdata.begin(),source.wdata.end()); 
    128129        rerror      = source.rerror;
     130        ll_key      = source.ll_key;
    129131    }
    130132
     
    325327    // - data : the data to write (in case of write)
    326328    // - data_be : the mask of the data to write (in case of write)
     329    // - ll_key  : the ll key (if any) returned by the llsc_global_table
    327330    /////////////////////////////////////////////////////////////////////
    328331    void set(const size_t index,
     
    336339            const size_t word_index,
    337340            const std::vector<be_t> &data_be,
    338             const std::vector<data_t> &data)
     341            const std::vector<data_t> &data,
     342            const data_t ll_key = 0)
    339343    {
    340344        assert( (index < size_tab)
     
    354358        tab[index].read_length      = read_length;
    355359        tab[index].word_index       = word_index;
     360        tab[index].ll_key           = ll_key;
    356361        for(size_t i=0; i<tab[index].wdata.size(); i++)
    357362        {
Note: See TracChangeset for help on using the changeset viewer.