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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_40/] [or1ksim/] [sim.cfg] - Blame information for rev 724

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 568 markom
 
39
   Configure files can also be included, using:
40
 
41
   include "file_name_to_include"
42 312 markom
 
43
   Like normal configuration file, this file is divided in sections,
44
   where each section is described in detail also.
45 428 markom
 
46 312 markom
   Some section also have subsections. One example of such subsection is
47
   block:
48 428 markom
 
49 312 markom
   device 
50
     instance specific parameters...
51
   enddevice
52 428 markom
 
53 312 markom
   which creates a device instance.
54
*/
55
 
56
/* MEMORY SECTION
57
 
58
   This section specifies how is initial memory generated and which blocks
59
   it consist of.
60 428 markom
 
61 312 markom
   type = random/unknown/pattern
62
      specifies the initial memory values. 'random' parameter generate
63
      random memory using seed 'random_seed' parameter. 'pattern' parameter
64
      fills memory with 'pattern' parameter and 'unknown' does not specify
65
      how memory should be generated - the fastest option.
66 428 markom
 
67 312 markom
   random_seed = 
68
      random seed for randomizer, used if type = random
69 428 markom
 
70 312 markom
   pattern = 
71 331 markom
      pattern to fill memory, used if type = pattern
72 428 markom
 
73 424 markom
   nmemories = 
74 428 markom
      number of memory instances connected
75
 
76 424 markom
   instance specific:
77
     baseaddr = 
78
        memory start address
79 428 markom
 
80 424 markom
     size = 
81
        memory size
82
 
83
     name = ""
84
        memory block name
85 428 markom
 
86 424 markom
     ce = 
87
        chip enable index of the memory instance
88
 
89
     delayr = 
90
        cycles, required for read access, -1 if instance does not support reading
91 428 markom
 
92 424 markom
     delayw = 
93
        cycles, required for write access, -1 if instance does not support writing
94 428 markom
 
95 424 markom
     16550 = 0/1
96
        0, if this device is uart 16450 and 1, if it is 16550
97 428 markom
 
98 424 markom
     log = ""
99
        filename, where to log memory accesses to, no log, if log command is not specified
100 312 markom
*/
101
 
102 262 markom
section memory
103 264 markom
  /*random_seed = 12345
104
  type = random*/
105 269 markom
  pattern = 0x00
106
  type = unknown /* Fastest */
107 428 markom
 
108 424 markom
  nmemories = 2
109
  device 0
110 553 markom
    name = "FLASH"
111 424 markom
    ce = 0
112
    baseaddr = 0x00000000
113 702 ivang
    size = 0x00200000
114 424 markom
    delayr = 10
115
    delayw = -1
116
  enddevice
117 428 markom
 
118 424 markom
  device 1
119 553 markom
    name = "RAM"
120 424 markom
    ce = 1
121 702 ivang
    baseaddr = 0x40000000
122
    size = 0x00200000
123 424 markom
    delayr = 2
124
    delayw = 4
125
  enddevice
126 262 markom
end
127
 
128 434 markom
 
129 427 markom
/* IMMU SECTION
130 312 markom
 
131 427 markom
    This section configures Instruction Memory Menangement Unit
132 428 markom
 
133 427 markom
    enabled = 0/1
134
       whether IMMU is enabled
135 428 markom
       (NOTE: UPR bit is set)
136
 
137 427 markom
    nsets = 
138 428 markom
       number of ITLB sets; must be power of two
139
 
140 427 markom
    nways = 
141
       number of ITLB ways
142 428 markom
 
143 427 markom
    pagesize = 
144
       instruction page size; must be power of two
145 428 markom
 
146 427 markom
    entrysize = 
147
       instruction entry size in bytes
148 428 markom
 
149 427 markom
    ustates = 
150
       number of ITLB usage states (2, 3, 4 etc., max is 4)
151 541 markom
 
152
    hitdelay = 
153
       number of cycles immu hit costs
154
 
155
    missdelay = 
156
       number of cycles immu miss costs
157 427 markom
*/
158
 
159
section immu
160
  enabled = 0
161
  nsets = 32
162
  nways = 1
163 428 markom
  pagesize = 8192
164 541 markom
  hitdelay = 0
165
  missdelay = 0
166 427 markom
end
167 428 markom
 
168 434 markom
 
