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 664

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 624 ivang
    size = 0x000200000
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 624 ivang
    baseaddr = 0x04000000
122
    size = 0x04000000
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 428 markom
 
327 312 markom
  exe_log_fn = ""
328
      where to put execution log in, used only if 'exe_log'
329
      is set
330 624 ivang
 
331
  spr_log = 0/1
332
      whether log of writes/reads to/from sprs should be generated
333
 
334
  spr_log_fn = ""
335 629 markom
      where to put sprs writes/reads in log, used only if 'spr_log'
336 624 ivang
      is set
337 433 markom
 
338
  clkcycle = [ps|ns|us|ms]
339
      specifies time measurement for one cycle
340 335 markom
*/
341
 
342 312 markom
section sim
343 335 markom
  /* verbose = 1 */
344 312 markom
  debug = 0
345 632 ivang
  profile = 1
346 312 markom
  prof_fn = "sim.profile"
347 632 ivang
  mprofile = 1
348 547 markom
  mprof_fn = "sim.mprofile"
349 428 markom
 
350 394 markom
  history = 1
351 312 markom
  /* iprompt = 0 */
352
  exe_log = 0
353
  exe_log_fn = "executed.log"
354 632 ivang
  spr_log = 0
355 624 ivang
  spr_log_fn = "spr.log"
356
  clkcycle = 100ns
357 312 markom
end
358
 
359
 
360
/* SECTION VAPI
361
 
362
    This section configures Verification API, used for Advanced
363
    Core Verification.
364 428 markom
 
365 312 markom
    enabled = 0/1
366
        whether to start VAPI server
367 428 markom
 
368 312 markom
    server_port = 
369
        TCP/IP port to start VAPI server on
370 428 markom
 
371 355 markom
    log_enabled = 0/1
372
       whether logging of VAPI requests is enabled
373 428 markom
 
374 486 erez
    hide_device_id = 0/1
375
       whether to disable logging of device id (for compatability with old version)
376
 
377 355 markom
    vapi_fn = 
378
       specifies filename where to log into, if log_enabled is selected
379 312 markom
*/
380
 
381
section VAPI
382
  enabled = 0
383
  server_port = 9998
384 355 markom
  log_enabled = 0
385 427 markom
  vapi_log_fn = "vapi.log"
386 312 markom
end
387
 
388
 
389
/* CPU SECTION
390
 
391
   This section specifies various CPU parameters.
392 428 markom
 
393 312 markom
   ver = 
394
   rev = 
395
      specifies version and revision of the CPU used
396 428 markom
 
397 312 markom
   upr = 
398
      changes the upr register
399 556 markom
 
400
   sr = 
401
      sets the initial Supervision Register value
402 428 markom
 
403 312 markom
   superscalar = 0/1
404 388 lampret
      whether CPU is scalar or superscalar
405
      (modify cpu/or32/execute.c to tune superscalar model)
406
 
407 312 markom
   hazards = 0/1
408 388 lampret
      whether data hazards are tracked in superscalar CPU
409
      and displayed by the simulator r command
410
 
411 312 markom
   dependstats = 0/1
412 388 lampret
      whether inter-instruction dependencies are calculated
413
      and displayed by simulator stats command.
414
 
415 535 markom
   raw_range = 
416
      range in cycles for raw register over time analysis, 0 = disabled
417 626 markom
 
418
   sbuf_len = 
419
      length of store buffer (<= 256), 0 = disabled
420 312 markom
*/
421
 
422 263 markom
section cpu
423
  ver = 0x1200
424
  rev = 0x0001
425
  /* upr = */
426 556 markom
  sr = 0x00008003
427 263 markom
  superscalar = 0
428
  hazards = 0
429
  dependstats = 0
430 626 markom
  raw_range = 0
431
  sbuf_len = 0
432 263 markom
end
433
 
434 312 markom
 
435 557 markom
/* PM SECTION
436
 
437
   This section specifies Power Menagement paramaters
438
 
439
   enabled = 0/1
440
      whether power menagement is enabled
441
*/
442
 
443
section pm
444
  enabled = 0
445
end
446
 
