ruby: added random seed option to config scripts
[gem5.git] / src / mem / ruby / config / defaults.rb
1 #!/usr/bin/ruby
2
3
4
5 class NetPort < LibRubyObject
6 # number of transitions a SLICC state machine can transition per
7 # cycle
8 default_param :transitions_per_cycle, Integer, 32
9
10 # buffer_size limits the size of all other buffers connecting to
11 # SLICC Controllers. When 0, infinite buffering is used.
12 default_param :buffer_size, Integer, 32
13
14 # added by SS for TBE
15 default_param :number_of_TBEs, Integer, 256
16
17 default_param :recycle_latency, Integer, 10
18 end
19
20 class Sequencer < IfacePort
21 # Maximum number of requests (including prefetches) outstanding from
22 # the sequencer
23 default_param :max_outstanding_requests, Integer, 16
24
25 # Maximum number of cycles a request is can be outstanding before
26 # the Sequencer declares we're in deadlock/livelock
27 default_param :deadlock_threshold, Integer, 500000
28
29 end
30
31 class Debug < LibRubyObject
32 # For debugging purposes, one can enable a trace of all the protocol
33 # state machine changes. Unfortunately, the code to generate the
34 # trace is protocol specific. To enable the code for some of the
35 # standard protocols,
36 # 1. change protocol_trace = true
37 # 2. enable debug in the Ruby Makefile
38 # 3. set start_time = 1
39 default_param :protocol_trace, Boolean, false
40
41 # a string for filtering debugging output (for all g_debug vars see Debug.h)
42 default_param :filter_string, String, "none"
43
44 # filters debugging messages based on priority (low, med, high)
45 default_param :verbosity_string, String, "none"
46
47 # filters debugging messages based on a ruby time
48 default_param :start_time, Integer, 1
49
50 # sends debugging messages to a output filename
51 default_param :output_filename, String, "none"
52 end
53
54 class Topology < LibRubyObject
55 # The default link latency between all nodes (internal and external)
56 # in the toplogy
57 default_param :link_latency, Integer, 1
58
59 # the bandwidth from an external network port to it's corresponding
60 # internal switch
61 default_param :external_bw, Integer, 64
62
63 # the bandwitch between internal switches in the network
64 default_param :internal_bw, Integer, 16
65
66 # indicates whether the topology config will be displayed in the
67 # stats file
68 default_param :print_config, Boolean, true
69 end
70
71 class Network < LibRubyObject
72 default_param :endpoint_bandwidth, Integer, 10000
73 default_param :adaptive_routing, Boolean, true
74 default_param :number_of_virtual_networks, Integer, 6
75 default_param :fan_out_degree, Integer, 4
76
77 # default buffer size. Setting to 0 indicates infinite buffering
78 default_param :buffer_size, Integer, 3
79
80 # local memory latency ?? NetworkLinkLatency
81 default_param :link_latency, Integer, 1
82
83 # on chip latency
84 default_param :on_chip_latency, Integer, 1
85
86 default_param :control_msg_size, Integer, 8
87 end
88
89 class GarnetNetwork < Network
90 default_param :flit_size, Integer, 16
91 default_param :number_of_pipe_stages, Integer, 4
92 default_param :vcs_per_class, Integer, 4
93 default_param :buffer_size, Integer, 4
94 default_param :using_network_testing, Boolean, false
95 end
96
97
98
99 #added by SS
100 class Tracer < LibRubyObject
101 default_param :warmup_length, Integer, 1000000
102 end
103
104 #added by SS
105 class Profiler < LibRubyObject
106 default_param :hot_lines, Boolean, false
107 default_param :all_instructions, Boolean, false
108 end
109
110 #added by SS
111 class MemoryControl < LibRubyObject
112
113 default_param :mem_bus_cycle_multiplier, Integer, 10
114 default_param :banks_per_rank, Integer, 8
115 default_param :ranks_per_dimm, Integer, 2
116 default_param :dimms_per_channel, Integer, 2
117 default_param :bank_bit_0, Integer, 8
118 default_param :rank_bit_0, Integer, 11
119 default_param :dimm_bit_0, Integer, 12
120 default_param :bank_queue_size, Integer, 12
121 default_param :bank_busy_time, Integer, 11
122 default_param :rank_rank_delay, Integer, 1
123 default_param :read_write_delay, Integer, 2
124 default_param :basic_bus_busy_time, Integer, 2
125 default_param :mem_ctl_latency, Integer, 12
126 default_param :refresh_period, Integer, 1560
127 default_param :tFaw, Integer, 0
128 default_param :mem_random_arbitrate, Integer, 0
129 default_param :mem_fixed_delay, Integer, 0
130
131 end
132
133 ###### Protocols #######
134
135 ## MI_example protocol
136
137 class MI_example_CacheController < L1CacheController
138 default_param :issue_latency, Integer, 2
139 default_param :cache_response_latency, Integer, 12
140 end
141
142 class MI_example_DirectoryController < DirectoryController
143 default_param :directory_latency, Integer, 6
144 end
145
146 class MI_example_DMAController < DMAController
147 default_param :request_latency, Integer, 6
148 end
149
150 ## MOESI_CMP_directory protocol
151
152 class MOESI_CMP_directory_L1CacheController < L1CacheController
153 default_param :request_latency, Integer, 2
154 end
155
156 class MOESI_CMP_directory_L2CacheController < CacheController
157 default_param :request_latency, Integer, 2
158 default_param :response_latency, Integer, 2
159 end
160
161 class MOESI_CMP_directory_DirectoryController < DirectoryController
162 default_param :directory_latency, Integer, 6
163 end
164
165 class MOESI_CMP_directory_DMAController < DMAController
166 default_param :request_latency, Integer, 6
167 default_param :response_latency, Integer, 6
168 end
169
170 class RubySystem
171
172 # Random seed used by the simulation. If set to "rand", the seed
173 # will be set to the current wall clock at libruby
174 # initialization. Otherwise, set this to an integer.
175 default_param :random_seed, Object, 1234 #"rand"
176
177 # When set to true, the simulation will insert random delays on
178 # message enqueue times. Note that even if this is set to false,
179 # you can still have a non-deterministic simulation if random seed
180 # is set to "rand". This is because the Ruby swtiches use random
181 # link priority elevation
182 default_param :randomization, Boolean, false
183
184 # tech_nm is the device size used to calculate latency and area
185 # information about system components
186 default_param :tech_nm, Integer, 45
187
188 # default frequency for the system
189 default_param :freq_mhz, Integer, 3000
190
191 # the default cache block size in the system
192 # libruby does not currently support different block sizes
193 # among different caches
194 # Must be a power of two
195 default_param :block_size_bytes, Integer, 64
196
197 # The default debug object. There shouldn't be a reason to ever
198 # change this line. To adjust debug paramters statically, adjust
199 # them in the Debug class above. To adjust these fields
200 # dynamically, access this RubySystem object,
201 # e.g. RubySystem.debug.protocol_trace = true
202 default_param :debug, Debug, Debug.new("dbg0")
203 default_param :tracer, Tracer, Tracer.new("tracer0")
204
205 default_param :profiler, Profiler, Profiler.new("profiler0")
206 end
207