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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc3/] [or1ksim/] [sim.cfg] - Blame information for rev 383

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

powered by: WebSVN 2.1.0

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