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 557

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
 
39
   Like normal configuration file, this file is divided in sections,
40
   where each section is described in detail also.
41 428 markom
 
42 312 markom
   Some section also have subsections. One example of such subsection is
43
   block:
44 428 markom
 
45 312 markom
   device 
46
     instance specific parameters...
47
   enddevice
48 428 markom
 
49 312 markom
   which creates a device instance.
50
*/
51
 
52 428 markom
 
53 312 markom
/* MEMORY SECTION
54
 
55
   This section specifies how is initial memory generated and which blocks
56
   it consist of.
57 428 markom
 
58 312 markom
   type = random/unknown/pattern
59
      specifies the initial memory values. 'random' parameter generate
60
      random memory using seed 'random_seed' parameter. 'pattern' parameter
61
      fills memory with 'pattern' parameter and 'unknown' does not specify
62
      how memory should be generated - the fastest option.
63 428 markom
 
64 312 markom
   random_seed = 
65
      random seed for randomizer, used if type = random
66 428 markom
 
67 312 markom
   pattern = 
68 331 markom
      pattern to fill memory, used if type = pattern
69 428 markom
 
70 424 markom
   nmemories = 
71 428 markom
      number of memory instances connected
72
 
73 424 markom
   instance specific:
74
     baseaddr = 
75
        memory start address
76 428 markom
 
77 424 markom
     size = 
78
        memory size
79
 
80
     name = ""
81
        memory block name
82 428 markom
 
83 424 markom
     ce = 
84
        chip enable index of the memory instance
85
 
86
     delayr = 
87
        cycles, required for read access, -1 if instance does not support reading
88 428 markom
 
89 424 markom
     delayw = 
90
        cycles, required for write access, -1 if instance does not support writing
91 428 markom
 
92 424 markom
     16550 = 0/1
93
        0, if this device is uart 16450 and 1, if it is 16550
94 428 markom
 
95 424 markom
     log = ""
96
        filename, where to log memory accesses to, no log, if log command is not specified
97 312 markom
*/
98
 
99 262 markom
section memory
100 264 markom
  /*random_seed = 12345
101
  type = random*/
102 269 markom
  pattern = 0x00
103
  type = unknown /* Fastest */
104 428 markom
 
105 424 markom
  nmemories = 2
106
  device 0
107 553 markom
    name = "FLASH"
108 424 markom
    ce = 0
109
    baseaddr = 0x00000000
110
    size = 0x00100000
111
    delayr = 10
112
    delayw = -1
113
  enddevice
114 428 markom
 
115 424 markom
  device 1
116 553 markom
    name = "RAM"
117 424 markom
    ce = 1
118
    baseaddr = 0x40000000
119
    size = 0x00100000
120
    delayr = 2
121
    delayw = 4
122
  enddevice
123 262 markom
end
124
 
125 434 markom
 
126 427 markom
/* IMMU SECTION
127 312 markom
 
128 427 markom
    This section configures Instruction Memory Menangement Unit
129 428 markom
 
130 427 markom
    enabled = 0/1
131
       whether IMMU is enabled
132 428 markom
       (NOTE: UPR bit is set)
133
 
134 427 markom
    nsets = 
135 428 markom
       number of ITLB sets; must be power of two
136
 
137 427 markom
    nways = 
138
       number of ITLB ways
139 428 markom
 
140 427 markom
    pagesize = 
141
       instruction page size; must be power of two
142 428 markom
 
143 427 markom
    entrysize = 
144
       instruction entry size in bytes
145 428 markom
 
146 427 markom
    ustates = 
147
       number of ITLB usage states (2, 3, 4 etc., max is 4)
148 541 markom
 
149
    hitdelay = 
150
       number of cycles immu hit costs
151
 
152
    missdelay = 
153
       number of cycles immu miss costs
154 427 markom
*/
155
 
156
section immu
157
  enabled = 0
158
  nsets = 32
159
  nways = 1
160 428 markom
  pagesize = 8192
161 541 markom
  hitdelay = 0
162
  missdelay = 0
163 427 markom
end
164 428 markom
 
165 434 markom
 
166 427 markom
/* DMMU SECTION
167
 
168
    This section configures Data Memory Menangement Unit
169 428 markom
 
170 427 markom
    enabled = 0/1
171
       whether DMMU is enabled
172 428 markom
       (NOTE: UPR bit is set)
173
 
174 427 markom
    nsets = 
175
       number of DTLB sets; must be power of two
176 428 markom
 
177 427 markom
    nways = 
178
       number of DTLB ways
179 428 markom
 
180 427 markom
    pagesize = 
181
       data page size; must be power of two
182 428 markom
 
183 427 markom
    entrysize = 
184
       data entry size in bytes
185 428 markom
 
186 427 markom
    ustates = 
187
       number of DTLB usage states (2, 3, 4 etc., max is 4)
188 541 markom
 
189
    hitdelay = 
190
       number of cycles immu hit costs
191
 
192
    missdelay = 
193
       number of cycles immu miss costs
194 427 markom
*/
195
 