169 427 markom
/* DMMU SECTION
170
 
171
    This section configures Data Memory Menangement Unit
172 428 markom
 
173 427 markom
    enabled = 0/1
174
       whether DMMU is enabled
175 428 markom
       (NOTE: UPR bit is set)
176
 
177 427 markom
    nsets = 
178
       number of DTLB sets; must be power of two
179 428 markom
 
180 427 markom
    nways = 
181
       number of DTLB ways
182 428 markom
 
183 427 markom
    pagesize = 
184
       data page size; must be power of two
185 428 markom
 
186 427 markom
    entrysize = 
187
       data entry size in bytes
188 428 markom
 
189 427 markom
    ustates = 
190
       number of DTLB usage states (2, 3, 4 etc., max is 4)
191 541 markom
 
192
    hitdelay = 
193
       number of cycles immu hit costs
194
 
195
    missdelay = 
196
       number of cycles immu miss costs
197 427 markom
*/
198
 
199
section dmmu
200
  enabled = 0
201
  nsets = 32
202
  nways = 1
203 428 markom
  pagesize = 8192
204 541 markom
  hitdelay = 0
205
  missdelay = 0
206 427 markom
end
207
 
208 428 markom
 
209
/* IC SECTION
210
 
211 541 markom
   This section configures Instruction Cache
212 428 markom
 
213 541 markom
   enabled = 0/1
214
      whether IC is enabled
215
      (NOTE: UPR bit is set)
216 428 markom
 
217 541 markom
   nsets = 
218
      number of IC sets; must be power of two
219 428 markom
 
220 541 markom
   nways = 
221
      number of IC ways
222 428 markom
 
223 541 markom
   blocksize = 
224
      IC block size in bytes; must be power of two
225 428 markom
 
226 541 markom
   ustates = 
227
      number of IC usage states (2, 3, 4 etc., max is 4)
228
 
229
   hitdelay = 
230
      number of cycles ic hit costs
231
 
232
    missdelay = 
233
      number of cycles ic miss costs
234 428 markom
*/
235
 
236
section ic
237
  enabled = 0
238
  nsets = 512
239
  nways = 1
240
  blocksize = 16
241 541 markom
  hitdelay = 0
242
  missdelay = 0
243 428 markom
end
244
 
245 434 markom
 
246 428 markom
/* DC SECTION
247
 
248 541 markom
   This section configures Data Cache
249 428 markom
 
250 541 markom
   enabled = 0/1
251
      whether DC is enabled
252
      (NOTE: UPR bit is set)
253 428 markom
 
254 541 markom
   nsets = 
255
      number of DC sets; must be power of two
256 428 markom
 
257 541 markom
   nways = 
258
      number of DC ways
259 428 markom
 
260 541 markom
   blocksize = 
261
      DC block size in bytes; must be power of two
262 428 markom
 
263 541 markom
   ustates = 
264
      number of DC usage states (2, 3, 4 etc., max is 4)
265
 
266
   load_hitdelay = 
267
      number of cycles dc load hit costs
268
 
269
   load_missdelay = 
270
      number of cycles dc load miss costs
271
 
272
   store_hitdelay = 
273
      number of cycles dc load hit costs
274
 
275
   store_missdelay = 
276
      number of cycles dc load miss costs
277 428 markom
*/
278
 
279
section dc
280
  enabled = 0
281
  nsets = 512
282
  nways = 1
283
  blocksize = 16
284 541 markom
  load_hitdelay = 0
285
  load_missdelay = 0
286
  store_hitdelay = 0
287
  store_missdelay = 0
288 428 markom
end
289
 
290 312 markom
/* SIM SECTION
291
 
292
  This section specifies how should sim behave.
293 428 markom
 
294 312 markom
  verbose = 0/1
295
      whether to print out extra messages
296 428 markom
 
297 344 markom
  debug = 0-9
298
      = 0 disabled debug messages
299
      1-9 level of sim debug information, greater the number more verbose is
300
          the output
301 428 markom
 
302 312 markom
  profile = 0/1
303
      whether to generate profiling file 'sim.profile'
304 428 markom
 
305 312 markom
  prof_fn = ""
306
      filename, where to generate profiling info, used
307
      only if 'profile' is set
308 547 markom
 
309
  mprofile = 0/1
310
      whether to generate memory profiling file 'sim.mprofile'
311 428 markom
 
312 547 markom
  mprof_fn = ""
313
      filename, where to generate memory profiling info, used
314
      only if 'mprofile' is set
315
 
316 394 markom
  history = 0/1
317
      whether instruction execution flow is tracked for
318
      display by simulator hist command. Useful for
319
      back-trace debugging.
320 428 markom
 
321 312 markom
  iprompt = 0/1
322
      whether we strart in interactive prompt
323
 
324
  exe_log = 0/1
325
      whether execution log should be generated
326 672 markom
 
327 675 markom
  exe_log = default/hardware/simple/software
328 672 markom
      type of executed log, default is used if not specified
329
 
330
  exe_log_start = 
331
      index of first instruction to start log with, default = 0
332
 
333
  exe_log_end = 
334
      index of last instruction to end log with; not limited, if omitted
335
 
336
  exe_log_marker = 
337
       specifies number of instructions before horizontal marker is
338
      printed; if zero, markers are disabled (default)
339 428 markom
 
340 312 markom
  exe_log_fn = ""
341
      where to put execution log in, used only if 'exe_log'
342
      is set
343 624 ivang
 
344
  spr_log = 0/1
345
      whether log of writes/reads to/from sprs should be generated
346
 
347
  spr_log_fn = ""
348 629 markom
      where to put sprs writes/reads in log, used only if 'spr_log'
349 624 ivang
      is set
350 433 markom
 
351
  clkcycle = [ps|ns|us|ms]
352
      specifies time measurement for one cycle
353 335 markom
*/
354
 
