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

Subversion Repositories or1k

[/] [or1k/] [tags/] [before_ORP/] [uclinux/] [uClinux-2.0.x/] [sim.cfg] - Blame information for rev 727

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

powered by: WebSVN 2.1.0

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