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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_65/] [or1ksim/] [sim.cfg] - Blame information for rev 568

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
    size = 0x00100000
114
    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
    baseaddr = 0x40000000
122
    size = 0x00100000
123
    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 433 markom
 
331
  clkcycle = [ps|ns|us|ms]
332
      specifies time measurement for one cycle
333 335 markom
*/
334
 
335 312 markom
section sim
336 335 markom
  /* verbose = 1 */
337 312 markom
  debug = 0
338
  profile = 0
339
  prof_fn = "sim.profile"
340 547 markom
  mprofile = 0
341
  mprof_fn = "sim.mprofile"
342 428 markom
 
343 394 markom
  history = 1
344 312 markom
  /* iprompt = 0 */
345
  exe_log = 0
346
  exe_log_fn = "executed.log"
347 433 markom
  clkcycle = 4ns
348 312 markom
end
349
 
350
 
351
/* SECTION VAPI
352
 
353
    This section configures Verification API, used for Advanced
354
    Core Verification.
355 428 markom
 
356 312 markom
    enabled = 0/1
357
        whether to start VAPI server
358 428 markom
 
359 312 markom
    server_port = 
360
        TCP/IP port to start VAPI server on
361 428 markom
 
362 355 markom
    log_enabled = 0/1
363
       whether logging of VAPI requests is enabled
364 428 markom
 
365 486 erez
    hide_device_id = 0/1
366
       whether to disable logging of device id (for compatability with old version)
367
 
368 355 markom
    vapi_fn = 
369
       specifies filename where to log into, if log_enabled is selected
370 312 markom
*/
371
 
372
section VAPI
373
  enabled = 0
374
  server_port = 9998
375 355 markom
  log_enabled = 0
376 427 markom
  vapi_log_fn = "vapi.log"
377 312 markom
end
378
 
379
 
380
/* CPU SECTION
381
 
382
   This section specifies various CPU parameters.
383 428 markom
 
384 312 markom
   ver = 
385
   rev = 
386
      specifies version and revision of the CPU used
387 428 markom
 
388 312 markom
   upr = 
389
      changes the upr register
390 556 markom
 
391
   sr = 
392
      sets the initial Supervision Register value
393 428 markom
 
394 312 markom
   superscalar = 0/1
395 388 lampret
      whether CPU is scalar or superscalar
396
      (modify cpu/or32/execute.c to tune superscalar model)
397
 
398 312 markom
   hazards = 0/1
399 388 lampret
      whether data hazards are tracked in superscalar CPU
400
      and displayed by the simulator r command
401
 
402 312 markom
   dependstats = 0/1
403 388 lampret
      whether inter-instruction dependencies are calculated
404
      and displayed by simulator stats command.
405
 
406 535 markom
   raw_range = 
407
      range in cycles for raw register over time analysis, 0 = disabled
408 312 markom
*/
409
 
410 263 markom
section cpu
411
  ver = 0x1200
412
  rev = 0x0001
413
  /* upr = */
414 556 markom
  sr = 0x00008003
415 263 markom
  superscalar = 0
416
  hazards = 0
417
  dependstats = 0
418
end
419
 
420 312 markom
 
421 557 markom
/* PM SECTION
422
 
423
   This section specifies Power Menagement paramaters
424
 
425
   enabled = 0/1
426
      whether power menagement is enabled
427
*/
428
 
429
section pm
430
  enabled = 0
431
end
432
 
433 541 markom
/* BPB SECTION
434
 
435
   This section specifies how branch prediction should behave.
436
 
437
   enabled = 0/1
438
      whether bpb is enabled
439
 
440
   btic = 0/1
441
      enable branch target instruction cache model
442
 
443
   sbp_bf_fwd = 0/1
444
      whether static branch prediction for l.bf uses forward prediction
445
 
446
   sbp_bnf_fwd = 0/1
447
      whether static branch prediction for l.bnf uses forward prediction
448
 
449
   hitdelay = 
450
       number of cycles bpb hit costs
451
 
452
   missdelay = 
453
       number of cycles bpb miss costs
454
*/
455
 
456
section bpb
457
  enabled = 0
458
  btic = 0
459
  sbp_bf_fwd = 0
460
  sbp_bnf_fwd = 0
461
  hitdelay = 0
462
  missdelay = 0
463
end
464
 
465
 
466 312 markom
/* DEBUG SECTION
467
 
468
   This sections specifies how debug unit should behave.
469 428 markom
 
470 312 markom
   enabled = 0/1
471
      whether debug unit is enabled
472 428 markom
 
473 312 markom
   gdb_enabled = 0/1
474
      whether to start gdb server at 'server_port' port
475 428 markom
 
476 312 markom
   server_port = 
477
      TCP/IP port to start gdb server on, used only if gdb_enabled
478
      is set
479 486 erez
 
480
   vapi_id = 
481
      Used to create "fake" vapi log file containing the JTAG proxy messages.
482 479 markom
*/
483 428 markom
 
484 269 markom
section debug
485 312 markom
  enabled = 0
486
  gdb_enabled = 0
487 269 markom
  server_port = 9999
488 486 erez
  vapi_id = 0xFFFF
