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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [sim.cfg] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1622 jcastillo
/* sim.cfg -- Simulator configuration script file
2
   Copyright (C) 2001-2002, Marko Mlinar, markom@opencores.org
3
 
4
This file is part of OpenRISC 1000 Architectural Simulator.
5
It contains the default configuration and help about configuring
6
the 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 ork1sim has various parameters, that are set in configuration files
26
   like this one. The user can switch between configurations at startup by
27
   specifying the required configuration file with the -f  option.
28
   If no configuration file is specified or1ksim searches for the default
29
   configuration file sim.cfg. First it searches for './sim.cfg'. If this
30
   file is not found, it searches for '~/or1k/sim.cfg'. If this file is
31
   not found too, it reverts to the built-in default configuration.
32
 
33
   NOTE: Users should not rely on the built-in configuration, since the
34
         default configuration may differ between version.
35
         Rather create a configuration file that sets all critical values.
36
 
37
   This file may contain (standard C) comments only - no // support.
38
 
39
   Configure files may be be included, using:
40
   include "file_name_to_include"
41
 
42
   Like normal configuration files, the included file is divided into
43
   sections. Each section is described in detail also.
44
 
45
   Some section have subsections. One example of such a subsection is:
46
 
47
   device 
48
     instance specific parameters...
49
   enddevice
50
 
51
   which creates a device instance.
52
*/
53
 
54
 
55
/* MEMORY SECTION
56
 
57
   This section specifies how the memory is generated and the blocks
58
   it consists of.
59
 
60
   type = random/unknown/pattern
61
      Specifies the initial memory values.
62
      'random' generates random memory using seed 'random_seed'.
63
      'pattern' fills memory with 'pattern'.
64
      'unknown' does not specify how memory should be generated,
65
      leaving the memory in a undefined state. This is the fastest
66
      option.
67
 
68
   random_seed = 
69
      random seed for randomizer, used if type = 'random'.
70
 
71
   pattern = 
72
      pattern to fill memory, used if type = 'pattern'.
73
 
74
   nmemories = 
75
      number of memory instances connected
76
 
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
   mc = 
90
      memory controller this memory is connected to
91
 
92
   delayr = 
93
      cycles, required for read access, -1 if instance does not support reading
94
 
95
   delayw = 
96
      cycles, required for write access, -1 if instance does not support writing
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
  name = "RAM"
109
  ce = 0
110
  mc = 0
111
  baseaddr = 0x00000000
112
  size = 0x00800000
113
  delayr = 1
114
  delayw = 2
115
end
116
 
117
 
118
/* IMMU SECTION
119
 
120
    This section configures the Instruction Memory Manangement Unit
121
 
122
    enabled = 0/1
123
       '0': disabled
124
       '1': enabled
125
       (NOTE: UPR bit is set)
126
 
127
    nsets = 
128
       number of ITLB sets; must be power of two
129
 
130
    nways = 
131
       number of ITLB ways
132
 
133
    pagesize = 
134
       instruction page size; must be power of two
135
 
136
    entrysize = 
137
       instruction entry size in bytes
138
 
139
    ustates = 
140
       number of ITLB usage states (2, 3, 4 etc., max is 4)
141
 
142
    hitdelay = 
143
       number of cycles immu hit costs
144
 
145
    missdelay = 
146
       number of cycles immu miss costs
147
*/
148
 
149
section immu
150
  enabled = 0
151
  nsets = 64
152
  nways = 1
153
  pagesize = 8192
154
  hitdelay = 0
155
  missdelay = 0
156
end
157
 
158
 
