MOESI_CMP_token.py (7538:5691b9dd51f4) MOESI_CMP_token.py (7539:9ca6602c5345)
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# Copyright (c) 2009 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

40
41#
42# Note: the L2 Cache latency is not currently used
43#
44class L2Cache(RubyCache):
45 latency = 15
46
47def define_options(parser):
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# Copyright (c) 2009 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

40
41#
42# Note: the L2 Cache latency is not currently used
43#
44class L2Cache(RubyCache):
45 latency = 15
46
47def define_options(parser):
48 return
48 parser.add_option("--l1-retries", type="int", default=1,
49 help="Token_CMP: # of l1 retries before going persistent")
50 parser.add_option("--timeout-latency", type="int", default=300,
51 help="Token_CMP: cycles until issuing again");
52 parser.add_option("--disable-dyn-timeouts", action="store_true",
53 help="Token_CMP: disable dyanimc timeouts, use fixed latency instead")
49
50def create_system(options, phys_mem, piobus, dma_devices):
51
52 if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
53 panic("This script requires the MOESI_CMP_token protocol to be built.")
54
55 #
56 # number of tokens that the owner passes to requests so that shared blocks can

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

94 cpu_seq.pio_port = piobus.port
95
96 l1_cntrl = L1Cache_Controller(version = i,
97 sequencer = cpu_seq,
98 L1IcacheMemory = l1i_cache,
99 L1DcacheMemory = l1d_cache,
100 l2_select_num_bits = \
101 math.log(options.num_l2caches, 2),
54
55def create_system(options, phys_mem, piobus, dma_devices):
56
57 if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
58 panic("This script requires the MOESI_CMP_token protocol to be built.")
59
60 #
61 # number of tokens that the owner passes to requests so that shared blocks can

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

99 cpu_seq.pio_port = piobus.port
100
101 l1_cntrl = L1Cache_Controller(version = i,
102 sequencer = cpu_seq,
103 L1IcacheMemory = l1i_cache,
104 L1DcacheMemory = l1d_cache,
105 l2_select_num_bits = \
106 math.log(options.num_l2caches, 2),
102 N_tokens = n_tokens)
107 N_tokens = n_tokens,
108 retry_threshold = options.l1_retries,
109 fixed_timeout_latency = \
110 options.timeout_latency,
111 dynamic_timeout_enabled = \
112 not options.disable_dyn_timeouts)
113
103 #
104 # Add controllers and sequencers to the appropriate lists
105 #
106 cpu_sequencers.append(cpu_seq)
107 l1_cntrl_nodes.append(l1_cntrl)
108
109 for i in xrange(options.num_l2caches):
110 #

--- 54 unchanged lines hidden ---
114 #
115 # Add controllers and sequencers to the appropriate lists
116 #
117 cpu_sequencers.append(cpu_seq)
118 l1_cntrl_nodes.append(l1_cntrl)
119
120 for i in xrange(options.num_l2caches):
121 #

--- 54 unchanged lines hidden ---