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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [doc/] [or1ksim.info] - Blame information for rev 451

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 450 jeremybenn
This is ../../doc/or1ksim.info, produced by makeinfo version 4.13 from
2
../../doc/or1ksim.texi.
3 19 jeremybenn
 
4
INFO-DIR-SECTION Embedded development
5
START-INFO-DIR-ENTRY
6 442 julius
* Or1ksim: (or32-elf-or1ksim).  The OpenRISC 1000 Architectural
7 19 jeremybenn
                                        Simulator
8
END-INFO-DIR-ENTRY
9
 
10
This file documents the OpenRISC Architectural Simulator, Or1ksim.
11
 
12
Copyright (C) 2008, 2009 Embecosm Limited.
13
 
14
     Permission is granted to copy, distribute and/or modify this
15
     document under the terms of the GNU Free Documentation License,
16
     Version 1.2 or any later version published by the Free Software
17
     Foundation; with no Invariant Sections, with no Front-Cover Texts,
18
     and with no Back-Cover Texts.  A copy of the license is included
19
     in the section entitled "GNU Free Documentation License".
20
 
21

22
File: or1ksim.info,  Node: Top,  Next: Installation,  Up: (dir)
23
 
24
Scope of this Document
25
**********************
26
 
27
This document is the user guide for Or1ksim, the OpenRISC 1000
28
Architectural Simulator.
29
 
30
* Menu:
31
 
32
* Installation::
33
* Usage::
34
* Configuration::
35
* Interactive Command Line::
36
* Verification API::
37
 
38
* Code Internals::
39
 
40
* GNU Free Documentation License::  The license for this documentation
41
* Index::
42
 
43

44
File: or1ksim.info,  Node: Installation,  Next: Usage,  Prev: Top,  Up: Top
45
 
46
1 Installation
47
**************
48
 
49
Installation follows standard GNU protocols.
50
 
51
* Menu:
52
 
53
* Preparation::
54
* Configuring the Build::
55
* Build and Install::
56
* Known Issues::
57
 
58

59
File: or1ksim.info,  Node: Preparation,  Next: Configuring the Build,  Up: Installation
60
 
61
1.1 Preparation
62
===============
63
 
64
Unpack the software and create a _separate_ directory in which to build
65
it:
66
 
67 450 jeremybenn
     tar jxf or1ksim-2010-12-15.tar.bz2
68 19 jeremybenn
     mkdir builddir_or1ksim
69
     cd builddir_or1ksim
70
 
71

72
File: or1ksim.info,  Node: Configuring the Build,  Next: Build and Install,  Prev: Preparation,  Up: Installation
73
 
74
1.2 Configuring the Build
75
=========================
76
 
77
Configure the software using the `configure' script in the main
78
directory.
79
 
80
The most significant argument is `--target', which should specify the
81 82 jeremybenn
OpenRISC 1000 32-bit architecture.  If this argument is omitted, it will
82 19 jeremybenn
default to OpenRISC 1000 32-bit with a warning
83
 
84 450 jeremybenn
     ../or1ksim-2010-12-15/configure --target=or32-elf ...
85 19 jeremybenn
 
86
There are several other options available, many of which are standard
87 82 jeremybenn
to GNU `configure' scripts.  Use `configure --help' to see all the
88
options.  The most useful is `--prefix' to specify a directory for
89 19 jeremybenn
installation of the tools.
90
 
91 385 jeremybenn
For testing (using `make check'), the `--target' parameter may be
92
specified, to allow the target tool chain to be selected.  If not
93
specified, it will default to `or32-elf', which is the same prefix used
94
with the standard OpenRISC toolchain installation script.
95 19 jeremybenn
 
96 104 jeremybenn
A number of Or1ksim specific features in the simulator do require
97
enabling at configuration.  These include
98
 
99 19 jeremybenn
`--enable-profiling'
100
`--disable-profiling'
101 82 jeremybenn
     If enabled, Or1ksim is compiled for profiling with `gprof'.  This
102
     is disabled by default.  Only really of value for developers of
103 19 jeremybenn
     Or1ksim.
104
 
105
`--enable-execution=simple'
106
`--enable-execution=complex'
107
`--enable-execution=dynamic'
108
     Or1ksim has developed to improve functionality and performance.
109
     This feature allows three versions of Or1ksim to be built
110
 
111
    `--enable-execution=simple'
112
          Build the original simple interpreting simulator
113
 
114
    `--enable-execution=complex'
115 82 jeremybenn
          Build a more complex interpreting simulator.  Experiments
116
          suggest this is 50% faster than the simple simulator.  This
117
          is the default.
118 19 jeremybenn
 
119
    `--enable-execution=dynamic'
120 82 jeremybenn
          Build a dynamically compiling simulator.  This is the way
121
          many modern ISS are built.  This represents a work in
122
          progress.  Currently Or1ksim will compile, but segfaults if
123
          configured with this option.
124 19 jeremybenn
 
125
 
126
     The default is `--enable-execution=complex'.
127
 
128
`--enable-ethphy'
129
`--disable-ethphy'
130
     If enabled, this option allows the Ethernet to be simulated by
131
     connecting via a socket (the alternative reads and writes, from
132 82 jeremybenn
     and to files).  This must then be configured using the relevant
133
     fields in the `ethernet' section of the configuration file.  *Note
134 19 jeremybenn
     Ethernet Configuration: Ethernet Configuration.
135
 
136
     The default is for this to be disabled.
137
 
138 127 jeremybenn
`--enable-unsigned-xori'
139
`--disable-unsigned-xori'
140 346 jeremybenn
     Historically, `l.xori', has sign extended its operand.  This is
141 127 jeremybenn
     inconsistent with the other logical opcodes (`l.andi', `l.ori'),
142
     but in the absence of `l.not', it allows a register to be inverted
143
     in a single instruction using:
144
 
145
          `l.xori  rD,rA,-1'
146
 
147
     This flag causes Or1ksim to treat the immediate operand as
148
     unsigned (i.e to zero-extend rather than sign-extend).
149
 
150
     The default is to sign-extend, so that existing code will continue
151
     to work.
152
 
153
          Caution: The GNU compiler tool chain makes heavy use of this
154
          instruction.  Using unsigned behavior will require the
155
          compiler to be modified accordingly.
156
 
157
          This option is provided for experimentation.  A future
158
          version of OpenRISC may adopt this more consistent behavior
159
          and also provide a `l.not' opcode.
160
 
161 19 jeremybenn
`--enable-range-stats'
162
`--disable-range-stats'
163
     If enabled, this option allows statistics to be collected to
164 82 jeremybenn
     analyse register access over time.  The default is for this to be
165 19 jeremybenn
     disabled.
166
 
167
`--enable-debug'
168
`--disable-debug'
169
     This is a feature of the Argtable2 package used to process
170 82 jeremybenn
     arguments.  If enabled, some debugging features are turned on in
171
     Argtable2.  It is provided for completeness, but there is no
172
     reason why this feature should ever be needed by any Or1ksim user.
173 19 jeremybenn
 
174 82 jeremybenn
`--enable-all-tests'
175
`--disable-all-tests'
176
     Some of the tests (at the time of writing just one) will not
177
     compile without error.  If enabled with this flag, all test
178
     programs will be compiled with `make check'.
179 19 jeremybenn
 
180 82 jeremybenn
     This flag is intended for those working on the test package, who
181
     wish to get the missing test(s) working.
182
 
183
 
184 112 jeremybenn
A number of configuration flags have been removed since version 0.3.0,
185 346 jeremybenn
because they led to invalid behavior of Or1ksim.  Those removed are:
186 112 jeremybenn
 
187 124 jeremybenn
`--enable-arith-flag'
188
`--disable-arith-flag'
189
     If enabled, this option caused certain instructions to set the flag
190
     (`F' bit) in the supervision register if the result were zero.
191
     The instructions affected by this were `l.add', `l.addc',
192
     `l.addi', `l.and' and `l.andi'.
193
 
194 346 jeremybenn
     If set, this caused incorrect behavior.  Whether or not flags are
195 124 jeremybenn
     set is part of the OpenRISC 1000 architectural specification.  The
196
     only flags which should set this are the "set flag" instructions:
197
     `l.sfeq', `l.sfeqi', `l.sfges', `l.sfgesi', `l.sfgeu', `l.sfgeui',
198
     `l.sfgts', `l.sfgtsi', `l.sfgtu', `l.sfgtui', `l.sfles',
199
     `l.sflesi', `l.sfleu', `l.sfleui', `l.sflts', `l.sfltsi',
200
     `l.sfltu', `l.sfltui', `l.sfne' and `l.sfnei'.
201
 
202 112 jeremybenn
`--enable-ov-flag'
203
`--disable-ov-flag'
204 124 jeremybenn
     This flag caused certain instructions to set the overflow flag.
205
     If not, those instructions would not set the overflow flat.  The
206
     instructions affected by this were `l.add', `l.addc', `l.addi',
207
     `l.and', `l.andi', `l.div', `l.divu', `l.mul', `l.muli', `l.or',
208
     `l.ori', `l.sll', `l.slli', `l.srl', `l.srli', `l.sra', `l.srai',
209
     `l.sub', `l.xor' and `l.xori'.
210 112 jeremybenn
 
211
     This guaranteed incorrect behavior.  The OpenRISC 1000 architecture
212
     specification defines which flags are set by which instructions.
213
 
214
     Within the above list, the arithmetic instructions (`l.add',
215
     `l.addc', `l.addi', `l.div', `l.divu', `l.mul', `l.muli' and
216
     `l.sub'), together with `l.addic' which is missed out, set the
217
     overflow flag.  All the others (`l.and', `l.andi', `l.or',
218
     `l.ori', `l.sll', `l.slli', `l.srl', `l.srli', `l.sra', `l.srai',
219
     `l.xor' and `l.xori') do not.
220
 
221
 
222 19 jeremybenn

223
File: or1ksim.info,  Node: Build and Install,  Next: Known Issues,  Prev: Configuring the Build,  Up: Installation
224
 
225
1.3 Building and Installing
226
===========================
227
 
228 82 jeremybenn
Build the tool with:
229 19 jeremybenn
 
230
     make all
231 82 jeremybenn
 
232
If you have the OpenRISC tool chain and DejaGNU installed, you can
233
verify the tool as follows (otherwise omit this step):
234
 
235
     make check
236
 
237
Install the tool with:
238
 
239 19 jeremybenn
     make install
240
 
241
This will install the three variations of the Or1ksim tool,
242 442 julius
`or32-elf-sim', `or32-elf-psim' and `or32-elf-mpsim', the Or1ksim
243
library, `libsim', the header file, `or1ksim.h' and this documentation
244
in `info' format.
245 19 jeremybenn
 
246
The documentation may be created and installed in alternative formats
247
(PDF, Postscript, DVI, HTML) with for example:
248
 
249
     make pdf
250
     make install-pdf
251
 
252

253
File: or1ksim.info,  Node: Known Issues,  Prev: Build and Install,  Up: Installation
254
 
255
1.4 Known Problems and Issues
256
=============================
257
 
258 346 jeremybenn
Full details of outstanding issues may be found in the `NEWS' file in
259
the main directory of the distribution.  The OpenRISC tracker may be
260
used to see the current state of these issues and to raise new problems
261
and feature requests.  It may be found at bugtracker.
262 19 jeremybenn
 
263 346 jeremybenn
The following issues are long standing and unlikely to be fixed in
264
Or1ksim in the near future.
265
 
266 19 jeremybenn
   * The Supervision Register Little Endian Enable (LEE) bit is
267 82 jeremybenn
     ignored.  Or1ksim can be built for either little endian or big
268 19 jeremybenn
     endian use, but that behavior cannot be changed dynamically.
269
 
270
   * Or1ksim is not reentrant, so a program cannot instantiate multiple
271 82 jeremybenn
     instances using the library.  This is clearly a problem when
272
     considering multi-core applications.  However it stems from the
273
     original design, and can only be fixed by a complete rewrite.  The
274 19 jeremybenn
     entire source code uses static global constants liberally!
275
 
276
 
277

278
File: or1ksim.info,  Node: Usage,  Next: Configuration,  Prev: Installation,  Up: Top
279
 
280
2 Usage
281
*******
282
 
283
* Menu:
284
 
285
* Standalone Simulator::
286
* Profiling Utility::
287
* Memory Profiling Utility::
288 442 julius
* Trace Generation::
289 19 jeremybenn
* Simulator Library::
290 440 jeremybenn
* Ethernet TUN/TAP Interface::
291 19 jeremybenn
 
292

293
File: or1ksim.info,  Node: Standalone Simulator,  Next: Profiling Utility,  Up: Usage
294
 
295
2.1 Standalone Simulator
296
========================
297
 
298
The general form the standalone command is:
299
 
300 442 julius
     or32-elf-sim [-vhiqVt] [-f FILE] [--nosrv] [--srv=[N]]
301 346 jeremybenn
                      [-m ][-d STR]
302 19 jeremybenn
                      [--enable-profile] [--enable-mprofile] [FILE]
303
 
304 82 jeremybenn
Many of the options have both a short and a long form.  For example
305
`-h' or `--help'.
306 19 jeremybenn
 
307
`-v'
308
`--version'
309
     Print out the version and copyright notice for Or1ksim and exit.
310
 
311
`-h'
312
`--help'
313
     Print out help about the command line options and what they mean.
314
 
315 346 jeremybenn
`-i'
316
`--interactive'
317
     After starting, drop into the Or1ksim interactive command shell.
318
 
319
`-q'
320
`--quiet'
321
     Do not generate any information messages, only error messages.
322
 
323
`-V'
324
`--verbose'
325
     Generate extra output messages (equivalent of specifying the
326
     "verbose" option in the simulator configuration section (see *note
327
     Simulator Behavior: Simulator Behavior.).
328
 
329 385 jeremybenn
`-t'
330
`--trace'
331 420 jeremybenn
     Dump instruction just executed and any register/memory location
332
     chaged after each instruction (one line per instruction).
333 385 jeremybenn
 
334 19 jeremybenn
`-f FILE'
335 385 jeremybenn
`--file=FILE'
336 19 jeremybenn
     Read configuration commands from the specified file, looking first
337
     in the current directory, and otherwise in the `$HOME/.or1k'
338 82 jeremybenn
     directory.  If this argument is not specified, the file `sim.cfg'
339
     in those two locations is used.  Failure to find the file is a
340
     fatal error.  *Note Configuration: Configuration, for detailed
341
     information on configuring Or1ksim.
342 19 jeremybenn
 
343
`--nosrv'
344 235 jeremybenn
     Do not start up the "Remote Serial Protocol" debug server.  This
345
     overrides any setting specified in the configuration file.  This
346
     option may not be specified with `--srv'.  If it is, a rude
347
     message is printed and the `--nosrv' option is ignored.
348 19 jeremybenn
 
349
`--srv'
350
 
351
`--srv=N'
352 235 jeremybenn
     Start up the "Remote Serial Protocol" debug server.  This
353
     overrides any setting specified in the configuration file.  If the
354
     parameter, N, is specified, use that as the TCP/IP port for the
355
     server, otherwise a random value from the private port range
356
     (41920-65535) will be used.  This option may not be specified with
357
     `--nosrv'.  If it is, a rude message is printed and the `--nosrv'
358
     option is ignored.
359 19 jeremybenn
 
360 385 jeremybenn
`-m SIZE'
361 346 jeremybenn
`--memory=SIZE'
362
     Configure a memory block of SIZE bytes, starting at address zero.
363
     The size may be followed by `k', `K', `m', `M', `g', `G', to
364
     indicate kilobytes (2^10 bytes), megabytes (2^20 bytes) and
365
     gigabytes (2^30 bytes).
366
 
367
     This is mainly intended for use when Or1ksim is used without a
368
     configuration file, to allow just the processor and memory to be
369
     set up.  This is the equivalent of specifying a configuration
370
     memory section with `baseaddr = 0' and `size = SIZE' and all other
371
     parameters taking their default value.
372
 
373
     If a configuration file is also used, it should be sure not to
374
     specify an overlapping memory block.
375
 
376 385 jeremybenn
`-d CONFIG_STRING'
377 19 jeremybenn
`--debug-config=CONFIG_STRING'
378 82 jeremybenn
     Enable selected debug messages in Or1ksim.  This parameter is for
379
     use by developers only, and is not covered further here.  See the
380 19 jeremybenn
     source code for more details.
381
 
382 346 jeremybenn
`--report-memory-errors'
383
     By default all exceptions are now handled silently.  If this
384
     option is specified, bus exceptions will be reported with a
385
     message to standard error indicating the address at which the
386
     exception occurred.
387 19 jeremybenn
 
388 346 jeremybenn
     This was the default behaviour up to Or1ksim 0.4.0.  This flag is
389
     provided for those who wish to keep that behavior.
390
 
391 19 jeremybenn
`--strict-npc'
392
     In real hardware, setting the next program counter (NPC, SPR 16),
393 82 jeremybenn
     flushes the processor pipeline.  The consequence of this is that
394
     until the pipeline refills, reading the NPC will return zero.
395
     This is typically the case when debugging, since the processor is
396 19 jeremybenn
     stalled.
397
 
398
     Historically, Or1ksim has always returned the value of the NPC,
399 82 jeremybenn
     irrespective of when it is changed.  If the `--strict-npc' option
400
     is used, then Or1ksim will mirror real hardware more accurately.
401
     If the NPC is changed while the processor is stalled, subsequent
402 19 jeremybenn
     reads of its value will return 0 until the processor is unstalled.
403
 
404
     This is not currently the default behavior, since tools such as
405
     GDB have been implemented assuming the historic Or1ksim behavior.
406
     However at some time in the future it will become the default.
407
 
408
`--enable-profile'
409
     Enable instruction profiling.
410
 
411
`--enable-mprofile'
412
     Enable memory profiling.
413
 
414
 
415

416
File: or1ksim.info,  Node: Profiling Utility,  Next: Memory Profiling Utility,  Prev: Standalone Simulator,  Up: Usage
417
 
418
2.2 Profiling Utility
419
=====================
420
 
421 82 jeremybenn
This utility analyses instruction profile data generated by Or1ksim.
422
It may be invoked as a standalone command, or from the Or1ksim CLI.
423
The general form the standalone command is:
424 19 jeremybenn
 
425 442 julius
     or32-elf-profile [-vhcq] [-g=FILE]
426 19 jeremybenn
 
427 82 jeremybenn
Many of the options have both a short and a long form.  For example
428
`-h' or `--help'.
429 19 jeremybenn
 
430
`-v'
431
`--version'
432
     Print out the version and copyright notice for the Or1ksim
433
     profiling utility and exit.
434
 
435
`-h'
436
`--help'
437
     Print out help about the command line options and what they mean.
438
 
439
`-c'
440
`--cumulative'
441
     Show cumulative sum of cycles in functions
442
 
443
`-q'
444
`--quiet'
445
     Suppress messages
446
 
447
`-g=FILE'
448
`--generate=FILE'
449 82 jeremybenn
     The data file to analyse.  If omitted, the default file,
450 19 jeremybenn
     `sim.profile' is used.
451
 
452
 
453

454 442 julius
File: or1ksim.info,  Node: Memory Profiling Utility,  Next: Trace Generation,  Prev: Profiling Utility,  Up: Usage
455 19 jeremybenn
 
456
2.3 Memory Profiling Utility
457
============================
458
 
459 82 jeremybenn
This utility analyses memory profile data generated by Or1ksim.  It may
460
be invoked as a standalone command, or from the Or1ksim CLI.  The
461 19 jeremybenn
general form the standalone command is:
462
 
463 442 julius
     or32-elf-mprofile  [-vh] [-m=M] [-g=N] [-f=FILE] FROM TO
464 19 jeremybenn
 
465 82 jeremybenn
Many of the options have both a short and a long form.  For example
466
`-h' or `--help'.
467 19 jeremybenn
 
468
`-v'
469
`--version'
470
     Print out the version and copyright notice for the Or1ksim memory
471
     profiling utility and exit.
472
 
473
`-h'
474
`--help'
475
     Print out help about the command line options and what they mean.
476
 
477
`-m=M'
478
`--mode=M'
479 82 jeremybenn
     Specify the mode out output.  Permitted options are
480 19 jeremybenn
 
481
    `detailed'
482
    `d'
483 82 jeremybenn
          Detailed output.  This is the default if no mode is specified.
484 19 jeremybenn
 
485
    `pretty'
486
    `p'
487
          Pretty printed output.
488
 
489
    `access'
490
    `a'
491
          Memory accesses only.
492
 
493
    `width'
494
    `w'
495
          Access width only.
496
 
497
 
498
`-g=N'
499
`--group=N'
500
     Group 2^n bits of successive addresses together.
501
 
502
`-f=FILE'
503
`--filename=FILE'
504 82 jeremybenn
     The data file to analyse.  If not specified, the default,
505 19 jeremybenn
     `sim.profile' is used.
506
 
507
`FROM'
508
`TO'
509
     FROM and TO are respectively the start and end address of the
510
     region of memory to be analysed.
511
 
512
 
513

514 442 julius
File: or1ksim.info,  Node: Trace Generation,  Next: Simulator Library,  Prev: Memory Profiling Utility,  Up: Usage
515 19 jeremybenn
 
516 442 julius
2.4 Trace Generation
517
====================
518
 
519
An execution trace can be generated at run time with options passed by
520
the command line, or via the operating system's signal passing
521
mechanism.
522
 
523 450 jeremybenn
The following, passed at run time, can be used to create an execution
524
dump.
525
 
526 442 julius
`-t'
527
`--trace'
528
     Dump instruction just executed and any register/memory location
529
     chaged after each instruction (one line per instruction).
530
 
531 450 jeremybenn
Passing a signal `SIGUSR1' while the simulator is running toggles trace
532
generation. This can be done with the following command, assuming
533
Or1ksim's executable name is `or32-elf-sim':
534
 
535
     pkill -SIGUSR1 or32-elf-sim
536
 
537
This is useful in the case where trace output is desired after a
538
significant amount of simulation time, where it would be inconvenient to
539
generate trace up to that point.
540
 
541
If the `pkill' utility is not available, the `kill' utility can be used
542
if Or1ksim's process number is known. Use the following to determine
543
the process ID of the `or32-elf-sim' and then send the `SIGUSR1'
544
command to toggle execution trace generation:
545
 
546
     ps a | grep or32-elf-sim
547
     kill -SIGUSR1 _process-number_
548
 
549 442 julius

550
File: or1ksim.info,  Node: Simulator Library,  Next: Ethernet TUN/TAP Interface,  Prev: Trace Generation,  Up: Usage
551
 
552
2.5 Simulator Library
553 19 jeremybenn
=====================
554
 
555
Or1ksim may be used as a static of dynamic library, `libsim.a' or
556 82 jeremybenn
`libsim.so'.  When compiling with the static library, the flag, `-lsim'
557 19 jeremybenn
should be added to the link command.
558
 
559
The header file `or1ksim.h' contains appropriate declarations of the
560 82 jeremybenn
functions exported by the Or1ksim library.  These are:
561 19 jeremybenn
 
562 346 jeremybenn
 -- `or1ksim.h': int or1ksim_init (int ARGC, char *ARGV, void
563 432 jeremybenn
          *CLASS_PTR, int (*UPR)(void *CLASS_PTR, unsigned long int
564
          ADDR, unsigned char MASK[], unsigned char RDATA[], int
565
          DATA_LEN), int (*UPW)(void *CLASS_PTR, unsigned long int
566
          ADDR, unsigned char MASK[], unsigned char WDATA[], int
567
          DATA_LEN))
568 346 jeremybenn
     The initialization function is supplied with a vector of arguments,
569
     which are interpreted as arguments to the standalone version (see
570
     *note Standalone Simulator: Standalone Simulator.), a pointer to
571
     the calling class, CLASS_PTR (since the library may be used from
572
     C++) and two up-call functions, one for reads, UPR, and one for
573
     writes, UPW.
574 19 jeremybenn
 
575
     UPW is called for any write to an address external to the model
576 82 jeremybenn
     (determined by a `generic' section in the configuration file).
577
     UPR is called for any reads to an external address.  The CLASS_PTR
578
     is passed back with these upcalls, allowing the function to
579
     associate the call with the class which originally initialized the
580 93 jeremybenn
     library.  Both UPW and UPR should return zero on success and
581
     non-zero otherwise.  At the present time the meaning of non-zero
582
     values is not defined but this may change in the future.
583 19 jeremybenn
 
584 93 jeremybenn
     MASK indicates which bytes in the data are to be written or read.
585 82 jeremybenn
     Bytes to be read/written should have 0xff set in MASK.  Otherwise
586 93 jeremybenn
     the byte should be zero.  The adddress, ADDR, is the _full_
587
     address, since the upcall function must handle all generic
588
     devices, using the full address for decoding.
589 19 jeremybenn
 
590 346 jeremybenn
     Endianness is not a concern, since Or1ksim is transferring byte
591
     vectors, not multi-byte values.
592 19 jeremybenn
 
593 346 jeremybenn
     The result indicates whether the initialization was successful.
594
     The integer values are available as an `enum or1ksim', with
595
     possible values `OR1KSIM_RC_OK' and `OR1KSIM_RC_BADINIT'.
596 19 jeremybenn
 
597 346 jeremybenn
          Caution: This is a change from versions 0.3.0 and 0.4.0.  It
598
          further simplifies the interface, and makes Or1ksim more
599
          consistent with payload representation in SystemC TLM 2.0.
600
 
601 93 jeremybenn
          Note: The current implementation of Or1ksim always transfers
602
          single words (4 bytes), using masks if smaller values are
603
          required.  In this it mimcs the behavior of the WishBone bus.
604
 
605
 
606 19 jeremybenn
 -- `or1ksim.h': int or1ksim_run (double DURATION)
607
     Run the simulator for the simulated duration specified (in
608 346 jeremybenn
     seconds).  A duration of -1 indicates `run forever'
609 19 jeremybenn
 
610 346 jeremybenn
     The result indicates how the run terminated.  The integer values
611
     are available as an `enum or1ksim', with possible values
612
     `OR1KSIM_RC_OK' (ran for the full duration), `OR1KSIM_RC_BRKPT'
613
     (terminated early due to hitting a breakpoint) and
614
     `OR1KSIM_RC_HALTED' (terminated early due to hitting `l.nop 1').
615 19 jeremybenn
 
616 346 jeremybenn
 
617 19 jeremybenn
 -- `or1ksim.h': void or1ksim_reset_duration (double DURATION)
618
     Change the duration of a run specified in an earlier call to
619 82 jeremybenn
     `or1ksim_run'.  Typically this is called from an upcall, which
620 19 jeremybenn
     realizes it needs to change the duration of the run specified in
621
     the call to `or1ksim_run' that has been interrupted by the upcall.
622
 
623
     The time specified is the amount of time that the run must continue
624
     for (i.e the duration from _now_, not the duration from the
625
     original call to `or1ksim_run').
626
 
627
 
628
 -- `or1ksim.h': void or1ksim_set_time_point ()
629 82 jeremybenn
     Set a timing point.  For use with `or1ksim_get_time_period'.
630 19 jeremybenn
 
631
 
632
 -- `or1ksim.h': double or1ksim_get_time_period ()
633
     Return the simulated time (in seconds) that has elapsed since the
634
     last call to `or1ksim_set_time_point'.
635
 
636
 
637
 -- `or1ksim.h': int or1ksim_is_le ()
638
     Return 1 (logical true) if the Or1ksim simulation is
639
     little-endian, 0 otherwise.
640
 
641
 
642
 -- `or1ksim.h': unsigned long int or1ksim_clock_rate ()
643 82 jeremybenn
     Return the Or1ksim clock rate (in Hz).  This is the value
644
     specified in the configuration file.
645 19 jeremybenn
 
646
 
647
 -- `or1ksim.h': void or1ksim_interrupt (int I)
648 82 jeremybenn
     Generate an edge-triggered interrupt on interrupt line I.  The
649 432 jeremybenn
     interrupt must be cleared separately by clearing the corresponding
650
     bit in the PICSR SPR.  Until the interrupt is cleared, any further
651
     interrupts on the same line will be ignored with a warning.  A
652
     warning will be generated and the interrupt request ignored if
653
     level sensitive interrupts have been configured with the
654
     programmable interrupt controller (*note Interrupt Configuration:
655
     Interrupt Configuration.).
656 19 jeremybenn
 
657
 
658
 -- `or1ksim.h': void or1ksim_interrupt_set (int I)
659 82 jeremybenn
     Assert a level-triggered interrupt on interrupt line I.  The
660 19 jeremybenn
     interrupt must be cleared separately by an explicit call to
661 432 jeremybenn
     `or1ksim_interrupt_clear'.  Until the interrupt is cleared, any
662
     further setting of interrupts on the same line will be ignored
663
     with a warning.  A warning will be generated, and the interrupt
664
     request ignored if edge sensitive interrupts have been configured
665
     with the programmable interrupt controller (*note Interrupt
666
     Configuration: Interrupt Configuration.).
667 19 jeremybenn
 
668
 
669
 -- `or1ksim.h': void or1ksim_interrupt_clear (int I)
670
     Clear a level-triggered interrupt on interrupt line I, which was
671 82 jeremybenn
     previously asserted by a call to `or1ksim_interrupt_set'.  A
672 19 jeremybenn
     warning will be generated, and the interrupt request ignored if
673
     edge sensitive interrupts have been configured with the
674
     programmable interrupt controller (*note Interrupt Configuration:
675
     Interrupt Configuration.).
676
 
677
 
678 104 jeremybenn
 -- `or1ksim.h': double or1ksim_jtag_reset ()
679 346 jeremybenn
     Drive a reset sequence through the JTAG interface.  Return the
680 104 jeremybenn
     (model) time taken for this action.  Remember that the JTAG has
681
     its own clock, which can be an order of magnitude slower than the
682
     main clock, so even a reset (5 JTAG cycles) could take 50
683
     processor clock cycles to complete.
684
 
685
 
686 432 jeremybenn
 -- `or1ksim.h': double or1ksim_jtag_shift_ir (unsigned char *JREG, int
687
          NUM_BITS)
688 104 jeremybenn
     Shift the supplied register through the JTAG instruction register.
689 346 jeremybenn
     Return the (model) time taken for this action.  The register is
690 104 jeremybenn
     supplied as a byte vector, with the least significant bits in the
691
     least significant byte.  If the total number of bits is not an
692
     exact number of bytes, then the odd bits are found in the least
693
     significant end of the highest numbered byte.
694
 
695
     For example a 12-bit register would have bits 0-7 in byte 0 and
696
     bits 11-8 in the least significant 4 bits of byte 1.
697
 
698
 
699 432 jeremybenn
 -- `or1ksim.h': double or1ksim_jtag_shift_dr (unsigned char *JREG, int
700
          NUM_BITS)
701 104 jeremybenn
     Shift the supplied register through the JTAG data register.
702 346 jeremybenn
     Return the (model) time taken for this action.  The register is
703 104 jeremybenn
     supplied as a byte vector, with the least significant bits in the
704
     least significant byte.  If the total number of bits is not an
705
     exact number of bytes, then the odd bits are found in the least
706
     significant end of the highest numbered byte.
707
 
708
     For example a 12-bit register would have bits 0-7 in byte 0 and
709
     bits 11-8 in the least significant 4 bits of byte 1.
710
 
711
 
712 432 jeremybenn
 -- `or1ksim.h': int or1ksim_read_mem (unsigned long int ADDR, unsigned
713
          char *BUF, int LEN)
714 346 jeremybenn
     Read LEN bytes from ADDR, placing the result in BUF.  Return LEN
715
     on success and 0 on failure.
716
 
717
          Note: This function was added in Or1ksim 0.5.0.
718
 
719
 
720 432 jeremybenn
 -- `or1ksim.h': int or1ksim_write_mem (unsigned long int ADDR, const
721
          unsigned char *BUF, int LEN)