159
/* DMMU SECTION
160
 
161
    This section configures the Data Memory Manangement Unit
162
 
163
    enabled = 0/1
164
       '0': disabled
165
       '1': enabled
166
       (NOTE: UPR bit is set)
167
 
168
    nsets = 
169
       number of DTLB sets; must be power of two
170
 
171
    nways = 
172
       number of DTLB ways
173
 
174
    pagesize = 
175
       data page size; must be power of two
176
 
177
    entrysize = 
178
       data entry size in bytes
179
 
180
    ustates = 
181
       number of DTLB usage states (2, 3, 4 etc., max is 4)
182
 
183
    hitdelay = 
184
       number of cycles dmmu hit costs
185
 
186
    missdelay = 
187
       number of cycles dmmu miss costs
188
*/
189
 
190
section dmmu
191
  enabled = 0
192
  nsets = 64
193
  nways = 1
194
  pagesize = 8192
195
  hitdelay = 0
196
  missdelay = 0
197
end
198
 
199
 
200
/* IC SECTION
201
 
202
   This section configures the Instruction Cache
203
 
204
   enabled = 0/1
205
       '0': disabled
206
       '1': enabled
207
      (NOTE: UPR bit is set)
208
 
209
   nsets = 
210
      number of IC sets; must be power of two
211
 
212
   nways = 
213
      number of IC ways
214
 
215
   blocksize = 
216
      IC block size in bytes; must be power of two
217
 
218
   ustates = 
219
      number of IC usage states (2, 3, 4 etc., max is 4)
220
 
221
   hitdelay = 
222
      number of cycles ic hit costs
223
 
224
    missdelay = 
225
      number of cycles ic miss costs
226
*/
227
 
228
section ic
229
  enabled = 0
230
  nsets = 256
231
  nways = 1
232
  blocksize = 16
233
  hitdelay = 0
234
  missdelay = 0
235
end
236
 
237
 
238
/* DC SECTION
239
 
240
   This section configures the Data Cache
241
 
242
   enabled = 0/1
243
       '0': disabled
244
       '1': enabled
245
      (NOTE: UPR bit is set)
246
 
247
   nsets = 
248
      number of DC sets; must be power of two
249
 
250
   nways = 
251
      number of DC ways
252
 
253
   blocksize = 
254
      DC block size in bytes; must be power of two
255
 
256
   ustates = 
257
      number of DC usage states (2, 3, 4 etc., max is 4)
258
 
259
   load_hitdelay = 
260
      number of cycles dc load hit costs
261
 
262
   load_missdelay = 
263
      number of cycles dc load miss costs
264
 
265
   store_hitdelay = 
266
      number of cycles dc load hit costs
267
 
268
   store_missdelay = 
269
      number of cycles dc load miss costs
270
*/
271
 
272
section dc
273
  enabled = 0
274
  nsets = 256
275
  nways = 1
276
  blocksize = 16
277
  load_hitdelay = 0
278
  load_missdelay = 0
279
  store_hitdelay = 0
280
  store_missdelay = 0
281
end
282
 
283
 
284
/* SIM SECTION
285
 
286
  This section specifies how or1ksim should behave.
287
 
288
  verbose = 0/1
289
       '0': don't print extra messages
290
       '1': print extra messages
291
 
292
  debug = 0-9
293
 
294
      1-9: debug message level.
295
           higher numbers produce more messages
296
 
297
  profile = 0/1
298
      '0': don't generate profiling file 'sim.profile'
299
      '1': don't generate profiling file 'sim.profile'
300
 
301
  prof_fn = ""
302
      optional filename for the profiling file.
303
      valid only if 'profile' is set
304
 
305
  mprofile = 0/1
306
      '0': don't generate memory profiling file 'sim.mprofile'
307
      '1': generate memory profiling file 'sim.mprofile'
308
 
309
  mprof_fn = ""
310
      optional filename for the memory profiling file.
311
      valid only if 'mprofile' is set
312
 
313
  history = 0/1
314
      '0': don't track execution flow
315
      '1': track execution flow
316
      Execution flow can be tracked for the simulator's
317
      'hist' command. Useful for back-trace debugging.
318
 
319
  iprompt = 0/1
320
     '0': start in  (so what do we start in ???)
321
     '1': start in interactive prompt.
322
 
323
  exe_log = 0/1
324
      '0': don't generate execution log.
325
      '1': generate execution log.
326
 
327
  exe_log = default/hardware/simple/software
328
      type of execution log, default is used when not specified
329
 
330
  exe_log_start = 
331
      index of first instruction to start logging, default = 0
332
 
333
  exe_log_end = 
334
      index of last instruction to end logging; 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
      filename for the exection log file.
342
      valid only if 'exe_log' is set
343
 
344
  clkcycle = [ps|ns|us|ms]
345
      specifies time measurement for one cycle
346
*/
347
 
