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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_58/] [or1ksim/] [sim.cfg] - Blame information for rev 547

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 541 markom
 
149
    hitdelay = 
150
       number of cycles immu hit costs
151
 
152
    missdelay = 
153
       number of cycles immu miss costs
154 427 markom
*/
155
 
156
section immu
157
  enabled = 0
158
  nsets = 32
159
  nways = 1
160 428 markom
  pagesize = 8192
161 541 markom
  hitdelay = 0
162
  missdelay = 0
163 427 markom
end
164 428 markom
 
165 434 markom
 
166 427 markom
/* DMMU SECTION
167
 
168
    This section configures Data Memory Menangement Unit
169 428 markom
 
170 427 markom
    enabled = 0/1
171
       whether DMMU is enabled
172 428 markom
       (NOTE: UPR bit is set)
173
 
174 427 markom
    nsets = 
175
       number of DTLB sets; must be power of two
176 428 markom
 
177 427 markom
    nways = 
178
       number of DTLB ways
179 428 markom
 
180 427 markom
    pagesize = 
181
       data page size; must be power of two
182 428 markom
 
183 427 markom
    entrysize = 
184
       data entry size in bytes
185 428 markom
 
186 427 markom
    ustates = 
187
       number of DTLB usage states (2, 3, 4 etc., max is 4)
188 541 markom
 
189
    hitdelay = 
190
       number of cycles immu hit costs
191
 
192
    missdelay = 
193
       number of cycles immu miss costs
194 427 markom
*/
195
 
196
section dmmu
197
  enabled = 0
198
  nsets = 32
199
  nways = 1
200 428 markom
  pagesize = 8192
201 541 markom
  hitdelay = 0
202
  missdelay = 0
203 427 markom
end
204
 
205 428 markom
 
206
/* IC SECTION
207
 
208 541 markom
   This section configures Instruction Cache
209 428 markom
 
210 541 markom
   enabled = 0/1
211
      whether IC is enabled
212
      (NOTE: UPR bit is set)
213 428 markom
 
214 541 markom
   nsets = 
215
      number of IC sets; must be power of two
216 428 markom
 
217 541 markom
   nways = 
218
      number of IC ways
219 428 markom
 
220 541 markom
   blocksize = 
221
      IC block size in bytes; must be power of two
222 428 markom
 
223 541 markom
   ustates = 
224
      number of IC usage states (2, 3, 4 etc., max is 4)
225
 
226
   hitdelay = 
227
      number of cycles ic hit costs
228
 
229
    missdelay = 
230
      number of cycles ic miss costs
231 428 markom
*/
232
 
233
section ic
234
  enabled = 0
235
  nsets = 512
236
  nways = 1
237
  blocksize = 16
238 541 markom
  hitdelay = 0
239
  missdelay = 0
240 428 markom
end
241
 
242 434 markom
 
243 428 markom
/* DC SECTION
244
 
245 541 markom
   This section configures Data Cache
246 428 markom
 
247 541 markom
   enabled = 0/1
248
      whether DC is enabled
249
      (NOTE: UPR bit is set)
250 428 markom
 
251 541 markom
   nsets = 
252
      number of DC sets; must be power of two
253 428 markom
 
254 541 markom
   nways = 
255
      number of DC ways
256 428 markom
 
257 541 markom
   blocksize = 
258
      DC block size in bytes; must be power of two
259 428 markom
 
260 541 markom
   ustates = 
261
      number of DC usage states (2, 3, 4 etc., max is 4)
262
 
263
   load_hitdelay = 
264
      number of cycles dc load hit costs
265
 
266
   load_missdelay = 
267
      number of cycles dc load miss costs
268
 
269
   store_hitdelay = 
270
      number of cycles dc load hit costs
271
 
272
   store_missdelay = 
273
      number of cycles dc load miss costs
274 428 markom
*/
275
 
276
section dc
277
  enabled = 0
278
  nsets = 512
279
  nways = 1
280
  blocksize = 16
281 541 markom
  load_hitdelay = 0
