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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_46/] [or1ksim/] [sim.cfg] - Blame information for rev 532

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 428 markom
 
4 312 markom
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 428 markom
 
37 312 markom
   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 428 markom
 
42 312 markom
   Some section also have subsections. One example of such subsection is
43
   block:
44 428 markom
 
45 312 markom
   device 
46
     instance specific parameters...
47
   enddevice
48 428 markom
 
49 312 markom
   which creates a device instance.
50
*/
51
 
52 428 markom
 
53 312 markom
/* MEMORY SECTION
54
 
55
   This section specifies how is initial memory generated and which blocks
56
   it consist of.
57 428 markom
 
58 312 markom
   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 428 markom
 
64 312 markom
   random_seed = 
65
      random seed for randomizer, used if type = random
66 428 markom
 
67 312 markom
   pattern = 
68 331 markom
      pattern to fill memory, used if type = pattern
69 428 markom
 
70 424 markom
   nmemories = 
71 428 markom
      number of memory instances connected
72
 
73 424 markom
   instance specific:
74
     baseaddr = 
75
        memory start address
76 428 markom
 
77 424 markom
     size = 
78
        memory size
79
 
80
     name = ""
81
        memory block name
82 428 markom
 
83 424 markom
     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 428 markom
 
89 424 markom
     delayw = 
90
        cycles, required for write access, -1 if instance does not support writing
91 428 markom
 
92 424 markom
     16550 = 0/1
93
        0, if this device is uart 16450 and 1, if it is 16550
94 428 markom
 
95 424 markom
     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 428 markom
 
105 424 markom
  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 428 markom
 
115 424 markom
  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 434 markom
 
126 427 markom
/* IMMU SECTION
127 312 markom
 
128 427 markom
    This section configures Instruction Memory Menangement Unit
129 428 markom
 
130 427 markom
    enabled = 0/1
131
       whether IMMU is enabled
132 428 markom
       (NOTE: UPR bit is set)
133
 
134 427 markom
    nsets = 
135 428 markom
       number of ITLB sets; must be power of two
136
 
137 427 markom
    nways = 
138
       number of ITLB ways
139 428 markom
 
140 427 markom
    pagesize = 
141
       instruction page size; must be power of two
142 428 markom
 
143 427 markom
    entrysize = 
144
       instruction entry size in bytes
145 428 markom
 
146 427 markom
    ustates = 
147
       number of ITLB usage states (2, 3, 4 etc., max is 4)
148
*/
149
 
150
section immu
151
  enabled = 0
152
  nsets = 32
153
  nways = 1
154 428 markom
  pagesize = 8192
155 427 markom
end
156 428 markom
 
157 434 markom
 
158 427 markom
/* DMMU SECTION
159
 
160
    This section configures Data Memory Menangement Unit
161 428 markom
 
162 427 markom
    enabled = 0/1
163
       whether DMMU is enabled
164 428 markom
       (NOTE: UPR bit is set)
165
 
166 427 markom
    nsets = 
167
       number of DTLB sets; must be power of two
168 428 markom
 
169 427 markom
    nways = 
170
       number of DTLB ways
171 428 markom
 
172 427 markom
    pagesize = 
173
       data page size; must be power of two
174 428 markom
 
175 427 markom
    entrysize = 
176
       data entry size in bytes
177 428 markom
 
178 427 markom
    ustates = 
179
       number of DTLB usage states (2, 3, 4 etc., max is 4)
180
*/
181
 
182
section dmmu
183
  enabled = 0
184
  nsets = 32
185
  nways = 1
186 428 markom
  pagesize = 8192
187 427 markom
end
188
 
189 428 markom
 
190
/* IC SECTION
191
 
192
    This section configures Instruction Cache
193
 
194
    enabled = 0/1
195
       whether IC is enabled
196
       (NOTE: UPR bit is set)
197
 
198
    nsets = 
199
       number of IC sets; must be power of two
200
 
201
    nways = 
202
       number of IC ways
203
 
204
    blocksize = 
205
       IC block size in bytes; must be power of two
206
 
207
    ustates = 
208
       number of IC usage states (2, 3, 4 etc., max is 4)
209
*/
210
 
