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.
File:
1 edited

Legend:

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

    r284 r291  
    3737#include "generic_cache.h"
    3838#include "generic_cam.h"
     39#include "generic_llsc_local_table.h"
    3940#include "vci_initiator.h"
    4041#include "vci_target.h"
     
    6061
    6162    typedef typename vci_param::addr_t  paddr_t;
     63    typedef typename vci_param::data_t  vci_data_t;
    6264    typedef typename vci_param::be_t    vci_be_t;
    6365    typedef typename vci_param::srcid_t vci_srcid_t;
     
    124126        DCACHE_MISS_WAIT,           
    125127        DCACHE_MISS_UPDT,           
    126         // handling processor unc and sc requests
     128        // handling processor unc, ll and sc requests
    127129        DCACHE_UNC_WAIT,           
     130        DCACHE_LL_WAIT,           
    128131        DCACHE_SC_WAIT,           
    129132        // handling coherence requests
     
    142145        CMD_DATA_UNC,
    143146        CMD_DATA_WRITE,
     147        CMD_DATA_LL,
     148        CMD_DATA_SC,
    144149        CMD_DATA_CAS,
    145150    };
     
    151156        RSP_DATA_MISS,
    152157        RSP_DATA_UNC,
     158        RSP_DATA_LL,
    153159        RSP_DATA_WRITE,
    154160    };
     
    400406    sc_signal<bool>         r_dcache_vci_unc_req;       // uncacheable read request
    401407    sc_signal<bool>         r_dcache_vci_unc_be;        // uncacheable read byte enable
    402     sc_signal<bool>         r_dcache_vci_sc_req;        // atomic write request (Compare & swap)
    403     sc_signal<uint32_t>     r_dcache_vci_sc_old;        // previous data value for an atomic write
    404     sc_signal<uint32_t>     r_dcache_vci_sc_new;        // new data value for an atomic write
     408    sc_signal<bool>         r_dcache_vci_cas_req;       // atomic write request CAS
     409    sc_signal<uint32_t>     r_dcache_vci_cas_old;       // previous data value for an atomic write CAS
     410    sc_signal<uint32_t>     r_dcache_vci_cas_new;       // new data value for an atomic write CAS
     411    sc_signal<bool>         r_dcache_vci_ll_req;        // atomic read request LL
     412    sc_signal<bool>         r_dcache_vci_sc_req;        // atomic write request SC
     413    sc_signal<vci_data_t>   r_dcache_vci_sc_data;       // SC data (command)
    405414
    406415    // register used for XTN inval
     
    425434    // dcache flush handling
    426435    sc_signal<size_t>       r_dcache_flush_count;           // slot counter used for cache flush
     436
     437    // ll rsp handling
     438    sc_signal<size_t>       r_dcache_ll_rsp_count;          // flit counter used for ll rsp
     439
     440    // sc cmd handling
     441    sc_signal<vci_data_t>   r_sc_key;                   // SC key returned by local table
    427442
    428443    // used by the TLB miss sub-fsm
     
    438453    sc_signal<size_t>       r_dcache_tlb_set;               // selected set in tlb   
    439454
    440     // LL reservation handling
    441     sc_signal<bool>         r_dcache_ll_valid;              // valid LL reservation
    442     sc_signal<uint32_t>     r_dcache_ll_data;               // LL reserved data
    443     sc_signal<paddr_t>      r_dcache_ll_vaddr;              // LL reserved address
    444                            
    445455    // ITLB and DTLB invalidation
    446456    sc_signal<paddr_t>      r_dcache_tlb_inval_line;    // line index
     
    517527    GenericTlb<paddr_t>         r_itlb;
    518528    GenericTlb<paddr_t>         r_dtlb;
     529
     530    //////////////////////////////////////////////////////////////////
     531    // llsc local registration table
     532    //////////////////////////////////////////////////////////////////
     533
     534    #define LLSCLocalTable GenericLLSCLocalTable<8000, 1, paddr_t, vci_trdid_t, vci_data_t>
     535    LLSCLocalTable r_llsc_table;                    // The llsc local registration table
     536
     537    typename LLSCLocalTable::in_t   table_in    ;   // llsc local table input signals
     538    typename LLSCLocalTable::out_t  table_out   ;   // llsc local table output signals
     539
     540    #undef LLSCLocalTable
    519541
    520542    ////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.