282
  load_missdelay = 0
283
  store_hitdelay = 0
284
  store_missdelay = 0
285 428 markom
end
286
 
287 312 markom
/* SIM SECTION
288
 
289
  This section specifies how should sim behave.
290 428 markom
 
291 312 markom
  verbose = 0/1
292
      whether to print out extra messages
293 428 markom
 
294 344 markom
  debug = 0-9
295
      = 0 disabled debug messages
296
      1-9 level of sim debug information, greater the number more verbose is
297
          the output
298 428 markom
 
299 312 markom
  profile = 0/1
300
      whether to generate profiling file 'sim.profile'
301 428 markom
 
302 312 markom
  prof_fn = ""
303
      filename, where to generate profiling info, used
304
      only if 'profile' is set
305 547 markom
 
306
  mprofile = 0/1
307
      whether to generate memory profiling file 'sim.mprofile'
308 428 markom
 
309 547 markom
  mprof_fn = ""
310
      filename, where to generate memory profiling info, used
311
      only if 'mprofile' is set
312
 
313 394 markom
  history = 0/1
314
      whether instruction execution flow is tracked for
315
      display by simulator hist command. Useful for
316
      back-trace debugging.
317 428 markom
 
318 312 markom
  iprompt = 0/1
319
      whether we strart in interactive prompt
320
 
321
  exe_log = 0/1
322
      whether execution log should be generated
323 428 markom
 
324 312 markom
  exe_log_fn = ""
325
      where to put execution log in, used only if 'exe_log'
326
      is set
327 433 markom
 
328
  clkcycle = [ps|ns|us|ms]
329
      specifies time measurement for one cycle
330 335 markom
*/
331
 
332 312 markom
section sim
333 335 markom
  /* verbose = 1 */
334 312 markom
  debug = 0
335
  profile = 0
336
  prof_fn = "sim.profile"
337 547 markom
  mprofile = 0
338
  mprof_fn = "sim.mprofile"
339 428 markom
 
340 394 markom
  history = 1
341 312 markom
  /* iprompt = 0 */
342
  exe_log = 0
343
  exe_log_fn = "executed.log"
344 433 markom
  clkcycle = 4ns
345 312 markom
end
346
 
347
 
348
/* SECTION VAPI
349
 
350
    This section configures Verification API, used for Advanced
351
    Core Verification.
352 428 markom
 
353 312 markom
    enabled = 0/1
354
        whether to start VAPI server
355 428 markom
 
356 312 markom
    server_port = 
357
        TCP/IP port to start VAPI server on
358 428 markom
 
359 355 markom
    log_enabled = 0/1
360
       whether logging of VAPI requests is enabled
361 428 markom
 
362 486 erez
    hide_device_id = 0/1
363
       whether to disable logging of device id (for compatability with old version)
364
 
365 355 markom
    vapi_fn = 
366
       specifies filename where to log into, if log_enabled is selected
367 312 markom
*/
368
 
369
section VAPI
370
  enabled = 0
371
  server_port = 9998
372 355 markom
  log_enabled = 0
373 427 markom
  vapi_log_fn = "vapi.log"
374 312 markom
end
375
 
376
 
377
/* CPU SECTION
378
 
379
   This section specifies various CPU parameters.
380 428 markom
 
381 312 markom
   ver = 
382
   rev = 
383
      specifies version and revision of the CPU used
384 428 markom
 
385 312 markom
   upr = 
386
      changes the upr register
387 428 markom
 
388 312 markom
   superscalar = 0/1
389 388 lampret
      whether CPU is scalar or superscalar
390
      (modify cpu/or32/execute.c to tune superscalar model)
391
 
392 312 markom
   hazards = 0/1
393 388 lampret
      whether data hazards are tracked in superscalar CPU
394
      and displayed by the simulator r command
395
 
396 312 markom
   dependstats = 0/1
397 388 lampret
      whether inter-instruction dependencies are calculated
398
      and displayed by simulator stats command.
399
 
400 535 markom
   raw_range = 
401
      range in cycles for raw register over time analysis, 0 = disabled
402 312 markom
*/
403
 
