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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc1/] [or1ksim/] [sim.cfg] - Blame information for rev 427

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
   type = random/unknown/pattern
59
      specifies the initial memory values. 'random' parameter generate
60
      random memory using seed 'random_seed' parameter. 'pattern' parameter
61
      fills memory with 'pattern' parameter and 'unknown' does not specify
62
      how memory should be generated - the fastest option.
63
 
64
   random_seed = 
65
      random seed for randomizer, used if type = random
66
 
67
   pattern = 
68 331 markom
      pattern to fill memory, used if type = pattern
69 424 markom
 
70
   nmemories = 
71
      number of memory instances connected
72
 
73
   instance specific:
74
     baseaddr = 
75
        memory start address
76
 
77
     size = 
78
        memory size
79
 
80
     name = ""
81
        memory block name
82
 
83
     ce = 
84
        chip enable index of the memory instance
85
 
86
     delayr = 
87
        cycles, required for read access, -1 if instance does not support reading
88
 
89
     delayw = 
90
        cycles, required for write access, -1 if instance does not support writing
91
 
92
     16550 = 0/1
93
        0, if this device is uart 16450 and 1, if it is 16550
94
 
95
     log = ""
96
        filename, where to log memory accesses to, no log, if log command is not specified
97 312 markom
*/
98
 
99 262 markom
section memory
100 264 markom
  /*random_seed = 12345
101
  type = random*/
102 269 markom
  pattern = 0x00
103
  type = unknown /* Fastest */
104 424 markom
 
105
  nmemories = 2
106
  device 0
107
    name = "RAM"
108
    ce = 0
109
    baseaddr = 0x00000000
110
    size = 0x00100000
111
    delayr = 10
112
    delayw = -1
113
  enddevice
114
 
115
  device 1
116
    name = "FLASH"
117
    ce = 1
118
    baseaddr = 0x40000000
119
    size = 0x00100000
120
    delayr = 2
121
    delayw = 4
122
  enddevice
123 262 markom
end
124
 
125 427 markom
/* IMMU SECTION
126 312 markom
 
127 427 markom
    This section configures Instruction Memory Menangement Unit
128
 
129
    enabled = 0/1
130
       whether IMMU is enabled
131
 
132
    nsets = 
133
       number of ITLB sets; must be power of two
134
 
135
    nways = 
136
       number of ITLB ways
137
 
138
    pagesize = 
139
       instruction page size; must be power of two
140
 
141
    entrysize = 
142
       instruction entry size in bytes
143
 
144
    ustates = 
145
       number of ITLB usage states (2, 3, 4 etc., max is 4)
146
*/
147
 
148
section immu
149
  enabled = 0
150
  nsets = 32
151
  nways = 1
152
  pagesize = 4096
153
end
154
 
155
/* DMMU SECTION
156
 
157
    This section configures Data Memory Menangement Unit
158
 
159
    enabled = 0/1
160
       whether DMMU is enabled
161
 
162
    nsets = 
163
       number of DTLB sets; must be power of two
164
 
165
    nways = 
166
       number of DTLB ways
167
 
168
    pagesize = 
169
       data page size; must be power of two
170
 
171
    entrysize = 
172
       data entry size in bytes
173
 
174
    ustates = 
175
       number of DTLB usage states (2, 3, 4 etc., max is 4)
176
*/
177
 
178
section dmmu
179
  enabled = 0
180
  nsets = 32
181
  nways = 1
182
  pagesize = 4096
183
end
184
 
185 312 markom
/* SIM SECTION
186
 
187
  This section specifies how should sim behave.
188
 
189
  verbose = 0/1
190
      whether to print out extra messages
191
 
192 344 markom
  debug = 0-9
193
      = 0 disabled debug messages
194
      1-9 level of sim debug information, greater the number more verbose is
195
          the output
196 312 markom
 
197
  profile = 0/1
198
      whether to generate profiling file 'sim.profile'
199
 
200
  prof_fn = ""
201
      filename, where to generate profiling info, used
202
      only if 'profile' is set
203 394 markom
 
204
  history = 0/1
205
      whether instruction execution flow is tracked for
206
      display by simulator hist command. Useful for
207
      back-trace debugging.
208
 
209 312 markom
  iprompt = 0/1
210
      whether we strart in interactive prompt
211
 
212
  exe_log = 0/1
213
      whether execution log should be generated
214
 
215
  exe_log_fn = ""
216
      where to put execution log in, used only if 'exe_log'
217
      is set
218 335 markom
*/
219
 