355 312 markom
section sim
356 335 markom
  /* verbose = 1 */
357 702 ivang
  debug = 3
358 689 markom
  profile = 0
359 312 markom
  prof_fn = "sim.profile"
360 689 markom
  mprofile = 0
361 547 markom
  mprof_fn = "sim.mprofile"
362 428 markom
 
363 394 markom
  history = 1
364 312 markom
  /* iprompt = 0 */
365
  exe_log = 0
366 672 markom
  exe_log_type = hardware
367
  exe_log_start = 0
368
  exe_log_end = 0
369
  exe_log_marker = 0
370 312 markom
  exe_log_fn = "executed.log"
371 632 ivang
  spr_log = 0
372 624 ivang
  spr_log_fn = "spr.log"
373
  clkcycle = 100ns
374 312 markom
end
375
 
376
 
377
/* SECTION VAPI
378
 
379
    This section configures Verification API, used for Advanced
380
    Core Verification.
381 428 markom
 
382 312 markom
    enabled = 0/1
383
        whether to start VAPI server
384 428 markom
 
385 312 markom
    server_port = 
386
        TCP/IP port to start VAPI server on
387 428 markom
 
388 355 markom
    log_enabled = 0/1
389
       whether logging of VAPI requests is enabled
390 428 markom
 
391 486 erez
    hide_device_id = 0/1
392
       whether to disable logging of device id (for compatability with old version)
393
 
394 355 markom
    vapi_fn = 
395
       specifies filename where to log into, if log_enabled is selected
396 312 markom
*/
397
 
398
section VAPI
399
  enabled = 0
400
  server_port = 9998
401 355 markom
  log_enabled = 0
402 427 markom
  vapi_log_fn = "vapi.log"
403 312 markom
end
404
 
405
 
406
/* CPU SECTION
407
 
408
   This section specifies various CPU parameters.
409 428 markom
 
410 312 markom
   ver = 
411
   rev = 
412
      specifies version and revision of the CPU used
413 428 markom
 
414 312 markom
   upr = 
415
      changes the upr register
416 556 markom
 
417
   sr = 
418
      sets the initial Supervision Register value
419 428 markom
 
420 312 markom
   superscalar = 0/1
421 388 lampret
      whether CPU is scalar or superscalar
422
      (modify cpu/or32/execute.c to tune superscalar model)
423
 
424 312 markom
   hazards = 0/1
425 388 lampret
      whether data hazards are tracked in superscalar CPU
426
      and displayed by the simulator r command
427
 
428 312 markom
   dependstats = 0/1
429 388 lampret
      whether inter-instruction dependencies are calculated
430
      and displayed by simulator stats command.
431
 
432 535 markom
   raw_range = 
433
      range in cycles for raw register over time analysis, 0 = disabled
434 626 markom
 
435
   sbuf_len = 
436
      length of store buffer (<= 256), 0 = disabled
437 312 markom
*/
438
 
439 263 markom
section cpu
440
  ver = 0x1200
441
  rev = 0x0001
442
  /* upr = */
443 556 markom
  sr = 0x00008003
444 263 markom
  superscalar = 0
445
  hazards = 0
446
  dependstats = 0
447 626 markom
  raw_range = 0
448
  sbuf_len = 0
449 263 markom
end
450
 
451 312 markom
 
452 557 markom
/* PM SECTION
453
 
454
   This section specifies Power Menagement paramaters
455
 
456
   enabled = 0/1
457
      whether power menagement is enabled
458
*/
459
 
460
section pm
461
  enabled = 0
462
end
463
 