348
section sim
349
  /* verbose = 1 */
350
  debug = 0
351
  profile = 0
352
  prof_fn = "sim.profile"
353
 
354
  history = 1
355
  /* iprompt = 0 */
356
  exe_log = 0
357
  exe_log_type = software
358
  exe_log_start = 0
359
/*  exe_log_end = 20000000*/
360
  exe_log_marker = 10000
361
  exe_log_fn = "executed.log"
362
 
363
  clkcycle = 100ns
364
end
365
 
366
 
367
/* SECTION VAPI
368
 
369
    This section configures the Verification API, used for Advanced
370
    Core Verification.
371
 
372
    enabled = 0/1
373
        '0': disbable VAPI server
374
        '1': enable/start VAPI server
375
 
376
    server_port = 
377
        TCP/IP port to start VAPI server on
378
 
379
    log_enabled = 0/1
380
       '0': disable VAPI requests logging
381
       '1': enable VAPI requests logging
382
 
383
    hide_device_id = 0/1
384
       '0': don't log device id (for compatability with old version)
385
       '1': log device id
386
 
387
 
388
    vapi_fn = 
389
       filename for the log file.
390
       valid only if log_enabled is set
391
*/
392
 
393
section VAPI
394
  enabled = 0
395
  server_port = 9998
396
  log_enabled = 0
397
  vapi_log_fn = "vapi.log"
398
end
399
 
400
 
401
/* CPU SECTION
402
 
403
   This section specifies various CPU parameters.
404
 
405
   ver = 
406
   rev = 
407
      specifies version and revision of the CPU used
408
 
409
   upr = 
410
      changes the upr register
411
 
412
   sr = 
413
      sets the initial Supervision Register value
414
 
415
   superscalar = 0/1
416
      '0': CPU is scalar
417
      '1': CPU is superscalar
418
      (modify cpu/or32/execute.c to tune superscalar model)
419
 
420
   hazards = 0/1
421
      '0': don't track data hazards in superscalar CPU
422
      '1': track data hazards in superscalar CPU
423
      If tracked, data hazards can be displayed using the
424
      simulator's 'r' command.
425
 
426
   dependstats = 0/1
427
      '0': don't calculate inter-instruction dependencies.
428
      '1': calculate inter-instruction dependencies.
429
      If calculated, inter-instruction dependencies can be
430
      displayed using the simulator's 'stat' command.
431
 
432
   sbuf_len = 
433
      length of store buffer (<= 256), 0 = disabled
434
*/
435
 
436
section cpu
437
  ver = 0x1200
438
  rev = 0x0001
439
  /* upr = */
440
  superscalar = 0
441
  hazards = 0
442
  dependstats = 0
443
  sbuf_len = 0
444
end
445
 
446
 
447
/* PM SECTION
448
 
449
   This section specifies Power Management parameters
450
 
451
   enabled = 0/1
452
      '0': disable power management
453
      '1': enable power management
454
*/
455
 
456
section pm
457
  enabled = 0
458
end
459
 
460
 
