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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_50/] [or1ksim/] [sim.cfg] - Blame information for rev 344

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
        start_address1 length1 type1 [ce1 [delayr1 [delayw1]]]
63
        start_address2 length2 type2 [ce2 [delayr2 [delayw2]]]
64
        start_address3 length3 type3 [ce3 [delayr3 [delayw3]]]
65
 
66
      Example:
67
        00000100 00001F00 flash 3 100
68
        80000000 00010000 RAM
69
 
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
*/
145
 
146
section VAPI
147
  enabled = 0
148
  server_port = 9998
149
end
150
 
151
 
152
/* CPU SECTION
153
 
154
   This section specifies various CPU parameters.
155
 
156
   ver = 
157
   rev = 
158
      specifies version and revision of the CPU used
159
 
160
   upr = 
161
      changes the upr register
162
 
163
   superscalar = 0/1
164
   hazards = 0/1
165
   history = 0/1
166
   dependstats = 0/1
167
   dependency = 0/1
168
   slp = 0/1
169
   btic = 0/1
170
   bpb = 0/1
171
      parameters for CPU analysis
172
*/
173
 
174 263 markom
section cpu
175
  ver = 0x1200
176
  rev = 0x0001
177
  /* upr = */
178
  superscalar = 0
179
  hazards = 0
180
  history = 0
181
  dependstats = 0
182
  dependency = 0
183
  slp = 0
184 304 markom
  btic = 0
185 264 markom
  bpb = 0
186 263 markom
end
187
 
188 312 markom
 
189
/* DEBUG SECTION
190
 
191
   This sections specifies how debug unit should behave.
192
 
193
   enabled = 0/1
194
      whether debug unit is enabled
195
 
196
   gdb_enabled = 0/1
197
      whether to start gdb server at 'server_port' port
198
 
199
   server_port = 
200
      TCP/IP port to start gdb server on, used only if gdb_enabled
201
      is set
202
 
203 269 markom
section debug
204 312 markom
  enabled = 0
205
  gdb_enabled = 0
206 269 markom
  server_port = 9999
207
end
208
 
209 264 markom
 
210 312 markom
/* MC SECTION
211
 
212
   This section configures the memory controller
213
 
214
   enabled = 0/1
215
      whether memory controller is enabled
216
 
217
   baseaddr = 
218
      address of first MC register
219
 
220
   POC = 
221
      Power On Configuration register
222
*/
223
 
224 243 markom
section mc
225 304 markom
  enabled = 0
226 261 markom
  baseaddr = 0xa0000000
227
  POC = 0x00000008                 /* Power on configuration register */
228 243 markom
end
229 261 markom
 
230 312 markom
 
231
/* UART SECTION
232
 
233
   This section configures UARTs
234
 
235
   enabled = 0/1
236
      whether uarts are enabled
237
 
238
   nuarts = 
239
      make specified number of instances, configure each
240
      instance within device - enddevice construct.
241
 
242
   instance specific:
243
     baseaddr = 
244
        address of first UART register for this device
245
 
246
     rx_file = ""
247
        filename, where to read data from
248
 
249
     tx_file = ""
250
        filename, where to write data to
251 332 markom
 
252
     irq = 
253
        irq number for this device
254 312 markom
 
255 341 markom
     16550 = 0/1
256
        0, if this device is uart 16450 and 1, if it is 16550
257
 
258 312 markom
     jitter = 
259
        in msecs... time to block, -1 to disable it
260 313 markom
 
261
     vapi_id = 
262
        VAPI id of this instance
263 312 markom
*/
264
 
265 261 markom
section uart
266 304 markom
  enabled = 0
267 261 markom
  nuarts = 1
268
 
269
  device 0
270
    baseaddr = 0x80000000
271 332 markom
    irq = 2
272 261 markom
    rxfile = "/tmp/uart0.rx"
273
    txfile = "/tmp/uart0.tx"
274
    jitter = -1                     /* async behaviour */
275
  enddevice
276
end
277
 
278 312 markom
 
279
/* DMA SECTION
280
 
281
   This section configures DMAs
282
 
283
   enabled = 0/1
284
      whether DMAs are enabled
285
 
286
   ndmas = 
287
      make specified number of instances, configure each
288
      instance within device - enddevice construct.
289
 
290
   instance specific:
291
     baseaddr = 
292
        address of first DMA register for this device
293
 
294
     irq = 
295
        irq number for this device
296 313 markom
 
297
     vapi_id = 
298
        VAPI id of this instance
299 312 markom
*/
300
 
301 261 markom
section dma
302 304 markom
  enabled = 0
303 261 markom
  ndmas = 1
304
 
305
  device 0
306
    baseaddr = 0x90000000
307
    irq = 4
308
  enddevice
309
end
310 293 markom
 
311 304 markom
 
312 312 markom
/* ETHERNET SECTION
313
 
314
   This section configures ethernets
315
 
316
   enabled = 0/1
317
      whether ethernets are enabled
318
 
319
   nethernets = 
320
      make specified number of instances, configure each
321
      instance within device - enddevice construct.
322
 
323
   instance specific:
324
     baseaddr = 
325
        address of first ethernet register for this device
326
 
327
     dma = 
328
        which controller is this ethernet "connected" to
329
 
330
     rx_channel = 
331
        DMA channel used for RX
332
 
333
     tx_channel = 
334
        DMA channel used for TX
335
 
336
     rx_file = ""
337
        filename, where to read data from
338
 
339
     tx_file = ""
340
        filename, where to write data to
341 313 markom
 
342
     vapi_id = 
343
        VAPI id of this instance
344 312 markom
*/
345
 
346 304 markom
section ethernet
347
  enabled = 0
348 310 markom
  nethernets = 1
349
 
350
  device 0
351
    baseaddr = 0x88000000
352
    dma = 0
353
    tx_channel = 0
354
    rx_channel = 1
355
    rxfile = "/tmp/eth0.rx"
356
    txfile = "/tmp/eth0.tx"
357
  enddevice
358 304 markom
end
359 332 markom
 
360
/* TICK TIMER SECTION
361
 
362
    This section configures tick timer
363
 
364
    enabled = 0/1
365
      whether tick timer is enabled
366
 
367
    irq = 
368
      irq number
369
*/
370
 
371
section tick
372
  enabled = 0
373
  irq = 3
374
end

powered by: WebSVN 2.1.0

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