Ignore:
Timestamp:
Dec 11, 2013, 4:50:35 PM (10 years ago)
Author:
cfuguet
Message:

Modifications in vci_mem_cache:

  • Bugfix in req_distance function used to compute manhattan distance between requests coordinates and self global coordinates.
  • New constructor parameters for vci_mem_cache:
    1. x_self : X self coordinate
    2. y_self : Y self coordinate


This parameter are used for instrumentation

  • Remove cc_global_id constructor parameter:

This parameter was the mem_cache coherence srcid. This srcid is not
used by the L1 caches because they take the mem cache global id from
the msb of nline to invalidate (CLEANUP) or to update (MULTIACK)

As the constructor parameters has been changed, the platform using the
mem cache must be changed accordingly. Therefore, the tsar_generic_xbar and
the tsar_generic_iob platforms were updated.

File:
1 edited

Legend:

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

    r596 r597  
    334334            const IntTab        &srcid_x,          // global index on external network
    335335            const IntTab        &tgtid_d,          // global index on direct network
    336             const size_t        cc_global_id,      // global index on cc network
     336            const size_t        x_self,            // self x coordinate
     337            const size_t        y_self,            // self y coordinate
    337338            const size_t        x_width,           // number of x bits in platform
    338339            const size_t        y_width,           // number of x bits in platform
     
    366367        m_sets(nsets),
    367368        m_words(nwords),
    368         m_cc_global_id(cc_global_id),
    369         m_xwidth(x_width),
    370         m_ywidth(y_width),
     369        m_x_self(x_self),
     370        m_y_self(y_self),
     371        m_x_width(x_width),
     372        m_y_width(y_width),
    371373        m_debug_start_cycle(debug_start_cycle),
    372374        m_debug_ok(debug_ok),
     
    644646    {
    645647        const uint32_t srcid_width = vci_param_int::S;
    646         uint8_t self_x_srcid = m_cc_global_id >> (srcid_width - m_xwidth);
    647         uint8_t self_y_srcid = (m_cc_global_id >> (srcid_width - m_ywidth)) & ((1 << m_xwidth) - 1);
    648 
    649         uint8_t x_srcid = req_srcid >> (srcid_width - m_xwidth);
    650         uint8_t y_srcid = (req_srcid >> (srcid_width - m_ywidth - m_xwidth)) & ((1 << m_xwidth) - 1);
    651         return abs(self_x_srcid - x_srcid) + abs(self_y_srcid - y_srcid);
     648
     649        uint8_t req_x = (req_srcid >> (srcid_width - m_x_width));
     650        uint8_t req_y = (req_srcid >> (srcid_width - m_x_width - m_y_width)) & ((1 << m_y_width) - 1);
     651
     652        return abs(m_x_self - req_x) + abs(m_y_self - req_y);
    652653    }
    653654
     
    84608461
    84618462                    DspinDhccpParam::dspin_set( flit,
    8462                             m_cc_global_id,
    8463                             DspinDhccpParam::MULTI_INVAL_SRCID);
    8464 
    8465                     DspinDhccpParam::dspin_set( flit,
    84668463                            r_config_to_cc_send_trdid.read(),
    84678464                            DspinDhccpParam::MULTI_INVAL_UPDT_INDEX);
     
    85108507
    85118508                    DspinDhccpParam::dspin_set( flit,
    8512                             m_cc_global_id,
    8513                             DspinDhccpParam::MULTI_INVAL_SRCID);
    8514 
    8515                     DspinDhccpParam::dspin_set( flit,
    85168509                            r_xram_rsp_to_cc_send_trdid.read(),
    85178510                            DspinDhccpParam::MULTI_INVAL_UPDT_INDEX);
     
    85508543                            m_broadcast_boundaries,
    85518544                            DspinDhccpParam::BROADCAST_BOX);
    8552 
    8553                     DspinDhccpParam::dspin_set( flit,
    8554                             m_cc_global_id,
    8555                             DspinDhccpParam::BROADCAST_SRCID);
    85568545
    85578546                    DspinDhccpParam::dspin_set( flit,
     
    86378626                    DspinDhccpParam::dspin_set(
    86388627                            flit,
    8639                             m_cc_global_id,
    8640                             DspinDhccpParam::MULTI_UPDT_SRCID);
    8641 
    8642                     DspinDhccpParam::dspin_set(
    8643                             flit,
    86448628                            r_write_to_cc_send_trdid.read(),
    86458629                            DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);
     
    87278711                            dest,
    87288712                            DspinDhccpParam::MULTI_UPDT_DEST);
    8729 
    8730                     DspinDhccpParam::dspin_set(
    8731                             flit,
    8732                             m_cc_global_id,
    8733                             DspinDhccpParam::MULTI_UPDT_SRCID);
    87348713
    87358714                    DspinDhccpParam::dspin_set(
Note: See TracChangeset for help on using the changeset viewer.