404 263 markom
section cpu
405
  ver = 0x1200
406
  rev = 0x0001
407
  /* upr = */
408
  superscalar = 0
409
  hazards = 0
410
  dependstats = 0
411 304 markom
  btic = 0
412 264 markom
  bpb = 0
413 535 markom
  sbp_bf_fwd = 0
414
  sbp_bnf_fwd = 1
415
  raw_range = 0
416 263 markom
end
417
 
418 312 markom
 
419 541 markom
/* BPB SECTION
420
 
421
   This section specifies how branch prediction should behave.
422
 
423
   enabled = 0/1
424
      whether bpb is enabled
425
 
426
   btic = 0/1
427
      enable branch target instruction cache model
428
 
429
   sbp_bf_fwd = 0/1
430
      whether static branch prediction for l.bf uses forward prediction
431
 
432
   sbp_bnf_fwd = 0/1
433
      whether static branch prediction for l.bnf uses forward prediction
434
 
435
   hitdelay = 
436
       number of cycles bpb hit costs
437
 
438
   missdelay = 
439
       number of cycles bpb miss costs
440
*/
441
 
442
section bpb
443
  enabled = 0
444
  btic = 0
445
  sbp_bf_fwd = 0
446
  sbp_bnf_fwd = 0
447
  hitdelay = 0
448
  missdelay = 0
449
end
450
 
451
 
452 312 markom
/* DEBUG SECTION
453
 
454
   This sections specifies how debug unit should behave.
455 428 markom
 
456 312 markom
   enabled = 0/1
457
      whether debug unit is enabled
458 428 markom
 
459 312 markom
   gdb_enabled = 0/1
460
      whether to start gdb server at 'server_port' port
461 428 markom
 
462 312 markom
   server_port = 
463
      TCP/IP port to start gdb server on, used only if gdb_enabled
464
      is set
465 486 erez
 
466
   vapi_id = 
467
      Used to create "fake" vapi log file containing the JTAG proxy messages.
468 479 markom
*/
469 428 markom
 
470 269 markom
section debug
471 312 markom
  enabled = 0
472
  gdb_enabled = 0
473 269 markom
  server_port = 9999
474 486 erez
  vapi_id = 0xFFFF
475 269 markom
end
476
 
477 264 markom
 
478 312 markom
/* MC SECTION
479
 
480
   This section configures the memory controller
481
 
482
   enabled = 0/1
483
      whether memory controller is enabled
484 428 markom
 
485 312 markom
   baseaddr = 
486
      address of first MC register
487 428 markom
 
488 312 markom
   POC = 
489
      Power On Configuration register
490
*/
491
 
492 243 markom
section mc
493 304 markom
  enabled = 0
494 261 markom
  baseaddr = 0xa0000000
495
  POC = 0x00000008                 /* Power on configuration register */
496 243 markom
end
497 261 markom
 
498 312 markom
 
499
/* UART SECTION
500
 
501
   This section configures UARTs
502
 
503
   enabled = 0/1
504
      whether uarts are enabled
505 428 markom
 
506 312 markom
   nuarts = 
507
      make specified number of instances, configure each
508
      instance within device - enddevice construct.
509 428 markom
 
510 312 markom
   instance specific:
511
     baseaddr = 
512
        address of first UART register for this device
513 428 markom
 
514 312 markom
     rx_file = ""
515
        filename, where to read data from
516 428 markom
 
517 312 markom
     tx_file = ""
518
        filename, where to write data to
519 332 markom
 
520
     irq = 
521
        irq number for this device
522 428 markom
 
523 341 markom
     16550 = 0/1
524
        0, if this device is uart 16450 and 1, if it is 16550
525 428 markom
 
526 312 markom
     jitter = 
527
        in msecs... time to block, -1 to disable it
528 428 markom
 
529 313 markom
     vapi_id = 
530
        VAPI id of this instance
531 312 markom
*/
532
 
