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

Subversion Repositories or1k_old

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

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

powered by: WebSVN 2.1.0

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