OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_55/] [or1ksim/] [sim.cfg] - Blame information for rev 335

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 264 markom
/* sim.cfg -- Simulator configuration script file
2
   Copyright (C) 2001, Marko Mlinar, markom@opencores.org
3 312 markom
 
4
This file includes a lot of help about configurations and default one
5 264 markom
 
6
This file is part of OpenRISC 1000 Architectural Simulator.
7
 
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
12
 
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
21
 
22 312 markom
 
23
/* INTRODUCTION
24
 
25
   The or1ksim have various parameters, which can be set in configuration
26
   files.  Multiple configurations may be used and switched between at
27
   or1ksim startup.
28
   By default, or1ksim loads condfiguration file from './sim.cfg' and if not
29
   found it checks '~/.or1k/sim.cfg'. If even this file is not found or
30
   all parameters are not defined, default configuration is used.
31
   Users should not rely on default configuration, but rather redefine all
32
   critical settings, since default configuration may differ in newer
33
   versions of the or1ksim.
34
   If multiple configurations are used, user can switch between them by
35
   supplying -f  option when starting simulator.
36
 
37
   This file may contain (standard C) only comments - no // support.
38
 
39
   Like normal configuration file, this file is divided in sections,
40
   where each section is described in detail also.
41
 
42
   Some section also have subsections. One example of such subsection is
43
   block:
44
 
45
   device 
46
     instance specific parameters...
47
   enddevice
48
 
49
   which creates a device instance.
50
*/
51
 
52
 
53
/* MEMORY SECTION
54
 
55
   This section specifies how is initial memory generated and which blocks
56
   it consist of.
57
 
58
   memory_table_file = ""
59
      loads memory table from filename. If filename does not exists in the
60
      current directory, it is loaded from ~/.or1k/.
61
      Memory table file structure is as follows:
62
        start_address1 length1 type1 [ce1 [delayr1 [delayw1]]]
63
        start_address2 length2 type2 [ce2 [delayr2 [delayw2]]]
64
        start_address3 length3 type3 [ce3 [delayr3 [delayw3]]]
65
 
66
      Example:
67
        00000100 00001F00 flash 3 100
68
        80000000 00010000 RAM
69
 
70
   type = random/unknown/pattern
71
      specifies the initial memory values. 'random' parameter generate
72
      random memory using seed 'random_seed' parameter. 'pattern' parameter
73
      fills memory with 'pattern' parameter and 'unknown' does not specify
74
      how memory should be generated - the fastest option.
75
 
76
   random_seed = 
77
      random seed for randomizer, used if type = random
78
 
79
   pattern = 
80 331 markom
      pattern to fill memory, used if type = pattern
81 312 markom
*/
82
 
83 262 markom
section memory
84
  memory_table_file = "simmem.cfg"
85 264 markom
  /*random_seed = 12345
86
  type = random*/
87 269 markom
  pattern = 0x00
88
  type = unknown /* Fastest */
89 262 markom
end
90
 
91 312 markom
 
92
/* SIM SECTION
93
 
94
  This section specifies how should sim behave.
95
 
96
  verbose = 0/1
97
      whether to print out extra messages
98
 
99
  debug = 0/1
100
      whether to print out sim debug information
101
 
102
  profile = 0/1
103
      whether to generate profiling file 'sim.profile'
104
 
105
  prof_fn = ""
106
      filename, where to generate profiling info, used
107
      only if 'profile' is set
108
 
109
  iprompt = 0/1
110
      whether we strart in interactive prompt
111
 
112
  exe_log = 0/1
113
      whether execution log should be generated
114
 
115
  exe_log_fn = ""
116
      where to put execution log in, used only if 'exe_log'
117
      is set
118 335 markom
*/
119
 
120 312 markom
section sim
121 335 markom
  /* verbose = 1 */
122 312 markom
  debug = 0
123
  profile = 0
124
  prof_fn = "sim.profile"
125
 
126
  /* iprompt = 0 */
127
  exe_log = 0
128
  exe_log_fn = "executed.log"
129
end
130
 
131
 
132
/* SECTION VAPI
133
 
134
    This section configures Verification API, used for Advanced
135
    Core Verification.
136
 
137
    enabled = 0/1
138
        whether to start VAPI server
139
 
140
    server_port = 
141
        TCP/IP port to start VAPI server on
142
*/
143
 
144
section VAPI
145
  enabled = 0
146
  server_port = 9998
147
end
148
 
149
 
150
/* CPU SECTION
151
 
152
   This section specifies various CPU parameters.
153
 
154
   ver = 
155
   rev = 
156
      specifies version and revision of the CPU used
157
 
158
   upr = 
159
      changes the upr register
160
 
161
   superscalar = 0/1
162
   hazards = 0/1
163
   history = 0/1
164
   dependstats = 0/1
165
   dependency = 0/1
166
   slp = 0/1
167
   btic = 0/1
168
   bpb = 0/1
169
      parameters for CPU analysis
170
*/
171
 
172 263 markom
section cpu
173
  ver = 0x1200