722 346 jeremybenn
     Write LEN bytes to ADDR, taking the data from BUF.  Return LEN on
723
     success and 0 on failure.
724
 
725
          Note: This function was added in Or1ksim 0.5.0.
726
 
727
 
728 432 jeremybenn
 -- `or1ksim.h': int or1ksim_read_spr (int SPRNUM, unsigned long int
729
          *SPRVAL_PTR)
730 346 jeremybenn
     Read the SPR specified by SPRNUM, placing the result in
731
     SPRVAL_PTR.  Return non-zero on success and 0 on failure.
732
 
733
          Note: This function was added in Or1ksim 0.5.0.
734
 
735
 
736 432 jeremybenn
 -- `or1ksim.h': int or1ksim_write_spr (int SPRNUM, unsigned long int
737
          SPRVA)
738 346 jeremybenn
     Write SPRVAL to the SPR specified by SPRNUM.  Return non-zero on
739
     success and 0 on failure.
740
 
741
          Note: This function was added in Or1ksim 0.5.0.
742
 
743
 
744 432 jeremybenn
 -- `or1ksim.h': int or1ksim_read_reg (int REGNUM, unsigned long int
745
          *REGVAL_PTR)
746 346 jeremybenn
     Read the general purpose register specified by REGNUM, placing the
747
     result in REGVAL_PTR.  Return non-zero on success and 0 on failure.
748
 
749
          Note: This function was added in Or1ksim 0.5.0.
750
 
751
 
752 432 jeremybenn
 -- `or1ksim.h': int or1ksim_write_reg (int REGNUM, unsigned long int
753
          REGVA)
754 346 jeremybenn
     Write REGVAL to the general purpose register specified by REGNUM.
755
     Return non-zero on success and 0 on failure.
756
 
757
          Note: This function was added in Or1ksim 0.5.0.
758
 
759
 
