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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc2/] [or1ksim/] [sim.cfg] - Blame information for rev 535

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
*/
149
 
150
section immu
151
  enabled = 0
152
  nsets = 32
153
  nways = 1
154 428 markom
  pagesize = 8192
155 427 markom
end
156 428 markom
 
157 434 markom
 
158 427 markom
/* DMMU SECTION
159
 
160
    This section configures Data Memory Menangement Unit
161 428 markom
 
162 427 markom
    enabled = 0/1
163
       whether DMMU is enabled
164 428 markom
       (NOTE: UPR bit is set)
165
 
166 427 markom
    nsets = 
167
       number of DTLB sets; must be power of two
168 428 markom
 
169 427 markom
    nways = 
170
       number of DTLB ways
171 428 markom
 
172 427 markom
    pagesize = 
173
       data page size; must be power of two
174 428 markom
 
175 427 markom
    entrysize = 
176
       data entry size in bytes
177 428 markom
 
178 427 markom
    ustates = 
179
       number of DTLB usage states (2, 3, 4 etc., max is 4)
180
*/
181
 
182
section dmmu
183
  enabled = 0
184
  nsets = 32
185
  nways = 1
186 428 markom
  pagesize = 8192
187 427 markom
end
188
 
189 428 markom
 
190
/* IC SECTION
191
 
192
    This section configures Instruction Cache
193
 
194
    enabled = 0/1
195
       whether IC is enabled
196
       (NOTE: UPR bit is set)
197
 
198
    nsets = 
199
       number of IC sets; must be power of two
200
 
201
    nways = 
202
       number of IC ways
203
 
204
    blocksize = 
205
       IC block size in bytes; must be power of two
206
 
207
    ustates = 
208
       number of IC usage states (2, 3, 4 etc., max is 4)
209
*/
210
 
211
section ic
212
  enabled = 0
213
  nsets = 512
214
  nways = 1
215
  blocksize = 16
216
end
217
 
218 434 markom
 
219 428 markom
/* DC SECTION
220
 
221
    This section configures Data Cache
222
 
223
    enabled = 0/1
224
       whether DC is enabled
225
       (NOTE: UPR bit is set)
226
 
227
    nsets = 
228
       number of DC sets; must be power of two
229
 
230
    nways = 
231
       number of DC ways
232
 
233
    blocksize = 
234
       DC block size in bytes; must be power of two
235
 
236
    ustates = 
237
       number of DC usage states (2, 3, 4 etc., max is 4)
238
*/
239
 
240
section dc
241
  enabled = 0
242
  nsets = 512
243
  nways = 1
244
  blocksize = 16
245
end
246
 
247 312 markom
/* SIM SECTION
248
 
249
  This section specifies how should sim behave.
250 428 markom
 
251 312 markom
  verbose = 0/1
252
      whether to print out extra messages
253 428 markom
 
254 344 markom
  debug = 0-9
255
      = 0 disabled debug messages
256
      1-9 level of sim debug information, greater the number more verbose is
257
          the output
258 428 markom
 
259 312 markom
  profile = 0/1
260
      whether to generate profiling file 'sim.profile'
261 428 markom
 
262 312 markom
  prof_fn = ""
263
      filename, where to generate profiling info, used
264
      only if 'profile' is set
265 428 markom
 
266 394 markom
  history = 0/1
267
      whether instruction execution flow is tracked for
268
      display by simulator hist command. Useful for
269
      back-trace debugging.
270 428 markom
 
271 312 markom
  iprompt = 0/1
272
      whether we strart in interactive prompt
273
 
274
  exe_log = 0/1
275
      whether execution log should be generated
276 428 markom
 
277 312 markom
  exe_log_fn = ""
278
      where to put execution log in, used only if 'exe_log'
279
      is set
280 433 markom
 
281
  clkcycle = [ps|ns|us|ms]
282
      specifies time measurement for one cycle
283 335 markom
*/
284
 
285 312 markom
section sim
286 335 markom
  /* verbose = 1 */
287 312 markom
  debug = 0
288
  profile = 0
289
  prof_fn = "sim.profile"
290 428 markom
 
291 394 markom
  history = 1
292 312 markom
  /* iprompt = 0 */
293
  exe_log = 0
294
  exe_log_fn = "executed.log"
295 433 markom
  clkcycle = 4ns
296 312 markom
end
297
 
298
 