220 312 markom
section sim
221 335 markom
  /* verbose = 1 */
222 312 markom
  debug = 0
223
  profile = 0
224
  prof_fn = "sim.profile"
225
 
226 394 markom
  history = 1
227 312 markom
  /* iprompt = 0 */
228
  exe_log = 0
229
  exe_log_fn = "executed.log"
230
end
231
 
232
 
233
/* SECTION VAPI
234
 
235
    This section configures Verification API, used for Advanced
236
    Core Verification.
237
 
238
    enabled = 0/1
239
        whether to start VAPI server
240
 
241
    server_port = 
242
        TCP/IP port to start VAPI server on
243 355 markom
 
244
    log_enabled = 0/1
245
       whether logging of VAPI requests is enabled
246
 
247
    vapi_fn = 
248
       specifies filename where to log into, if log_enabled is selected
249 312 markom
*/
250
 
251
section VAPI
252
  enabled = 0
253
  server_port = 9998
254 355 markom
  log_enabled = 0
255 427 markom
  vapi_log_fn = "vapi.log"
256 312 markom
end
257
 
258
 
259
/* CPU SECTION
260
 
261
   This section specifies various CPU parameters.
262
 
263
   ver = 
264
   rev = 
265
      specifies version and revision of the CPU used
266
 
267
   upr = 
268
      changes the upr register
269
 
270
   superscalar = 0/1
271 388 lampret
      whether CPU is scalar or superscalar
272
      (modify cpu/or32/execute.c to tune superscalar model)
273
 
274 312 markom
   hazards = 0/1
275 388 lampret
      whether data hazards are tracked in superscalar CPU
276
      and displayed by the simulator r command
277
 
278 312 markom
   dependstats = 0/1
279 388 lampret
      whether inter-instruction dependencies are calculated
280
      and displayed by simulator stats command.
281
 
282 312 markom
   slp = 0/1
283 388 lampret
      calculation of subroutine level parallelism. Displayed
284
      by simulator stats command.
285
 
286 312 markom
   btic = 0/1
287 388 lampret
      enable branch target instruction cache model
288
 
289 312 markom
   bpb = 0/1
290 388 lampret
      enable branch prediction buffer model
291
 
292 312 markom
      parameters for CPU analysis
293
*/
294
 
295 263 markom
section cpu
296
  ver = 0x1200
297
  rev = 0x0001
298
  /* upr = */
299
  superscalar = 0
300
  hazards = 0
301
  dependstats = 0
302
  slp = 0
303 304 markom
  btic = 0
304 264 markom
  bpb = 0
305 263 markom
end
306
 
307 312 markom
 
308
/* DEBUG SECTION
309
 
310
   This sections specifies how debug unit should behave.
311
 
312
   enabled = 0/1
313
      whether debug unit is enabled
314
 
315
   gdb_enabled = 0/1
316
      whether to start gdb server at 'server_port' port
317
 
318
   server_port = 
319
      TCP/IP port to start gdb server on, used only if gdb_enabled
320
      is set
321
 
322 269 markom
section debug
323 312 markom
  enabled = 0
324
  gdb_enabled = 0
325 269 markom
  server_port = 9999
326
end
327
 
328 264 markom
 
329 312 markom
/* MC SECTION
330
 
331
   This section configures the memory controller
332
 
333
   enabled = 0/1
334
      whether memory controller is enabled
335
 
336
   baseaddr = 
337
      address of first MC register
338
 
339
   POC = 
340
      Power On Configuration register
341
*/
342
 
