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

Subversion Repositories or1k

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

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

powered by: WebSVN 2.1.0

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