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 553

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 428 markom
 
388 312 markom
   superscalar = 0/1
389 388 lampret
      whether CPU is scalar or superscalar
390
      (modify cpu/or32/execute.c to tune superscalar model)
391
 
392 312 markom
   hazards = 0/1
393 388 lampret
      whether data hazards are tracked in superscalar CPU
394
      and displayed by the simulator r command
395
 
396 312 markom
   dependstats = 0/1
397 388 lampret
      whether inter-instruction dependencies are calculated
398
      and displayed by simulator stats command.
399
 
400 535 markom
   raw_range = 
401
      range in cycles for raw register over time analysis, 0 = disabled
402 312 markom
*/
403
 
404 263 markom
section cpu
405
  ver = 0x1200
406
  rev = 0x0001
407
  /* upr = */
408
  superscalar = 0
409
  hazards = 0
410
  dependstats = 0
411
end
412
 
413 312 markom
 
414 541 markom
/* BPB SECTION
415
 
416
   This section specifies how branch prediction should behave.
417
 
418
   enabled = 0/1
419
      whether bpb is enabled
420
 
421
   btic = 0/1
422
      enable branch target instruction cache model
423
 
424
   sbp_bf_fwd = 0/1
425
      whether static branch prediction for l.bf uses forward prediction
426
 
427
   sbp_bnf_fwd = 0/1
428
      whether static branch prediction for l.bnf uses forward prediction
429
 
430
   hitdelay = 
431
       number of cycles bpb hit costs
432
 
433
   missdelay = 
434
       number of cycles bpb miss costs
435
*/
436
 
437
section bpb
438
  enabled = 0
439
  btic = 0
440
  sbp_bf_fwd = 0
441
  sbp_bnf_fwd = 0
442
  hitdelay = 0
443
  missdelay = 0
444
end
445
 
446
 
447 312 markom
/* DEBUG SECTION
448
 
449
   This sections specifies how debug unit should behave.
450 428 markom
 
451 312 markom
   enabled = 0/1
452
      whether debug unit is enabled
453 428 markom
 
454 312 markom
   gdb_enabled = 0/1
455
      whether to start gdb server at 'server_port' port
456 428 markom
 
457 312 markom
   server_port = 
458
      TCP/IP port to start gdb server on, used only if gdb_enabled
459
      is set
460 486 erez
 
461
   vapi_id = 
462
      Used to create "fake" vapi log file containing the JTAG proxy messages.
463 479 markom
*/
464 428 markom
 
465 269 markom
section debug
466 312 markom
  enabled = 0
467
  gdb_enabled = 0
468 269 markom
  server_port = 9999
469 486 erez
  vapi_id = 0xFFFF
470 269 markom
end
471
 
472 264 markom
 
473 312 markom
/* MC SECTION
474
 
475
   This section configures the memory controller
476
 
477
   enabled = 0/1
478
      whether memory controller is enabled
479 428 markom
 
480 312 markom
   baseaddr = 
481
      address of first MC register
482 428 markom
 
483 312 markom
   POC = 
484
      Power On Configuration register
485
*/
486
 
487 243 markom
section mc
488 304 markom
  enabled = 0
489 261 markom
  baseaddr = 0xa0000000
490
  POC = 0x00000008                 /* Power on configuration register */
491 243 markom
end
492 261 markom
 
493 312 markom
 
494
/* UART SECTION
495
 
496
   This section configures UARTs
497
 
498
   nuarts = 
499
      make specified number of instances, configure each
500
      instance within device - enddevice construct.
501 428 markom
 
502 312 markom
   instance specific:
503
     baseaddr = 
504
        address of first UART register for this device
505 428 markom
 
506 312 markom
     rx_file = ""
507
        filename, where to read data from
508 428 markom
 
509 312 markom
     tx_file = ""
510
        filename, where to write data to
511 332 markom
 
512
     irq = 
513
        irq number for this device
514 428 markom
 
515 341 markom
     16550 = 0/1
516
        0, if this device is uart 16450 and 1, if it is 16550
517 428 markom
 
518 312 markom
     jitter = 
519
        in msecs... time to block, -1 to disable it
520 428 markom
 
521 313 markom
     vapi_id = 
522
        VAPI id of this instance
523 312 markom
*/
524
 
525 261 markom
section uart
526
  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
   ndmas = 
543
      make specified number of instances, configure each
544
      instance within device - enddevice construct.
545 428 markom
 
546 312 markom
   instance specific:
547
     baseaddr = 
548
        address of first DMA register for this device
549
 
550
     irq = 
551
        irq number for this device
552 428 markom
 
553 313 markom
     vapi_id = 
554
        VAPI id of this instance
555 312 markom
*/
556
 
557 261 markom
section dma
558
  ndmas = 1
559 428 markom
 
560 261 markom
  device 0
561
    baseaddr = 0x90000000
562
    irq = 4
563
  enddevice
564
end
565 293 markom
 
566 304 markom
 
567 312 markom
/* ETHERNET SECTION
568
 
569
   This section configures ethernets
570
 
571
   nethernets = 
572
      make specified number of instances, configure each
573
      instance within device - enddevice construct.
574 428 markom
 
575 312 markom
   instance specific:
576
     baseaddr = 
577
        address of first ethernet register for this device
578
 
579
     dma = 
580
        which controller is this ethernet "connected" to
581 428 markom
 
582 312 markom
     rx_channel = 
583
        DMA channel used for RX
584 428 markom
 
585 312 markom
     tx_channel = 
586
        DMA channel used for TX
587
 
588
     rx_file = ""
589
        filename, where to read data from
590 428 markom
 
591 312 markom
     tx_file = ""
592
        filename, where to write data to
593 428 markom
 
594 313 markom
     vapi_id = 
595
        VAPI id of this instance
596 312 markom
*/
597
 
598 304 markom
section ethernet
599 310 markom
  nethernets = 1
600 428 markom
 
601 310 markom
  device 0
602
    baseaddr = 0x88000000
603
    dma = 0
604
    tx_channel = 0
605
    rx_channel = 1
606
    rxfile = "/tmp/eth0.rx"
607
    txfile = "/tmp/eth0.tx"
608
  enddevice
609 304 markom
end
610 332 markom
 
611 486 erez
/* GPIO SECTION
612
 
613
   This section configures GPIOs
614
 
615
   ngpios = 
616
      make specified number of instances, configure each
617
      instance within device - enddevice construct.
618
 
619
   instance specific:
620
     baseaddr = 
621
        address of first GPIO register for this device
622
 
623
     irq = 
624
        irq number for this device
625
 
626
     base_vapi_id = 
627
        first VAPI id of this instance
628
        GPIO uses 8 consecutive VAPI IDs
629
*/
630
 
631
section gpio
632
  ngpios = 1
633
 
634
  device 0
635
    baseaddr = 0xB0000000
636
    irq = 23
637
    base_vapi_id = 0x0200
638
  enddevice
639
end
640
 
641 332 markom
/* TICK TIMER SECTION
642
 
643
    This section configures tick timer
644 428 markom
 
645 332 markom
    enabled = 0/1
646
      whether tick timer is enabled
647 428 markom
 
648 332 markom
    irq = 
649
      irq number
650
*/
651
 
652
section tick
653
  enabled = 0
654
  irq = 3
655
end

powered by: WebSVN 2.1.0

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