Ignore:
Timestamp:
Dec 11, 2013, 6:08:30 PM (9 years ago)
Author:
cfuguet
Message:

Improvement in vci_mem_cache component:

  • No need to pass x_self and y_self constructor parameters. They are computed from the most significant bits of one of the memory segments mapped to this component.
  • Erasing these two parameters from the vci_mem_cache constructor in all TSAR platforms
File:
1 edited

Legend:

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

    r597 r599  
    334334            const IntTab        &srcid_x,          // global index on external network
    335335            const IntTab        &tgtid_d,          // global index on direct network
    336             const size_t        x_self,            // self x coordinate
    337             const size_t        y_self,            // self y coordinate
    338336            const size_t        x_width,           // number of x bits in platform
    339337            const size_t        y_width,           // number of x bits in platform
     
    367365        m_sets(nsets),
    368366        m_words(nwords),
    369         m_x_self(x_self),
    370         m_y_self(y_self),
    371367        m_x_width(x_width),
    372368        m_y_width(y_width),
     
    529525            }
    530526
     527            assert( (m_nseg > 0) and
     528                    "MEMC ERROR : At least one segment must be mapped to this component");
     529
    531530            m_seg = new soclib::common::Segment*[m_nseg];
    532531
     
    537536                i++;
    538537            }
     538
     539            addr_t gid = m_seg[0]->baseAddress() >> (vci_param_int::N - x_width - y_width);
     540            m_x_self = (gid >> m_y_width) & ((1 << m_x_width) - 1);
     541            m_y_self =  gid               & ((1 << m_y_width) - 1);
    539542
    540543            // Allocation for IXR_RSP FSM
Note: See TracChangeset for help on using the changeset viewer.