211
section ic
212
  enabled = 0
213
  nsets = 512
214
  nways = 1
215
  blocksize = 16
216
end
217
 
218 434 markom
 
219 428 markom
/* DC SECTION
220
 
221
    This section configures Data Cache
222
 
223
    enabled = 0/1
224
       whether DC is enabled
225
       (NOTE: UPR bit is set)
226
 
227
    nsets = 
228
       number of DC sets; must be power of two
229
 
230
    nways = 
231
       number of DC ways
232
 
233
    blocksize = 
234
       DC block size in bytes; must be power of two
235
 
236
    ustates = 
237
       number of DC usage states (2, 3, 4 etc., max is 4)
238
*/
239
 
240
section dc
241
  enabled = 0
242
  nsets = 512
243
  nways = 1
244
  blocksize = 16
245
end
246
 
247 312 markom
/* SIM SECTION
248
 
249
  This section specifies how should sim behave.
250 428 markom
 
251 312 markom
  verbose = 0/1
252
      whether to print out extra messages
253 428 markom
 
254 344 markom
  debug = 0-9
255
      = 0 disabled debug messages
256
      1-9 level of sim debug information, greater the number more verbose is
257
          the output
258 428 markom
 
259 312 markom
  profile = 0/1
260
      whether to generate profiling file 'sim.profile'
261 428 markom
 
262 312 markom
  prof_fn = ""
263
      filename, where to generate profiling info, used
264
      only if 'profile' is set
265 428 markom
 
266 394 markom
  history = 0/1
267
      whether instruction execution flow is tracked for
268
      display by simulator hist command. Useful for
269
      back-trace debugging.
270 428 markom
 
271 312 markom
  iprompt = 0/1
272
      whether we strart in interactive prompt
273
 
274
  exe_log = 0/1
275
      whether execution log should be generated
276 428 markom
 
277 312 markom
  exe_log_fn = ""
278
      where to put execution log in, used only if 'exe_log'
279
      is set
280 433 markom
 
281
  clkcycle = [ps|ns|us|ms]
282
      specifies time measurement for one cycle
283 335 markom
*/
284
 
285 312 markom
section sim
286 335 markom
  /* verbose = 1 */
287 312 markom
  debug = 0
288
  profile = 0
289
  prof_fn = "sim.profile"
290 428 markom
 
291 394 markom
  history = 1
292 312 markom
  /* iprompt = 0 */
293
  exe_log = 0
294
  exe_log_fn = "executed.log"
295 433 markom
  clkcycle = 4ns
296 312 markom
end
297
 
298
 
299
/* SECTION VAPI
300
 
301
    This section configures Verification API, used for Advanced
302
    Core Verification.
303 428 markom
 
304 312 markom
    enabled = 0/1
305
        whether to start VAPI server
306 428 markom
 
307 312 markom
    server_port = 
308
        TCP/IP port to start VAPI server on
309 428 markom
 
310 355 markom
    log_enabled = 0/1
311
       whether logging of VAPI requests is enabled
312 428 markom
 
313 486 erez
    hide_device_id = 0/1
314
       whether to disable logging of device id (for compatability with old version)
315
 
316 355 markom
    vapi_fn = 
317
       specifies filename where to log into, if log_enabled is selected
318 312 markom
*/
319
 
320
section VAPI
321
  enabled = 0
322
  server_port = 9998
323 355 markom
  log_enabled = 0
324 427 markom
  vapi_log_fn = "vapi.log"
325 312 markom
end
326
 
327
 