343 243 markom
section mc
344 304 markom
  enabled = 0
345 261 markom
  baseaddr = 0xa0000000
346
  POC = 0x00000008                 /* Power on configuration register */
347 243 markom
end
348 261 markom
 
349 312 markom
 
350
/* UART SECTION
351
 
352
   This section configures UARTs
353
 
354
   enabled = 0/1
355
      whether uarts are enabled
356
 
357
   nuarts = 
358
      make specified number of instances, configure each
359
      instance within device - enddevice construct.
360
 
361
   instance specific:
362
     baseaddr = 
363
        address of first UART register for this device
364
 
365
     rx_file = ""
366
        filename, where to read data from
367
 
368
     tx_file = ""
369
        filename, where to write data to
370 332 markom
 
371
     irq = 
372
        irq number for this device
373 312 markom
 
374 341 markom
     16550 = 0/1
375
        0, if this device is uart 16450 and 1, if it is 16550
376
 
377 312 markom
     jitter = 
378
        in msecs... time to block, -1 to disable it
379 313 markom
 
380
     vapi_id = 
381
        VAPI id of this instance
382 312 markom
*/
383
 
384 261 markom
section uart
385 304 markom
  enabled = 0
386 261 markom
  nuarts = 1
387
 
388
  device 0
389
    baseaddr = 0x80000000
390 332 markom
    irq = 2
391 261 markom
    rxfile = "/tmp/uart0.rx"
392
    txfile = "/tmp/uart0.tx"
393
    jitter = -1                     /* async behaviour */
394
  enddevice
395
end
396
 
397 312 markom
 
398
/* DMA SECTION
399
 
400
   This section configures DMAs
401
 
402
   enabled = 0/1
403
      whether DMAs are enabled
404
 
405
   ndmas = 
406
      make specified number of instances, configure each
407
      instance within device - enddevice construct.
408
 
409
   instance specific:
410
     baseaddr = 
411
        address of first DMA register for this device
412
 
413
     irq = 
414
        irq number for this device
415 313 markom
 
416
     vapi_id = 
417
        VAPI id of this instance
418 312 markom
*/
419
 
420 261 markom
section dma
421 304 markom
  enabled = 0
422 261 markom
  ndmas = 1
423
 
424
  device 0
425
    baseaddr = 0x90000000
426
    irq = 4
427
  enddevice
428
end
429 293 markom
 
430 304 markom
 
431 312 markom
/* ETHERNET SECTION
432
 
433
   This section configures ethernets
434
 
435
   enabled = 0/1
436
      whether ethernets are enabled
437
 
438
   nethernets = 
439
      make specified number of instances, configure each
440
      instance within device - enddevice construct.
441
 
442
   instance specific:
443
     baseaddr = 
444
        address of first ethernet register for this device
445
 
446
     dma = 
447
        which controller is this ethernet "connected" to
448
 
449
     rx_channel = 
450
        DMA channel used for RX
451
 
452
     tx_channel = 
453
        DMA channel used for TX
454
 
455
     rx_file = ""
456
        filename, where to read data from
457
 
458
     tx_file = ""
459
        filename, where to write data to
460 313 markom
 
461
     vapi_id = 
462
        VAPI id of this instance
463 312 markom
*/
464
 
465 304 markom
section ethernet
466
  enabled = 0
467 310 markom
  nethernets = 1
468
 
469
  device 0
470
    baseaddr = 0x88000000
471
    dma = 0
472
    tx_channel = 0
473
    rx_channel = 1
474
    rxfile = "/tmp/eth0.rx"
475
    txfile = "/tmp/eth0.tx"
476
  enddevice
477 304 markom
end
478 332 markom
 
479
/* TICK TIMER SECTION
480
 
481
    This section configures tick timer
482
 
483
    enabled = 0/1
484
      whether tick timer is enabled
485
 
486
    irq = 
487
      irq number
488
*/
489
 
490
section tick
491
  enabled = 0
492
  irq = 3
493
end

powered by: WebSVN 2.1.0

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