299
/* SECTION VAPI
300
 
301
    This section configures Verification API, used for Advanced
302
    Core Verification.
303 428 markom
 
304 312 markom
    enabled = 0/1
305
        whether to start VAPI server
306 428 markom
 
307 312 markom
    server_port = 
308
        TCP/IP port to start VAPI server on
309 428 markom
 
310 355 markom
    log_enabled = 0/1
311
       whether logging of VAPI requests is enabled
312 428 markom
 
313 486 erez
    hide_device_id = 0/1
314
       whether to disable logging of device id (for compatability with old version)
315
 
316 355 markom
    vapi_fn = 
317
       specifies filename where to log into, if log_enabled is selected
318 312 markom
*/
319
 
320
section VAPI
321
  enabled = 0
322
  server_port = 9998
323 355 markom
  log_enabled = 0
324 427 markom
  vapi_log_fn = "vapi.log"
325 312 markom
end
326
 
327
 
328
/* CPU SECTION
329
 
330
   This section specifies various CPU parameters.
331 428 markom
 
332 312 markom
   ver = 
333
   rev = 
334
      specifies version and revision of the CPU used
335 428 markom
 
336 312 markom
   upr = 
337
      changes the upr register
338 428 markom
 
339 312 markom
   superscalar = 0/1
340 388 lampret
      whether CPU is scalar or superscalar
341
      (modify cpu/or32/execute.c to tune superscalar model)
342
 
343 312 markom
   hazards = 0/1
344 388 lampret
      whether data hazards are tracked in superscalar CPU
345
      and displayed by the simulator r command
346
 
347 312 markom
   dependstats = 0/1
348 388 lampret
      whether inter-instruction dependencies are calculated
349
      and displayed by simulator stats command.
350
 
351 312 markom
   btic = 0/1
352 388 lampret
      enable branch target instruction cache model
353
 
354 312 markom
   bpb = 0/1
355 388 lampret
      enable branch prediction buffer model
356 535 markom
 
357
   sbp_bf_fwd = 0/1
358
      whether static branch prediction for l.bf uses forward prediction
359
 
360
   sbp_bnf_fwd = 0/1
361
      whether static branch prediction for l.bnf uses forward prediction
362
 
363
   raw_range = 
364
      range in cycles for raw register over time analysis, 0 = disabled
365 312 markom
*/
366
 
367 263 markom
section cpu
368
  ver = 0x1200
369
  rev = 0x0001
370
  /* upr = */
371
  superscalar = 0
372
  hazards = 0
373
  dependstats = 0
374 304 markom
  btic = 0
375 264 markom
  bpb = 0
376 535 markom
  sbp_bf_fwd = 0
377
  sbp_bnf_fwd = 1
378
  raw_range = 0
379 263 markom
end
380
 
381 312 markom
 
382
/* DEBUG SECTION
383
 
384
   This sections specifies how debug unit should behave.
385 428 markom
 
386 312 markom
   enabled = 0/1
387
      whether debug unit is enabled
388 428 markom
 
389 312 markom
   gdb_enabled = 0/1
390
      whether to start gdb server at 'server_port' port
391 428 markom
 
392 312 markom
   server_port = 
393
      TCP/IP port to start gdb server on, used only if gdb_enabled
394
      is set
395 486 erez
 
396
   vapi_id = 
397
      Used to create "fake" vapi log file containing the JTAG proxy messages.
398 479 markom
*/
399 428 markom
 
400 269 markom
section debug
401 312 markom
  enabled = 0
402
  gdb_enabled = 0
403 269 markom
  server_port = 9999
404 486 erez
  vapi_id = 0xFFFF
405 269 markom
end
406
 
407 264 markom
 
408 312 markom
/* MC SECTION
409
 
410
   This section configures the memory controller
411
 
412
   enabled = 0/1
413
      whether memory controller is enabled
414 428 markom
 
415 312 markom
   baseaddr = 
416
      address of first MC register
417 428 markom
 
418 312 markom
   POC = 
419
      Power On Configuration register
420
*/
421
 
422 243 markom
section mc
423 304 markom
  enabled = 0
424 261 markom
  baseaddr = 0xa0000000
425
  POC = 0x00000008                 /* Power on configuration register */
426 243 markom
end
427 261 markom
 
428 312 markom
 