196
section dmmu
197
  enabled = 0
198
  nsets = 32
199
  nways = 1
200 428 markom
  pagesize = 8192
201 541 markom
  hitdelay = 0
202
  missdelay = 0
203 427 markom
end
204
 
205 428 markom
 
206
/* IC SECTION
207
 
208 541 markom
   This section configures Instruction Cache
209 428 markom
 
210 541 markom
   enabled = 0/1
211
      whether IC is enabled
212
      (NOTE: UPR bit is set)
213 428 markom
 
214 541 markom
   nsets = 
215
      number of IC sets; must be power of two
216 428 markom
 
217 541 markom
   nways = 
218
      number of IC ways
219 428 markom
 
220 541 markom
   blocksize = 
221
      IC block size in bytes; must be power of two
222 428 markom
 
223 541 markom
   ustates = 
224
      number of IC usage states (2, 3, 4 etc., max is 4)
225
 
226
   hitdelay = 
227
      number of cycles ic hit costs
228
 
229
    missdelay = 
230
      number of cycles ic miss costs
231 428 markom
*/
232
 
233
section ic
234
  enabled = 0
235
  nsets = 512
236
  nways = 1
237
  blocksize = 16
238 541 markom
  hitdelay = 0
239
  missdelay = 0
240 428 markom
end
241
 
242 434 markom
 
243 428 markom
/* DC SECTION
244
 
245 541 markom
   This section configures Data Cache
246 428 markom
 
247 541 markom
   enabled = 0/1
248
      whether DC is enabled
249
      (NOTE: UPR bit is set)
250 428 markom
 
251 541 markom
   nsets = 
252
      number of DC sets; must be power of two
253 428 markom
 
254 541 markom
   nways = 
255
      number of DC ways
256 428 markom
 
257 541 markom
   blocksize = 
258
      DC block size in bytes; must be power of two
259 428 markom
 
260 541 markom
   ustates = 
261
      number of DC usage states (2, 3, 4 etc., max is 4)
262
 
263
   load_hitdelay = 
264
      number of cycles dc load hit costs
265
 
266
   load_missdelay = 
267
      number of cycles dc load miss costs
268
 
269
   store_hitdelay = 
270
      number of cycles dc load hit costs
271
 
272
   store_missdelay = 
273
      number of cycles dc load miss costs
274 428 markom
*/
275
 
276
section dc
277
  enabled = 0
278
  nsets = 512
279
  nways = 1
280
  blocksize = 16
281 541 markom
  load_hitdelay = 0
282
  load_missdelay = 0
283
  store_hitdelay = 0
284
  store_missdelay = 0
285 428 markom
end
286
 
287 312 markom
/* SIM SECTION
288
 
289
  This section specifies how should sim behave.
290 428 markom
 
291 312 markom
  verbose = 0/1
292
      whether to print out extra messages
293 428 markom
 
294 344 markom
  debug = 0-9
295
      = 0 disabled debug messages
296
      1-9 level of sim debug information, greater the number more verbose is
297
          the output
298 428 markom
 
299 312 markom
  profile = 0/1
300
      whether to generate profiling file 'sim.profile'
301 428 markom
 
302 312 markom
  prof_fn = ""
303
      filename, where to generate profiling info, used
304
      only if 'profile' is set
305 547 markom
 
306
  mprofile = 0/1
307
      whether to generate memory profiling file 'sim.mprofile'
308 428 markom
 
309 547 markom
  mprof_fn = ""
310
      filename, where to generate memory profiling info, used
311
      only if 'mprofile' is set
312
 
313 394 markom
  history = 0/1
314
      whether instruction execution flow is tracked for
315
      display by simulator hist command. Useful for
316
      back-trace debugging.
317 428 markom
 
318 312 markom
  iprompt = 0/1
319
      whether we strart in interactive prompt
320
 
321
  exe_log = 0/1
322
      whether execution log should be generated
323 428 markom
 
324 312 markom
  exe_log_fn = ""
325
      where to put execution log in, used only if 'exe_log'
326
      is set
327 433 markom
 
328
  clkcycle = [ps|ns|us|ms]
329
      specifies time measurement for one cycle
330 335 markom
*/
331
 
332 312 markom
section sim
333 335 markom
  /* verbose = 1 */
334 312 markom
  debug = 0
335
  profile = 0
336
  prof_fn = "sim.profile"
337 547 markom
  mprofile = 0
338
  mprof_fn = "sim.mprofile"
339 428 markom
 
340 394 markom
  history = 1
341 312 markom
  /* iprompt = 0 */
342
  exe_log = 0