489 269 markom
end
490
 
491 264 markom
 
492 312 markom
/* MC SECTION
493
 
494
   This section configures the memory controller
495
 
496
   enabled = 0/1
497
      whether memory controller is enabled
498 428 markom
 
499 312 markom
   baseaddr = 
500
      address of first MC register
501 428 markom
 
502 312 markom
   POC = 
503
      Power On Configuration register
504
*/
505
 
506 243 markom
section mc
507 304 markom
  enabled = 0
508 261 markom
  baseaddr = 0xa0000000
509
  POC = 0x00000008                 /* Power on configuration register */
510 243 markom
end
511 261 markom
 
512 312 markom
 
513
/* UART SECTION
514
 
515
   This section configures UARTs
516
 
517
   nuarts = 
518
      make specified number of instances, configure each
519
      instance within device - enddevice construct.
520 428 markom
 
521 312 markom
   instance specific:
522
     baseaddr = 
523
        address of first UART register for this device
524 428 markom
 
525 312 markom
     rx_file = ""
526
        filename, where to read data from
527 428 markom
 
528 312 markom
     tx_file = ""
529
        filename, where to write data to
530 332 markom
 
531
     irq = 
532
        irq number for this device
533 428 markom
 
534 341 markom
     16550 = 0/1
535
        0, if this device is uart 16450 and 1, if it is 16550
536 428 markom
 
537 312 markom
     jitter = 
538
        in msecs... time to block, -1 to disable it
539 428 markom
 
540 313 markom
     vapi_id = 
541
        VAPI id of this instance
542 312 markom
*/
543
 
544 261 markom
section uart
545
  nuarts = 1
546 428 markom
 
547 261 markom
  device 0
548
    baseaddr = 0x80000000
549 332 markom
    irq = 2
550 261 markom
    rxfile = "/tmp/uart0.rx"
551
    txfile = "/tmp/uart0.tx"
552
    jitter = -1                     /* async behaviour */
553
  enddevice
554
end
555
 
556 312 markom
 
557
/* DMA SECTION
558
 
559
   This section configures DMAs
560
 
561
   ndmas = 
562
      make specified number of instances, configure each
563
      instance within device - enddevice construct.
564 428 markom
 
565 312 markom
   instance specific:
566
     baseaddr = 
567
        address of first DMA register for this device
568
 
569
     irq = 
570
        irq number for this device
571 428 markom
 
572 313 markom
     vapi_id = 
573
        VAPI id of this instance
574 312 markom
*/
575
 
576 261 markom
section dma
577
  ndmas = 1
578 428 markom
 
579 261 markom
  device 0
580
    baseaddr = 0x90000000
581
    irq = 4
582
  enddevice
583
end
584 293 markom
 
585 304 markom
 
586 312 markom
/* ETHERNET SECTION
587
 
588
   This section configures ethernets
589
 
590
   nethernets = 
591
      make specified number of instances, configure each
592
      instance within device - enddevice construct.
593 428 markom
 
594 312 markom
   instance specific:
595
     baseaddr = 
596
        address of first ethernet register for this device
597
 
598
     dma = 
599
        which controller is this ethernet "connected" to
600 428 markom
 
601 312 markom
     rx_channel = 
602
        DMA channel used for RX
603 428 markom
 
604 312 markom
     tx_channel = 
605
        DMA channel used for TX
606
 
607
     rx_file = ""
608
        filename, where to read data from
609 428 markom
 
610 312 markom
     tx_file = ""
611
        filename, where to write data to
612 428 markom
 
613 313 markom
     vapi_id = 
614
        VAPI id of this instance
615 312 markom
*/
616
 
617 304 markom
section ethernet
618 310 markom
  nethernets = 1
619 428 markom
 
620 310 markom
  device 0
621
    baseaddr = 0x88000000
622
    dma = 0
623
    tx_channel = 0
624
    rx_channel = 1
625
    rxfile = "/tmp/eth0.rx"
626
    txfile = "/tmp/eth0.tx"
627
  enddevice
628 304 markom
end
629 332 markom
 
630 486 erez
/* GPIO SECTION
631
 
632
   This section configures GPIOs
633
 
634
   ngpios = 
635
      make specified number of instances, configure each
636
      instance within device - enddevice construct.
637
 
638
   instance specific:
639
     baseaddr = 
640
        address of first GPIO register for this device
641
 
642
     irq = 
643
        irq number for this device
644
 
645
     base_vapi_id = 
646
        first VAPI id of this instance
647
        GPIO uses 8 consecutive VAPI IDs
648
*/
649
 
650
section gpio
651
  ngpios = 1
652
 
653
  device 0
654
    baseaddr = 0xB0000000
655
    irq = 23
656
    base_vapi_id = 0x0200
657
  enddevice
658
end
659
 
660 332 markom
/* TICK TIMER SECTION
661
 
662
    This section configures tick timer
663 428 markom
 
664 332 markom
    enabled = 0/1
665
      whether tick timer is enabled
666 428 markom
 
667 332 markom
    irq = 
668
      irq number
669
*/
670
 
671
section tick
672
  enabled = 0
673
  irq = 3
674
end

powered by: WebSVN 2.1.0

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