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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_67/] [or1ksim/] [sim.cfg] - Blame information for rev 384

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
   memory_table_file = ""
59
      loads memory table from filename. If filename does not exists in the
60
      current directory, it is loaded from ~/.or1k/.
61
      Memory table file structure is as follows:
62 383 markom
        >start_address1 length1 type1 [ce1 [delayr1 [delayw1]]]
63
        >start_address2 length2 type2 [ce2 [delayr2 [delayw2]]]
64
        >start_address3 length3 type3 [ce3 [delayr3 [delayw3]]]
65 312 markom
 
66 384 markom
      (each line start with '>')
67 312 markom
      Example:
68 383 markom
        >00000100 00001F00 flash 3 100
69
        >80000000 00010000 RAM
70 312 markom
 
71
   type = random/unknown/pattern
72
      specifies the initial memory values. 'random' parameter generate
73
      random memory using seed 'random_seed' parameter. 'pattern' parameter
74
      fills memory with 'pattern' parameter and 'unknown' does not specify
75
      how memory should be generated - the fastest option.
76
 
77
   random_seed = 
78
      random seed for randomizer, used if type = random
79
 
80
   pattern = 
81 331 markom
      pattern to fill memory, used if type = pattern
82 312 markom
*/
83
 
84 262 markom
section memory
85
  memory_table_file = "simmem.cfg"
86 264 markom
  /*random_seed = 12345
87
  type = random*/
88 269 markom
  pattern = 0x00
89
  type = unknown /* Fastest */
90 262 markom
end
91
 
92 312 markom
 
93
/* SIM SECTION
94
 
95
  This section specifies how should sim behave.
96
 
97
  verbose = 0/1
98
      whether to print out extra messages
99
 
100 344 markom
  debug = 0-9
101
      = 0 disabled debug messages
102
      1-9 level of sim debug information, greater the number more verbose is
103
          the output
104 312 markom
 
105
  profile = 0/1
106
      whether to generate profiling file 'sim.profile'
107
 
108
  prof_fn = ""
109
      filename, where to generate profiling info, used
110
      only if 'profile' is set
111
 
112
  iprompt = 0/1
113
      whether we strart in interactive prompt
114
 
115
  exe_log = 0/1
116
      whether execution log should be generated
117
 
118
  exe_log_fn = ""
119
      where to put execution log in, used only if 'exe_log'
120
      is set
121 335 markom
*/
122
 
123 312 markom
section sim
124 335 markom
  /* verbose = 1 */
125 312 markom
  debug = 0
126
  profile = 0
127
  prof_fn = "sim.profile"
128
 
129
  /* iprompt = 0 */
130
  exe_log = 0
131
  exe_log_fn = "executed.log"
132
end
133
 
134
 
135
/* SECTION VAPI
136
 
137
    This section configures Verification API, used for Advanced
138
    Core Verification.
139
 
140
    enabled = 0/1
141
        whether to start VAPI server
142
 
143
    server_port = 
144
        TCP/IP port to start VAPI server on
145 355 markom
 
146
    log_enabled = 0/1
147
       whether logging of VAPI requests is enabled
148
 
149
    vapi_fn = 
150
       specifies filename where to log into, if log_enabled is selected
151 312 markom
*/
152
 
153
section VAPI
154
  enabled = 0
155
  server_port = 9998
156 355 markom
  log_enabled = 0
157
  vapi_fn = "vapi.log"
158 312 markom
end
159
 
160
 
161
/* CPU SECTION
162
 
163
   This section specifies various CPU parameters.
164
 
165
   ver = 
166
   rev = 
167
      specifies version and revision of the CPU used
168
 
169
   upr = 
170
      changes the upr register
171
 
172
   superscalar = 0/1
173
   hazards = 0/1
174
   history = 0/1
175
   dependstats = 0/1
176
   dependency = 0/1
177
   slp = 0/1
178
   btic = 0/1
179
   bpb = 0/1
180
      parameters for CPU analysis
181
*/
182
 
183 263 markom
section cpu
184
  ver = 0x1200
185
  rev = 0x0001
186
  /* upr = */
187
  superscalar = 0
188
  hazards = 0
189
  history = 0
190
  dependstats = 0
191
  dependency = 0
192
  slp = 0
193 304 markom
  btic = 0
194 264 markom
  bpb = 0
195 263 markom
end
196
 
197 312 markom
 
