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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc1/] [or1ksim/] [sim.cfg] - Blame information for rev 434

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 428 markom
 
388 269 markom
section debug
389 312 markom
  enabled = 0
390
  gdb_enabled = 0
391 269 markom
  server_port = 9999
392
end
393
 
394 264 markom
 
395 312 markom
/* MC SECTION
396
 
397
   This section configures the memory controller
398
 
399
   enabled = 0/1
400
      whether memory controller is enabled
401 428 markom
 
402 312 markom
   baseaddr = 
403
      address of first MC register
404 428 markom
 
405 312 markom
   POC = 
406
      Power On Configuration register
407
*/
408
 
409 243 markom
section mc
410 304 markom
  enabled = 0
411 261 markom
  baseaddr = 0xa0000000
412
  POC = 0x00000008                 /* Power on configuration register */
413 243 markom
end
414 261 markom
 
415 312 markom
 
416
/* UART SECTION
417
 
418
   This section configures UARTs
419
 
420
   enabled = 0/1
421
      whether uarts are enabled
422 428 markom
 
423 312 markom
   nuarts = 
424
      make specified number of instances, configure each
425
      instance within device - enddevice construct.
426 428 markom
 
427 312 markom
   instance specific:
428
     baseaddr = 
429
        address of first UART register for this device
430 428 markom
 
431 312 markom
     rx_file = ""
432
        filename, where to read data from
433 428 markom
 
434 312 markom
     tx_file = ""
435
        filename, where to write data to
436 332 markom
 
437
     irq = 
438
        irq number for this device
439 428 markom
 
440 341 markom
     16550 = 0/1
441
        0, if this device is uart 16450 and 1, if it is 16550
442 428 markom
 
443 312 markom
     jitter = 
444
        in msecs... time to block, -1 to disable it
445 428 markom
 
446 313 markom
     vapi_id = 
447
        VAPI id of this instance
448 312 markom
*/
449
 
450 261 markom
section uart
451 304 markom
  enabled = 0
452 261 markom
  nuarts = 1
453 428 markom
 
454 261 markom
  device 0
455
    baseaddr = 0x80000000
456 332 markom
    irq = 2
457 261 markom
    rxfile = "/tmp/uart0.rx"
458
    txfile = "/tmp/uart0.tx"
459
    jitter = -1                     /* async behaviour */
460
  enddevice
461
end
462
 
463 312 markom
 
464
/* DMA SECTION
465
 
466
   This section configures DMAs
467
 
468
   enabled = 0/1
469
      whether DMAs are enabled
470 428 markom
 
471 312 markom
   ndmas = 
472
      make specified number of instances, configure each
473
      instance within device - enddevice construct.
474 428 markom
 
475 312 markom
   instance specific:
476
     baseaddr = 
477
        address of first DMA register for this device
478
 
479
     irq = 
480
        irq number for this device
481 428 markom
 
482 313 markom
     vapi_id = 
483
        VAPI id of this instance
484 312 markom
*/
485
 
486 261 markom
section dma
487 304 markom
  enabled = 0
488 261 markom
  ndmas = 1
489 428 markom
 
490 261 markom
  device 0
491
    baseaddr = 0x90000000
492
    irq = 4
493
  enddevice
494
end
495 293 markom
 
496 304 markom
 
497 312 markom
/* ETHERNET SECTION
498
 
499
   This section configures ethernets
500
 
501
   enabled = 0/1
502
      whether ethernets are enabled
503 428 markom
 
504 312 markom
   nethernets = 
505
      make specified number of instances, configure each
506
      instance within device - enddevice construct.
507 428 markom
 
508 312 markom
   instance specific:
509
     baseaddr = 
510
        address of first ethernet register for this device
511
 
512
     dma = 
513
        which controller is this ethernet "connected" to
514 428 markom
 
515 312 markom
     rx_channel = 
516
        DMA channel used for RX
517 428 markom
 
518 312 markom
     tx_channel = 
519
        DMA channel used for TX
520
 
521
     rx_file = ""
522
        filename, where to read data from
523 428 markom
 
524 312 markom
     tx_file = ""
525
        filename, where to write data to
526 428 markom
 
527 313 markom
     vapi_id = 
528
        VAPI id of this instance
529 312 markom
*/
530
 
531 304 markom
section ethernet
532
  enabled = 0
533 310 markom
  nethernets = 1
534 428 markom
 
535 310 markom
  device 0
536
    baseaddr = 0x88000000
537
    dma = 0
538
    tx_channel = 0
539
    rx_channel = 1
540
    rxfile = "/tmp/eth0.rx"
541
    txfile = "/tmp/eth0.tx"
542
  enddevice
543 304 markom
end
544 332 markom
 
545
/* TICK TIMER SECTION
546
 
547
    This section configures tick timer
548 428 markom
 
549 332 markom
    enabled = 0/1
550
      whether tick timer is enabled
551 428 markom
 
552 332 markom
    irq = 
553
      irq number
554
*/
555
 
556
section tick
557
  enabled = 0
558
  irq = 3
559
end

powered by: WebSVN 2.1.0

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