Exemplo n.º 1
0
    def __init__(
        self, l2_size, l2_assoc, network, num_l2Caches, cache_line_size
    ):
        super().__init__(network, cache_line_size)

        # This is the cache memory object that stores the cache data and tags
        self.L2cache = RubyCache(
            size=l2_size,
            assoc=l2_assoc,
            start_index_bit=self.getIndexBit(num_l2Caches),
        )

        self.transitions_per_cycle = "4"
Exemplo n.º 2
0
    def __init__(
        self,
        l1i_size,
        l1i_assoc,
        l1d_size,
        l1d_assoc,
        network,
        core: AbstractCore,
        num_l2Caches,
        cache_line_size,
        target_isa: ISA,
        clk_domain: ClockDomain,
    ):
        """Creating L1 cache controller. Consist of both instruction
        and data cache.
        """
        super(L1Cache, self).__init__(network, cache_line_size)

        # This is the cache memory object that stores the cache data and tags
        self.L1Icache = RubyCache(
            size=l1i_size,
            assoc=l1i_assoc,
            start_index_bit=self.getBlockSizeBits(),
            is_icache=True,
        )
        self.L1Dcache = RubyCache(
            size=l1d_size,
            assoc=l1d_assoc,
            start_index_bit=self.getBlockSizeBits(),
            is_icache=False,
        )
        self.l2_select_num_bits = int(math.log(num_l2Caches, 2))
        self.clk_domain = clk_domain
        self.prefetcher = RubyPrefetcher()
        self.send_evictions = self.sendEvicts(core=core, target_isa=target_isa)
        self.transitions_per_cycle = 4
        self.enable_prefetch = False
Exemplo n.º 3
0
    def __init__(
        self,
        network: RubyNetwork,
        cache_line_size: int,
        clk_domain: ClockDomain,
    ):
        super().__init__(network, cache_line_size)

        # Dummy cache
        self.cache = RubyCache(dataAccessLatency=0,
                               tagAccessLatency=1,
                               size="128",
                               assoc=1)

        self.clk_domain = clk_domain

        # Only used for L1 controllers
        self.send_evictions = False
        self.sequencer = NULL

        self.use_prefetcher = False

        # Set up home node that allows three hop protocols
        self.is_HN = True
        self.enable_DMT = True
        self.enable_DCT = True

        # "Owned state"
        self.allow_SD = True

        # No cache
        self.alloc_on_seq_acc = False
        self.alloc_on_seq_line_write = False
        self.alloc_on_readshared = False
        self.alloc_on_readunique = False
        self.alloc_on_readonce = False
        self.alloc_on_writeback = False
        self.dealloc_on_unique = False
        self.dealloc_on_shared = False
        self.dealloc_backinv_unique = False
        self.dealloc_backinv_shared = False

        # Some reasonable default TBE params
        self.number_of_TBEs = 32
        self.number_of_repl_TBEs = 32
        self.number_of_snoop_TBEs = 1
        self.unify_repl_TBEs = False
Exemplo n.º 4
0
    def __init__(
        self,
        size: str,
        assoc: int,
        network: RubyNetwork,
        core: AbstractCore,
        cache_line_size,
        target_isa: ISA,
        clk_domain: ClockDomain,
    ):
        super().__init__(network, cache_line_size)

        self.cache = RubyCache(size=size,
                               assoc=assoc,
                               start_index_bit=self.getBlockSizeBits())

        self.clk_domain = clk_domain
        self.send_evictions = self.sendEvicts(core=core, target_isa=target_isa)
        self.use_prefetcher = False

        # Only applies to home nodes
        self.is_HN = False
        self.enable_DMT = False
        self.enable_DCT = False

        # MOESI states for a 1 level cache
        self.allow_SD = True
        self.alloc_on_seq_acc = True
        self.alloc_on_seq_line_write = False
        self.alloc_on_readshared = True
        self.alloc_on_readunique = True
        self.alloc_on_readonce = True
        self.alloc_on_writeback = False  # Should never happen in an L1
        self.dealloc_on_unique = False
        self.dealloc_on_shared = False
        self.dealloc_backinv_unique = True
        self.dealloc_backinv_shared = True
        # Some reasonable default TBE params
        self.number_of_TBEs = 16
        self.number_of_repl_TBEs = 16
        self.number_of_snoop_TBEs = 4
        self.unify_repl_TBEs = False
Exemplo n.º 5
0
    def __init__(
        self,
        network,
        cache_line_size,
        clk_domain: ClockDomain,
    ):
        super().__init__(network, cache_line_size)

        # Dummy cache
        self.cache = RubyCache(dataAccessLatency=0,
                               tagAccessLatency=1,
                               size="128",
                               assoc=1)

        self.clk_domain = clk_domain

        # Only applies to home nodes
        self.is_HN = False
        self.enable_DMT = False
        self.enable_DCT = False

        # No cache
        self.allow_SD = False
        self.alloc_on_seq_acc = False
        self.alloc_on_seq_line_write = False
        self.alloc_on_readshared = False
        self.alloc_on_readunique = False
        self.alloc_on_readonce = False
        self.alloc_on_writeback = False
        self.dealloc_on_unique = False
        self.dealloc_on_shared = False
        self.dealloc_backinv_unique = True
        self.dealloc_backinv_shared = True

        self.send_evictions = False
        self.use_prefetcher = False
        # Some reasonable default TBE params
        self.number_of_TBEs = 16
        self.number_of_repl_TBEs = 1
        self.number_of_snoop_TBEs = 1  # Should never receive snoops
        self.unify_repl_TBEs = False