464 541 markom
/* BPB SECTION
465
 
466
   This section specifies how branch prediction should behave.
467
 
468
   enabled = 0/1
469
      whether bpb is enabled
470
 
471
   btic = 0/1
472
      enable branch target instruction cache model
473
 
474
   sbp_bf_fwd = 0/1
475
      whether static branch prediction for l.bf uses forward prediction
476
 
477
   sbp_bnf_fwd = 0/1
478
      whether static branch prediction for l.bnf uses forward prediction
479
 
480
   hitdelay = 
481
       number of cycles bpb hit costs
482
 
483
   missdelay = 
484
       number of cycles bpb miss costs
485
*/
486
 
487
section bpb
488
  enabled = 0
489
  btic = 0
490
  sbp_bf_fwd = 0
491
  sbp_bnf_fwd = 0
492
  hitdelay = 0
493
  missdelay = 0
494
end
495
 
496
 
497 312 markom
/* DEBUG SECTION
498
 
499
   This sections specifies how debug unit should behave.
500 428 markom
 
501 312 markom
   enabled = 0/1
502
      whether debug unit is enabled
503 428 markom
 
504 312 markom
   gdb_enabled = 0/1
505
      whether to start gdb server at 'server_port' port
506 428 markom
 
507 312 markom
   server_port = 
508
      TCP/IP port to start gdb server on, used only if gdb_enabled
509
      is set
510 486 erez
 
511
   vapi_id = 
512
      Used to create "fake" vapi log file containing the JTAG proxy messages.
513 479 markom
*/
514 428 markom
 
515 269 markom
section debug
516 702 ivang
  enabled = 1
517 312 markom
  gdb_enabled = 0
518 269 markom
  server_port = 9999
519 486 erez
  vapi_id = 0xFFFF
520 269 markom
end
521
 
522 264 markom
 
523 312 markom
/* MC SECTION
524
 
525
   This section configures the memory controller
526
 
527
   enabled = 0/1
528
      whether memory controller is enabled
529 428 markom
 
530 312 markom
   baseaddr = 
531
      address of first MC register
532 428 markom
 
533 312 markom
   POC = 
534
      Power On Configuration register
535
*/
536
 
537 243 markom
section mc
538 702 ivang
  enabled = 0
539 624 ivang
  baseaddr = 0x60000000
540 261 markom
  POC = 0x00000008                 /* Power on configuration register */
541 243 markom
end
542 261 markom
 
543 312 markom
 
544
/* UART SECTION
545
 
546
   This section configures UARTs
547
 
548
   nuarts = 
549
      make specified number of instances, configure each
550
      instance within device - enddevice construct.
551 428 markom
 
552 312 markom
   instance specific:
553
     baseaddr = 
554
        address of first UART register for this device
555 428 markom
 
556 664 markom
     rxfile = ""
557 312 markom
        filename, where to read data from
558 428 markom
 
559 664 markom
     txfile = ""
560 312 markom
        filename, where to write data to
561 332 markom
 
562
     irq = 
563
        irq number for this device
564 428 markom
 
565 341 markom
     16550 = 0/1
566
        0, if this device is uart 16450 and 1, if it is 16550
567 428 markom
 
568 312 markom
     jitter = 
569
        in msecs... time to block, -1 to disable it
570 428 markom
 
571 313 markom
     vapi_id = 
572
        VAPI id of this instance
573 312 markom
*/
574
 
575 261 markom
section uart
576
  nuarts = 1
577 428 markom
 
578 261 markom
  device 0
579 624 ivang
    baseaddr = 0x90000000
580 332 markom
    irq = 2
581 261 markom
    rxfile = "/tmp/uart0.rx"
582
    txfile = "/tmp/uart0.tx"
583
    jitter = -1                     /* async behaviour */
584
  enddevice
585
end
586
 
587 312 markom
 
588
/* DMA SECTION
589
 
590
   This section configures DMAs
591
 
592
   ndmas = 
593
      make specified number of instances, configure each
594
      instance within device - enddevice construct.
595 428 markom
 
596 312 markom
   instance specific:
597
     baseaddr = 
598
        address of first DMA register for this device
599
 
600
     irq = 
601
        irq number for this device
602 428 markom
 
603 313 markom
     vapi_id = 
604
        VAPI id of this instance
605 312 markom
*/
606
 
607 261 markom
section dma
608 624 ivang
  ndmas = 0
609
/*
610 261 markom
  device 0
611
    baseaddr = 0x90000000
612
    irq = 4
613
  enddevice
614 624 ivang
*/
615 261 markom
end
616 293 markom
 
617 304 markom
 
