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

Subversion Repositories or1k

[/] [or1k/] [tags/] [LINUX_2_4_26_OR32/] [linux/] [linux-2.4/] [sim.cfg] - Blame information for rev 1780

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

Line No. Rev Author Line
1 1275 phoenix
/* sim.cfg -- Simulator configuration script file
2
   Copyright (C) 2001, Marko Mlinar, markom@opencores.org
3
 
4
This file includes a lot of help about configurations and default one
5
 
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
 
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
section memory
100
  /*random_seed = 12345
101
  type = random*/
102
  pattern = 0x00
103
  type = unknown /* Fastest */
104
 
105
  nmemories = 3
106
  device 0
107
    name = "FLASH"
108
    ce = 0
109
    baseaddr = 0xf0000000
110
    size = 0x00800000
111
    delayr = 1
112
    delayw = -1
113
/*    log = "flash.log"*/
114
  enddevice
115
 
116
  device 1
117
    name = "RAM"
118
    ce = 1
119
    baseaddr = 0x00000000
120
    size = 0x02000000
121
/*    size = 0x00800000 */
122
    delayr = 1
123
    delayw = 2
124
/*    log = "ram.log"*/
125
  enddevice
126
  device 2
127
    name = "SRAM"
128
    ce = 2
129
    baseaddr = 0x08000000
130
    size = 0x00400000
131
    delayr = 1
132
    delayw = 2
133
/*    log = "ram.log"*/
134
  enddevice
135
end
136
 
137
/* IMMU SECTION
138
 
139
    This section configures Instruction Memory Menangement Unit
140
 
141
    enabled = 0/1
142
       whether IMMU is enabled
143
       (NOTE: UPR bit is set)
144
 
145
    nsets = 
146
       number of ITLB sets; must be power of two
147
 
148
    nways = 
149
       number of ITLB ways
150
 
151
    pagesize = 
152
       instruction page size; must be power of two
153
 
154
    entrysize = 
155
       instruction entry size in bytes
156
 
157
    ustates = 
158
       number of ITLB usage states (2, 3, 4 etc., max is 4)
159
*/
160
 
161
section immu
162
  enabled = 1
163
  nsets = 64
164
  nways = 1
165
  pagesize = 8192
166
end
167
 
168
/* DMMU SECTION
169
 
170
    This section configures Data Memory Menangement Unit
171
 
172
    enabled = 0/1
173
       whether DMMU is enabled
174
       (NOTE: UPR bit is set)
175
 
176
    nsets = 
177
       number of DTLB sets; must be power of two
178
 
179
    nways = 
180
       number of DTLB ways
181
 
182
    pagesize = 
183
       data page size; must be power of two
184
 
185
    entrysize = 
186
       data entry size in bytes
187
 
188
    ustates = 
189
       number of DTLB usage states (2, 3, 4 etc., max is 4)
190
*/
191
 
192
section dmmu
193
  enabled = 1
194
  nsets = 64
195
  nways = 1
196
  pagesize = 8192
197
end
198
 
199
 
200
/* IC SECTION
201
 
202
    This section configures Instruction Cache
203
 
204
    enabled = 0/1
205
       whether IC is enabled
206
       (NOTE: UPR bit is set)
207
 
208
    nsets = 
209
       number of IC sets; must be power of two
210
 
211
    nways = 
212
       number of IC ways
213
 
214
    blocksize = 
215
       IC block size in bytes; must be power of two
216
 
217
    ustates = 
218
       number of IC usage states (2, 3, 4 etc., max is 4)
219
*/
220
 
221
section ic
222
  enabled = 1
223
  nsets = 512
224
  nways = 1
225
  blocksize = 16
226
end
227
 
228
/* DC SECTION
229
 
230
    This section configures Data Cache
231
 
232
    enabled = 0/1
233
       whether DC is enabled
234
       (NOTE: UPR bit is set)
235
 
236
    nsets = 
237
       number of DC sets; must be power of two
238
 
239
    nways = 
240
       number of DC ways
241
 
242
    blocksize = 
243
       DC block size in bytes; must be power of two
244
 
245
    ustates = 
246
       number of DC usage states (2, 3, 4 etc., max is 4)
247
*/
248
 
249
section dc
250
  enabled = 1
251
  nsets = 512
252
  nways = 1
253
  blocksize = 16
254
end
255
 
256
/* SIM SECTION
257
 
258
  This section specifies how should sim behave.
259
 
260
  verbose = 0/1
261
      whether to print out extra messages
262
 
263
  debug = 0-9
264
      = 0 disabled debug messages
265
      1-9 level of sim debug information, greater the number more verbose is
266
          the output
267
 
268
  profile = 0/1
269
      whether to generate profiling file 'sim.profile'
270
 
271
  prof_fn = ""
272
      filename, where to generate profiling info, used
273
      only if 'profile' is set
274
 
275
  history = 0/1
276
      whether instruction execution flow is tracked for
277
      display by simulator hist command. Useful for
278
      back-trace debugging.
279
 
280
  iprompt = 0/1
281
      whether we strart in interactive prompt
282
 
283
  exe_log = 0/1
284
      whether execution log should be generated
285
 
286
  exe_log_fn = ""
287
      where to put execution log in, used only if 'exe_log'
288
      is set
289
 
290
  clkcycle = [ps|ns|us|ms]
291
      specifies time measurement for one cycle
292
*/
293
 
294
section sim
295
  verbose = 1
296
  debug = 0
297
  profile = 0
298
  prof_fn = "sim.profile"
299
 
300
  history = 1
301
  /* iprompt = 0 */
302
  exe_log = 1
303
  exe_log_type = software
304
  exe_log_start = 26000000
305
  exe_log_end =   26800000
