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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orp/] [orp_soc/] [sw/] [orp_mon/] [sim.cfg] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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