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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [sim.cfg] - Blame information for rev 682

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 315 simons
/* sim.cfg -- Simulator configuration script file
2
   Copyright (C) 2001, Marko Mlinar, markom@opencores.org
3
 
4 528 simons
This file includes a lot of help about configurations and default one
5
 
6 315 simons
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 528 simons
 
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
 
37
   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
 
42
   Some section also have subsections. One example of such subsection is
43
   block:
44
 
45
   device 
46
     instance specific parameters...
47
   enddevice
48
 
49
   which creates a device instance.
50
*/
51
 
52
 
53
/* MEMORY SECTION
54
 
55
   This section specifies how is initial memory generated and which blocks
56
   it consist of.
57
 
58
   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
 
64
   random_seed = 
65
      random seed for randomizer, used if type = random
66
 
67
   pattern = 
68
      pattern to fill memory, used if type = pattern
69
 
70
   nmemories = 
71
      number of memory instances connected
72
 
73
   instance specific:
74
     baseaddr = 
75
        memory start address
76
 
77
     size = 
78
        memory size
79
 
80
     name = ""
81
        memory block name
82
 
83
     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
 
89
     delayw = 
90
        cycles, required for write access, -1 if instance does not support writing
91
 
92
     16550 = 0/1
93
        0, if this device is uart 16450 and 1, if it is 16550
94
 
95
     log = ""
96
        filename, where to log memory accesses to, no log, if log command is not specified
97
*/
98
 
99 315 simons
section memory
100
  /*random_seed = 12345
101
  type = random*/
102
  pattern = 0x00
103
  type = unknown /* Fastest */
104 528 simons
 
105
  nmemories = 2
106
  device 0
107 582 simons
    name = "FLASH"
108 528 simons
    ce = 0
109 582 simons
    baseaddr = 0x04000000
110
    size = 0x00200000
111
    delayr = 10
112
    delayw = -1
113
/*    log = "flash.log"*/
114 528 simons
  enddevice
115
 
116
  device 1
117 582 simons
    name = "RAM"
118 528 simons
    ce = 1
119 582 simons
    baseaddr = 0x00000000
120 528 simons
    size = 0x00200000
121 582 simons
    delayr = 1
122
    delayw = 2
123
/*    log = "ram.log"*/
124 528 simons
  enddevice
125 315 simons
end
126
 
127 528 simons
/* IMMU SECTION
128
 
129
    This section configures Instruction Memory Menangement Unit
130
 
131
    enabled = 0/1
132
       whether IMMU is enabled
133
       (NOTE: UPR bit is set)
134
 
135
    nsets = 
136
       number of ITLB sets; must be power of two
137
 
138
    nways = 
139
       number of ITLB ways
140
 
141
    pagesize = 
142
       instruction page size; must be power of two
143
 
144
    entrysize = 
145
       instruction entry size in bytes
146
 
147
    ustates = 
148
       number of ITLB usage states (2, 3, 4 etc., max is 4)
149
*/
150
 
151
section immu
152 653 simons
  enabled = 1
153
  nsets = 64
154 528 simons
  nways = 1
155
  pagesize = 8192
156
end
157
 
158
/* DMMU SECTION
159
 
160
    This section configures Data Memory Menangement Unit
161
 
162
    enabled = 0/1
163
       whether DMMU is enabled
164
       (NOTE: UPR bit is set)
165
 
166
    nsets = 
167
       number of DTLB sets; must be power of two
168
 
169
    nways = 
170
       number of DTLB ways
171
 
172
    pagesize = 
173
       data page size; must be power of two
174
 
175
    entrysize = 
176
       data entry size in bytes
177
 
178
    ustates = 
179
       number of DTLB usage states (2, 3, 4 etc., max is 4)
180
*/
181
 
182
section dmmu
183 653 simons
  enabled = 1
184
  nsets = 64
185 528 simons
  nways = 1
186
  pagesize = 8192
187
end
188
 
189
 
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 653 simons
  enabled = 1
213
  nsets = 256
214 528 simons
  nways = 1
215
  blocksize = 16
216
end
217
 
218
/* DC SECTION
219
 
220
    This section configures Data Cache
221
 
222
    enabled = 0/1
223
       whether DC is enabled
224
       (NOTE: UPR bit is set)
225
 
226
    nsets = 
227
       number of DC sets; must be power of two
228
 
229
    nways = 
230
       number of DC ways
231
 
232
    blocksize = 
233
       DC block size in bytes; must be power of two
234
 
235
    ustates = 
236
       number of DC usage states (2, 3, 4 etc., max is 4)
237
*/
238
 
