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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_61/] [or1ksim/] [sim.cfg] - Blame information for rev 479

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 355 markom
    vapi_fn = 
314
       specifies filename where to log into, if log_enabled is selected
315 312 markom
*/
316
 
317
section VAPI
318
  enabled = 0
319
  server_port = 9998
320 355 markom
  log_enabled = 0
321 427 markom
  vapi_log_fn = "vapi.log"
322 312 markom
end
323
 
324
 
325
/* CPU SECTION
326
 
327
   This section specifies various CPU parameters.
328 428 markom
 
329 312 markom
   ver = 
330
   rev = 
331
      specifies version and revision of the CPU used
332 428 markom
 
333 312 markom
   upr = 
334
      changes the upr register
335 428 markom
 
336 312 markom
   superscalar = 0/1
337 388 lampret
      whether CPU is scalar or superscalar
338
      (modify cpu/or32/execute.c to tune superscalar model)
339
 
340 312 markom
   hazards = 0/1
341 388 lampret
      whether data hazards are tracked in superscalar CPU
342
      and displayed by the simulator r command
343
 
344 312 markom
   dependstats = 0/1
345 388 lampret
      whether inter-instruction dependencies are calculated
346
      and displayed by simulator stats command.
347
 
348 312 markom
   slp = 0/1
349 388 lampret
      calculation of subroutine level parallelism. Displayed
350
      by simulator stats command.
351
 
352 312 markom
   btic = 0/1
353 388 lampret
      enable branch target instruction cache model
354
 
355 312 markom
   bpb = 0/1
356 388 lampret
      enable branch prediction buffer model
357
 
358 312 markom
      parameters for CPU analysis
359
*/
360
 
361 263 markom
section cpu
362
  ver = 0x1200
363
  rev = 0x0001
364
  /* upr = */
365
  superscalar = 0
366
  hazards = 0
367
  dependstats = 0
368
  slp = 0
369 304 markom
  btic = 0
370 264 markom
  bpb = 0
371 263 markom
end
372
 
373 312 markom
 
374
/* DEBUG SECTION
375
 
376
   This sections specifies how debug unit should behave.
377 428 markom
 
378 312 markom
   enabled = 0/1
379
      whether debug unit is enabled
380 428 markom
 
381 312 markom
   gdb_enabled = 0/1
382
      whether to start gdb server at 'server_port' port
383 428 markom
 
384 312 markom
   server_port = 
385
      TCP/IP port to start gdb server on, used only if gdb_enabled
386
      is set
387 479 markom
*/
388 428 markom
 
389 269 markom
section debug
390 312 markom
  enabled = 0
391
  gdb_enabled = 0
392 269 markom
  server_port = 9999
393
end
394
 
395 264 markom
 
396 312 markom
/* MC SECTION
397
 
398
   This section configures the memory controller
399
 
400
   enabled = 0/1
401
      whether memory controller is enabled
402 428 markom
 
403 312 markom
   baseaddr = 
404
      address of first MC register
405 428 markom
 
406 312 markom
   POC = 
407
      Power On Configuration register
408
*/
409
 
410 243 markom
section mc
411 304 markom
  enabled = 0
412 261 markom
  baseaddr = 0xa0000000
413
  POC = 0x00000008                 /* Power on configuration register */
414 243 markom
end
415 261 markom
 
416 312 markom
 
417
/* UART SECTION
418
 
419
   This section configures UARTs
420
 
421
   enabled = 0/1
422
      whether uarts are enabled
423 428 markom
 
424 312 markom
   nuarts = 
425
      make specified number of instances, configure each
426
      instance within device - enddevice construct.
427 428 markom
 
428 312 markom
   instance specific:
429
     baseaddr = 
430
        address of first UART register for this device
431 428 markom
 
432 312 markom
     rx_file = ""
433
        filename, where to read data from
434 428 markom
 
435 312 markom
     tx_file = ""
436
        filename, where to write data to
437 332 markom
 
438
     irq = 
439
        irq number for this device
440 428 markom
 
441 341 markom
     16550 = 0/1
442
        0, if this device is uart 16450 and 1, if it is 16550
443 428 markom
 
444 312 markom
     jitter = 
445
        in msecs... time to block, -1 to disable it
446 428 markom
 
447 313 markom
     vapi_id = 
448
        VAPI id of this instance
449 312 markom
*/
450
 
451 261 markom
section uart
452 304 markom
  enabled = 0
453 261 markom
  nuarts = 1
454 428 markom
 
455 261 markom
  device 0
456
    baseaddr = 0x80000000
457 332 markom
    irq = 2
458 261 markom
    rxfile = "/tmp/uart0.rx"
459
    txfile = "/tmp/uart0.tx"
460
    jitter = -1                     /* async behaviour */
461
  enddevice
462
end
463
 
464 312 markom
 
465
/* DMA SECTION
466
 
467
   This section configures DMAs
468
 
469
   enabled = 0/1
470
      whether DMAs are enabled
471 428 markom
 
472 312 markom
   ndmas = 
473
      make specified number of instances, configure each
474
      instance within device - enddevice construct.
475 428 markom
 
476 312 markom
   instance specific:
477
     baseaddr = 
478
        address of first DMA register for this device
479
 
480
     irq = 
481
        irq number for this device
482 428 markom
 
483 313 markom
     vapi_id = 
484
        VAPI id of this instance
485 312 markom
*/
486
 
487 261 markom
section dma
488 304 markom
  enabled = 0
489 261 markom
  ndmas = 1
490 428 markom
 
491 261 markom
  device 0
492
    baseaddr = 0x90000000
493
    irq = 4
494
  enddevice
495
end
496 293 markom
 
497 304 markom
 
498 312 markom
/* ETHERNET SECTION
499
 
500
   This section configures ethernets
501
 
502
   enabled = 0/1
503
      whether ethernets are enabled
504 428 markom
 
505 312 markom
   nethernets = 
506
      make specified number of instances, configure each
507
      instance within device - enddevice construct.
508 428 markom
 
509 312 markom
   instance specific:
510
     baseaddr = 
511
        address of first ethernet register for this device
512
 
513
     dma = 
514
        which controller is this ethernet "connected" to
515 428 markom
 
516 312 markom
     rx_channel = 
517
        DMA channel used for RX
518 428 markom
 
519 312 markom
     tx_channel = 
520
        DMA channel used for TX
521
 
522
     rx_file = ""
523
        filename, where to read data from
524 428 markom
 
525 312 markom
     tx_file = ""
526
        filename, where to write data to
527 428 markom
 
528 313 markom
     vapi_id = 
529
        VAPI id of this instance
530 312 markom
*/
531
 
532 304 markom
section ethernet
533
  enabled = 0
534 310 markom
  nethernets = 1
535 428 markom
 
536 310 markom
  device 0
537
    baseaddr = 0x88000000
538
    dma = 0
539
    tx_channel = 0
540
    rx_channel = 1
541
    rxfile = "/tmp/eth0.rx"
542
    txfile = "/tmp/eth0.tx"
543
  enddevice
544 304 markom
end
545 332 markom
 
546
/* TICK TIMER SECTION
547
 
548
    This section configures tick timer
549 428 markom
 
550 332 markom
    enabled = 0/1
551
      whether tick timer is enabled
552 428 markom
 
553 332 markom
    irq = 
554
      irq number
555
*/
556
 
557
section tick
558
  enabled = 0
559
  irq = 3
560
end

powered by: WebSVN 2.1.0

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