Changeset 597


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.

Location:
trunk
Files:
4 edited

Legend:

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

    r596 r597  
    499499          const soclib::common::IntTab       &srcid_x,        // global index RAM network
    500500          const soclib::common::IntTab       &tgtid_d,        // global index INT network
    501           const size_t                       cc_global_id,    // global index CC network
     501          const size_t                       x_self,          // self X coordinate
     502          const size_t                       y_self,          // self Y coordinate
    502503          const size_t                       x_width,         // X width in platform
    503504          const size_t                       y_width,         // Y width in platform
     
    542543      const size_t                       m_sets;             // Number of cache sets
    543544      const size_t                       m_words;            // Number of words in a line
    544       const size_t                       m_cc_global_id;     // global_index on cc network
    545       const size_t                       m_xwidth;           // number of x bits in platform
    546       const size_t                       m_ywidth;           // number of y bits in platform
     545      const size_t                       m_x_self;           // X self coordinate
     546      const size_t                       m_y_self;           // Y self coordinate
     547      const size_t                       m_x_width;          // number of x bits in platform
     548      const size_t                       m_y_width;          // number of y bits in platform
    547549      size_t                             m_debug_start_cycle;
    548550      bool                               m_debug_ok;
  • 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(
  • trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp

    r584 r597  
    171171                     IntTab(cluster_id, memc_ram_srcid), // SRCID RAM network
    172172                     IntTab(cluster_id, memc_int_tgtid), // TGTID INT network
    173                      (cluster_id << l_width) + nb_procs, // CC_GLOBAL_ID
     173                     x_id,                               // X self coordinate
     174                     y_id,                               // Y self coordinate
    174175                     x_width,                            // number of bits for x coordinate
    175176                     y_width,                            // number of bits for y coordinate
  • trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp

    r548 r597  
    148148                     IntTab(cluster_id),                 // SRCID external space
    149149                     IntTab(cluster_id, tgtid_memc),     // TGTID direct space
    150                      (cluster_id << l_width) + nb_procs, // CC_GLOBAL_ID
     150                     x_id,                               // X self coordinate
     151                     y_id,                               // Y self coordinate
    151152                     x_width,                            // Number of x bits in platform
    152153                     y_width,                            // Number of y bits in platform
     
    369370
    370371        wt_mnic = new VciDspinTargetWrapper<vci_param_int,
    371                                             dspin_cmd_width,
    372                                             dspin_rsp_width>(
    373                      "wt_mnic",
    374                      x_width + y_width + l_width);
     372                                           dspin_cmd_width,
     373                                           dspin_rsp_width>(
     374                    "wt_mnic",
     375                    x_width + y_width + l_width);
    375376
    376377        /////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.