447 541 markom
/* BPB SECTION
448
 
449
   This section specifies how branch prediction should behave.
450
 
451
   enabled = 0/1
452
      whether bpb is enabled
453
 
454
   btic = 0/1
455
      enable branch target instruction cache model
456
 
457
   sbp_bf_fwd = 0/1
458
      whether static branch prediction for l.bf uses forward prediction
459
 
460
   sbp_bnf_fwd = 0/1
461
      whether static branch prediction for l.bnf uses forward prediction
462
 
463
   hitdelay = 
464
       number of cycles bpb hit costs
465
 
466
   missdelay = 
467
       number of cycles bpb miss costs
468
*/
469
 
470
section bpb
471
  enabled = 0
472
  btic = 0
473
  sbp_bf_fwd = 0
474
  sbp_bnf_fwd = 0
475
  hitdelay = 0
476
  missdelay = 0
477
end
478
 
479
 
480 312 markom
/* DEBUG SECTION
481
 
482
   This sections specifies how debug unit should behave.
483 428 markom
 
484 312 markom
   enabled = 0/1
485
      whether debug unit is enabled
486 428 markom
 
487 312 markom
   gdb_enabled = 0/1
488
      whether to start gdb server at 'server_port' port
489 428 markom
 
490 312 markom
   server_port = 
491
      TCP/IP port to start gdb server on, used only if gdb_enabled
492
      is set
493 486 erez
 
494
   vapi_id = 
495
      Used to create "fake" vapi log file containing the JTAG proxy messages.
496 479 markom
*/
497 428 markom
 
498 269 markom
section debug
499 312 markom
  enabled = 0
500
  gdb_enabled = 0
501 269 markom
  server_port = 9999
502 486 erez
  vapi_id = 0xFFFF
503 269 markom
end
504
 
505 264 markom
 
506 312 markom
/* MC SECTION
507
 
508
   This section configures the memory controller
509
 
510
   enabled = 0/1
511
      whether memory controller is enabled
512 428 markom
 
513 312 markom
   baseaddr = 
514
      address of first MC register
515 428 markom
 
516 312 markom
   POC = 
517
      Power On Configuration register
518
*/
519
 
520 243 markom
section mc
521 624 ivang
  enabled = 1
522
  baseaddr = 0x60000000
523 261 markom
  POC = 0x00000008                 /* Power on configuration register */
524 243 markom
end
525 261 markom
 
526 312 markom
 
527
/* UART SECTION
528
 
529
   This section configures UARTs
530
 
531
   nuarts = 
532
      make specified number of instances, configure each
533
      instance within device - enddevice construct.
534 428 markom
 
535 312 markom
   instance specific:
536
     baseaddr = 
537
        address of first UART register for this device
538 428 markom
 
539 664 markom
     rxfile = ""
540 312 markom
        filename, where to read data from
541 428 markom
 
542 664 markom
     txfile = ""
543 312 markom
        filename, where to write data to
544 332 markom
 
545
     irq = 
546
        irq number for this device
547 428 markom
 
548 341 markom
     16550 = 0/1
549
        0, if this device is uart 16450 and 1, if it is 16550
550 428 markom
 
551 312 markom
     jitter = 
552
        in msecs... time to block, -1 to disable it
553 428 markom
 
554 313 markom
     vapi_id = 
555
        VAPI id of this instance
556 312 markom
*/
557
 
558 261 markom
section uart
559
  nuarts = 1
560 428 markom
 
561 261 markom
  device 0
562 624 ivang
    baseaddr = 0x90000000
563 332 markom
    irq = 2
564 261 markom
    rxfile = "/tmp/uart0.rx"
565
    txfile = "/tmp/uart0.tx"
566
    jitter = -1                     /* async behaviour */
567
  enddevice
568
end
569
 
570 312 markom
 
571
/* DMA SECTION
572
 
573
   This section configures DMAs
574
 
575
   ndmas = 
576
      make specified number of instances, configure each
577
      instance within device - enddevice construct.
578 428 markom
 
579 312 markom
   instance specific:
580
     baseaddr = 
581
        address of first DMA register for this device
582
 
583
     irq = 
584
        irq number for this device
585 428 markom
 
586 313 markom
     vapi_id = 
587
        VAPI id of this instance
588 312 markom
*/
589
 
590 261 markom
section dma
591 624 ivang
  ndmas = 0
592
/*
593 261 markom
  device 0
594
    baseaddr = 0x90000000
595
    irq = 4
596
  enddevice
597 624 ivang
*/
598 261 markom
end
599 293 markom
 
600 304 markom
 