239
section dc
240 653 simons
  enabled = 1
241
  nsets = 256
242 528 simons
  nways = 1
243
  blocksize = 16
244
end
245
 
246
/* SIM SECTION
247
 
248
  This section specifies how should sim behave.
249
 
250
  verbose = 0/1
251
      whether to print out extra messages
252
 
253
  debug = 0-9
254
      = 0 disabled debug messages
255
      1-9 level of sim debug information, greater the number more verbose is
256
          the output
257
 
258
  profile = 0/1
259
      whether to generate profiling file 'sim.profile'
260
 
261
  prof_fn = ""
262
      filename, where to generate profiling info, used
263
      only if 'profile' is set
264
 
265
  history = 0/1
266
      whether instruction execution flow is tracked for
267
      display by simulator hist command. Useful for
268
      back-trace debugging.
269
 
270
  iprompt = 0/1
271
      whether we strart in interactive prompt
272
 
273
  exe_log = 0/1
274
      whether execution log should be generated
275
 
276
  exe_log_fn = ""
277
      where to put execution log in, used only if 'exe_log'
278
      is set
279
 
280
  clkcycle = [ps|ns|us|ms]
281
      specifies time measurement for one cycle
282
*/
283
 
284
section sim
285
  /* verbose = 1 */
286
  debug = 0
287
  profile = 0
288
  prof_fn = "sim.profile"
289
 
290 656 simons
  history = 1
291 528 simons
  /* iprompt = 0 */
292
  exe_log = 0
293 682 simons
  exe_log_type = software
294
  exe_log_start = 12000000
295
  exe_log_marker = 100
296 528 simons
  exe_log_fn = "executed.log"
297
end
298
 
299
 
300
/* SECTION VAPI
301
 
302
    This section configures Verification API, used for Advanced
303
    Core Verification.
304
 
305
    enabled = 0/1
306
        whether to start VAPI server
307
 
308
    server_port = 
309
        TCP/IP port to start VAPI server on
310
 
311
    log_enabled = 0/1
312
       whether logging of VAPI requests is enabled
313
 
314
    vapi_fn = 
315
       specifies filename where to log into, if log_enabled is selected
316
*/
317
 
318
section VAPI
319
  enabled = 0
320
  server_port = 9998
321
  log_enabled = 0
322
  vapi_log_fn = "vapi.log"
323
end
324
 
325
 
326
/* CPU SECTION
327
 
328
   This section specifies various CPU parameters.
329
 
330
   ver = 
331
   rev = 
332
      specifies version and revision of the CPU used
333
 
334
   upr = 
335
      changes the upr register
336
 
337
   superscalar = 0/1
338
      whether CPU is scalar or superscalar
339
      (modify cpu/or32/execute.c to tune superscalar model)
340
 
341
   hazards = 0/1
342
      whether data hazards are tracked in superscalar CPU
343
      and displayed by the simulator r command
344
 
345
   dependstats = 0/1
346
      whether inter-instruction dependencies are calculated
347
      and displayed by simulator stats command.
348
 
349
   slp = 0/1
350
      calculation of subroutine level parallelism. Displayed
351
      by simulator stats command.
352
 
353
   btic = 0/1
354
      enable branch target instruction cache model
355
 
356
   bpb = 0/1
357
      enable branch prediction buffer model
358
 
359
      parameters for CPU analysis
360
*/
361
 
362 315 simons
section cpu
363
  ver = 0x1200
364
  rev = 0x0001
365
  /* upr = */
366
  superscalar = 0
367
  hazards = 0
368
  dependstats = 0
369
  slp = 0
370 528 simons
  btic = 0
371 315 simons
  bpb = 0
372
end
373
 
374 528 simons
 
375
/* DEBUG SECTION
376
 
377
   This sections specifies how debug unit should behave.
378
 
379
   enabled = 0/1
380
      whether debug unit is enabled
381
 
382
   gdb_enabled = 0/1
383
      whether to start gdb server at 'server_port' port
384
 
385
   server_port = 
386
      TCP/IP port to start gdb server on, used only if gdb_enabled
387
      is set
388
 
389 315 simons
section debug
390 528 simons
  enabled = 0
391
  gdb_enabled = 0
392 315 simons
  server_port = 9999
393
end
394
 
395
 
396 528 simons
/* MC SECTION
397
 
398
   This section configures the memory controller
399
 
400
   enabled = 0/1
401
      whether memory controller is enabled
402
 
403
   baseaddr = 
404
      address of first MC register
405
 
406
   POC = 
407
      Power On Configuration register
408
*/
409
 
