MESI_Three_Level.py (12976:125099a94768) MESI_Three_Level.py (13731:67cd980cb20f)
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# Copyright (c) 2009,2015 Advanced Micro Devices, Inc.
3# Copyright (c) 2013 Mark D. Hill and David A. Wood
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 69 unchanged lines hidden (view full) ---

78 l2_bits = int(math.log(num_l2caches_per_cluster, 2))
79 block_size_bits = int(math.log(options.cacheline_size, 2))
80 l2_index_start = block_size_bits + l2_bits
81
82 #
83 # Must create the individual controllers before the network to ensure the
84 # controller constructors are called before the network constructor
85 #
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# Copyright (c) 2009,2015 Advanced Micro Devices, Inc.
3# Copyright (c) 2013 Mark D. Hill and David A. Wood
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 69 unchanged lines hidden (view full) ---

78 l2_bits = int(math.log(num_l2caches_per_cluster, 2))
79 block_size_bits = int(math.log(options.cacheline_size, 2))
80 l2_index_start = block_size_bits + l2_bits
81
82 #
83 # Must create the individual controllers before the network to ensure the
84 # controller constructors are called before the network constructor
85 #
86 for i in xrange(options.num_clusters):
87 for j in xrange(num_cpus_per_cluster):
86 for i in range(options.num_clusters):
87 for j in range(num_cpus_per_cluster):
88 #
89 # First create the Ruby objects associated with this cpu
90 #
91 l0i_cache = L0Cache(size = '4096B', assoc = 1, is_icache = True,
92 start_index_bit = block_size_bits,
93 replacement_policy = LRUReplacementPolicy())
94
95 l0d_cache = L0Cache(size = '4096B', assoc = 1, is_icache = False,

--- 63 unchanged lines hidden (view full) ---

159 l1_cntrl.unblockToL2.master = ruby_system.network.slave
160
161 l1_cntrl.requestFromL2 = MessageBuffer()
162 l1_cntrl.requestFromL2.slave = ruby_system.network.master
163 l1_cntrl.responseFromL2 = MessageBuffer()
164 l1_cntrl.responseFromL2.slave = ruby_system.network.master
165
166
88 #
89 # First create the Ruby objects associated with this cpu
90 #
91 l0i_cache = L0Cache(size = '4096B', assoc = 1, is_icache = True,
92 start_index_bit = block_size_bits,
93 replacement_policy = LRUReplacementPolicy())
94
95 l0d_cache = L0Cache(size = '4096B', assoc = 1, is_icache = False,

--- 63 unchanged lines hidden (view full) ---

159 l1_cntrl.unblockToL2.master = ruby_system.network.slave
160
161 l1_cntrl.requestFromL2 = MessageBuffer()
162 l1_cntrl.requestFromL2.slave = ruby_system.network.master
163 l1_cntrl.responseFromL2 = MessageBuffer()
164 l1_cntrl.responseFromL2.slave = ruby_system.network.master
165
166
167 for j in xrange(num_l2caches_per_cluster):
167 for j in range(num_l2caches_per_cluster):
168 l2_cache = L2Cache(size = options.l2_size,
169 assoc = options.l2_assoc,
170 start_index_bit = l2_index_start)
171
172 l2_cntrl = L2Cache_Controller(
173 version = i * num_l2caches_per_cluster + j,
174 L2cache = l2_cache, cluster_id = i,
175 transitions_per_cycle = options.ports,

--- 91 unchanged lines hidden ---
168 l2_cache = L2Cache(size = options.l2_size,
169 assoc = options.l2_assoc,
170 start_index_bit = l2_index_start)
171
172 l2_cntrl = L2Cache_Controller(
173 version = i * num_l2caches_per_cluster + j,
174 L2cache = l2_cache, cluster_id = i,
175 transitions_per_cycle = options.ports,

--- 91 unchanged lines hidden ---