Changeset 599


Ignore:
Timestamp:
Dec 11, 2013, 6:08:30 PM (10 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
Location:
trunk
Files:
6 edited

Legend:

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

    r581 r599  
    3131#include <fcntl.h>
    3232#include "vci_block_device_tsar.h"
     33#include "block_device_tsar.h"
    3334
    3435#define DEBUG_BDEV   0
  • trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h

    r597 r599  
    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                       x_self,          // self X coordinate
    502           const size_t                       y_self,          // self Y coordinate
    503501          const size_t                       x_width,         // X width in platform
    504502          const size_t                       y_width,         // Y width in platform
     
    543541      const size_t                       m_sets;             // Number of cache sets
    544542      const size_t                       m_words;            // Number of words in a line
    545       const size_t                       m_x_self;           // X self coordinate
    546       const size_t                       m_y_self;           // Y self coordinate
     543      size_t                             m_x_self;           // X self coordinate
     544      size_t                             m_y_self;           // Y self coordinate
    547545      const size_t                       m_x_width;          // number of x bits in platform
    548546      const size_t                       m_y_width;          // number of y bits in platform
  • 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
  • trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp

    r597 r599  
    171171                     IntTab(cluster_id, memc_ram_srcid), // SRCID RAM network
    172172                     IntTab(cluster_id, memc_int_tgtid), // TGTID INT network
    173                      x_id,                               // X self coordinate
    174                      y_id,                               // Y self coordinate
    175173                     x_width,                            // number of bits for x coordinate
    176174                     y_width,                            // number of bits for y coordinate
  • trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp

    r597 r599  
    148148                     IntTab(cluster_id),                 // SRCID external space
    149149                     IntTab(cluster_id, tgtid_memc),     // TGTID direct space
    150                      x_id,                               // X self coordinate
    151                      y_id,                               // Y self coordinate
    152150                     x_width,                            // Number of x bits in platform
    153151                     y_width,                            // Number of y bits in platform
  • trunk/platforms/tsar_mono_mmu/top.cpp

    r598 r599  
    279279          ("xram", IntTab(0), maptabx, loader);
    280280        memc = new soclib::caba::VciMemCache<vci_param, vci_param_ext, dspin_rsp_width, dspin_cmd_width>
    281           ("memc",maptabp,maptabx,IntTab(0),IntTab(0, 0), 0, 0, 0, 0,16,256,16, 3, 4096, 8, 8, 8, from_cycle, trace_ok);
     281          ("memc",maptabp,maptabx,IntTab(0),IntTab(0, 0), 0, 0,16,256,16, 3, 4096, 8, 8, 8, from_cycle, trace_ok);
    282282        VciDspinTargetWrapper<vci_param, dspin_cmd_width, dspin_rsp_width>
    283283            wt_memc("wt_memc", srcid_width);
Note: See TracChangeset for help on using the changeset viewer.