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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_52/] [or1ksim/] [sim.cfg] - Blame information for rev 424

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

Line No. Rev Author Line
1 264 markom
/* sim.cfg -- Simulator configuration script file
2
   Copyright (C) 2001, Marko Mlinar, markom@opencores.org
3 312 markom
 
4
This file includes a lot of help about configurations and default one
5 264 markom
 
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 312 markom
 
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 331 markom
      pattern to fill memory, used if type = pattern
69 424 markom
 
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 312 markom
*/
98
 
99 262 markom
section memory
100 264 markom
  /*random_seed = 12345
101
  type = random*/
102 269 markom
  pattern = 0x00
103
  type = unknown /* Fastest */
104 424 markom
 
105
  nmemories = 2
106
  device 0
107
    name = "RAM"
108
    ce = 0
109
    baseaddr = 0x00000000
110
    size = 0x00100000
111
    delayr = 10
112
    delayw = -1
113
  enddevice
114
 
115
  device 1
116
    name = "FLASH"
117
    ce = 1
118
    baseaddr = 0x40000000
119
    size = 0x00100000
120
    delayr = 2
121
    delayw = 4
122
  enddevice
123 262 markom
end
124
 
125 312 markom
 
126
/* SIM SECTION
127
 
128
  This section specifies how should sim behave.
129
 
130
  verbose = 0/1
131
      whether to print out extra messages
132
 
133 344 markom
  debug = 0-9
134
      = 0 disabled debug messages
135
      1-9 level of sim debug information, greater the number more verbose is
136
          the output
137 312 markom
 
138
  profile = 0/1
139
      whether to generate profiling file 'sim.profile'
140
 
141
  prof_fn = ""
142
      filename, where to generate profiling info, used
143
      only if 'profile' is set
144 394 markom
 
145
  history = 0/1
146
      whether instruction execution flow is tracked for
147
      display by simulator hist command. Useful for
148
      back-trace debugging.
149
 
150 312 markom
  iprompt = 0/1
151
      whether we strart in interactive prompt
152
 
153
  exe_log = 0/1
154
      whether execution log should be generated
155
 
156
  exe_log_fn = ""
157
      where to put execution log in, used only if 'exe_log'
158
      is set
159 335 markom
*/
160
 
161 312 markom
section sim
162 335 markom
  /* verbose = 1 */
163 312 markom
  debug = 0
164
  profile = 0
165
  prof_fn = "sim.profile"
166
 
167 394 markom
  history = 1
168 312 markom
  /* iprompt = 0 */
169
  exe_log = 0
170
  exe_log_fn = "executed.log"
171
end
172
 
173
 
174
/* SECTION VAPI
175
 
176
    This section configures Verification API, used for Advanced
177
    Core Verification.
178
 
179
    enabled = 0/1
180
        whether to start VAPI server
181
 
182
    server_port = 
183
        TCP/IP port to start VAPI server on
184 355 markom
 
185
    log_enabled = 0/1
186
       whether logging of VAPI requests is enabled
187
 
188
    vapi_fn = 
189
       specifies filename where to log into, if log_enabled is selected
190 312 markom
*/
191
 
192
section VAPI
193
  enabled = 0
194
  server_port = 9998
195 355 markom
  log_enabled = 0
196
  vapi_fn = "vapi.log"
197 312 markom
end
198
 
199
 
200
/* CPU SECTION
201
 
202
   This section specifies various CPU parameters.
203
 
204
   ver = 
205
   rev = 
206
      specifies version and revision of the CPU used
207
 
208
   upr = 
209
      changes the upr register
210
 
211
   superscalar = 0/1
212 388 lampret
      whether CPU is scalar or superscalar
213
      (modify cpu/or32/execute.c to tune superscalar model)
214
 
215 312 markom
   hazards = 0/1
216 388 lampret
      whether data hazards are tracked in superscalar CPU
217
      and displayed by the simulator r command
218
 
219 312 markom
   dependstats = 0/1
220 388 lampret
      whether inter-instruction dependencies are calculated
221
      and displayed by simulator stats command.
222
 
223 312 markom
   slp = 0/1
224 388 lampret
      calculation of subroutine level parallelism. Displayed
225
      by simulator stats command.
226
 
227 312 markom
   btic = 0/1
228 388 lampret
      enable branch target instruction cache model
229
 
230 312 markom
   bpb = 0/1
231 388 lampret
      enable branch prediction buffer model
232
 
233 312 markom
      parameters for CPU analysis
234
*/
235
 
236 263 markom
section cpu
237
  ver = 0x1200
238
  rev = 0x0001
239
  /* upr = */
240
  superscalar = 0
241
  hazards = 0
242
  dependstats = 0
243
  slp = 0
244 304 markom
  btic = 0
245 264 markom
  bpb = 0
246 263 markom
end
247
 
248 312 markom
 
