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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_55/] [or1ksim/] [sim.cfg] - Blame information for rev 394

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

powered by: WebSVN 2.1.0

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