533 261 markom
section uart
534 304 markom
  enabled = 0
535 261 markom
  nuarts = 1
536 428 markom
 
537 261 markom
  device 0
538
    baseaddr = 0x80000000
539 332 markom
    irq = 2
540 261 markom
    rxfile = "/tmp/uart0.rx"
541
    txfile = "/tmp/uart0.tx"
542
    jitter = -1                     /* async behaviour */
543
  enddevice
544
end
545
 
546 312 markom
 
547
/* DMA SECTION
548
 
549
   This section configures DMAs
550
 
551
   enabled = 0/1
552
      whether DMAs are enabled
553 428 markom
 
554 312 markom
   ndmas = 
555
      make specified number of instances, configure each
556
      instance within device - enddevice construct.
557 428 markom
 
558 312 markom
   instance specific:
559
     baseaddr = 
560
        address of first DMA register for this device
561
 
562
     irq = 
563
        irq number for this device
564 428 markom
 
565 313 markom
     vapi_id = 
566
        VAPI id of this instance
567 312 markom
*/
568
 
569 261 markom
section dma
570 304 markom
  enabled = 0
571 261 markom
  ndmas = 1
572 428 markom
 
573 261 markom
  device 0
574
    baseaddr = 0x90000000
575
    irq = 4
576
  enddevice
577
end
578 293 markom
 
579 304 markom
 
580 312 markom
/* ETHERNET SECTION
581
 
582
   This section configures ethernets
583
 
584
   enabled = 0/1
585
      whether ethernets are enabled
586 428 markom
 
587 312 markom
   nethernets = 
588
      make specified number of instances, configure each
589
      instance within device - enddevice construct.
590 428 markom
 
591 312 markom
   instance specific:
592
     baseaddr = 
593
        address of first ethernet register for this device
594
 
595
     dma = 
596
        which controller is this ethernet "connected" to
597 428 markom
 
598 312 markom
     rx_channel = 
599
        DMA channel used for RX
600 428 markom
 
601 312 markom
     tx_channel = 
602
        DMA channel used for TX
603
 
604
     rx_file = ""
605
        filename, where to read data from
606 428 markom
 
607 312 markom
     tx_file = ""
608
        filename, where to write data to
609 428 markom
 
610 313 markom
     vapi_id = 
611
        VAPI id of this instance
612 312 markom
*/
613
 
614 304 markom
section ethernet
615
  enabled = 0
616 310 markom
  nethernets = 1
617 428 markom
 
618 310 markom
  device 0
619
    baseaddr = 0x88000000
620
    dma = 0
621
    tx_channel = 0
622
    rx_channel = 1
623
    rxfile = "/tmp/eth0.rx"
624
    txfile = "/tmp/eth0.tx"
625
  enddevice
626 304 markom
end
627 332 markom
 
628 486 erez
/* GPIO SECTION
629
 
630
   This section configures GPIOs
631
 
632
   enabled = 0/1
633
      whether GPIOs are enabled
634
 
635
   ngpios = 
636
      make specified number of instances, configure each
637
      instance within device - enddevice construct.
638
 
639
   instance specific:
640
     baseaddr = 
641
        address of first GPIO register for this device
642
 
643
     irq = 
644
        irq number for this device
645
 
646
     base_vapi_id = 
647
        first VAPI id of this instance
648
        GPIO uses 8 consecutive VAPI IDs
649
*/
650
 
651
section gpio
652
  enabled = 0
653
  ngpios = 1
654
 
655
  device 0
656
    baseaddr = 0xB0000000
657
    irq = 23
658
    base_vapi_id = 0x0200
659
  enddevice
660
end
661
 
662 332 markom
/* TICK TIMER SECTION
663
 
664
    This section configures tick timer
665 428 markom
 
666 332 markom
    enabled = 0/1
667
      whether tick timer is enabled
668 428 markom
 
669 332 markom
    irq = 
670
      irq number
671
*/
672
 
673
section tick
674
  enabled = 0
675
  irq = 3
676
end

powered by: WebSVN 2.1.0

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