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

Subversion Repositories or1k

[/] [or1k/] [tags/] [tn_m001/] [or1ksim/] [sim.cfg] - Blame information for rev 486

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
   slp = 0/1
352 388 lampret
      calculation of subroutine level parallelism. Displayed
353
      by simulator stats command.
354
 
355 312 markom
   btic = 0/1
356 388 lampret
      enable branch target instruction cache model
357
 
358 312 markom
   bpb = 0/1
359 388 lampret
      enable branch prediction buffer model
360
 
361 312 markom
      parameters for CPU analysis
362
*/
363
 
364 263 markom
section cpu
365
  ver = 0x1200
366
  rev = 0x0001
367
  /* upr = */
368
  superscalar = 0
369
  hazards = 0
370
  dependstats = 0
371
  slp = 0
372 304 markom
  btic = 0
373 264 markom
  bpb = 0
374 263 markom
end
375
 
376 312 markom
 
377
/* DEBUG SECTION
378
 
379
   This sections specifies how debug unit should behave.
380 428 markom
 
381 312 markom
   enabled = 0/1
382
      whether debug unit is enabled
383 428 markom
 
384 312 markom
   gdb_enabled = 0/1
385
      whether to start gdb server at 'server_port' port
386 428 markom
 
387 312 markom
   server_port = 
388
      TCP/IP port to start gdb server on, used only if gdb_enabled
389
      is set
390 486 erez
 
391
   vapi_id = 
392
      Used to create "fake" vapi log file containing the JTAG proxy messages.
393 479 markom
*/
394 428 markom
 
395 269 markom
section debug
396 312 markom
  enabled = 0
397
  gdb_enabled = 0
398 269 markom
  server_port = 9999
399 486 erez
  vapi_id = 0xFFFF
400 269 markom
end
401
 
402 264 markom
 
403 312 markom
/* MC SECTION
404
 
405
   This section configures the memory controller
406
 
407
   enabled = 0/1
408
      whether memory controller is enabled
409 428 markom
 
410 312 markom
   baseaddr = 
411
      address of first MC register
412 428 markom
 
413 312 markom
   POC = 
414
      Power On Configuration register
415
*/
416
 
417 243 markom
section mc
418 304 markom
  enabled = 0
419 261 markom
  baseaddr = 0xa0000000
420
  POC = 0x00000008                 /* Power on configuration register */
421 243 markom
end
422 261 markom
 
423 312 markom
 
424
/* UART SECTION
425
 
426
   This section configures UARTs
427
 
428
   enabled = 0/1
429
      whether uarts are enabled
430 428 markom
 
431 312 markom
   nuarts = 
432
      make specified number of instances, configure each
433
      instance within device - enddevice construct.
434 428 markom
 
435 312 markom
   instance specific:
436
     baseaddr = 
437
        address of first UART register for this device
438 428 markom
 
439 312 markom
     rx_file = ""
440
        filename, where to read data from
441 428 markom
 
442 312 markom
     tx_file = ""
443
        filename, where to write data to
444 332 markom
 
445
     irq = 
446
        irq number for this device
447 428 markom
 
448 341 markom
     16550 = 0/1
449
        0, if this device is uart 16450 and 1, if it is 16550
450 428 markom
 
451 312 markom
     jitter = 
452
        in msecs... time to block, -1 to disable it
453 428 markom
 
454 313 markom
     vapi_id = 
455
        VAPI id of this instance
456 312 markom
*/
457
 
458 261 markom
section uart
459 304 markom
  enabled = 0
460 261 markom
  nuarts = 1
461 428 markom
 
462 261 markom
  device 0
463
    baseaddr = 0x80000000
464 332 markom
    irq = 2
465 261 markom
    rxfile = "/tmp/uart0.rx"
466
    txfile = "/tmp/uart0.tx"
467
    jitter = -1                     /* async behaviour */
468
  enddevice
469
end
470
 
471 312 markom
 
472
/* DMA SECTION
473
 
474
   This section configures DMAs
475
 
476
   enabled = 0/1
477
      whether DMAs are enabled
478 428 markom
 
479 312 markom
   ndmas = 
480
      make specified number of instances, configure each
481
      instance within device - enddevice construct.
482 428 markom
 
483 312 markom
   instance specific:
484
     baseaddr = 
485
        address of first DMA register for this device
486
 
487
     irq = 
488
        irq number for this device
489 428 markom
 
490 313 markom
     vapi_id = 
491
        VAPI id of this instance
492 312 markom
*/
493
 
494 261 markom
section dma
495 304 markom
  enabled = 0
496 261 markom
  ndmas = 1
497 428 markom
 
498 261 markom
  device 0
499
    baseaddr = 0x90000000
500
    irq = 4
501
  enddevice
502
end
503 293 markom
 
504 304 markom
 
505 312 markom
/* ETHERNET SECTION
506
 
507
   This section configures ethernets
508
 
509
   enabled = 0/1
510
      whether ethernets are enabled
511 428 markom
 
512 312 markom
   nethernets = 
513
      make specified number of instances, configure each
514
      instance within device - enddevice construct.
515 428 markom
 
516 312 markom
   instance specific:
517
     baseaddr = 
518
        address of first ethernet register for this device
519
 
520
     dma = 
521
        which controller is this ethernet "connected" to
522 428 markom
 
523 312 markom
     rx_channel = 
524
        DMA channel used for RX
525 428 markom
 
526 312 markom
     tx_channel = 
527
        DMA channel used for TX
528
 
529
     rx_file = ""
530
        filename, where to read data from
531 428 markom
 
532 312 markom
     tx_file = ""
533
        filename, where to write data to
534 428 markom
 
535 313 markom
     vapi_id = 
536
        VAPI id of this instance
537 312 markom
*/
538
 
539 304 markom
section ethernet
540
  enabled = 0
541 310 markom
  nethernets = 1
542 428 markom
 
543 310 markom
  device 0
544
    baseaddr = 0x88000000
545
    dma = 0
546
    tx_channel = 0
547
    rx_channel = 1
548
    rxfile = "/tmp/eth0.rx"
549
    txfile = "/tmp/eth0.tx"
550
  enddevice
551 304 markom
end
552 332 markom
 
553 486 erez
/* GPIO SECTION
554
 
555
   This section configures GPIOs
556
 
557
   enabled = 0/1
558
      whether GPIOs are enabled
559
 
560
   ngpios = 
561
      make specified number of instances, configure each
562
      instance within device - enddevice construct.
563
 
564
   instance specific:
565
     baseaddr = 
566
        address of first GPIO register for this device
567
 
568
     irq = 
569
        irq number for this device
570
 
571
     base_vapi_id = 
572
        first VAPI id of this instance
573
        GPIO uses 8 consecutive VAPI IDs
574
*/
575
 
576
section gpio
577
  enabled = 0
578
  ngpios = 1
579
 
580
  device 0
581
    baseaddr = 0xB0000000
582
    irq = 23
583
    base_vapi_id = 0x0200
584
  enddevice
585
end
586
 
587 332 markom
/* TICK TIMER SECTION
588
 
589
    This section configures tick timer
590 428 markom
 
591 332 markom
    enabled = 0/1
592
      whether tick timer is enabled
593 428 markom
 
594 332 markom
    irq = 
595
      irq number
596
*/
597
 
598
section tick
599
  enabled = 0
600
  irq = 3
601
end

powered by: WebSVN 2.1.0

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