760 432 jeremybenn
 -- `or1ksim.h': void or1ksim_set_stall_state (int STATE)
761 346 jeremybenn
     Set the processor's state according to STATE (1 = stalled, 0 = not
762
     stalled).
763
 
764
          Note: This function was added in Or1ksim 0.5.0.
765
 
766
 
767 19 jeremybenn
The libraries will be installed in the `lib' sub-directory of the main
768
installation directory (as specified with the `--prefix' option to the
769
`configure' script).
770
 
771
For example if the main installation directory is `/opt/or1ksim', the
772 82 jeremybenn
library will be found in the `/opt/or1ksim/lib' directory.  It is
773 19 jeremybenn
available as both a static library (`libsim.a') and a shared object
774
(`libsim.so').
775
 
776
To link against the library add the `-lsim' flag when linking and do
777
one of the following:
778
 
779
   * Add the library directory to the `LD_LIBRARY_PATH' environment
780 82 jeremybenn
     variable during execution.  For example:
781 19 jeremybenn
 
782
          export LD_LIBRARY_PATH=/opt/or1ksim/lib:$LD_LIBRARY_PATH
783
 
784
   * Add the library directory to the `LD_RUN_PATH' environment
785 82 jeremybenn
     variable during linking.  For example:
786 19 jeremybenn
 
787
          export LD_RUN_PATH=/opt/or1ksim/lib:$LD_RUN_PATH
788
 
789
   * Use the linker `--rpath' option and specify the library directory
790 82 jeremybenn
     when linking your program.  For example
791 19 jeremybenn
 
792 82 jeremybenn
          gcc ...  -Wl,--rpath -Wl,/opt/or1ksim/lib ...
793 19 jeremybenn
 
794
   * Add the library directory to `/etc/ld.so.conf'
795
 
796
 
797

798 440 jeremybenn
File: or1ksim.info,  Node: Ethernet TUN/TAP Interface,  Prev: Simulator Library,  Up: Usage
799
 
800 442 julius
2.6 Ethernet TUN/TAP Interface
801 440 jeremybenn
==============================
802
 
803
When an Ethernet peripheral is configured (*note Ethernet
804
Configuration: Ethernet Configuration.), one option is to tunnel
805
traffic through a TUN/TAP interface.  The low level TAP interface is
806
used to tunnel raw Ethernet datagrams.
807
 
808
The TAP interface can then be connected to a physical Ethernet through a
809
bridge, allowing the Or1ksim model to connect to a physical network.
810
This is particularly when Or1ksim is running the OpenRISC Linux kernel
811
image.
812
 
813
This section explains how to set up a bridge for use by Or1ksim. It does
814
require superuser access to the host machine (or at least the relevant
815
network capabilities). A system administrator can modify these
816
guidelines so they are executed on reboot if appropriate.
817
 
818
* Menu:
819
 
820
* Setting Up a Persistent TAP device::
821
* Establishing a Bridge::
822
* Opening the Firewall::
823
* Disabling Ethernet Filtering::
824
* Networking from OpenRISC Linux and BusyBox::
825
* Tearing Down a Bridge::
826
 
827

828
File: or1ksim.info,  Node: Setting Up a Persistent TAP device,  Next: Establishing a Bridge,  Up: Ethernet TUN/TAP Interface
829
 
830 442 julius
2.6.1 Setting Up a Persistent TAP device
831 440 jeremybenn
----------------------------------------
832
 
833
TUN/TAP devices can be created dynamically, but this requires superuser
834
privileges (or at least `CAP_NET_ADMIN' capability).  The solution is
835
to create a persistent TAP device.  This can be done using either
836
`openvpn' or `tunctl'.  In either case the package must be installed on
837
the host system.  Using `openvpn', the following would set up a TAP
838
interface for a specified user and group.
839
 
840
     openvpn --mktun --dev tap_n_ --user _username_ --group _groupname_
841
 
842

843
File: or1ksim.info,  Node: Establishing a Bridge,  Next: Opening the Firewall,  Prev: Setting Up a Persistent TAP device,  Up: Ethernet TUN/TAP Interface
844
 
845 442 julius
2.6.2 Establishing a Bridge
846 440 jeremybenn
---------------------------
847
 
848
A bridge is a "virtual" local area network interfaces, subsuming two or
849
more existing network interfaces.  In this case we will bridge the
850
physical Ethernet interface of the host with the TAP interface that
851
will be used by Or1ksim.
852
 
853
The Ethernet and TAP must lose their own individual IP addresses (by
854
setting them to 0.0.0.0) and are replaced by the IP address of the
855
bridge interface. To do this we use the `bridge-utils' package, which
856
must be installed on the host system. These commands are require
857
superuser privileges or `CAP_NET_ADMIN' capability. To create a new
858
interface `br_n_' the following commands are appropriate.
859
 
860
     brctl addbr br_n_
861
     brctl addif br_n_ eth_x_
862
     brctl addif br_n_ tap_y_
863
 
864
     ifconfig eth_x_ 0.0.0.0 promisc up
865
     ifconfig tap_y_ 0.0.0.0 promisc up
866
 
867
     dhclient br_n_
868
 
869
The last command instructs the bridge to obtain its IP address, netmask,
870
broadcast address, gateway and nameserver information using DHCP.  In a
871
network without DHCP it should be replaced by `ifconfig' to set a
872
static IP address, netmask and broadcast address.
873
 
874
     Note: This will leave a spare dhclient process running in the
875
     background, which should be killed for tidiness. There is a
876
     technique to avoid this using `omshell', but that is beyond the
877
     scope of this guide.
878
 
879
     Note: It is not clear to the author why the existing interfaces
880
     need to be brought up in promiscuous mode, but it seems to cure
881
     various problems.
882
 
883

884
File: or1ksim.info,  Node: Opening the Firewall,  Next: Disabling Ethernet Filtering,  Prev: Establishing a Bridge,  Up: Ethernet TUN/TAP Interface
885
 
886 442 julius
2.6.3 Opening the Firewall
887 440 jeremybenn
--------------------------
888
 
889
Firewall rules should be added to ensure traffic flows freely through
890
the TAP and bridge interfaces. As superuser the following commands are
891
appropriate.
892
 
893
     iptables -A INPUT -i tap_y_ -j ACCEPT
894
     iptables -A INPUT -i br_n_ -j ACCEPT
895
     iptables -A FORWARD -i br_n_ -j ACCEPT
896
 
897

898
File: or1ksim.info,  Node: Disabling Ethernet Filtering,  Next: Networking from OpenRISC Linux and BusyBox,  Prev: Opening the Firewall,  Up: Ethernet TUN/TAP Interface
899
 
900 442 julius
2.6.4 Disabling Ethernet Filtering
901 440 jeremybenn
----------------------------------
902
 
903
Some systems may have ethernet filtering enabled (`ebtables',
904
`bridge-nf', `arptables') which will stop traffic flowing through the
905
bridge.
906
 
907
The easiest way to disable this is by writing zero to all `bridge-nf-*'
908
entries in `/proc/sys/net/bridge'. As superuser the following commands
909
will achieve this.
910
 
911
     cd /proc/sys/net/bridge
912
     for f in bridge-nf-*; do echo 0 > $f; done
913
 
914

915
File: or1ksim.info,  Node: Networking from OpenRISC Linux and BusyBox,  Next: Tearing Down a Bridge,  Prev: Disabling Ethernet Filtering,  Up: Ethernet TUN/TAP Interface
916
 
917 442 julius
2.6.5 Networking from OpenRISC Linux and BusyBox
918 440 jeremybenn
------------------------------------------------
919
 
920
The main use of this style of Ethernet interface to Or1ksim is when
921
running the OpenRISC Linux kernel with BusyBox. The following commands
922
in the BusyBox console window will configure the Ethernet interface
923
(assumed to be `eth0') and bring it up with a DHCP assigned address.
924
 
925
     ifconfig eth0
926
     ifup eth0
927
 
928
At this stage interface to IP addresses will work correctly.
929
 
930
For DNS to work the BusyBox system needs to know where to find a
931
nameserver.  Under BusyBox, `udhcp' does not configure
932
`/etc/resolv.conf' automatically.
933
 
934
The solution is to duplicate the nameserver entry from the
935
`/etc/resolv.conf' file of the host on the BusyBox system. A typical
936
file might be as follows:
937
 
938
     `nameserver 192.168.0.1'
939
 
940
It is convenient to make this permanent within the Linux initramfs. Add
941
the file as `arch/openrisc/support/initramfs/etc/resolv.conf' within
942
the Linux source tree and rebuild `vmlinux'. It will then be present
943
automatically.
944
 
945
One of the most useful functions that is possible is to mount the host
946
file system through NFS. For example, from the BusyBox console:
947
 
948
     mount -t nfs -o nolock 192.168.0.60:/home /mnt
949
 
950
Another useful technique is to telnet into the BusyBox system from the
951
host. This is particularly valuable when a console process locks up,
952
since the `xterm' console will not recognize ctrl-C. Instead the rogue
953
process can be killed from a telnet connection.
954
 
955

956
File: or1ksim.info,  Node: Tearing Down a Bridge,  Prev: Networking from OpenRISC Linux and BusyBox,  Up: Ethernet TUN/TAP Interface
957
 
958 442 julius
2.6.6 Tearing Down a Bridge
959 440 jeremybenn
---------------------------
960
 
961
There is little reason why a bridge should ever need to be torn down,
962
but if desired, the following commands will achieve the effect.
963
 
964
     ifconfig br_n_ down
965
     brctl delbr br_n_
966
 
967
     dhclient eth_x_
968
 
969
As before this will leave a spare `dhclient' process in the background
970
which should be killed.
971
 
972
If desired the TAP interface can be deleted using
973
 
974
     openvpn --rmtun -dev tap_y_
975
 
976
     Caution: The TAP interface should not be in use when running this
977
     command. For example any OpenRISC Linux/BusyBox sessions should be
978
     closed first.
979
 
980

981 19 jeremybenn
File: or1ksim.info,  Node: Configuration,  Next: Interactive Command Line,  Prev: Usage,  Up: Top
982
 
983
3 Configuration
984
***************
985
 
986 82 jeremybenn
Or1ksim is configured through a configuration file.  This is specified
987 19 jeremybenn
through the `-f' parameter to the Or1ksim command, or passed as a
988 82 jeremybenn
string when initializing the Or1ksim library.  If no file is specified,
989
the default `sim.cfg' is used.  The file is looked for first in the
990 224 jeremybenn
current directory, then in the `$HOME/.or1ksim' directory of the user.
991 19 jeremybenn
 
992
* Menu:
993
 
994
* Configuration File Format::
995
* Simulator Configuration::
996
* Core OpenRISC Configuration::
997
* Peripheral Configuration::
998
 
999

1000
File: or1ksim.info,  Node: Configuration File Format,  Next: Simulator Configuration,  Up: Configuration
1001
 
1002
3.1 Configuration File Format
1003
=============================
1004
 
1005 346 jeremybenn
The configuration file is a plain text file.  A reference example,
1006
`sim.cfg', is included in the top level directory of the distribution.
1007 19 jeremybenn
 
1008
* Menu:
1009
 
1010
* Configuration File Preprocessing::
1011
* Configuration File Syntax::
1012
 
1013

1014
File: or1ksim.info,  Node: Configuration File Preprocessing,  Next: Configuration File Syntax,  Up: Configuration File Format
1015
 
1016
3.1.1 Configuration File Preprocessing
1017
--------------------------------------
1018
 
1019 82 jeremybenn
The configuration file may include C style comments (i.e.  delimited by
1020 19 jeremybenn
`/*' and `*/').
1021
 
1022

1023
File: or1ksim.info,  Node: Configuration File Syntax,  Prev: Configuration File Preprocessing,  Up: Configuration File Format
1024
 
1025
3.1.2 Configuration File Syntax
1026
-------------------------------
1027
 
1028
The configuration file is divided into a series of sections, with the
1029
general form:
1030
 
1031
     section SECTION_NAME
1032
 
1033
       ...
1034
 
1035
     end
1036
 
1037
Sections may also have sub-sections within them (currently only the
1038
ATA/ATAPI disc interface uses this).
1039
 
1040
Within a section, or sub-section are a series of parameter assignments,
1041
one per line, withe the general form
1042
 
1043
       PARAMETER = VALUE
1044
 
1045
Depending on the parameter, the value may be a named value (an
1046
enumeration), an integer (specified in any format acceptable in C) or a
1047 82 jeremybenn
string in doubple quotes.  For flag parameters, the value 1 is used to
1048
mean "true" or "on" and the value "0" to mean "false" or "off".  An
1049 19 jeremybenn
example from a memory section shows each of these
1050
 
1051
     section memory
1052
       type    = random
1053
       pattern = 0x00
1054
       name    = "FLASH"
1055
       ...
1056
     end
1057
 
1058
Many parameters are optional and take reasonable default values if not
1059 82 jeremybenn
specified.  However there are some parameters (for example the `ce'
1060 19 jeremybenn
parameter in `section memory') _must_ be specified.
1061
 
1062
Subsections are introduced by a keyword, with a parameter value (no `='
1063 82 jeremybenn
sign), and end with the same keyword prefixed by `end'.  Thus the
1064 19 jeremybenn
ATA/ATAPI inteface (`section ata') has a `device' subsection, thus:
1065
 
1066
     section ata
1067
       ...
1068
       device 0
1069
         type    = 1
1070
         file = "FILENAME"
1071
         ...
1072
       enddevice
1073
       ...
1074
     end
1075
 
1076
Some sections (for example `section sim') should appear only once.
1077
Others (for example `section memory' may appear multiple times.
1078
 
1079
Sections may be omitted, _unless they contain parameters which are
1080 82 jeremybenn
non-optional_.  If the section describes a part of the simulator which
1081 19 jeremybenn
is optional (for example whether it has a UART), then that
1082 82 jeremybenn
functionality will not be provided.  If the section describes a part of
1083 19 jeremybenn
the simulator which is not optional (for example the CPU), then all the
1084
parameters of that section will take their default values.
1085
 
1086
All optional parts of the functionality are always described by
1087
sections including a `enabled' parameter, which can be set to 0 to
1088
ensure that functionality is explicitly omitted.
1089
 
1090
Even if a section is disabled, all its parameters will be read and
1091 82 jeremybenn
stored.  This is helpful if the section is subsequently enabled from
1092
the Or1ksim command line (*note Interactive Command Line: Interactive
1093 19 jeremybenn
Command Line.).
1094
 
1095
     Tip: It generally clearer to have sections describing _all_
1096
     components, with omitted functionality explicitly indicated by
1097
     setting the `enabled' parameter to 0
1098
 
1099
The following sections describe the various configuration sections and
1100
the parameters which may be set in each.
1101
 
1102

1103
File: or1ksim.info,  Node: Simulator Configuration,  Next: Core OpenRISC Configuration,  Prev: Configuration File Format,  Up: Configuration
1104
 
1105
3.2 Simulator Configuration
1106
===========================
1107
 
1108
* Menu:
1109
 
1110
* Simulator Behavior::
1111
* Verification API Configuration::
1112
* CUC Configuration::
1113
 
1114

1115
File: or1ksim.info,  Node: Simulator Behavior,  Next: Verification API Configuration,  Up: Simulator Configuration
1116
 
1117
3.2.1 Simulator Behavior
1118
------------------------
1119
 
1120 82 jeremybenn
Simulator behavior is described in `section sim'.  This section should
1121
appear only once.  The following parameters may be specified.
1122 19 jeremybenn
 
1123
`verbose = 0|1'
1124 82 jeremybenn
     If 1 (true), print extra messages.  Default 0.
1125 19 jeremybenn
 
1126
`debug = 0-9'
1127 82 jeremybenn
 
1128
     higher the value the greater the number of messages.  Default 0.
1129
     Negative values will be treated as 0 (with a warning).  Values
1130
     that are too large will be treated as 9 (with a warning).
1131 19 jeremybenn
 
1132
`profile = 0|1'
1133
     If 1 (true) generate a profiling file using the file specified in
1134 82 jeremybenn
     the `prof_file' parameter or otherwise `sim.profile'.  Default 0.
1135 19 jeremybenn
 
1136
`prof_file = ``FILENAME'''
1137 82 jeremybenn
     Specifies the file to be used with the `profile' parameter.
1138
     Default `sim.profile'.  For backwards compatibility, the
1139
     alternative name `prof_fn' is supported for this parameter, but
1140 346 jeremybenn
     deprecated.  Default `sim.profile'.
1141 19 jeremybenn
 
1142
`mprofile = 0|1'
1143
     If 1 (true) generate a memory profiling file using the file
1144
     specified in the `mprof_file' parameter or otherwise
1145 82 jeremybenn
     `sim.mprofile'.  Default 0.
1146 19 jeremybenn
 
1147 346 jeremybenn
`mprof_file = ``FILENAME'''
1148 19 jeremybenn
     Specifies the file to be used with the `mprofile' parameter.
1149 82 jeremybenn
     Default `sim.mprofile'.  For backwards compatibility, the
1150 19 jeremybenn
     alternative name `mprof_fn' is supported for this parameter, but
1151 346 jeremybenn
     deprecated.  Default `sim.mprofile'.
1152 19 jeremybenn
 
1153
`history = 0|1'
1154 82 jeremybenn
     If 1 (true) track execution flow.  Default 0.
1155 19 jeremybenn
 
1156
          Note: Setting this parameter seriously degrades performance.
1157
 
1158
          Note: If this execution flow tracking is enabled, then
1159
          `dependstats' must be enabled in the CPU configuration
1160
          section (*note CPU Configuration: CPU Configuration.).
1161
 
1162
`exe_log = 0|1'
1163 82 jeremybenn
     If 1 (true), generate an execution log.  Log is written to the
1164
     file specified in parameter `exe_log_file'.  Default 0.
1165 19 jeremybenn
 
1166
          Note: Setting this parameter seriously degrades performance.
1167
 
1168
`exe_log_type = default|hardware|simple|software'
1169
     Type of execution log to produce.
1170
 
1171
    `default'
1172 82 jeremybenn
          Produce default output for the execution log.  In the current
1173 19 jeremybenn
          implementation this is the equivalent of `hardware'.
1174
 
1175
    `hardware'
1176
          After each instruction execution, log the number of
1177
          instructions executed so far, the next instruction to execute
1178
          (in hex), the general purpose registers (GPRs), status
1179
          register, exception program counter, exception, effective
1180
          address register and exception status register.
1181
 
1182
    `simple'
1183
          After each instruction execution, log the number of
1184
          instructions executed so far and the next instruction to
1185
          execute, symbolically disassembled.
1186
 
1187
    `software'
1188
          After each instruction execution, log the number of
1189
          instructions executed so far and the next instruction to
1190 82 jeremybenn
          execute, symbolically disassembled.  Also show the value of
1191 19 jeremybenn
          each operand to the instruction.
1192
 
1193
 
1194 82 jeremybenn
     Default value `hardware'.  Any unrecognized keyword (case
1195 19 jeremybenn
     insensitive) will be treated as the default with a warning.
1196
 
1197
          Note: Execution logs can be _very_ big.
1198
 
1199
`exe_log_start = VALUE'
1200 82 jeremybenn
     Address of the first instruction to start logging.  Default 0.
1201 19 jeremybenn
 
1202
`exe_log_end = VALUE'
1203 82 jeremybenn
     Address of the last instruction to log.  Default no limit (i.e
1204
     once started logging will continue until the simulator exits).
1205 19 jeremybenn
 
1206
`exe_log_marker = VALUE'
1207
     Specifies the number of instructions between printing horizontal
1208 82 jeremybenn
     markers.  Default is to produce no markers.
1209 19 jeremybenn
 
1210
`exe_log_file = FILENAME'
1211
     Filename for the execution log filename if `exe_log' is enabled.
1212 82 jeremybenn
     Default `executed.log'.  For backwards compatibility, the
1213 19 jeremybenn
     alternative name `exe_log_fn' is supported for this parameter, but
1214
     deprecated.
1215
 
1216 202 julius
`exe_bin_insn_log = 0|1'
1217 346 jeremybenn
     Enable logging of executed instructions to a file in binary format.
1218
     This is helpful for off-line dynamic execution analysis.
1219 202 julius
 
1220 346 jeremybenn
          Note: Execution logs can be _very_ big.  For example, while
1221 220 jeremybenn
          booting the Linux kernel, version 2.6.34, a log file 1.2GB in
1222
          size was generated.
1223 202 julius
 
1224
`exe_bin_insn_log_file = FILENAME'
1225
     Filename for the binary execution log filename if
1226
     `exe_bin_insn_log' is enabled.  Default `exe-insn.bin'.
1227
 
1228 19 jeremybenn
`clkcycle = VALUE[ps|ns|us|ms]'
1229 82 jeremybenn
     Specify the time taken by one clock cycle.  If no units are
1230
     specified, `ps' is assumed.  Default 4000ps (250MHz).
1231 19 jeremybenn
 
1232
 
1233

1234
File: or1ksim.info,  Node: Verification API Configuration,  Next: CUC Configuration,  Prev: Simulator Behavior,  Up: Simulator Configuration
1235
 
1236
3.2.2 Verification API (VAPI) Configuration
1237
-------------------------------------------
1238
 
1239
The Verification API (VAPI) provides a TCP/IP interface to allow
1240 82 jeremybenn
components of the simulation to be controlled externally.  *Note
1241 19 jeremybenn
Verification API: Verification API, for more details.
1242
 
1243 82 jeremybenn
Verification API configuration is described in `section vapi'.  This
1244
section may appear at most once.  The following parameters may be
1245 19 jeremybenn
specified.
1246
 
1247
`enabled = 0|1'
1248
     If 1 (true), verification API is enabled and its server started.
1249
     If 0 (the default), it is disabled.
1250
 
1251
`server_port = VALUE'
1252
     When VAPI is enabled, communication will be via TCP/IP on the port
1253 82 jeremybenn
     specified by VALUE.  The value must lie in the range 1 to 65535.
1254 19 jeremybenn
     The default value is 50000.
1255
 
1256 82 jeremybenn
          Tip: There is no registered port for Or1ksim VAPI.  Good
1257 19 jeremybenn
          practice suggests users should adopt port values in the
1258 82 jeremybenn
          "Dynamic" or "Private" port range, i.e.  49152-65535.
1259 19 jeremybenn
 
1260
`log_enabled = 0|1'
1261
     If 1 (true), all VAPI requests and sent commands will be logged.
1262 82 jeremybenn
     If 0 (the default), logging is diabled.  Logs are written to the
1263 19 jeremybenn
     file specified by the `vapi_log_file' field (see below).
1264
 
1265
          Caution: This can generate a substantial amount of file I/O
1266
          and seriously degrade simulator performance.
1267
 
1268
`hide_device_id = 0|1'
1269 82 jeremybenn
     If 1 (true) don't log the device ID.  If 0 (the default), log the
1270
     device ID.  This feature (when set to 1) is provided for backwards
1271 19 jeremybenn
     compatibility with an old version of VAPI.
1272
 
1273
`vapi_log_file = "FILENAME"'
1274
     Use `filename' as the file for logged data is logging is enabled
1275 82 jeremybenn
     (see `log_enabled' above).  The default is `"vapi.log"'.  For
1276 19 jeremybenn
     backwards compatibility, the alternative name `vapi_log_fn' is
1277
     supported for this parameter, but deprecated.
1278
 
1279
 
1280

1281
File: or1ksim.info,  Node: CUC Configuration,  Prev: Verification API Configuration,  Up: Simulator Configuration
1282
 
1283
3.2.3 Custom Unit Compiler (CUC) Configuration
1284
----------------------------------------------
1285
 
1286
The Custom Unit Compiler (CUC) was a project by Marko Mlinar to generate
1287 82 jeremybenn
Verilog from ANSI C functions.  The project seems to not have progressed
1288
beyond the initial prototype phase.  The configuration parameters are
1289 19 jeremybenn
described here for the record.
1290
 
1291 82 jeremybenn
CUC configuration is described in `section cuc'.  This section may
1292
appear at most once.  The following parameters may be specified.
1293 19 jeremybenn
 
1294
`memory_order = none|weak|strong|exact'
1295
     This parameter specifies the memory ordering required:
1296
 
1297
    `memory_order=none'
1298
          Different memory ordering, even if there are dependencies.
1299
          Bursts can be made, width can change.
1300
 
1301 346 jeremybenn
    `memory_order=weak'
1302 82 jeremybenn
          Different memory ordering, even if there are dependencies.  If
1303 19 jeremybenn
          dependencies cannot occur, then bursts can be made, width can
1304
          change.
1305
 
1306 346 jeremybenn
    `memory_order=strong'
1307 82 jeremybenn
          Same memory ordering.  Bursts can be made, width can change.
1308 19 jeremybenn
 
1309 346 jeremybenn
    `memory_order=exact'
1310 19 jeremybenn
          Exactly the same memory ordering and widths.
1311
 
1312
 
1313 82 jeremybenn
     The default value is `memory_order=exact'.  Invalid memory
1314 19 jeremybenn
     orderings are ignored with a warning.
1315
 
1316
`calling_convention = 0|1'
1317 82 jeremybenn
     If 1 (true), programs follow OpenRISC calling conventions.  If 0
1318 19 jeremybenn
     (the default), they may use other convenitions.
1319
 
1320
`enable_bursts = 0 | 1'
1321 82 jeremybenn
     If 1 (true), bursts are detected.  If 0 (the default), bursts are
1322 19 jeremybenn
     not detected.
1323
 
1324
`no_multicycle = 0 | 1'
1325 82 jeremybenn
     If 1 (true), no multicycle logic paths will be generated.  If 0
1326
     (the default), multicycle logic paths will be generated.
1327 19 jeremybenn
 
1328
`timings_file = "FILENAME"'
1329 82 jeremybenn
     FILENAME specifies a file containing timing information.  The
1330
     default value is `"virtex.tim"'.  For backwards compatibility, the
1331 19 jeremybenn
     alternative name `timings_fn' is supported for this parameter, but
1332
     deprecated.
1333
 
1334
 
1335

1336
File: or1ksim.info,  Node: Core OpenRISC Configuration,  Next: Peripheral Configuration,  Prev: Simulator Configuration,  Up: Configuration
1337
 
1338
3.3 Configuring the OpenRISC Architectural Components
1339
=====================================================
1340
 
1341
* Menu:
1342
 
1343
* CPU Configuration::
1344
* Memory Configuration::
1345
* Memory Management Configuration::
1346
* Cache Configuration::
1347
* Interrupt Configuration::
1348
* Power Management Configuration::
1349
* Branch Prediction Configuration::
1350
* Debug Interface Configuration::
1351
 
1352

1353
File: or1ksim.info,  Node: CPU Configuration,  Next: Memory Configuration,  Up: Core OpenRISC Configuration
1354
 
1355
3.3.1 CPU Configuration
1356
-----------------------
1357
 
1358 82 jeremybenn
CPU configuration is described in `section cpu'.  This section should
1359
appear only once.  At present Or1ksim does not model multi-CPU systems.
1360 19 jeremybenn
The following parameters may be specified.
1361
 
1362
`ver = VALUE'
1363
 
1364
`cfg = VALUE'
1365
 
1366
`rev = VALUE'
1367
     The values are used to form the corresponding fields in the `VR'
1368 82 jeremybenn
     Special Purpose Register (SPR 0).  Default values 0.  A warning is
1369 19 jeremybenn
     given and the value truncated if it is too large (8 bits for `ver'
1370
     and `cfg', 6 bits for `rev').
1371
 
1372
`upr = VALUE'
1373
     Used as the value of the Unit Present Register (UPR) Special
1374 82 jeremybenn
     Purpose Register (SPR 1) to VALUE.  Default value is 0x0000075f,
1375 19 jeremybenn
     i.e.
1376
        * UPR present (0x00000001)
1377
 
1378
        * Data cache present (0x00000002)
1379
 
1380
        * Instruction cache present (0x00000004)
1381
 
1382
        * Data MMY present (0x00000008)
1383
 
1384
        * Instruction MMU present (0x00000010)
1385
 
1386
        * Debug unit present (0x00000040)
1387
 
1388
        * Power management unit present (0x00000100)
1389
 
1390
        * Programmable interrupt controller present (0x00000200)
1391
 
1392
        * Tick timer present (0x00000400)
1393
 
1394
     However, with the exection of the UPR present (0x00000001) and tick
1395
     timer present, the various fields will be modified with the values
1396
     specified in their corresponding configuration sections.
1397
 
1398
`cfgr = VALUE'
1399
     Sets the CPU configuration register (Special Purpose Register 2) to
1400 82 jeremybenn
     VALUE.  Default value is 0x00000020, i.e.  support for the ORBIS32
1401
     instruction set.  Attempts to set any other value are accepted, but
1402 19 jeremybenn
     issue a warning that there is no support for the instruction set.
1403
 
1404
`sr = VALUE'
1405
     Sets the supervision register Special Purpose Register (SPR 0x11)
1406 82 jeremybenn
     to VALUE.  Default value is 0x00008001, i.e.  start in supervision
1407 19 jeremybenn
     mode (0x00000001) and set the "Fixed One" bit (0x00008000).
1408
 
1409 98 jeremybenn
          Note: This is particularly useful when an image is held in
1410
          Flash at high memory (0xf0000000).  The EPH  bit can be set,
1411
          so that interrupt vectors are basedf at 0xf0000000, rather
1412
          than 0x0.
1413
 
1414 19 jeremybenn
`superscalar = 0|1'
1415 82 jeremybenn
     If 1, the processor operates in superscalar mode.  Default value is
1416 19 jeremybenn
     0.
1417
 
1418
     In the current simulator, the only functional effect of superscalar
1419
     mode is to affect the calculation of the number of cycles taken to
1420
     execute an instruction.
1421
 
1422
          Caution: The code for this does not appear to be complete or
1423
          well tested, so users are advised not to use this option.
1424
 
1425
`hazards = 0|1'
1426 82 jeremybenn
     If 1, data hazards are tracked in a superscalar CPU.  Default
1427
     value is 0.
1428 19 jeremybenn
 
1429
     In the current simulator, the only functional effect is to cause
1430
     logging of hazard waiting information if the CPU is superscalar.
1431
     However nowhere in the simulator is this data actually computed,
1432
     so the net result is probably to have no effect.
1433
 
1434
     if harzards are tracked, current hazards can be displayed using the
1435
     simulator's `r' command.
1436
 
1437
          Caution: The code for this does not appear to be complete or
1438
          well tested, so users are advised not to use this option.
1439
 
1440
`dependstats = 0|1'
1441 82 jeremybenn
     If 1, inter-instruction dependencies are calculated.  Default
1442
     value 0.
1443 19 jeremybenn
 
1444
     If these values are calculated, the depencies can be displayed
1445
     using the simulator's `stat' command.
1446
 
1447
          Note: This field must be enabled, if execution execution flow
1448
          tracking (field `history') has been requested in the simulator
1449
          configuration section (*note Simulator Behavior: Simulator
1450
          Behavior.).
1451
 
1452
`sbuf_len = VALUE'
1453
     The length of the store buffer is set to VALUE, which must be no
1454 82 jeremybenn
     greater than 256.  Larger values will be truncated to 256 with a
1455
     warning.  Negative values will be treated as 0 with a warning.
1456
     Use 0 to disable the store buffer.
1457 19 jeremybenn
 
1458
     When the store buffer is active, stores are accumulated and
1459
     committed when I/O is idle.
1460
 
1461 100 julius
`hardfloat = 0|1'
1462 346 jeremybenn
     If 1, hardfloat instructions are enabled.  Default value 0.
1463 19 jeremybenn
 
1464 104 jeremybenn
 
1465 19 jeremybenn

1466
File: or1ksim.info,  Node: Memory Configuration,  Next: Memory Management Configuration,  Prev: CPU Configuration,  Up: Core OpenRISC Configuration
1467
 
1468
3.3.2 Memory Configuration
1469
--------------------------
1470
 
1471 82 jeremybenn
Memory configuration is described in `section memory'.  This section
1472 98 jeremybenn
may appear multiple times, specifying multiple blocks of memory.
1473 19 jeremybenn
 
1474 98 jeremybenn
     Caution: The user may choose whether or not to enable a memory
1475 385 jeremybenn
     controller.  If a memory controller is enabled, then appropriate
1476
     initalization code must be provided.  The section describing
1477
     memory controller configuration describes the steps necessary for
1478
     using smaller or larger memory sections (*note Memory Controller
1479
     Configuration: Memory Controller Configuration.).
1480 98 jeremybenn
 
1481 385 jeremybenn
     The "uClibc" startup code initalizes a memory controller, assumed
1482
     to be mapped at 0x93000000.  If a memory controller is _not_
1483
     enabled, then the standard C library code will generate memory
1484
     access errors.  The solution is to declare an additional writable
1485
     memory block, mimicing the memory controller's register bank as
1486
     follows.
1487 98 jeremybenn
 
1488
          section memory
1489
            pattern = 0x00
1490
            type = unknown
1491
            name = "MC shadow"
1492
            baseaddr = 0x93000000
1493
            size     = 0x00000080
1494
            delayr = 2
1495
            delayw = 4
1496
          end
1497
 
1498
 
1499
The following parameters may be specified.
1500
 
1501 418 julius
`type=random|pattern|unknown|zero|exitnops'
1502 82 jeremybenn
     Specifies the values to which memory should be initialized.  The
1503 19 jeremybenn
     default value is `unknown'.
1504
 
1505
    `random'
1506 82 jeremybenn
          Set the memory values to be a random value.  A seed for the
1507 19 jeremybenn
          random generator may be set using the `random_seed' field in
1508
          this section (see below), thus ensuring the same "random"
1509
          values are used each time.
1510
 
1511
    `pattern'
1512
          Set the memory values to be a pattern value, which is set
1513
          using the `pattern' field in this section (see below).
1514
 
1515
    `unknown'
1516 82 jeremybenn
          The memory values are not initialized (i.e.  left "unknown").
1517 240 julius
          This option will yield faster initialization of the
1518 346 jeremybenn
          simulator.  This is the default.
1519 19 jeremybenn
 
1520
    `zero'
1521 82 jeremybenn
          Set the memory values to be 0.  This is the equivalent of
1522 19 jeremybenn
          `type=pattern' and a `pattern' value of 0, and implemented as
1523
          such.
1524
 
1525 420 jeremybenn
               Note: As a consequence, if the `pattern' field is
1526
               _subsequently_ specified in this section, the value in
1527
               that field will be used instead of zero to initialize
1528
               the memory.
1529
 
1530 418 julius
    `exitnops'
1531
          Set the memory values to be an instruction used to signal end
1532
          of simulation. This is useful for causing immediate end of
1533
          simulation when PC corruption occurs.
1534
 
1535 19 jeremybenn
 
1536
`random_seed = VALUE'
1537 82 jeremybenn
     Set the seed for the random number generator to VALUE.  This only
1538 19 jeremybenn
     has any effect for memory type `random'.
1539
 
1540
     The default value is -1, which means the seed will be set from a
1541
     call to the `time' function, thus ensuring different random values
1542 82 jeremybenn
     are used on each run.  The simulator prints out the seed used in
1543 19 jeremybenn
     this case, allowing repeat runs to regenerate the same random
1544
     values used in any particular run.
1545
 
1546
`pattern = VALUE'
1547 82 jeremybenn
     Set the pattern to be used when initializing memory to VALUE.  The
1548
     default value is 0.  This only has any effect for memory type
1549
     `pattern'.  The least significant 8 bits of this value is used to
1550
     initialize each byte.  More than 8 bits can be specified, but will
1551 19 jeremybenn
     ignored with a warning.
1552
 
1553
          Tip: The default value, is equivalent to setting the memory
1554 82 jeremybenn
          `type' to be `zero'.  If that is what is intended, then using
1555 19 jeremybenn
          `type=zero' explicitly is better than using `type=pattern'
1556
          and not specifying a value for `pattern'.
1557
 
1558
`baseaddr = VALUE'
1559 82 jeremybenn
     Set the base address of the memory to VALUE.  It should be aligned
1560 19 jeremybenn
     to a multiple of the memory size rounded up to the nearest 2^n.
1561
     The default value is 0.
1562
 
1563
`size = VALUE'
1564 82 jeremybenn
     Set the size of the memory block to be VALUE bytes.  This should
1565
     be a multiple of 4 (i.e.  word aligned).  The default value is
1566
     1024.
1567 19 jeremybenn
 
1568
          Note: When allocating memory, the simulator will allocate the
1569
          nearest 2^n bytes greater than or equal to VALUE, and will not
1570
          notice memory misses in any part of the memory between VALUE
1571
          and the amount allocated.
1572
 
1573
          As a consequence users are strongly recommended to specify
1574 82 jeremybenn
          memory sizes that are an exact power of 2.  If some other
1575 19 jeremybenn
          amount of memory is required, it should be specified as
1576
          separate, contiguous blocks, each of which is a power of 2 in
1577
          size.
1578
 
1579
`name = "TEXT"'
1580 82 jeremybenn
     Name the block.  Typically these describe the type of memory being
1581
     modeled (thus `"SRAM"' or `"Flash"'.  The default is
1582 19 jeremybenn
     `"anonymous memory block"'.
1583
 
1584
          Note: It is not clear that this information is currently ever
1585 82 jeremybenn
          used in normal operation of the simulator.  Even the `info'
1586 19 jeremybenn
          command of the simulator ignores it.
1587
 
1588
`ce = VALUE'
1589 82 jeremybenn
     Set the chip enable index of the memory instance.  Each memory
1590 19 jeremybenn
     instance should have a unique chip enable index, which should be
1591 82 jeremybenn
     greater than or equal to zero.  This is used by the memory
1592 19 jeremybenn
     controller when identifying different memory instances.
1593
 
1594 346 jeremybenn
     There is no requirement to set `ce' if a memory controller is not
1595
     enabled.  The default value is -1 (invalid).
1596 19 jeremybenn
 
1597
`mc = VALUE'
1598 82 jeremybenn
     Specifies the memory controller this memory is connected to.  It
1599 19 jeremybenn
     should correspond to the `index' field specified in a `section mc'
1600
     for a memory controller (*note Memory Controller Configuration:
1601
     Memory Controller Configuration.).
1602
 
1603 346 jeremybenn
     There is no requirement to set `mc' if a memory controller is not
1604
     enabled.  Default value is 0, which is also the default value of a
1605 98 jeremybenn
     memory controller `index' field.  This is suitable therefore for
1606
     designs with just one memory controller.
1607 19 jeremybenn
 
1608
`delayr = VALUE'
1609 82 jeremybenn
     The number of cycles required for a read access.  Set to -1 if the
1610
     memory does not support reading.  Default value 1.  The simulator
1611 19 jeremybenn
     will add this number of cycles to the total instruction cycle
1612
     count when reading from main memory.
1613
 
1614
`delayw = VALUE'
1615 82 jeremybenn
     The number of cycles required for a write access.  Set to -1 if the
1616
     memory does not support writing.  Default value 1.  The simulator
1617 19 jeremybenn
     will add this number of cycles to the total instruction cycle
1618
     count when writing to main memory.
1619
 
1620
`log = "FILE"'
1621
     If specified, `file' names a file for all memory accesses to be
1622 82 jeremybenn
     logged.  If not specified, the default value, NULL is used, meaning
1623 19 jeremybenn
     that the memory is not logged.
1624
 
1625
 
1626

1627
File: or1ksim.info,  Node: Memory Management Configuration,  Next: Cache Configuration,  Prev: Memory Configuration,  Up: Core OpenRISC Configuration
1628
 
1629
3.3.3 Memory Management Configuration
1630
-------------------------------------
1631
 
1632
Memory Management Unit (MMU) configuration is described in `section
1633
dmmu' (for the data MMU) and `section immu' (for the instruction MMU).
1634 82 jeremybenn
Each section should appear at most once.  The following parameters may
1635 19 jeremybenn
be specified.
1636
 
1637
`enabled = 0|1'
1638
     If 1 (true), the data or instruction (as appropriate) MMU is
1639 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1640 19 jeremybenn
 
1641
`nsets = VALUE'
1642
     Sets the number of data or instruction (as appropriate) TLB sets to
1643 82 jeremybenn
     VALUE, which must be a power of two, not exceeding 128.  Values
1644
     which do not fit these criteria are ignored with a warning.  The
1645 19 jeremybenn
     default value is 1.
1646
 
1647
`nways = VALUE'
1648
     Sets the number of data or instruction (as appropriate) TLB ways to
1649 82 jeremybenn
     VALUE.  The value must be in the range 1 to 4.  Values outside
1650
     this range are ignored with a warning.  The default value is 1.
1651 19 jeremybenn
 
1652
`pagesize = VALUE'
1653
     The data or instruction (as appropriate) MMU page size is set to
1654 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1655
     of 2 are ignored with a warning.  The default is 8192 (0x2000).
1656 19 jeremybenn
 
1657
`entrysize = VALUE'
1658
     The data or instruction (as appropriate) MMU entry size is set to
1659 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1660
     of 2 are ignored with a warning.  The default value is 1.
1661 19 jeremybenn
 
1662
          Note: Or1ksim does not appear to use the `entrysize' parameter
1663 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1664 19 jeremybenn
          not seem to matter.
1665
 
1666
`ustates = VALUE'
1667
     The number of instruction usage states for the data or instruction
1668
     (as appropriate) MMU is set to VALUE, which must be 2, 3 or 4.
1669 82 jeremybenn
     Values outside this range are ignored with a warning.  The default
1670 19 jeremybenn
     value is 2.
1671
 
1672
          Note: Or1ksim does not appear to use the `ustates' parameter
1673 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1674 19 jeremybenn
          not seem to matter.
1675
 
1676
`hitdelay = VALUE'
1677
     Set the number of cycles a data or instruction (as appropriate) MMU
1678 82 jeremybenn
     hit costs.  Default value 1.
1679 19 jeremybenn
 
1680
`missdelay = VALUE'
1681
     Set the number of cycles a data or instruction (as appropriate) MMU
1682 82 jeremybenn
     miss costs.  Default value 1.
1683 19 jeremybenn
 
1684
 
1685

1686
File: or1ksim.info,  Node: Cache Configuration,  Next: Interrupt Configuration,  Prev: Memory Management Configuration,  Up: Core OpenRISC Configuration
1687
 
1688
3.3.4 Cache Configuration
1689
-------------------------
1690
 
1691
Cache configuration is described in `section dc' (for the data cache)
1692 82 jeremybenn
and `seciton ic' (for the instruction cache).  Each section should
1693
appear at most once.  The following parameters may be specified.
1694 19 jeremybenn
 
1695
`enabled = 0|1'
1696
     If 1 (true), the data or instruction (as appropriate) cache is
1697 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1698 19 jeremybenn
 
1699
`nsets = VALUE'
1700
     Sets the number of data or instruction (as appropriate) cache sets
1701
     to VALUE, which must be a power of two, not exceeding
1702
     `MAX_DC_SETS' (for the data cache) or `MAX_IC_SETS' (for the
1703 82 jeremybenn
     instruction cache).  At the time of writing, these constants are
1704
     both defined in the code to be 1024).  The default value is 1.
1705 19 jeremybenn
 
1706
`nways = VALUE'
1707
     Sets the number of data or instruction (as appropriate) cache ways
1708
     to VALUE, which must be a power of two, not exceeding
1709
     `MAX_DC_WAYS' (for the data cache) or `MAX_IC_WAYS' (for the
1710 82 jeremybenn
     instruction cache).  At the time of writing, these constants are
1711
     both defined in the code to be 32).  The default value is 1.
1712 19 jeremybenn
 
1713
`blocksize = VALUE'
1714
     The data or instruction (as appropriate) cache block size is set to
1715 82 jeremybenn
     VALUE bytes, which must be either 16 or 32.  The default is 16.
1716 19 jeremybenn
 
1717
`ustates = VALUE'
1718
     The number of instruction usage states for the data or instruction
1719
     (as appropriate) cache is set to VALUE, which must be 2, 3 or 4.
1720
     The default value is 2.
1721
 
1722
`hitdelay = VALUE'
1723 82 jeremybenn
     _Instruction cache only_.  Set the number of cycles an instruction
1724
     cache hit costs.  Default value 1.
1725 19 jeremybenn
 
1726
`missdelay = VALUE'
1727 82 jeremybenn
     _Instruction cache only_.  Set the number of cycles an instruction
1728
     cache miss costs.  Default value 1.
1729 19 jeremybenn
 
1730
`load_hitdelay = VALUE'
1731 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data load cache hit
1732
     costs.  Default value 2.
1733 19 jeremybenn
 
1734
`load_missdelay = VALUE'
1735 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data load cache
1736
     miss costs.  Default value 2.
1737 19 jeremybenn
 
1738
`store_hitdelay = VALUE'
1739 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data store cache hit
1740
     costs.  Default value 0.
1741 19 jeremybenn
 
1742
`store_missdelay = VALUE'
1743 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data store cache
1744
     miss costs.  Default value 0.
1745 19 jeremybenn
 
1746
 
1747

1748
File: or1ksim.info,  Node: Interrupt Configuration,  Next: Power Management Configuration,  Prev: Cache Configuration,  Up: Core OpenRISC Configuration
1749
 
1750
3.3.5 Interrupt Configuration
1751
-----------------------------
1752
 
1753
Programmable Interrupt Controller (PIC) configuration is described in
1754 82 jeremybenn
`section pic'.  This section may appear at most once--Or1ksim has no
1755
mechanism for handling multiple interrupt controllers.  The following
1756 19 jeremybenn
parameters may be specified.
1757
 
1758
`enabled = 0|1'
1759 82 jeremybenn
     If 1 (true), the programmable interrupt controller is enabled.  If
1760
 
1761 19 jeremybenn
 
1762
`edge_trigger = 0|1'
1763
     If 1 (true, the default), the programmable interrupt controller is
1764 82 jeremybenn
     edge triggered.  If 0 (false), it is level triggered.
1765 19 jeremybenn
 
1766 432 jeremybenn
     The library interface (*note Simulator Library: Simulator Library.)
1767
     provides different functions for setting the different types of
1768
     interrupt, and a function to clear level sensitive interrupts. Edge
1769
     sensitive interrupts must be cleared by clearing the corresponding
1770
     bit in the PICSR SPR.
1771 19 jeremybenn
 
1772 432 jeremybenn
     Internal functions to set and clear interrupts are also provided
1773
     for peripherals implemented within Or1ksim. *Note Interrupts
1774
     Internal: Interrupts Internal for more details.
1775 430 julius
 
1776 432 jeremybenn
`use_nmi = 0|1'
1777
     If 1 (true, the default), interrupt lines 0 and 1 are
1778
     non-maskable. In other words the least significant 2 bits of the
1779
     PICMR SPR are hard-wired to 1.  If 0 (false), all interrupt lines
1780
     are treated as equivalent.
1781 430 julius
 
1782 432 jeremybenn
          Note: These are not non-maskable in the true sense that they
1783
          will pre-empt other interrupts.  Rather they can never be
1784
          masked out using the PICMR register. It is up the interrupt
1785
          exception handler to give these interrupt lines priority, and
1786
          indeed to decide on the priority order in general.
1787 430 julius
 
1788 432 jeremybenn
 
1789 19 jeremybenn

1790
File: or1ksim.info,  Node: Power Management Configuration,  Next: Branch Prediction Configuration,  Prev: Interrupt Configuration,  Up: Core OpenRISC Configuration
1791
 
1792
3.3.6 Power Management Configuration
1793
------------------------------------
1794
 
1795 82 jeremybenn
Power management implementation is incomplete.  At present the effect
1796 19 jeremybenn
(which only happens when the power management unit is enabled) of
1797
setting the different bits in the power management Special Purpose
1798
Register (PMR, SPR 0x4000) is
1799
 
1800
`SDF (bit mask 0x0000000f)'
1801
     No effect - these bits are ignored
1802
 
1803
`DME (bit mask 0x00000010)'
1804
`SME (bit mask 0x00000020)'
1805
     Both these bits cause the processor to stop executing
1806 82 jeremybenn
     instructions.  However all other functions (debug interaction, CLI,
1807 19 jeremybenn
     VAPI etc) carry on as normal.
1808
 
1809
`DCGE (bit mask 0x00000004)'
1810
     No effect - this bit is ignored
1811
 
1812
`SUME (bit mask 0x00000008)'
1813
     Enabling this bit causes a message to be printed, advising that the
1814
     processor is suspending and the simulator exits.
1815
 
1816
 
1817
On reset all bits are cleared.
1818
 
1819 82 jeremybenn
Power management configuration is described in `section pm'.  This
1820
section may appear at most once.  The following parameter may be
1821 19 jeremybenn
specified.
1822
 
1823
`enabled = 0|1'
1824 82 jeremybenn
     If 1 (true), power management is enabled.  If 0 (the default), it
1825
     is disabled.
1826 19 jeremybenn
 
1827
 
1828

1829
File: or1ksim.info,  Node: Branch Prediction Configuration,  Next: Debug Interface Configuration,  Prev: Power Management Configuration,  Up: Core OpenRISC Configuration
1830
 
1831
3.3.7 Branch Prediction Configuration
1832
-------------------------------------
1833
 
1834
From examining the code base, it seems the branch prediction function
1835 82 jeremybenn
is not fully implemented.  At present the functionality seems
1836
restricted to collection of statistics.
1837 19 jeremybenn
 
1838 82 jeremybenn
Branch prediction configuration is described in `section bpb'.  This
1839
section may appear at most once.  The following parameters may be
1840 19 jeremybenn
specified.
1841
 
1842
`enabled = 0|1'
1843 82 jeremybenn
     If 1 (true), branch prediction is enabled.  If 0 (the default), it
1844 19 jeremybenn
     is disabled.
1845
 
1846
`btic = 0|1'
1847
     If 1 (true), the branch target instruction cache model is enabled.
1848
     If 0 (the default), it is disabled.
1849
 
1850
`sbp_bf_fwd = 0|1'
1851 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bf' instruction.  If
1852 19 jeremybenn
 
1853
     instruction.
1854
 
1855
`sbp_bnf_fwd = 0|1'
1856 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bnf' instruction.
1857
     If 0 (the default), do not use forward prediction for this
1858 19 jeremybenn
     instruction.
1859
 
1860
`hitdelay = VALUE'
1861 82 jeremybenn
     Set the number of cycles a branch prediction hit costs.  Default
1862 19 jeremybenn
     value 0.
1863
 
1864
`missdelay = VALUE'
1865 82 jeremybenn
     Set the number of cycles a branch prediction miss costs.  Default
1866 19 jeremybenn
     value 0.
1867
 
1868
 
1869

1870
File: or1ksim.info,  Node: Debug Interface Configuration,  Prev: Branch Prediction Configuration,  Up: Core OpenRISC Configuration
1871
 
1872
3.3.8 Debug Interface Configuration
1873
-----------------------------------
1874
 
1875
The debug unit and debug interface configuration is described in
1876 82 jeremybenn
`section debug'.  This section may appear at most once.  The following
1877 19 jeremybenn
parameters may be specified.
1878
 
1879
`enabled = 0|1'
1880 82 jeremybenn
     If 1 (true), the debug unit is enabled.  If 0 (the default), it is
1881 19 jeremybenn
     disabled.
1882
 
1883
          Note: This enables the functionality of the debug unit (its
1884 82 jeremybenn
          registers etc) within the mode.  It does not provide any
1885
          external interface to the debug unit.  For that, see
1886 235 jeremybenn
          `rsp_enabled' below.
1887 19 jeremybenn
 
1888
`rsp_enabled = 0|1'
1889
     If 1 (true), the GDB "Remote Serial Protocol" server is started,
1890
     provding an interface to an external GNU debugger, using the port
1891
     specified in the `rsp_port' field (see below), or the
1892 82 jeremybenn
     `or1ksim-rsp' TCP/IP service.  If 0 (the default), the server is
1893 19 jeremybenn
     not started, and no external interface is provided.
1894
 
1895
     For more detailed information on the interface to the GNU Debugger
1896
     see Embecosm Application Note 2, `Howto: Porting the GNU Debugger
1897
     Practical Experience with the OpenRISC 1000 Architecture', by
1898
     Jeremy Bennett, published by Embecosm Limited (`www.embecosm.com').
1899
 
1900
`rsp_port = VALUE'
1901
     VALUE specifies the port to be used for the GDB "Remote Serial
1902 82 jeremybenn
     Protocol" interface to the GNU Debugger (GDB).  Default value
1903
     51000.  If the value 0 is specified, Or1ksim will instead look for
1904 19 jeremybenn
     a TCP/IP service named `or1ksim-rsp'.
1905
 
1906
          Tip: There is no registered port for Or1ksim "Remote Serial
1907 82 jeremybenn
          Protocol" service `or1ksim-rsp'.  Good practice suggests
1908
          users should adopt port values in the "Dynamic" or "Private"
1909
          port range, i.e.  49152-65535.
1910 19 jeremybenn
 
1911
`vapi_id = VALUE'
1912
     VALUE specifies the value of the Verification API (VAPI) base
1913 82 jeremybenn
     address to be used with the debug unit.  *Note Verification API:
1914 19 jeremybenn
     Verification API, for more details.
1915
 
1916
     If this is specified and VALUE is non-zero, all OpenRISC Remote
1917
     JTAG protocol transactions will be logged to the VAPI log file, if
1918 82 jeremybenn
     enabled.  This is the only functionality associated with VAPI for
1919
     the debug unit.  No VAPI commands are sent, nor requests handled.
1920 19 jeremybenn
 
1921
 
1922

1923
File: or1ksim.info,  Node: Peripheral Configuration,  Prev: Core OpenRISC Configuration,  Up: Configuration
1924
 
1925
3.4 Configuring Memory Mapped Peripherals
1926
=========================================
1927
 
1928 82 jeremybenn
All peripheral components are optional.  If they are specified, then
1929 19 jeremybenn
(unlike other components) by default they are enabled.
1930
 
1931
* Menu:
1932
 
1933
* Memory Controller Configuration::
1934
* UART Configuration::
1935
* DMA Configuration::
1936
* Ethernet Configuration::
1937
* GPIO Configuration::
1938
* Display Interface Configuration::
1939
* Frame Buffer Configuration::
1940
* Keyboard Configuration::
1941
* Disc Interface Configuration::
1942
* Generic Peripheral Configuration::
1943
 
1944

1945
File: or1ksim.info,  Node: Memory Controller Configuration,  Next: UART Configuration,  Up: Peripheral Configuration
1946
 
1947
3.4.1 Memory Controller Configuration
1948
-------------------------------------
1949
 
1950
The memory controller used in Or1ksim is the component implemented at
1951 98 jeremybenn
OpenCores, and found in the top level SVN directory, `mem_ctrl'.  It is
1952 19 jeremybenn
described in the document `Memory Controller IP Core' by Rudolf
1953 82 jeremybenn
Usselmann, which can be found in the `doc' subdirectory.  It is a
1954
memory mapped component, which resides on the main OpenRISC Wishbone
1955
data bus.
1956 19 jeremybenn
 
1957 82 jeremybenn
The memory controller configuration is described in `section mc'.  This
1958 19 jeremybenn
section may appear multiple times, specifying multiple memory
1959 98 jeremybenn
controllers.
1960 19 jeremybenn
 
1961 385 jeremybenn
     Warning: There are known to be problems with the current memory
1962
     controller, which currently is not included in the regression test
1963
     suite. Users are advised not to use the memory controller in the
1964
     current release.
1965 98 jeremybenn
 
1966 385 jeremybenn
     Caution: There is no initialization code in the standard "newlib"
1967
     library.
1968
 
1969
     The standard "uClibc" library assumes a memory controller mapped
1970
     at 0x93000000 and will initialize the memory controller to expect
1971
     64MB memory blocks, and any memory declarations _must_ reflect
1972
     this.
1973
 
1974 98 jeremybenn
     If smaller memory blocks are declared with a memory controller,
1975
     then sufficient memory will not be allocated by Or1ksim, but out of
1976 346 jeremybenn
     range memory accesses will not be trapped.  For example declaring a
1977 98 jeremybenn
     memory section from 0-4MB with a memory controller enabled would
1978
     mean that accesses between 4MB and 64MB would be permitted, but
1979
     having no allocated memory would likely cause a segmentation fault.
1980
 
1981
     If the user is determined to use smaller memories with the memory
1982
     controller, then custom initialization code must be provided, to
1983
     ensure the memory controller traps out-of-memory accesses.
1984
 
1985
The following parameters may be specified.
1986
 
1987 19 jeremybenn
`enabled = 0|1'
1988 82 jeremybenn
     If 1 (true, the default), this memory controller is enabled.  If
1989
     0, it is disabled.
1990 19 jeremybenn
 
1991
          Note: The memory controller can effectively also be disabled
1992
          by setting an appropriate power on control register value
1993 82 jeremybenn
          (see below).  However this should only be used if it is
1994 19 jeremybenn
          desired to specifically model this behavior of the memory
1995
          controller, not as a way of disabling the memory controller
1996
          in general.
1997
 
1998
`baseaddr = VALUE'
1999
     Set the base address of the memory controller's memory mapped
2000 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2001 19 jeremybenn
     sensible value.
2002
 
2003
     The memory controller has a 7 bit address bus, with a total of 19
2004
     32-bit registers, at addresses 0x00 through 0x4c (address 0x0c and
2005
     addresses 0x50 through 0x7c are not used).
2006
 
2007
`poc = VALUE'
2008
     Specifies the value of the power on control register, The least
2009
     signficant two bits specify the bus width (use 0 for an 8-bit bus,
2010
     1 for a 16-bit bus and 2 for a 32-bit bus) and the next two bits
2011
     the type of memory connected (use 0 for a disabled interface, 1
2012
     for SSRAM, 2 for asyncrhonous devices and 3 for synchronous
2013
     devices).
2014
 
2015
     If other bits are specified, they are ignored with a warning.
2016
 
2017
          Caution: The default value, 0, corresponds to a disabled
2018
          8-bit bus, and is likely not the most suitable value
2019
 
2020
`index = VALUE'
2021
     Specify the index of this memory controller amongst all the memory
2022 82 jeremybenn
     controllers.  This value should be unique for each memory
2023 19 jeremybenn
     controller, and is used to associate specific memories with the
2024
     controller, through the `mc' field in the `section memory'
2025
     configuration (*note Memory Configuration: Memory Configuration.).
2026
 
2027
     The default value, 0, is suitable when there is only one memory
2028
     controller.
2029
 
2030
 
2031

2032
File: or1ksim.info,  Node: UART Configuration,  Next: DMA Configuration,  Prev: Memory Controller Configuration,  Up: Peripheral Configuration
2033
 
2034
3.4.2 UART Configuration
2035
------------------------
2036
 
2037
The UART implemented in Or1ksim follows the specification of the
2038 82 jeremybenn
National Semiconductor 16450 and 16550 parts.  It is a memory mapped
2039 19 jeremybenn
component, which resides on the main OpenRISC Wishbone data bus.
2040
 
2041
The component provides a number of interfaces to emulate the behavior
2042
of an external terminal connected to the UART.
2043
 
2044 82 jeremybenn
UART configuration is described in `section uart'.  This section may
2045
appear multiple times, specifying multiple UARTs.  The following
2046 19 jeremybenn
parameters may be specified.
2047
 
2048
`enabled = 0|1'
2049 82 jeremybenn
     If 1 (true, the default), this UART is enabled.  If 0, it is
2050 19 jeremybenn
     disabled.
2051
 
2052
`baseaddr = VALUE'
2053
     Set the base address of the UART's memory mapped registers to
2054 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2055 19 jeremybenn
 
2056
     The UART has a 3 bit address bus, with a total of 8 8-bit
2057
     registers, at addresses 0x0 through 0x7.
2058
 
2059
`channel = "TYPE:ARGS"'
2060
     Specify the channel representing the terminal connected to the UART
2061
     Rx & Tx pins.
2062
 
2063
    `channel="file:`rxfile',`txfile'"'
2064
          Read input characters from the file `rxfile' and write output
2065
          characters to the file `txfile' (which will be created if
2066
          required).
2067
 
2068
    `channel="xterm:ARGS"'
2069
          Create an xterm on startup, write UART Tx traffic to the
2070
          xterm and take Rx traffic from the keyboard when the xterm
2071 82 jeremybenn
          window is selected.  Additional arguments to the xterm
2072
          command (for example specifying window size may be specified
2073
          in ARGS, or this may be left blank.
2074 19 jeremybenn
 
2075
    `channel="tcp:VALUE"'
2076
          Open the TCP/IP port specified by VALUE and read and write
2077
          UART traffic from and to it.
2078
 
2079
          Typically a telnet session is connected to the other end of
2080
          this port.
2081
 
2082
               Tip: There is no registered port for Or1ksim telnet UART
2083 82 jeremybenn
               connection.  Priviledged access is required to read
2084 19 jeremybenn
               traffic on the registered "well-known" telnet port (23).
2085 346 jeremybenn
               Instead users should use port values in the "Dynamic" or
2086
               "Private" port range, i.e.  49152-65535.
2087 19 jeremybenn
 
2088
    `channel="fd:`rxfd',`txfd'"'
2089
          Read and write characters from and to the existing open
2090
          numerical file descriptors, file `rxfd' and `txfd'.
2091
 
2092
    `channel="tty:device=/dev/ttyS0,baud=9600"'
2093
          Read and write characters from and to a physical serial port.
2094 346 jeremybenn
          The precise device (shown here as `/dev/ttyS0') may vary from
2095
          machine to machine.
2096 19 jeremybenn
 
2097
 
2098
     The default value for this field is `"xterm:"'.
2099
 
2100
`irq = VALUE'
2101 82 jeremybenn
     Use VALUE as the IRQ number of this UART.  Default value 0.
2102 19 jeremybenn
 
2103
`16550 = 0|1'
2104 82 jeremybenn
     If 1 (true), the UART has the functionality of a 16550.  If 0 (the
2105
     default), it has the functionality of a 16450.  The principal
2106 19 jeremybenn
     difference is that the 16550 can buffer multiple characters.
2107
 
2108
`jitter = VALUE'
2109
     Set the jitter, modeled as a time to block, to VALUE milliseconds.
2110 82 jeremybenn
     Set to -1 to disable jitter modeling.  Default value 0.
2111 19 jeremybenn
 
2112
          Note: This functionality has yet to be implemented, so this
2113
          parameter has no effect.
2114
 
2115
`vapi_id = VALUE'
2116
     VALUE specifies the value of the Verification API (VAPI) base
2117 82 jeremybenn
     address to be used with the UART.  *Note Verification API:
2118 19 jeremybenn
     Verification API, for more details, which details the use of the
2119
     VAPI with the UART.
2120
 
2121
 
2122

2123
File: or1ksim.info,  Node: DMA Configuration,  Next: Ethernet Configuration,  Prev: UART Configuration,  Up: Peripheral Configuration
2124
 
2125
3.4.3 DMA Configuration
2126
-----------------------
2127
 
2128
The DMA controller used in Or1ksim is the component implemented at
2129 98 jeremybenn
OpenCores, and found in the top level SVN directory, `wb_dma'.  It is
2130 19 jeremybenn
described in the document `Wishbone DMA/Bridge IP Core' by Rudolf
2131 82 jeremybenn
Usselmann, which can be found in the `doc' subdirectory.  It is a
2132
memory mapped component, which resides on the main OpenRISC Wishbone
2133
data bus.  The present implementation is incomplete, intended only to
2134
support the Ethernet interface (*note Ethernet Configuration::),
2135
although the Ethernet interface is not yet completed.
2136 19 jeremybenn
 
2137 82 jeremybenn
DMA configuration is described in `section dma'.  This section may
2138
appear multiple times, specifying multiple DMA controllers.  The
2139 19 jeremybenn
following parameters may be specified.
2140
 
2141
`enabled = 0|1'
2142 82 jeremybenn
     If 1 (true, the default), this DMA controller is enabled.  If 0,
2143
     it is disabled.
2144 19 jeremybenn
 
2145
`baseaddr = VALUE'
2146
     Set the base address of the DMA's memory mapped registers to
2147 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2148 19 jeremybenn
 
2149
     The DMA controller has a 10 bit address bus, with a total of 253
2150 82 jeremybenn
     32-bit registers.  The first 5 registers at addresses 0x000 through
2151
     0x010 control the overall behavior of the DMA controller.  There
2152
     are then 31 blocks of 8 registers, controlling each of the 31 DMA
2153
     channels available.  Addresses 0x014 through 0x01c are not used.
2154 19 jeremybenn
 
2155
`irq = VALUE'
2156 82 jeremybenn
     Use VALUE as the IRQ number of this DMA controller.  Default value
2157 19 jeremybenn
     0.
2158
 
2159
`vapi_id = VALUE'
2160
     VALUE specifies the value of the Verification API (VAPI) base
2161 82 jeremybenn
     address to be used with the DMA controller.  *Note Verification
2162 19 jeremybenn
     API: Verification API, for more details, which details the use of
2163
     the VAPI with the DMA controller.
2164
 
2165
 
2166

2167
File: or1ksim.info,  Node: Ethernet Configuration,  Next: GPIO Configuration,  Prev: DMA Configuration,  Up: Peripheral Configuration
2168
 
2169
3.4.4 Ethernet Configuration
2170
----------------------------
2171
 
2172 82 jeremybenn
Ethernet configuration is described in `section ethernet'.  This
2173
section may appear multiple times, specifying multiple Ethernet
2174
interfaces.  The following parameters may be specified.
2175 19 jeremybenn
 
2176 440 jeremybenn
The Ethernet MAC used in Or1ksim corresponds to the Verilog
2177
implementation in project "ethmac". It's source code can be found in
2178
the top level SVN directory, `ethmac'.  It also forms part of the
2179
OpenRISC reference SoC, ORPSoC.  It is described in the document
2180
`Ethernet IP Core Specification' by Igor Mohor, which can be found in
2181
the `doc' subdirectory.  It is a memory mapped component, which resides
2182
on the main OpenRISC Wishbone data bus.
2183
 
2184 19 jeremybenn
`enabled = 0|1'
2185 82 jeremybenn
     If 1 (true, the default), this Ethernet MAC is enabled.  If 0, it
2186
     is disabled.
2187 19 jeremybenn
 
2188
`baseaddr = VALUE'
2189
     Set the base address of the MAC's memory mapped registers to
2190 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2191 19 jeremybenn
 
2192
     The Ethernet MAC has a 7-bit address bus, with a total of 21
2193 82 jeremybenn
     32-bit registers.  Addresses 0x54 through 0x7c are not used.
2194 19 jeremybenn
 
2195
          Note: The Ethernet specification describes a Tx control
2196 82 jeremybenn
          register, `TXCTRL', at address 0x50.  However this register
2197
          is not implemented in the Or1ksim model.
2198 19 jeremybenn
 
2199
`dma = VALUE'
2200
     VALUE specifies the DMA controller with which this Ethernet is
2201 82 jeremybenn
     associated.  The default value is 0.
2202 19 jeremybenn
 
2203
          Note: Support for external DMA is not provided in the current
2204 82 jeremybenn
          implementation, and this value is ignored.  In any case there
2205 19 jeremybenn
          is no equivalent field to which this can be matched in the
2206
          current DMA component implementation (*note DMA
2207
          Configuration: DMA Configuration.).
2208
 
2209
`irq = VALUE'
2210 82 jeremybenn
     Use VALUE as the IRQ number of this Ethernet MAC.  Default value 0.
2211 19 jeremybenn
 
2212 440 jeremybenn
`rtx_type = "file"|"tap"'
2213
     Specifies whether to use a TUN/TAP interface or file interface
2214
     (the default) to model the external connection of the Ethernet.
2215 19 jeremybenn
 
2216 440 jeremybenn
     If a TUN/TAP interface is requested, Ethernet packets will be sent
2217
     and received through the pesistent TAP interface specified in
2218
     parameter `tap_dev' (see below).
2219 19 jeremybenn
 
2220 440 jeremybenn
     More details on configuring the TUN/TAP interface are given in the
2221
     Usage section (*note Ethernet TUN/TAP Interface: Ethernet TUN/TAP
2222
     Interface.).
2223 19 jeremybenn
 
2224 440 jeremybenn
     If a file interface (the default), is requested, the Ethernet will
2225
     be modelled by reading and writing from and to the files specified
2226
     in the `rxfile' and `txfile' parameters (see below).
2227
 
2228
          Caution: If a file interface is specified, Or1ksim will
2229
          terminate once the receive file specified by `rxfile' is
2230
          exhausted.
2231
 
2232 19 jeremybenn
`rx_channel = RXVALUE'
2233
`tx_channel = TXVALUE'
2234
     RXVALUE specifies the DMA channel to use for receive and TXVALUE
2235 82 jeremybenn
     the DMA channel to use for transmit.  Both default to 0.
2236 19 jeremybenn
 
2237
          Note: As noted above, support for external DMA is not
2238
          provided in the current implementation, and so these values
2239
          are ignored.
2240
 
2241
`rxfile = "RXFILE"'
2242
`txfile = "TXFILE"'
2243
     When `rtx_type' is 0 (see above), RXFILE specifies the file to use
2244
     as input and TXFILE specifies the fie to use as output.
2245
 
2246 82 jeremybenn
     The file contains a sequence of packets.  Each packet consists of a
2247
     packet length (32 bits), followed by that many bytes of data.
2248
     Once the input file is empty, the Ethernet MAC behaves as though
2249
     there were no data on the Ethernet.  The default values of these
2250 19 jeremybenn
     parameters are `"eth_rx"' and `"eth_tx"' respectively.
2251
 
2252 82 jeremybenn
     The input file must exist and be readable.  The output file must be
2253
     writable and will be created if necessary.  If either of these
2254 19 jeremybenn
     conditions is not met, a warning will be given.
2255
 
2256 440 jeremybenn
          Caution: Or1ksim will terminate once the RXFILE is exhausted.
2257 19 jeremybenn
 
2258 440 jeremybenn
`tap_dev = "TAP"'
2259
     When `rtx_type' is `"tap"' (see above), TAP_DEV specifies the TAP
2260
     device to use for communication.  This should be a persistent TAP
2261
     device configured for the system (*note Ethernet TUN/TAP
2262
     Interface: Ethernet TUN/TAP Interface.)
2263
 
2264 451 jeremybenn
`phy_addr = VALUE'
2265
     VALUE specifies the address for emulated ethernet PHY (default 0).
2266
     If there are multiple Ethernet peripherals, they should each have a
2267
     different PHY value.
2268
 
2269
`dummy_crc = 0|1'
2270
     If 1 (true, the default), the length of the data transferred to
2271
     the core will be increased by 4 bytes, as though the CRC were
2272
     included.
2273
 
2274
          Note: This is for historical consistency with the OpenRISC
2275
          Ethernet hardware MAC, which passes on the CRC in the data
2276
          packet. This is unusual behavior for a MAC, but the OpenRISC
2277
          Linux device drivers have been written to expect it.
2278
 
2279
`phy_addr = VALUE'
2280
     VALUE specifies the address for emulated ethernet PHY (default 0).
2281
     If there are multiple Ethernet peripherals, they should each have a
2282
     different PHY value.
2283
 
2284 19 jeremybenn
`vapi_id = VALUE'
2285
     VALUE specifies the value of the Verification API (VAPI) base
2286 82 jeremybenn
     address to be used with the Ethernet PHY.  *Note Verification API:
2287 19 jeremybenn
     Verification API, for more details, which details the use of the
2288
     VAPI with the DMA controller.
2289
 
2290
 
2291

2292
File: or1ksim.info,  Node: GPIO Configuration,  Next: Display Interface Configuration,  Prev: Ethernet Configuration,  Up: Peripheral Configuration
2293
 
2294
3.4.5 GPIO Configuration
2295
------------------------
2296
 
2297
The GPIO used in Or1ksim is the component implemented at OpenCores, and
2298 98 jeremybenn
found in the top level SVN directory, `gpio'.  It is described in the
2299 19 jeremybenn
document `GPIO IP Core Specification' by Damjan Lampret and Goran
2300 82 jeremybenn
Djakovic, which can be found in the `doc' subdirectory.  It is a memory
2301 19 jeremybenn
mapped component, which resides on the main OpenRISC Wishbone data bus.
2302
 
2303 82 jeremybenn
GPIO configuration is described in `section gpio'.  This section may
2304
appear multiple times, specifying multiple GPIO devices.  The following
2305 19 jeremybenn
parameters may be specified.
2306
 
2307
`enabled = 0|1'
2308 82 jeremybenn
     If 1 (true, the default), this GPIO is enabled.  If 0, it is
2309 19 jeremybenn
     disabled.
2310
 
2311
`baseaddr = VALUE'
2312
     Set the base address of the GPIO's memory mapped registers to
2313 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2314 19 jeremybenn
 
2315
     The GPIO has a 6 bit address bus, with a total of 10 32-bit
2316
     registers, although the number of bits that are actively used
2317 82 jeremybenn
     varies.  Addresses 0x28 through 0x3c are not used.
2318 19 jeremybenn
 
2319
`irq = VALUE'
2320 82 jeremybenn
     Use VALUE as the IRQ number of this GPIO.  Default value 0.
2321 19 jeremybenn
 
2322
`vapi_id = VALUE'
2323
     VALUE specifies the value of the Verification API (VAPI) base
2324 82 jeremybenn
     address to be used with the GPIO.  *Note Verification API:
2325 19 jeremybenn
     Verification API, for more details, which details the use of the
2326 82 jeremybenn
     VAPI with the GPIO controller.  For backwards compatibility, the
2327 19 jeremybenn
     alternative name `base_vapi_id' is supported for this parameter,
2328
     but deprecated.
2329
 
2330
 
2331

2332
File: or1ksim.info,  Node: Display Interface Configuration,  Next: Frame Buffer Configuration,  Prev: GPIO Configuration,  Up: Peripheral Configuration
2333
 
2334
3.4.6 Display Interface Configuration
2335
-------------------------------------
2336
 
2337
Or1ksim models a VGA interface to an external monitor.  The VGA
2338
controller used in Or1ksim is the component implemented at OpenCores,
2339 98 jeremybenn
and found in the top level SVN directory, `vga_lcd', with no support
2340 82 jeremybenn
for the optional hardware cursors.  It is described in the document
2341 19 jeremybenn
`VGA/LCD Core v2.0 Specifications' by Richard Herveille, which can be
2342 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
2343
which resides on the main OpenRISC Wishbone data bus.
2344 19 jeremybenn
 
2345
The current implementation provides only functionality to dump the
2346
screen to a file at intervals.
2347
 
2348 82 jeremybenn
VGA controller configuration is described in `section vga'.  This
2349 19 jeremybenn
section may appear multiple times, specifying multiple VGA controllers.
2350
The following parameters may be specified.
2351
 
2352
`enabled = 0|1'
2353 82 jeremybenn
     If 1 (true, the default), this VGA is enabled.  If 0, it is
2354 19 jeremybenn
     disabled.
2355
 
2356
`baseaddr = VALUE'
2357
     Set the base address of the VGA controller's memory mapped
2358 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2359 19 jeremybenn
     sensible value.
2360
 
2361
     The VGA controller has a 12-bit address bus, with 7 32-bit
2362
     registers, at addresses 0x000 through 0x018, and two color lookup
2363 82 jeremybenn
     tables at addresses 0x800 through 0xfff.  The hardware cursor
2364 19 jeremybenn
     registers are not implemented, so addresses 0x01c through 0x7fc
2365
     are not used.
2366
 
2367
`irq = VALUE'
2368 82 jeremybenn
     Use VALUE as the IRQ number of this VGA controller.  Default value
2369 19 jeremybenn
     0.
2370
 
2371
`refresh_rate = VALUE'
2372 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2373 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2374
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2375
     50 times per simulated second.
2376
 
2377
`txfile = "FILE"'
2378
     FILE specifies the base of the filename for screen dumps.
2379
     Successive screen dumps will be in BMP format, in files with the
2380
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2381 82 jeremybenn
     screen dumps starting at zero.  The default value is `"vga_out"'.
2382 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2383
     supported for this parameter, but deprecated.
2384
 
2385
 
2386

2387
File: or1ksim.info,  Node: Frame Buffer Configuration,  Next: Keyboard Configuration,  Prev: Display Interface Configuration,  Up: Peripheral Configuration
2388
 
2389
3.4.7 Frame Buffer Configuration
2390
--------------------------------
2391
 
2392 82 jeremybenn
     Caution: The frame buffer is only partially implemented.  Its
2393 19 jeremybenn
     configuration fields are described here, but the component should
2394 82 jeremybenn
     not be used at this time.  Like the VGA controller, it is designed
2395 19 jeremybenn
     to make screen dumps to file.
2396
 
2397 82 jeremybenn
Frame buffer configuration is described in `section fb'.  This section
2398
may appear multiple times, specifying multiple frame buffers.  The
2399 19 jeremybenn
following parameters may be specified.
2400
 
2401
`enabled = 0|1'
2402 82 jeremybenn
     If 1 (true, the default), this frame buffer is enabled.  If 0, it
2403 19 jeremybenn
     is disabled.
2404
 
2405
`baseaddr = VALUE'
2406
     Set the base address of the frame buffer's memory mapped registers
2407 82 jeremybenn
     to VALUE.  The default is 0, which is probably not a sensible
2408
     value.
2409 19 jeremybenn
 
2410
     The frame buffer has an 121-bit address bus, with 4 32-bit
2411
     registers, at addresses 0x000 through 0x00c, and a PAL lookup
2412 82 jeremybenn
     table at addresses 0x400 through 0x4ff.  Addresses 0x010 through
2413 19 jeremybenn
     0x3fc and addresses 0x500 through 0x7ff are not used.
2414
 
2415
`refresh_rate = VALUE'
2416 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2417 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2418
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2419
     50 times per simulated second.
2420
 
2421
`txfile = "FILE"'
2422
     FILE specifies the base of the filename for screen dumps.
2423
     Successive screen dumps will be in BMP format, in files with the
2424
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2425 82 jeremybenn
     screen dumps starting at zero.  The default value is `"fb_out"'.
2426 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2427
     supported for this parameter, but deprecated.
2428
 
2429
 
2430

2431
File: or1ksim.info,  Node: Keyboard Configuration,  Next: Disc Interface Configuration,  Prev: Frame Buffer Configuration,  Up: Peripheral Configuration
2432
 
2433
3.4.8 Keyboard Configuration (PS2)
2434
----------------------------------
2435
 
2436 82 jeremybenn
The PS2 interface provided by Or1ksim is not documented.  It may be
2437 98 jeremybenn
based on the PS2 project at OpenCores, and found in the top level SVN
2438 82 jeremybenn
directory, `ps2'.  However this project lacks any documentation beyond
2439
its project webpage.  Since most PS2 interfaces follow the Intel i8042
2440 19 jeremybenn
standard, this is presumably what is expected with this device.
2441
 
2442
The implementation only provides for keyboard support, which is
2443 82 jeremybenn
modelled as a file of keystrokes.  There is no mouse support.
2444 19 jeremybenn
 
2445
     Caution: A standard i8042 device has two registers at addresses
2446 82 jeremybenn
     0x60 (command) and 0x64 (status).  Inspection of the code,
2447
     suggests that the Or1ksim component places these registers at
2448
     addresses 0x00 and 0x04.
2449 19 jeremybenn
 
2450
     The port of Linux for the OpenRISC 1000, which runs on Or1ksim
2451
     implements the i8042 device driver, anticipating these registers
2452 82 jeremybenn
     reside at their conventional address.  It seems unlikel that this
2453 19 jeremybenn
     code will work.
2454
 
2455
     This component should be used with caution.
2456
 
2457 82 jeremybenn
Keyboard configuration is described in `section kbd'.  This section may
2458
appear multiple times, specifying multiple keyboard interfaces.  The
2459 19 jeremybenn
following parameters may be specified.
2460
 
2461
`enabled = 0|1'
2462 82 jeremybenn
     If 1 (true, the default), this keyboard is enabled.  If 0, it is
2463 19 jeremybenn
     disabled.
2464
 
2465
`baseaddr = VALUE'
2466
     Set the base address of the keyboard's memory mapped registers to
2467 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2468 19 jeremybenn
 
2469
     The keyboard PS/2 interface has an 3-bit address bus, with 2 8-bit
2470
     registers, at addresses 0x000 and 0x004.
2471
 
2472
          Caution: As noted above, a standard Intel 8042 interface
2473
          would expect to find these registers at locations 0x60 and
2474
          0x64, thus requiring at least a 7-bit bus.
2475
 
2476
`irq = VALUE'
2477 82 jeremybenn
     Use VALUE as the IRQ number of this Keyboard interface.  Default
2478 19 jeremybenn
     value 0.
2479
 
2480
`rxfile = "FILE"'
2481
     `file' specifies a file containing raw key stroke data, which
2482 82 jeremybenn
     models the input from a physical keyboard.  The default value is
2483 19 jeremybenn
     `"kbd_in"'.
2484
 
2485
 
2486

2487
File: or1ksim.info,  Node: Disc Interface Configuration,  Next: Generic Peripheral Configuration,  Prev: Keyboard Configuration,  Up: Peripheral Configuration
2488
 
2489
3.4.9 Disc Interface Configuration
2490
----------------------------------
2491
 
2492
The ATA/ATAPI disc controller used in Or1ksim is the OCIDEC (OpenCores
2493
IDE Controller) component implemented at OpenCores, and found in the
2494 98 jeremybenn
top level SVN directory, `ata'.  It is described in the document
2495 19 jeremybenn
`ATA/ATAPI-5 Core Specification' by Richard Herveille, which can be
2496 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
2497
which resides on the main OpenRISC Wishbone data bus.
2498 19 jeremybenn
 
2499 385 jeremybenn
     Warning: In the current release of Or1ksim, parsing of the ATA
2500
     section is broken. Users should not configure the disc interface
2501
     in this release.
2502
 
2503 82 jeremybenn
ATA/ATAPI configuration is described in `section ata'.  This section
2504
may appear multiple times, specifying multiple disc controllers.  The
2505 19 jeremybenn
following parameters may be specified.
2506
 
2507
`enabled = 0|1'
2508 82 jeremybenn
     If 1 (true, the default), this ATA/ATAPI interface is enabled.  If
2509 19 jeremybenn
     0, it is disabled.
2510
 
2511
`baseaddr = VALUE'
2512
     Set the base address of the ATA/ATAPI interface's memory mapped
2513 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2514 19 jeremybenn
     sensible value.
2515
 
2516
     The ATA/ATAPI PS/2 interface has an 5-bit address bus, with 8
2517 82 jeremybenn
     32-bit registers.  Depending on the version of the OCIDEC
2518
     ATA/ATAPI interface selected (see `dev_id' below), not all
2519
     registers will be available.
2520 19 jeremybenn
 
2521
`irq = VALUE'
2522 82 jeremybenn
     Use VALUE as the IRQ number of this ATA/ATAPI interface.  Default
2523 19 jeremybenn
     value 0.
2524
 
2525
`dev_id = 1|2|3'
2526
     This parameter specifies which version of the OCIDEC ATA/ATAPI
2527 82 jeremybenn
     interface to model.  The default value is 1.
2528 19 jeremybenn
 
2529
     Version 1 supports only the `CTRL', `STAT' and `PCTR' registers.
2530
     Versions 2 & 3 add the `FCTR' registers, Version 3 adds the `DTR'
2531
     registers and the `RXD'/`TXD' registers.
2532
 
2533
`rev = VALUE'
2534
     Set the VALUE as the revision of the OCIDEC ATA/ATAPI interface.
2535 82 jeremybenn
     The default value is 1.  The default value is 0.  Its value should
2536
     be in the range 0-15.  Larger values are truncated with a warning.
2537 346 jeremybenn
     This only affects the reset value of the `STAT' register, where it
2538
     forms bits 24-27.
2539 19 jeremybenn
 
2540
`pio_mode0_t1 = VALUE'
2541
`pio_mode0_t2 = VALUE'
2542
`pio_mode0_t4 = VALUE'
2543
`pio_mode0_teoc = VALUE'
2544
     These parameters specify the timings for use with Programmed
2545 82 jeremybenn
     Input/Output (PIO) transfers.  They are specified as the number of
2546 19 jeremybenn
     clock cycles - 2, rounded up to the next highest integer, or zero
2547 82 jeremybenn
     if that would be negative.  The values should not exceed 255.  If
2548 19 jeremybenn
     they do, they will be ignored with a warning.
2549
 
2550
     See the ATA/ATAPI-5 specification for explanations of each of these
2551 82 jeremybenn
     timing parameters.  The default values are:
2552 19 jeremybenn
 
2553
          pio_mode0_t1   =  6
2554
          pio_mode0_t2   = 28
2555
          pio_mode0_t4   =  2
2556
          pio_mode0_teoc = 23
2557
 
2558
`dma_mode0_tm = VALUE'
2559
`dma_mode0_td = VALUE'
2560
`dma_mode0_teoc = VALUE'
2561
     These parameters specify the timings for use with DMA transfers.
2562
     They are specified as the number of clock cycles - 2, rounded up
2563
     to the next highest integer, or zero if that would be negative.
2564 82 jeremybenn
     The values should not exceed 255.  If they do, they will be
2565
     ignored with a warning.
2566 19 jeremybenn
 
2567
     See the ATA/ATAPI-5 specification for explanations of each of these
2568 82 jeremybenn
     timing parameters.  The default values are:
2569 19 jeremybenn
 
2570
          dma_mode0_tm   =  4
2571
          dma_mode0_td   = 21
2572
          dma_mode0_teoc = 21
2573
 
2574
 
2575
3.4.9.1 ATA/ATAPI Device Configuration
2576
......................................
2577
 
2578 82 jeremybenn
Within the `section ata', each device is specified separately.  The
2579 19 jeremybenn
device subsection is introduced by
2580
 
2581
     device VALUE
2582
 
2583 82 jeremybenn
VALUE is the device number, which should be 0 or 1.  The subsection
2584
ends with `enddevice'.  Note that if the same device number is
2585
specified more than once, the previous values will be overwritten.
2586
Within the `device' subsection, the following parameters may appear:
2587 19 jeremybenn
 
2588
`type = VALUE'
2589
     VALUEspecifies the type of device: 0 (the default) for "not
2590
     connected", 1 for hard disk simulated in a file and 2 for local
2591
     system hard disk.
2592
 
2593
`file = "FILENAME"'
2594
     `filename' specifies the file to be used for a simulated ATA
2595 82 jeremybenn
     device if the file type (see `type' above) is 1.  Default value
2596 346 jeremybenn
     `"ata_fileN"', where N is the device number.
2597 19 jeremybenn
 
2598
`size = VALUE'
2599
     VALUE specifies the size of a simulated ATA device if the file
2600 82 jeremybenn
     type (see `type' above) is 1.  The default value is zero.
2601 19 jeremybenn
 
2602
`packet = 0|1'
2603 82 jeremybenn
     If 1 (true), implement the PACKET command feature set.  If 0 (the
2604 19 jeremybenn
     default), do not implement the PACKET command feature set.
2605
 
2606
`firmware = "STR"'
2607
     Firmware to report in response to the "Identify Device" command.
2608
     Default `"02207031"'.
2609
 
2610
`heads = VALUE'
2611 82 jeremybenn
     Number of heads in the device.  Default 7, use -1 to disable all
2612 19 jeremybenn
     heads.
2613
 
2614
`sectors = VALUE'
2615 82 jeremybenn
     Number of sectors per track in the device.  Default 32.
2616 19 jeremybenn
 
2617
`mwdma = 0|1|2|-1'
2618 82 jeremybenn
     Highest multi-word DMA mode supported.  Default 2, use -1 to
2619 19 jeremybenn
     disable.
2620
 
2621
`pio = 0|1|2|3|4'
2622 82 jeremybenn
     Highest PIO mode supported.  Default 4.
2623 19 jeremybenn
 
2624
 
2625

2626
File: or1ksim.info,  Node: Generic Peripheral Configuration,  Prev: Disc Interface Configuration,  Up: Peripheral Configuration
2627
 
2628
3.4.10 Generic Peripheral Configuration
2629
---------------------------------------
2630
 
2631
When used as a library (*note Simulator Library: Simulator Library.),
2632
Or1ksim makes provision for any additional peripheral to be implemented
2633 82 jeremybenn
externally.  Any read or write access to this peripheral's memory map
2634
generates "upcall"s to an external handler.  This interface can support
2635 19 jeremybenn
either C or C++, and was particularly designed to facilitate support
2636
for OSCI SystemC (see `http://www.systemc.org').
2637
 
2638
Generic peripheral configuration is described in `section generic'.
2639
This section may appear multiple times, specifying multiple external
2640 82 jeremybenn
peripherals.  The following parameters may be specified.
2641 19 jeremybenn
 
2642
`enabled = 0|1'
2643 82 jeremybenn
     If 1 (true, the default), this ATA/ATAPI interface is enabled.  If
2644 19 jeremybenn
     0, it is disabled.
2645
 
2646
`baseaddr = VALUE'
2647
     Set the base address of the generic peripheral's memory mapped
2648 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2649 19 jeremybenn
     sensible value.
2650
 
2651
     The size of the memory mapped register space is controlled by the
2652
     `size' paramter, described below.
2653
 
2654
`size = VALUE'
2655
     Set the size of the generic peripheral's memory mapped register
2656 82 jeremybenn
     space to VALUE bytes.  Any read or write accesses to addresses with
2657 19 jeremybenn
     offsets of 0 to VALUE-1 bytes from the base address specified in
2658
     parameter `baseaddr' (see above) will be directed to the external
2659
     interface.
2660
 
2661 82 jeremybenn
     VALUE will be rounded up the nearest power of 2.  It's default
2662
     value is zero.  If VALUE is not an exact power of two, accesses to
2663 19 jeremybenn
     address offsets of VALUE or above up to the next power of 2 will
2664
     generate a warning, and have no effect (reads will return zero).
2665
 
2666
`name = "STR"'
2667 82 jeremybenn
     This gives the peripheral the name `"STR"'.  This is used to
2668 19 jeremybenn
     identify the peripheral in error messages and warnings, and when
2669 82 jeremybenn
     reporting its status.  The default value is
2670 19 jeremybenn
     `"anonymous external peripheral"'.
2671
 
2672
`byte_enabled = 0|1'
2673
`hw_enabled = 0|1'
2674
`word_enabled = 0|1'
2675
     If 1 (true, the default), these parameters respectively enable the
2676 82 jeremybenn
     device for byte wide, half-word wide and word wide accesses.  If 0,
2677 19 jeremybenn
     accesses of that width will fail.
2678
 
2679
 
2680

2681
File: or1ksim.info,  Node: Interactive Command Line,  Next: Verification API,  Prev: Configuration,  Up: Top
2682
 
2683
4 Interactive Command Line
2684
**************************
2685
 
2686
If started with the `-f' flag, or if interrupted with `ctrl-C', Or1ksim
2687 82 jeremybenn
provides the user with an interactive command line.  The commands
2688 19 jeremybenn
available, which may not be abbreviated, are:
2689
 
2690
`q'
2691
     Exit the simulator
2692
 
2693
`r'
2694 82 jeremybenn
     Display all the General Purpose Registers (GPRs).  Also shows the
2695 19 jeremybenn
     just executed and next to be executed instructions symbolically
2696
     and the state of the flag in the Supervision Register.
2697
 
2698
`t'
2699
     Execute the next instruction and then display register/instruction
2700
     information as with the `r' command (see above).
2701
 
2702
`run NUM [ hush ]'
2703 82 jeremybenn
     Execute NUM instructions.  The register/instruction information is
2704 19 jeremybenn
     displayed after each instruction, as with the `r' command (see
2705
     above) _unless_ `hush' is specified.
2706
 
2707
`pr REG VALUE'
2708
     Patch register REG with VALUE.
2709
 
2710
`dm FROMADDR [ TOADDR ]'
2711 82 jeremybenn
     Display memory bytes between FROMADDR and TOADDR.  If TOADDR is
2712
     not given, 64 bytes are displayed, starting at FROMADDR.
2713 19 jeremybenn
 
2714
          Caution: The output from this command is broken (a bug).
2715 82 jeremybenn
          Or1ksim attempts to print out 16 bytes per row.  However,
2716 19 jeremybenn
          instead of printing out the address at the start of each row,
2717
          it prints the address (of the first of the 16 bytes) before
2718
          _each_ byte.
2719
 
2720
`de FROMADDR [ TOADDR ]'
2721 82 jeremybenn
     Disassemble code between FROMADDR and TOADDR.  If TOADDR is not
2722 19 jeremybenn
     given, 16 instructions are disassembled.
2723
 
2724
     The disassembly is entirely numerical, and gives no symbolic
2725
     information.
2726
 
2727
`pm ADDR VALUE'
2728
     Patch the 4 bytes in memory starting at ADDR with the 32-bit VALUE.
2729
 
2730
`pc VALUE'
2731
     Patch the program counter with VALUE.
2732
 
2733
`cm FROMADDR TOADDR SIZE'
2734
     Copy SIZE bytes in memory from FROMADDR to TOADDR.
2735
 
2736
`break ADDR'
2737
     Toggle the breakpoint set at ADDR.
2738
 
2739
`breaks'
2740
     List all set breakpoints
2741
 
2742
`reset'
2743 82 jeremybenn
     Reset the simulator.  Includes modeling a reset of the processor,
2744
     so execution will restart from the reset vector location, 0x100.
2745 19 jeremybenn
 
2746
`hist'
2747
     If saving the execution history has been configured (*note
2748
     Simulator Behavior: Simulator Behavior.), display the execution
2749
     history.
2750
 
2751
`stall'
2752
     Stall the processor, so that control is passed to the debug unit.
2753 82 jeremybenn
     When stalled, the processor can execute no instructions.  This
2754 19 jeremybenn
     command is useful when debugging the JTAG interface, used by
2755
     debuggers such as GDB.
2756
 
2757
`unstall'
2758 82 jeremybenn
     Unstall the processor, so that normal execution can continue.
2759
     This command is useful when debugging the JTAG interface, used by
2760 19 jeremybenn
     debuggers such as GDB.
2761
 
2762
`stats CATEGORY | clear'
2763
     Print the statistics for the given CATEGORY, if available, or
2764 82 jeremybenn
     clear if `clear' is specified.  The categories are:
2765 19 jeremybenn
 
2766
    1
2767
          Miscellaneous statistics: branch predictions (if branch
2768
          predictions are enabled), branch target cache model (if
2769
          enabled), cache (if enbaled), MMU (if enabled) and number of
2770
          addtional load & store cycles.
2771
 
2772
          *Note Configuring the OpenRisc Achitectural Components: Core
2773
          OpenRISC Configuration, for details of how to enable these
2774
          various features.
2775
 
2776
    2
2777 82 jeremybenn
          Instruction usage statistics.  Requires hazard analysis to be
2778 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2779
 
2780
    3
2781 82 jeremybenn
          Instruction dependency statistics.  Requires hazard analysis
2782 19 jeremybenn
          to be enabled (*note CPU Configuration: CPU Configuration.).
2783
 
2784
    4
2785 82 jeremybenn
          Functional unit dependency statistics.  Requires hazard
2786 19 jeremybenn
          analysis to be enabled (*note CPU Configuration: CPU
2787
          Configuration.).
2788
 
2789
    5
2790 82 jeremybenn
          Raw register usage over time.  Requires hazard analysis to be
2791 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2792
 
2793
    6
2794 82 jeremybenn
          Store buffer statistics.  Requires the store buffer to be
2795 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2796
 
2797
 
2798
`info'
2799
     Display detailed information about the simulator configuration.
2800
     This is quite a lengthy about, because all MMU TLB information is
2801
     displayed.
2802
 
2803
`dv FROMADDR [ TOADDR ] [ MODULE ]'
2804
     Dump the area of memory between FROMADDR and TOADDR as Verilog
2805 82 jeremybenn
     code for a synchronous, 23-bit wide SRAM module, named MODULE.  If
2806 19 jeremybenn
     TOADDR is not specified, then 64 bytes are dumped (as 16 32-bit
2807 82 jeremybenn
     words).  If MODULE is not specified, `or1k_mem' is used.
2808 19 jeremybenn
 
2809
     To save to a file, use the redirection function (described after
2810
     this table, below).
2811
 
2812
`dh FROMADDR [ TOADDR ]'
2813
     Dump the area of memory between FROMADDR and TOADDR as 32-bit hex
2814 82 jeremybenn
     numbers (no `0x', or `32'h' prefix).  If TOADDR is not specified,
2815 19 jeremybenn
     then 64 bytes are dumped (as 16 32-bit words).
2816
 
2817
     To save to a file, use the redirection function (described after
2818
     this table, below).
2819
 
2820
`setdbch'
2821 82 jeremybenn
     Toggle debug channels on/off.  *Note Standalone Simulator:
2822 19 jeremybenn
     Standalone Simulator, for a description of specifying debug
2823
     channels on the command line.
2824
 
2825
`set SECTION PARAM = VALUE'
2826
     Set the configuration parameter PARA in section SECTION to VALUE.
2827
     *Note Configuration: Configuration, for details of configuration
2828
     parameters and their settings.
2829
 
2830
`debug'
2831 82 jeremybenn
     Toggle the simulator debug mode.  *Note Debug Interface
2832 19 jeremybenn
     Configuration: Debug Interface Configuration, for information on
2833
     this parameter.
2834
 
2835
          Caution: This is effectively enabling or disabling the debug
2836 82 jeremybenn
          unit.  It does not effect the remote GDB debug interface.
2837 19 jeremybenn
          However using the remote debug interface while the debug unit
2838
          is disabled will lead to undefined behavior and likely crash
2839
          Or1ksim
2840
 
2841
`cuc'
2842
     Enter the the Custom Unit Compiler command prompt (*note CUC
2843
     Configuration: CUC Configuration.).
2844
 
2845
          Caution: The CUC must be properly configured, for this to
2846 82 jeremybenn
          succeed.  In particular a timing file must be available and
2847
          readable.  Otherwise Or1ksim will crash.
2848 19 jeremybenn
 
2849
`help'
2850
     Print out brief information about each command available.
2851
 
2852
`mprofile [-vh] [-m M] [-g N] [-f FILE] FROM TO'
2853 82 jeremybenn
     Run the memory profiling utility.  This follows the same usage as
2854 19 jeremybenn
     the standalone command (*note Memory Profiling Utility: Memory
2855
     Profiling Utility.).
2856
 
2857
`profile [-vhcq] [-g FILE]'
2858 82 jeremybenn
     Run the instruction profiling utility.  This follows the same
2859
     usage as the standalone command (*note Profiling Utility:
2860
     Profiling Utility.).
2861 19 jeremybenn
 
2862
 
2863
For all commands, it is possible to redirect the output to a file, by
2864
using the redirection operator, `>'.
2865
 
2866
     COMMAND > FILENAME
2867
 
2868
This is particularly useful for commands dumping a large amount of
2869
output, such as `dv'.
2870
 
2871
     Caution: Unfortunately there is a serious bug with the redirection
2872 82 jeremybenn
     operator.  It does not return output to standard output after the
2873
     command completes.  Until this bug is fixed, file redirection
2874 19 jeremybenn
     should not be used.
2875
 
2876

2877
File: or1ksim.info,  Node: Verification API,  Next: Code Internals,  Prev: Interactive Command Line,  Up: Top
2878
 
2879
5 Verification API (VAPI)
2880
*************************
2881
 
2882
The Verification API (VAPI) provides a TCP/IP interface to allow
2883 82 jeremybenn
components of the simulation to be controlled externally.  The
2884
interface is polled for new requests on each simulated clock cycle.
2885
Components within the simulator may send responses to such requests.
2886 19 jeremybenn
 
2887 82 jeremybenn
The inteface is an asynchronous duplex protocol.  On the request side
2888
it provides for simple commands, known as VAPI IDs (a 32 bit integer),
2889
with a single piece of data (also a 32 bit integer).  On the send side,
2890
it provides for sending a single VAPI ID and data.  However there is no
2891
explicit command-response structure.  Some components just accept
2892
requests (e.g.  to set values), some just generate sends (to report
2893 19 jeremybenn
values), and some do both.
2894
 
2895
Each component has a base ID (32 bit) and its commands will start from
2896 82 jeremybenn
that base ID.  This provides a simple partitioning of the command space
2897
amongst components.  Request commands will be directed to the component
2898 19 jeremybenn
with the closest base ID lower than the VAPI ID of the command.
2899
 
2900
Thus if there are two components with base IDs of 0x200 and 0x300, and
2901
a request with VAPI ID of 0x203 is received, it will be directed to the
2902
first component as its command #3.
2903
 
2904
The results of VAPI interactions are logged (by default in `vapi.log'
2905
unless an alternative is specified in `section vapi').
2906
 
2907
Currently the following components support VAPI:
2908
 
2909
Debug Unit
2910
     Although the Debug Unit can specify a base VAPI ID, it is not used
2911
     to send commands or receive requests.
2912
 
2913
     Instead, if the base VAPI ID is set, all remote JTAG protocol
2914
     exchanges are logged in the VAPI log file.
2915
 
2916
UART
2917
     If a base VAPI ID is specified, the UART sends details of any
2918
     chars or break characters sent, with dteails of the line control
2919
     register etc encoded in the data packet sent.
2920
 
2921
     This supports a single VAPI command request, but encodes a
2922
     sub-command in the top 8 bits of the associated data.
2923
 
2924
    `0x00'
2925
          This stuffs the least significant 8 bits of the data into the
2926
          serial register of the UART and the next 8 bits into the line
2927
          control register, effectively providing control of the next
2928
          character to be sent or received.
2929
 
2930
    `0x01'
2931
          The divisor latch bytes are set from the least significant 16
2932
          bits of the data.
2933
 
2934
    `0x02'
2935
          The line control register is set from bits 15-8 of the data.
2936
 
2937
    `0x03'
2938
          The UART skew is set from the least significant 16 bits of
2939
          the data
2940
 
2941
    `0x04'
2942
          If the 16th most significant bit of the data is 1, start
2943 82 jeremybenn
          sending breaks, otherwise stop sending breaks.  The breaks
2944
          are sent or cleared after the number of UART clock divider
2945
          ticks specified by the data (immediately if the data is zero).
2946 19 jeremybenn
 
2947
 
2948
DMA
2949
     Although the DMA unit supports a base VAPI ID in its configuration
2950
     (`section dma'), no VAPI data is sent, nor VAPI requests currently
2951
     implemented.
2952
 
2953
Ethernet
2954 82 jeremybenn
     The following requests are handled by the Ethernet.  Specified
2955 19 jeremybenn
     symbolically, these are the increments from the base VAPI ID of the
2956 82 jeremybenn
     Ethernet.  At present no implementation is provided behind these
2957 19 jeremybenn
     VAPI requests.
2958
 
2959
    `ETH_VAPI_DATA (0)'
2960
 
2961
    `ETH_VAPI_CTRL (0)'
2962
 
2963
GPIO
2964
     If a base VAPI ID is specified, the GPIO sends out on its base
2965
     VAPI ID (symbolically, GPIO_VAPI_DATA (0) offset from the base
2966
     VAPI ID) any changes in outputs.
2967
 
2968 82 jeremybenn
     The following requests are handled by the GPIO.  Specified
2969 19 jeremybenn
     symbolically, these are the increments from the VAPI base ID of the
2970
     GPIO.
2971
 
2972
    `GPIO_VAPI_DATA (0)'
2973
          Set the next input to the commands data field
2974
 
2975
    `GPIO_VAPI_AUX (1)'
2976
          Set the GPIO auxiliary inputs to the data field
2977
 
2978
    `GPIO_VAPI_CLOCK (2)'
2979
          Add an external GPIO clock trigger of period specified in the
2980
          data field.
2981
 
2982
    `GPIO_VAPI_RGPIO_OE (3)'
2983
          Set the GPIO output enable to the data field
2984
 
2985
    `GPIO_VAPI_RGPIO_INTE (4)'
2986
          Set the next interrupt to the data field
2987
 
2988
    `GPIO_VAPI_RGPIO_PTRIG (5)'
2989
          Set the next trigger to the data field
2990
 
2991
    `GPIO_VAPI_RGPIO_AUX (6)'
2992
          Set the next auxiliary input to the data field
2993
 
2994
    `GPIO_VAPI_RGPIO_CTRL (7)'
2995
          Set th next control input to the data field
2996
 
2997
 
2998
 
2999

3000
File: or1ksim.info,  Node: Code Internals,  Next: GNU Free Documentation License,  Prev: Verification API,  Up: Top
3001
 
3002
6 A Guide to Or1ksim Internals
3003
******************************
3004
 
3005 82 jeremybenn
These are notes to help those wanting to extend Or1ksim.  This section
3006 19 jeremybenn
assumes the use of a tag file, so file locations of entities'
3007 82 jeremybenn
definitions are not in general provided.  For more on tags, see the
3008
Linux manual page for `etags'.  A tag file can be created with:
3009 19 jeremybenn
 
3010
     make tags
3011
 
3012
* Menu:
3013
 
3014
* Coding Conventions::
3015
* Global Data Structures::
3016
* Concepts::
3017
* Internal Debugging::
3018 104 jeremybenn
* Regression Testing::
3019 19 jeremybenn
 
3020

3021
File: or1ksim.info,  Node: Coding Conventions,  Next: Global Data Structures,  Up: Code Internals
3022
 
3023
6.1 Coding Conventions for Or1ksim
3024
==================================
3025
 
3026
This chapter provides some guidelines for coding, to facilitate
3027
extensions to Or1ksim
3028
 
3029
_GNU Coding Standard_
3030
     Code should follow the GNU coding standard for C
3031 82 jeremybenn
     (`http://www.gnu.org/prep/standards/'.  If in doubt, put your code
3032 19 jeremybenn
     through the `indent' program.
3033
 
3034
_`#include' headers_
3035
     All C source code files should include `config.h' before any other
3036
     file.
3037
 
3038
     This should be followed by inclusion of any system headers (but see
3039
     the comments about portability and `port.h' below) and then by any
3040
     Or1ksim package headers.
3041
 
3042
     If `port.h' is required, it should be the first package header to
3043
     be included after the system headers.
3044
 
3045
     All C source code and header files should directly include any
3046 82 jeremybenn
     system or package header they depend on, i.e.  not rely on any
3047
     other header having already included it.  The two exceptions are
3048 19 jeremybenn
 
3049
       1. All header files may assume that `config.h' has already been
3050
          included.
3051
 
3052
       2. System headers which impose portability problems should be
3053
          included by using the package header `port.h', rather than
3054 82 jeremybenn
          the system headers themselves.  This is the case for code
3055 19 jeremybenn
          requiring
3056
 
3057
             * `strndup' (from `string.h')
3058
 
3059
             * Integer types (`intN_t', `uintN_t') (from `inttypes.h').
3060
 
3061
             * `isblank' (from `ctype.h')
3062
 
3063
 
3064
 
3065
_`#include' files once only_
3066
     All include files should be protected by `#ifndef' to ensure their
3067 82 jeremybenn
     definitions are only included once.  For instance a header file
3068 19 jeremybenn
     `X-Y.H' should surround its contents with:
3069
 
3070
          #ifndef X_Y__H
3071
          #define X_Y__H
3072
 
3073
          
3074
 
3075
          #endif  /* X_Y__H */
3076
 
3077
_Avoid `typedef'_
3078
     The GNU coding style for C does not have a clear way to distinguish
3079 82 jeremybenn
     between user type name and user variables.  For this reason
3080 19 jeremybenn
     `typedef' should be avoided except for the most ubiquitous user
3081 82 jeremybenn
     defined types.  This makes the code much easier to read.
3082 19 jeremybenn
 
3083
     There are some `typedef' declarations in the `argtable2' library
3084
     and the ELF and COFF headers, because this code is taken from
3085
     other places.
3086
 
3087
     Within Or1ksim legacy uses of `typedef' have largely been purged,
3088
     except in the Custom Unit Compiler (*note Custom Unit Compiler
3089
     (CUC) Configuration: CUC Configuration.).
3090
 
3091
     The remaining uses of `typedef' occur in two places:
3092
 
3093
        * `port/port.h' defines types to replace those in header files
3094
          that are not available (character functions, string
3095
          duplication, integer types).
3096
 
3097
          `cpu/or1k/arch.h' defines types for the key Or1ksim entities:
3098
          addresses (`oraddr_t'), unsigned register values (`uorreg_t')
3099
          and signed register (`orreg_t') values.
3100
 
3101
 
3102
     Where new types are defined, they should appear in one of these two
3103 82 jeremybenn
     files as appropriate.  Or1ksim specific types appearing in
3104
     `arch.h' should always have the suffix `_h'.
3105 19 jeremybenn
 
3106
_Don't begin names with underscore_
3107
     Names beginning with `_' are intended to be part of the C
3108 82 jeremybenn
     infrastructure.  They should not be used in the simulator code.
3109 19 jeremybenn
 
3110
_Keep Non-global top level entities static_
3111
     All top level entities (functions, variables), which are not
3112
     explicitly part of a global interface should be declared static.
3113
     This ensures that unwanted connections are not inadvertently built
3114
     across the program.
3115
 
3116
_Use of `inline'_
3117 82 jeremybenn
     Code should not be declared `inline'.  Modern compilers can work
3118 19 jeremybenn
     out for themselves what is best in this respect.
3119
 
3120
_Initialization_
3121 82 jeremybenn
     All data structures should be explicitly initialized.  In
3122
     particular code should not rely on static data structures being
3123
     initialized to zero.
3124 19 jeremybenn
 
3125
     The rationale is that in future static data structures may become
3126 82 jeremybenn
     dynamic.  This has been a particular source of bugs in Or1ksim
3127 19 jeremybenn
     historically.
3128
 
3129
     A specific case is with new peripherals, which should always
3130
     include a `start' function to pre-initialize all configuration
3131
     parameters to sensible defaults
3132
 
3133
_Configuration Validation_
3134
     All configuration values should be validated, preferably when
3135
     encountered, if not when the `section' is closed, or otherwise at
3136
     run time when the parameter is first used.
3137
 
3138
 
3139

3140
File: or1ksim.info,  Node: Global Data Structures,  Next: Concepts,  Prev: Coding Conventions,  Up: Code Internals
3141
 
3142
6.2 Global Data Structures
3143
==========================
3144
 
3145
`config'
3146
     The global variable `config' of type `struct config' holds the
3147
     configuration data for some of the Or1ksim components which are
3148 82 jeremybenn
     always present.  At present the components are:
3149 19 jeremybenn
 
3150
        * The simulator defined in `section sim' (*note Simulator
3151
          Configuration: Simulator Configuration.).
3152
 
3153
        * The Verification API (VAPI) defined  in `section vapi' (*note
3154
          Verification API (VAPI) Configuration: Verification API
3155
          Configuration.).
3156
 
3157
        * The Custom Unit Compiler (CUC), defined in `section cuc'
3158
          (*note Custom Unit Compiler (CUC) Configuration: CUC
3159
          Configuration.).
3160
 
3161
        * The CPU, defined in `section cpu' (*note CPU Configuration:
3162
          CPU Configuration.).
3163
 
3164
        * The data cache (but not the instruction cache), defined in
3165
          `section dc' (*note Cache Configuration: Cache
3166
          Configuration.).
3167
 
3168
        * The power management unit, defined in `section pm' (*note
3169
          Power Management Configuration: Power Management
3170
          Configuration.).
3171
 
3172
        * The programmable interrupt controller, defined in
3173
          `section pic' (*note Interrupt Configuration: Interrupt
3174
          Configuration.).
3175
 
3176
        * Branch prediciton, defined in `section bpb' (*note Branch
3177
          Prediction Configuration: Branch Prediction Configuration.).
3178
 
3179
        * The debug unit, defined in `section debug' (*note Debug
3180
          Interface Configuration: Debug Interface Configuration.).
3181
 
3182
 
3183
     This struct is made of a collection of structs, one for each
3184 82 jeremybenn
     component.  For example the simulator configuration is held in
3185 19 jeremybenn
     `config.sim'.
3186
 
3187
`config'
3188
     This is a linked list of data structures holding configuration data
3189
     for all sections which are not held in the main `config' data
3190 82 jeremybenn
     structure.  In general these are components (such as peripherals
3191
     and memory) which may occur multiple times.  However it also
3192
     handles some architectural components which may occur only once,
3193
     such as the memory management units, the instruction cache, the
3194
     interrupt controller and branch prediction.
3195 19 jeremybenn
 
3196
`runtime'
3197
     The global variable `runtime' of type `struct runtime' holds all
3198 82 jeremybenn
     the runtime information about the simulation.  To access this
3199 19 jeremybenn
     variable, `sim-config.h' must be included.
3200
 
3201
     This struct is itself made of 3 other structs, `cpu' (for CPU run
3202
     time state), `vapi' (for Verification API state) and `cuc' (for
3203
     Custom Unit Compiler state).
3204
 
3205
 
3206

3207
File: or1ksim.info,  Node: Concepts,  Next: Internal Debugging,  Prev: Global Data Structures,  Up: Code Internals
3208
 
3209
6.3 Concepts
3210
============
3211
 
3212
_Output Redirection_
3213 82 jeremybenn
     The current output stream is held in `runtime.cpu.fout'.  Output
3214 19 jeremybenn
     should be explicitly written to this stream, or may use the
3215
     `PRINTF' macro, which will write its arguments to this output
3216
     stream.
3217
 
3218
_Reset Hooks_
3219
     Any peripheral may register a routine to be called when the the
3220
     processor is reset by calling `reg_sim_reset', providing a
3221 82 jeremybenn
     function and pointer to a data structure as arguments.  On reset
3222 19 jeremybenn
     that function will be called with the data stucture pointer as
3223
     argument.
3224
 
3225 432 jeremybenn
_Interrupts_
3226
     An internal peripheral can model the effect of an interrupt being
3227
     asserted by calling `report_interrupt'.  This is used for both edge
3228
     and level sensitive interrupts.
3229 19 jeremybenn
 
3230 432 jeremybenn
     The effect is to set the corresponding bit in the PICSR SPR and to
3231
     queue an interrupt exception to take place after the current
3232
     instruction completes execution.
3233
 
3234
     Externally, the different interrupts require different mechanisms
3235
     for clearing.  Level sensitive interrupts should be cleared by
3236
     deasserting the interrupt line, edge sensitive interrupts by
3237
     clearing the corresponding bit in the PICSR SPR.
3238
 
3239
     Internally this amounts to the same thing (clearing the PICSPR
3240
     bit), so a single function is provided, `clear_interrupt'.  Note
3241
     however that when level sensitive interrupts are configured, PICSR
3242
     is read only, and can only be cleared by calling
3243
     `clear_interrupt'.  Using the two functions provided will ensure
3244
     the peripheral works correctly whichever type of interrupt is used.
3245
 
3246
          Note: Until an interrupt is cleared, all subsequent
3247
          interrupts are ignored with a warning.
3248
 
3249
 
3250 19 jeremybenn

3251 104 jeremybenn
File: or1ksim.info,  Node: Internal Debugging,  Next: Regression Testing,  Prev: Concepts,  Up: Code Internals
3252 19 jeremybenn
 
3253
6.4 Internal Debugging
3254
======================
3255
 
3256
The function `debug' is like `printf', but with an extra first
3257 82 jeremybenn
argument, which is the debug level.  If the debug level specified in
3258
the simulator configuration (*note Simulator Behavior: Simulator
3259
Behavior.) is greater than or equal to this value, the remaining
3260
arguments are printed to the current output stream (*note Output
3261
Redirection: Output Redirection.).
3262 19 jeremybenn
 
3263

3264 104 jeremybenn
File: or1ksim.info,  Node: Regression Testing,  Prev: Internal Debugging,  Up: Code Internals
3265
 
3266
6.5 Regression Testing
3267
======================
3268
 
3269
Or1ksim now includes a regression test suite for both standalone and
3270
library usage as described earlier (*note Building and Installing:
3271
Build and Install.).  Running the tests requires that the OpenRISC
3272
toolchain and DejaGNU are both installed.
3273
 
3274
Tests are written using `expect', a derivative of TCL.  Documentation
3275
of DejaGnu, `expect' and TCL are freely available on the Web.  The
3276
Embecosm Application Note 8, `Howto: Using DejaGnu for Testing: A
3277
Simple Introduction' (`http://www.embecosm.com/download/ean8.html')
3278
provides a concise introduction.
3279
 
3280
All test code is found in the `testsuite' directory.  The key files and
3281
directories used are as follows.
3282
 
3283
`global-conf.exp'
3284
     This is the global DejaGNU configuration file used to set up
3285
     parameters common to all tests.  If the user has the environment
3286
     varialbe `DEJAGNU' defined, it will be used instead, but this is
3287
     not recommended.
3288
 
3289
`Makefile.am'
3290
     This is the top level `automake' file for the testsuite.  The only
3291
     changes likely to be needed here is additional local cleanup of
3292
     files created by new tests.
3293
 
3294
`README'
3295
     This contains details of all the tests
3296
 
3297
`config'
3298
     This contains DejaGnu board configurations.  Since the tests are
3299
     generally run on a Unix host, this should just contain `Unix.exp'.
3300
 
3301
`lib'
3302
     This contains DejaGnu tool specific configurations.  "Tool" has a
3303
     specific meaning in DejaGNU, referring just to a grouping of
3304
     tests.  In this case there are two such "tools", "or1ksim" and
3305
     "libsim" for tests of the standalone tool and tests of the library.
3306
 
3307
     Corresponding to this, there are two tool specific configuration
3308
     files, `or1ksim.exp' and `libsim.exp'.  These contain `expect'/TCL
3309
     procedures for common use among the tests.
3310
 
3311
`libsim.tests'
3312
`or1ksim.tests'
3313
     These are the directories of tests of the Or1ksim library.  They
3314
     also include Or1ksim configuration files and each has a
3315
     `Makefile.am' file.  `Makefile.am' should be updated whenever
3316
     files are added to this directory, to ensure they are included in
3317
     the distribution.
3318
 
3319
`test-code'
3320
     These are all the test programs to be compiled on the host (each
3321
     in its own directory).  In general these are programs to support
3322
     testing of the library, and build various programs linking in the
3323
     library.
3324
 
3325
`test-code'
3326
     These are all the test programs to be compiled with the OpenRISC
3327
     tool chain to run with either standalone Or1ksim or the library.
3328
     This directory includes its own `configure.ac', since it must set
3329
     up a separate tool chain based on the target, not the host.
3330
 
3331
 
3332
To add a new test needs the following steps.
3333
 
3334 346 jeremybenn
   * Put new host C code in its own directory within `test-code'.  Add
3335 104 jeremybenn
     the directory to the existing `Makefile.am' in the `test-code'
3336
     directory and create a `Makefile.am' in the new directory to drive
3337 346 jeremybenn
     building the test program(s).  Don't forget to add the new
3338 104 jeremybenn
     `Makefile' to the top level `configure.ac' so it gets generated.
3339
     Not all tests require code here.
3340
 
3341 346 jeremybenn
   * Put new target C code in its own directory within `test-code-or1k'.
3342
     Once again modify & create `Makefile.am'.  This time modify the
3343
     `configure.ac' in the `test-code-or1k' so the `Makefile' gets
3344
     generated.  The existing programs provide examples to start from,
3345
     including custom linker scripts where needed.
3346 104 jeremybenn
 
3347
   * Add one or more tests and configuration files to the relevant
3348 346 jeremybenn
     "tool" test directory.  Use the existing tests as templates.  They
3349 104 jeremybenn
     make heavy use of the `expect'/TCL procedures in the `config'
3350
     directory to facilitate driving the tests.
3351
 
3352
 
3353

3354 19 jeremybenn
File: or1ksim.info,  Node: GNU Free Documentation License,  Next: Index,  Prev: Code Internals,  Up: Top
3355
 
3356
7 GNU Free Documentation License
3357
********************************
3358
 
3359
                      Version 1.2, November 2002
3360
 
3361
     Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
3362
     51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
3363
 
3364
     Everyone is permitted to copy and distribute verbatim copies
3365
     of this license document, but changing it is not allowed.
3366
 
3367
  0. PREAMBLE
3368
 
3369
     The purpose of this License is to make a manual, textbook, or other
3370
     functional and useful document "free" in the sense of freedom: to
3371
     assure everyone the effective freedom to copy and redistribute it,
3372
     with or without modifying it, either commercially or
3373
     noncommercially.  Secondarily, this License preserves for the
3374
     author and publisher a way to get credit for their work, while not
3375
     being considered responsible for modifications made by others.
3376
 
3377
     This License is a kind of "copyleft", which means that derivative
3378
     works of the document must themselves be free in the same sense.
3379
     It complements the GNU General Public License, which is a copyleft
3380
     license designed for free software.
3381
 
3382
     We have designed this License in order to use it for manuals for
3383
     free software, because free software needs free documentation: a
3384
     free program should come with manuals providing the same freedoms
3385
     that the software does.  But this License is not limited to
3386
     software manuals; it can be used for any textual work, regardless
3387
     of subject matter or whether it is published as a printed book.
3388
     We recommend this License principally for works whose purpose is
3389
     instruction or reference.
3390
 
3391
  1. APPLICABILITY AND DEFINITIONS
3392
 
3393
     This License applies to any manual or other work, in any medium,
3394
     that contains a notice placed by the copyright holder saying it
3395
     can be distributed under the terms of this License.  Such a notice
3396
     grants a world-wide, royalty-free license, unlimited in duration,
3397
     to use that work under the conditions stated herein.  The
3398
     "Document", below, refers to any such manual or work.  Any member
3399
     of the public is a licensee, and is addressed as "you".  You
3400
     accept the license if you copy, modify or distribute the work in a
3401
     way requiring permission under copyright law.
3402
 
3403
     A "Modified Version" of the Document means any work containing the
3404
     Document or a portion of it, either copied verbatim, or with
3405
     modifications and/or translated into another language.
3406
 
3407
     A "Secondary Section" is a named appendix or a front-matter section
3408
     of the Document that deals exclusively with the relationship of the
3409
     publishers or authors of the Document to the Document's overall
3410
     subject (or to related matters) and contains nothing that could
3411
     fall directly within that overall subject.  (Thus, if the Document
3412
     is in part a textbook of mathematics, a Secondary Section may not
3413
     explain any mathematics.)  The relationship could be a matter of
3414
     historical connection with the subject or with related matters, or
3415
     of legal, commercial, philosophical, ethical or political position
3416
     regarding them.
3417
 
3418
     The "Invariant Sections" are certain Secondary Sections whose
3419
     titles are designated, as being those of Invariant Sections, in
3420
     the notice that says that the Document is released under this
3421
     License.  If a section does not fit the above definition of
3422
     Secondary then it is not allowed to be designated as Invariant.
3423
     The Document may contain zero Invariant Sections.  If the Document
3424
     does not identify any Invariant Sections then there are none.
3425
 
3426
     The "Cover Texts" are certain short passages of text that are
3427
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
3428
     that says that the Document is released under this License.  A
3429
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
3430
     be at most 25 words.
3431
 
3432
     A "Transparent" copy of the Document means a machine-readable copy,
3433
     represented in a format whose specification is available to the
3434
     general public, that is suitable for revising the document
3435
     straightforwardly with generic text editors or (for images
3436
     composed of pixels) generic paint programs or (for drawings) some
3437
     widely available drawing editor, and that is suitable for input to
3438
     text formatters or for automatic translation to a variety of
3439
     formats suitable for input to text formatters.  A copy made in an
3440
     otherwise Transparent file format whose markup, or absence of
3441
     markup, has been arranged to thwart or discourage subsequent
3442
     modification by readers is not Transparent.  An image format is
3443
     not Transparent if used for any substantial amount of text.  A
3444
     copy that is not "Transparent" is called "Opaque".
3445
 
3446
     Examples of suitable formats for Transparent copies include plain
3447
     ASCII without markup, Texinfo input format, LaTeX input format,
3448
     SGML or XML using a publicly available DTD, and
3449
     standard-conforming simple HTML, PostScript or PDF designed for
3450
     human modification.  Examples of transparent image formats include
3451
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
3452
     can be read and edited only by proprietary word processors, SGML or
3453
     XML for which the DTD and/or processing tools are not generally
3454
     available, and the machine-generated HTML, PostScript or PDF
3455
     produced by some word processors for output purposes only.
3456
 
3457
     The "Title Page" means, for a printed book, the title page itself,
3458
     plus such following pages as are needed to hold, legibly, the
3459
     material this License requires to appear in the title page.  For
3460
     works in formats which do not have any title page as such, "Title
3461
     Page" means the text near the most prominent appearance of the
3462
     work's title, preceding the beginning of the body of the text.
3463
 
3464
     A section "Entitled XYZ" means a named subunit of the Document
3465
     whose title either is precisely XYZ or contains XYZ in parentheses
3466
     following text that translates XYZ in another language.  (Here XYZ
3467
     stands for a specific section name mentioned below, such as
3468
     "Acknowledgements", "Dedications", "Endorsements", or "History".)
3469
     To "Preserve the Title" of such a section when you modify the
3470
     Document means that it remains a section "Entitled XYZ" according
3471
     to this definition.
3472
 
3473
     The Document may include Warranty Disclaimers next to the notice
3474
     which states that this License applies to the Document.  These
3475
     Warranty Disclaimers are considered to be included by reference in
3476
     this License, but only as regards disclaiming warranties: any other
3477
     implication that these Warranty Disclaimers may have is void and
3478
     has no effect on the meaning of this License.
3479
 
3480
  2. VERBATIM COPYING
3481
 
3482
     You may copy and distribute the Document in any medium, either
3483
     commercially or noncommercially, provided that this License, the
3484
     copyright notices, and the license notice saying this License
3485
     applies to the Document are reproduced in all copies, and that you
3486
     add no other conditions whatsoever to those of this License.  You
3487
     may not use technical measures to obstruct or control the reading
3488
     or further copying of the copies you make or distribute.  However,
3489
     you may accept compensation in exchange for copies.  If you
3490
     distribute a large enough number of copies you must also follow
3491
     the conditions in section 3.
3492
 
3493
     You may also lend copies, under the same conditions stated above,
3494
     and you may publicly display copies.
3495
 
3496
  3. COPYING IN QUANTITY
3497
 
3498
     If you publish printed copies (or copies in media that commonly
3499
     have printed covers) of the Document, numbering more than 100, and
3500
     the Document's license notice requires Cover Texts, you must
3501
     enclose the copies in covers that carry, clearly and legibly, all
3502
     these Cover Texts: Front-Cover Texts on the front cover, and
3503
     Back-Cover Texts on the back cover.  Both covers must also clearly
3504
     and legibly identify you as the publisher of these copies.  The
3505
     front cover must present the full title with all words of the
3506
     title equally prominent and visible.  You may add other material
3507
     on the covers in addition.  Copying with changes limited to the
3508
     covers, as long as they preserve the title of the Document and
3509
     satisfy these conditions, can be treated as verbatim copying in
3510
     other respects.
3511
 
3512
     If the required texts for either cover are too voluminous to fit
3513
     legibly, you should put the first ones listed (as many as fit
3514
     reasonably) on the actual cover, and continue the rest onto
3515
     adjacent pages.
3516
 
3517
     If you publish or distribute Opaque copies of the Document
3518
     numbering more than 100, you must either include a
3519
     machine-readable Transparent copy along with each Opaque copy, or
3520
     state in or with each Opaque copy a computer-network location from
3521
     which the general network-using public has access to download
3522
     using public-standard network protocols a complete Transparent
3523
     copy of the Document, free of added material.  If you use the
3524
     latter option, you must take reasonably prudent steps, when you
3525
     begin distribution of Opaque copies in quantity, to ensure that
3526
     this Transparent copy will remain thus accessible at the stated
3527
     location until at least one year after the last time you
3528
     distribute an Opaque copy (directly or through your agents or
3529
     retailers) of that edition to the public.
3530
 
3531
     It is requested, but not required, that you contact the authors of
3532
     the Document well before redistributing any large number of
3533
     copies, to give them a chance to provide you with an updated
3534
     version of the Document.
3535
 
3536
  4. MODIFICATIONS
3537
 
3538
     You may copy and distribute a Modified Version of the Document
3539
     under the conditions of sections 2 and 3 above, provided that you
3540
     release the Modified Version under precisely this License, with
3541
     the Modified Version filling the role of the Document, thus
3542
     licensing distribution and modification of the Modified Version to
3543
     whoever possesses a copy of it.  In addition, you must do these
3544
     things in the Modified Version:
3545
 
3546
       A. Use in the Title Page (and on the covers, if any) a title
3547
          distinct from that of the Document, and from those of
3548
          previous versions (which should, if there were any, be listed
3549
          in the History section of the Document).  You may use the
3550
          same title as a previous version if the original publisher of
3551
          that version gives permission.
3552
 
3553
       B. List on the Title Page, as authors, one or more persons or
3554
          entities responsible for authorship of the modifications in
3555
          the Modified Version, together with at least five of the
3556
          principal authors of the Document (all of its principal
3557
          authors, if it has fewer than five), unless they release you
3558
          from this requirement.
3559
 
3560
       C. State on the Title page the name of the publisher of the
3561
          Modified Version, as the publisher.
3562
 
3563
       D. Preserve all the copyright notices of the Document.
3564
 
3565
       E. Add an appropriate copyright notice for your modifications
3566
          adjacent to the other copyright notices.
3567
 
3568
       F. Include, immediately after the copyright notices, a license
3569
          notice giving the public permission to use the Modified
3570
          Version under the terms of this License, in the form shown in
3571
          the Addendum below.
3572
 
3573
       G. Preserve in that license notice the full lists of Invariant
3574
          Sections and required Cover Texts given in the Document's
3575
          license notice.
3576
 
3577
       H. Include an unaltered copy of this License.
3578
 
3579
       I. Preserve the section Entitled "History", Preserve its Title,
3580
          and add to it an item stating at least the title, year, new
3581
          authors, and publisher of the Modified Version as given on
3582
          the Title Page.  If there is no section Entitled "History" in
3583
          the Document, create one stating the title, year, authors,
3584
          and publisher of the Document as given on its Title Page,
3585
          then add an item describing the Modified Version as stated in
3586
          the previous sentence.
3587
 
3588
       J. Preserve the network location, if any, given in the Document
3589
          for public access to a Transparent copy of the Document, and
3590
          likewise the network locations given in the Document for
3591
          previous versions it was based on.  These may be placed in
3592
          the "History" section.  You may omit a network location for a
3593
          work that was published at least four years before the
3594
          Document itself, or if the original publisher of the version
3595
          it refers to gives permission.
3596
 
3597
       K. For any section Entitled "Acknowledgements" or "Dedications",
3598
          Preserve the Title of the section, and preserve in the
3599
          section all the substance and tone of each of the contributor
3600
          acknowledgements and/or dedications given therein.
3601
 
3602
       L. Preserve all the Invariant Sections of the Document,
3603
          unaltered in their text and in their titles.  Section numbers
3604
          or the equivalent are not considered part of the section
3605
          titles.
3606
 
3607
       M. Delete any section Entitled "Endorsements".  Such a section
3608
          may not be included in the Modified Version.
3609
 
3610
       N. Do not retitle any existing section to be Entitled
3611
          "Endorsements" or to conflict in title with any Invariant
3612
          Section.
3613
 
3614
       O. Preserve any Warranty Disclaimers.
3615
 
3616
     If the Modified Version includes new front-matter sections or
3617
     appendices that qualify as Secondary Sections and contain no
3618
     material copied from the Document, you may at your option
3619
     designate some or all of these sections as invariant.  To do this,
3620
     add their titles to the list of Invariant Sections in the Modified
3621
     Version's license notice.  These titles must be distinct from any
3622
     other section titles.
3623
 
3624
     You may add a section Entitled "Endorsements", provided it contains
3625
     nothing but endorsements of your Modified Version by various
3626
     parties--for example, statements of peer review or that the text
3627
     has been approved by an organization as the authoritative
3628
     definition of a standard.
3629
 
3630
     You may add a passage of up to five words as a Front-Cover Text,
3631
     and a passage of up to 25 words as a Back-Cover Text, to the end
3632
     of the list of Cover Texts in the Modified Version.  Only one
3633
     passage of Front-Cover Text and one of Back-Cover Text may be
3634
     added by (or through arrangements made by) any one entity.  If the
3635
     Document already includes a cover text for the same cover,
3636
     previously added by you or by arrangement made by the same entity
3637
     you are acting on behalf of, you may not add another; but you may
3638
     replace the old one, on explicit permission from the previous
3639
     publisher that added the old one.
3640
 
3641
     The author(s) and publisher(s) of the Document do not by this
3642
     License give permission to use their names for publicity for or to
3643
     assert or imply endorsement of any Modified Version.
3644
 
3645
  5. COMBINING DOCUMENTS
3646
 
3647
     You may combine the Document with other documents released under
3648
     this License, under the terms defined in section 4 above for
3649
     modified versions, provided that you include in the combination
3650
     all of the Invariant Sections of all of the original documents,
3651
     unmodified, and list them all as Invariant Sections of your
3652
     combined work in its license notice, and that you preserve all
3653
     their Warranty Disclaimers.
3654
 
3655
     The combined work need only contain one copy of this License, and
3656
     multiple identical Invariant Sections may be replaced with a single
3657
     copy.  If there are multiple Invariant Sections with the same name
3658
     but different contents, make the title of each such section unique
3659
     by adding at the end of it, in parentheses, the name of the
3660
     original author or publisher of that section if known, or else a
3661
     unique number.  Make the same adjustment to the section titles in
3662
     the list of Invariant Sections in the license notice of the
3663
     combined work.
3664
 
3665
     In the combination, you must combine any sections Entitled
3666
     "History" in the various original documents, forming one section
3667
     Entitled "History"; likewise combine any sections Entitled
3668
     "Acknowledgements", and any sections Entitled "Dedications".  You
3669
     must delete all sections Entitled "Endorsements."
3670
 
3671
  6. COLLECTIONS OF DOCUMENTS
3672
 
3673
     You may make a collection consisting of the Document and other
3674
     documents released under this License, and replace the individual
3675
     copies of this License in the various documents with a single copy
3676
     that is included in the collection, provided that you follow the
3677
     rules of this License for verbatim copying of each of the
3678
     documents in all other respects.
3679
 
3680
     You may extract a single document from such a collection, and
3681
     distribute it individually under this License, provided you insert
3682
     a copy of this License into the extracted document, and follow
3683
     this License in all other respects regarding verbatim copying of
3684
     that document.
3685
 
3686
  7. AGGREGATION WITH INDEPENDENT WORKS
3687
 
3688
     A compilation of the Document or its derivatives with other
3689
     separate and independent documents or works, in or on a volume of
3690
     a storage or distribution medium, is called an "aggregate" if the
3691
     copyright resulting from the compilation is not used to limit the
3692
     legal rights of the compilation's users beyond what the individual
3693
     works permit.  When the Document is included in an aggregate, this
3694
     License does not apply to the other works in the aggregate which
3695
     are not themselves derivative works of the Document.
3696
 
3697
     If the Cover Text requirement of section 3 is applicable to these
3698
     copies of the Document, then if the Document is less than one half
3699
     of the entire aggregate, the Document's Cover Texts may be placed
3700
     on covers that bracket the Document within the aggregate, or the
3701
     electronic equivalent of covers if the Document is in electronic
3702
     form.  Otherwise they must appear on printed covers that bracket
3703
     the whole aggregate.
3704
 
3705
  8. TRANSLATION
3706
 
3707
     Translation is considered a kind of modification, so you may
3708
     distribute translations of the Document under the terms of section
3709
     4.  Replacing Invariant Sections with translations requires special
3710
     permission from their copyright holders, but you may include
3711
     translations of some or all Invariant Sections in addition to the
3712
     original versions of these Invariant Sections.  You may include a
3713
     translation of this License, and all the license notices in the
3714
     Document, and any Warranty Disclaimers, provided that you also
3715
     include the original English version of this License and the
3716
     original versions of those notices and disclaimers.  In case of a
3717
     disagreement between the translation and the original version of
3718
     this License or a notice or disclaimer, the original version will
3719
     prevail.
3720
 
3721
     If a section in the Document is Entitled "Acknowledgements",
3722
     "Dedications", or "History", the requirement (section 4) to
3723
     Preserve its Title (section 1) will typically require changing the
3724
     actual title.
3725
 
3726
  9. TERMINATION
3727
 
3728
     You may not copy, modify, sublicense, or distribute the Document
3729
     except as expressly provided for under this License.  Any other
3730
     attempt to copy, modify, sublicense or distribute the Document is
3731
     void, and will automatically terminate your rights under this
3732
     License.  However, parties who have received copies, or rights,
3733
     from you under this License will not have their licenses
3734
     terminated so long as such parties remain in full compliance.
3735
 
3736
 10. FUTURE REVISIONS OF THIS LICENSE
3737
 
3738
     The Free Software Foundation may publish new, revised versions of
3739
     the GNU Free Documentation License from time to time.  Such new
3740
     versions will be similar in spirit to the present version, but may
3741
     differ in detail to address new problems or concerns.  See
3742
     `http://www.gnu.org/copyleft/'.
3743
 
3744
     Each version of the License is given a distinguishing version
3745
     number.  If the Document specifies that a particular numbered
3746
     version of this License "or any later version" applies to it, you
3747
     have the option of following the terms and conditions either of
3748
     that specified version or of any later version that has been
3749
     published (not as a draft) by the Free Software Foundation.  If
3750
     the Document does not specify a version number of this License,
3751
     you may choose any version ever published (not as a draft) by the
3752
     Free Software Foundation.
3753
 
3754
ADDENDUM: How to use this License for your documents
3755
====================================================
3756
 
3757
To use this License in a document you have written, include a copy of
3758
the License in the document and put the following copyright and license
3759
notices just after the title page:
3760
 
3761
       Copyright (C)  YEAR  YOUR NAME.
3762
       Permission is granted to copy, distribute and/or modify this document
3763
       under the terms of the GNU Free Documentation License, Version 1.2
3764
       or any later version published by the Free Software Foundation;
3765
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
3766
       Texts.  A copy of the license is included in the section entitled ``GNU
3767
       Free Documentation License''.
3768
 
3769
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
3770
replace the "with...Texts." line with this:
3771
 
3772
         with the Invariant Sections being LIST THEIR TITLES, with
3773
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
3774
         being LIST.
3775
 
3776
If you have Invariant Sections without Cover Texts, or some other
3777
combination of the three, merge those two alternatives to suit the
3778
situation.
3779
 
3780
If your document contains nontrivial examples of program code, we
3781
recommend releasing these examples in parallel under your choice of
3782
free software license, such as the GNU General Public License, to
3783
permit their use in free software.
3784
 
3785

3786
File: or1ksim.info,  Node: Index,  Prev: GNU Free Documentation License,  Up: Top
3787
 
3788
Index
3789
*****
3790
 
3791
 
3792
* Menu:
3793
3794
* --cumulative:                          Profiling Utility.   (line  26)
3795
* --debug-config:                        Standalone Simulator.
3796 385 jeremybenn
                                                              (line  86)
3797 82 jeremybenn
* --disable-all-tests:                   Configuring the Build.
3798 127 jeremybenn
                                                              (line 105)
3799 19 jeremybenn
* --disable-arith-flag:                  Configuring the Build.
3800 127 jeremybenn
                                                              (line 118)
3801 124 jeremybenn
* --disable-debug:                       Configuring the Build.
3802 127 jeremybenn
                                                              (line  98)
3803 19 jeremybenn
* --disable-ethphy:                      Configuring the Build.
3804 104 jeremybenn
                                                              (line  59)
3805 19 jeremybenn
* --disable-ov-flag:                     Configuring the Build.
3806 127 jeremybenn
                                                              (line 133)
3807 19 jeremybenn
* --disable-profiling:                   Configuring the Build.
3808 104 jeremybenn
                                                              (line  30)
3809 19 jeremybenn
* --disable-range-stats:                 Configuring the Build.
3810 127 jeremybenn
                                                              (line  92)
3811
* --disable-unsigned-xori:               Configuring the Build.
3812 104 jeremybenn
                                                              (line  69)
3813 82 jeremybenn
* --enable-all-tests:                    Configuring the Build.
3814 127 jeremybenn
                                                              (line 104)
3815 19 jeremybenn
* --enable-arith-flag:                   Configuring the Build.
3816 127 jeremybenn
                                                              (line 117)
3817 124 jeremybenn
* --enable-debug:                        Configuring the Build.
3818 127 jeremybenn
                                                              (line  97)
3819 19 jeremybenn
* --enable-ethphy:                       Configuring the Build.
3820 104 jeremybenn
                                                              (line  58)
3821 19 jeremybenn
* --enable-execution:                    Configuring the Build.
3822 104 jeremybenn
                                                              (line  37)
3823 19 jeremybenn
* --enable-mprofile:                     Standalone Simulator.
3824 385 jeremybenn
                                                              (line 120)
3825 19 jeremybenn
* --enable-ov-flag:                      Configuring the Build.
3826 127 jeremybenn
                                                              (line 132)
3827 19 jeremybenn
* --enable-profile:                      Standalone Simulator.
3828 385 jeremybenn
                                                              (line 117)
3829 19 jeremybenn
* --enable-profiling:                    Configuring the Build.
3830 104 jeremybenn
                                                              (line  29)
3831 19 jeremybenn
* --enable-range-stats:                  Configuring the Build.
3832 127 jeremybenn
                                                              (line  91)
3833
* --enable-unsigned-xori:                Configuring the Build.
3834 104 jeremybenn
                                                              (line  68)
3835 19 jeremybenn
* --file:                                Standalone Simulator.
3836 385 jeremybenn
                                                              (line  44)
3837 19 jeremybenn
* --filename:                            Memory Profiling Utility.
3838
                                                              (line  51)
3839
* --generate:                            Profiling Utility.   (line  34)
3840
* --group:                               Memory Profiling Utility.
3841
                                                              (line  47)
3842
* --help:                                Standalone Simulator.
3843 346 jeremybenn
                                                              (line  21)
3844 19 jeremybenn
* --help (memory profiling utility):     Memory Profiling Utility.
3845
                                                              (line  22)
3846
* --help (profiling utility):            Profiling Utility.   (line  22)
3847
* --interactive:                         Standalone Simulator.
3848 346 jeremybenn
                                                              (line  25)
3849
* --memory:                              Standalone Simulator.
3850 385 jeremybenn
                                                              (line  70)
3851 19 jeremybenn
* --mode:                                Memory Profiling Utility.
3852
                                                              (line  26)
3853
* --nosrv:                               Standalone Simulator.
3854 385 jeremybenn
                                                              (line  52)
3855 346 jeremybenn
* --quiet <1>:                           Profiling Utility.   (line  30)
3856
* --quiet:                               Standalone Simulator.
3857
                                                              (line  29)
3858
* --report-memory-errors:                Standalone Simulator.
3859 385 jeremybenn
                                                              (line  91)
3860 19 jeremybenn
* --srv:                                 Standalone Simulator.
3861 385 jeremybenn
                                                              (line  60)
3862 19 jeremybenn
* --strict-npc:                          Standalone Simulator.
3863 385 jeremybenn
                                                              (line 100)
3864 450 jeremybenn
* --trace <1>:                           Trace Generation.    (line  15)
3865 420 jeremybenn
* --trace:                               Standalone Simulator.
3866
                                                              (line  39)
3867 346 jeremybenn
* --verbose:                             Standalone Simulator.
3868
                                                              (line  33)
3869 19 jeremybenn
* --version:                             Standalone Simulator.
3870 346 jeremybenn
                                                              (line  17)
3871 19 jeremybenn
* --version (memory profiling utility):  Memory Profiling Utility.
3872
                                                              (line  17)
3873
* --version (profiling utility):         Profiling Utility.   (line  17)
3874
* -c:                                    Profiling Utility.   (line  26)
3875
* -d:                                    Standalone Simulator.
3876 385 jeremybenn
                                                              (line  86)
3877 19 jeremybenn
* -f <1>:                                Memory Profiling Utility.
3878
                                                              (line  51)
3879
* -f:                                    Standalone Simulator.
3880 385 jeremybenn
                                                              (line  44)
3881 346 jeremybenn
* -g <1>:                                Memory Profiling Utility.
3882 19 jeremybenn
                                                              (line  47)
3883 346 jeremybenn
* -g:                                    Profiling Utility.   (line  34)
3884 19 jeremybenn
* -h:                                    Standalone Simulator.
3885 346 jeremybenn
                                                              (line  21)
3886 19 jeremybenn
* -h (memory profiling utility):         Memory Profiling Utility.
3887
                                                              (line  22)
3888
* -h (profiling utility):                Profiling Utility.   (line  22)
3889
* -i:                                    Standalone Simulator.
3890 346 jeremybenn
                                                              (line  25)
3891
* -m <1>:                                Memory Profiling Utility.
3892 19 jeremybenn
                                                              (line  26)
3893 346 jeremybenn
* -m:                                    Standalone Simulator.
3894 385 jeremybenn
                                                              (line  70)
3895 346 jeremybenn
* -q <1>:                                Profiling Utility.   (line  30)
3896
* -q:                                    Standalone Simulator.
3897
                                                              (line  29)
3898 450 jeremybenn
* -t <1>:                                Trace Generation.    (line  15)
3899 420 jeremybenn
* -t:                                    Standalone Simulator.
3900
                                                              (line  39)
3901 346 jeremybenn
* -V:                                    Standalone Simulator.
3902
                                                              (line  33)
3903 19 jeremybenn
* -v:                                    Standalone Simulator.
3904 346 jeremybenn
                                                              (line  17)
3905 19 jeremybenn
* -v (memory profiling utility):         Memory Profiling Utility.
3906
                                                              (line  17)
3907
* -v (profiling utility):                Profiling Utility.   (line  17)
3908
* 0x00 UART VAPI sub-command (UART verification): Verification API.
3909
                                                              (line  49)
3910
* 0x01 UART VAPI sub-command (UART verification): Verification API.
3911
                                                              (line  55)
3912
* 0x02 UART VAPI sub-command (UART verification): Verification API.
3913
                                                              (line  59)
3914
* 0x03 UART VAPI sub-command (UART verification): Verification API.
3915
                                                              (line  62)
3916
* 0x04 UART VAPI sub-command (UART verification): Verification API.
3917
                                                              (line  66)
3918
* 16550 (UART configuration):            UART Configuration.  (line  73)
3919 82 jeremybenn
* all tests enabled:                     Configuring the Build.
3920 127 jeremybenn
                                                              (line 105)
3921 19 jeremybenn
* Argtable2 debugging:                   Configuring the Build.
3922 127 jeremybenn
                                                              (line  98)
3923 19 jeremybenn
* ATA/ATAPI configuration:               Disc Interface Configuration.
3924
                                                              (line   6)
3925
* ATA/ATAPI device configuration:        Disc Interface Configuration.
3926 385 jeremybenn
                                                              (line  92)
3927 19 jeremybenn
* base_vapi_id (GPIO configuration - deprecated): GPIO Configuration.
3928
                                                              (line  32)
3929
* baseaddr (ATA/ATAPI configuration):    Disc Interface Configuration.
3930 385 jeremybenn
                                                              (line  26)
3931 19 jeremybenn
* baseaddr (DMA configuration):          DMA Configuration.   (line  24)
3932
* baseaddr (Ethernet configuration):     Ethernet Configuration.
3933 440 jeremybenn
                                                              (line  23)
3934 19 jeremybenn
* baseaddr (frame buffer configuration): Frame Buffer Configuration.
3935
                                                              (line  20)
3936
* baseaddr (generic peripheral configuration): Generic Peripheral Configuration.
3937
                                                              (line  22)
3938
* baseaddr (GPIO configuration):         GPIO Configuration.  (line  21)
3939
* baseaddr (keyboard configuration):     Keyboard Configuration.
3940
                                                              (line  36)
3941
* baseaddr (memory configuration):       Memory Configuration.
3942 418 julius
                                                              (line  94)
3943 19 jeremybenn
* baseaddr (memory controller configuration): Memory Controller Configuration.
3944 385 jeremybenn
                                                              (line  55)
3945 19 jeremybenn
* baseaddr (UART configuration):         UART Configuration.  (line  22)
3946
* baseaddr (VGA configuration):          Display Interface Configuration.
3947
                                                              (line  26)
3948
* blocksize (cache configuration):       Cache Configuration. (line  29)
3949
* BPB configuration:                     Branch Prediction Configuration.
3950
                                                              (line   6)
3951
* branch prediction configuration:       Branch Prediction Configuration.
3952
                                                              (line   6)
3953
* break (Interactive CLI):               Interactive Command Line.
3954
                                                              (line  57)
3955
* breakpoint list (Interactive CLI):     Interactive Command Line.
3956
                                                              (line  60)
3957
* breakpoint set/clear (Interactive CLI): Interactive Command Line.
3958
                                                              (line  57)
3959
* breaks (Interactive CLI):              Interactive Command Line.
3960
                                                              (line  60)
3961 440 jeremybenn
* bridge setup:                          Establishing a Bridge.
3962
                                                              (line   6)
3963 19 jeremybenn
* btic (branch prediction configuration): Branch Prediction Configuration.
3964
                                                              (line  19)
3965 440 jeremybenn
* BusyBox and Ethernet:                  Networking from OpenRISC Linux and BusyBox.
3966
                                                              (line   6)
3967 19 jeremybenn
* byte_enabled (generic peripheral configuration): Generic Peripheral Configuration.
3968
                                                              (line  48)
3969
* cache configuration:                   Cache Configuration. (line   6)
3970 346 jeremybenn
* calling_convention (CUC configuration): CUC Configuration.  (line  37)
3971 19 jeremybenn
* ce (memory configuration):             Memory Configuration.
3972 418 julius
                                                              (line 124)
3973 19 jeremybenn
* cfgr (CPU configuration):              CPU Configuration.   (line  47)
3974
* channel (UART configuration):          UART Configuration.  (line  29)
3975
* clear breakpoint (Interactive CLI):    Interactive Command Line.
3976
                                                              (line  57)
3977 432 jeremybenn
* clear_interrupt:                       Concepts.            (line  20)
3978 202 julius
* clkcycle (simulator configuration):    Simulator Behavior.  (line 115)
3979 19 jeremybenn
* cm (Interactive CLI):                  Interactive Command Line.
3980
                                                              (line  54)
3981
* command line for Or1ksim standalone use: Standalone Simulator.
3982
                                                              (line   6)
3983
* complex model:                         Configuring the Build.
3984 104 jeremybenn
                                                              (line  37)
3985 19 jeremybenn
* config:                                Global Data Structures.
3986
                                                              (line   7)
3987
* config.bpb:                            Global Data Structures.
3988
                                                              (line  37)
3989
* config.cpu:                            Global Data Structures.
3990
                                                              (line  22)
3991
* config.cuc:                            Global Data Structures.
3992
                                                              (line  18)
3993
* config.dc:                             Global Data Structures.
3994
                                                              (line  25)
3995
* config.debug:                          Global Data Structures.
3996
                                                              (line  40)
3997
* config.pic:                            Global Data Structures.
3998
                                                              (line  33)
3999
* config.pm:                             Global Data Structures.
4000
                                                              (line  29)
4001
* config.sim:                            Global Data Structures.
4002
                                                              (line  11)
4003
* config.vapi:                           Global Data Structures.
4004
                                                              (line  14)
4005
* configuration dynamic structure:       Global Data Structures.
4006
                                                              (line  49)
4007
* configuration file structure:          Configuration File Format.
4008
                                                              (line   6)
4009
* configuration global structure:        Global Data Structures.
4010
                                                              (line   7)
4011
* configuration info (Interactive CLI):  Interactive Command Line.
4012
                                                              (line 119)
4013
* configuration of generic peripherals:  Generic Peripheral Configuration.
4014
                                                              (line   6)
4015
* configuration parameter setting (Interactive CLI): Interactive Command Line.
4016
                                                              (line 146)
4017
* configuring branch prediction:         Branch Prediction Configuration.
4018
                                                              (line   6)
4019
* configuring data & instruction caches: Cache Configuration. (line   6)
4020
* configuring data & instruction MMUs:   Memory Management Configuration.
4021
                                                              (line   6)
4022
* configuring DMA:                       DMA Configuration.   (line   6)
4023
* configuring memory:                    Memory Configuration.
4024
                                                              (line   6)
4025
* configuring Or1ksim:                   Configuration.       (line   6)
4026
* configuring power management:          Power Management Configuration.
4027
                                                              (line   6)
4028
* configuring the ATA/ATAPI interfaces:  Disc Interface Configuration.
4029
                                                              (line   6)
4030
* configuring the behavior of Or1ksim:   Simulator Behavior.  (line   6)
4031
* configuring the CPU:                   CPU Configuration.   (line   6)
4032
* configuring the Custom Unit Compiler (CUC): CUC Configuration.
4033
                                                              (line   6)
4034
* configuring the debug unit and interface to external debuggers: Debug Interface Configuration.
4035
                                                              (line   6)
4036
* configuring the Ethernet interface:    Ethernet Configuration.
4037
                                                              (line   6)
4038 440 jeremybenn
* configuring the Ethernet TUN/TAP interface: Ethernet TUN/TAP Interface.
4039
                                                              (line   6)
4040 19 jeremybenn
* configuring the frame buffer:          Frame Buffer Configuration.
4041
                                                              (line   6)
4042
* configuring the GPIO:                  GPIO Configuration.  (line   6)
4043
* configuring the interrupt controller:  Interrupt Configuration.
4044
                                                              (line   6)
4045
* configuring the keyboard interface:    Keyboard Configuration.
4046
                                                              (line   6)
4047
* configuring the memory controller:     Memory Controller Configuration.
4048
                                                              (line   6)
4049
* configuring the processor:             CPU Configuration.   (line   6)
4050
* configuring the PS2 interface:         Keyboard Configuration.
4051
                                                              (line   6)
4052
* configuring the UART:                  UART Configuration.  (line   6)
4053
* configuring the Verification API (VAPI): Verification API Configuration.
4054
                                                              (line   6)
4055
* configuring the VGA interface:         Display Interface Configuration.
4056
                                                              (line   6)
4057
* copying memory (Interactive CLI):      Interactive Command Line.
4058
                                                              (line  54)
4059
* CPU configuration:                     CPU Configuration.   (line   6)
4060
* CUC configuration:                     CUC Configuration.   (line   6)
4061
* Custom Unit Compiler (Interactive CLI): Interactive Command Line.
4062
                                                              (line 162)
4063
* Custom Unit Compiler Configuration:    CUC Configuration.   (line   6)
4064
* data cache configuration:              Cache Configuration. (line   6)
4065
* data MMU configuration:                Memory Management Configuration.
4066
                                                              (line   6)
4067
* DCGE (power management register):      Power Management Configuration.
4068
                                                              (line  21)
4069
* debug (Interactive CLI):               Interactive Command Line.
4070 346 jeremybenn
                                                              (line 151)
4071 19 jeremybenn
* debug (simulator configuration):       Simulator Behavior.  (line  13)
4072
* debug channel toggle (Interactive CLI): Interactive Command Line.
4073
                                                              (line 141)
4074
* debug interface configuration:         Debug Interface Configuration.
4075
                                                              (line   6)
4076
* debug mode toggle (Interactive CLI):   Interactive Command Line.
4077
                                                              (line 151)
4078
* debug unit configuration:              Debug Interface Configuration.
4079
                                                              (line   6)
4080
* Debug Unit verification (VAPI):        Verification API.    (line  34)
4081
* debugging enabled (Argtable2):         Configuring the Build.
4082 127 jeremybenn
                                                              (line  98)
4083 104 jeremybenn
* DejaGnu board configurations:          Regression Testing.  (line  35)
4084
* DejaGnu configuration:                 Regression Testing.  (line  21)
4085
* DejaGNU tests directories:             Regression Testing.  (line  50)
4086
* DejaGnu tool specific configuration:   Regression Testing.  (line  39)
4087 19 jeremybenn
* delayr (memory configuration):         Memory Configuration.
4088 418 julius
                                                              (line 144)
4089 19 jeremybenn
* delayw (memory configuration):         Memory Configuration.
4090 418 julius
                                                              (line 150)
4091 98 jeremybenn
* dependstats (CPU configuration):       CPU Configuration.   (line  89)
4092 19 jeremybenn
* dev_id (ATA/ATAPI configuration):      Disc Interface Configuration.
4093 385 jeremybenn
                                                              (line  40)
4094 19 jeremybenn
* disassemble (Interactive CLI):         Interactive Command Line.
4095
                                                              (line  41)
4096
* disc interface configuration:          Disc Interface Configuration.
4097
                                                              (line   6)
4098
* disc interface device configuration:   Disc Interface Configuration.
4099 385 jeremybenn
                                                              (line  92)
4100 19 jeremybenn
* display interface configuration:       Display Interface Configuration.
4101
                                                              (line   6)
4102
* displaying memory (Interactive CLI):   Interactive Command Line.
4103
                                                              (line  31)
4104
* displaying registers (Interactive CLI): Interactive Command Line.
4105
                                                              (line  14)
4106
* dm (Interactive CLI):                  Interactive Command Line.
4107
                                                              (line  31)
4108
* dma (Ethernet configuration):          Ethernet Configuration.
4109 440 jeremybenn
                                                              (line  34)
4110 19 jeremybenn
* DMA configuration:                     DMA Configuration.   (line   6)
4111
* DMA verification (VAPI):               Verification API.    (line  73)
4112
* dma_mode0_td (ATA/ATAPI configuration): Disc Interface Configuration.
4113 385 jeremybenn
                                                              (line  74)
4114 19 jeremybenn
* dma_mode0_teoc (ATA/ATAPI configuration): Disc Interface Configuration.
4115 385 jeremybenn
                                                              (line  75)
4116 19 jeremybenn
* dma_mode0_tm (ATA/ATAPI configuration): Disc Interface Configuration.
4117 385 jeremybenn
                                                              (line  73)
4118 19 jeremybenn
* DME (power management register):       Power Management Configuration.
4119
                                                              (line  15)
4120
* DMMU configuration:                    Memory Management Configuration.
4121
                                                              (line   6)
4122
* doze mode (power management register): Power Management Configuration.
4123
                                                              (line  15)
4124 451 jeremybenn
* dummy_crc (Ethernet configuration):    Ethernet Configuration.
4125
                                                              (line 104)
4126 19 jeremybenn
* dv (Interactive CLI):                  Interactive Command Line.
4127
                                                              (line 124)
4128
* dynamic clock gating (power management register): Power Management Configuration.
4129
                                                              (line  21)
4130
* dynamic model:                         Configuring the Build.
4131 104 jeremybenn
                                                              (line  37)
4132 19 jeremybenn
* dynamic ports, use of:                 Verification API Configuration.
4133
                                                              (line  23)
4134
* edge_trigger (interrupt controller):   Interrupt Configuration.
4135
                                                              (line  16)
4136 346 jeremybenn
* enable_bursts (CUC configuration):     CUC Configuration.   (line  41)
4137 19 jeremybenn
* enabled (ATA/ATAPI configuration):     Disc Interface Configuration.
4138 385 jeremybenn
                                                              (line  22)
4139 19 jeremybenn
* enabled (branch prediction configuration): Branch Prediction Configuration.
4140
                                                              (line  15)
4141
* enabled (cache configuration):         Cache Configuration. (line  11)
4142
* enabled (debug interface configuration): Debug Interface Configuration.
4143
                                                              (line  11)
4144
* enabled (DMA configuration):           DMA Configuration.   (line  20)
4145
* enabled (Ethernet configuration):      Ethernet Configuration.
4146 440 jeremybenn
                                                              (line  19)
4147 19 jeremybenn
* enabled (frame buffer configuration):  Frame Buffer Configuration.
4148
                                                              (line  16)
4149
* enabled (generic peripheral configuration): Generic Peripheral Configuration.
4150
                                                              (line  18)
4151
* enabled (GPIO configuration):          GPIO Configuration.  (line  17)
4152
* enabled (interrupt controller):        Interrupt Configuration.
4153
                                                              (line  12)
4154
* enabled (keyboard configuration):      Keyboard Configuration.
4155
                                                              (line  32)
4156
* enabled (memory controller configuration): Memory Controller Configuration.
4157 385 jeremybenn
                                                              (line  44)
4158 19 jeremybenn
* enabled (MMU configuration):           Memory Management Configuration.
4159
                                                              (line  12)
4160
* enabled (power management configuration): Power Management Configuration.
4161
                                                              (line  35)
4162
* enabled (UART configuration):          UART Configuration.  (line  18)
4163
* enabled (verification API configuration): Verification API Configuration.
4164
                                                              (line  15)
4165
* enabled (VGA configuration):           Display Interface Configuration.
4166
                                                              (line  22)
4167
* enabling Ethernet via socket:          Configuring the Build.
4168 104 jeremybenn
                                                              (line  59)
4169 19 jeremybenn
* entrysize (MMU configuration):         Memory Management Configuration.
4170
                                                              (line  32)
4171
* ETH_VAPI_CTRL (Ethernet verification): Verification API.    (line  86)
4172
* ETH_VAPI_DATA (Ethernet verification): Verification API.    (line  84)
4173 440 jeremybenn
* Ethernet bridge setup:                 Establishing a Bridge.
4174
                                                              (line   6)
4175 19 jeremybenn
* Ethernet configuration:                Ethernet Configuration.
4176
                                                              (line   6)
4177
* Ethernet verification (VAPI):          Verification API.    (line  78)
4178
* Ethernet via socket, enabling:         Configuring the Build.
4179 104 jeremybenn
                                                              (line  59)
4180 127 jeremybenn
* exclusive-OR immediate operand:        Configuring the Build.
4181
                                                              (line  69)
4182 202 julius
* exe_bin_insn_log (simulator configuration): Simulator Behavior.
4183
                                                              (line 103)
4184
* exe_bin_insn_log_file (simulator configuration): Simulator Behavior.
4185
                                                              (line 111)
4186 82 jeremybenn
* exe_log (simulator configuration):     Simulator Behavior.  (line  49)
4187
* exe_log_end (simulator configuration): Simulator Behavior.  (line  89)
4188
* exe_log_file (simulator configuration): Simulator Behavior. (line  97)
4189 19 jeremybenn
* exe_log_fn (simulator configuration - deprecated): Simulator Behavior.
4190 82 jeremybenn
                                                              (line  97)
4191 19 jeremybenn
* exe_log_marker (simulator configuration): Simulator Behavior.
4192 82 jeremybenn
                                                              (line  93)
4193 19 jeremybenn
* exe_log_start (simulator configuration): Simulator Behavior.
4194 82 jeremybenn
                                                              (line  86)
4195
* exe_log_type (simulator configuration): Simulator Behavior. (line  55)
4196 19 jeremybenn
* exe_log_type=default (simulator configuration): Simulator Behavior.
4197 82 jeremybenn
                                                              (line  58)
4198 19 jeremybenn
* exe_log_type=hardware (simulator configuration): Simulator Behavior.
4199 82 jeremybenn
                                                              (line  62)
4200 19 jeremybenn
* exe_log_type=simple (simulator configuration): Simulator Behavior.
4201 82 jeremybenn
                                                              (line  69)
4202 19 jeremybenn
* exe_log_type=software (simulator configuration): Simulator Behavior.
4203 82 jeremybenn
                                                              (line  74)
4204 19 jeremybenn
* executing code (Interactive CLI):      Interactive Command Line.
4205
                                                              (line  23)
4206
* execution history (Interactive CLI):   Interactive Command Line.
4207
                                                              (line  67)
4208
* file (ATA/ATAPI device configuration): Disc Interface Configuration.
4209 385 jeremybenn
                                                              (line 108)
4210 19 jeremybenn
* file (keyboard configuration):         Keyboard Configuration.
4211
                                                              (line  51)
4212
* filename (frame buffer configuration - deprecated): Frame Buffer Configuration.
4213 82 jeremybenn
                                                              (line  36)
4214 19 jeremybenn
* filename (VGA configuration - deprecated): Display Interface Configuration.
4215
                                                              (line  47)
4216 440 jeremybenn
* firewall with Ethernet bridge and TAP/TUN: Opening the Firewall.
4217
                                                              (line   6)
4218 19 jeremybenn
* firmware (ATA/ATAPI device configuration): Disc Interface Configuration.
4219 385 jeremybenn
                                                              (line 121)
4220 19 jeremybenn
* flag setting by instructions:          Configuring the Build.
4221 127 jeremybenn
                                                              (line 118)
4222 19 jeremybenn
* frame buffer configuration:            Frame Buffer Configuration.
4223
                                                              (line   6)
4224
* generic peripheral configuration:      Generic Peripheral Configuration.
4225
                                                              (line   6)
4226
* GPIO configuration:                    GPIO Configuration.  (line   6)
4227
* GPIO verification (VAPI):              Verification API.    (line  88)
4228
* GPIO_VAPI_AUX (GPIO verification):     Verification API.    (line 100)
4229
* GPIO_VAPI_CLOCK (GPIO verification):   Verification API.    (line 103)
4230
* GPIO_VAPI_CTRL (GPIO verification):    Verification API.    (line 119)
4231
* GPIO_VAPI_DATA (GPIO verification):    Verification API.    (line  97)
4232
* GPIO_VAPI_INTE (GPIO verification):    Verification API.    (line 110)
4233
* GPIO_VAPI_PTRIG (GPIO verification):   Verification API.    (line 113)
4234
* GPIO_VAPI_RGPIO (GPIO verification):   Verification API.    (line 107)
4235 100 julius
* hardfloat (CPU configuration):         CPU Configuration.   (line 110)
4236 98 jeremybenn
* hazards (CPU configuration):           CPU Configuration.   (line  74)
4237 19 jeremybenn
* heads (ATA/ATAPI device configuration): Disc Interface Configuration.
4238 385 jeremybenn
                                                              (line 125)
4239 19 jeremybenn
* help (Interactive CLI):                Interactive Command Line.
4240
                                                              (line 170)
4241
* hexadecimal memory dump (Interactive CLI): Interactive Command Line.
4242
                                                              (line 133)
4243
* hide_device_id (verification API configuration): Verification API Configuration.
4244
                                                              (line  36)
4245
* hist (Interactive CLI):                Interactive Command Line.
4246
                                                              (line  67)
4247 82 jeremybenn
* history (simulator configuration):     Simulator Behavior.  (line  40)
4248 19 jeremybenn
* history of execution (Interactive CLI): Interactive Command Line.
4249
                                                              (line  67)
4250
* hitdelay (branch prediction configuration): Branch Prediction Configuration.
4251
                                                              (line  33)
4252
* hitdelay (instruction cache configuration): Cache Configuration.
4253
                                                              (line  38)
4254
* hitdelay (MMU configuration):          Memory Management Configuration.
4255
                                                              (line  51)
4256 104 jeremybenn
* host test code:                        Regression Testing.  (line  57)
4257 19 jeremybenn
* hw_enabled (generic peripheral configuration): Generic Peripheral Configuration.
4258
                                                              (line  49)
4259
* IMMU configuration:                    Memory Management Configuration.
4260
                                                              (line   6)
4261
* index (memory controller configuration): Memory Controller Configuration.
4262 385 jeremybenn
                                                              (line  77)
4263 19 jeremybenn
* info (Interactive CLI):                Interactive Command Line.
4264
                                                              (line 119)
4265
* installing Or1ksim:                    Installation.        (line   6)
4266
* instruction cache configuration:       Cache Configuration. (line   6)
4267
* instruction MMU configuration:         Memory Management Configuration.
4268
                                                              (line   6)
4269
* instruction profiling for Or1ksim:     Profiling Utility.   (line   6)
4270
* instruction profiling utility (Interactive CLI): Interactive Command Line.
4271
                                                              (line 178)
4272
* internal debugging:                    Internal Debugging.  (line   6)
4273
* interrupt controller configuration:    Interrupt Configuration.
4274
                                                              (line   6)
4275 432 jeremybenn
* interrupts:                            Concepts.            (line  20)
4276 19 jeremybenn
* irq (ATA/ATAPI configuration):         Disc Interface Configuration.
4277 385 jeremybenn
                                                              (line  36)
4278 19 jeremybenn
* irq (DMA configuration):               DMA Configuration.   (line  34)
4279
* irq (GPIO configuration):              GPIO Configuration.  (line  29)
4280
* irq (keyboard configuration):          Keyboard Configuration.
4281
                                                              (line  47)
4282
* irq (UART configuration):              UART Configuration.  (line  70)
4283
* irq (VGA configuration):               Display Interface Configuration.
4284
                                                              (line  37)
4285
* jitter (UART configuration):           UART Configuration.  (line  78)
4286
* keyboard configuration:                Keyboard Configuration.
4287
                                                              (line   6)
4288
* library version of Or1ksim:            Simulator Library.   (line   6)
4289
* license for Or1ksim:                   GNU Free Documentation License.
4290
                                                              (line   6)
4291 440 jeremybenn
* Linux (OpenRISC) and Ethernet:         Networking from OpenRISC Linux and BusyBox.
4292
                                                              (line   6)
4293 19 jeremybenn
* list breakpoints (Interactive CLI):    Interactive Command Line.
4294
                                                              (line  60)
4295
* load_hitdelay (data cache configuration): Cache Configuration.
4296
                                                              (line  46)
4297
* load_missdelay (data cache configuration): Cache Configuration.
4298
                                                              (line  50)
4299
* log (memory configuration):            Memory Configuration.
4300 418 julius
                                                              (line 156)
4301 19 jeremybenn
* log_enabled (verification API configuration): Verification API Configuration.
4302
                                                              (line  28)
4303 432 jeremybenn
* long:                                  Simulator Library.   (line  94)
4304 104 jeremybenn
* make file for tests:                   Regression Testing.  (line  27)
4305 19 jeremybenn
* mc (memory configuration):             Memory Configuration.
4306 418 julius
                                                              (line 133)
4307 19 jeremybenn
* memory configuration:                  Memory Configuration.
4308
                                                              (line   6)
4309
* memory controller configuration:       Memory Controller Configuration.
4310
                                                              (line   6)
4311
* memory copying (Interactive CLI):      Interactive Command Line.
4312
                                                              (line  54)
4313
* memory display (Interactive CLI):      Interactive Command Line.
4314
                                                              (line  31)
4315
* memory dump, hexadecimal (Interactive CLI): Interactive Command Line.
4316
                                                              (line 133)
4317
* memory dump, Verilog (Interactive CLI): Interactive Command Line.
4318
                                                              (line 124)
4319
* memory patching (Interactive CLI):     Interactive Command Line.
4320
                                                              (line  48)
4321
* memory profiling end address:          Memory Profiling Utility.
4322
                                                              (line  56)
4323
* memory profiling start address:        Memory Profiling Utility.
4324
                                                              (line  56)
4325
* memory profiling utility (Interactive CLI): Interactive Command Line.
4326
                                                              (line 173)
4327
* memory profiling version of Or1ksim:   Memory Profiling Utility.
4328
                                                              (line   6)
4329
* memory_order (CUC configuration):      CUC Configuration.   (line  15)
4330 346 jeremybenn
* memory_order=exact (CUC configuration): CUC Configuration.  (line  30)
4331 19 jeremybenn
* memory_order=none (CUC configuration): CUC Configuration.   (line  18)
4332 346 jeremybenn
* memory_order=strong (CUC configuration): CUC Configuration. (line  27)
4333
* memory_order=weak (CUC configuration): CUC Configuration.   (line  22)
4334 19 jeremybenn
* missdelay (branch prediction configuration): Branch Prediction Configuration.
4335
                                                              (line  37)
4336
* missdelay (instruction cache configuration): Cache Configuration.
4337
                                                              (line  42)
4338
* missdelay (MMU configuration):         Memory Management Configuration.
4339
                                                              (line  55)
4340
* MMU configuration:                     Memory Management Configuration.
4341
                                                              (line   6)
4342 82 jeremybenn
* mprof_file (simulator configuration):  Simulator Behavior.  (line  34)
4343 19 jeremybenn
* mprof_fn (simulator configuration - deprecated): Simulator Behavior.
4344 82 jeremybenn
                                                              (line  34)
4345 19 jeremybenn
* mprofile (Interactive CLI):            Interactive Command Line.
4346 346 jeremybenn
                                                              (line 173)
4347 82 jeremybenn
* mprofile (simulator configuration):    Simulator Behavior.  (line  29)
4348 432 jeremybenn
* mtspr:                                 Concepts.            (line  20)
4349 19 jeremybenn
* mwdma (ATA/ATAPI device configuration): Disc Interface Configuration.
4350 385 jeremybenn
                                                              (line 132)
4351 19 jeremybenn
* name (generic peripheral configuration): Generic Peripheral Configuration.
4352
                                                              (line  42)
4353
* name (memory configuration):           Memory Configuration.
4354 418 julius
                                                              (line 115)
4355 346 jeremybenn
* no_multicycle (CUC configuration):     CUC Configuration.   (line  45)
4356 19 jeremybenn
* nsets (cache configuration):           Cache Configuration. (line  15)
4357
* nsets (MMU configuration):             Memory Management Configuration.
4358
                                                              (line  16)
4359
* nways (cache configuration):           Cache Configuration. (line  22)
4360
* nways (MMU configuration):             Memory Management Configuration.
4361
                                                              (line  22)
4362 432 jeremybenn
* or1ksim_get_time_period:               Simulator Library.   (line  84)
4363
* or1ksim_init:                          Simulator Library.   (line  19)
4364
* or1ksim_interrupt:                     Simulator Library.   (line  99)
4365
* or1ksim_interrupt_clear:               Simulator Library.   (line 121)
4366
* or1ksim_interrupt_set:                 Simulator Library.   (line 110)
4367
* or1ksim_is_le:                         Simulator Library.   (line  89)
4368
* or1ksim_jtag_reset:                    Simulator Library.   (line 130)
4369
* or1ksim_jtag_shift_dr:                 Simulator Library.   (line 152)
4370
* or1ksim_jtag_shift_ir:                 Simulator Library.   (line 139)
4371
* or1ksim_read_mem:                      Simulator Library.   (line 165)
4372
* or1ksim_read_reg:                      Simulator Library.   (line 197)
4373 346 jeremybenn
* or1ksim_read_spr:                      Simulator Library.   (line 181)
4374 432 jeremybenn
* or1ksim_reset_duration:                Simulator Library.   (line  69)
4375
* or1ksim_run:                           Simulator Library.   (line  58)
4376
* or1ksim_set_stall_state:               Simulator Library.   (line 212)
4377
* or1ksim_set_time_point:                Simulator Library.   (line  80)
4378
* or1ksim_write_mem:                     Simulator Library.   (line 173)
4379
* or1ksim_write_reg:                     Simulator Library.   (line 205)
4380
* or1ksim_write_spr:                     Simulator Library.   (line 189)
4381 19 jeremybenn
* output rediretion:                     Concepts.            (line   7)
4382
* overflow flag setting by instructions: Configuring the Build.
4383 127 jeremybenn
                                                              (line 133)
4384 19 jeremybenn
* packet (ATA/ATAPI device configuration): Disc Interface Configuration.
4385 385 jeremybenn
                                                              (line 117)
4386 19 jeremybenn
* pagesize (MMU configuration):          Memory Management Configuration.
4387
                                                              (line  27)
4388
* patching memory (Interactive CLI):     Interactive Command Line.
4389
                                                              (line  48)
4390
* patching registers (Interactive CLI):  Interactive Command Line.
4391
                                                              (line  28)
4392
* patching the program counter (Interactive CLI): Interactive Command Line.
4393
                                                              (line  51)
4394
* pattern (memory configuration):        Memory Configuration.
4395 418 julius
                                                              (line  82)
4396 19 jeremybenn
* pc (Interactive CLI):                  Interactive Command Line.
4397
                                                              (line  51)
4398 440 jeremybenn
* persistent TAP device creation:        Setting Up a Persistent TAP device.
4399
                                                              (line   6)
4400 429 julius
* phy_addr:                              Ethernet Configuration.
4401 451 jeremybenn
                                                              (line  99)
4402 19 jeremybenn
* PIC configuration:                     Interrupt Configuration.
4403
                                                              (line   6)
4404
* pio (ATA/ATAPI device configuration):  Disc Interface Configuration.
4405 385 jeremybenn
                                                              (line 136)
4406 19 jeremybenn
* pio_mode0_t1 (ATA/ATAPI configuration): Disc Interface Configuration.
4407 385 jeremybenn
                                                              (line  55)
4408 19 jeremybenn
* pio_mode0_t2 (ATA/ATAPI configuration): Disc Interface Configuration.
4409 385 jeremybenn
                                                              (line  56)
4410 19 jeremybenn
* pio_mode0_t4 (ATA/ATAPI configuration): Disc Interface Configuration.
4411 385 jeremybenn
                                                              (line  57)
4412 19 jeremybenn
* pio_mode0_teoc (ATA/ATAPI configuration): Disc Interface Configuration.
4413 385 jeremybenn
                                                              (line  58)
4414 19 jeremybenn
* pm (Interactive CLI):                  Interactive Command Line.
4415
                                                              (line  48)
4416
* PMR - DGCE:                            Power Management Configuration.
4417
                                                              (line  21)
4418
* PMR - DME:                             Power Management Configuration.
4419
                                                              (line  15)
4420
* PMR - SDF:                             Power Management Configuration.
4421
                                                              (line  12)
4422
* PMR - SME:                             Power Management Configuration.
4423
                                                              (line  16)
4424
* PMR - SUME:                            Power Management Configuration.
4425
                                                              (line  24)
4426
* PMU configuration:                     Power Management Configuration.
4427
                                                              (line   6)
4428
* poc (memory controller configuration): Memory Controller Configuration.
4429 385 jeremybenn
                                                              (line  64)
4430 19 jeremybenn
* port range for TCP/IP:                 Verification API Configuration.
4431
                                                              (line  23)
4432
* power management configuration:        Power Management Configuration.
4433
                                                              (line   6)
4434
* power management register, DGCE:       Power Management Configuration.
4435
                                                              (line  21)
4436
* power management register, DME:        Power Management Configuration.
4437
                                                              (line  15)
4438
* power management register, SDF:        Power Management Configuration.
4439
                                                              (line  12)
4440
* power management register, SME:        Power Management Configuration.
4441
                                                              (line  16)
4442
* power management register, SUME:       Power Management Configuration.
4443
                                                              (line  24)
4444
* pr (Interactive CLI):                  Interactive Command Line.
4445
                                                              (line  28)
4446
* private ports, use of:                 Verification API Configuration.
4447
                                                              (line  23)
4448
* processor configuration:               CPU Configuration.   (line   6)
4449
* processor stall (Interactive CLI):     Interactive Command Line.
4450
                                                              (line  72)
4451
* processor unstall (Interactive CLI):   Interactive Command Line.
4452
                                                              (line  78)
4453
* prof_file (simulator configuration):   Simulator Behavior.  (line  23)
4454
* prof_fn (simulator configuration - deprecated): Simulator Behavior.
4455
                                                              (line  23)
4456
* profile (simulator configuration):     Simulator Behavior.  (line  19)
4457
* profiling for Or1ksim:                 Profiling Utility.   (line   6)
4458
* profiling utility (Interactive CLI):   Interactive Command Line.
4459
                                                              (line 178)
4460
* program counter patching (Interactive CLI): Interactive Command Line.
4461
                                                              (line  51)
4462
* programmable interrupt controller configuration: Interrupt Configuration.
4463
                                                              (line   6)
4464
* PS2 configuration:                     Keyboard Configuration.
4465
                                                              (line   6)
4466
* q (Interactive CLI):                   Interactive Command Line.
4467
                                                              (line  11)
4468
* quitting (Interactive CLI):            Interactive Command Line.
4469
                                                              (line  11)
4470
* r (Interactive CLI):                   Interactive Command Line.
4471
                                                              (line  14)
4472
* random_seed (memory configuration):    Memory Configuration.
4473 418 julius
                                                              (line  72)
4474 19 jeremybenn
* refresh_rate (frame buffer configuration): Frame Buffer Configuration.
4475 82 jeremybenn
                                                              (line  30)
4476 19 jeremybenn
* refresh_rate (VGA configuration):      Display Interface Configuration.
4477
                                                              (line  41)
4478
* reg_sim_reset:                         Concepts.            (line  13)
4479
* register display (Interactive CLI):    Interactive Command Line.
4480
                                                              (line  14)
4481
* register over time statistics:         Configuring the Build.
4482 127 jeremybenn
                                                              (line  92)
4483 19 jeremybenn
* register patching (Interactive CLI):   Interactive Command Line.
4484
                                                              (line  28)
4485 104 jeremybenn
* regression testing:                    Regression Testing.  (line   6)
4486 19 jeremybenn
* Remote Serial Protocol:                Debug Interface Configuration.
4487
                                                              (line  20)
4488 235 jeremybenn
* Remote Serial Protocol, --nosrv:       Standalone Simulator.
4489 385 jeremybenn
                                                              (line  52)
4490 235 jeremybenn
* Remote Serial Protocol, --srv:         Standalone Simulator.
4491 385 jeremybenn
                                                              (line  60)
4492 432 jeremybenn
* report_interrupt:                      Concepts.            (line  20)
4493 19 jeremybenn
* reset (Interactive CLI):               Interactive Command Line.
4494
                                                              (line  63)
4495
* reset hooks:                           Concepts.            (line  13)
4496
* reset the simulator (Interactive CLI): Interactive Command Line.
4497
                                                              (line  63)
4498
* rev (ATA/ATAPI configuration):         Disc Interface Configuration.
4499 385 jeremybenn
                                                              (line  48)
4500 19 jeremybenn
* rev (CPU configuration):               CPU Configuration.   (line  15)
4501
* rsp_enabled (debug interface configuration): Debug Interface Configuration.
4502
                                                              (line  20)
4503
* rsp_port (debug interface configuration): Debug Interface Configuration.
4504 235 jeremybenn
                                                              (line  32)
4505 19 jeremybenn
* rtx_type (Ethernet configuration):     Ethernet Configuration.
4506 440 jeremybenn
                                                              (line  47)
4507 19 jeremybenn
* run (Interactive CLI):                 Interactive Command Line.
4508
                                                              (line  23)
4509
* running code (Interactive CLI):        Interactive Command Line.
4510
                                                              (line  23)
4511
* running Or1ksim:                       Usage.               (line   6)
4512
* runtime:                               Global Data Structures.
4513
                                                              (line  58)
4514
* runtime global structure:              Global Data Structures.
4515
                                                              (line  58)
4516
* runtime.cpu:                           Global Data Structures.
4517
                                                              (line  62)
4518
* runtime.cpu.fout:                      Concepts.            (line   7)
4519
* runtime.cuc:                           Global Data Structures.
4520
                                                              (line  62)
4521
* runtime.vapi:                          Global Data Structures.
4522
                                                              (line  62)
4523
* rx_channel (Ethernet configuration):   Ethernet Configuration.
4524 440 jeremybenn
                                                              (line  67)
4525 19 jeremybenn
* rxfile (Ethernet configuration):       Ethernet Configuration.
4526 440 jeremybenn
                                                              (line  76)
4527 19 jeremybenn
* sbp_bf_fwd (branch prediction configuration): Branch Prediction Configuration.
4528
                                                              (line  23)
4529
* sbp_bnf_fwd (branch prediction configuration): Branch Prediction Configuration.
4530
                                                              (line  28)
4531 98 jeremybenn
* sbuf_len (CPU configuration):          CPU Configuration.   (line 101)
4532 19 jeremybenn
* SDF (power management register):       Power Management Configuration.
4533
                                                              (line  12)
4534
* section ata:                           Disc Interface Configuration.
4535
                                                              (line   6)
4536
* section bpb:                           Branch Prediction Configuration.
4537
                                                              (line   6)
4538
* section cpio:                          GPIO Configuration.  (line   6)
4539
* section cpu:                           CPU Configuration.   (line   6)
4540
* section cuc:                           CUC Configuration.   (line   6)
4541
* section dc:                            Cache Configuration. (line   6)
4542
* section debug:                         Debug Interface Configuration.
4543
                                                              (line   6)
4544
* section dma:                           DMA Configuration.   (line   6)
4545
* section dmmu:                          Memory Management Configuration.
4546
                                                              (line   6)
4547
* section ethernet:                      Ethernet Configuration.
4548
                                                              (line   6)
4549
* section fb:                            Frame Buffer Configuration.
4550
                                                              (line   6)
4551
* section generic:                       Generic Peripheral Configuration.
4552
                                                              (line   6)
4553
* section ic:                            Cache Configuration. (line   6)
4554
* section immu:                          Memory Management Configuration.
4555
                                                              (line   6)
4556
* section kb:                            Keyboard Configuration.
4557
                                                              (line   6)
4558
* section mc:                            Memory Controller Configuration.
4559
                                                              (line   6)
4560
* section memory:                        Memory Configuration.
4561
                                                              (line   6)
4562
* section pic:                           Interrupt Configuration.
4563
                                                              (line   6)
4564
* section pmu:                           Power Management Configuration.
4565
                                                              (line   6)
4566
* section sim:                           Simulator Behavior.  (line   6)
4567
* section uart:                          UART Configuration.  (line   6)
4568
* section vapi:                          Verification API Configuration.
4569
                                                              (line   6)
4570
* section vga:                           Display Interface Configuration.
4571
                                                              (line   6)
4572
* sections:                              Global Data Structures.
4573
                                                              (line  49)
4574
* sectors (ATA/ATAPI device configuration): Disc Interface Configuration.
4575 385 jeremybenn
                                                              (line 129)
4576 19 jeremybenn
* server_port (verification API configuration): Verification API Configuration.
4577
                                                              (line  19)
4578
* set (Interactive CLI):                 Interactive Command Line.
4579
                                                              (line 146)
4580
* set breakpoint (Interactive CLI):      Interactive Command Line.
4581
                                                              (line  57)
4582
* setdbch (Interactive CLI):             Interactive Command Line.
4583
                                                              (line 141)
4584
* simple model:                          Configuring the Build.
4585 104 jeremybenn
                                                              (line  37)
4586 19 jeremybenn
* simulator configuration:               Simulator Behavior.  (line   6)
4587
* simulator configuration info (Interactive CLI): Interactive Command Line.
4588
                                                              (line 119)
4589
* simulator reset (Interactive CLI):     Interactive Command Line.
4590
                                                              (line  63)
4591
* simulator statistics (Interactive CLI): Interactive Command Line.
4592
                                                              (line  83)
4593
* size (ATA/ATAPI device configuration): Disc Interface Configuration.
4594 385 jeremybenn
                                                              (line 113)
4595 19 jeremybenn
* size (generic peripheral configuration): Generic Peripheral Configuration.
4596
                                                              (line  30)
4597
* size (memory configuration):           Memory Configuration.
4598 418 julius
                                                              (line  99)
4599 19 jeremybenn
* sleep mode (power management register): Power Management Configuration.
4600
                                                              (line  16)
4601
* slow down factor (power management register): Power Management Configuration.
4602
                                                              (line  12)
4603
* SME (power management register):       Power Management Configuration.
4604
                                                              (line  16)
4605
* sr (CPU configuration):                CPU Configuration.   (line  53)
4606
* stall (Interactive CLI):               Interactive Command Line.
4607
                                                              (line  72)
4608
* stall the processor (Interactive CLI): Interactive Command Line.
4609
                                                              (line  72)
4610
* statistics, register over time:        Configuring the Build.
4611 127 jeremybenn
                                                              (line  92)
4612 19 jeremybenn
* statistics, simulation (Interactive CLI): Interactive Command Line.
4613
                                                              (line  83)
4614
* stats (Interactive CLI):               Interactive Command Line.
4615
                                                              (line  83)
4616
* stepping code (Interactive CLI):       Interactive Command Line.
4617
                                                              (line  19)
4618
* store_hitdelay (data cache configuration): Cache Configuration.
4619
                                                              (line  54)
4620
* store_missdelay (data cache configuration): Cache Configuration.
4621
                                                              (line  58)
4622
* SUME (power management register):      Power Management Configuration.
4623
                                                              (line  24)
4624 98 jeremybenn
* superscalar (CPU configuration):       CPU Configuration.   (line  63)
4625 19 jeremybenn
* suspend mode (power management register): Power Management Configuration.
4626
                                                              (line  24)
4627
* t (Interactive CLI):                   Interactive Command Line.
4628
                                                              (line  19)
4629 440 jeremybenn
* TAP device creation:                   Setting Up a Persistent TAP device.
4630
                                                              (line   6)
4631
* tap_dev (Ethernet configuration):      Ethernet Configuration.
4632
                                                              (line  93)
4633 104 jeremybenn
* target test code:                      Regression Testing.  (line  63)
4634 19 jeremybenn
* TCP/IP port range:                     Verification API Configuration.
4635
                                                              (line  23)
4636
* TCP/IP port range for or1ksim-rsp service: Debug Interface Configuration.
4637 235 jeremybenn
                                                              (line  37)
4638 104 jeremybenn
* test code for host:                    Regression Testing.  (line  57)
4639
* test code for target:                  Regression Testing.  (line  63)
4640
* test make file:                        Regression Testing.  (line  27)
4641
* test README:                           Regression Testing.  (line  32)
4642
* testing:                               Regression Testing.  (line   6)
4643 82 jeremybenn
* tests, all enabled.:                   Configuring the Build.
4644 127 jeremybenn
                                                              (line 105)
4645 346 jeremybenn
* timings_file (CUC configuration):      CUC Configuration.   (line  49)
4646 19 jeremybenn
* timings_fn (CUC configuration - deprecated): CUC Configuration.
4647 346 jeremybenn
                                                              (line  49)
4648 19 jeremybenn
* toggle breakpoint (Interactive CLI):   Interactive Command Line.
4649
                                                              (line  57)
4650
* toggle debug channels (Interactive CLI): Interactive Command Line.
4651
                                                              (line 141)
4652
* toggle debug mode (Interactive CLI):   Interactive Command Line.
4653
                                                              (line 151)
4654 442 julius
* trace generation of Or1ksim:           Trace Generation.    (line   6)
4655 19 jeremybenn
* tx_channel (Ethernet configuration):   Ethernet Configuration.
4656 440 jeremybenn
                                                              (line  68)
4657 19 jeremybenn
* txfile (Ethernet configuration):       Ethernet Configuration.
4658 440 jeremybenn
                                                              (line  77)
4659 19 jeremybenn
* txfile (frame buffer configuration):   Frame Buffer Configuration.
4660 82 jeremybenn
                                                              (line  36)
4661 19 jeremybenn
* txfile (VGA configuration):            Display Interface Configuration.
4662
                                                              (line  47)
4663
* type (ATA/ATAPI device configuration): Disc Interface Configuration.
4664 385 jeremybenn
                                                              (line 103)
4665 19 jeremybenn
* type (memory configuration):           Memory Configuration.
4666 385 jeremybenn
                                                              (line  37)
4667 418 julius
* type=exitnops (memory configuration):  Memory Configuration.
4668 420 jeremybenn
                                                              (line  66)
4669 19 jeremybenn
* type=pattern (memory configuration):   Memory Configuration.
4670 385 jeremybenn
                                                              (line  47)
4671 19 jeremybenn
* type=random (memory configuration):    Memory Configuration.
4672 385 jeremybenn
                                                              (line  41)
4673 19 jeremybenn
* type=unknown (memory configuration):   Memory Configuration.
4674 385 jeremybenn
                                                              (line  51)
4675 19 jeremybenn
* type=zero (memory configuration):      Memory Configuration.
4676 385 jeremybenn
                                                              (line  56)
4677 19 jeremybenn
* UART configuration:                    UART Configuration.  (line   6)
4678
* UART I/O from/to a physical serial port: UART Configuration.
4679
                                                              (line  62)
4680
* UART I/O from/to an xterm:             UART Configuration.  (line  38)
4681
* UART I/O from/to files:                UART Configuration.  (line  33)
4682
* UART I/O from/to open file descriptors: UART Configuration. (line  58)
4683
* UART I/O from/to TCP/IP:               UART Configuration.  (line  45)
4684
* UART verification (VAPI):              Verification API.    (line  41)
4685
* unstall (Interactive CLI):             Interactive Command Line.
4686
                                                              (line  78)
4687
* unstall the processor (Interactive CLI): Interactive Command Line.
4688
                                                              (line  78)
4689
* upr (CPU configuration):               CPU Configuration.   (line  21)
4690 432 jeremybenn
* use_nmi (interrupt controller):        Interrupt Configuration.
4691
                                                              (line  30)
4692 19 jeremybenn
* ustates (cache configuration):         Cache Configuration. (line  33)
4693
* ustates (MMU configuration):           Memory Management Configuration.
4694
                                                              (line  41)
4695
* VAPI configuration:                    Verification API Configuration.
4696
                                                              (line   6)
4697
* VAPI for Debug Unit:                   Verification API.    (line  34)
4698
* VAPI for DMA:                          Verification API.    (line  73)
4699
* VAPI for Ethernet:                     Verification API.    (line  78)
4700
* VAPI for GPIO:                         Verification API.    (line  88)
4701
* VAPI for UART:                         Verification API.    (line  41)
4702
* vapi_id (debug interface configuration): Debug Interface Configuration.
4703 235 jeremybenn
                                                              (line  43)
4704 346 jeremybenn
* vapi_id (DMA configuration) <1>:       Ethernet Configuration.
4705 451 jeremybenn
                                                              (line 119)
4706 346 jeremybenn
* vapi_id (DMA configuration):           DMA Configuration.   (line  38)
4707 19 jeremybenn
* vapi_id (GPIO configuration):          GPIO Configuration.  (line  32)
4708
* vapi_id (UART configuration):          UART Configuration.  (line  85)
4709
* vapi_log_file (verification API configuration): Verification API Configuration.
4710
                                                              (line  41)
4711
* vapi_log_fn (verification API configuration - deprecated): Verification API Configuration.
4712
                                                              (line  41)
4713
* ver (CPU configuration):               CPU Configuration.   (line  15)
4714
* verbose (simulator configuration):     Simulator Behavior.  (line  10)
4715
* Verification API configuration:        Verification API Configuration.
4716
                                                              (line   6)
4717
* Verilog memory dump (Interactive CLI): Interactive Command Line.
4718
                                                              (line 124)
4719
* VGA configuration:                     Display Interface Configuration.
4720
 
4721
 
4722
                                                              (line  50)
4723
4724
4725

4726
Tag Table:
4727 450 jeremybenn
Node: Top810
4728
Node: Installation1220
4729
Node: Preparation1467
4730
Node: Configuring the Build1762
4731
Node: Build and Install7902
4732
Node: Known Issues8668
4733
Node: Usage9723
4734
Node: Standalone Simulator9989
4735
Node: Profiling Utility14549
4736
Node: Memory Profiling Utility15455
4737
Node: Trace Generation16815
4738
Node: Simulator Library18057
4739
Node: Ethernet TUN/TAP Interface28489
4740
Node: Setting Up a Persistent TAP device29572
4741
Node: Establishing a Bridge30247
4742
Node: Opening the Firewall31930
4743
Node: Disabling Ethernet Filtering32421
4744
Node: Networking from OpenRISC Linux and BusyBox33046
4745
Node: Tearing Down a Bridge34708
4746
Node: Configuration35451
4747
Node: Configuration File Format36063
4748
Node: Configuration File Preprocessing36448
4749
Node: Configuration File Syntax36745
4750
Node: Simulator Configuration39530
4751
Node: Simulator Behavior39821
4752
Node: Verification API Configuration44402
4753
Node: CUC Configuration46342
4754
Node: Core OpenRISC Configuration48334
4755
Node: CPU Configuration48836
4756
Node: Memory Configuration52955
4757
Node: Memory Management Configuration59677
4758
Node: Cache Configuration62054
4759
Node: Interrupt Configuration64440
4760
Node: Power Management Configuration66273
4761
Node: Branch Prediction Configuration67550
4762
Node: Debug Interface Configuration68910
4763
Node: Peripheral Configuration71253
4764
Node: Memory Controller Configuration71879
4765
Node: UART Configuration75659
4766
Node: DMA Configuration79178
4767
Node: Ethernet Configuration81045
4768 451 jeremybenn
Node: GPIO Configuration86324
4769
Node: Display Interface Configuration87957
4770
Node: Frame Buffer Configuration90266
4771
Node: Keyboard Configuration92130
4772
Node: Disc Interface Configuration94368
4773
Node: Generic Peripheral Configuration99472
4774
Node: Interactive Command Line101767
4775
Node: Verification API108741
4776
Node: Code Internals113171
4777
Node: Coding Conventions113754
4778
Node: Global Data Structures118181
4779
Node: Concepts120838
4780
Ref: Output Redirection120983
4781
Ref: Interrupts Internal121521
4782
Node: Internal Debugging122674
4783
Node: Regression Testing123198
4784
Node: GNU Free Documentation License126987

powered by: WebSVN 2.1.0

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