Skip to content
Snippets Groups Projects
  • Mahmoud Mandour's avatar
    14f3110a
    plugins/cache: implement unified L2 cache emulation · 14f3110a
    Mahmoud Mandour authored
    
    This adds an implementation of a simple L2 configuration, in which a
    unified L2 cache (stores both blocks of instructions and data) is
    maintained for each core separately, with no inter-core interaction
    taken in account. The L2 cache is used as a backup for L1 and is only
    accessed if the wanted block does not exist in L1.
    
    In terms of multi-threaded user-space emulation, the same approximation
    of L1 is done, a static number of caches is maintained, and each and
    every memory access initiated by a thread will have to go through one of
    the available caches.
    
    An atomic increment is used to maintain the number of L2 misses per
    instruction.
    
    The default cache parameters of L2 caches is:
    
        2MB cache size
        16-way associativity
        64-byte blocks
    
    Signed-off-by: default avatarMahmoud Mandour <ma.mandourr@gmail.com>
    Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    Message-Id: <20210810134844.166490-3-ma.mandourr@gmail.com>
    Message-Id: <20211026102234.3961636-15-alex.bennee@linaro.org>
    14f3110a
    History
    plugins/cache: implement unified L2 cache emulation
    Mahmoud Mandour authored
    
    This adds an implementation of a simple L2 configuration, in which a
    unified L2 cache (stores both blocks of instructions and data) is
    maintained for each core separately, with no inter-core interaction
    taken in account. The L2 cache is used as a backup for L1 and is only
    accessed if the wanted block does not exist in L1.
    
    In terms of multi-threaded user-space emulation, the same approximation
    of L1 is done, a static number of caches is maintained, and each and
    every memory access initiated by a thread will have to go through one of
    the available caches.
    
    An atomic increment is used to maintain the number of L2 misses per
    instruction.
    
    The default cache parameters of L2 caches is:
    
        2MB cache size
        16-way associativity
        64-byte blocks
    
    Signed-off-by: default avatarMahmoud Mandour <ma.mandourr@gmail.com>
    Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    Message-Id: <20210810134844.166490-3-ma.mandourr@gmail.com>
    Message-Id: <20211026102234.3961636-15-alex.bennee@linaro.org>
cache.c 23.01 KiB