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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_61/] [or1ksim/] [sim.cfg] - Blame information for rev 332

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

powered by: WebSVN 2.1.0

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