328
/* CPU SECTION
329
 
330
   This section specifies various CPU parameters.
331 428 markom
 
332 312 markom
   ver = 
333
   rev = 
334
      specifies version and revision of the CPU used
335 428 markom
 
336 312 markom
   upr = 
337
      changes the upr register
338 428 markom
 
339 312 markom
   superscalar = 0/1
340 388 lampret
      whether CPU is scalar or superscalar
341
      (modify cpu/or32/execute.c to tune superscalar model)
342
 
343 312 markom
   hazards = 0/1
344 388 lampret
      whether data hazards are tracked in superscalar CPU
345
      and displayed by the simulator r command
346
 
347 312 markom
   dependstats = 0/1
348 388 lampret
      whether inter-instruction dependencies are calculated
349
      and displayed by simulator stats command.
350
 
351 312 markom
   btic = 0/1
352 388 lampret
      enable branch target instruction cache model
353
 
354 312 markom
   bpb = 0/1
355 388 lampret
      enable branch prediction buffer model
356
 
357 312 markom
      parameters for CPU analysis
358
*/
359
 
360 263 markom
section cpu
361
  ver = 0x1200
362
  rev = 0x0001
363
  /* upr = */
364
  superscalar = 0
365
  hazards = 0
366
  dependstats = 0
367 304 markom
  btic = 0
368 264 markom
  bpb = 0
369 263 markom
end
370
 
371 312 markom
 
372
/* DEBUG SECTION
373
 
374
   This sections specifies how debug unit should behave.
375 428 markom
 
376 312 markom
   enabled = 0/1
377
      whether debug unit is enabled
378 428 markom
 
379 312 markom
   gdb_enabled = 0/1
380
      whether to start gdb server at 'server_port' port
381 428 markom
 
382 312 markom
   server_port = 
383
      TCP/IP port to start gdb server on, used only if gdb_enabled
384
      is set
385 486 erez
 
386
   vapi_id = 
387
      Used to create "fake" vapi log file containing the JTAG proxy messages.
388 479 markom
*/
389 428 markom
 
390 269 markom
section debug
391 312 markom
  enabled = 0
392
  gdb_enabled = 0
393 269 markom
  server_port = 9999
394 486 erez
  vapi_id = 0xFFFF
395 269 markom
end
396
 
397 264 markom
 
398 312 markom
/* MC SECTION
399
 
400
   This section configures the memory controller
401
 
402
   enabled = 0/1
403
      whether memory controller is enabled
404 428 markom
 
405 312 markom
   baseaddr = 
406
      address of first MC register
407 428 markom
 
408 312 markom
   POC = 
409
      Power On Configuration register
410
*/
411
 
412 243 markom
section mc
413 304 markom
  enabled = 0
414 261 markom
  baseaddr = 0xa0000000
415
  POC = 0x00000008                 /* Power on configuration register */
416 243 markom
end
417 261 markom
 
418 312 markom
 
419
/* UART SECTION
420
 
421
   This section configures UARTs
422
 
423
   enabled = 0/1
424
      whether uarts are enabled
425 428 markom
 
426 312 markom
   nuarts = 
427
      make specified number of instances, configure each
428
      instance within device - enddevice construct.
429 428 markom
 
430 312 markom
   instance specific:
431
     baseaddr = 
432
        address of first UART register for this device
433 428 markom
 
434 312 markom
     rx_file = ""
435
        filename, where to read data from
436 428 markom
 
437 312 markom
     tx_file = ""
438
        filename, where to write data to
439 332 markom
 
440
     irq = 
441
        irq number for this device
442 428 markom
 
443 341 markom
     16550 = 0/1
444
        0, if this device is uart 16450 and 1, if it is 16550
445 428 markom
 
446 312 markom
     jitter = 
447
        in msecs... time to block, -1 to disable it
448 428 markom
 
449 313 markom
     vapi_id = 
450
        VAPI id of this instance
451 312 markom
*/
452
 
453 261 markom
section uart
454 304 markom
  enabled = 0
455 261 markom
  nuarts = 1
456 428 markom
 
