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 556

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

powered by: WebSVN 2.1.0

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