Ignore:
Timestamp:
Apr 4, 2013, 2:36:54 PM (11 years ago)
Author:
joannou
Message:

Got rid of intermediate v5 version. _dspin_coherence versions changed to main version for v5. Changed components names and platforms to fit the new names

Location:
branches/v5/platforms/tsar_generic_mmu
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/v5/platforms/tsar_generic_mmu/tsar_cluster_mmu/caba/source/src/tsar_cluster_mmu.cpp

    r343 r351  
    4242         size_t                             cluster_id,
    4343         const soclib::common::MappingTable &mtd,
    44          const soclib::common::MappingTable &mtc,
    4544         const soclib::common::MappingTable &mtx,
    4645         size_t                             x_width,
    4746         size_t                             y_width,
     47         size_t                             l_width,
    4848         size_t                             tgtid_memc,
    4949         size_t                             tgtid_xicu,
     
    106106                      cluster_id*nb_procs + p,
    107107                      mtd,                            // Mapping Table Direct
    108                       mtc,                            // Mapping Table Coherence
    109108                      IntTab(cluster_id,p),           // SRCID_D
    110                       IntTab(cluster_id,p),           // SRCID_C
    111                       IntTab(cluster_id,p),           // TGTID_C
     109                      (cluster_id << l_width) + p,    // CC_GLOBAL_ID
    112110                      8,                              // ITLB ways
    113111                      8,                              // ITLB sets
     
    120118                      x_width,
    121119                      y_width,
    122                       nb_procs,                       // MEMC local index
    123120                      frozen_cycles,                  // max frozen cycles
    124121                      debug_start_cycle,
     
    132129    memc = new VciMemCache<vci_param>(
    133130                     smemc.str().c_str(),
    134                      mtd, mtc, mtx,
     131                     mtd, mtx,
    135132                     IntTab(cluster_id),              // SRCID_X
    136                      IntTab(cluster_id, nb_procs),    // SRCID_C
    137133                     IntTab(cluster_id, tgtid_memc),  // TGTID_D
    138                      IntTab(cluster_id, nb_procs),    // TGTID_C
     134                     (cluster_id << l_width) + nb_procs, // CC_GLOBAL_ID
    139135                     memc_ways, memc_sets, 16,        // CACHE SIZE
    140                      //4096,                            // HEAP SIZE
     136                     3,                                  // MAX NUMBER OF COPIES
    141137                     256,                            // HEAP SIZE
    142138                     8,                               // TRANSACTION TABLE DEPTH
     
    205201    sc << "ringc_" << x_id << "_" << y_id;
    206202        //ringc = new soclib::caba::DspinLocalRingFastC<vci_param, 40, 33>(sc.str().c_str(),mtc, IntTab(cluster_id), 2, 2, 2, nb_procs + 1, x_width, y_width);
    207         ringc = new soclib::caba::DspinLocalRingFastC<vci_param, 40, 33>(sc.str().c_str(),mtc, IntTab(cluster_id), 2, 2, 1, nb_procs, x_width, y_width);
     203        //
     204   // coherence network
     205   // - tgtid_c_proc = srcid_c_proc = local procid
     206   // - tgtid_c_memc = srcid_c_memc = NB_PROCS_MAX
     207#define address_width         32
     208#define srcid_width           14
     209#include "../../../../giet_vm/hard_config.h"
     210#define cluster(x,y)   (y + CLUSTER_Y*x)
     211   MappingTable maptabc(address_width,
     212         IntTab(x_width + y_width, srcid_width - x_width - y_width),
     213         IntTab(x_width + y_width, srcid_width - x_width - y_width),
     214         0x00FF0000);
     215
     216   for (size_t x = 0; x < CLUSTER_X; x++)
     217   {
     218      for (size_t y = 0; y < CLUSTER_Y; y++)
     219      {
     220         sc_uint<address_width> offset  = cluster(x,y) << (address_width-x_width-y_width);
     221
     222         // cleanup requests must be routed to the memory cache
     223         std::ostringstream sh;
     224         sh << "c_seg_memc_" << x << "_" << y;
     225         maptabc.add(Segment(sh.str(), (NB_PROCS_MAX << (address_width - srcid_width)) + offset,
     226                     0x10, IntTab(cluster(x,y), NB_PROCS_MAX), false));
     227
     228         // update & invalidate requests must be routed to the proper processor
     229         for ( size_t p = 0 ; p < NB_PROCS_MAX ; p++)
     230         {
     231            std::ostringstream sp;
     232            sp << "c_seg_proc_" << x << "_" << y << "_" << p;
     233            maptabc.add( Segment( sp.str() , (p << (address_width - srcid_width)) + offset ,
     234                         0x10 , IntTab(cluster(x,y), p) , false));
     235         }
     236      }
     237   }
     238   std::cout << maptabc << std::endl;
     239        //
     240        //
     241        //
     242        ringc = new soclib::caba::DspinLocalRingFastC<vci_param, 40, 33>(sc.str().c_str(),maptabc, IntTab(cluster_id), 2, 2, 1, nb_procs, x_width, y_width);
    208243
    209244    std::cout << "  - building wrappers in cluster_" << x_id << "_" << y_id << std::endl;
     
    405440        proc[p]->p_clk                      (this->p_clk);
    406441        proc[p]->p_resetn                   (this->p_resetn);
    407         proc[p]->p_vci_ini_d                (signal_vci_ini_d_proc[p]);
     442        proc[p]->p_vci                      (signal_vci_ini_d_proc[p]);
    408443        proc[p]->p_dspin_in                 (signal_dspin_c_to_proc[p]);
    409444        proc[p]->p_dspin_out                (signal_dspin_c_from_proc[p]);
Note: See TracChangeset for help on using the changeset viewer.