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

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [linux-2.6/] [linux-2.6.24/] [or1ksim_linux.cfg] - Blame information for rev 7

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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