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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_42/] [or1ksim/] [sim.cfg] - Blame information for rev 624

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
      where to put sprs write/read log in, used onli if 'spr_log'
336
      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
  profile = 0
346
  prof_fn = "sim.profile"
347 547 markom
  mprofile = 0
348
  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 624 ivang
  spr_log = 1
355
  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 312 markom
*/
418
 
419 263 markom
section cpu
420
  ver = 0x1200
421
  rev = 0x0001
422
  /* upr = */
423 556 markom
  sr = 0x00008003
424 263 markom
  superscalar = 0
425
  hazards = 0
426
  dependstats = 0
427
end
428
 
429 312 markom
 
430 557 markom
/* PM SECTION
431
 
432
   This section specifies Power Menagement paramaters
433
 
434
   enabled = 0/1
435
      whether power menagement is enabled
436
*/
437
 
438
section pm
439
  enabled = 0
440
end
441
 
442 541 markom
/* BPB SECTION
443
 
444
   This section specifies how branch prediction should behave.
445
 
446
   enabled = 0/1
447
      whether bpb is enabled
448
 
449
   btic = 0/1
450
      enable branch target instruction cache model
451
 
452
   sbp_bf_fwd = 0/1
453
      whether static branch prediction for l.bf uses forward prediction
454
 
455
   sbp_bnf_fwd = 0/1
456
      whether static branch prediction for l.bnf uses forward prediction
457
 
458
   hitdelay = 
459
       number of cycles bpb hit costs
460
 
461
   missdelay = 
462
       number of cycles bpb miss costs
463
*/
464
 
465
section bpb
466
  enabled = 0
467
  btic = 0
468
  sbp_bf_fwd = 0
469
  sbp_bnf_fwd = 0
470
  hitdelay = 0
471
  missdelay = 0
472
end
473
 
474
 
475 312 markom
/* DEBUG SECTION
476
 
477
   This sections specifies how debug unit should behave.
478 428 markom
 
479 312 markom
   enabled = 0/1
480
      whether debug unit is enabled
481 428 markom
 
482 312 markom
   gdb_enabled = 0/1
483
      whether to start gdb server at 'server_port' port
484 428 markom
 
485 312 markom
   server_port = 
486
      TCP/IP port to start gdb server on, used only if gdb_enabled
487
      is set
488 486 erez
 
489
   vapi_id = 
490
      Used to create "fake" vapi log file containing the JTAG proxy messages.
491 479 markom
*/
492 428 markom
 
493 269 markom
section debug
494 312 markom
  enabled = 0
495
  gdb_enabled = 0
496 269 markom
  server_port = 9999
497 486 erez
  vapi_id = 0xFFFF
498 269 markom
end
499
 
500 264 markom
 
501 312 markom
/* MC SECTION
502
 
503
   This section configures the memory controller
504
 
505
   enabled = 0/1
506
      whether memory controller is enabled
507 428 markom
 
508 312 markom
   baseaddr = 
509
      address of first MC register
510 428 markom
 
511 312 markom
   POC = 
512
      Power On Configuration register
513
*/
514
 
515 243 markom
section mc
516 624 ivang
  enabled = 1
517
  baseaddr = 0x60000000
518 261 markom
  POC = 0x00000008                 /* Power on configuration register */
519 243 markom
end
520 261 markom
 
521 312 markom
 
522
/* UART SECTION
523
 
524
   This section configures UARTs
525
 
526
   nuarts = 
527
      make specified number of instances, configure each
528
      instance within device - enddevice construct.
529 428 markom
 
530 312 markom
   instance specific:
531
     baseaddr = 
532
        address of first UART register for this device
533 428 markom
 
534 312 markom
     rx_file = ""
535
        filename, where to read data from
536 428 markom
 
537 312 markom
     tx_file = ""
538
        filename, where to write data to
539 332 markom
 
540
     irq = 
541
        irq number for this device
542 428 markom
 
543 341 markom
     16550 = 0/1
544
        0, if this device is uart 16450 and 1, if it is 16550
545 428 markom
 
546 312 markom
     jitter = 
547
        in msecs... time to block, -1 to disable it
548 428 markom
 
549 313 markom
     vapi_id = 
550
        VAPI id of this instance
551 312 markom
*/
552
 
