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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_65/] [or1ksim/] [sim.cfg] - Blame information for rev 428

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

powered by: WebSVN 2.1.0

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