461
/* BPB SECTION
462
 
463
   This section specifies how branch prediction should behave.
464
 
465
   enabled = 0/1
466
     '0': disable branch prediction
467
     '1': enable branch prediction
468
 
469
   btic = 0/1
470
     '0': disable branch target instruction cache model
471
     '1': enable branch target instruction cache model
472
 
473
   sbp_bf_fwd = 0/1
474
     Static branch prediction for 'l.bf'
475
     '0': don't use forward prediction
476
     '1': use forward prediction
477
 
478
   sbp_bnf_fwd = 0/1
479
     Static branch prediction for 'l.bnf'
480
     '0': don't use forward prediction
481
     '1': use forward prediction
482
 
483
   hitdelay = 
484
       number of cycles bpb hit costs
485
 
486
   missdelay = 
487
       number of cycles bpb miss costs
488
*/
489
 
490
section bpb
491
  enabled = 0
492
  btic = 0
493
  sbp_bf_fwd = 0
494
  sbp_bnf_fwd = 0
495
  hitdelay = 0
496
  missdelay = 0
497
end
498
 
499
 
500
/* DEBUG SECTION
501
 
502
   This sections specifies how the debug unit should behave.
503
 
504
   enabled = 0/1
505
      '0': disable debug unit
506
      '1': enable debug unit
507
 
508
   gdb_enabled = 0/1
509
      '0': don't start gdb server
510
      '1': start gdb server at port 'server_port'
511
 
512
   server_port = 
513
      TCP/IP port to start gdb server on
514
      valid only if gdb_enabled is set
515
 
516
   vapi_id = 
517
      Used to create "fake" vapi log file containing the JTAG proxy messages.
518
*/
519
 
520
section debug
521
  enabled = 0
522
  gdb_enabled = 0
523
  server_port = 9999
524
end
525
 
526
 
527
/* MC SECTION
528
 
529
   This section configures the memory controller
530
 
531
   enabled = 0/1
532
     '0': disable memory controller
533
     '1': enable memory controller
534
 
535
   baseaddr = 
536
      address of first MC register
537
 
538
   POC = 
539
      Power On Configuration register
540
 
541
   index = 
542
      Index of this memory controller amongst all the memory controllers
543
*/
544
 
545
section mc
546
  enabled = 0
547
  baseaddr = 0x93000000
548
  POC = 0x00000008                 /* Power on configuration register */
549
  index = 0
550
end
551
 
552
 
553
/* UART SECTION
554
 
555
   This section configures the UARTs
556
 
557
     enabled = <0|1>
558
        Enable/disable the peripheral.  By default if it is enabled.
559
 
560
     baseaddr = 
561
        address of first UART register for this device
562
 
563
 
564
     channel = :
565
 
566
        The channel parameter indicates the source of received UART characters
567
        and the sink for transmitted UART characters.
568
 
569
        The  can be either "file", "xterm", "tcp", "fd", or "tty"
570
        (without quotes).
571
 
572
          A) To send/receive characters from a pair of files, use a file
573
             channel:
574
 
575
               channel=file:,
576
 
577
          B) To create an interactive terminal window, use an xterm channel:
578
 
579
               channel=xterm:[]*
580
 
581
          C) To create a bidirectional tcp socket which one could, for example,
582
             access via telnet, use a tcp channel:
583
 
584
               channel=tcp:
585
 
586
          D) To cause the UART to read/write from existing numeric file
587
             descriptors, use an fd channel:
588
 
589
               channel=fd:,
590
 
591
          E) To connect the UART to a physical serial port, create a tty
592
             channel:
593
 
594
               channel=tty:device=/dev/ttyS0,baud=9600
595
 
596
     irq = 
597
        irq number for this device
598
 
599
     16550 = 0/1
600
        '0': this device is a UART16450
601
        '1': this device is a UART16550
602
 
603
     jitter = 
604
        in msecs... time to block, -1 to disable it
605
 
606
     vapi_id = 
607
        VAPI id of this instance
608
*/
609
 
610
section uart
611
  enabled = 1
612
  baseaddr = 0x90000000
613
  irq = 2