553 261 markom
section uart
554
  nuarts = 1
555 428 markom
 
556 261 markom
  device 0
557 624 ivang
    baseaddr = 0x90000000
558 332 markom
    irq = 2
559 261 markom
    rxfile = "/tmp/uart0.rx"
560
    txfile = "/tmp/uart0.tx"
561
    jitter = -1                     /* async behaviour */
562
  enddevice
563
end
564
 
565 312 markom
 
566
/* DMA SECTION
567
 
568
   This section configures DMAs
569
 
570
   ndmas = 
571
      make specified number of instances, configure each
572
      instance within device - enddevice construct.
573 428 markom
 
574 312 markom
   instance specific:
575
     baseaddr = 
576
        address of first DMA register for this device
577
 
578
     irq = 
579
        irq number for this device
580 428 markom
 
581 313 markom
     vapi_id = 
582
        VAPI id of this instance
583 312 markom
*/
584
 
585 261 markom
section dma
586 624 ivang
  ndmas = 0
587
/*
588 261 markom
  device 0
589
    baseaddr = 0x90000000
590
    irq = 4
591
  enddevice
592 624 ivang
*/
593 261 markom
end
594 293 markom
 
595 304 markom
 
596 312 markom
/* ETHERNET SECTION
597
 
598
   This section configures ethernets
599
 
600
   nethernets = 
601
      make specified number of instances, configure each
602
      instance within device - enddevice construct.
603 428 markom
 
604 312 markom
   instance specific:
605
     baseaddr = 
606
        address of first ethernet register for this device
607
 
608
     dma = 
609
        which controller is this ethernet "connected" to
610 428 markom
 
611 312 markom
     rx_channel = 
612
        DMA channel used for RX
613 428 markom
 
614 312 markom
     tx_channel = 
615
        DMA channel used for TX
616
 
617
     rx_file = ""
618
        filename, where to read data from
619 428 markom
 
620 312 markom
     tx_file = ""
621
        filename, where to write data to
622 428 markom
 
623 313 markom
     vapi_id = 
624
        VAPI id of this instance
625 312 markom
*/
626
 
627 304 markom
section ethernet
628 624 ivang
  nethernets = 0
629 428 markom
 
630 624 ivang
/*
631 310 markom
  device 0
632
    baseaddr = 0x88000000
633
    dma = 0
634
    tx_channel = 0
635
    rx_channel = 1
636
    rxfile = "/tmp/eth0.rx"
637
    txfile = "/tmp/eth0.tx"
638
  enddevice
639 624 ivang
*/
640 304 markom
end
641 332 markom
 
642 486 erez
/* GPIO SECTION
643
 
644
   This section configures GPIOs
645
 
646
   ngpios = 
647
      make specified number of instances, configure each
648
      instance within device - enddevice construct.
649
 
650
   instance specific:
651
     baseaddr = 
652
        address of first GPIO register for this device
653
 
654
     irq = 
655
        irq number for this device
656
 
657
     base_vapi_id = 
658
        first VAPI id of this instance
659
        GPIO uses 8 consecutive VAPI IDs
660
*/
661
 
662
section gpio
663
  ngpios = 1
664
 
665
  device 0
666 624 ivang
    baseaddr = 0xA0000000
667 486 erez
    irq = 23
668
    base_vapi_id = 0x0200
669
  enddevice
670
end
671
 
672 332 markom
/* TICK TIMER SECTION
673
 
674
    This section configures tick timer
675 428 markom
 
676 332 markom
    enabled = 0/1
677
      whether tick timer is enabled
678 624 ivang
 
679
    irq = 
680
      irq number
681 332 markom
*/
682
 
683
section tick
684
  enabled = 0
685 624 ivang
  irq = 3
686 332 markom
end

powered by: WebSVN 2.1.0

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