601 312 markom
/* ETHERNET SECTION
602
 
603
   This section configures ethernets
604
 
605
   nethernets = 
606
      make specified number of instances, configure each
607
      instance within device - enddevice construct.
608 428 markom
 
609 312 markom
   instance specific:
610
     baseaddr = 
611
        address of first ethernet register for this device
612
 
613
     dma = 
614
        which controller is this ethernet "connected" to
615 428 markom
 
616 312 markom
     rx_channel = 
617
        DMA channel used for RX
618 428 markom
 
619 312 markom
     tx_channel = 
620
        DMA channel used for TX
621
 
622 664 markom
     rxfile = ""
623 312 markom
        filename, where to read data from
624 428 markom
 
625 664 markom
     txfile = ""
626 312 markom
        filename, where to write data to
627 428 markom
 
628 313 markom
     vapi_id = 
629
        VAPI id of this instance
630 312 markom
*/
631
 
632 304 markom
section ethernet
633 624 ivang
  nethernets = 0
634 428 markom
 
635 624 ivang
/*
636 310 markom
  device 0
637
    baseaddr = 0x88000000
638
    dma = 0
639
    tx_channel = 0
640
    rx_channel = 1
641
    rxfile = "/tmp/eth0.rx"
642
    txfile = "/tmp/eth0.tx"
643
  enddevice
644 624 ivang
*/
645 304 markom
end
646 332 markom
 
647 486 erez
/* GPIO SECTION
648
 
649 664 markom
   This section configure GPIOs
650 486 erez
 
651
   ngpios = 
652
      make specified number of instances, configure each
653
      instance within device - enddevice construct.
654
 
655
   instance specific:
656
     baseaddr = 
657
        address of first GPIO register for this device
658
 
659
     irq = 
660
        irq number for this device
661
 
662
     base_vapi_id = 
663
        first VAPI id of this instance
664
        GPIO uses 8 consecutive VAPI IDs
665
*/
666
 
667
section gpio
668
  ngpios = 1
669
 
670
  device 0
671 624 ivang
    baseaddr = 0xA0000000
672 486 erez
    irq = 23
673
    base_vapi_id = 0x0200
674
  enddevice
675
end
676
 
677 332 markom
/* TICK TIMER SECTION
678
 
679
    This section configures tick timer
680 428 markom
 
681 332 markom
    enabled = 0/1
682
      whether tick timer is enabled
683
*/
684
 
685
section tick
686
  enabled = 0
687
end
688 645 markom
 
689
/* VGA SECTION
690
 
691 664 markom
    This section configures VGA/LCD controller
692 645 markom
 
693
    nvgas = 
694
       number of VGA devices connected
695
 
696
    instance specific:
697
      baseaddr = 
698
        address of first VGA register
699
 
700
      irq = 
701
        irq number for this device
702
 
703
      refresh_rate = 
704
        number of cycles between screen dumps
705
 
706
      filename = ""
707
        template name for generated names (e.g. "primary" produces "primary0023.bmp")
708
*/
709
 
710
section vga
711
  nvgas = 1
712
 
713
  device 0
714
    baseaddr = 0xb0000000
715
    irq = 20
716
    refresh_rate = 100000
717
    filename = "primary"
718
  enddevice
719
end
720
 
721
/* FB SECTION
722
 
723 664 markom
    This section configures frame buffer
724 645 markom
 
725
    enabled = 0/1
726
      whether frame buffer is enabled
727
 
728 664 markom
    baseaddr = 
729 645 markom
      base address of frame buffer
730
 
731
    paladdr = 
732
      base address of first palette entry
733
 
734
    refresh_rate = 
735
      number of cycles between screen dumps
736
 
737
    filename = ""
738
      template name for generated names (e.g. "primary" produces "primary0023.bmp")
739
*/
740
 
741
section fb
742
  enabled = 1
743 648 markom
  baseaddr = 0xb8000000
744 645 markom
  refresh_rate = 100000
745
  filename = "primary"
746
end
747 664 markom
 
748
/* KBD SECTION
749
 
750
    This section configures PS/2 compatible keyboard
751
 
752
    enabled = 0/1
753
      whether keyboard is enabled
754
 
755
    baseaddr = 
756
      base address of the keyboard device
757
 
758
    rxfile = ""
759
      filename, where to read data from
760
*/
761
 
762
section kbd
763
  enabled = 1
764
  irq = 21
765
  baseaddr = 0xb1000000
766
  rxfile = "/tmp/kbd.rx"
767
end

powered by: WebSVN 2.1.0

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