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

Subversion Repositories or1k

[/] [or1k/] [tags/] [tn_m001/] [or1ksim/] [testbench/] [except_test.cfg] - Blame information for rev 551

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

Line No. Rev Author Line
1 516 markom
/* 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 = 2
106
  device 0
107
    name = "RAM"
108
    ce = 0
109
    baseaddr = 0x40000000
110
    size = 0x00200000
111
    delayr = 1
112
    delayw = 2
113
  enddevice
114
 
115
  device 1
116
    name = "FLASH"
117
    ce = 1
118
    baseaddr = 0x00000000
119
    size = 0x00200000
120
    delayr = 10
121
    delayw = -1
122
  enddevice
123
end
124
 
125
 
126
/* IMMU SECTION
127
 
128
    This section configures Instruction Memory Menangement Unit
129
 
130
    enabled = 0/1
131
       whether IMMU is enabled
132
       (NOTE: UPR bit is set)
133
 
134
    nsets = 
135
       number of ITLB sets; must be power of two
136
 
137
    nways = 
138
       number of ITLB ways
139
 
140
    pagesize = 
141
       instruction page size; must be power of two
142
 
143
    entrysize = 
144
       instruction entry size in bytes
145
 
146
    ustates = 
147
       number of ITLB usage states (2, 3, 4 etc., max is 4)
148
*/
149
 
150
section immu
151
  enabled = 1
152
  nsets = 32
153
  nways = 1
154
  pagesize = 8192
155
end
156
 
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 = 1
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
 
219
/* DC SECTION
220
 
221
    This section configures Data Cache
222
 
223
    enabled = 0/1
224
       whether DC is enabled
225
       (NOTE: UPR bit is set)
226
 
227
    nsets = 
228
       number of DC sets; must be power of two
229
 
230
    nways = 
231
       number of DC ways
232
 
233
    blocksize = 
234
       DC block size in bytes; must be power of two
235
 
236
    ustates = 
237
       number of DC usage states (2, 3, 4 etc., max is 4)
238
*/
239
 
240
section dc
241
  enabled = 0
242
  nsets = 512
243
  nways = 1
244
  blocksize = 16
245
end
246
 
247
/* SIM SECTION
248
 
249
  This section specifies how should sim behave.
250
 
251
  verbose = 0/1
252
      whether to print out extra messages
253
 
254
  debug = 0-9
255
      = 0 disabled debug messages
256
      1-9 level of sim debug information, greater the number more verbose is
257
          the output
258
 
259
  profile = 0/1
260
      whether to generate profiling file 'sim.profile'
261
 
262
  prof_fn = ""
263
      filename, where to generate profiling info, used
264
      only if 'profile' is set
265
 
266
  history = 0/1
267
      whether instruction execution flow is tracked for
268
      display by simulator hist command. Useful for
269
      back-trace debugging.
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 = 1
289
  exe_log = 0
290
  exe_log_fn = "executed.log"
291
  clkcycle = 4ns
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
   btic = 0/1
345
      enable branch target instruction cache model
346
 
347
   bpb = 0/1
348
      enable branch prediction buffer model
349
 
350
      parameters for CPU analysis
351
*/
352
 
353
section cpu
354
  ver = 0x1200
355
  rev = 0x0001
356
  /* upr = */
357
  superscalar = 0
358
  hazards = 0
359
  dependstats = 0
360 541 markom
end
361
 
362
section bpb
363
  enabled = 0
364 516 markom
  btic = 0
365
end
366
 
367
 
368
/* DEBUG SECTION
369
 
370
   This sections specifies how debug unit should behave.
371
 
372
   enabled = 0/1
373
      whether debug unit is enabled
374
 
375
   gdb_enabled = 0/1
376
      whether to start gdb server at 'server_port' port
377
 
378
   server_port = 
379
      TCP/IP port to start gdb server on, used only if gdb_enabled
380
      is set
381
 
382
section debug
383
  enabled = 0
384
  gdb_enabled = 0
385
  server_port = 9999
386
end
387
 
388
 
389
/* MC SECTION
390
 
391
   This section configures the memory controller
392
 
393
   enabled = 0/1
394
      whether memory controller is enabled
395
 
396
   baseaddr = 
397
      address of first MC register
398
 
399
   POC = 
400
      Power On Configuration register
401
*/
402
 