429
/* UART SECTION
430
 
431
   This section configures UARTs
432
 
433
   enabled = 0/1
434
      whether uarts are enabled
435 428 markom
 
436 312 markom
   nuarts = 
437
      make specified number of instances, configure each
438
      instance within device - enddevice construct.
439 428 markom
 
440 312 markom
   instance specific:
441
     baseaddr = 
442
        address of first UART register for this device
443 428 markom
 
444 312 markom
     rx_file = ""
445
        filename, where to read data from
446 428 markom
 
447 312 markom
     tx_file = ""
448
        filename, where to write data to
449 332 markom
 
450
     irq = 
451
        irq number for this device
452 428 markom
 
453 341 markom
     16550 = 0/1
454
        0, if this device is uart 16450 and 1, if it is 16550
455 428 markom
 
456 312 markom
     jitter = 
457
        in msecs... time to block, -1 to disable it
458 428 markom
 
459 313 markom
     vapi_id = 
460
        VAPI id of this instance
461 312 markom
*/
462
 
463 261 markom
section uart
464 304 markom
  enabled = 0
465 261 markom
  nuarts = 1
466 428 markom
 
467 261 markom
  device 0
468
    baseaddr = 0x80000000
469 332 markom
    irq = 2
470 261 markom
    rxfile = "/tmp/uart0.rx"
471
    txfile = "/tmp/uart0.tx"
472
    jitter = -1                     /* async behaviour */
473
  enddevice
474
end
475
 
476 312 markom
 
477
/* DMA SECTION
478
 
479
   This section configures DMAs
480
 
481
   enabled = 0/1
482
      whether DMAs are enabled
483 428 markom
 
484 312 markom
   ndmas = 
485
      make specified number of instances, configure each
486
      instance within device - enddevice construct.
487 428 markom
 
488 312 markom
   instance specific:
489
     baseaddr = 
490
        address of first DMA register for this device
491
 
492
     irq = 
493
        irq number for this device
494 428 markom
 
495 313 markom
     vapi_id = 
496
        VAPI id of this instance
497 312 markom
*/
498
 
499 261 markom
section dma
500 304 markom
  enabled = 0
501 261 markom
  ndmas = 1
502 428 markom
 
503 261 markom
  device 0
504
    baseaddr = 0x90000000
505
    irq = 4
506
  enddevice
507
end
508 293 markom
 
509 304 markom
 
510 312 markom
/* ETHERNET SECTION
511
 
512
   This section configures ethernets
513
 
514
   enabled = 0/1
515
      whether ethernets are enabled
516 428 markom
 
517 312 markom
   nethernets = 
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 ethernet register for this device
524
 
525
     dma = 
526
        which controller is this ethernet "connected" to
527 428 markom
 
528 312 markom
     rx_channel = 
529
        DMA channel used for RX
530 428 markom
 
531 312 markom
     tx_channel = 
532
        DMA channel used for TX
533
 
534
     rx_file = ""
535
        filename, where to read data from
536 428 markom
 
537 312 markom
     tx_file = ""
538
        filename, where to write data to
539 428 markom
 
540 313 markom
     vapi_id = 
541
        VAPI id of this instance
542 312 markom
*/
543
 
544 304 markom
section ethernet
545
  enabled = 0
546 310 markom
  nethernets = 1
547 428 markom
 
548 310 markom
  device 0
549
    baseaddr = 0x88000000
550
    dma = 0
551
    tx_channel = 0
552
    rx_channel = 1
553
    rxfile = "/tmp/eth0.rx"
554
    txfile = "/tmp/eth0.tx"
555
  enddevice
556 304 markom
end
557 332 markom
 
558 486 erez
/* GPIO SECTION
559
 
560
   This section configures GPIOs
561
 
562
   enabled = 0/1
563
      whether GPIOs are enabled
564
 
565
   ngpios = 
566
      make specified number of instances, configure each
567
      instance within device - enddevice construct.
568
 
569
   instance specific:
570
     baseaddr = 
571
        address of first GPIO register for this device
572
 
573
     irq = 
574
        irq number for this device
575
 
576
     base_vapi_id = 
577
        first VAPI id of this instance
578
        GPIO uses 8 consecutive VAPI IDs
579
*/
580
 
581
section gpio
582
  enabled = 0
583
  ngpios = 1
584
 
585
  device 0
586
    baseaddr = 0xB0000000
587
    irq = 23
588
    base_vapi_id = 0x0200
589
  enddevice
590
end
591
 
592 332 markom
/* TICK TIMER SECTION
593
 
594
    This section configures tick timer
595 428 markom
 
596 332 markom
    enabled = 0/1
597
      whether tick timer is enabled
598 428 markom
 
599 332 markom
    irq = 
600
      irq number
601
*/
602
 
603
section tick
604
  enabled = 0
605
  irq = 3
606
end

powered by: WebSVN 2.1.0

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