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

Subversion Repositories or1k

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

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

powered by: WebSVN 2.1.0

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