614 1623 jcastillo
  channel = "file:uart0.tx,uart0.rx"
615 1622 jcastillo
  jitter = -1                     /* async behaviour */
616
  16550 = 1
617
end
618
 
619
 
620
/* DMA SECTION
621
 
622
   This section configures the DMAs
623
 
624
     enabled = <0|1>
625
        Enable/disable the peripheral.  By default if it is enabled.
626
 
627
     baseaddr = 
628
        address of first DMA register for this device
629
 
630
     irq = 
631
        irq number for this device
632
 
633
     vapi_id = 
634
        VAPI id of this instance
635
*/
636
 
637
section dma
638
  enabled = 0
639
  baseaddr = 0x9a000000
640
  irq = 11
641
end
642
 
643
 
644
/* ETHERNET SECTION
645
 
646
   This section configures the ETHERNETs
647
 
648
     enabled = <0|1>
649
        Enable/disable the peripheral.  By default if it is enabled.
650
 
651
     baseaddr = 
652
        address of first ethernet register for this device
653
 
654
     dma = 
655
        which controller is this ethernet "connected" to
656
 
657
     irq = 
658
        ethernet mac IRQ level
659
 
660
     rtx_type = 
661
        use 0 - file interface, 1 - socket interface
662
 
663
     rx_channel = 
664
        DMA channel used for RX
665
 
666
     tx_channel = 
667
        DMA channel used for TX
668
 
669
     rxfile = ""
670
        filename, where to read data from
671
 
672
     txfile = ""
673
        filename, where to write data to
674
 
675
     sockif = ""
676
        interface name of ethernet socket
677
 
678
     vapi_id = 
679
        VAPI id of this instance
680
*/
681
 
682
section ethernet
683
  enabled = 1
684
  baseaddr = 0x92000000
685
  dma = 0
686
  irq = 4
687
  rtx_type = 0
688
  tx_channel = 0
689
  rx_channel = 1
690
  rxfile = "eth0.rx"
691
  txfile = "eth0.tx"
692
  sockif = "eth0"
693
end
694
 
695
 
696
/* GPIO SECTION
697
 
698
   This section configures the GPIOs
699
 
700
     enabled = <0|1>
701
        Enable/disable the peripheral.  By default if it is enabled.
702
 
703
     baseaddr = 
704
        address of first GPIO register for this device
705
 
706
     irq = 
707
        irq number for this device
708
 
709
     base_vapi_id = 
710
        first VAPI id of this instance
711
        GPIO uses 8 consecutive VAPI IDs
712
*/
713
 
714
section gpio
715 1623 jcastillo
  enabled = 0
716 1622 jcastillo
  baseaddr = 0x91000000
717
  irq = 3
718
  base_vapi_id = 0x0200
719
end
720
 
721
/* VGA SECTION
722
 
723
    This section configures the VGA/LCD controller
724
 
725
      enabled = <0|1>
726
        Enable/disable the peripheral.  By default if it is enabled.
727
 
728
      baseaddr = 
729
        address of first VGA register
730
 
731
      irq = 
732
        irq number for this device
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 vga
742 1623 jcastillo
  enabled = 0
743 1622 jcastillo
  baseaddr = 0x97100000
744
  irq = 8
745
  refresh_rate = 100000
746
  filename = "primary"
747
end
748
 
749
 
750
/* TICK TIMER SECTION
751
 
752
    This section configures tick timer
753
 
754
    enabled = 0/1
755
      whether tick timer is enabled
756
 
757
    irq = 
758
      irq number
759
*/
760
/*
761
section tick
762
  enabled = 1
763
  irq = 0
764
end
765
*/
766
 