249
/* DEBUG SECTION
250
 
251
   This sections specifies how debug unit should behave.
252
 
253
   enabled = 0/1
254
      whether debug unit is enabled
255
 
256
   gdb_enabled = 0/1
257
      whether to start gdb server at 'server_port' port
258
 
259
   server_port = 
260
      TCP/IP port to start gdb server on, used only if gdb_enabled
261
      is set
262
 
263 269 markom
section debug
264 312 markom
  enabled = 0
265
  gdb_enabled = 0
266 269 markom
  server_port = 9999
267
end
268
 
269 264 markom
 
270 312 markom
/* MC SECTION
271
 
272
   This section configures the memory controller
273
 
274
   enabled = 0/1
275
      whether memory controller is enabled
276
 
277
   baseaddr = 
278
      address of first MC register
279
 
280
   POC = 
281
      Power On Configuration register
282
*/
283
 
284 243 markom
section mc
285 304 markom
  enabled = 0
286 261 markom
  baseaddr = 0xa0000000
287
  POC = 0x00000008                 /* Power on configuration register */
288 243 markom
end
289 261 markom
 
290 312 markom
 
291
/* UART SECTION
292
 
293
   This section configures UARTs
294
 
295
   enabled = 0/1
296
      whether uarts are enabled
297
 
298
   nuarts = 
299
      make specified number of instances, configure each
300
      instance within device - enddevice construct.
301
 
302
   instance specific:
303
     baseaddr = 
304
        address of first UART register for this device
305
 
306
     rx_file = ""
307
        filename, where to read data from
308
 
309
     tx_file = ""
310
        filename, where to write data to
311 332 markom
 
312
     irq = 
313
        irq number for this device
314 312 markom
 
315 341 markom
     16550 = 0/1
316
        0, if this device is uart 16450 and 1, if it is 16550
317
 
318 312 markom
     jitter = 
319
        in msecs... time to block, -1 to disable it
320 313 markom
 
321
     vapi_id = 
322
        VAPI id of this instance
323 312 markom
*/
324
 
325 261 markom
section uart
326 304 markom
  enabled = 0
327 261 markom
  nuarts = 1
328
 
329
  device 0
330
    baseaddr = 0x80000000
331 332 markom
    irq = 2
332 261 markom
    rxfile = "/tmp/uart0.rx"
333
    txfile = "/tmp/uart0.tx"
334
    jitter = -1                     /* async behaviour */
335
  enddevice
336
end
337
 
338 312 markom
 
339
/* DMA SECTION
340
 
341
   This section configures DMAs
342
 
343
   enabled = 0/1
344
      whether DMAs are enabled
345
 
346
   ndmas = 
347
      make specified number of instances, configure each
348
      instance within device - enddevice construct.
349
 
350
   instance specific:
351
     baseaddr = 
352
        address of first DMA register for this device
353
 
354
     irq = 
355
        irq number for this device
356 313 markom
 
357
     vapi_id = 
358
        VAPI id of this instance
359 312 markom
*/
360
 
361 261 markom
section dma
362 304 markom
  enabled = 0
363 261 markom
  ndmas = 1
364
 
365
  device 0
366
    baseaddr = 0x90000000
367
    irq = 4
368
  enddevice
369
end
370 293 markom
 
371 304 markom
 
372 312 markom
/* ETHERNET SECTION
373
 
374
   This section configures ethernets
375
 
376
   enabled = 0/1
377
      whether ethernets are enabled
378
 
379
   nethernets = 
380
      make specified number of instances, configure each
381
      instance within device - enddevice construct.
382
 
383
   instance specific:
384
     baseaddr = 
385
        address of first ethernet register for this device
386
 
387
     dma = 
388
        which controller is this ethernet "connected" to
389
 
390
     rx_channel = 
391
        DMA channel used for RX
392
 
393
     tx_channel = 
394
        DMA channel used for TX
395
 
396
     rx_file = ""
397
        filename, where to read data from
398
 
399
     tx_file = ""
400
        filename, where to write data to
401 313 markom
 
402
     vapi_id = 
403
        VAPI id of this instance
404 312 markom
*/
405
 
406 304 markom
section ethernet
407
  enabled = 0
408 310 markom
  nethernets = 1
409
 
410
  device 0
411
    baseaddr = 0x88000000
412
    dma = 0
413
    tx_channel = 0
414
    rx_channel = 1
415
    rxfile = "/tmp/eth0.rx"
416
    txfile = "/tmp/eth0.tx"
417
  enddevice
418 304 markom
end
419 332 markom
 
420
/* TICK TIMER SECTION
421
 
422
    This section configures tick timer
423
 
424
    enabled = 0/1
425
      whether tick timer is enabled
426
 
427
    irq = 
428
      irq number
429
*/
430
 
431
section tick
432
  enabled = 0
433
  irq = 3
434
end

powered by: WebSVN 2.1.0

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