174
  rev = 0x0001
175
  /* upr = */
176
  superscalar = 0
177
  hazards = 0
178
  history = 0
179
  dependstats = 0
180
  dependency = 0
181
  slp = 0
182 304 markom
  btic = 0
183 264 markom
  bpb = 0
184 263 markom
end
185
 
186 312 markom
 
187
/* DEBUG SECTION
188
 
189
   This sections specifies how debug unit should behave.
190
 
191
   enabled = 0/1
192
      whether debug unit is enabled
193
 
194
   gdb_enabled = 0/1
195
      whether to start gdb server at 'server_port' port
196
 
197
   server_port = 
198
      TCP/IP port to start gdb server on, used only if gdb_enabled
199
      is set
200
 
201 269 markom
section debug
202 312 markom
  enabled = 0
203
  gdb_enabled = 0
204 269 markom
  server_port = 9999
205
end
206
 
207 264 markom
 
208 312 markom
/* MC SECTION
209
 
210
   This section configures the memory controller
211
 
212
   enabled = 0/1
213
      whether memory controller is enabled
214
 
215
   baseaddr = 
216
      address of first MC register
217
 
218
   POC = 
219
      Power On Configuration register
220
*/
221
 
222 243 markom
section mc
223 304 markom
  enabled = 0
224 261 markom
  baseaddr = 0xa0000000
225
  POC = 0x00000008                 /* Power on configuration register */
226 243 markom
end
227 261 markom
 
228 312 markom
 
229
/* UART SECTION
230
 
231
   This section configures UARTs
232
 
233
   enabled = 0/1
234
      whether uarts are enabled
235
 
236
   nuarts = 
237
      make specified number of instances, configure each
238
      instance within device - enddevice construct.
239
 
240
   instance specific:
241
     baseaddr = 
242
        address of first UART register for this device
243
 
244
     rx_file = ""
245
        filename, where to read data from
246
 
247
     tx_file = ""
248
        filename, where to write data to
249 332 markom
 
250
     irq = 
251
        irq number for this device
252 312 markom
 
253
     jitter = 
254
        in msecs... time to block, -1 to disable it
255 313 markom
 
256
     vapi_id = 
257
        VAPI id of this instance
258 312 markom
*/
259
 
260 261 markom
section uart
261 304 markom
  enabled = 0
262 261 markom
  nuarts = 1
263
 
264
  device 0
265
    baseaddr = 0x80000000
266 332 markom
    irq = 2
267 261 markom
    rxfile = "/tmp/uart0.rx"
268
    txfile = "/tmp/uart0.tx"
269
    jitter = -1                     /* async behaviour */
270
  enddevice
271
end
272
 
273 312 markom
 
274
/* DMA SECTION
275
 
276
   This section configures DMAs
277
 
278
   enabled = 0/1
279
      whether DMAs are enabled
280
 
281
   ndmas = 
282
      make specified number of instances, configure each
283
      instance within device - enddevice construct.
284
 
285
   instance specific:
286
     baseaddr = 
287
        address of first DMA register for this device
288
 
289
     irq = 
290
        irq number for this device
291 313 markom
 
292
     vapi_id = 
293
        VAPI id of this instance
294 312 markom
*/
295
 
296 261 markom
section dma
297 304 markom
  enabled = 0
298 261 markom
  ndmas = 1
299
 
300
  device 0
301
    baseaddr = 0x90000000
302
    irq = 4
303
  enddevice
304
end
305 293 markom
 
306 304 markom
 
307 312 markom
/* ETHERNET SECTION
308
 
309
   This section configures ethernets
310
 
311
   enabled = 0/1
312
      whether ethernets are enabled
313
 
314
   nethernets = 
315
      make specified number of instances, configure each
316
      instance within device - enddevice construct.
317
 
318
   instance specific:
319
     baseaddr = 
320
        address of first ethernet register for this device
321
 
322
     dma = 
323
        which controller is this ethernet "connected" to
324
 
325
     rx_channel = 
326
        DMA channel used for RX
327
 
328
     tx_channel = 
329
        DMA channel used for TX
330
 
331
     rx_file = ""
332
        filename, where to read data from
333
 
334
     tx_file = ""
335
        filename, where to write data to
336 313 markom
 
337
     vapi_id = 
338
        VAPI id of this instance
339 312 markom
*/
340
 
341 304 markom
section ethernet
342
  enabled = 0
343 310 markom
  nethernets = 1
344
 
345
  device 0
346
    baseaddr = 0x88000000
347
    dma = 0
348
    tx_channel = 0
349
    rx_channel = 1
350
    rxfile = "/tmp/eth0.rx"
351
    txfile = "/tmp/eth0.tx"
352
  enddevice
353 304 markom
end
354 332 markom
 
355
/* TICK TIMER SECTION
356
 
357
    This section configures tick timer
358
 
359
    enabled = 0/1
360
      whether tick timer is enabled
361
 
362
    irq = 
363
      irq number
364
*/
365
 
366
section tick
367
  enabled = 0
368
  irq = 3
369
end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.