Ignore:
Timestamp:
Mar 9, 2011, 4:11:43 PM (13 years ago)
Author:
kane
Message:

yAjout du multi_cache : plusieurs processeur peuvent ce partager le même cache L1.
2 remarques, (1) deux nouveaux paramètres : nb_cpu, nb_cache. Pour avoir un cache dont le comportement est identique à la version d'avant, mettre ces paramètres à 1.
(2) le port d'interruption est maintenant un tableau dépendant du nombre de processeur.
Voir le fichier "platforms/caba-ring-ccxcachev4_memcachev4-mips32el/top.cpp" pour plus de détails.

--Cette ligne, et les suivantes ci-dessous, seront ignorées--

M platforms/tsarv4_dspin_generic_32/tsarv4_dspin_generic_32_top.cpp
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/segmentation.h
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/top.cpp
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/configuration/default.cfg
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/configuration/gen_config.sh
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/dhrystone/dhry21a.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/define.h
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/matrix_multiplication/matrix_multiplication.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/common/common.c
A platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/self_code_modifying
A platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/self_code_modifying/self_code_modifying.c
A platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/self_code_modifying/self_code_modifying.h
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark.h
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark_sort.c
A platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark_self_code_modifying.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark_matrix_multiplication.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/Makefile
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/Makefile
M platforms/tsarv4_vgmn_generic_32/tsarv4_vgmn_generic_32_top.cpp
M modules/vci_cc_xcache_wrapper_v4/caba/source/include/vci_cc_xcache_wrapper_v4.h
M modules/vci_cc_xcache_wrapper_v4/caba/source/src/vci_cc_xcache_wrapper_v4.cpp
M modules/vci_mem_cache_v4/caba/source/include/vci_mem_cache_v4.h
M modules/vci_mem_cache_v4/caba/source/include/mem_cache_directory_v4.h
M modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp

File:
1 edited

Legend:

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

    r57 r140  
    66#include <cassert>
    77#include "arithmetics.h"
     8
     9#define L1_MULTI_CACHE      1
    810
    911namespace soclib { namespace caba {
     
    3739      bool      inst;       // Is the owner an ICache ?
    3840      size_t    srcid;      // The SRCID of the owner
     41#if L1_MULTI_CACHE
     42      size_t    cache_id;   // In multi_cache configuration
     43#endif
    3944
    4045    ////////////////////////
    4146    // Constructors
    4247    ////////////////////////
    43       Owner(bool i_inst,size_t i_srcid){
     48      Owner(bool   i_inst
     49            ,size_t i_srcid
     50#if L1_MULTI_CACHE
     51            ,size_t i_cache_id
     52#endif
     53            ){
    4454        inst    = i_inst;
    4555        srcid   = i_srcid;
     56#if L1_MULTI_CACHE
     57        cache_id= i_cache_id;
     58#endif
    4659      }
    4760
     
    4962        inst    = a.inst;
    5063        srcid   = a.srcid;
     64#if L1_MULTI_CACHE
     65        cache_id= a.cache_id;
     66#endif
    5167      }
    5268
     
    5470        inst    = false;
    5571        srcid   = 0;
     72#if L1_MULTI_CACHE
     73        cache_id= 0;
     74#endif
    5675      }
    5776      // end constructors
     
    89108      owner.inst    = 0;
    90109      owner.srcid   = 0;
     110#if L1_MULTI_CACHE
     111      owner.cache_id= 0;
     112#endif
    91113      ptr           = 0;
    92114    }
     
    137159    {
    138160      std::cout << "Valid = " << valid << " ; IS COUNT = " << is_cnt << " ; Dirty = " << dirty << " ; Lock = "
    139         << lock << " ; Tag = " << std::hex << tag << std::dec << " ; Count = " << count << " ; Owner = " << owner.srcid << " " << owner.inst << " ; Pointer = " << ptr << std::endl;
     161                << lock
     162                << " ; Tag = " << std::hex << tag << std::dec
     163                << " ; Count = " << count
     164                << " ; Owner = " << owner.srcid
     165#if L1_MULTI_CACHE
     166                << "." << owner.cache_id
     167#endif
     168                << " " << owner.inst
     169                << " ; Pointer = " << ptr << std::endl;
    140170    }
    141171
     
    346376    ////////////////////////
    347377      HeapEntry()
    348       :owner(false,0)
     378      :owner(false,0
     379#if L1_MULTI_CACHE
     380             ,0
     381#endif
     382             )
    349383      {
    350384        next = 0;
     
    355389    ////////////////////////
    356390      HeapEntry(const HeapEntry &entry){
     391        owner.inst  = entry.owner.inst;
    357392        owner.srcid = entry.owner.srcid;
    358         owner.inst  = entry.owner.inst;
    359         next        = entry.next;
     393#if L1_MULTI_CACHE
     394        owner.cache_id = entry.owner.cache_id;
     395#endif       
     396        next           = entry.next;
    360397      } // end constructor
    361398
     
    364401    /////////////////////////////////////////////////////////////////////
    365402      void copy(const HeapEntry &entry){
    366         owner.srcid = entry.owner.srcid;
    367         owner.inst  = entry.owner.inst;
    368         next        = entry.next;
     403        owner.inst     = entry.owner.inst;
     404        owner.srcid    = entry.owner.srcid;
     405#if L1_MULTI_CACHE
     406        owner.cache_id = entry.owner.cache_id;
     407#endif
     408        next           = entry.next;
    369409      } // end copy()
    370410
     
    374414      void print(){
    375415        std::cout
    376         << " -- owner.srcid : " << std::dec << owner.srcid << std::endl
    377         << " -- owner.inst  : " << std::dec << owner.inst << std::endl
    378         << " -- next        : " << std::dec << next << std::endl;
     416        << " -- owner.inst     : " << std::dec << owner.inst << std::endl
     417        << " -- owner.srcid    : " << std::dec << owner.srcid << std::endl
     418#if L1_MULTI_CACHE
     419        << " -- owner.cache_id : " << std::dec << owner.cache_id << std::endl
     420#endif
     421        << " -- next           : " << std::dec << next << std::endl;
    379422
    380423      } // end print()
Note: See TracChangeset for help on using the changeset viewer.