Ignore:
Timestamp:
Aug 8, 2012, 12:03:25 PM (12 years ago)
Author:
cfuguet
Message:

Introducing new CLEANUP transaction address specification in the components:

  • vci_cc_vcache_wrapper_v4
  • vci_mem_cache_v4

The new specification uses the VCI WDATA and the VCI BE to send the cleanup
nline. The VCI ADDRESS is like follows:

  • NLINE MSb | Memory Cache local ID | 00....00

The platforms:

  • tsarv4_mono_mmu
  • tsarv4_generic_mmu

has been modified to use the modified components and the mapping table for the coherence
address space has been updated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_cc_vcache_wrapper_v4/caba/source/src/vci_cc_vcache_wrapper_v4.cpp

    r239 r247  
    166166    size_t                              wbuf_nlines,
    167167    size_t                              wbuf_nwords,
    168     uint32_t                            max_frozen_cycles,
    169     uint32_t                            debug_start_cycle,
     168    size_t                              x_width,
     169    size_t                              y_width,
     170    uint32_t                    memory_cache_local_id,
     171    uint32_t                    max_frozen_cycles,
     172    uint32_t                    debug_start_cycle,
    170173    bool                                debug_ok)
    171174    : soclib::caba::BaseModule(name),
     
    197200      m_dcache_yzmask((~0)<<(uint32_log2(dcache_words) + 2)),
    198201      m_dcache_words(dcache_words),
     202
     203      m_x_width(x_width),
     204      m_y_width(y_width),
     205
     206      m_memory_cache_local_id(memory_cache_local_id),     
    199207
    200208      m_proc_id(proc_id),
     
    48124820    // it depends on the CLEANUP FSM state
    48134821
     4822    paddr_t  cleanup_nline;
    48144823    paddr_t  address;
    48154824
    48164825    if ( r_cleanup_fsm.read() == CLEANUP_DATA_GO )
    4817         address = r_dcache_cleanup_line.read()*m_dcache_words*4;
     4826    {
     4827        cleanup_nline = r_dcache_cleanup_line.read();
     4828        address       = (m_x_width + m_y_width) ? (cleanup_nline * m_dcache_words * 4    ) >>
     4829                                                  (vci_param::N  - m_x_width - m_y_width ) : 0;
     4830    }
    48184831    else if ( r_cleanup_fsm.read() == CLEANUP_INS_GO )
    4819         address = r_icache_cleanup_line.read()*m_icache_words*4;
     4832    {
     4833        cleanup_nline = r_icache_cleanup_line.read();
     4834        address       = (m_x_width + m_y_width) ? (cleanup_nline * m_icache_words * 4    ) >>
     4835                                                  (vci_param::N  - m_x_width - m_y_width ) : 0;
     4836    }
    48204837    else
    4821         address = 0;
     4838    {
     4839        cleanup_nline = 0;
     4840        address       = 0;
     4841    }
     4842
     4843    address           <<= vci_param::S - m_x_width - m_y_width;
     4844    address            |= m_memory_cache_local_id;
     4845    address           <<= vci_param::N - vci_param::S;
    48224846
    48234847    p_vci_ini_c.cmdval  = ((r_cleanup_fsm.read() == CLEANUP_DATA_GO) or
    48244848                           (r_cleanup_fsm.read() == CLEANUP_INS_GO) );
    48254849    p_vci_ini_c.address = address;
    4826     p_vci_ini_c.wdata   = 0;
    4827     p_vci_ini_c.be      = 0xF;
     4850    p_vci_ini_c.wdata   = (uint32_t) cleanup_nline;
     4851    p_vci_ini_c.be      = (cleanup_nline >> 32) & 0x3;
    48284852    p_vci_ini_c.plen    = 4;
    48294853    p_vci_ini_c.cmd     = vci_param::CMD_WRITE;
Note: See TracChangeset for help on using the changeset viewer.