summaryrefslogtreecommitdiff
path: root/src/mem/ruby/config/defaults.rb
blob: ab717cece4e52ec834b0b53a2f60af05c2905d6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#!/usr/bin/ruby



class NetPort < LibRubyObject
  # number of transitions a SLICC state machine can transition per
  # cycle
  default_param :transitions_per_cycle, Integer, 32

  # buffer_size limits the size of all other buffers connecting to
  # SLICC Controllers.  When 0, infinite buffering is used.
  default_param :buffer_size, Integer, 32

  # added by SS for TBE
  default_param :number_of_TBEs, Integer, 256

  default_param :recycle_latency, Integer, 10
end

class Sequencer < IfacePort
  # Maximum number of requests (including prefetches) outstanding from
  # the sequencer
  default_param :max_outstanding_requests, Integer, 16

  # Maximum number of cycles a request is can be outstanding before
  # the Sequencer declares we're in deadlock/livelock
  default_param :deadlock_threshold, Integer, 500000

end

class Debug < LibRubyObject
  # For debugging purposes, one can enable a trace of all the protocol
  # state machine changes. Unfortunately, the code to generate the
  # trace is protocol specific. To enable the code for some of the
  # standard protocols,
  #   1. change protocol_trace = true
  #   2. enable debug in the Ruby Makefile
  #   3. set start_time = 1
  default_param :protocol_trace, Boolean, false

  # a string for filtering debugging output (for all g_debug vars see Debug.h)
  default_param :filter_string, String, "none"

  # filters debugging messages based on priority (low, med, high)
  default_param :verbosity_string, String, "none"

  # filters debugging messages based on a ruby time
  default_param :start_time, Integer, 1

  # sends debugging messages to a output filename
  default_param :output_filename, String, "none"
end

class Topology < LibRubyObject
  # The default link latency between all nodes (internal and external)
  # in the toplogy
  default_param :link_latency, Integer, 1

  # the bandwidth from an external network port to it's corresponding
  # internal switch
  default_param :external_bw, Integer, 64

  # the bandwitch between internal switches in the network
  default_param :internal_bw, Integer, 16

  # indicates whether the topology config will be displayed in the
  # stats file
  default_param :print_config, Boolean, true
end

class Network < LibRubyObject
  default_param :endpoint_bandwidth, Integer, 10000
  default_param :adaptive_routing, Boolean, true
  default_param :number_of_virtual_networks, Integer, 6
  default_param :fan_out_degree, Integer, 4

  # default buffer size.  Setting to 0 indicates infinite buffering
  default_param :buffer_size, Integer, 3

  # local memory latency ?? NetworkLinkLatency
  default_param :link_latency, Integer, 1

  # on chip latency
  default_param :on_chip_latency, Integer, 1
 
  default_param :control_msg_size, Integer, 8
end

class GarnetNetwork < Network
  default_param :flit_size, Integer, 16
  default_param :number_of_pipe_stages, Integer, 4
  default_param :vcs_per_class, Integer, 4
  default_param :buffer_size, Integer, 4
  default_param :using_network_testing, Boolean, false
end



#added by SS
class Tracer < LibRubyObject
  default_param :warmup_length, Integer, 1000000
end

#added by SS
class Profiler < LibRubyObject
  default_param :hot_lines, Boolean, false
  default_param :all_instructions, Boolean, false
end

#added by SS
class MemoryControl < LibRubyObject

  default_param :mem_bus_cycle_multiplier, Integer, 10
  default_param :banks_per_rank, Integer, 8
  default_param :ranks_per_dimm, Integer, 2
  default_param :dimms_per_channel, Integer, 2
  default_param :bank_bit_0, Integer, 8
  default_param :rank_bit_0, Integer, 11
  default_param :dimm_bit_0, Integer, 12
  default_param :bank_queue_size, Integer, 12
  default_param :bank_busy_time, Integer, 11
  default_param :rank_rank_delay, Integer, 1
  default_param :read_write_delay, Integer, 2
  default_param :basic_bus_busy_time, Integer, 2
  default_param :mem_ctl_latency, Integer, 12
  default_param :refresh_period, Integer, 1560
  default_param :tFaw, Integer, 0
  default_param :mem_random_arbitrate, Integer, 0
  default_param :mem_fixed_delay, Integer, 0

end

###### Protocols #######

## MI_example protocol

class MI_example_CacheController < L1CacheController
  default_param :issue_latency, Integer, 2
  default_param :cache_response_latency, Integer, 12
end

class MI_example_DirectoryController < DirectoryController
  default_param :directory_latency, Integer, 6
end

class MI_example_DMAController < DMAController
  default_param :request_latency, Integer, 6
end

## MOESI_CMP_directory protocol

class MOESI_CMP_directory_L1CacheController < L1CacheController
  default_param :request_latency, Integer, 2
end

class MOESI_CMP_directory_L2CacheController < CacheController
  default_param :request_latency, Integer, 2
  default_param :response_latency, Integer, 2
end

class MOESI_CMP_directory_DirectoryController < DirectoryController
  default_param :directory_latency, Integer, 6
end

class MOESI_CMP_directory_DMAController < DMAController
  default_param :request_latency, Integer, 14
  default_param :response_latency, Integer, 14
end

class RubySystem

  # Random seed used by the simulation. If set to "rand", the seed
  # will be set to the current wall clock at libruby
  # initialization. Otherwise, set this to an integer.
  default_param :random_seed, Object, 1234 #"rand"

  # When set to true, the simulation will insert random delays on
  # message enqueue times.  Note that even if this is set to false,
  # you can still have a non-deterministic simulation if random seed
  # is set to "rand".  This is because the Ruby swtiches use random
  # link priority elevation
  default_param :randomization, Boolean, true

  # tech_nm is the device size used to calculate latency and area
  # information about system components
  default_param :tech_nm, Integer, 45

  # default frequency for the system
  default_param :freq_mhz, Integer, 3000

  # the default cache block size in the system
  # libruby does not currently support different block sizes
  # among different caches
  # Must be a power of two
  default_param :block_size_bytes, Integer, 64

  # The default debug object. There shouldn't be a reason to ever
  # change this line.  To adjust debug paramters statically, adjust
  # them in the Debug class above.  To adjust these fields
  # dynamically, access this RubySystem object,
  # e.g. RubySystem.debug.protocol_trace = true
  default_param :debug, Debug, Debug.new("dbg0")
  default_param :tracer, Tracer, Tracer.new("tracer0")

  default_param :profiler, Profiler, Profiler.new("profiler0")
end