618 312 markom
/* ETHERNET SECTION
619
 
620
   This section configures ethernets
621
 
622
   nethernets = 
623
      make specified number of instances, configure each
624
      instance within device - enddevice construct.
625 428 markom
 
626 312 markom
   instance specific:
627
     baseaddr = 
628
        address of first ethernet register for this device
629
 
630
     dma = 
631
        which controller is this ethernet "connected" to
632 428 markom
 
633 724 ivang
     irq = 
634
        ethernet mac IRQ level
635
 
636 312 markom
     rx_channel = 
637
        DMA channel used for RX
638 428 markom
 
639 312 markom
     tx_channel = 
640
        DMA channel used for TX
641
 
642 664 markom
     rxfile = ""
643 312 markom
        filename, where to read data from
644 428 markom
 
645 664 markom
     txfile = ""
646 312 markom
        filename, where to write data to
647 428 markom
 
648 724 ivang
     sockif = ""
649
        interface name of ethernet socket
650
 
651 313 markom
     vapi_id = 
652
        VAPI id of this instance
653 312 markom
*/
654
 
655 304 markom
section ethernet
656 702 ivang
  nethernets = 1
657 428 markom
 
658 702 ivang
 
659 310 markom
  device 0
660
    baseaddr = 0x88000000
661
    dma = 0
662 724 ivang
    irq = 15
663 310 markom
    tx_channel = 0
664
    rx_channel = 1
665
    rxfile = "/tmp/eth0.rx"
666
    txfile = "/tmp/eth0.tx"
667 724 ivang
    sockif = "lo"
668 310 markom
  enddevice
669 702 ivang
 
670 304 markom
end
671 332 markom
 
672 486 erez
/* GPIO SECTION
673
 
674 664 markom
   This section configure GPIOs
675 486 erez
 
676
   ngpios = 
677
      make specified number of instances, configure each
678
      instance within device - enddevice construct.
679
 
680
   instance specific:
681
     baseaddr = 
682
        address of first GPIO register for this device
683
 
684
     irq = 
685
        irq number for this device
686
 
687
     base_vapi_id = 
688
        first VAPI id of this instance
689
        GPIO uses 8 consecutive VAPI IDs
690
*/
691
 
692
section gpio
693
  ngpios = 1
694
 
695
  device 0
696 624 ivang
    baseaddr = 0xA0000000
697 486 erez
    irq = 23
698
    base_vapi_id = 0x0200
699
  enddevice
700
end
701
 
702 332 markom
/* TICK TIMER SECTION
703
 
704
    This section configures tick timer
705 428 markom
 
706 332 markom
    enabled = 0/1
707
      whether tick timer is enabled
708
*/
709
 
710
section tick
711
  enabled = 0
712
end
713 645 markom
 
714
/* VGA SECTION
715
 
716 664 markom
    This section configures VGA/LCD controller
717 645 markom
 
718
    nvgas = 
719
       number of VGA devices connected
720
 
721
    instance specific:
722
      baseaddr = 
723
        address of first VGA register
724
 
725
      irq = 
726
        irq number for this device
727
 
728
      refresh_rate = 
729
        number of cycles between screen dumps
730
 
731
      filename = ""
732
        template name for generated names (e.g. "primary" produces "primary0023.bmp")
733
*/
734
 
735
section vga
736
  nvgas = 1
737
 
738
  device 0
739
    baseaddr = 0xb0000000
740
    irq = 20
741
    refresh_rate = 100000
742
    filename = "primary"
743
  enddevice
744
end
745
 
746
/* FB SECTION
747
 
748 664 markom
    This section configures frame buffer
749 645 markom
 
750
    enabled = 0/1
751
      whether frame buffer is enabled
752
 
753 664 markom
    baseaddr = 
754 645 markom
      base address of frame buffer
755
 
756
    paladdr = 
757
      base address of first palette entry
758
 
759
    refresh_rate = 
760
      number of cycles between screen dumps
761
 
762
    filename = ""
763
      template name for generated names (e.g. "primary" produces "primary0023.bmp")
764
*/
765
 
766
section fb
767
  enabled = 1
768 648 markom
  baseaddr = 0xb8000000
769 645 markom
  refresh_rate = 100000
770
  filename = "primary"
771
end
772 664 markom
 
773
/* KBD SECTION
774
 
775
    This section configures PS/2 compatible keyboard
776
 
777
    enabled = 0/1
778
      whether keyboard is enabled
779
 
780
    baseaddr = 
781
      base address of the keyboard device
782
 
783
    rxfile = ""
784
      filename, where to read data from
785
*/
786
 
787
section kbd
788
  enabled = 1
789
  irq = 21
790
  baseaddr = 0xb1000000
791
  rxfile = "/tmp/kbd.rx"
792
end

powered by: WebSVN 2.1.0

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