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 528

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

powered by: WebSVN 2.1.0

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