Changeset 840 for branches


Ignore:
Timestamp:
Oct 15, 2014, 3:30:33 PM (10 years ago)
Author:
cfuguet
Message:

reconf/vci_cc_vcache_wrapper: Renaming the soclib tag to avoid conflict

  • Modifying the soclib tag of the vci_cc_vcache_wrapper component to avoid a conflict with other versions of this component.
Location:
branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba/metadata/vci_cc_vcache_wrapper.sd

    r839 r840  
    22# -*- python -*-
    33
    4 Module('caba:vci_cc_vcache_wrapper',
    5             classname = 'soclib::caba::VciCcVCacheWrapper',
     4Module('caba:reconf:vci_cc_vcache_wrapper',
     5        classname = 'soclib::caba::VciCcVCacheWrapper',
    66
    7             tmpl_parameters = [
     7        tmpl_parameters = [
    88            parameter.Module('vci_param', default = 'caba:vci_param'),
    99            parameter.Int('dspin_in_width'),
    1010            parameter.Int('dspin_out_width'),
    11                 parameter.Module('iss_t')
     11            parameter.Module('iss_t')
    1212        ],
    1313
    14             header_files = [ '../source/include/vci_cc_vcache_wrapper.h' ],
     14        header_files = [ '../source/include/vci_cc_vcache_wrapper.h' ],
    1515
    16             implementation_files = [ '../source/src/vci_cc_vcache_wrapper.cpp' ],
     16        implementation_files = [ '../source/src/vci_cc_vcache_wrapper.cpp' ],
    1717
    18             uses = [
     18        uses = [
    1919            Uses('caba:base_module'),
    2020            Uses('common:mapping_table'),
    21                 Uses('common:iss2'),
    22                 Uses('caba:multi_write_buffer'),
    23                 Uses('caba:generic_fifo'),
    24                 Uses('caba:generic_cache_tsar',
    25                 addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
     21            Uses('common:iss2'),
     22            Uses('caba:multi_write_buffer'),
     23            Uses('caba:generic_fifo'),
     24            Uses('caba:generic_cache_tsar',
     25                addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ',
    2626                parameter.Reference('addr_size'))),
    27             Uses('caba:generic_tlb', 
    28                 addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
     27            Uses('caba:generic_tlb',
     28                addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ',
    2929                parameter.Reference('addr_size'))),
    30             Uses('common:address_masking_table', 
    31                 data_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
     30            Uses('common:address_masking_table',
     31                data_t = parameter.StringExt('sc_dt::sc_uint<%d> ',
    3232                parameter.Reference('addr_size'))
    3333            ),
    34                         Uses('caba:dspin_dhccp_param'),
     34            Uses('caba:dspin_dhccp_param'),
    3535        ],
    3636
    37             ports = [
     37        ports = [
    3838            Port('caba:vci_initiator', 'p_vci'),
    39             Port('caba:dspin_input', 'p_dspin_m2p', 
     39            Port('caba:dspin_input', 'p_dspin_m2p',
    4040                  dspin_data_size = parameter.Reference('dspin_in_width')),
    41             Port('caba:dspin_output', 'p_dspin_p2m', 
     41            Port('caba:dspin_output', 'p_dspin_p2m',
    4242                  dspin_data_size = parameter.Reference('dspin_out_width')),
    43             Port('caba:dspin_input', 'p_dspin_clack', 
     43            Port('caba:dspin_input', 'p_dspin_clack',
    4444                  dspin_data_size = parameter.Reference('dspin_in_width')),
    45                 Port('caba:bit_in','p_irq', parameter.Constant('n_irq')),
    46                 Port('caba:bit_in', 'p_resetn', auto = 'resetn'),
    47                 Port('caba:clock_in', 'p_clk', auto = 'clock')
     45            Port('caba:bit_in','p_irq', parameter.Constant('n_irq')),
     46            Port('caba:bit_in', 'p_resetn', auto = 'resetn'),
     47            Port('caba:clock_in', 'p_clk', auto = 'clock')
    4848        ],
    4949
    50             instance_parameters = [
     50        instance_parameters = [
    5151            parameter.Int('proc_id'),
    52                 parameter.Module('mt', 'common:mapping_table'),
    53                 parameter.Module('mc', 'common:mapping_table'),
    54                 parameter.IntTab('initiator_rw_index'),
    55                 parameter.IntTab('initiator_c_index'),
    56                 parameter.IntTab('target_index'),
    57             parameter.Int('itlb_ways'),
    58             parameter.Int('itlb_sets'),
    59             parameter.Int('dtlb_ways'),
    60             parameter.Int('dtlb_sets'),
    61             parameter.Int('icache_ways'),
    62             parameter.Int('icache_sets'),
    63             parameter.Int('icache_words'),
    64             parameter.Int('dcache_ways'),
    65             parameter.Int('dcache_sets'),
    66             parameter.Int('dcache_words'),
    67             parameter.Int('wbuf_nlines'),
    68             parameter.Int('wbuf_nwords'),
    69             parameter.Int('max_frozen_cycles')
     52            parameter.Module('mt', 'common:mapping_table'),
     53            parameter.Module('mc', 'common:mapping_table'),
     54            parameter.IntTab('initiator_rw_index'),
     55            parameter.IntTab('initiator_c_index'),
     56            parameter.IntTab('target_index'),
     57            parameter.Int('itlb_ways'),
     58            parameter.Int('itlb_sets'),
     59            parameter.Int('dtlb_ways'),
     60            parameter.Int('dtlb_sets'),
     61            parameter.Int('icache_ways'),
     62            parameter.Int('icache_sets'),
     63            parameter.Int('icache_words'),
     64            parameter.Int('dcache_ways'),
     65            parameter.Int('dcache_sets'),
     66            parameter.Int('dcache_words'),
     67            parameter.Int('wbuf_nlines'),
     68            parameter.Int('wbuf_nwords'),
     69            parameter.Int('max_frozen_cycles')
    7070        ],
    7171)
    7272
    73 
  • branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba/source/include/vci_cc_vcache_wrapper.h

    r839 r840  
    5555
    5656////////////////////////////////////////////
    57 template<typename vci_param, 
     57template<typename vci_param,
    5858         size_t   dspin_in_width,
    5959         size_t   dspin_out_width,
     
    6666    typedef typename vci_param::fast_addr_t  paddr_t;
    6767
    68     enum icache_fsm_state_e 
     68    enum icache_fsm_state_e
    6969    {
    7070        ICACHE_IDLE,
     
    9393    };
    9494
    95     enum dcache_fsm_state_e 
     95    enum dcache_fsm_state_e
    9696    {
    9797        DCACHE_IDLE,
     
    107107        DCACHE_TLB_LR_WAIT,
    108108        DCACHE_TLB_RETURN,
    109             // handling processor XTN requests
     109        // handling processor XTN requests
    110110        DCACHE_XTN_SWITCH,
    111111        DCACHE_XTN_SYNC,
     
    125125        DCACHE_DIRTY_GET_PTE,
    126126        DCACHE_DIRTY_WAIT,
    127             // handling processor miss requests
     127        // handling processor miss requests
    128128        DCACHE_MISS_SELECT,
    129129        DCACHE_MISS_CLEAN,
     
    143143    };
    144144
    145     enum cmd_fsm_state_e 
     145    enum cmd_fsm_state_e
    146146    {
    147147        CMD_IDLE,
     
    157157    };
    158158
    159     enum rsp_fsm_state_e 
     159    enum rsp_fsm_state_e
    160160    {
    161161        RSP_IDLE,
     
    168168    };
    169169
    170     enum cc_receive_fsm_state_e 
     170    enum cc_receive_fsm_state_e
    171171    {
    172172        CC_RECEIVE_IDLE,
     
    185185    };
    186186
    187     enum cc_send_fsm_state_e 
     187    enum cc_send_fsm_state_e
    188188    {
    189189        CC_SEND_IDLE,
     
    204204        //  b1 accÚs table llsc type SW / other
    205205        //  b2 WRITE/CAS/LL/SC
    206         TYPE_DATA_UNC               = 0x0,
    207         TYPE_READ_DATA_MISS         = 0x1,
    208         TYPE_READ_INS_UNC           = 0x2,
    209         TYPE_READ_INS_MISS          = 0x3,
    210         TYPE_WRITE                  = 0x4,
    211         TYPE_CAS                    = 0x5,
    212         TYPE_LL                     = 0x6,
    213         TYPE_SC                     = 0x7
     206        TYPE_DATA_UNC       = 0x0,
     207        TYPE_READ_DATA_MISS = 0x1,
     208        TYPE_READ_INS_UNC   = 0x2,
     209        TYPE_READ_INS_MISS  = 0x3,
     210        TYPE_WRITE          = 0x4,
     211        TYPE_CAS            = 0x5,
     212        TYPE_LL             = 0x6,
     213        TYPE_SC             = 0x7
    214214    };
    215215
     
    217217    enum sc_status_type_e
    218218    {
    219         SC_SUCCESS  =  0x00000000,
    220         SC_FAIL     =  0x00000001
     219        SC_SUCCESS = 0x00000000,
     220        SC_FAIL    = 0x00000001
    221221    };
    222222
    223223    // cc_send_type
    224     typedef enum 
     224    typedef enum
    225225    {
    226226        CC_TYPE_CLEANUP,
     
    229229
    230230    // cc_receive_type
    231     typedef enum 
     231    typedef enum
    232232    {
    233233        CC_TYPE_CLACK,
     
    238238
    239239    // TLB Mode : ITLB / DTLB / ICACHE / DCACHE
    240     enum 
     240    enum
    241241    {
    242242        INS_TLB_MASK    = 0x8,
     
    250250    {
    251251        MMU_NONE                      = 0x0000, // None
    252         MMU_WRITE_PT1_UNMAPPED        = 0x0001, // Write & Page fault on PT1
    253         MMU_WRITE_PT2_UNMAPPED        = 0x0002, // Write & Page fault on PT2
     252        MMU_WRITE_PT1_UNMAPPED        = 0x0001, // Write & Page fault on PT1
     253        MMU_WRITE_PT2_UNMAPPED        = 0x0002, // Write & Page fault on PT2
    254254        MMU_WRITE_PRIVILEGE_VIOLATION = 0x0004, // Write & Protected access in user mode
    255255        MMU_WRITE_ACCES_VIOLATION     = 0x0008, // Write to non writable page
     
    258258        MMU_WRITE_PT2_ILLEGAL_ACCESS  = 0x0080, // Write & Bus Error accessing PT2
    259259        MMU_WRITE_DATA_ILLEGAL_ACCESS = 0x0100, // Write & Bus Error in cache access
    260         MMU_READ_PT1_UNMAPPED         = 0x1001, // Read & Page fault on PT1
    261         MMU_READ_PT2_UNMAPPED         = 0x1002, // Read & Page fault on PT2
     260        MMU_READ_PT1_UNMAPPED         = 0x1001, // Read & Page fault on PT1
     261        MMU_READ_PT2_UNMAPPED         = 0x1002, // Read & Page fault on PT2
    262262        MMU_READ_PRIVILEGE_VIOLATION  = 0x1004, // Read & Protected access in user mode
    263263        MMU_READ_EXEC_VIOLATION       = 0x1010, // Read & Exec access to a non exec page
    264         MMU_READ_UNDEFINED_XTN        = 0x1020, // Read & Undefined external access
     264        MMU_READ_UNDEFINED_XTN        = 0x1020, // Read & Undefined external access
    265265        MMU_READ_PT1_ILLEGAL_ACCESS   = 0x1040, // Read & Bus Error accessing PT1
    266266        MMU_READ_PT2_ILLEGAL_ACCESS   = 0x1080, // Read & Bus Error accessing PT2
     
    300300    soclib::common::AddressDecodingTable<uint64_t, bool> m_cacheability_table;
    301301
    302     const size_t                        m_srcid;
    303     const size_t                        m_cc_global_id;
    304     const size_t                        m_nline_width;
    305     const size_t                                                m_itlb_ways;
    306     const size_t                                                m_itlb_sets;
    307     const size_t                                                m_dtlb_ways;
    308     const size_t                                                m_dtlb_sets;
    309     const size_t                                                m_icache_ways;
    310     const size_t                                                m_icache_sets;
    311     const paddr_t                                               m_icache_yzmask;
    312     const size_t                                                m_icache_words;
    313     const size_t                                                m_dcache_ways;
    314     const size_t                                                m_dcache_sets;
    315     const paddr_t                                               m_dcache_yzmask;
    316     const size_t                                                m_dcache_words;
    317     const size_t                        m_x_width;
    318     const size_t                        m_y_width;
    319     const size_t                        m_proc_id;
    320     const uint32_t                                              m_max_frozen_cycles;
    321     const size_t                                                m_paddr_nbits;
    322     uint32_t                            m_debug_start_cycle;
    323     bool                                m_debug_ok;
    324 
    325     uint32_t                            m_dcache_paddr_ext_reset;
    326     uint32_t                            m_icache_paddr_ext_reset;
     302    const size_t   m_srcid;
     303    const size_t   m_cc_global_id;
     304    const size_t   m_nline_width;
     305    const size_t   m_itlb_ways;
     306    const size_t   m_itlb_sets;
     307    const size_t   m_dtlb_ways;
     308    const size_t   m_dtlb_sets;
     309    const size_t   m_icache_ways;
     310    const size_t   m_icache_sets;
     311    const paddr_t  m_icache_yzmask;
     312    const size_t   m_icache_words;
     313    const size_t   m_dcache_ways;
     314    const size_t   m_dcache_sets;
     315    const paddr_t  m_dcache_yzmask;
     316    const size_t   m_dcache_words;
     317    const size_t   m_x_width;
     318    const size_t   m_y_width;
     319    const size_t   m_proc_id;
     320    const uint32_t m_max_frozen_cycles;
     321    const size_t   m_paddr_nbits;
     322    uint32_t       m_debug_start_cycle;
     323    bool           m_debug_ok;
     324
     325    uint32_t       m_dcache_paddr_ext_reset;
     326    uint32_t       m_icache_paddr_ext_reset;
    327327
    328328    ////////////////////////////////////////
     
    335335
    336336    /////////////////////////////////////////////
    337     // debug variables 
     337    // debug variables
    338338    /////////////////////////////////////////////
    339339    bool                                m_debug_previous_i_hit;
     
    348348    // Software visible REGISTERS
    349349    ///////////////////////////////
    350     sc_signal<uint32_t>     r_mmu_ptpr;                 // page table pointer register
    351     sc_signal<uint32_t>     r_mmu_mode;                 // mmu mode register
    352     sc_signal<uint32_t>     r_mmu_word_lo;              // mmu misc data low
    353     sc_signal<uint32_t>     r_mmu_word_hi;              // mmu misc data hight
    354     sc_signal<uint32_t>     r_mmu_ibvar;                // mmu bad instruction address
    355     sc_signal<uint32_t>     r_mmu_dbvar;                // mmu bad data address
     350    sc_signal<uint32_t>     r_mmu_ptpr;                 // page table pointer register
     351    sc_signal<uint32_t>     r_mmu_mode;                 // mmu mode register
     352    sc_signal<uint32_t>     r_mmu_word_lo;              // mmu misc data low
     353    sc_signal<uint32_t>     r_mmu_word_hi;              // mmu misc data hight
     354    sc_signal<uint32_t>     r_mmu_ibvar;                  // mmu bad instruction address
     355    sc_signal<uint32_t>     r_mmu_dbvar;                  // mmu bad data address
    356356    sc_signal<uint32_t>     r_mmu_ietr;                 // mmu instruction error type
    357357    sc_signal<uint32_t>     r_mmu_detr;                 // mmu data error type
    358     uint32_t                r_mmu_params;                       // read-only
    359     uint32_t                r_mmu_release;                      // read_only
     358    uint32_t                r_mmu_params;                // read-only
     359    uint32_t                r_mmu_release;                // read_only
    360360
    361361
     
    365365    sc_signal<int>          r_icache_fsm;               // state register
    366366    sc_signal<int>          r_icache_fsm_save;          // return state for coherence op
    367     sc_signal<paddr_t>      r_icache_vci_paddr;         // physical address
     367    sc_signal<paddr_t>      r_icache_vci_paddr;          // physical address
    368368    sc_signal<uint32_t>     r_icache_vaddr_save;        // virtual address from processor
    369369
    370370    // icache miss handling
    371     sc_signal<size_t>       r_icache_miss_way;              // selected way for cache update
    372     sc_signal<size_t>       r_icache_miss_set;              // selected set for cache update
    373     sc_signal<size_t>       r_icache_miss_word;             // word index ( cache update)
     371    sc_signal<size_t>       r_icache_miss_way;            // selected way for cache update
     372    sc_signal<size_t>       r_icache_miss_set;            // selected set for cache update
     373    sc_signal<size_t>       r_icache_miss_word;            // word index ( cache update)
    374374    sc_signal<bool>         r_icache_miss_inval;        // coherence request matching a miss
    375375    sc_signal<bool>         r_icache_miss_clack;        // waiting for a cleanup acknowledge
    376376
    377377    // coherence request handling
    378     sc_signal<size_t>       r_icache_cc_way;                // selected way for cc update/inval
    379     sc_signal<size_t>       r_icache_cc_set;                // selected set for cc update/inval
    380     sc_signal<size_t>       r_icache_cc_word;               // word counter for cc update
     378    sc_signal<size_t>       r_icache_cc_way;            // selected way for cc update/inval
     379    sc_signal<size_t>       r_icache_cc_set;            // selected set for cc update/inval
     380    sc_signal<size_t>       r_icache_cc_word;            // word counter for cc update
    381381    sc_signal<bool>         r_icache_cc_need_write;     // activate the cache for writing
    382382
    383383    // coherence clack handling
    384384    sc_signal<bool>         r_icache_clack_req;         // clack request
    385     sc_signal<size_t>       r_icache_clack_way;             // clack way
    386     sc_signal<size_t>       r_icache_clack_set;             // clack set
     385    sc_signal<size_t>       r_icache_clack_way;            // clack way
     386    sc_signal<size_t>       r_icache_clack_set;            // clack set
    387387
    388388    // icache flush handling
    389     sc_signal<size_t>       r_icache_flush_count;           // slot counter used for cache flush
     389    sc_signal<size_t>       r_icache_flush_count;        // slot counter used for cache flush
    390390
    391391    // communication between ICACHE FSM and VCI_CMD FSM
     
    394394
    395395    // communication between ICACHE FSM and DCACHE FSM
    396     sc_signal<bool>             r_icache_tlb_miss_req;       // (set icache/reset dcache)
     396    sc_signal<bool>            r_icache_tlb_miss_req;       // (set icache/reset dcache)
    397397    sc_signal<bool>         r_icache_tlb_rsp_error;      // tlb miss response error
    398398
    399399    // Filp-Flop in ICACHE FSM for saving the cleanup victim request
    400     sc_signal<bool>         r_icache_cleanup_victim_req; 
     400    sc_signal<bool>         r_icache_cleanup_victim_req;
    401401    sc_signal<paddr_t>      r_icache_cleanup_victim_nline;
    402402
     
    424424    sc_signal<uint32_t>     r_dcache_save_be;           // byte enable (from proc)
    425425    sc_signal<paddr_t>      r_dcache_save_paddr;        // physical address
    426     sc_signal<size_t>       r_dcache_save_cache_way;    // selected way (from dcache)
    427     sc_signal<size_t>       r_dcache_save_cache_set;    // selected set (from dcache)
    428     sc_signal<size_t>       r_dcache_save_cache_word;   // selected word (from dcache)
     426    sc_signal<size_t>       r_dcache_save_cache_way;    // selected way (from dcache)
     427    sc_signal<size_t>       r_dcache_save_cache_set;    // selected set (from dcache)
     428    sc_signal<size_t>       r_dcache_save_cache_word;    // selected word (from dcache)
    429429    // registers used by the Dirty bit sub-fsm
    430430    sc_signal<paddr_t>      r_dcache_dirty_paddr;       // PTE physical address
    431     sc_signal<size_t>       r_dcache_dirty_way;         // way to invalidate in dcache
    432     sc_signal<size_t>       r_dcache_dirty_set;         // set to invalidate in dcache
     431    sc_signal<size_t>       r_dcache_dirty_way;            // way to invalidate in dcache
     432    sc_signal<size_t>       r_dcache_dirty_set;            // set to invalidate in dcache
    433433
    434434    // communication between DCACHE FSM and VCI_CMD FSM
    435     sc_signal<paddr_t>      r_dcache_vci_paddr;             // physical address for VCI command
    436     sc_signal<uint32_t>     r_dcache_vci_wdata;             // write unc data for VCI command
     435    sc_signal<paddr_t>      r_dcache_vci_paddr;            // physical address for VCI command
     436    sc_signal<uint32_t>     r_dcache_vci_wdata;            // write unc data for VCI command
    437437    sc_signal<bool>         r_dcache_vci_miss_req;      // read miss request
    438438    sc_signal<bool>         r_dcache_vci_unc_req;       // uncacheable request (read/write)
     
    447447
    448448    // register used for XTN inval
    449     sc_signal<size_t>       r_dcache_xtn_way;               // selected way (from dcache)
    450     sc_signal<size_t>       r_dcache_xtn_set;               // selected set (from dcache)
     449    sc_signal<size_t>       r_dcache_xtn_way;            // selected way (from dcache)
     450    sc_signal<size_t>       r_dcache_xtn_set;            // selected set (from dcache)
    451451
    452452    // handling dcache miss
    453     sc_signal<int>              r_dcache_miss_type;                 // depending on the requester
    454     sc_signal<size_t>       r_dcache_miss_word;             // word index for cache update
    455     sc_signal<size_t>       r_dcache_miss_way;              // selected way for cache update
    456     sc_signal<size_t>       r_dcache_miss_set;              // selected set for cache update
     453    sc_signal<int>            r_dcache_miss_type;            // depending on the requester
     454    sc_signal<size_t>       r_dcache_miss_word;            // word index for cache update
     455    sc_signal<size_t>       r_dcache_miss_way;            // selected way for cache update
     456    sc_signal<size_t>       r_dcache_miss_set;            // selected set for cache update
    457457    sc_signal<bool>         r_dcache_miss_inval;        // coherence request matching a miss
    458458    sc_signal<bool>         r_dcache_miss_clack;        // waiting for a cleanup acknowledge
    459459
    460460    // handling coherence requests
    461     sc_signal<size_t>       r_dcache_cc_way;                // selected way for cc update/inval
    462     sc_signal<size_t>       r_dcache_cc_set;                // selected set for cc update/inval
    463     sc_signal<size_t>       r_dcache_cc_word;               // word counter for cc update
     461    sc_signal<size_t>       r_dcache_cc_way;            // selected way for cc update/inval
     462    sc_signal<size_t>       r_dcache_cc_set;            // selected set for cc update/inval
     463    sc_signal<size_t>       r_dcache_cc_word;            // word counter for cc update
    464464    sc_signal<bool>         r_dcache_cc_need_write;     // activate the cache for writing
    465465
    466466    // coherence clack handling
    467467    sc_signal<bool>         r_dcache_clack_req;         // clack request
    468     sc_signal<size_t>       r_dcache_clack_way;             // clack way
    469     sc_signal<size_t>       r_dcache_clack_set;             // clack set
     468    sc_signal<size_t>       r_dcache_clack_way;            // clack way
     469    sc_signal<size_t>       r_dcache_clack_set;            // clack set
    470470
    471471    // dcache flush handling
    472     sc_signal<size_t>       r_dcache_flush_count;           // slot counter used for cache flush
     472    sc_signal<size_t>       r_dcache_flush_count;        // slot counter used for cache flush
    473473
    474474    // ll response handling
    475     sc_signal<size_t>       r_dcache_ll_rsp_count;          // flit counter used for ll rsp
     475    sc_signal<size_t>       r_dcache_ll_rsp_count;        // flit counter used for ll rsp
    476476
    477477    // used by the TLB miss sub-fsm
    478     sc_signal<uint32_t>     r_dcache_tlb_vaddr;             // virtual address for a tlb miss
    479     sc_signal<bool>         r_dcache_tlb_ins;               // target tlb (itlb if true)
    480     sc_signal<paddr_t>      r_dcache_tlb_paddr;             // physical address of pte
    481     sc_signal<uint32_t>     r_dcache_tlb_pte_flags;         // pte1 or first word of pte2
    482     sc_signal<uint32_t>     r_dcache_tlb_pte_ppn;           // second word of pte2
    483     sc_signal<size_t>       r_dcache_tlb_cache_way;         // selected way in dcache
    484     sc_signal<size_t>       r_dcache_tlb_cache_set;         // selected set in dcache
    485     sc_signal<size_t>       r_dcache_tlb_cache_word;    // selected word in dcache
    486     sc_signal<size_t>       r_dcache_tlb_way;               // selected way in tlb
    487     sc_signal<size_t>       r_dcache_tlb_set;               // selected set in tlb
     478    sc_signal<uint32_t>     r_dcache_tlb_vaddr;            // virtual address for a tlb miss
     479    sc_signal<bool>         r_dcache_tlb_ins;            // target tlb (itlb if true)
     480    sc_signal<paddr_t>      r_dcache_tlb_paddr;            // physical address of pte
     481    sc_signal<uint32_t>     r_dcache_tlb_pte_flags;        // pte1 or first word of pte2
     482    sc_signal<uint32_t>     r_dcache_tlb_pte_ppn;        // second word of pte2
     483    sc_signal<size_t>       r_dcache_tlb_cache_way;        // selected way in dcache
     484    sc_signal<size_t>       r_dcache_tlb_cache_set;        // selected set in dcache
     485    sc_signal<size_t>       r_dcache_tlb_cache_word;    // selected word in dcache
     486    sc_signal<size_t>       r_dcache_tlb_way;            // selected way in tlb
     487    sc_signal<size_t>       r_dcache_tlb_set;            // selected set in tlb
    488488
    489489    // ITLB and DTLB invalidation
    490     sc_signal<paddr_t>      r_dcache_tlb_inval_line;    // line index
     490    sc_signal<paddr_t>      r_dcache_tlb_inval_line;    // line index
    491491    sc_signal<size_t>       r_dcache_tlb_inval_set;     // tlb set counter
    492492
     
    496496
    497497    // Filp-Flop in DCACHE FSM for saving the cleanup victim request
    498     sc_signal<bool>         r_dcache_cleanup_victim_req; 
     498    sc_signal<bool>         r_dcache_cleanup_victim_req;
    499499    sc_signal<paddr_t>      r_dcache_cleanup_victim_nline;
    500500
     
    517517    ///////////////////////////////////
    518518    sc_signal<int>          r_vci_cmd_fsm;
    519     sc_signal<size_t>       r_vci_cmd_min;                      // used for write bursts
    520     sc_signal<size_t>       r_vci_cmd_max;                      // used for write bursts
    521     sc_signal<size_t>       r_vci_cmd_cpt;                      // used for write bursts
    522     sc_signal<bool>         r_vci_cmd_imiss_prio;               // round-robin between imiss & dmiss
     519    sc_signal<size_t>       r_vci_cmd_min;                  // used for write bursts
     520    sc_signal<size_t>       r_vci_cmd_max;                  // used for write bursts
     521    sc_signal<size_t>       r_vci_cmd_cpt;                    // used for write bursts
     522    sc_signal<bool>         r_vci_cmd_imiss_prio;            // round-robin between imiss & dmiss
    523523
    524524    ///////////////////////////////////
     
    529529    sc_signal<bool>         r_vci_rsp_ins_error;
    530530    sc_signal<bool>         r_vci_rsp_data_error;
    531     GenericFifo<uint32_t>   r_vci_rsp_fifo_icache;              // response FIFO to ICACHE FSM
    532     GenericFifo<uint32_t>   r_vci_rsp_fifo_dcache;              // response FIFO to DCACHE FSM
     531    GenericFifo<uint32_t>   r_vci_rsp_fifo_icache;            // response FIFO to ICACHE FSM
     532    GenericFifo<uint32_t>   r_vci_rsp_fifo_dcache;            // response FIFO to DCACHE FSM
    533533
    534534    ///////////////////////////////////
     
    556556    sc_signal<size_t>       r_cc_receive_icache_set;        // cc_receive to icache set
    557557    sc_signal<size_t>       r_cc_receive_icache_updt_tab_idx;  // cc_receive update table index
    558     sc_signal<paddr_t>      r_cc_receive_icache_nline;      // cache line physical address
     558    sc_signal<paddr_t>      r_cc_receive_icache_nline;        // cache line physical address
    559559
    560560    // communication between CC_RECEIVE FSM and DCACHE FSM
     
    564564    sc_signal<size_t>       r_cc_receive_dcache_set;        // cc_receive to dcache set
    565565    sc_signal<size_t>       r_cc_receive_dcache_updt_tab_idx;  // cc_receive update table index
    566     sc_signal<paddr_t>      r_cc_receive_dcache_nline;      // cache line physical address
     566    sc_signal<paddr_t>      r_cc_receive_dcache_nline;        // cache line physical address
    567567
    568568    ///////////////////////////////////
     
    571571    sc_signal<bool>         r_dspin_clack_req;
    572572    sc_signal<uint64_t>     r_dspin_clack_flit;
    573    
     573
    574574    //////////////////////////////////////////////////////////////////
    575575    // processor, write buffer, caches , TLBs
    576576    //////////////////////////////////////////////////////////////////
    577577
    578     iss_t                       r_iss;
    579     MultiWriteBuffer<paddr_t>   r_wbuf;
    580     GenericCache<paddr_t>       r_icache;
    581     GenericCache<paddr_t>       r_dcache;
    582     GenericTlb<paddr_t>         r_itlb;
    583     GenericTlb<paddr_t>         r_dtlb;
     578    iss_t                     r_iss;
     579    MultiWriteBuffer<paddr_t> r_wbuf;
     580    GenericCache<paddr_t>     r_icache;
     581    GenericCache<paddr_t>     r_dcache;
     582    GenericTlb<paddr_t>       r_itlb;
     583    GenericTlb<paddr_t>       r_dtlb;
    584584
    585585    //////////////////////////////////////////////////////////////////
     
    587587    //////////////////////////////////////////////////////////////////
    588588
    589     sc_signal<paddr_t>                     r_dcache_llsc_paddr;
    590     sc_signal<uint32_t>                    r_dcache_llsc_key;
    591     sc_signal<uint32_t>                    r_dcache_llsc_count;
    592     sc_signal<bool>                        r_dcache_llsc_valid;
     589    sc_signal<paddr_t>        r_dcache_llsc_paddr;
     590    sc_signal<uint32_t>       r_dcache_llsc_key;
     591    sc_signal<uint32_t>       r_dcache_llsc_count;
     592    sc_signal<bool>           r_dcache_llsc_valid;
    593593
    594594    ////////////////////////////////
     
    605605    uint32_t m_cpt_icache_dir_write;        // ICACHE DIR WRITE
    606606
    607     uint32_t m_cpt_frz_cycles;              // number of cycles where the cpu is frozen
    608     uint32_t m_cpt_total_cycles;                // total number of cycles
     607    uint32_t m_cpt_frz_cycles;              // number of cycles where the cpu is frozen
     608    uint32_t m_cpt_total_cycles;            // total number of cycles
    609609
    610610    // Cache activity counters
     
    651651    uint32_t m_cpt_tlb_occup_dcache;
    652652
    653     uint32_t m_cost_ins_tlb_miss_frz;       // number of frozen cycles related to instruction tlb miss
    654     uint32_t m_cost_data_tlb_miss_frz;      // number of frozen cycles related to data tlb miss
     653    uint32_t m_cost_ins_tlb_miss_frz;          // number of frozen cycles related to instruction tlb miss
     654    uint32_t m_cost_data_tlb_miss_frz;         // number of frozen cycles related to data tlb miss
    655655    uint32_t m_cost_ins_tlb_update_acc_frz;    // number of frozen cycles related to instruction tlb update acc
    656656    uint32_t m_cost_data_tlb_update_acc_frz;   // number of frozen cycles related to data tlb update acc
     
    668668    uint32_t m_cpt_dtlb_sc_dirty_transaction;  // number of dtlb sc dirty transactions
    669669
    670     uint32_t m_cost_itlbmiss_transaction;       // cumulated duration for VCI instruction TLB miss transactions
    671     uint32_t m_cost_itlb_ll_transaction;        // cumulated duration for VCI instruction TLB ll acc transactions
    672     uint32_t m_cost_itlb_sc_transaction;        // cumulated duration for VCI instruction TLB sc acc transactions
    673     uint32_t m_cost_dtlbmiss_transaction;       // cumulated duration for VCI data TLB miss transactions
    674     uint32_t m_cost_dtlb_ll_transaction;        // cumulated duration for VCI data TLB ll acc transactions
    675     uint32_t m_cost_dtlb_sc_transaction;        // cumulated duration for VCI data TLB sc acc transactions
    676     uint32_t m_cost_dtlb_ll_dirty_transaction;  // cumulated duration for VCI data TLB ll dirty transactions
    677     uint32_t m_cost_dtlb_sc_dirty_transaction;  // cumulated duration for VCI data TLB sc dirty transactions
     670    uint32_t m_cost_itlbmiss_transaction;      // cumulated duration for VCI instruction TLB miss transactions
     671    uint32_t m_cost_itlb_ll_transaction;       // cumulated duration for VCI instruction TLB ll acc transactions
     672    uint32_t m_cost_itlb_sc_transaction;       // cumulated duration for VCI instruction TLB sc acc transactions
     673    uint32_t m_cost_dtlbmiss_transaction;      // cumulated duration for VCI data TLB miss transactions
     674    uint32_t m_cost_dtlb_ll_transaction;       // cumulated duration for VCI data TLB ll acc transactions
     675    uint32_t m_cost_dtlb_sc_transaction;       // cumulated duration for VCI data TLB sc acc transactions
     676    uint32_t m_cost_dtlb_ll_dirty_transaction; // cumulated duration for VCI data TLB ll dirty transactions
     677    uint32_t m_cost_dtlb_sc_dirty_transaction; // cumulated duration for VCI data TLB sc dirty transactions
    678678
    679679    // coherence activity counters
    680     uint32_t m_cpt_cc_update_icache;            // number of coherence update instruction commands
    681     uint32_t m_cpt_cc_update_dcache;            // number of coherence update data commands
    682     uint32_t m_cpt_cc_inval_icache;             // number of coherence inval instruction commands
    683     uint32_t m_cpt_cc_inval_dcache;             // number of coherence inval data commands
    684     uint32_t m_cpt_cc_broadcast;                // number of coherence broadcast commands
    685 
    686     uint32_t m_cost_updt_data_frz;              // number of frozen cycles related to coherence update data packets
    687     uint32_t m_cost_inval_ins_frz;              // number of frozen cycles related to coherence inval instruction packets
    688     uint32_t m_cost_inval_data_frz;             // number of frozen cycles related to coherence inval data packets
    689     uint32_t m_cost_broadcast_frz;              // number of frozen cycles related to coherence broadcast packets
    690 
    691     uint32_t m_cpt_cc_cleanup_ins;              // number of coherence cleanup packets
    692     uint32_t m_cpt_cc_cleanup_data;             // number of coherence cleanup packets
    693 
    694     uint32_t m_cpt_icleanup_transaction;        // number of instruction cleanup transactions
    695     uint32_t m_cpt_dcleanup_transaction;        // number of instructinumber of data cleanup transactions
    696     uint32_t m_cost_icleanup_transaction;       // cumulated duration for VCI instruction cleanup transactions
    697     uint32_t m_cost_dcleanup_transaction;       // cumulated duration for VCI data cleanup transactions
     680    uint32_t m_cpt_cc_update_icache;        // number of coherence update instruction commands
     681    uint32_t m_cpt_cc_update_dcache;        // number of coherence update data commands
     682    uint32_t m_cpt_cc_inval_icache;         // number of coherence inval instruction commands
     683    uint32_t m_cpt_cc_inval_dcache;         // number of coherence inval data commands
     684    uint32_t m_cpt_cc_broadcast;            // number of coherence broadcast commands
     685
     686    uint32_t m_cost_updt_data_frz;          // number of frozen cycles related to coherence update data packets
     687    uint32_t m_cost_inval_ins_frz;          // number of frozen cycles related to coherence inval instruction packets
     688    uint32_t m_cost_inval_data_frz;         // number of frozen cycles related to coherence inval data packets
     689    uint32_t m_cost_broadcast_frz;          // number of frozen cycles related to coherence broadcast packets
     690
     691    uint32_t m_cpt_cc_cleanup_ins;          // number of coherence cleanup packets
     692    uint32_t m_cpt_cc_cleanup_data;         // number of coherence cleanup packets
     693
     694    uint32_t m_cpt_icleanup_transaction;    // number of instruction cleanup transactions
     695    uint32_t m_cpt_dcleanup_transaction;    // number of instructinumber of data cleanup transactions
     696    uint32_t m_cost_icleanup_transaction;   // cumulated duration for VCI instruction cleanup transactions
     697    uint32_t m_cost_dcleanup_transaction;   // cumulated duration for VCI data cleanup transactions
    698698
    699699    uint32_t m_cost_ins_tlb_inval_frz;      // number of frozen cycles related to checking ins tlb invalidate
     
    711711    uint32_t m_cpt_fsm_cc_send    [64];
    712712
    713     uint32_t m_cpt_stop_simulation;             // used to stop simulation if frozen
    714     bool     m_monitor_ok;                      // used to debug cache output 
    715     uint32_t m_monitor_base;               
    716     uint32_t m_monitor_length;             
     713    uint32_t m_cpt_stop_simulation;       // used to stop simulation if frozen
     714    bool     m_monitor_ok;                // used to debug cache output
     715    uint32_t m_monitor_base;
     716    uint32_t m_monitor_length;
    717717
    718718protected:
     
    753753    void start_monitor(paddr_t,paddr_t);
    754754    void stop_monitor();
    755     inline void iss_set_debug_mask(uint v) 
    756     {
    757             r_iss.set_debug_mask(v);
     755    inline void iss_set_debug_mask(uint v)
     756    {
     757        r_iss.set_debug_mask(v);
    758758    }
    759759
  • branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r839 r840  
    13871387            int state;
    13881388            paddr_t tag;
    1389             size_t way = r_icache_flush_count.read()/m_icache_sets;
    1390             size_t set = r_icache_flush_count.read()%m_icache_sets;
     1389            size_t way = r_icache_flush_count.read() / m_icache_sets;
     1390            size_t set = r_icache_flush_count.read() % m_icache_sets;
    13911391
    13921392#ifdef INSTRUMENTATION
     
    24382438            if (m_dreq.type == iss_t::XTN_READ)
    24392439            {
    2440                 int xtn_opcode = (int)m_dreq.addr / 4;
     2440                int xtn_opcode = (int) m_dreq.addr / 4;
    24412441
    24422442                // checking processor mode:
     
    29722972
    29732973        // itlb miss request
    2974         else if (r_icache_tlb_miss_req.read() and not wbuf_write_miss )
     2974        else if (r_icache_tlb_miss_req.read() and not wbuf_write_miss)
    29752975        {
    29762976            r_dcache_tlb_ins    = true;
     
    31113111
    31123112            }
    3113             else if (entry & PTE_T_MASK ) //  PTD : me must access PT2
     3113            else if (entry & PTE_T_MASK) //  PTD : me must access PT2
    31143114            {
    31153115                // mark the cache line ac containing a PTD
     
    38473847            int     state;
    38483848            paddr_t tag;
    3849             size_t  way = r_dcache_flush_count.read()/m_dcache_sets;
    3850             size_t  set = r_dcache_flush_count.read()%m_dcache_sets;
     3849            size_t  way = r_dcache_flush_count.read() / m_dcache_sets;
     3850            size_t  set = r_dcache_flush_count.read() % m_dcache_sets;
    38513851
    38523852#ifdef INSTRUMENTATION
     
    44604460                r_dcache_contains_ptd[way * m_dcache_sets + set] = false;
    44614461            }
    4462             if      (r_dcache_miss_type.read()==PTE1_MISS) r_dcache_fsm = DCACHE_TLB_PTE1_GET;
    4463             else if (r_dcache_miss_type.read()==PTE2_MISS) r_dcache_fsm = DCACHE_TLB_PTE2_GET;
    4464             else                                           r_dcache_fsm = DCACHE_IDLE;
     4462            if      (r_dcache_miss_type.read() == PTE1_MISS) r_dcache_fsm = DCACHE_TLB_PTE1_GET;
     4463            else if (r_dcache_miss_type.read() == PTE2_MISS) r_dcache_fsm = DCACHE_TLB_PTE2_GET;
     4464            else                                             r_dcache_fsm = DCACHE_IDLE;
    44654465        }
    44664466        break;
     
    47604760        }
    47614761
    4762         assert ( not r_dcache_cc_send_req.read() and
    4763         "CC_SEND must be available in DCACHE_CC_CHECK" );
     4762        assert(not r_dcache_cc_send_req.read() and
     4763        "CC_SEND must be available in DCACHE_CC_CHECK");
    47644764
    47654765        // Match between MISS address and CC address
     
    60216021        p_vci.trdid   = 0;
    60226022        p_vci.pktid   = TYPE_READ_INS_MISS;
    6023         p_vci.plen    = m_icache_words<<2;
     6023        p_vci.plen    = m_icache_words << 2;
    60246024        p_vci.cmd     = vci_param::CMD_READ;
    60256025        p_vci.eop     = true;
Note: See TracChangeset for help on using the changeset viewer.