343
  exe_log_fn = "executed.log"
344 433 markom
  clkcycle = 4ns
345 312 markom
end
346
 
347
 
348
/* SECTION VAPI
349
 
350
    This section configures Verification API, used for Advanced
351
    Core Verification.
352 428 markom
 
353 312 markom
    enabled = 0/1
354
        whether to start VAPI server
355 428 markom
 
356 312 markom
    server_port = 
357
        TCP/IP port to start VAPI server on
358 428 markom
 
359 355 markom
    log_enabled = 0/1
360
       whether logging of VAPI requests is enabled
361 428 markom
 
362 486 erez
    hide_device_id = 0/1
363
       whether to disable logging of device id (for compatability with old version)
364
 
365 355 markom
    vapi_fn = 
366
       specifies filename where to log into, if log_enabled is selected
367 312 markom
*/
368
 
369
section VAPI
370
  enabled = 0
371
  server_port = 9998
372 355 markom
  log_enabled = 0
373 427 markom
  vapi_log_fn = "vapi.log"
374 312 markom
end
375
 
376
 
377
/* CPU SECTION
378
 
379
   This section specifies various CPU parameters.
380 428 markom
 
381 312 markom
   ver = 
382
   rev = 
383
      specifies version and revision of the CPU used
384 428 markom
 
385 312 markom
   upr = 
386
      changes the upr register
387 556 markom
 
388
   sr = 
389
      sets the initial Supervision Register value
390 428 markom
 
391 312 markom
   superscalar = 0/1
392 388 lampret
      whether CPU is scalar or superscalar
393
      (modify cpu/or32/execute.c to tune superscalar model)
394
 
395 312 markom
   hazards = 0/1
396 388 lampret
      whether data hazards are tracked in superscalar CPU
397
      and displayed by the simulator r command
398
 
399 312 markom
   dependstats = 0/1
400 388 lampret
      whether inter-instruction dependencies are calculated
401
      and displayed by simulator stats command.
402
 
403 535 markom
   raw_range = 
404
      range in cycles for raw register over time analysis, 0 = disabled
405 312 markom
*/
406
 
407 263 markom
section cpu
408
  ver = 0x1200
409
  rev = 0x0001
410
  /* upr = */
411 556 markom
  sr = 0x00008003
412 263 markom
  superscalar = 0
413
  hazards = 0
414
  dependstats = 0
415
end
416
 
417 312 markom
 
418 557 markom
/* PM SECTION
419
 
420
   This section specifies Power Menagement paramaters
421
 
422
   enabled = 0/1
423
      whether power menagement is enabled
424
*/
425
 
426
section pm
427
  enabled = 0
428
end
429
 
430 541 markom
/* BPB SECTION
431
 
432
   This section specifies how branch prediction should behave.
433
 
434
   enabled = 0/1
435
      whether bpb is enabled
436
 
437
   btic = 0/1
438
      enable branch target instruction cache model
439
 
440
   sbp_bf_fwd = 0/1
441
      whether static branch prediction for l.bf uses forward prediction
442
 
443
   sbp_bnf_fwd = 0/1
444
      whether static branch prediction for l.bnf uses forward prediction
445
 
446
   hitdelay = 
447
       number of cycles bpb hit costs
448
 
449
   missdelay = 
450
       number of cycles bpb miss costs
451
*/
452
 
453
section bpb
454
  enabled = 0
455
  btic = 0
456
  sbp_bf_fwd = 0
457
  sbp_bnf_fwd = 0
458
  hitdelay = 0
459
  missdelay = 0
460
end
461
 
462
 
463 312 markom
/* DEBUG SECTION
464
 
465
   This sections specifies how debug unit should behave.
466 428 markom
 
467 312 markom
   enabled = 0/1
468
      whether debug unit is enabled
469 428 markom
 
470 312 markom
   gdb_enabled = 0/1
471
      whether to start gdb server at 'server_port' port
472 428 markom
 
473 312 markom
   server_port = 
474
      TCP/IP port to start gdb server on, used only if gdb_enabled
475
      is set
476 486 erez
 
477
   vapi_id = 
478
      Used to create "fake" vapi log file containing the JTAG proxy messages.
479 479 markom
*/
480 428 markom
 
481 269 markom
section debug
482 312 markom
  enabled = 0
483
  gdb_enabled = 0
484 269 markom
  server_port = 9999
485 486 erez
  vapi_id = 0xFFFF
486 269 markom
end
487
 
488 264 markom
 
489 312 markom
/* MC SECTION
490
 
491
   This section configures the memory controller
492
 
493
   enabled = 0/1
494
      whether memory controller is enabled
495 428 markom
 
496 312 markom
   baseaddr = 
497
      address of first MC register
498 428 markom
 
499 312 markom
   POC = 
500
      Power On Configuration register
501
*/
502
 
