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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc2/] [or1ksim/] [sim.cfg] - Blame information for rev 541

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

powered by: WebSVN 2.1.0

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