410 315 simons
section mc
411 582 simons
  enabled = 1
412 315 simons
  baseaddr = 0xa0000000
413
  POC = 0x00000008                 /* Power on configuration register */
414
end
415
 
416 528 simons
 
417
/* UART SECTION
418
 
419
   This section configures UARTs
420
 
421
   enabled = 0/1
422
      whether uarts are enabled
423
 
424
   nuarts = 
425
      make specified number of instances, configure each
426
      instance within device - enddevice construct.
427
 
428
   instance specific:
429
     baseaddr = 
430
        address of first UART register for this device
431
 
432
     rx_file = ""
433
        filename, where to read data from
434
 
435
     tx_file = ""
436
        filename, where to write data to
437
 
438
     irq = 
439
        irq number for this device
440
 
441
     16550 = 0/1
442
        0, if this device is uart 16450 and 1, if it is 16550
443
 
444
     jitter = 
445
        in msecs... time to block, -1 to disable it
446
 
447
     vapi_id = 
448
        VAPI id of this instance
449
*/
450
 
451 315 simons
section uart
452
  enabled = 1
453
  nuarts = 1
454 528 simons
 
455 315 simons
  device 0
456 581 simons
    baseaddr = 0x9c000000
457 582 simons
    irq = 15
458 315 simons
    rxfile = "/tmp/uart0.rx"
459
    txfile = "/tmp/uart0.tx"
460
    jitter = -1                     /* async behaviour */
461 531 simons
    16550 = 1
462 315 simons
  enddevice
463
end
464
 
465 528 simons
 
466
/* DMA SECTION
467
 
468
   This section configures DMAs
469
 
470
   enabled = 0/1
471
      whether DMAs are enabled
472
 
473
   ndmas = 
474
      make specified number of instances, configure each
475
      instance within device - enddevice construct.
476
 
477
   instance specific:
478
     baseaddr = 
479
        address of first DMA register for this device
480
 
481
     irq = 
482
        irq number for this device
483
 
484
     vapi_id = 
485
        VAPI id of this instance
486
*/
487
 
488 315 simons
section dma
489
  enabled = 0
490
  ndmas = 1
491 528 simons
 
492 315 simons
  device 0
493
    baseaddr = 0x90000000
494
    irq = 4
495
  enddevice
496
end
497
 
498 528 simons
 
499
/* ETHERNET SECTION
500
 
501
   This section configures ethernets
502
 
503
   enabled = 0/1
504
      whether ethernets are enabled
505
 
506
   nethernets = 
507
      make specified number of instances, configure each
508
      instance within device - enddevice construct.
509
 
510
   instance specific:
511
     baseaddr = 
512
        address of first ethernet register for this device
513
 
514
     dma = 
515
        which controller is this ethernet "connected" to
516
 
517
     rx_channel = 
518
        DMA channel used for RX
519
 
520
     tx_channel = 
521
        DMA channel used for TX
522
 
523
     rx_file = ""
524
        filename, where to read data from
525
 
526
     tx_file = ""
527
        filename, where to write data to
528
 
529
     vapi_id = 
530
        VAPI id of this instance
531
*/
532
 
533
section ethernet
534 315 simons
  enabled = 0
535 528 simons
  nethernets = 1
536
 
537
  device 0
538
    baseaddr = 0x88000000
539
    dma = 0
540
    tx_channel = 0
541
    rx_channel = 1
542
    rxfile = "/tmp/eth0.rx"
543
    txfile = "/tmp/eth0.tx"
544
  enddevice
545 315 simons
end
546 528 simons
 
547
/* TICK TIMER SECTION
548
 
549
    This section configures tick timer
550
 
551
    enabled = 0/1
552
      whether tick timer is enabled
553
 
554
    irq = 
555
      irq number
556
*/
557
 
558
section tick
559
  enabled = 1
560 582 simons
  irq = 0
561 528 simons
end
562 656 simons
 
563
section fb
564
  enabled = 1
565
  baseaddr = 0xb0000000
566
  refresh_rate = 10000
567
  filename = "primary"
568
end

powered by: WebSVN 2.1.0

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