198
/* DEBUG SECTION
199
 
200
   This sections specifies how debug unit should behave.
201
 
202
   enabled = 0/1
203
      whether debug unit is enabled
204
 
205
   gdb_enabled = 0/1
206
      whether to start gdb server at 'server_port' port
207
 
208
   server_port = 
209
      TCP/IP port to start gdb server on, used only if gdb_enabled
210
      is set
211
 
212 269 markom
section debug
213 312 markom
  enabled = 0
214
  gdb_enabled = 0
215 269 markom
  server_port = 9999
216
end
217
 
218 264 markom
 
219 312 markom
/* MC SECTION
220
 
221
   This section configures the memory controller
222
 
223
   enabled = 0/1
224
      whether memory controller is enabled
225
 
226
   baseaddr = 
227
      address of first MC register
228
 
229
   POC = 
230
      Power On Configuration register
231
*/
232
 
233 243 markom
section mc
234 304 markom
  enabled = 0
235 261 markom
  baseaddr = 0xa0000000
236
  POC = 0x00000008                 /* Power on configuration register */
237 243 markom
end
238 261 markom
 
239 312 markom
 
240
/* UART SECTION
241
 
242
   This section configures UARTs
243
 
244
   enabled = 0/1
245
      whether uarts are enabled
246
 
247
   nuarts = 
248
      make specified number of instances, configure each
249
      instance within device - enddevice construct.
250
 
251
   instance specific:
252
     baseaddr = 
253
        address of first UART register for this device
254
 
255
     rx_file = ""
256
        filename, where to read data from
257
 
258
     tx_file = ""
259
        filename, where to write data to
260 332 markom
 
261
     irq = 
262
        irq number for this device
263 312 markom
 
264 341 markom
     16550 = 0/1
265
        0, if this device is uart 16450 and 1, if it is 16550
266
 
267 312 markom
     jitter = 
268
        in msecs... time to block, -1 to disable it
269 313 markom
 
270
     vapi_id = 
271
        VAPI id of this instance
272 312 markom
*/
273
 
274 261 markom
section uart
275 304 markom
  enabled = 0
276 261 markom
  nuarts = 1
277
 
278
  device 0
279
    baseaddr = 0x80000000
280 332 markom
    irq = 2
281 261 markom
    rxfile = "/tmp/uart0.rx"
282
    txfile = "/tmp/uart0.tx"
283
    jitter = -1                     /* async behaviour */
284
  enddevice
285
end
286
 
287 312 markom
 
288
/* DMA SECTION
289
 
290
   This section configures DMAs
291
 
292
   enabled = 0/1
293
      whether DMAs are enabled
294
 
295
   ndmas = 
296
      make specified number of instances, configure each
297
      instance within device - enddevice construct.
298
 
299
   instance specific:
300
     baseaddr = 
301
        address of first DMA register for this device
302
 
303
     irq = 
304
        irq number for this device
305 313 markom
 
306
     vapi_id = 
307
        VAPI id of this instance
308 312 markom
*/
309
 
310 261 markom
section dma
311 304 markom
  enabled = 0
312 261 markom
  ndmas = 1
313
 
314
  device 0
315
    baseaddr = 0x90000000
316
    irq = 4
317
  enddevice
318
end
319 293 markom
 
320 304 markom
 
321 312 markom
/* ETHERNET SECTION
322
 
323
   This section configures ethernets
324
 
325
   enabled = 0/1
326
      whether ethernets are enabled
327
 
328
   nethernets = 
329
      make specified number of instances, configure each
330
      instance within device - enddevice construct.
331
 
332
   instance specific:
333
     baseaddr = 
334
        address of first ethernet register for this device
335
 
336
     dma = 
337
        which controller is this ethernet "connected" to
338
 
339
     rx_channel = 
340
        DMA channel used for RX
341
 
342
     tx_channel = 
343
        DMA channel used for TX
344
 
345
     rx_file = ""
346
        filename, where to read data from
347
 
348
     tx_file = ""
349
        filename, where to write data to
350 313 markom
 
351
     vapi_id = 
352
        VAPI id of this instance
353 312 markom
*/
354
 
355 304 markom
section ethernet
356
  enabled = 0
357 310 markom
  nethernets = 1
358
 
359
  device 0
360
    baseaddr = 0x88000000
361
    dma = 0
362
    tx_channel = 0
363
    rx_channel = 1
364
    rxfile = "/tmp/eth0.rx"
365
    txfile = "/tmp/eth0.tx"
366
  enddevice
367 304 markom
end
368 332 markom
 
369
/* TICK TIMER SECTION
370
 
371
    This section configures tick timer
372
 
373
    enabled = 0/1
374
      whether tick timer is enabled
375
 
376
    irq = 
377
      irq number
378
*/
379
 
380
section tick
381
  enabled = 0
382
  irq = 3
383
end

powered by: WebSVN 2.1.0

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