403
section mc
404
  enabled = 0
405
  baseaddr = 0xa0000000
406
  POC = 0x00000008                 /* Power on configuration register */
407
end
408
 
409
 
410
/* UART SECTION
411
 
412
   This section configures UARTs
413
 
414
   enabled = 0/1
415
      whether uarts are enabled
416
 
417
   nuarts = 
418
      make specified number of instances, configure each
419
      instance within device - enddevice construct.
420
 
421
   instance specific:
422
     baseaddr = 
423
        address of first UART register for this device
424
 
425
     rx_file = ""
426
        filename, where to read data from
427
 
428
     tx_file = ""
429
        filename, where to write data to
430
 
431
     irq = 
432
        irq number for this device
433
 
434
     16550 = 0/1
435
        0, if this device is uart 16450 and 1, if it is 16550
436
 
437
     jitter = 
438
        in msecs... time to block, -1 to disable it
439
 
440
     vapi_id = 
441
        VAPI id of this instance
442
*/
443
 
444
section uart
445
  enabled = 0
446
  nuarts = 1
447
 
448
  device 0
449
    baseaddr = 0x80000000
450
    irq = 2
451
    rxfile = "/tmp/uart0.rx"
452
    txfile = "/tmp/uart0.tx"
453
    jitter = -1                     /* async behaviour */
454
  enddevice
455
end
456
 
457
 
458
/* DMA SECTION
459
 
460
   This section configures DMAs
461
 
462
   enabled = 0/1
463
      whether DMAs are enabled
464
 
465
   ndmas = 
466
      make specified number of instances, configure each
467
      instance within device - enddevice construct.
468
 
469
   instance specific:
470
     baseaddr = 
471
        address of first DMA register for this device
472
 
473
     irq = 
474
        irq number for this device
475
 
476
     vapi_id = 
477
        VAPI id of this instance
478
*/
479
 
480
section dma
481
  enabled = 0
482
  ndmas = 1
483
 
484
  device 0
485
    baseaddr = 0x90000000
486
    irq = 4
487
  enddevice
488
end
489
 
490
 
491
/* ETHERNET SECTION
492
 
493
   This section configures ethernets
494
 
495
   enabled = 0/1
496
      whether ethernets are enabled
497
 
498
   nethernets = 
499
      make specified number of instances, configure each
500
      instance within device - enddevice construct.
501
 
502
   instance specific:
503
     baseaddr = 
504
        address of first ethernet register for this device
505
 
506
     dma = 
507
        which controller is this ethernet "connected" to
508
 
509
     rx_channel = 
510
        DMA channel used for RX
511
 
512
     tx_channel = 
513
        DMA channel used for TX
514
 
515
     rx_file = ""
516
        filename, where to read data from
517
 
518
     tx_file = ""
519
        filename, where to write data to
520
 
521
     vapi_id = 
522
        VAPI id of this instance
523
*/
524
 
525
section ethernet
526
  enabled = 0
527
  nethernets = 1
528
 
529
  device 0
530
    baseaddr = 0x88000000
531
    dma = 0
532
    tx_channel = 0
533
    rx_channel = 1
534
    rxfile = "/tmp/eth0.rx"
535
    txfile = "/tmp/eth0.tx"
536
  enddevice
537
end
538
 
539
/* TICK TIMER SECTION
540
 
541
    This section configures tick timer
542
 
543
    enabled = 0/1
544
      whether tick timer is enabled
545
 
546
    irq = 
547
      irq number
548
*/
549
 
550
section tick
551
  enabled = 0
552
  irq = 3
553
end

powered by: WebSVN 2.1.0

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