767
/* FB SECTION
768
 
769
    This section configures the frame buffer
770
 
771
    enabled = <0|1>
772
      Enable/disable the peripheral.  By default if it is enabled.
773
 
774
    baseaddr = 
775
      base address of frame buffer
776
 
777
    paladdr = 
778
      base address of first palette entry
779
 
780
    refresh_rate = 
781
      number of cycles between screen dumps
782
 
783
    filename = ""
784
      template name for generated names (e.g. "primary" produces "primary0023.bmp")
785
*/
786
 
787
section fb
788 1623 jcastillo
  enabled = 0
789 1622 jcastillo
  baseaddr = 0x97000000
790
  refresh_rate = 1000000
791
  filename = "primary"
792
end
793
 
794
 
795
/* KBD SECTION
796
 
797
    This section configures the PS/2 compatible keyboard
798
 
799
    baseaddr = 
800
      base address of the keyboard device
801
 
802
    rxfile = ""
803
      filename, where to read data from
804
*/
805
 
806
section kbd
807 1623 jcastillo
  enabled = 0
808 1622 jcastillo
  irq = 5
809
  baseaddr = 0x94000000
810
  rxfile = "kbd.rx"
811
end
812
 
813
 
814
/* ATA SECTION
815
 
816
    This section configures the ATA/ATAPI host controller
817
 
818
      baseaddr = 
819
        address of first ATA register
820
 
821
      enabled = <0|1>
822
        Enable/disable the peripheral.  By default if it is enabled.
823
 
824
      irq = 
825
        irq number for this device
826
 
827
      debug = 
828
        debug level for ata models.
829
        0: no debug messages
830
        1: verbose messages
831
        3: normal messages (more messages than verbose)
832
        5: debug messages (normal debug messages)
833
        7: flow control messages (debug statemachine flows)
834
        9: low priority message (display everything the code does)
835
 
836
      dev_type0/1 = 
837
        ata device 0 type
838
        0: NO_CONNeCT: none (not connected)
839
        1: FILE      : simulated harddisk
840
        2: LOCAL     : local system harddisk
841
 
842
      dev_file0/1 = ""
843
        filename for simulated ATA device
844
        valid only if dev_type0 == 1
845
 
846
      dev_size0/1 = 
847
        size of simulated hard-disk (in MBytes)
848
        valid only if dev_type0 == 1
849
 
850
      dev_packet0/1 = 
851
        0: simulated ATA device does NOT implement PACKET command feature set
852
        1: simulated ATA device does implement PACKET command feature set
853
 
854
   FIXME: irq number
855
*/
856
 
857
section ata
858 1623 jcastillo
  enabled = 0
859 1622 jcastillo
  baseaddr = 0x9e000000
860
  irq = 15
861
 
862
  dev_type0   = 1
863
  dev_file0   = "/tmp/sim_atadev0"
864
  dev_size0   = 1
865
  dev_packet0 = 0
866
 
867
  dev_type1   = 0
868
  dev_file1   = ""
869
  dev_size1   = 0
870
  dev_packet1 = 0
871
end
872
 
873
 
874
/* CUC SECTION
875
 
876
    This section configures the OpenRISC Custom Unit Compiler
877
 
878
    memory_order = none/weak/strong/exact
879
      none   different memory ordering, even if there are dependencies,
880
             burst can be made, width can change
881
      weak   different memory ordering, if there cannot be dependencies
882
             burst can be made, width can change
883
      strong same memory ordering, burst can be made, width can change
884
      exact  exacltly the same memory ordering and widths
885
 
886
    calling_convention = 0/1
887
      whether programs follow OpenRISC calling conventions
888
 
889
    enable_bursts = 0/1
890
      whether burst are detected
891
 
892
    no_multicycle = 0/1
893
      if selected no multicycle logic paths will be generated
894
 
895
    timings_fn = ""
896
*/
897
 
898
section cuc
899
  memory_order = weak
900
  calling_convention = 1
901
  enable_bursts = 1
902
  no_multicycle = 1
903
  timings_fn = "virtex.tim"
904
end
905
 

powered by: WebSVN 2.1.0

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