457 261 markom
  device 0
458
    baseaddr = 0x80000000
459 332 markom
    irq = 2
460 261 markom
    rxfile = "/tmp/uart0.rx"
461
    txfile = "/tmp/uart0.tx"
462
    jitter = -1                     /* async behaviour */
463
  enddevice
464
end
465
 
466 312 markom
 
467
/* DMA SECTION
468
 
469
   This section configures DMAs
470
 
471
   enabled = 0/1
472
      whether DMAs are enabled
473 428 markom
 
474 312 markom
   ndmas = 
475
      make specified number of instances, configure each
476
      instance within device - enddevice construct.
477 428 markom
 
478 312 markom
   instance specific:
479
     baseaddr = 
480
        address of first DMA register for this device
481
 
482
     irq = 
483
        irq number for this device
484 428 markom
 
485 313 markom
     vapi_id = 
486
        VAPI id of this instance
487 312 markom
*/
488
 
489 261 markom
section dma
490 304 markom
  enabled = 0
491 261 markom
  ndmas = 1
492 428 markom
 
493 261 markom
  device 0
494
    baseaddr = 0x90000000
495
    irq = 4
496
  enddevice
497
end
498 293 markom
 
499 304 markom
 
500 312 markom
/* ETHERNET SECTION
501
 
502
   This section configures ethernets
503
 
504
   enabled = 0/1
505
      whether ethernets are enabled
506 428 markom
 
507 312 markom
   nethernets = 
508
      make specified number of instances, configure each
509
      instance within device - enddevice construct.
510 428 markom
 
511 312 markom
   instance specific:
512
     baseaddr = 
513
        address of first ethernet register for this device
514
 
515
     dma = 
516
        which controller is this ethernet "connected" to
517 428 markom
 
518 312 markom
     rx_channel = 
519
        DMA channel used for RX
520 428 markom
 
521 312 markom
     tx_channel = 
522
        DMA channel used for TX
523
 
524
     rx_file = ""
525
        filename, where to read data from
526 428 markom
 
527 312 markom
     tx_file = ""
528
        filename, where to write data to
529 428 markom
 
530 313 markom
     vapi_id = 
531
        VAPI id of this instance
532 312 markom
*/
533
 
534 304 markom
section ethernet
535
  enabled = 0
536 310 markom
  nethernets = 1
537 428 markom
 
538 310 markom
  device 0
539
    baseaddr = 0x88000000
540
    dma = 0
541
    tx_channel = 0
542
    rx_channel = 1
543
    rxfile = "/tmp/eth0.rx"
544
    txfile = "/tmp/eth0.tx"
545
  enddevice
546 304 markom
end
547 332 markom
 
548 486 erez
/* GPIO SECTION
549
 
550
   This section configures GPIOs
551
 
552
   enabled = 0/1
553
      whether GPIOs are enabled
554
 
555
   ngpios = 
556
      make specified number of instances, configure each
557
      instance within device - enddevice construct.
558
 
559
   instance specific:
560
     baseaddr = 
561
        address of first GPIO register for this device
562
 
563
     irq = 
564
        irq number for this device
565
 
566
     base_vapi_id = 
567
        first VAPI id of this instance
568
        GPIO uses 8 consecutive VAPI IDs
569
*/
570
 
571
section gpio
572
  enabled = 0
573
  ngpios = 1
574
 
575
  device 0
576
    baseaddr = 0xB0000000
577
    irq = 23
578
    base_vapi_id = 0x0200
579
  enddevice
580
end
581
 
582 332 markom
/* TICK TIMER SECTION
583
 
584
    This section configures tick timer
585 428 markom
 
586 332 markom
    enabled = 0/1
587
      whether tick timer is enabled
588 428 markom
 
589 332 markom
    irq = 
590
      irq number
591
*/
592
 
593
section tick
594
  enabled = 0
595
  irq = 3
596
end

powered by: WebSVN 2.1.0

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