306
  exe_log_marker = 50
307
  exe_log_fn = "executed-1.log"
308
end
309
 
310
 
311
/* SECTION VAPI
312
 
313
    This section configures Verification API, used for Advanced
314
    Core Verification.
315
 
316
    enabled = 0/1
317
        whether to start VAPI server
318
 
319
    server_port = 
320
        TCP/IP port to start VAPI server on
321
 
322
    log_enabled = 0/1
323
       whether logging of VAPI requests is enabled
324
 
325
    vapi_fn = 
326
       specifies filename where to log into, if log_enabled is selected
327
*/
328
 
329
section VAPI
330
  enabled = 0
331
  server_port = 9998
332
  log_enabled = 0
333
  vapi_log_fn = "vapi.log"
334
end
335
 
336
 
337
/* CPU SECTION
338
 
339
   This section specifies various CPU parameters.
340
 
341
   ver = 
342
   rev = 
343
      specifies version and revision of the CPU used
344
 
345
   upr = 
346
      changes the upr register
347
 
348
   superscalar = 0/1
349
      whether CPU is scalar or superscalar
350
      (modify cpu/or32/execute.c to tune superscalar model)
351
 
352
   hazards = 0/1
353
      whether data hazards are tracked in superscalar CPU
354
      and displayed by the simulator r command
355
 
356
   dependstats = 0/1
357
      whether inter-instruction dependencies are calculated
358
      and displayed by simulator stats command.
359
 
360
      parameters for CPU analysis
361
*/
362
 
363
section cpu
364
  ver = 0x1200
365
  rev = 0x0000
366
  superscalar = 0
367
  hazards = 0
368
  dependstats = 0
369
end
370
 
371
 
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
section debug
387
  enabled = 0
388
  gdb_enabled = 0
389
  server_port = 9999
390
end
391
 
392
 
393
/* 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
section mc
408
  enabled = 1
409
  baseaddr = 0x93000000
410
  POC = 0x00000008                 /* Power on configuration register */
411
end
412
 
413
 
414
/* UART SECTION
415
 
416
   This section configures UARTs
417
 
418
   nuarts = 
419
      make specified number of instances, configure each
420
      instance within device - enddevice construct.
421
 
422
   instance specific:
423
     baseaddr = 
424
        address of first UART register for this device
425
 
426
     rx_file = ""
427
        filename, where to read data from
428
 
429
     tx_file = ""
430
        filename, where to write data to
431
 
432
     irq = 
433
        irq number for this device
434
 
435
     16550 = 0/1
436
        0, if this device is uart 16450 and 1, if it is 16550
437
 
438
     jitter = 
439
        in msecs... time to block, -1 to disable it
440
 
441
     vapi_id = 
442
        VAPI id of this instance
443
*/
444
 
445
section uart
446
  nuarts = 1
447
 
448
  device 0
449
    baseaddr = 0x90000000
450
    irq = 2
451
    channel = "file:uart0.rx,uart0.tx"
452
    jitter = -1                     /* async behaviour */
453
    16550 = 1
454
  enddevice
455
end
456
 
457
 
458
/* DMA SECTION
459
 
460
   This section configures DMAs
461
 
462
   ndmas = 
463
      make specified number of instances, configure each
464
      instance within device - enddevice construct.
465
 
466
   instance specific:
467
     baseaddr = 
468
        address of first DMA register for this device
469
 
470
     irq = 
471
        irq number for this device
472
 
473
     vapi_id = 
474
        VAPI id of this instance
475
*/
476
 
477
section dma
478
  ndmas = 1
479
 
480
  device 0
481
    baseaddr = 0x9a000000
482
    irq = 11
483
  enddevice
484
end
485
 
486
 
487
/* ETHERNET SECTION
488
 
489
   This section configures ethernets
490
 
491
   enabled = 0/1
492
      whether ethernets are enabled
493
 
494
   nethernets = 
495
      make specified number of instances, configure each
496
      instance within device - enddevice construct.
497
 
498
   instance specific:
499
     baseaddr = 
500
        address of first ethernet register for this device
501
 
502
     dma = 
503
        which controller is this ethernet "connected" to
504
 
505
     rtx_type = 0 ETH_RTX_FILE
506
                1 ETH_RTX_SOCK
507
 
508
     rx_channel = 
509
        DMA channel used for RX
510
 
511
     tx_channel = 
512
        DMA channel used for TX
513
 
514
     rx_file = ""
515
        filename, where to read data from
516
 
517
     tx_file = ""
518
        filename, where to write data to
519
 
520
     vapi_id = 
521
        VAPI id of this instance
522
*/
523
 
524
section ethernet
525
  nethernets = 1
526
 
527
  device 0
528
    baseaddr = 0x92000000
529
    dma = 0
530
    irq = 4
531
    rtx_type = 1
532
    tx_channel = 0
533
    rx_channel = 1
534
    rxfile = "eth0.rx"
535
    txfile = "eth0.tx"
536
    sockif = "eth0"
537
  enddevice
538
end
539
 
540
section fb
541
  enabled = 1
542
  baseaddr = 0x97000000
543
  refresh_rate = 10000000
544
  filename = "primary"
545
end
546
 
547
/* KBD SECTION
548
 
549
    This section configures PS/2 compatible keyboard
550
 
551
    enabled = 0/1
552
      whether keyboard is enabled
553
 
554
    baseaddr = 
555
      base address of the keyboard device
556
 
557
    rxfile = ""
558
      filename, where to read data from
559
*/
560
 
561
section kbd
562
  enabled = 1
563
  irq = 5
564
  baseaddr = 0x94000000
565
  rxfile = "kbd.rx"
566
end
567
 

powered by: WebSVN 2.1.0

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