503 243 markom
section mc
504 304 markom
  enabled = 0
505 261 markom
  baseaddr = 0xa0000000
506
  POC = 0x00000008                 /* Power on configuration register */
507 243 markom
end
508 261 markom
 
509 312 markom
 
510
/* UART SECTION
511
 
512
   This section configures UARTs
513
 
514
   nuarts = 
515
      make specified number of instances, configure each
516
      instance within device - enddevice construct.
517 428 markom
 
518 312 markom
   instance specific:
519
     baseaddr = 
520
        address of first UART register for this device
521 428 markom
 
522 312 markom
     rx_file = ""
523
        filename, where to read data from
524 428 markom
 
525 312 markom
     tx_file = ""
526
        filename, where to write data to
527 332 markom
 
528
     irq = 
529
        irq number for this device
530 428 markom
 
531 341 markom
     16550 = 0/1
532
        0, if this device is uart 16450 and 1, if it is 16550
533 428 markom
 
534 312 markom
     jitter = 
535
        in msecs... time to block, -1 to disable it
536 428 markom
 
537 313 markom
     vapi_id = 
538
        VAPI id of this instance
539 312 markom
*/
540
 
541 261 markom
section uart
542
  nuarts = 1
543 428 markom
 
544 261 markom
  device 0
545
    baseaddr = 0x80000000
546 332 markom
    irq = 2
547 261 markom
    rxfile = "/tmp/uart0.rx"
548
    txfile = "/tmp/uart0.tx"
549
    jitter = -1                     /* async behaviour */
550
  enddevice
551
end
552
 
553 312 markom
 
554
/* DMA SECTION
555
 
556
   This section configures DMAs
557
 
558
   ndmas = 
559
      make specified number of instances, configure each
560
      instance within device - enddevice construct.
561 428 markom
 
562 312 markom
   instance specific:
563
     baseaddr = 
564
        address of first DMA register for this device
565
 
566
     irq = 
567
        irq number for this device
568 428 markom
 
569 313 markom
     vapi_id = 
570
        VAPI id of this instance
571 312 markom
*/
572
 
573 261 markom
section dma
574
  ndmas = 1
575 428 markom
 
576 261 markom
  device 0
577
    baseaddr = 0x90000000
578
    irq = 4
579
  enddevice
580
end
581 293 markom
 
582 304 markom
 
583 312 markom
/* ETHERNET SECTION
584
 
585
   This section configures ethernets
586
 
587
   nethernets = 
588
      make specified number of instances, configure each
589
      instance within device - enddevice construct.
590 428 markom
 
591 312 markom
   instance specific:
592
     baseaddr = 
593
        address of first ethernet register for this device
594
 
595
     dma = 
596
        which controller is this ethernet "connected" to
597 428 markom
 
598 312 markom
     rx_channel = 
599
        DMA channel used for RX
600 428 markom
 
601 312 markom
     tx_channel = 
602
        DMA channel used for TX
603
 
604
     rx_file = ""
605
        filename, where to read data from
606 428 markom
 
607 312 markom
     tx_file = ""
608
        filename, where to write data to
609 428 markom
 
610 313 markom
     vapi_id = 
611
        VAPI id of this instance
612 312 markom
*/
613
 
614 304 markom
section ethernet
615 310 markom
  nethernets = 1
616 428 markom
 
617 310 markom
  device 0
618
    baseaddr = 0x88000000
619
    dma = 0
620
    tx_channel = 0
621
    rx_channel = 1
622
    rxfile = "/tmp/eth0.rx"
623
    txfile = "/tmp/eth0.tx"
624
  enddevice
625 304 markom
end
626 332 markom
 
627 486 erez
/* GPIO SECTION
628
 
629
   This section configures GPIOs
630
 
631
   ngpios = 
632
      make specified number of instances, configure each
633
      instance within device - enddevice construct.
634
 
635
   instance specific:
636
     baseaddr = 
637
        address of first GPIO register for this device
638
 
639
     irq = 
640
        irq number for this device
641
 
642
     base_vapi_id = 
643
        first VAPI id of this instance
644
        GPIO uses 8 consecutive VAPI IDs
645
*/
646
 
647
section gpio
648
  ngpios = 1
649
 
650
  device 0
651
    baseaddr = 0xB0000000
652
    irq = 23
653
    base_vapi_id = 0x0200
654
  enddevice
655
end
656
 
657 332 markom
/* TICK TIMER SECTION
658
 
659
    This section configures tick timer
660 428 markom
 
661 332 markom
    enabled = 0/1
662
      whether tick timer is enabled
663 428 markom
 
664 332 markom
    irq = 
665
      irq number
666
*/
667
 
668
section tick
669
  enabled = 0
670
  irq = 3
671
end

powered by: WebSVN 2.1.0

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