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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 234 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
* Or1ksim: (or32-uclinux-or1ksim).      The OpenRISC 1000 Architectural
7
                                        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 234 jeremybenn
     tar jxf or1ksim-2010-08-03.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 234 jeremybenn
     ../or1ksim-2010-08-03/configure --target=or32-uclinux ...
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 104 jeremybenn
For testing (using `make check'), the `--target' parameter _must_ be
92
specified, to allow the target tool chain to be selected. If the tools
93
have been installed using the standard OpenRISC script, then this
94
should be set to `or32-elf'.
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
     Historically, `l.xori', has sign extended its operand. This is
141
     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 124 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
     If set, this caused incorrect behavior. Whether or not flags are
195
     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
`or32-uclinux-sim', `or32-uclinux-psim' and `or32-uclinux-mpsim', the
243
Or1ksim library, `libsim', the header file, `or1ksim.h' and this
244
documentation in `info' format.
245
 
246
     Note: Testing Or1ksim with `make check' is not yet supported.
247
 
248
The documentation may be created and installed in alternative formats
249
(PDF, Postscript, DVI, HTML) with for example:
250
 
251
     make pdf
252
     make install-pdf
253
 
254

255
File: or1ksim.info,  Node: Known Issues,  Prev: Build and Install,  Up: Installation
256
 
257
1.4 Known Problems and Issues
258
=============================
259
 
260 143 jeremybenn
The following problems and issues are known about with Or1ksim
261 234 jeremybenn
2010-08-03.  The OpenRISC tracker may be used to see the current state
262 143 jeremybenn
of these issues and to raise new problems and feature requests.  It may
263
be found at `http://www.opencores.org/ptracker.cgi/view/or1k/398'.
264 19 jeremybenn
 
265
   * The Supervision Register Little Endian Enable (LEE) bit is
266 82 jeremybenn
     ignored.  Or1ksim can be built for either little endian or big
267 19 jeremybenn
     endian use, but that behavior cannot be changed dynamically.
268
 
269
   * The NPC is a read/write register, but after being written it
270 82 jeremybenn
     clears the pipeline.  This means that if the processor is stalled,
271 19 jeremybenn
     the value should subsequently read back as 0, until the processor
272 82 jeremybenn
     is unstalled and able to refill its pipeline.  By default Or1ksim
273 19 jeremybenn
     always reports back the value of NPC, even when it has been
274
     written while stalled.
275
 
276
     There is now an option, `--strict-npc', which will enforce this
277 82 jeremybenn
     behavior.  At some stage in the future it will become the default
278 19 jeremybenn
     behavior, but for now it is an option, since its use will break
279
     GDB.
280
 
281
   * The memory components are given names in the configuration file.
282
     However there is currently no way for Or1ksim to report that name
283
     back to the user (for example to identify which memory block
284
     corresponds to a particular access).
285
 
286
   * Or1ksim allows the processor to be stalled (from the command
287 82 jeremybenn
     line), even if there is no debugger present.  This seems to be a
288 19 jeremybenn
     meaningless operation.
289
 
290
   * Or1ksim is not reentrant, so a program cannot instantiate multiple
291 82 jeremybenn
     instances using the library.  This is clearly a problem when
292
     considering multi-core applications.  However it stems from the
293
     original design, and can only be fixed by a complete rewrite.  The
294 19 jeremybenn
     entire source code uses static global constants liberally!
295
 
296 104 jeremybenn
   * There is no support for single precision floating point
297
     instructions in Or1ksim if configured in the CPU (*note CPU
298
     Configuration: CPU Configuration.).  These are implemented using
299
     the floating point support in the host C library, which will
300
     usually be IEEE 745 compliant.  There is at present no support for
301
     double precision floating point instructions, since these are
302
     meaningless with 32-bit registers.
303 19 jeremybenn
 
304 104 jeremybenn
     Floating point support within OpenRISC is intended to follow IEEE
305
     745, which offers a degree of configurability. However at present
306
     the FPSCR register is not supported, so there is no mechanism for
307
     configuring floating point behavior. Thus the default
308
     functionality of the host C library will be used.
309 19 jeremybenn
 
310 104 jeremybenn
   * The single precision floating point multiply and add instruction,
311
     `lf.madd.s', is not clearly specified in the original architectural
312
     manual. User should consult the `OpenRISC 1200 version 2
313
     Supplementary Programmer's Reference Manual' for a specification
314
     of the functionality implemented.
315
 
316
 
317 19 jeremybenn

318
File: or1ksim.info,  Node: Usage,  Next: Configuration,  Prev: Installation,  Up: Top
319
 
320
2 Usage
321
*******
322
 
323
* Menu:
324
 
325
* Standalone Simulator::
326
* Profiling Utility::
327
* Memory Profiling Utility::
328
* Simulator Library::
329
 
330

331
File: or1ksim.info,  Node: Standalone Simulator,  Next: Profiling Utility,  Up: Usage
332
 
333
2.1 Standalone Simulator
334
========================
335
 
336
The general form the standalone command is:
337
 
338
     or32-uclinux-sim [-vhi] [-f FILE] [--nosrv] [--srv=[N]] [-d STR]
339
                      [--enable-profile] [--enable-mprofile] [FILE]
340
 
341 82 jeremybenn
Many of the options have both a short and a long form.  For example
342
`-h' or `--help'.
343 19 jeremybenn
 
344
`-v'
345
`--version'
346
     Print out the version and copyright notice for Or1ksim and exit.
347
 
348
`-h'
349
`--help'
350
     Print out help about the command line options and what they mean.
351
 
352
`-f FILE'
353
`--file FILE'
354
     Read configuration commands from the specified file, looking first
355
     in the current directory, and otherwise in the `$HOME/.or1k'
356 82 jeremybenn
     directory.  If this argument is not specified, the file `sim.cfg'
357
     in those two locations is used.  Failure to find the file is a
358
     fatal error.  *Note Configuration: Configuration, for detailed
359
     information on configuring Or1ksim.
360 19 jeremybenn
 
361
`--nosrv'
362 235 jeremybenn
     Do not start up the "Remote Serial Protocol" debug server.  This
363
     overrides any setting specified in the configuration file.  This
364
     option may not be specified with `--srv'.  If it is, a rude
365
     message is printed and the `--nosrv' option is ignored.
366 19 jeremybenn
 
367
`--srv'
368
 
369
`--srv=N'
370 235 jeremybenn
     Start up the "Remote Serial Protocol" debug server.  This
371
     overrides any setting specified in the configuration file.  If the
372
     parameter, N, is specified, use that as the TCP/IP port for the
373
     server, otherwise a random value from the private port range
374
     (41920-65535) will be used.  This option may not be specified with
375
     `--nosrv'.  If it is, a rude message is printed and the `--nosrv'
376
     option is ignored.
377 19 jeremybenn
 
378
`-d=CONFIG_STRING'
379
`--debug-config=CONFIG_STRING'
380 82 jeremybenn
     Enable selected debug messages in Or1ksim.  This parameter is for
381
     use by developers only, and is not covered further here.  See the
382 19 jeremybenn
     source code for more details.
383
 
384
`-i'
385
`--interactive'
386
     After starting, drop into the Or1ksim interactive command shell.
387
 
388
`--strict-npc'
389
     In real hardware, setting the next program counter (NPC, SPR 16),
390 82 jeremybenn
     flushes the processor pipeline.  The consequence of this is that
391
     until the pipeline refills, reading the NPC will return zero.
392
     This is typically the case when debugging, since the processor is
393 19 jeremybenn
     stalled.
394
 
395
     Historically, Or1ksim has always returned the value of the NPC,
396 82 jeremybenn
     irrespective of when it is changed.  If the `--strict-npc' option
397
     is used, then Or1ksim will mirror real hardware more accurately.
398
     If the NPC is changed while the processor is stalled, subsequent
399 19 jeremybenn
     reads of its value will return 0 until the processor is unstalled.
400
 
401
     This is not currently the default behavior, since tools such as
402
     GDB have been implemented assuming the historic Or1ksim behavior.
403
     However at some time in the future it will become the default.
404
 
405
`--enable-profile'
406
     Enable instruction profiling.
407
 
408
`--enable-mprofile'
409
     Enable memory profiling.
410
 
411
 
412

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

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

511
File: or1ksim.info,  Node: Simulator Library,  Prev: Memory Profiling Utility,  Up: Usage
512
 
513
2.4 Simulator Library
514
=====================
515
 
516
Or1ksim may be used as a static of dynamic library, `libsim.a' or
517 82 jeremybenn
`libsim.so'.  When compiling with the static library, the flag, `-lsim'
518 19 jeremybenn
should be added to the link command.
519
 
520
The header file `or1ksim.h' contains appropriate declarations of the
521 82 jeremybenn
functions exported by the Or1ksim library.  These are:
522 19 jeremybenn
 
523 93 jeremybenn
 -- `or1ksim.h': int or1ksim_init (const char
524
     *CONFIG_FILE, const char *IMAGE_FILE, void *CLASS_PTR, int
525
     (*UPR)(void *CLASS_PTR, unsigned long int ADDR, unsigned char
526
     MASK[], unsigned char RDATA[], int DATA_LEN), int (*UPW)(void
527
     *CLASS_PTR, unsigned long int ADDR, unsigned char MASK[], unsigned
528
     char WDATA[], int DATA_LEN))
529
 
530 19 jeremybenn
     The initialization function is supplied with the name of a
531
     configuration file, CONFIG_FILE, an executable image, IMAGE_FILE,
532
     a pointer to the calling class, CLASS_PTR (since the library may
533
     be used from C++) and two up-call functions, one for reads, UPR,
534
     and one for writes, UPW.
535
 
536
     *Note Configuration: Configuration, for detailed information on
537
     configuring Or1ksim and the format of the configuration file.
538
 
539
     UPW is called for any write to an address external to the model
540 82 jeremybenn
     (determined by a `generic' section in the configuration file).
541
     UPR is called for any reads to an external address.  The CLASS_PTR
542
     is passed back with these upcalls, allowing the function to
543
     associate the call with the class which originally initialized the
544 93 jeremybenn
     library.  Both UPW and UPR should return zero on success and
545
     non-zero otherwise.  At the present time the meaning of non-zero
546
     values is not defined but this may change in the future.
547 19 jeremybenn
 
548 93 jeremybenn
     MASK indicates which bytes in the data are to be written or read.
549 82 jeremybenn
     Bytes to be read/written should have 0xff set in MASK.  Otherwise
550 93 jeremybenn
     the byte should be zero.  The adddress, ADDR, is the _full_
551
     address, since the upcall function must handle all generic
552
     devices, using the full address for decoding.
553 19 jeremybenn
 
554 93 jeremybenn
     Endianness is not completely transparent, since Or1ksim is
555
     transferring byte vectors, not multi-byte values.
556 19 jeremybenn
 
557 93 jeremybenn
          Caution: This is a change from version 0.3.0. It simplifies
558
          the interface, and makes Or1ksim more consistent with payload
559
          representation in SystemC TLM 2.0.
560 19 jeremybenn
 
561 93 jeremybenn
          Note: The current implementation of Or1ksim always transfers
562
          single words (4 bytes), using masks if smaller values are
563
          required.  In this it mimcs the behavior of the WishBone bus.
564
 
565
 
566 19 jeremybenn
 -- `or1ksim.h': int or1ksim_run (double DURATION)
567
     Run the simulator for the simulated duration specified (in
568
     seconds).
569
 
570
 
571
 -- `or1ksim.h': void or1ksim_reset_duration (double DURATION)
572
     Change the duration of a run specified in an earlier call to
573 82 jeremybenn
     `or1ksim_run'.  Typically this is called from an upcall, which
574 19 jeremybenn
     realizes it needs to change the duration of the run specified in
575
     the call to `or1ksim_run' that has been interrupted by the upcall.
576
 
577
     The time specified is the amount of time that the run must continue
578
     for (i.e the duration from _now_, not the duration from the
579
     original call to `or1ksim_run').
580
 
581
 
582
 -- `or1ksim.h': void or1ksim_set_time_point ()
583 82 jeremybenn
     Set a timing point.  For use with `or1ksim_get_time_period'.
584 19 jeremybenn
 
585
 
586
 -- `or1ksim.h': double or1ksim_get_time_period ()
587
     Return the simulated time (in seconds) that has elapsed since the
588
     last call to `or1ksim_set_time_point'.
589
 
590
 
591
 -- `or1ksim.h': int or1ksim_is_le ()
592
     Return 1 (logical true) if the Or1ksim simulation is
593
     little-endian, 0 otherwise.
594
 
595
 
596
 -- `or1ksim.h': unsigned long int or1ksim_clock_rate ()
597 82 jeremybenn
     Return the Or1ksim clock rate (in Hz).  This is the value
598
     specified in the configuration file.
599 19 jeremybenn
 
600
 
601
 -- `or1ksim.h': void or1ksim_interrupt (int I)
602 82 jeremybenn
     Generate an edge-triggered interrupt on interrupt line I.  The
603
     interrupt is then immediately cleared automatically.  A warning
604 19 jeremybenn
     will be generated and the interrupt request ignored if level
605
     sensitive interrupts have been configured with the programmable
606
     interrupt controller (*note Interrupt Configuration: Interrupt
607
     Configuration.).
608
 
609
 
610
 -- `or1ksim.h': void or1ksim_interrupt_set (int I)
611 82 jeremybenn
     Assert a level-triggered interrupt on interrupt line I.  The
612 19 jeremybenn
     interrupt must be cleared separately by an explicit call to
613 82 jeremybenn
     `or1ksim_interrupt_clear'.  A warning will be generated, and the
614 19 jeremybenn
     interrupt request ignored if edge sensitive interrupts have been
615
     configured with the programmable interrupt controller (*note
616
     Interrupt Configuration: Interrupt Configuration.).
617
 
618
 
619
 -- `or1ksim.h': void or1ksim_interrupt_clear (int I)
620
     Clear a level-triggered interrupt on interrupt line I, which was
621 82 jeremybenn
     previously asserted by a call to `or1ksim_interrupt_set'.  A
622 19 jeremybenn
     warning will be generated, and the interrupt request ignored if
623
     edge sensitive interrupts have been configured with the
624
     programmable interrupt controller (*note Interrupt Configuration:
625
     Interrupt Configuration.).
626
 
627
 
628 104 jeremybenn
 -- `or1ksim.h': double or1ksim_jtag_reset ()
629
     Drive a reset sequence through the JTAG interface. Return the
630
     (model) time taken for this action.  Remember that the JTAG has
631
     its own clock, which can be an order of magnitude slower than the
632
     main clock, so even a reset (5 JTAG cycles) could take 50
633
     processor clock cycles to complete.
634
 
635
 
636
 -- `or1ksim.h': double or1ksim_jtag_shift_ir (unsigned
637
     char *JREG, int NUM_BITS)
638
 
639
     Shift the supplied register through the JTAG instruction register.
640
     Return the (model) time taken for this action. The register is
641
     supplied as a byte vector, with the least significant bits in the
642
     least significant byte.  If the total number of bits is not an
643
     exact number of bytes, then the odd bits are found in the least
644
     significant end of the highest numbered byte.
645
 
646
     For example a 12-bit register would have bits 0-7 in byte 0 and
647
     bits 11-8 in the least significant 4 bits of byte 1.
648
 
649
 
650
 -- `or1ksim.h': double or1ksim_jtag_shift_dr (unsigned
651
     char *JREG, int NUM_BITS)
652
 
653
     Shift the supplied register through the JTAG data register.
654
     Return the (model) time taken for this action. The register is
655
     supplied as a byte vector, with the least significant bits in the
656
     least significant byte.  If the total number of bits is not an
657
     exact number of bytes, then the odd bits are found in the least
658
     significant end of the highest numbered byte.
659
 
660
     For example a 12-bit register would have bits 0-7 in byte 0 and
661
     bits 11-8 in the least significant 4 bits of byte 1.
662
 
663
 
664 19 jeremybenn
The libraries will be installed in the `lib' sub-directory of the main
665
installation directory (as specified with the `--prefix' option to the
666
`configure' script).
667
 
668
For example if the main installation directory is `/opt/or1ksim', the
669 82 jeremybenn
library will be found in the `/opt/or1ksim/lib' directory.  It is
670 19 jeremybenn
available as both a static library (`libsim.a') and a shared object
671
(`libsim.so').
672
 
673
To link against the library add the `-lsim' flag when linking and do
674
one of the following:
675
 
676
   * Add the library directory to the `LD_LIBRARY_PATH' environment
677 82 jeremybenn
     variable during execution.  For example:
678 19 jeremybenn
 
679
          export LD_LIBRARY_PATH=/opt/or1ksim/lib:$LD_LIBRARY_PATH
680
 
681
   * Add the library directory to the `LD_RUN_PATH' environment
682 82 jeremybenn
     variable during linking.  For example:
683 19 jeremybenn
 
684
          export LD_RUN_PATH=/opt/or1ksim/lib:$LD_RUN_PATH
685
 
686
   * Use the linker `--rpath' option and specify the library directory
687 82 jeremybenn
     when linking your program.  For example
688 19 jeremybenn
 
689 82 jeremybenn
          gcc ...  -Wl,--rpath -Wl,/opt/or1ksim/lib ...
690 19 jeremybenn
 
691
   * Add the library directory to `/etc/ld.so.conf'
692
 
693
 
694

695
File: or1ksim.info,  Node: Configuration,  Next: Interactive Command Line,  Prev: Usage,  Up: Top
696
 
697
3 Configuration
698
***************
699
 
700 82 jeremybenn
Or1ksim is configured through a configuration file.  This is specified
701 19 jeremybenn
through the `-f' parameter to the Or1ksim command, or passed as a
702 82 jeremybenn
string when initializing the Or1ksim library.  If no file is specified,
703
the default `sim.cfg' is used.  The file is looked for first in the
704 224 jeremybenn
current directory, then in the `$HOME/.or1ksim' directory of the user.
705 19 jeremybenn
 
706
* Menu:
707
 
708
* Configuration File Format::
709
* Simulator Configuration::
710
* Core OpenRISC Configuration::
711
* Peripheral Configuration::
712
 
713

714
File: or1ksim.info,  Node: Configuration File Format,  Next: Simulator Configuration,  Up: Configuration
715
 
716
3.1 Configuration File Format
717
=============================
718
 
719
The configuration file is a plain text file.
720
 
721
* Menu:
722
 
723
* Configuration File Preprocessing::
724
* Configuration File Syntax::
725
 
726

727
File: or1ksim.info,  Node: Configuration File Preprocessing,  Next: Configuration File Syntax,  Up: Configuration File Format
728
 
729
3.1.1 Configuration File Preprocessing
730
--------------------------------------
731
 
732 82 jeremybenn
The configuration file may include C style comments (i.e.  delimited by
733 19 jeremybenn
`/*' and `*/').
734
 
735

736
File: or1ksim.info,  Node: Configuration File Syntax,  Prev: Configuration File Preprocessing,  Up: Configuration File Format
737
 
738
3.1.2 Configuration File Syntax
739
-------------------------------
740
 
741
The configuration file is divided into a series of sections, with the
742
general form:
743
 
744
     section SECTION_NAME
745
 
746
       ...
747
 
748
     end
749
 
750
Sections may also have sub-sections within them (currently only the
751
ATA/ATAPI disc interface uses this).
752
 
753
Within a section, or sub-section are a series of parameter assignments,
754
one per line, withe the general form
755
 
756
       PARAMETER = VALUE
757
 
758
Depending on the parameter, the value may be a named value (an
759
enumeration), an integer (specified in any format acceptable in C) or a
760 82 jeremybenn
string in doubple quotes.  For flag parameters, the value 1 is used to
761
mean "true" or "on" and the value "0" to mean "false" or "off".  An
762 19 jeremybenn
example from a memory section shows each of these
763
 
764
     section memory
765
       type    = random
766
       pattern = 0x00
767
       name    = "FLASH"
768
       ...
769
     end
770
 
771
Many parameters are optional and take reasonable default values if not
772 82 jeremybenn
specified.  However there are some parameters (for example the `ce'
773 19 jeremybenn
parameter in `section memory') _must_ be specified.
774
 
775
Subsections are introduced by a keyword, with a parameter value (no `='
776 82 jeremybenn
sign), and end with the same keyword prefixed by `end'.  Thus the
777 19 jeremybenn
ATA/ATAPI inteface (`section ata') has a `device' subsection, thus:
778
 
779
     section ata
780
       ...
781
       device 0
782
         type    = 1
783
         file = "FILENAME"
784
         ...
785
       enddevice
786
       ...
787
     end
788
 
789
Some sections (for example `section sim') should appear only once.
790
Others (for example `section memory' may appear multiple times.
791
 
792
Sections may be omitted, _unless they contain parameters which are
793 82 jeremybenn
non-optional_.  If the section describes a part of the simulator which
794 19 jeremybenn
is optional (for example whether it has a UART), then that
795 82 jeremybenn
functionality will not be provided.  If the section describes a part of
796 19 jeremybenn
the simulator which is not optional (for example the CPU), then all the
797
parameters of that section will take their default values.
798
 
799
All optional parts of the functionality are always described by
800
sections including a `enabled' parameter, which can be set to 0 to
801
ensure that functionality is explicitly omitted.
802
 
803
Even if a section is disabled, all its parameters will be read and
804 82 jeremybenn
stored.  This is helpful if the section is subsequently enabled from
805
the Or1ksim command line (*note Interactive Command Line: Interactive
806 19 jeremybenn
Command Line.).
807
 
808
     Tip: It generally clearer to have sections describing _all_
809
     components, with omitted functionality explicitly indicated by
810
     setting the `enabled' parameter to 0
811
 
812
The following sections describe the various configuration sections and
813
the parameters which may be set in each.
814
 
815

816
File: or1ksim.info,  Node: Simulator Configuration,  Next: Core OpenRISC Configuration,  Prev: Configuration File Format,  Up: Configuration
817
 
818
3.2 Simulator Configuration
819
===========================
820
 
821
* Menu:
822
 
823
* Simulator Behavior::
824
* Verification API Configuration::
825
* CUC Configuration::
826
 
827

828
File: or1ksim.info,  Node: Simulator Behavior,  Next: Verification API Configuration,  Up: Simulator Configuration
829
 
830
3.2.1 Simulator Behavior
831
------------------------
832
 
833 82 jeremybenn
Simulator behavior is described in `section sim'.  This section should
834
appear only once.  The following parameters may be specified.
835 19 jeremybenn
 
836
`verbose = 0|1'
837 82 jeremybenn
     If 1 (true), print extra messages.  Default 0.
838 19 jeremybenn
 
839
`debug = 0-9'
840 82 jeremybenn
 
841
     higher the value the greater the number of messages.  Default 0.
842
     Negative values will be treated as 0 (with a warning).  Values
843
     that are too large will be treated as 9 (with a warning).
844 19 jeremybenn
 
845
`profile = 0|1'
846
     If 1 (true) generate a profiling file using the file specified in
847 82 jeremybenn
     the `prof_file' parameter or otherwise `sim.profile'.  Default 0.
848 19 jeremybenn
 
849
`prof_file = ``FILENAME'''
850 82 jeremybenn
     Specifies the file to be used with the `profile' parameter.
851
     Default `sim.profile'.  For backwards compatibility, the
852
     alternative name `prof_fn' is supported for this parameter, but
853
     deprecated.
854 19 jeremybenn
 
855
`mprofile = 0|1'
856
     If 1 (true) generate a memory profiling file using the file
857
     specified in the `mprof_file' parameter or otherwise
858 82 jeremybenn
     `sim.mprofile'.  Default 0.
859 19 jeremybenn
 
860
`mprof_fn = ``FILENAME'''
861
     Specifies the file to be used with the `mprofile' parameter.
862 82 jeremybenn
     Default `sim.mprofile'.  For backwards compatibility, the
863 19 jeremybenn
     alternative name `mprof_fn' is supported for this parameter, but
864
     deprecated.
865
 
866
`history = 0|1'
867 82 jeremybenn
     If 1 (true) track execution flow.  Default 0.
868 19 jeremybenn
 
869
          Note: Setting this parameter seriously degrades performance.
870
 
871
          Note: If this execution flow tracking is enabled, then
872
          `dependstats' must be enabled in the CPU configuration
873
          section (*note CPU Configuration: CPU Configuration.).
874
 
875
`exe_log = 0|1'
876 82 jeremybenn
     If 1 (true), generate an execution log.  Log is written to the
877
     file specified in parameter `exe_log_file'.  Default 0.
878 19 jeremybenn
 
879
          Note: Setting this parameter seriously degrades performance.
880
 
881
`exe_log_type = default|hardware|simple|software'
882
     Type of execution log to produce.
883
 
884
    `default'
885 82 jeremybenn
          Produce default output for the execution log.  In the current
886 19 jeremybenn
          implementation this is the equivalent of `hardware'.
887
 
888
    `hardware'
889
          After each instruction execution, log the number of
890
          instructions executed so far, the next instruction to execute
891
          (in hex), the general purpose registers (GPRs), status
892
          register, exception program counter, exception, effective
893
          address register and exception status register.
894
 
895
    `simple'
896
          After each instruction execution, log the number of
897
          instructions executed so far and the next instruction to
898
          execute, symbolically disassembled.
899
 
900
    `software'
901
          After each instruction execution, log the number of
902
          instructions executed so far and the next instruction to
903 82 jeremybenn
          execute, symbolically disassembled.  Also show the value of
904 19 jeremybenn
          each operand to the instruction.
905
 
906
 
907 82 jeremybenn
     Default value `hardware'.  Any unrecognized keyword (case
908 19 jeremybenn
     insensitive) will be treated as the default with a warning.
909
 
910
          Note: Execution logs can be _very_ big.
911
 
912
`exe_log_start = VALUE'
913 82 jeremybenn
     Address of the first instruction to start logging.  Default 0.
914 19 jeremybenn
 
915
`exe_log_end = VALUE'
916 82 jeremybenn
     Address of the last instruction to log.  Default no limit (i.e
917
     once started logging will continue until the simulator exits).
918 19 jeremybenn
 
919
`exe_log_marker = VALUE'
920
     Specifies the number of instructions between printing horizontal
921 82 jeremybenn
     markers.  Default is to produce no markers.
922 19 jeremybenn
 
923
`exe_log_file = FILENAME'
924
     Filename for the execution log filename if `exe_log' is enabled.
925 82 jeremybenn
     Default `executed.log'.  For backwards compatibility, the
926 19 jeremybenn
     alternative name `exe_log_fn' is supported for this parameter, but
927
     deprecated.
928
 
929 202 julius
`exe_bin_insn_log = 0|1'
930
     Enable logging of executed instructions to a file in binary
931
     format. This is helpful for off-line dynamic execution analysis.
932
 
933
          Note: Execution logs can be _very_ big. For example, while
934 220 jeremybenn
          booting the Linux kernel, version 2.6.34, a log file 1.2GB in
935
          size was generated.
936 202 julius
 
937
`exe_bin_insn_log_file = FILENAME'
938
     Filename for the binary execution log filename if
939
     `exe_bin_insn_log' is enabled.  Default `exe-insn.bin'.
940
 
941 19 jeremybenn
`clkcycle = VALUE[ps|ns|us|ms]'
942 82 jeremybenn
     Specify the time taken by one clock cycle.  If no units are
943
     specified, `ps' is assumed.  Default 4000ps (250MHz).
944 19 jeremybenn
 
945
 
946

947
File: or1ksim.info,  Node: Verification API Configuration,  Next: CUC Configuration,  Prev: Simulator Behavior,  Up: Simulator Configuration
948
 
949
3.2.2 Verification API (VAPI) Configuration
950
-------------------------------------------
951
 
952
The Verification API (VAPI) provides a TCP/IP interface to allow
953 82 jeremybenn
components of the simulation to be controlled externally.  *Note
954 19 jeremybenn
Verification API: Verification API, for more details.
955
 
956 82 jeremybenn
Verification API configuration is described in `section vapi'.  This
957
section may appear at most once.  The following parameters may be
958 19 jeremybenn
specified.
959
 
960
`enabled = 0|1'
961
     If 1 (true), verification API is enabled and its server started.
962
     If 0 (the default), it is disabled.
963
 
964
`server_port = VALUE'
965
     When VAPI is enabled, communication will be via TCP/IP on the port
966 82 jeremybenn
     specified by VALUE.  The value must lie in the range 1 to 65535.
967 19 jeremybenn
     The default value is 50000.
968
 
969 82 jeremybenn
          Tip: There is no registered port for Or1ksim VAPI.  Good
970 19 jeremybenn
          practice suggests users should adopt port values in the
971 82 jeremybenn
          "Dynamic" or "Private" port range, i.e.  49152-65535.
972 19 jeremybenn
 
973
`log_enabled = 0|1'
974
     If 1 (true), all VAPI requests and sent commands will be logged.
975 82 jeremybenn
     If 0 (the default), logging is diabled.  Logs are written to the
976 19 jeremybenn
     file specified by the `vapi_log_file' field (see below).
977
 
978
          Caution: This can generate a substantial amount of file I/O
979
          and seriously degrade simulator performance.
980
 
981
`hide_device_id = 0|1'
982 82 jeremybenn
     If 1 (true) don't log the device ID.  If 0 (the default), log the
983
     device ID.  This feature (when set to 1) is provided for backwards
984 19 jeremybenn
     compatibility with an old version of VAPI.
985
 
986
`vapi_log_file = "FILENAME"'
987
     Use `filename' as the file for logged data is logging is enabled
988 82 jeremybenn
     (see `log_enabled' above).  The default is `"vapi.log"'.  For
989 19 jeremybenn
     backwards compatibility, the alternative name `vapi_log_fn' is
990
     supported for this parameter, but deprecated.
991
 
992
 
993

994
File: or1ksim.info,  Node: CUC Configuration,  Prev: Verification API Configuration,  Up: Simulator Configuration
995
 
996
3.2.3 Custom Unit Compiler (CUC) Configuration
997
----------------------------------------------
998
 
999
The Custom Unit Compiler (CUC) was a project by Marko Mlinar to generate
1000 82 jeremybenn
Verilog from ANSI C functions.  The project seems to not have progressed
1001
beyond the initial prototype phase.  The configuration parameters are
1002 19 jeremybenn
described here for the record.
1003
 
1004 82 jeremybenn
CUC configuration is described in `section cuc'.  This section may
1005
appear at most once.  The following parameters may be specified.
1006 19 jeremybenn
 
1007
`memory_order = none|weak|strong|exact'
1008
     This parameter specifies the memory ordering required:
1009
 
1010
    `memory_order=none'
1011
          Different memory ordering, even if there are dependencies.
1012
          Bursts can be made, width can change.
1013
 
1014 82 jeremybenn
          Different memory ordering, even if there are dependencies.  If
1015 19 jeremybenn
          dependencies cannot occur, then bursts can be made, width can
1016
          change.
1017
 
1018 82 jeremybenn
          Same memory ordering.  Bursts can be made, width can change.
1019 19 jeremybenn
 
1020
          Exactly the same memory ordering and widths.
1021
 
1022
 
1023 82 jeremybenn
     The default value is `memory_order=exact'.  Invalid memory
1024 19 jeremybenn
     orderings are ignored with a warning.
1025
 
1026
`calling_convention = 0|1'
1027 82 jeremybenn
     If 1 (true), programs follow OpenRISC calling conventions.  If 0
1028 19 jeremybenn
     (the default), they may use other convenitions.
1029
 
1030
`enable_bursts = 0 | 1'
1031 82 jeremybenn
     If 1 (true), bursts are detected.  If 0 (the default), bursts are
1032 19 jeremybenn
     not detected.
1033
 
1034
`no_multicycle = 0 | 1'
1035 82 jeremybenn
     If 1 (true), no multicycle logic paths will be generated.  If 0
1036
     (the default), multicycle logic paths will be generated.
1037 19 jeremybenn
 
1038
`timings_file = "FILENAME"'
1039 82 jeremybenn
     FILENAME specifies a file containing timing information.  The
1040
     default value is `"virtex.tim"'.  For backwards compatibility, the
1041 19 jeremybenn
     alternative name `timings_fn' is supported for this parameter, but
1042
     deprecated.
1043
 
1044
 
1045

1046
File: or1ksim.info,  Node: Core OpenRISC Configuration,  Next: Peripheral Configuration,  Prev: Simulator Configuration,  Up: Configuration
1047
 
1048
3.3 Configuring the OpenRISC Architectural Components
1049
=====================================================
1050
 
1051
* Menu:
1052
 
1053
* CPU Configuration::
1054
* Memory Configuration::
1055
* Memory Management Configuration::
1056
* Cache Configuration::
1057
* Interrupt Configuration::
1058
* Power Management Configuration::
1059
* Branch Prediction Configuration::
1060
* Debug Interface Configuration::
1061
 
1062

1063
File: or1ksim.info,  Node: CPU Configuration,  Next: Memory Configuration,  Up: Core OpenRISC Configuration
1064
 
1065
3.3.1 CPU Configuration
1066
-----------------------
1067
 
1068 82 jeremybenn
CPU configuration is described in `section cpu'.  This section should
1069
appear only once.  At present Or1ksim does not model multi-CPU systems.
1070 19 jeremybenn
The following parameters may be specified.
1071
 
1072
`ver = VALUE'
1073
 
1074
`cfg = VALUE'
1075
 
1076
`rev = VALUE'
1077
     The values are used to form the corresponding fields in the `VR'
1078 82 jeremybenn
     Special Purpose Register (SPR 0).  Default values 0.  A warning is
1079 19 jeremybenn
     given and the value truncated if it is too large (8 bits for `ver'
1080
     and `cfg', 6 bits for `rev').
1081
 
1082
`upr = VALUE'
1083
     Used as the value of the Unit Present Register (UPR) Special
1084 82 jeremybenn
     Purpose Register (SPR 1) to VALUE.  Default value is 0x0000075f,
1085 19 jeremybenn
     i.e.
1086
        * UPR present (0x00000001)
1087
 
1088
        * Data cache present (0x00000002)
1089
 
1090
        * Instruction cache present (0x00000004)
1091
 
1092
        * Data MMY present (0x00000008)
1093
 
1094
        * Instruction MMU present (0x00000010)
1095
 
1096
        * Debug unit present (0x00000040)
1097
 
1098
        * Power management unit present (0x00000100)
1099
 
1100
        * Programmable interrupt controller present (0x00000200)
1101
 
1102
        * Tick timer present (0x00000400)
1103
 
1104
     However, with the exection of the UPR present (0x00000001) and tick
1105
     timer present, the various fields will be modified with the values
1106
     specified in their corresponding configuration sections.
1107
 
1108
`cfgr = VALUE'
1109
     Sets the CPU configuration register (Special Purpose Register 2) to
1110 82 jeremybenn
     VALUE.  Default value is 0x00000020, i.e.  support for the ORBIS32
1111
     instruction set.  Attempts to set any other value are accepted, but
1112 19 jeremybenn
     issue a warning that there is no support for the instruction set.
1113
 
1114
`sr = VALUE'
1115
     Sets the supervision register Special Purpose Register (SPR 0x11)
1116 82 jeremybenn
     to VALUE.  Default value is 0x00008001, i.e.  start in supervision
1117 19 jeremybenn
     mode (0x00000001) and set the "Fixed One" bit (0x00008000).
1118
 
1119 98 jeremybenn
          Note: This is particularly useful when an image is held in
1120
          Flash at high memory (0xf0000000).  The EPH  bit can be set,
1121
          so that interrupt vectors are basedf at 0xf0000000, rather
1122
          than 0x0.
1123
 
1124 19 jeremybenn
`superscalar = 0|1'
1125 82 jeremybenn
     If 1, the processor operates in superscalar mode.  Default value is
1126 19 jeremybenn
     0.
1127
 
1128
     In the current simulator, the only functional effect of superscalar
1129
     mode is to affect the calculation of the number of cycles taken to
1130
     execute an instruction.
1131
 
1132
          Caution: The code for this does not appear to be complete or
1133
          well tested, so users are advised not to use this option.
1134
 
1135
`hazards = 0|1'
1136 82 jeremybenn
     If 1, data hazards are tracked in a superscalar CPU.  Default
1137
     value is 0.
1138 19 jeremybenn
 
1139
     In the current simulator, the only functional effect is to cause
1140
     logging of hazard waiting information if the CPU is superscalar.
1141
     However nowhere in the simulator is this data actually computed,
1142
     so the net result is probably to have no effect.
1143
 
1144
     if harzards are tracked, current hazards can be displayed using the
1145
     simulator's `r' command.
1146
 
1147
          Caution: The code for this does not appear to be complete or
1148
          well tested, so users are advised not to use this option.
1149
 
1150
`dependstats = 0|1'
1151 82 jeremybenn
     If 1, inter-instruction dependencies are calculated.  Default
1152
     value 0.
1153 19 jeremybenn
 
1154
     If these values are calculated, the depencies can be displayed
1155
     using the simulator's `stat' command.
1156
 
1157
          Note: This field must be enabled, if execution execution flow
1158
          tracking (field `history') has been requested in the simulator
1159
          configuration section (*note Simulator Behavior: Simulator
1160
          Behavior.).
1161
 
1162
`sbuf_len = VALUE'
1163
     The length of the store buffer is set to VALUE, which must be no
1164 82 jeremybenn
     greater than 256.  Larger values will be truncated to 256 with a
1165
     warning.  Negative values will be treated as 0 with a warning.
1166
     Use 0 to disable the store buffer.
1167 19 jeremybenn
 
1168
     When the store buffer is active, stores are accumulated and
1169
     committed when I/O is idle.
1170
 
1171 100 julius
`hardfloat = 0|1'
1172
     If 1, hardfloat instructions are enabled. Default value 0.
1173 19 jeremybenn
 
1174 104 jeremybenn
 
1175 19 jeremybenn

1176
File: or1ksim.info,  Node: Memory Configuration,  Next: Memory Management Configuration,  Prev: CPU Configuration,  Up: Core OpenRISC Configuration
1177
 
1178
3.3.2 Memory Configuration
1179
--------------------------
1180
 
1181 82 jeremybenn
Memory configuration is described in `section memory'.  This section
1182 98 jeremybenn
may appear multiple times, specifying multiple blocks of memory.
1183 19 jeremybenn
 
1184 98 jeremybenn
     Caution: The user may choose whether or not to enable a memory
1185
     controller. If a memory controller is enabled, then the standard
1186
     OpenRISC C libraries will initialize it to expect 64MB memory
1187
     blocks, and any memory declarations _must_ reflect this.  The
1188
     section describing memory controller configuration describes the
1189
     steps necessary for using smaller or larger memory sections (*note
1190
     Memory Controller Configuration: Memory Controller Configuration.).
1191
 
1192
     If a memory controller is _not_ enabled, then the standard C
1193
     library code will generate memory access errors.  The solution is
1194
     to declare an additional writable memory block, mimicing the memory
1195
     controller's register bank as follows.
1196
 
1197
          section memory
1198
            pattern = 0x00
1199
            type = unknown
1200
            name = "MC shadow"
1201
            baseaddr = 0x93000000
1202
            size     = 0x00000080
1203
            delayr = 2
1204
            delayw = 4
1205
          end
1206
 
1207
 
1208
The following parameters may be specified.
1209
 
1210 19 jeremybenn
`type=random|pattern|unknown|zero'
1211 82 jeremybenn
     Specifies the values to which memory should be initialized.  The
1212 19 jeremybenn
     default value is `unknown'.
1213
 
1214
    `random'
1215 82 jeremybenn
          Set the memory values to be a random value.  A seed for the
1216 19 jeremybenn
          random generator may be set using the `random_seed' field in
1217
          this section (see below), thus ensuring the same "random"
1218
          values are used each time.
1219
 
1220
    `pattern'
1221
          Set the memory values to be a pattern value, which is set
1222
          using the `pattern' field in this section (see below).
1223
 
1224
    `unknown'
1225 82 jeremybenn
          The memory values are not initialized (i.e.  left "unknown").
1226 19 jeremybenn
          This option will yield faster initialization of the simulator.
1227
 
1228
    `zero'
1229 82 jeremybenn
          Set the memory values to be 0.  This is the equivalent of
1230 19 jeremybenn
          `type=pattern' and a `pattern' value of 0, and implemented as
1231
          such.
1232
 
1233
               Note: As a consequence, if the `pattern' field is
1234
               _subsequently_ specified in this section, the value in
1235
               that field will be used instead of zero to initialize
1236
               the memory.
1237
 
1238
 
1239
`random_seed = VALUE'
1240 82 jeremybenn
     Set the seed for the random number generator to VALUE.  This only
1241 19 jeremybenn
     has any effect for memory type `random'.
1242
 
1243
     The default value is -1, which means the seed will be set from a
1244
     call to the `time' function, thus ensuring different random values
1245 82 jeremybenn
     are used on each run.  The simulator prints out the seed used in
1246 19 jeremybenn
     this case, allowing repeat runs to regenerate the same random
1247
     values used in any particular run.
1248
 
1249
`pattern = VALUE'
1250 82 jeremybenn
     Set the pattern to be used when initializing memory to VALUE.  The
1251
     default value is 0.  This only has any effect for memory type
1252
     `pattern'.  The least significant 8 bits of this value is used to
1253
     initialize each byte.  More than 8 bits can be specified, but will
1254 19 jeremybenn
     ignored with a warning.
1255
 
1256
          Tip: The default value, is equivalent to setting the memory
1257 82 jeremybenn
          `type' to be `zero'.  If that is what is intended, then using
1258 19 jeremybenn
          `type=zero' explicitly is better than using `type=pattern'
1259
          and not specifying a value for `pattern'.
1260
 
1261
`baseaddr = VALUE'
1262 82 jeremybenn
     Set the base address of the memory to VALUE.  It should be aligned
1263 19 jeremybenn
     to a multiple of the memory size rounded up to the nearest 2^n.
1264
     The default value is 0.
1265
 
1266
`size = VALUE'
1267 82 jeremybenn
     Set the size of the memory block to be VALUE bytes.  This should
1268
     be a multiple of 4 (i.e.  word aligned).  The default value is
1269
     1024.
1270 19 jeremybenn
 
1271
          Note: When allocating memory, the simulator will allocate the
1272
          nearest 2^n bytes greater than or equal to VALUE, and will not
1273
          notice memory misses in any part of the memory between VALUE
1274
          and the amount allocated.
1275
 
1276
          As a consequence users are strongly recommended to specify
1277 82 jeremybenn
          memory sizes that are an exact power of 2.  If some other
1278 19 jeremybenn
          amount of memory is required, it should be specified as
1279
          separate, contiguous blocks, each of which is a power of 2 in
1280
          size.
1281
 
1282
`name = "TEXT"'
1283 82 jeremybenn
     Name the block.  Typically these describe the type of memory being
1284
     modeled (thus `"SRAM"' or `"Flash"'.  The default is
1285 19 jeremybenn
     `"anonymous memory block"'.
1286
 
1287
          Note: It is not clear that this information is currently ever
1288 82 jeremybenn
          used in normal operation of the simulator.  Even the `info'
1289 19 jeremybenn
          command of the simulator ignores it.
1290
 
1291
`ce = VALUE'
1292 82 jeremybenn
     Set the chip enable index of the memory instance.  Each memory
1293 19 jeremybenn
     instance should have a unique chip enable index, which should be
1294 82 jeremybenn
     greater than or equal to zero.  This is used by the memory
1295 19 jeremybenn
     controller when identifying different memory instances.
1296
 
1297 98 jeremybenn
     There is no requirement to set  `ce' if a memory controller is not
1298
     enabled. The default value is -1 (invalid).
1299 19 jeremybenn
 
1300
`mc = VALUE'
1301 82 jeremybenn
     Specifies the memory controller this memory is connected to.  It
1302 19 jeremybenn
     should correspond to the `index' field specified in a `section mc'
1303
     for a memory controller (*note Memory Controller Configuration:
1304
     Memory Controller Configuration.).
1305
 
1306 98 jeremybenn
     There is no requirement to set  `mc' if a memory controller is not
1307
     enabled. Default value is 0, which is also the default value of a
1308
     memory controller `index' field.  This is suitable therefore for
1309
     designs with just one memory controller.
1310 19 jeremybenn
 
1311
`delayr = VALUE'
1312 82 jeremybenn
     The number of cycles required for a read access.  Set to -1 if the
1313
     memory does not support reading.  Default value 1.  The simulator
1314 19 jeremybenn
     will add this number of cycles to the total instruction cycle
1315
     count when reading from main memory.
1316
 
1317
`delayw = VALUE'
1318 82 jeremybenn
     The number of cycles required for a write access.  Set to -1 if the
1319
     memory does not support writing.  Default value 1.  The simulator
1320 19 jeremybenn
     will add this number of cycles to the total instruction cycle
1321
     count when writing to main memory.
1322
 
1323
`log = "FILE"'
1324
     If specified, `file' names a file for all memory accesses to be
1325 82 jeremybenn
     logged.  If not specified, the default value, NULL is used, meaning
1326 19 jeremybenn
     that the memory is not logged.
1327
 
1328
 
1329

1330
File: or1ksim.info,  Node: Memory Management Configuration,  Next: Cache Configuration,  Prev: Memory Configuration,  Up: Core OpenRISC Configuration
1331
 
1332
3.3.3 Memory Management Configuration
1333
-------------------------------------
1334
 
1335
Memory Management Unit (MMU) configuration is described in `section
1336
dmmu' (for the data MMU) and `section immu' (for the instruction MMU).
1337 82 jeremybenn
Each section should appear at most once.  The following parameters may
1338 19 jeremybenn
be specified.
1339
 
1340
`enabled = 0|1'
1341
     If 1 (true), the data or instruction (as appropriate) MMU is
1342 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1343 19 jeremybenn
 
1344
`nsets = VALUE'
1345
     Sets the number of data or instruction (as appropriate) TLB sets to
1346 82 jeremybenn
     VALUE, which must be a power of two, not exceeding 128.  Values
1347
     which do not fit these criteria are ignored with a warning.  The
1348 19 jeremybenn
     default value is 1.
1349
 
1350
`nways = VALUE'
1351
     Sets the number of data or instruction (as appropriate) TLB ways to
1352 82 jeremybenn
     VALUE.  The value must be in the range 1 to 4.  Values outside
1353
     this range are ignored with a warning.  The default value is 1.
1354 19 jeremybenn
 
1355
`pagesize = VALUE'
1356
     The data or instruction (as appropriate) MMU page size is set to
1357 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1358
     of 2 are ignored with a warning.  The default is 8192 (0x2000).
1359 19 jeremybenn
 
1360
`entrysize = VALUE'
1361
     The data or instruction (as appropriate) MMU entry size is set to
1362 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1363
     of 2 are ignored with a warning.  The default value is 1.
1364 19 jeremybenn
 
1365
          Note: Or1ksim does not appear to use the `entrysize' parameter
1366 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1367 19 jeremybenn
          not seem to matter.
1368
 
1369
`ustates = VALUE'
1370
     The number of instruction usage states for the data or instruction
1371
     (as appropriate) MMU is set to VALUE, which must be 2, 3 or 4.
1372 82 jeremybenn
     Values outside this range are ignored with a warning.  The default
1373 19 jeremybenn
     value is 2.
1374
 
1375
          Note: Or1ksim does not appear to use the `ustates' parameter
1376 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1377 19 jeremybenn
          not seem to matter.
1378
 
1379
`hitdelay = VALUE'
1380
     Set the number of cycles a data or instruction (as appropriate) MMU
1381 82 jeremybenn
     hit costs.  Default value 1.
1382 19 jeremybenn
 
1383
`missdelay = VALUE'
1384
     Set the number of cycles a data or instruction (as appropriate) MMU
1385 82 jeremybenn
     miss costs.  Default value 1.
1386 19 jeremybenn
 
1387
 
1388

1389
File: or1ksim.info,  Node: Cache Configuration,  Next: Interrupt Configuration,  Prev: Memory Management Configuration,  Up: Core OpenRISC Configuration
1390
 
1391
3.3.4 Cache Configuration
1392
-------------------------
1393
 
1394
Cache configuration is described in `section dc' (for the data cache)
1395 82 jeremybenn
and `seciton ic' (for the instruction cache).  Each section should
1396
appear at most once.  The following parameters may be specified.
1397 19 jeremybenn
 
1398
`enabled = 0|1'
1399
     If 1 (true), the data or instruction (as appropriate) cache is
1400 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1401 19 jeremybenn
 
1402
`nsets = VALUE'
1403
     Sets the number of data or instruction (as appropriate) cache sets
1404
     to VALUE, which must be a power of two, not exceeding
1405
     `MAX_DC_SETS' (for the data cache) or `MAX_IC_SETS' (for the
1406 82 jeremybenn
     instruction cache).  At the time of writing, these constants are
1407
     both defined in the code to be 1024).  The default value is 1.
1408 19 jeremybenn
 
1409
`nways = VALUE'
1410
     Sets the number of data or instruction (as appropriate) cache ways
1411
     to VALUE, which must be a power of two, not exceeding
1412
     `MAX_DC_WAYS' (for the data cache) or `MAX_IC_WAYS' (for the
1413 82 jeremybenn
     instruction cache).  At the time of writing, these constants are
1414
     both defined in the code to be 32).  The default value is 1.
1415 19 jeremybenn
 
1416
`blocksize = VALUE'
1417
     The data or instruction (as appropriate) cache block size is set to
1418 82 jeremybenn
     VALUE bytes, which must be either 16 or 32.  The default is 16.
1419 19 jeremybenn
 
1420
`ustates = VALUE'
1421
     The number of instruction usage states for the data or instruction
1422
     (as appropriate) cache is set to VALUE, which must be 2, 3 or 4.
1423
     The default value is 2.
1424
 
1425
`hitdelay = VALUE'
1426 82 jeremybenn
     _Instruction cache only_.  Set the number of cycles an instruction
1427
     cache hit costs.  Default value 1.
1428 19 jeremybenn
 
1429
`missdelay = VALUE'
1430 82 jeremybenn
     _Instruction cache only_.  Set the number of cycles an instruction
1431
     cache miss costs.  Default value 1.
1432 19 jeremybenn
 
1433
`load_hitdelay = VALUE'
1434 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data load cache hit
1435
     costs.  Default value 2.
1436 19 jeremybenn
 
1437
`load_missdelay = VALUE'
1438 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data load cache
1439
     miss costs.  Default value 2.
1440 19 jeremybenn
 
1441
`store_hitdelay = VALUE'
1442 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data store cache hit
1443
     costs.  Default value 0.
1444 19 jeremybenn
 
1445
`store_missdelay = VALUE'
1446 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data store cache
1447
     miss costs.  Default value 0.
1448 19 jeremybenn
 
1449
 
1450

1451
File: or1ksim.info,  Node: Interrupt Configuration,  Next: Power Management Configuration,  Prev: Cache Configuration,  Up: Core OpenRISC Configuration
1452
 
1453
3.3.5 Interrupt Configuration
1454
-----------------------------
1455
 
1456
Programmable Interrupt Controller (PIC) configuration is described in
1457 82 jeremybenn
`section pic'.  This section may appear at most once--Or1ksim has no
1458
mechanism for handling multiple interrupt controllers.  The following
1459 19 jeremybenn
parameters may be specified.
1460
 
1461
`enabled = 0|1'
1462 82 jeremybenn
     If 1 (true), the programmable interrupt controller is enabled.  If
1463
 
1464 19 jeremybenn
 
1465
`edge_trigger = 0|1'
1466
     If 1 (true, the default), the programmable interrupt controller is
1467 82 jeremybenn
     edge triggered.  If 0 (false), it is level triggered.
1468 19 jeremybenn
 
1469
 
1470

1471
File: or1ksim.info,  Node: Power Management Configuration,  Next: Branch Prediction Configuration,  Prev: Interrupt Configuration,  Up: Core OpenRISC Configuration
1472
 
1473
3.3.6 Power Management Configuration
1474
------------------------------------
1475
 
1476 82 jeremybenn
Power management implementation is incomplete.  At present the effect
1477 19 jeremybenn
(which only happens when the power management unit is enabled) of
1478
setting the different bits in the power management Special Purpose
1479
Register (PMR, SPR 0x4000) is
1480
 
1481
`SDF (bit mask 0x0000000f)'
1482
     No effect - these bits are ignored
1483
 
1484
`DME (bit mask 0x00000010)'
1485
`SME (bit mask 0x00000020)'
1486
     Both these bits cause the processor to stop executing
1487 82 jeremybenn
     instructions.  However all other functions (debug interaction, CLI,
1488 19 jeremybenn
     VAPI etc) carry on as normal.
1489
 
1490
`DCGE (bit mask 0x00000004)'
1491
     No effect - this bit is ignored
1492
 
1493
`SUME (bit mask 0x00000008)'
1494
     Enabling this bit causes a message to be printed, advising that the
1495
     processor is suspending and the simulator exits.
1496
 
1497
 
1498
On reset all bits are cleared.
1499
 
1500 82 jeremybenn
Power management configuration is described in `section pm'.  This
1501
section may appear at most once.  The following parameter may be
1502 19 jeremybenn
specified.
1503
 
1504
`enabled = 0|1'
1505 82 jeremybenn
     If 1 (true), power management is enabled.  If 0 (the default), it
1506
     is disabled.
1507 19 jeremybenn
 
1508
 
1509

1510
File: or1ksim.info,  Node: Branch Prediction Configuration,  Next: Debug Interface Configuration,  Prev: Power Management Configuration,  Up: Core OpenRISC Configuration
1511
 
1512
3.3.7 Branch Prediction Configuration
1513
-------------------------------------
1514
 
1515
From examining the code base, it seems the branch prediction function
1516 82 jeremybenn
is not fully implemented.  At present the functionality seems
1517
restricted to collection of statistics.
1518 19 jeremybenn
 
1519 82 jeremybenn
Branch prediction configuration is described in `section bpb'.  This
1520
section may appear at most once.  The following parameters may be
1521 19 jeremybenn
specified.
1522
 
1523
`enabled = 0|1'
1524 82 jeremybenn
     If 1 (true), branch prediction is enabled.  If 0 (the default), it
1525 19 jeremybenn
     is disabled.
1526
 
1527
`btic = 0|1'
1528
     If 1 (true), the branch target instruction cache model is enabled.
1529
     If 0 (the default), it is disabled.
1530
 
1531
`sbp_bf_fwd = 0|1'
1532 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bf' instruction.  If
1533 19 jeremybenn
 
1534
     instruction.
1535
 
1536
`sbp_bnf_fwd = 0|1'
1537 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bnf' instruction.
1538
     If 0 (the default), do not use forward prediction for this
1539 19 jeremybenn
     instruction.
1540
 
1541
`hitdelay = VALUE'
1542 82 jeremybenn
     Set the number of cycles a branch prediction hit costs.  Default
1543 19 jeremybenn
     value 0.
1544
 
1545
`missdelay = VALUE'
1546 82 jeremybenn
     Set the number of cycles a branch prediction miss costs.  Default
1547 19 jeremybenn
     value 0.
1548
 
1549
 
1550

1551
File: or1ksim.info,  Node: Debug Interface Configuration,  Prev: Branch Prediction Configuration,  Up: Core OpenRISC Configuration
1552
 
1553
3.3.8 Debug Interface Configuration
1554
-----------------------------------
1555
 
1556
The debug unit and debug interface configuration is described in
1557 82 jeremybenn
`section debug'.  This section may appear at most once.  The following
1558 19 jeremybenn
parameters may be specified.
1559
 
1560
`enabled = 0|1'
1561 82 jeremybenn
     If 1 (true), the debug unit is enabled.  If 0 (the default), it is
1562 19 jeremybenn
     disabled.
1563
 
1564
          Note: This enables the functionality of the debug unit (its
1565 82 jeremybenn
          registers etc) within the mode.  It does not provide any
1566
          external interface to the debug unit.  For that, see
1567 235 jeremybenn
          `rsp_enabled' below.
1568 19 jeremybenn
 
1569
`rsp_enabled = 0|1'
1570
     If 1 (true), the GDB "Remote Serial Protocol" server is started,
1571
     provding an interface to an external GNU debugger, using the port
1572
     specified in the `rsp_port' field (see below), or the
1573 82 jeremybenn
     `or1ksim-rsp' TCP/IP service.  If 0 (the default), the server is
1574 19 jeremybenn
     not started, and no external interface is provided.
1575
 
1576
     For more detailed information on the interface to the GNU Debugger
1577
     see Embecosm Application Note 2, `Howto: Porting the GNU Debugger
1578
     Practical Experience with the OpenRISC 1000 Architecture', by
1579
     Jeremy Bennett, published by Embecosm Limited (`www.embecosm.com').
1580
 
1581
`rsp_port = VALUE'
1582
     VALUE specifies the port to be used for the GDB "Remote Serial
1583 82 jeremybenn
     Protocol" interface to the GNU Debugger (GDB).  Default value
1584
     51000.  If the value 0 is specified, Or1ksim will instead look for
1585 19 jeremybenn
     a TCP/IP service named `or1ksim-rsp'.
1586
 
1587
          Tip: There is no registered port for Or1ksim "Remote Serial
1588 82 jeremybenn
          Protocol" service `or1ksim-rsp'.  Good practice suggests
1589
          users should adopt port values in the "Dynamic" or "Private"
1590
          port range, i.e.  49152-65535.
1591 19 jeremybenn
 
1592
`vapi_id = VALUE'
1593
     VALUE specifies the value of the Verification API (VAPI) base
1594 82 jeremybenn
     address to be used with the debug unit.  *Note Verification API:
1595 19 jeremybenn
     Verification API, for more details.
1596
 
1597
     If this is specified and VALUE is non-zero, all OpenRISC Remote
1598
     JTAG protocol transactions will be logged to the VAPI log file, if
1599 82 jeremybenn
     enabled.  This is the only functionality associated with VAPI for
1600
     the debug unit.  No VAPI commands are sent, nor requests handled.
1601 19 jeremybenn
 
1602
 
1603

1604
File: or1ksim.info,  Node: Peripheral Configuration,  Prev: Core OpenRISC Configuration,  Up: Configuration
1605
 
1606
3.4 Configuring Memory Mapped Peripherals
1607
=========================================
1608
 
1609 82 jeremybenn
All peripheral components are optional.  If they are specified, then
1610 19 jeremybenn
(unlike other components) by default they are enabled.
1611
 
1612
* Menu:
1613
 
1614
* Memory Controller Configuration::
1615
* UART Configuration::
1616
* DMA Configuration::
1617
* Ethernet Configuration::
1618
* GPIO Configuration::
1619
* Display Interface Configuration::
1620
* Frame Buffer Configuration::
1621
* Keyboard Configuration::
1622
* Disc Interface Configuration::
1623
* Generic Peripheral Configuration::
1624
 
1625

1626
File: or1ksim.info,  Node: Memory Controller Configuration,  Next: UART Configuration,  Up: Peripheral Configuration
1627
 
1628
3.4.1 Memory Controller Configuration
1629
-------------------------------------
1630
 
1631
The memory controller used in Or1ksim is the component implemented at
1632 98 jeremybenn
OpenCores, and found in the top level SVN directory, `mem_ctrl'.  It is
1633 19 jeremybenn
described in the document `Memory Controller IP Core' by Rudolf
1634 82 jeremybenn
Usselmann, which can be found in the `doc' subdirectory.  It is a
1635
memory mapped component, which resides on the main OpenRISC Wishbone
1636
data bus.
1637 19 jeremybenn
 
1638 82 jeremybenn
The memory controller configuration is described in `section mc'.  This
1639 19 jeremybenn
section may appear multiple times, specifying multiple memory
1640 98 jeremybenn
controllers.
1641 19 jeremybenn
 
1642 98 jeremybenn
     Caution: The standard OpenRISC C libraries will initialize the
1643
     memory controller to expect 64MB memory blocks, and any memory
1644
     declarations _must_ reflect this.
1645
 
1646
     If smaller memory blocks are declared with a memory controller,
1647
     then sufficient memory will not be allocated by Or1ksim, but out of
1648
     range memory accesses will not be trapped. For example declaring a
1649
     memory section from 0-4MB with a memory controller enabled would
1650
     mean that accesses between 4MB and 64MB would be permitted, but
1651
     having no allocated memory would likely cause a segmentation fault.
1652
 
1653
     If the user is determined to use smaller memories with the memory
1654
     controller, then custom initialization code must be provided, to
1655
     ensure the memory controller traps out-of-memory accesses.
1656
 
1657
The following parameters may be specified.
1658
 
1659 19 jeremybenn
`enabled = 0|1'
1660 82 jeremybenn
     If 1 (true, the default), this memory controller is enabled.  If
1661
     0, it is disabled.
1662 19 jeremybenn
 
1663
          Note: The memory controller can effectively also be disabled
1664
          by setting an appropriate power on control register value
1665 82 jeremybenn
          (see below).  However this should only be used if it is
1666 19 jeremybenn
          desired to specifically model this behavior of the memory
1667
          controller, not as a way of disabling the memory controller
1668
          in general.
1669
 
1670
`baseaddr = VALUE'
1671
     Set the base address of the memory controller's memory mapped
1672 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
1673 19 jeremybenn
     sensible value.
1674
 
1675
     The memory controller has a 7 bit address bus, with a total of 19
1676
     32-bit registers, at addresses 0x00 through 0x4c (address 0x0c and
1677
     addresses 0x50 through 0x7c are not used).
1678
 
1679
`poc = VALUE'
1680
     Specifies the value of the power on control register, The least
1681
     signficant two bits specify the bus width (use 0 for an 8-bit bus,
1682
     1 for a 16-bit bus and 2 for a 32-bit bus) and the next two bits
1683
     the type of memory connected (use 0 for a disabled interface, 1
1684
     for SSRAM, 2 for asyncrhonous devices and 3 for synchronous
1685
     devices).
1686
 
1687
     If other bits are specified, they are ignored with a warning.
1688
 
1689
          Caution: The default value, 0, corresponds to a disabled
1690
          8-bit bus, and is likely not the most suitable value
1691
 
1692
`index = VALUE'
1693
     Specify the index of this memory controller amongst all the memory
1694 82 jeremybenn
     controllers.  This value should be unique for each memory
1695 19 jeremybenn
     controller, and is used to associate specific memories with the
1696
     controller, through the `mc' field in the `section memory'
1697
     configuration (*note Memory Configuration: Memory Configuration.).
1698
 
1699
     The default value, 0, is suitable when there is only one memory
1700
     controller.
1701
 
1702
 
1703

1704
File: or1ksim.info,  Node: UART Configuration,  Next: DMA Configuration,  Prev: Memory Controller Configuration,  Up: Peripheral Configuration
1705
 
1706
3.4.2 UART Configuration
1707
------------------------
1708
 
1709
The UART implemented in Or1ksim follows the specification of the
1710 82 jeremybenn
National Semiconductor 16450 and 16550 parts.  It is a memory mapped
1711 19 jeremybenn
component, which resides on the main OpenRISC Wishbone data bus.
1712
 
1713
The component provides a number of interfaces to emulate the behavior
1714
of an external terminal connected to the UART.
1715
 
1716 82 jeremybenn
UART configuration is described in `section uart'.  This section may
1717
appear multiple times, specifying multiple UARTs.  The following
1718 19 jeremybenn
parameters may be specified.
1719
 
1720
`enabled = 0|1'
1721 82 jeremybenn
     If 1 (true, the default), this UART is enabled.  If 0, it is
1722 19 jeremybenn
     disabled.
1723
 
1724
`baseaddr = VALUE'
1725
     Set the base address of the UART's memory mapped registers to
1726 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1727 19 jeremybenn
 
1728
     The UART has a 3 bit address bus, with a total of 8 8-bit
1729
     registers, at addresses 0x0 through 0x7.
1730
 
1731
`channel = "TYPE:ARGS"'
1732
     Specify the channel representing the terminal connected to the UART
1733
     Rx & Tx pins.
1734
 
1735
    `channel="file:`rxfile',`txfile'"'
1736
          Read input characters from the file `rxfile' and write output
1737
          characters to the file `txfile' (which will be created if
1738
          required).
1739
 
1740
    `channel="xterm:ARGS"'
1741
          Create an xterm on startup, write UART Tx traffic to the
1742
          xterm and take Rx traffic from the keyboard when the xterm
1743 82 jeremybenn
          window is selected.  Additional arguments to the xterm
1744
          command (for example specifying window size may be specified
1745
          in ARGS, or this may be left blank.
1746 19 jeremybenn
 
1747
    `channel="tcp:VALUE"'
1748
          Open the TCP/IP port specified by VALUE and read and write
1749
          UART traffic from and to it.
1750
 
1751
          Typically a telnet session is connected to the other end of
1752
          this port.
1753
 
1754
               Tip: There is no registered port for Or1ksim telnet UART
1755 82 jeremybenn
               connection.  Priviledged access is required to read
1756 19 jeremybenn
               traffic on the registered "well-known" telnet port (23).
1757
               Instead users should use port values in the "Dynamic" or
1758 82 jeremybenn
               "Private" port range, i.e.  49152-65535.
1759 19 jeremybenn
 
1760
    `channel="fd:`rxfd',`txfd'"'
1761
          Read and write characters from and to the existing open
1762
          numerical file descriptors, file `rxfd' and `txfd'.
1763
 
1764
    `channel="tty:device=/dev/ttyS0,baud=9600"'
1765
          Read and write characters from and to a physical serial port.
1766
          The precise device (shown here as `/dev/ttyS0') may vary from
1767
          machine to machine.
1768
 
1769
 
1770
     The default value for this field is `"xterm:"'.
1771
 
1772
`irq = VALUE'
1773 82 jeremybenn
     Use VALUE as the IRQ number of this UART.  Default value 0.
1774 19 jeremybenn
 
1775
`16550 = 0|1'
1776 82 jeremybenn
     If 1 (true), the UART has the functionality of a 16550.  If 0 (the
1777
     default), it has the functionality of a 16450.  The principal
1778 19 jeremybenn
     difference is that the 16550 can buffer multiple characters.
1779
 
1780
`jitter = VALUE'
1781
     Set the jitter, modeled as a time to block, to VALUE milliseconds.
1782 82 jeremybenn
     Set to -1 to disable jitter modeling.  Default value 0.
1783 19 jeremybenn
 
1784
          Note: This functionality has yet to be implemented, so this
1785
          parameter has no effect.
1786
 
1787
`vapi_id = VALUE'
1788
     VALUE specifies the value of the Verification API (VAPI) base
1789 82 jeremybenn
     address to be used with the UART.  *Note Verification API:
1790 19 jeremybenn
     Verification API, for more details, which details the use of the
1791
     VAPI with the UART.
1792
 
1793
 
1794

1795
File: or1ksim.info,  Node: DMA Configuration,  Next: Ethernet Configuration,  Prev: UART Configuration,  Up: Peripheral Configuration
1796
 
1797
3.4.3 DMA Configuration
1798
-----------------------
1799
 
1800
The DMA controller used in Or1ksim is the component implemented at
1801 98 jeremybenn
OpenCores, and found in the top level SVN directory, `wb_dma'.  It is
1802 19 jeremybenn
described in the document `Wishbone DMA/Bridge IP Core' by Rudolf
1803 82 jeremybenn
Usselmann, which can be found in the `doc' subdirectory.  It is a
1804
memory mapped component, which resides on the main OpenRISC Wishbone
1805
data bus.  The present implementation is incomplete, intended only to
1806
support the Ethernet interface (*note Ethernet Configuration::),
1807
although the Ethernet interface is not yet completed.
1808 19 jeremybenn
 
1809 82 jeremybenn
DMA configuration is described in `section dma'.  This section may
1810
appear multiple times, specifying multiple DMA controllers.  The
1811 19 jeremybenn
following parameters may be specified.
1812
 
1813
`enabled = 0|1'
1814 82 jeremybenn
     If 1 (true, the default), this DMA controller is enabled.  If 0,
1815
     it is disabled.
1816 19 jeremybenn
 
1817
`baseaddr = VALUE'
1818
     Set the base address of the DMA's memory mapped registers to
1819 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1820 19 jeremybenn
 
1821
     The DMA controller has a 10 bit address bus, with a total of 253
1822 82 jeremybenn
     32-bit registers.  The first 5 registers at addresses 0x000 through
1823
     0x010 control the overall behavior of the DMA controller.  There
1824
     are then 31 blocks of 8 registers, controlling each of the 31 DMA
1825
     channels available.  Addresses 0x014 through 0x01c are not used.
1826 19 jeremybenn
 
1827
`irq = VALUE'
1828 82 jeremybenn
     Use VALUE as the IRQ number of this DMA controller.  Default value
1829 19 jeremybenn
     0.
1830
 
1831
`vapi_id = VALUE'
1832
     VALUE specifies the value of the Verification API (VAPI) base
1833 82 jeremybenn
     address to be used with the DMA controller.  *Note Verification
1834 19 jeremybenn
     API: Verification API, for more details, which details the use of
1835
     the VAPI with the DMA controller.
1836
 
1837
 
1838

1839
File: or1ksim.info,  Node: Ethernet Configuration,  Next: GPIO Configuration,  Prev: DMA Configuration,  Up: Peripheral Configuration
1840
 
1841
3.4.4 Ethernet Configuration
1842
----------------------------
1843
 
1844
The Ethernet MAC used in Or1ksim is the component implemented at
1845 98 jeremybenn
OpenCores, and found in the top level SVN directory, `ethmac'.  It also
1846
forms part of the OpenRISC SoC, ORPSoC.  It is described in the
1847 19 jeremybenn
document `Ethernet IP Core Specification' by Igor Mohor, which can be
1848 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
1849
which resides on the main OpenRISC Wishbone data bus.
1850 19 jeremybenn
 
1851 82 jeremybenn
Ethernet configuration is described in `section ethernet'.  This
1852
section may appear multiple times, specifying multiple Ethernet
1853
interfaces.  The following parameters may be specified.
1854 19 jeremybenn
 
1855
`enabled = 0|1'
1856 82 jeremybenn
     If 1 (true, the default), this Ethernet MAC is enabled.  If 0, it
1857
     is disabled.
1858 19 jeremybenn
 
1859
`baseaddr = VALUE'
1860
     Set the base address of the MAC's memory mapped registers to
1861 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1862 19 jeremybenn
 
1863
     The Ethernet MAC has a 7-bit address bus, with a total of 21
1864 82 jeremybenn
     32-bit registers.  Addresses 0x54 through 0x7c are not used.
1865 19 jeremybenn
 
1866
          Note: The Ethernet specification describes a Tx control
1867 82 jeremybenn
          register, `TXCTRL', at address 0x50.  However this register
1868
          is not implemented in the Or1ksim model.
1869 19 jeremybenn
 
1870
`dma = VALUE'
1871
     VALUE specifies the DMA controller with which this Ethernet is
1872 82 jeremybenn
     associated.  The default value is 0.
1873 19 jeremybenn
 
1874
          Note: Support for external DMA is not provided in the current
1875 82 jeremybenn
          implementation, and this value is ignored.  In any case there
1876 19 jeremybenn
          is no equivalent field to which this can be matched in the
1877
          current DMA component implementation (*note DMA
1878
          Configuration: DMA Configuration.).
1879
 
1880
`irq = VALUE'
1881 82 jeremybenn
     Use VALUE as the IRQ number of this Ethernet MAC.  Default value 0.
1882 19 jeremybenn
 
1883
`rtx_type = 0|1'
1884
     If 1 (true) use a socket interface to the Ethernet (see parameter
1885 82 jeremybenn
     `sockif' below).  If 0 (the default), use a file interface,
1886
     reading and writing from and to the files specified in the
1887
     `rxfile' and `txfile' parameters (see below).
1888 19 jeremybenn
 
1889
          Note: By default the socket interface is not provided in
1890 82 jeremybenn
          Or1ksim.  If it is required, this must be requested when
1891 19 jeremybenn
          configuring, by use of the `--enable-ethphy' option to
1892
          `configure'.
1893
 
1894
               configure --target=or32-uclinux --enable-ethphy ...
1895
 
1896
`rx_channel = RXVALUE'
1897
`tx_channel = TXVALUE'
1898
     RXVALUE specifies the DMA channel to use for receive and TXVALUE
1899 82 jeremybenn
     the DMA channel to use for transmit.  Both default to 0.
1900 19 jeremybenn
 
1901
          Note: As noted above, support for external DMA is not
1902
          provided in the current implementation, and so these values
1903
          are ignored.
1904
 
1905
`rxfile = "RXFILE"'
1906
`txfile = "TXFILE"'
1907
     When `rtx_type' is 0 (see above), RXFILE specifies the file to use
1908
     as input and TXFILE specifies the fie to use as output.
1909
 
1910 82 jeremybenn
     The file contains a sequence of packets.  Each packet consists of a
1911
     packet length (32 bits), followed by that many bytes of data.
1912
     Once the input file is empty, the Ethernet MAC behaves as though
1913
     there were no data on the Ethernet.  The default values of these
1914 19 jeremybenn
     parameters are `"eth_rx"' and `"eth_tx"' respectively.
1915
 
1916 82 jeremybenn
     The input file must exist and be readable.  The output file must be
1917
     writable and will be created if necessary.  If either of these
1918 19 jeremybenn
     conditions is not met, a warning will be given.
1919
 
1920
`sockif = "SERVICE"'
1921
     When `rtx_type' is 1 (see above), SERVICE specifies the service to
1922 82 jeremybenn
     use for communication.  This may be TCP/IP or UDP/IP.  The default
1923 19 jeremybenn
     value of this parameter is `"or1ksim_eth"'.
1924
 
1925
`vapi_id = VALUE'
1926
     VALUE specifies the value of the Verification API (VAPI) base
1927 82 jeremybenn
     address to be used with the Ethernet PHY.  *Note Verification API:
1928 19 jeremybenn
     Verification API, for more details, which details the use of the
1929
     VAPI with the DMA controller.
1930
 
1931
 
1932

1933
File: or1ksim.info,  Node: GPIO Configuration,  Next: Display Interface Configuration,  Prev: Ethernet Configuration,  Up: Peripheral Configuration
1934
 
1935
3.4.5 GPIO Configuration
1936
------------------------
1937
 
1938
The GPIO used in Or1ksim is the component implemented at OpenCores, and
1939 98 jeremybenn
found in the top level SVN directory, `gpio'.  It is described in the
1940 19 jeremybenn
document `GPIO IP Core Specification' by Damjan Lampret and Goran
1941 82 jeremybenn
Djakovic, which can be found in the `doc' subdirectory.  It is a memory
1942 19 jeremybenn
mapped component, which resides on the main OpenRISC Wishbone data bus.
1943
 
1944 82 jeremybenn
GPIO configuration is described in `section gpio'.  This section may
1945
appear multiple times, specifying multiple GPIO devices.  The following
1946 19 jeremybenn
parameters may be specified.
1947
 
1948
`enabled = 0|1'
1949 82 jeremybenn
     If 1 (true, the default), this GPIO is enabled.  If 0, it is
1950 19 jeremybenn
     disabled.
1951
 
1952
`baseaddr = VALUE'
1953
     Set the base address of the GPIO's memory mapped registers to
1954 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1955 19 jeremybenn
 
1956
     The GPIO has a 6 bit address bus, with a total of 10 32-bit
1957
     registers, although the number of bits that are actively used
1958 82 jeremybenn
     varies.  Addresses 0x28 through 0x3c are not used.
1959 19 jeremybenn
 
1960
`irq = VALUE'
1961 82 jeremybenn
     Use VALUE as the IRQ number of this GPIO.  Default value 0.
1962 19 jeremybenn
 
1963
`vapi_id = VALUE'
1964
     VALUE specifies the value of the Verification API (VAPI) base
1965 82 jeremybenn
     address to be used with the GPIO.  *Note Verification API:
1966 19 jeremybenn
     Verification API, for more details, which details the use of the
1967 82 jeremybenn
     VAPI with the GPIO controller.  For backwards compatibility, the
1968 19 jeremybenn
     alternative name `base_vapi_id' is supported for this parameter,
1969
     but deprecated.
1970
 
1971
 
1972

1973
File: or1ksim.info,  Node: Display Interface Configuration,  Next: Frame Buffer Configuration,  Prev: GPIO Configuration,  Up: Peripheral Configuration
1974
 
1975
3.4.6 Display Interface Configuration
1976
-------------------------------------
1977
 
1978
Or1ksim models a VGA interface to an external monitor.  The VGA
1979
controller used in Or1ksim is the component implemented at OpenCores,
1980 98 jeremybenn
and found in the top level SVN directory, `vga_lcd', with no support
1981 82 jeremybenn
for the optional hardware cursors.  It is described in the document
1982 19 jeremybenn
`VGA/LCD Core v2.0 Specifications' by Richard Herveille, which can be
1983 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
1984
which resides on the main OpenRISC Wishbone data bus.
1985 19 jeremybenn
 
1986
The current implementation provides only functionality to dump the
1987
screen to a file at intervals.
1988
 
1989 82 jeremybenn
VGA controller configuration is described in `section vga'.  This
1990 19 jeremybenn
section may appear multiple times, specifying multiple VGA controllers.
1991
The following parameters may be specified.
1992
 
1993
`enabled = 0|1'
1994 82 jeremybenn
     If 1 (true, the default), this VGA is enabled.  If 0, it is
1995 19 jeremybenn
     disabled.
1996
 
1997
`baseaddr = VALUE'
1998
     Set the base address of the VGA controller's memory mapped
1999 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2000 19 jeremybenn
     sensible value.
2001
 
2002
     The VGA controller has a 12-bit address bus, with 7 32-bit
2003
     registers, at addresses 0x000 through 0x018, and two color lookup
2004 82 jeremybenn
     tables at addresses 0x800 through 0xfff.  The hardware cursor
2005 19 jeremybenn
     registers are not implemented, so addresses 0x01c through 0x7fc
2006
     are not used.
2007
 
2008
`irq = VALUE'
2009 82 jeremybenn
     Use VALUE as the IRQ number of this VGA controller.  Default value
2010 19 jeremybenn
     0.
2011
 
2012
`refresh_rate = VALUE'
2013 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2014 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2015
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2016
     50 times per simulated second.
2017
 
2018
`txfile = "FILE"'
2019
     FILE specifies the base of the filename for screen dumps.
2020
     Successive screen dumps will be in BMP format, in files with the
2021
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2022 82 jeremybenn
     screen dumps starting at zero.  The default value is `"vga_out"'.
2023 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2024
     supported for this parameter, but deprecated.
2025
 
2026
 
2027

2028
File: or1ksim.info,  Node: Frame Buffer Configuration,  Next: Keyboard Configuration,  Prev: Display Interface Configuration,  Up: Peripheral Configuration
2029
 
2030
3.4.7 Frame Buffer Configuration
2031
--------------------------------
2032
 
2033 82 jeremybenn
     Caution: The frame buffer is only partially implemented.  Its
2034 19 jeremybenn
     configuration fields are described here, but the component should
2035 82 jeremybenn
     not be used at this time.  Like the VGA controller, it is designed
2036 19 jeremybenn
     to make screen dumps to file.
2037
 
2038 82 jeremybenn
Frame buffer configuration is described in `section fb'.  This section
2039
may appear multiple times, specifying multiple frame buffers.  The
2040 19 jeremybenn
following parameters may be specified.
2041
 
2042
`enabled = 0|1'
2043 82 jeremybenn
     If 1 (true, the default), this frame buffer is enabled.  If 0, it
2044 19 jeremybenn
     is disabled.
2045
 
2046
`baseaddr = VALUE'
2047
     Set the base address of the frame buffer's memory mapped registers
2048 82 jeremybenn
     to VALUE.  The default is 0, which is probably not a sensible
2049
     value.
2050 19 jeremybenn
 
2051
     The frame buffer has an 121-bit address bus, with 4 32-bit
2052
     registers, at addresses 0x000 through 0x00c, and a PAL lookup
2053 82 jeremybenn
     table at addresses 0x400 through 0x4ff.  Addresses 0x010 through
2054 19 jeremybenn
     0x3fc and addresses 0x500 through 0x7ff are not used.
2055
 
2056
`refresh_rate = VALUE'
2057 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2058 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2059
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2060
     50 times per simulated second.
2061
 
2062
`txfile = "FILE"'
2063
     FILE specifies the base of the filename for screen dumps.
2064
     Successive screen dumps will be in BMP format, in files with the
2065
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2066 82 jeremybenn
     screen dumps starting at zero.  The default value is `"fb_out"'.
2067 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2068
     supported for this parameter, but deprecated.
2069
 
2070
 
2071

2072
File: or1ksim.info,  Node: Keyboard Configuration,  Next: Disc Interface Configuration,  Prev: Frame Buffer Configuration,  Up: Peripheral Configuration
2073
 
2074
3.4.8 Keyboard Configuration (PS2)
2075
----------------------------------
2076
 
2077 82 jeremybenn
The PS2 interface provided by Or1ksim is not documented.  It may be
2078 98 jeremybenn
based on the PS2 project at OpenCores, and found in the top level SVN
2079 82 jeremybenn
directory, `ps2'.  However this project lacks any documentation beyond
2080
its project webpage.  Since most PS2 interfaces follow the Intel i8042
2081 19 jeremybenn
standard, this is presumably what is expected with this device.
2082
 
2083
The implementation only provides for keyboard support, which is
2084 82 jeremybenn
modelled as a file of keystrokes.  There is no mouse support.
2085 19 jeremybenn
 
2086
     Caution: A standard i8042 device has two registers at addresses
2087 82 jeremybenn
     0x60 (command) and 0x64 (status).  Inspection of the code,
2088
     suggests that the Or1ksim component places these registers at
2089
     addresses 0x00 and 0x04.
2090 19 jeremybenn
 
2091
     The port of Linux for the OpenRISC 1000, which runs on Or1ksim
2092
     implements the i8042 device driver, anticipating these registers
2093 82 jeremybenn
     reside at their conventional address.  It seems unlikel that this
2094 19 jeremybenn
     code will work.
2095
 
2096
     This component should be used with caution.
2097
 
2098 82 jeremybenn
Keyboard configuration is described in `section kbd'.  This section may
2099
appear multiple times, specifying multiple keyboard interfaces.  The
2100 19 jeremybenn
following parameters may be specified.
2101
 
2102
`enabled = 0|1'
2103 82 jeremybenn
     If 1 (true, the default), this keyboard is enabled.  If 0, it is
2104 19 jeremybenn
     disabled.
2105
 
2106
`baseaddr = VALUE'
2107
     Set the base address of the keyboard's memory mapped registers to
2108 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2109 19 jeremybenn
 
2110
     The keyboard PS/2 interface has an 3-bit address bus, with 2 8-bit
2111
     registers, at addresses 0x000 and 0x004.
2112
 
2113
          Caution: As noted above, a standard Intel 8042 interface
2114
          would expect to find these registers at locations 0x60 and
2115
          0x64, thus requiring at least a 7-bit bus.
2116
 
2117
`irq = VALUE'
2118 82 jeremybenn
     Use VALUE as the IRQ number of this Keyboard interface.  Default
2119 19 jeremybenn
     value 0.
2120
 
2121
`rxfile = "FILE"'
2122
     `file' specifies a file containing raw key stroke data, which
2123 82 jeremybenn
     models the input from a physical keyboard.  The default value is
2124 19 jeremybenn
     `"kbd_in"'.
2125
 
2126
 
2127

2128
File: or1ksim.info,  Node: Disc Interface Configuration,  Next: Generic Peripheral Configuration,  Prev: Keyboard Configuration,  Up: Peripheral Configuration
2129
 
2130
3.4.9 Disc Interface Configuration
2131
----------------------------------
2132
 
2133
The ATA/ATAPI disc controller used in Or1ksim is the OCIDEC (OpenCores
2134
IDE Controller) component implemented at OpenCores, and found in the
2135 98 jeremybenn
top level SVN directory, `ata'.  It is described in the document
2136 19 jeremybenn
`ATA/ATAPI-5 Core Specification' by Richard Herveille, which can be
2137 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
2138
which resides on the main OpenRISC Wishbone data bus.
2139 19 jeremybenn
 
2140 82 jeremybenn
ATA/ATAPI configuration is described in `section ata'.  This section
2141
may appear multiple times, specifying multiple disc controllers.  The
2142 19 jeremybenn
following parameters may be specified.
2143
 
2144
`enabled = 0|1'
2145 82 jeremybenn
     If 1 (true, the default), this ATA/ATAPI interface is enabled.  If
2146 19 jeremybenn
     0, it is disabled.
2147
 
2148
`baseaddr = VALUE'
2149
     Set the base address of the ATA/ATAPI interface's memory mapped
2150 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2151 19 jeremybenn
     sensible value.
2152
 
2153
     The ATA/ATAPI PS/2 interface has an 5-bit address bus, with 8
2154 82 jeremybenn
     32-bit registers.  Depending on the version of the OCIDEC
2155
     ATA/ATAPI interface selected (see `dev_id' below), not all
2156
     registers will be available.
2157 19 jeremybenn
 
2158
`irq = VALUE'
2159 82 jeremybenn
     Use VALUE as the IRQ number of this ATA/ATAPI interface.  Default
2160 19 jeremybenn
     value 0.
2161
 
2162
`dev_id = 1|2|3'
2163
     This parameter specifies which version of the OCIDEC ATA/ATAPI
2164 82 jeremybenn
     interface to model.  The default value is 1.
2165 19 jeremybenn
 
2166
     Version 1 supports only the `CTRL', `STAT' and `PCTR' registers.
2167
     Versions 2 & 3 add the `FCTR' registers, Version 3 adds the `DTR'
2168
     registers and the `RXD'/`TXD' registers.
2169
 
2170
`rev = VALUE'
2171
     Set the VALUE as the revision of the OCIDEC ATA/ATAPI interface.
2172 82 jeremybenn
     The default value is 1.  The default value is 0.  Its value should
2173
     be in the range 0-15.  Larger values are truncated with a warning.
2174 19 jeremybenn
     This only affects the reset value of the `STAT' register, where it
2175
     forms bits 24-27.
2176
 
2177
`pio_mode0_t1 = VALUE'
2178
`pio_mode0_t2 = VALUE'
2179
`pio_mode0_t4 = VALUE'
2180
`pio_mode0_teoc = VALUE'
2181
     These parameters specify the timings for use with Programmed
2182 82 jeremybenn
     Input/Output (PIO) transfers.  They are specified as the number of
2183 19 jeremybenn
     clock cycles - 2, rounded up to the next highest integer, or zero
2184 82 jeremybenn
     if that would be negative.  The values should not exceed 255.  If
2185 19 jeremybenn
     they do, they will be ignored with a warning.
2186
 
2187
     See the ATA/ATAPI-5 specification for explanations of each of these
2188 82 jeremybenn
     timing parameters.  The default values are:
2189 19 jeremybenn
 
2190
          pio_mode0_t1   =  6
2191
          pio_mode0_t2   = 28
2192
          pio_mode0_t4   =  2
2193
          pio_mode0_teoc = 23
2194
 
2195
`dma_mode0_tm = VALUE'
2196
`dma_mode0_td = VALUE'
2197
`dma_mode0_teoc = VALUE'
2198
     These parameters specify the timings for use with DMA transfers.
2199
     They are specified as the number of clock cycles - 2, rounded up
2200
     to the next highest integer, or zero if that would be negative.
2201 82 jeremybenn
     The values should not exceed 255.  If they do, they will be
2202
     ignored with a warning.
2203 19 jeremybenn
 
2204
     See the ATA/ATAPI-5 specification for explanations of each of these
2205 82 jeremybenn
     timing parameters.  The default values are:
2206 19 jeremybenn
 
2207
          dma_mode0_tm   =  4
2208
          dma_mode0_td   = 21
2209
          dma_mode0_teoc = 21
2210
 
2211
 
2212
3.4.9.1 ATA/ATAPI Device Configuration
2213
......................................
2214
 
2215 82 jeremybenn
Within the `section ata', each device is specified separately.  The
2216 19 jeremybenn
device subsection is introduced by
2217
 
2218
     device VALUE
2219
 
2220 82 jeremybenn
VALUE is the device number, which should be 0 or 1.  The subsection
2221
ends with `enddevice'.  Note that if the same device number is
2222
specified more than once, the previous values will be overwritten.
2223
Within the `device' subsection, the following parameters may appear:
2224 19 jeremybenn
 
2225
`type = VALUE'
2226
     VALUEspecifies the type of device: 0 (the default) for "not
2227
     connected", 1 for hard disk simulated in a file and 2 for local
2228
     system hard disk.
2229
 
2230
`file = "FILENAME"'
2231
     `filename' specifies the file to be used for a simulated ATA
2232 82 jeremybenn
     device if the file type (see `type' above) is 1.  Default value
2233 19 jeremybenn
     `"ata-FileN"', where N is the device number.
2234
 
2235
`size = VALUE'
2236
     VALUE specifies the size of a simulated ATA device if the file
2237 82 jeremybenn
     type (see `type' above) is 1.  The default value is zero.
2238 19 jeremybenn
 
2239
`packet = 0|1'
2240 82 jeremybenn
     If 1 (true), implement the PACKET command feature set.  If 0 (the
2241 19 jeremybenn
     default), do not implement the PACKET command feature set.
2242
 
2243
`firmware = "STR"'
2244
     Firmware to report in response to the "Identify Device" command.
2245
     Default `"02207031"'.
2246
 
2247
`heads = VALUE'
2248 82 jeremybenn
     Number of heads in the device.  Default 7, use -1 to disable all
2249 19 jeremybenn
     heads.
2250
 
2251
`sectors = VALUE'
2252 82 jeremybenn
     Number of sectors per track in the device.  Default 32.
2253 19 jeremybenn
 
2254
`mwdma = 0|1|2|-1'
2255 82 jeremybenn
     Highest multi-word DMA mode supported.  Default 2, use -1 to
2256 19 jeremybenn
     disable.
2257
 
2258
`pio = 0|1|2|3|4'
2259 82 jeremybenn
     Highest PIO mode supported.  Default 4.
2260 19 jeremybenn
 
2261
 
2262

2263
File: or1ksim.info,  Node: Generic Peripheral Configuration,  Prev: Disc Interface Configuration,  Up: Peripheral Configuration
2264
 
2265
3.4.10 Generic Peripheral Configuration
2266
---------------------------------------
2267
 
2268
When used as a library (*note Simulator Library: Simulator Library.),
2269
Or1ksim makes provision for any additional peripheral to be implemented
2270 82 jeremybenn
externally.  Any read or write access to this peripheral's memory map
2271
generates "upcall"s to an external handler.  This interface can support
2272 19 jeremybenn
either C or C++, and was particularly designed to facilitate support
2273
for OSCI SystemC (see `http://www.systemc.org').
2274
 
2275
Generic peripheral configuration is described in `section generic'.
2276
This section may appear multiple times, specifying multiple external
2277 82 jeremybenn
peripherals.  The following parameters may be specified.
2278 19 jeremybenn
 
2279
`enabled = 0|1'
2280 82 jeremybenn
     If 1 (true, the default), this ATA/ATAPI interface is enabled.  If
2281 19 jeremybenn
     0, it is disabled.
2282
 
2283
`baseaddr = VALUE'
2284
     Set the base address of the generic peripheral's memory mapped
2285 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2286 19 jeremybenn
     sensible value.
2287
 
2288
     The size of the memory mapped register space is controlled by the
2289
     `size' paramter, described below.
2290
 
2291
`size = VALUE'
2292
     Set the size of the generic peripheral's memory mapped register
2293 82 jeremybenn
     space to VALUE bytes.  Any read or write accesses to addresses with
2294 19 jeremybenn
     offsets of 0 to VALUE-1 bytes from the base address specified in
2295
     parameter `baseaddr' (see above) will be directed to the external
2296
     interface.
2297
 
2298 82 jeremybenn
     VALUE will be rounded up the nearest power of 2.  It's default
2299
     value is zero.  If VALUE is not an exact power of two, accesses to
2300 19 jeremybenn
     address offsets of VALUE or above up to the next power of 2 will
2301
     generate a warning, and have no effect (reads will return zero).
2302
 
2303
`name = "STR"'
2304 82 jeremybenn
     This gives the peripheral the name `"STR"'.  This is used to
2305 19 jeremybenn
     identify the peripheral in error messages and warnings, and when
2306 82 jeremybenn
     reporting its status.  The default value is
2307 19 jeremybenn
     `"anonymous external peripheral"'.
2308
 
2309
`byte_enabled = 0|1'
2310
`hw_enabled = 0|1'
2311
`word_enabled = 0|1'
2312
     If 1 (true, the default), these parameters respectively enable the
2313 82 jeremybenn
     device for byte wide, half-word wide and word wide accesses.  If 0,
2314 19 jeremybenn
     accesses of that width will fail.
2315
 
2316
 
2317

2318
File: or1ksim.info,  Node: Interactive Command Line,  Next: Verification API,  Prev: Configuration,  Up: Top
2319
 
2320
4 Interactive Command Line
2321
**************************
2322
 
2323
If started with the `-f' flag, or if interrupted with `ctrl-C', Or1ksim
2324 82 jeremybenn
provides the user with an interactive command line.  The commands
2325 19 jeremybenn
available, which may not be abbreviated, are:
2326
 
2327
`q'
2328
     Exit the simulator
2329
 
2330
`r'
2331 82 jeremybenn
     Display all the General Purpose Registers (GPRs).  Also shows the
2332 19 jeremybenn
     just executed and next to be executed instructions symbolically
2333
     and the state of the flag in the Supervision Register.
2334
 
2335
`t'
2336
     Execute the next instruction and then display register/instruction
2337
     information as with the `r' command (see above).
2338
 
2339
`run NUM [ hush ]'
2340 82 jeremybenn
     Execute NUM instructions.  The register/instruction information is
2341 19 jeremybenn
     displayed after each instruction, as with the `r' command (see
2342
     above) _unless_ `hush' is specified.
2343
 
2344
`pr REG VALUE'
2345
     Patch register REG with VALUE.
2346
 
2347
`dm FROMADDR [ TOADDR ]'
2348 82 jeremybenn
     Display memory bytes between FROMADDR and TOADDR.  If TOADDR is
2349
     not given, 64 bytes are displayed, starting at FROMADDR.
2350 19 jeremybenn
 
2351
          Caution: The output from this command is broken (a bug).
2352 82 jeremybenn
          Or1ksim attempts to print out 16 bytes per row.  However,
2353 19 jeremybenn
          instead of printing out the address at the start of each row,
2354
          it prints the address (of the first of the 16 bytes) before
2355
          _each_ byte.
2356
 
2357
`de FROMADDR [ TOADDR ]'
2358 82 jeremybenn
     Disassemble code between FROMADDR and TOADDR.  If TOADDR is not
2359 19 jeremybenn
     given, 16 instructions are disassembled.
2360
 
2361
     The disassembly is entirely numerical, and gives no symbolic
2362
     information.
2363
 
2364
`pm ADDR VALUE'
2365
     Patch the 4 bytes in memory starting at ADDR with the 32-bit VALUE.
2366
 
2367
`pc VALUE'
2368
     Patch the program counter with VALUE.
2369
 
2370
`cm FROMADDR TOADDR SIZE'
2371
     Copy SIZE bytes in memory from FROMADDR to TOADDR.
2372
 
2373
`break ADDR'
2374
     Toggle the breakpoint set at ADDR.
2375
 
2376
`breaks'
2377
     List all set breakpoints
2378
 
2379
`reset'
2380 82 jeremybenn
     Reset the simulator.  Includes modeling a reset of the processor,
2381
     so execution will restart from the reset vector location, 0x100.
2382 19 jeremybenn
 
2383
`hist'
2384
     If saving the execution history has been configured (*note
2385
     Simulator Behavior: Simulator Behavior.), display the execution
2386
     history.
2387
 
2388
`stall'
2389
     Stall the processor, so that control is passed to the debug unit.
2390 82 jeremybenn
     When stalled, the processor can execute no instructions.  This
2391 19 jeremybenn
     command is useful when debugging the JTAG interface, used by
2392
     debuggers such as GDB.
2393
 
2394
`unstall'
2395 82 jeremybenn
     Unstall the processor, so that normal execution can continue.
2396
     This command is useful when debugging the JTAG interface, used by
2397 19 jeremybenn
     debuggers such as GDB.
2398
 
2399
`stats CATEGORY | clear'
2400
     Print the statistics for the given CATEGORY, if available, or
2401 82 jeremybenn
     clear if `clear' is specified.  The categories are:
2402 19 jeremybenn
 
2403
    1
2404
          Miscellaneous statistics: branch predictions (if branch
2405
          predictions are enabled), branch target cache model (if
2406
          enabled), cache (if enbaled), MMU (if enabled) and number of
2407
          addtional load & store cycles.
2408
 
2409
          *Note Configuring the OpenRisc Achitectural Components: Core
2410
          OpenRISC Configuration, for details of how to enable these
2411
          various features.
2412
 
2413
    2
2414 82 jeremybenn
          Instruction usage statistics.  Requires hazard analysis to be
2415 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2416
 
2417
    3
2418 82 jeremybenn
          Instruction dependency statistics.  Requires hazard analysis
2419 19 jeremybenn
          to be enabled (*note CPU Configuration: CPU Configuration.).
2420
 
2421
    4
2422 82 jeremybenn
          Functional unit dependency statistics.  Requires hazard
2423 19 jeremybenn
          analysis to be enabled (*note CPU Configuration: CPU
2424
          Configuration.).
2425
 
2426
    5
2427 82 jeremybenn
          Raw register usage over time.  Requires hazard analysis to be
2428 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2429
 
2430
    6
2431 82 jeremybenn
          Store buffer statistics.  Requires the store buffer to be
2432 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2433
 
2434
 
2435
`info'
2436
     Display detailed information about the simulator configuration.
2437
     This is quite a lengthy about, because all MMU TLB information is
2438
     displayed.
2439
 
2440
`dv FROMADDR [ TOADDR ] [ MODULE ]'
2441
     Dump the area of memory between FROMADDR and TOADDR as Verilog
2442 82 jeremybenn
     code for a synchronous, 23-bit wide SRAM module, named MODULE.  If
2443 19 jeremybenn
     TOADDR is not specified, then 64 bytes are dumped (as 16 32-bit
2444 82 jeremybenn
     words).  If MODULE is not specified, `or1k_mem' is used.
2445 19 jeremybenn
 
2446
     To save to a file, use the redirection function (described after
2447
     this table, below).
2448
 
2449
`dh FROMADDR [ TOADDR ]'
2450
     Dump the area of memory between FROMADDR and TOADDR as 32-bit hex
2451 82 jeremybenn
     numbers (no `0x', or `32'h' prefix).  If TOADDR is not specified,
2452 19 jeremybenn
     then 64 bytes are dumped (as 16 32-bit words).
2453
 
2454
     To save to a file, use the redirection function (described after
2455
     this table, below).
2456
 
2457
`setdbch'
2458 82 jeremybenn
     Toggle debug channels on/off.  *Note Standalone Simulator:
2459 19 jeremybenn
     Standalone Simulator, for a description of specifying debug
2460
     channels on the command line.
2461
 
2462
`set SECTION PARAM = VALUE'
2463
     Set the configuration parameter PARA in section SECTION to VALUE.
2464
     *Note Configuration: Configuration, for details of configuration
2465
     parameters and their settings.
2466
 
2467
`debug'
2468 82 jeremybenn
     Toggle the simulator debug mode.  *Note Debug Interface
2469 19 jeremybenn
     Configuration: Debug Interface Configuration, for information on
2470
     this parameter.
2471
 
2472
          Caution: This is effectively enabling or disabling the debug
2473 82 jeremybenn
          unit.  It does not effect the remote GDB debug interface.
2474 19 jeremybenn
          However using the remote debug interface while the debug unit
2475
          is disabled will lead to undefined behavior and likely crash
2476
          Or1ksim
2477
 
2478
`cuc'
2479
     Enter the the Custom Unit Compiler command prompt (*note CUC
2480
     Configuration: CUC Configuration.).
2481
 
2482
          Caution: The CUC must be properly configured, for this to
2483 82 jeremybenn
          succeed.  In particular a timing file must be available and
2484
          readable.  Otherwise Or1ksim will crash.
2485 19 jeremybenn
 
2486
`help'
2487
     Print out brief information about each command available.
2488
 
2489
`mprofile [-vh] [-m M] [-g N] [-f FILE] FROM TO'
2490 82 jeremybenn
     Run the memory profiling utility.  This follows the same usage as
2491 19 jeremybenn
     the standalone command (*note Memory Profiling Utility: Memory
2492
     Profiling Utility.).
2493
 
2494
`profile [-vhcq] [-g FILE]'
2495 82 jeremybenn
     Run the instruction profiling utility.  This follows the same
2496
     usage as the standalone command (*note Profiling Utility:
2497
     Profiling Utility.).
2498 19 jeremybenn
 
2499
 
2500
For all commands, it is possible to redirect the output to a file, by
2501
using the redirection operator, `>'.
2502
 
2503
     COMMAND > FILENAME
2504
 
2505
This is particularly useful for commands dumping a large amount of
2506
output, such as `dv'.
2507
 
2508
     Caution: Unfortunately there is a serious bug with the redirection
2509 82 jeremybenn
     operator.  It does not return output to standard output after the
2510
     command completes.  Until this bug is fixed, file redirection
2511 19 jeremybenn
     should not be used.
2512
 
2513

2514
File: or1ksim.info,  Node: Verification API,  Next: Code Internals,  Prev: Interactive Command Line,  Up: Top
2515
 
2516
5 Verification API (VAPI)
2517
*************************
2518
 
2519
The Verification API (VAPI) provides a TCP/IP interface to allow
2520 82 jeremybenn
components of the simulation to be controlled externally.  The
2521
interface is polled for new requests on each simulated clock cycle.
2522
Components within the simulator may send responses to such requests.
2523 19 jeremybenn
 
2524 82 jeremybenn
The inteface is an asynchronous duplex protocol.  On the request side
2525
it provides for simple commands, known as VAPI IDs (a 32 bit integer),
2526
with a single piece of data (also a 32 bit integer).  On the send side,
2527
it provides for sending a single VAPI ID and data.  However there is no
2528
explicit command-response structure.  Some components just accept
2529
requests (e.g.  to set values), some just generate sends (to report
2530 19 jeremybenn
values), and some do both.
2531
 
2532
Each component has a base ID (32 bit) and its commands will start from
2533 82 jeremybenn
that base ID.  This provides a simple partitioning of the command space
2534
amongst components.  Request commands will be directed to the component
2535 19 jeremybenn
with the closest base ID lower than the VAPI ID of the command.
2536
 
2537
Thus if there are two components with base IDs of 0x200 and 0x300, and
2538
a request with VAPI ID of 0x203 is received, it will be directed to the
2539
first component as its command #3.
2540
 
2541
The results of VAPI interactions are logged (by default in `vapi.log'
2542
unless an alternative is specified in `section vapi').
2543
 
2544
Currently the following components support VAPI:
2545
 
2546
Debug Unit
2547
     Although the Debug Unit can specify a base VAPI ID, it is not used
2548
     to send commands or receive requests.
2549
 
2550
     Instead, if the base VAPI ID is set, all remote JTAG protocol
2551
     exchanges are logged in the VAPI log file.
2552
 
2553
UART
2554
     If a base VAPI ID is specified, the UART sends details of any
2555
     chars or break characters sent, with dteails of the line control
2556
     register etc encoded in the data packet sent.
2557
 
2558
     This supports a single VAPI command request, but encodes a
2559
     sub-command in the top 8 bits of the associated data.
2560
 
2561
    `0x00'
2562
          This stuffs the least significant 8 bits of the data into the
2563
          serial register of the UART and the next 8 bits into the line
2564
          control register, effectively providing control of the next
2565
          character to be sent or received.
2566
 
2567
    `0x01'
2568
          The divisor latch bytes are set from the least significant 16
2569
          bits of the data.
2570
 
2571
    `0x02'
2572
          The line control register is set from bits 15-8 of the data.
2573
 
2574
    `0x03'
2575
          The UART skew is set from the least significant 16 bits of
2576
          the data
2577
 
2578
    `0x04'
2579
          If the 16th most significant bit of the data is 1, start
2580 82 jeremybenn
          sending breaks, otherwise stop sending breaks.  The breaks
2581
          are sent or cleared after the number of UART clock divider
2582
          ticks specified by the data (immediately if the data is zero).
2583 19 jeremybenn
 
2584
 
2585
DMA
2586
     Although the DMA unit supports a base VAPI ID in its configuration
2587
     (`section dma'), no VAPI data is sent, nor VAPI requests currently
2588
     implemented.
2589
 
2590
Ethernet
2591 82 jeremybenn
     The following requests are handled by the Ethernet.  Specified
2592 19 jeremybenn
     symbolically, these are the increments from the base VAPI ID of the
2593 82 jeremybenn
     Ethernet.  At present no implementation is provided behind these
2594 19 jeremybenn
     VAPI requests.
2595
 
2596
    `ETH_VAPI_DATA (0)'
2597
 
2598
    `ETH_VAPI_CTRL (0)'
2599
 
2600
GPIO
2601
     If a base VAPI ID is specified, the GPIO sends out on its base
2602
     VAPI ID (symbolically, GPIO_VAPI_DATA (0) offset from the base
2603
     VAPI ID) any changes in outputs.
2604
 
2605 82 jeremybenn
     The following requests are handled by the GPIO.  Specified
2606 19 jeremybenn
     symbolically, these are the increments from the VAPI base ID of the
2607
     GPIO.
2608
 
2609
    `GPIO_VAPI_DATA (0)'
2610
          Set the next input to the commands data field
2611
 
2612
    `GPIO_VAPI_AUX (1)'
2613
          Set the GPIO auxiliary inputs to the data field
2614
 
2615
    `GPIO_VAPI_CLOCK (2)'
2616
          Add an external GPIO clock trigger of period specified in the
2617
          data field.
2618
 
2619
    `GPIO_VAPI_RGPIO_OE (3)'
2620
          Set the GPIO output enable to the data field
2621
 
2622
    `GPIO_VAPI_RGPIO_INTE (4)'
2623
          Set the next interrupt to the data field
2624
 
2625
    `GPIO_VAPI_RGPIO_PTRIG (5)'
2626
          Set the next trigger to the data field
2627
 
2628
    `GPIO_VAPI_RGPIO_AUX (6)'
2629
          Set the next auxiliary input to the data field
2630
 
2631
    `GPIO_VAPI_RGPIO_CTRL (7)'
2632
          Set th next control input to the data field
2633
 
2634
 
2635
 
2636

2637
File: or1ksim.info,  Node: Code Internals,  Next: GNU Free Documentation License,  Prev: Verification API,  Up: Top
2638
 
2639
6 A Guide to Or1ksim Internals
2640
******************************
2641
 
2642 82 jeremybenn
These are notes to help those wanting to extend Or1ksim.  This section
2643 19 jeremybenn
assumes the use of a tag file, so file locations of entities'
2644 82 jeremybenn
definitions are not in general provided.  For more on tags, see the
2645
Linux manual page for `etags'.  A tag file can be created with:
2646 19 jeremybenn
 
2647
     make tags
2648
 
2649
* Menu:
2650
 
2651
* Coding Conventions::
2652
* Global Data Structures::
2653
* Concepts::
2654
* Internal Debugging::
2655 104 jeremybenn
* Regression Testing::
2656 19 jeremybenn
 
2657

2658
File: or1ksim.info,  Node: Coding Conventions,  Next: Global Data Structures,  Up: Code Internals
2659
 
2660
6.1 Coding Conventions for Or1ksim
2661
==================================
2662
 
2663
This chapter provides some guidelines for coding, to facilitate
2664
extensions to Or1ksim
2665
 
2666
_GNU Coding Standard_
2667
     Code should follow the GNU coding standard for C
2668 82 jeremybenn
     (`http://www.gnu.org/prep/standards/'.  If in doubt, put your code
2669 19 jeremybenn
     through the `indent' program.
2670
 
2671
_`#include' headers_
2672
     All C source code files should include `config.h' before any other
2673
     file.
2674
 
2675
     This should be followed by inclusion of any system headers (but see
2676
     the comments about portability and `port.h' below) and then by any
2677
     Or1ksim package headers.
2678
 
2679
     If `port.h' is required, it should be the first package header to
2680
     be included after the system headers.
2681
 
2682
     All C source code and header files should directly include any
2683 82 jeremybenn
     system or package header they depend on, i.e.  not rely on any
2684
     other header having already included it.  The two exceptions are
2685 19 jeremybenn
 
2686
       1. All header files may assume that `config.h' has already been
2687
          included.
2688
 
2689
       2. System headers which impose portability problems should be
2690
          included by using the package header `port.h', rather than
2691 82 jeremybenn
          the system headers themselves.  This is the case for code
2692 19 jeremybenn
          requiring
2693
 
2694
             * `strndup' (from `string.h')
2695
 
2696
             * Integer types (`intN_t', `uintN_t') (from `inttypes.h').
2697
 
2698
             * `isblank' (from `ctype.h')
2699
 
2700
 
2701
 
2702
_`#include' files once only_
2703
     All include files should be protected by `#ifndef' to ensure their
2704 82 jeremybenn
     definitions are only included once.  For instance a header file
2705 19 jeremybenn
     `X-Y.H' should surround its contents with:
2706
 
2707
          #ifndef X_Y__H
2708
          #define X_Y__H
2709
 
2710
          
2711
 
2712
          #endif  /* X_Y__H */
2713
 
2714
_Avoid `typedef'_
2715
     The GNU coding style for C does not have a clear way to distinguish
2716 82 jeremybenn
     between user type name and user variables.  For this reason
2717 19 jeremybenn
     `typedef' should be avoided except for the most ubiquitous user
2718 82 jeremybenn
     defined types.  This makes the code much easier to read.
2719 19 jeremybenn
 
2720
     There are some `typedef' declarations in the `argtable2' library
2721
     and the ELF and COFF headers, because this code is taken from
2722
     other places.
2723
 
2724
     Within Or1ksim legacy uses of `typedef' have largely been purged,
2725
     except in the Custom Unit Compiler (*note Custom Unit Compiler
2726
     (CUC) Configuration: CUC Configuration.).
2727
 
2728
     The remaining uses of `typedef' occur in two places:
2729
 
2730
        * `port/port.h' defines types to replace those in header files
2731
          that are not available (character functions, string
2732
          duplication, integer types).
2733
 
2734
          `cpu/or1k/arch.h' defines types for the key Or1ksim entities:
2735
          addresses (`oraddr_t'), unsigned register values (`uorreg_t')
2736
          and signed register (`orreg_t') values.
2737
 
2738
 
2739
     Where new types are defined, they should appear in one of these two
2740 82 jeremybenn
     files as appropriate.  Or1ksim specific types appearing in
2741
     `arch.h' should always have the suffix `_h'.
2742 19 jeremybenn
 
2743
_Don't begin names with underscore_
2744
     Names beginning with `_' are intended to be part of the C
2745 82 jeremybenn
     infrastructure.  They should not be used in the simulator code.
2746 19 jeremybenn
 
2747
_Keep Non-global top level entities static_
2748
     All top level entities (functions, variables), which are not
2749
     explicitly part of a global interface should be declared static.
2750
     This ensures that unwanted connections are not inadvertently built
2751
     across the program.
2752
 
2753
_Use of `inline'_
2754 82 jeremybenn
     Code should not be declared `inline'.  Modern compilers can work
2755 19 jeremybenn
     out for themselves what is best in this respect.
2756
 
2757
_Initialization_
2758 82 jeremybenn
     All data structures should be explicitly initialized.  In
2759
     particular code should not rely on static data structures being
2760
     initialized to zero.
2761 19 jeremybenn
 
2762
     The rationale is that in future static data structures may become
2763 82 jeremybenn
     dynamic.  This has been a particular source of bugs in Or1ksim
2764 19 jeremybenn
     historically.
2765
 
2766
     A specific case is with new peripherals, which should always
2767
     include a `start' function to pre-initialize all configuration
2768
     parameters to sensible defaults
2769
 
2770
_Configuration Validation_
2771
     All configuration values should be validated, preferably when
2772
     encountered, if not when the `section' is closed, or otherwise at
2773
     run time when the parameter is first used.
2774
 
2775
 
2776

2777
File: or1ksim.info,  Node: Global Data Structures,  Next: Concepts,  Prev: Coding Conventions,  Up: Code Internals
2778
 
2779
6.2 Global Data Structures
2780
==========================
2781
 
2782
`config'
2783
     The global variable `config' of type `struct config' holds the
2784
     configuration data for some of the Or1ksim components which are
2785 82 jeremybenn
     always present.  At present the components are:
2786 19 jeremybenn
 
2787
        * The simulator defined in `section sim' (*note Simulator
2788
          Configuration: Simulator Configuration.).
2789
 
2790
        * The Verification API (VAPI) defined  in `section vapi' (*note
2791
          Verification API (VAPI) Configuration: Verification API
2792
          Configuration.).
2793
 
2794
        * The Custom Unit Compiler (CUC), defined in `section cuc'
2795
          (*note Custom Unit Compiler (CUC) Configuration: CUC
2796
          Configuration.).
2797
 
2798
        * The CPU, defined in `section cpu' (*note CPU Configuration:
2799
          CPU Configuration.).
2800
 
2801
        * The data cache (but not the instruction cache), defined in
2802
          `section dc' (*note Cache Configuration: Cache
2803
          Configuration.).
2804
 
2805
        * The power management unit, defined in `section pm' (*note
2806
          Power Management Configuration: Power Management
2807
          Configuration.).
2808
 
2809
        * The programmable interrupt controller, defined in
2810
          `section pic' (*note Interrupt Configuration: Interrupt
2811
          Configuration.).
2812
 
2813
        * Branch prediciton, defined in `section bpb' (*note Branch
2814
          Prediction Configuration: Branch Prediction Configuration.).
2815
 
2816
        * The debug unit, defined in `section debug' (*note Debug
2817
          Interface Configuration: Debug Interface Configuration.).
2818
 
2819
 
2820
     This struct is made of a collection of structs, one for each
2821 82 jeremybenn
     component.  For example the simulator configuration is held in
2822 19 jeremybenn
     `config.sim'.
2823
 
2824
`config'
2825
     This is a linked list of data structures holding configuration data
2826
     for all sections which are not held in the main `config' data
2827 82 jeremybenn
     structure.  In general these are components (such as peripherals
2828
     and memory) which may occur multiple times.  However it also
2829
     handles some architectural components which may occur only once,
2830
     such as the memory management units, the instruction cache, the
2831
     interrupt controller and branch prediction.
2832 19 jeremybenn
 
2833
`runtime'
2834
     The global variable `runtime' of type `struct runtime' holds all
2835 82 jeremybenn
     the runtime information about the simulation.  To access this
2836 19 jeremybenn
     variable, `sim-config.h' must be included.
2837
 
2838
     This struct is itself made of 3 other structs, `cpu' (for CPU run
2839
     time state), `vapi' (for Verification API state) and `cuc' (for
2840
     Custom Unit Compiler state).
2841
 
2842
 
2843

2844
File: or1ksim.info,  Node: Concepts,  Next: Internal Debugging,  Prev: Global Data Structures,  Up: Code Internals
2845
 
2846
6.3 Concepts
2847
============
2848
 
2849
_Output Redirection_
2850 82 jeremybenn
     The current output stream is held in `runtime.cpu.fout'.  Output
2851 19 jeremybenn
     should be explicitly written to this stream, or may use the
2852
     `PRINTF' macro, which will write its arguments to this output
2853
     stream.
2854
 
2855
_Reset Hooks_
2856
     Any peripheral may register a routine to be called when the the
2857
     processor is reset by calling `reg_sim_reset', providing a
2858 82 jeremybenn
     function and pointer to a data structure as arguments.  On reset
2859 19 jeremybenn
     that function will be called with the data stucture pointer as
2860
     argument.
2861
 
2862
 
2863

2864 104 jeremybenn
File: or1ksim.info,  Node: Internal Debugging,  Next: Regression Testing,  Prev: Concepts,  Up: Code Internals
2865 19 jeremybenn
 
2866
6.4 Internal Debugging
2867
======================
2868
 
2869
The function `debug' is like `printf', but with an extra first
2870 82 jeremybenn
argument, which is the debug level.  If the debug level specified in
2871
the simulator configuration (*note Simulator Behavior: Simulator
2872
Behavior.) is greater than or equal to this value, the remaining
2873
arguments are printed to the current output stream (*note Output
2874
Redirection: Output Redirection.).
2875 19 jeremybenn
 
2876

2877 104 jeremybenn
File: or1ksim.info,  Node: Regression Testing,  Prev: Internal Debugging,  Up: Code Internals
2878
 
2879
6.5 Regression Testing
2880
======================
2881
 
2882
Or1ksim now includes a regression test suite for both standalone and
2883
library usage as described earlier (*note Building and Installing:
2884
Build and Install.).  Running the tests requires that the OpenRISC
2885
toolchain and DejaGNU are both installed.
2886
 
2887
Tests are written using `expect', a derivative of TCL.  Documentation
2888
of DejaGnu, `expect' and TCL are freely available on the Web.  The
2889
Embecosm Application Note 8, `Howto: Using DejaGnu for Testing: A
2890
Simple Introduction' (`http://www.embecosm.com/download/ean8.html')
2891
provides a concise introduction.
2892
 
2893
All test code is found in the `testsuite' directory.  The key files and
2894
directories used are as follows.
2895
 
2896
`global-conf.exp'
2897
     This is the global DejaGNU configuration file used to set up
2898
     parameters common to all tests.  If the user has the environment
2899
     varialbe `DEJAGNU' defined, it will be used instead, but this is
2900
     not recommended.
2901
 
2902
`Makefile.am'
2903
     This is the top level `automake' file for the testsuite.  The only
2904
     changes likely to be needed here is additional local cleanup of
2905
     files created by new tests.
2906
 
2907
`README'
2908
     This contains details of all the tests
2909
 
2910
`config'
2911
     This contains DejaGnu board configurations.  Since the tests are
2912
     generally run on a Unix host, this should just contain `Unix.exp'.
2913
 
2914
`lib'
2915
     This contains DejaGnu tool specific configurations.  "Tool" has a
2916
     specific meaning in DejaGNU, referring just to a grouping of
2917
     tests.  In this case there are two such "tools", "or1ksim" and
2918
     "libsim" for tests of the standalone tool and tests of the library.
2919
 
2920
     Corresponding to this, there are two tool specific configuration
2921
     files, `or1ksim.exp' and `libsim.exp'.  These contain `expect'/TCL
2922
     procedures for common use among the tests.
2923
 
2924
`libsim.tests'
2925
`or1ksim.tests'
2926
     These are the directories of tests of the Or1ksim library.  They
2927
     also include Or1ksim configuration files and each has a
2928
     `Makefile.am' file.  `Makefile.am' should be updated whenever
2929
     files are added to this directory, to ensure they are included in
2930
     the distribution.
2931
 
2932
`test-code'
2933
     These are all the test programs to be compiled on the host (each
2934
     in its own directory).  In general these are programs to support
2935
     testing of the library, and build various programs linking in the
2936
     library.
2937
 
2938
`test-code'
2939
     These are all the test programs to be compiled with the OpenRISC
2940
     tool chain to run with either standalone Or1ksim or the library.
2941
     This directory includes its own `configure.ac', since it must set
2942
     up a separate tool chain based on the target, not the host.
2943
 
2944
 
2945
To add a new test needs the following steps.
2946
 
2947
   * Put new host C code in its own directory within `test-code'. Add
2948
     the directory to the existing `Makefile.am' in the `test-code'
2949
     directory and create a `Makefile.am' in the new directory to drive
2950
     building the test program(s). Don't forget to add the new
2951
     `Makefile' to the top level `configure.ac' so it gets generated.
2952
     Not all tests require code here.
2953
 
2954
   * Put new target C code in its own directory within
2955
     `test-code-or1k'. Once again modify & create `Makefile.am'. this
2956
     time though modify the `configure.ac' in the `test-code-or1k' so
2957
     the `Makefile' gets generated. The existing programs provide
2958
     examples to start from, including custom linker scripts where
2959
     needed.
2960
 
2961
   * Add one or more tests and configuration files to the relevant
2962
     "tool" test directory. Use the existing tests as templates. They
2963
     make heavy use of the `expect'/TCL procedures in the `config'
2964
     directory to facilitate driving the tests.
2965
 
2966
 
2967

2968 19 jeremybenn
File: or1ksim.info,  Node: GNU Free Documentation License,  Next: Index,  Prev: Code Internals,  Up: Top
2969
 
2970
7 GNU Free Documentation License
2971
********************************
2972
 
2973
                      Version 1.2, November 2002
2974
 
2975
     Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
2976
     51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
2977
 
2978
     Everyone is permitted to copy and distribute verbatim copies
2979
     of this license document, but changing it is not allowed.
2980
 
2981
  0. PREAMBLE
2982
 
2983
     The purpose of this License is to make a manual, textbook, or other
2984
     functional and useful document "free" in the sense of freedom: to
2985
     assure everyone the effective freedom to copy and redistribute it,
2986
     with or without modifying it, either commercially or
2987
     noncommercially.  Secondarily, this License preserves for the
2988
     author and publisher a way to get credit for their work, while not
2989
     being considered responsible for modifications made by others.
2990
 
2991
     This License is a kind of "copyleft", which means that derivative
2992
     works of the document must themselves be free in the same sense.
2993
     It complements the GNU General Public License, which is a copyleft
2994
     license designed for free software.
2995
 
2996
     We have designed this License in order to use it for manuals for
2997
     free software, because free software needs free documentation: a
2998
     free program should come with manuals providing the same freedoms
2999
     that the software does.  But this License is not limited to
3000
     software manuals; it can be used for any textual work, regardless
3001
     of subject matter or whether it is published as a printed book.
3002
     We recommend this License principally for works whose purpose is
3003
     instruction or reference.
3004
 
3005
  1. APPLICABILITY AND DEFINITIONS
3006
 
3007
     This License applies to any manual or other work, in any medium,
3008
     that contains a notice placed by the copyright holder saying it
3009
     can be distributed under the terms of this License.  Such a notice
3010
     grants a world-wide, royalty-free license, unlimited in duration,
3011
     to use that work under the conditions stated herein.  The
3012
     "Document", below, refers to any such manual or work.  Any member
3013
     of the public is a licensee, and is addressed as "you".  You
3014
     accept the license if you copy, modify or distribute the work in a
3015
     way requiring permission under copyright law.
3016
 
3017
     A "Modified Version" of the Document means any work containing the
3018
     Document or a portion of it, either copied verbatim, or with
3019
     modifications and/or translated into another language.
3020
 
3021
     A "Secondary Section" is a named appendix or a front-matter section
3022
     of the Document that deals exclusively with the relationship of the
3023
     publishers or authors of the Document to the Document's overall
3024
     subject (or to related matters) and contains nothing that could
3025
     fall directly within that overall subject.  (Thus, if the Document
3026
     is in part a textbook of mathematics, a Secondary Section may not
3027
     explain any mathematics.)  The relationship could be a matter of
3028
     historical connection with the subject or with related matters, or
3029
     of legal, commercial, philosophical, ethical or political position
3030
     regarding them.
3031
 
3032
     The "Invariant Sections" are certain Secondary Sections whose
3033
     titles are designated, as being those of Invariant Sections, in
3034
     the notice that says that the Document is released under this
3035
     License.  If a section does not fit the above definition of
3036
     Secondary then it is not allowed to be designated as Invariant.
3037
     The Document may contain zero Invariant Sections.  If the Document
3038
     does not identify any Invariant Sections then there are none.
3039
 
3040
     The "Cover Texts" are certain short passages of text that are
3041
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
3042
     that says that the Document is released under this License.  A
3043
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
3044
     be at most 25 words.
3045
 
3046
     A "Transparent" copy of the Document means a machine-readable copy,
3047
     represented in a format whose specification is available to the
3048
     general public, that is suitable for revising the document
3049
     straightforwardly with generic text editors or (for images
3050
     composed of pixels) generic paint programs or (for drawings) some
3051
     widely available drawing editor, and that is suitable for input to
3052
     text formatters or for automatic translation to a variety of
3053
     formats suitable for input to text formatters.  A copy made in an
3054
     otherwise Transparent file format whose markup, or absence of
3055
     markup, has been arranged to thwart or discourage subsequent
3056
     modification by readers is not Transparent.  An image format is
3057
     not Transparent if used for any substantial amount of text.  A
3058
     copy that is not "Transparent" is called "Opaque".
3059
 
3060
     Examples of suitable formats for Transparent copies include plain
3061
     ASCII without markup, Texinfo input format, LaTeX input format,
3062
     SGML or XML using a publicly available DTD, and
3063
     standard-conforming simple HTML, PostScript or PDF designed for
3064
     human modification.  Examples of transparent image formats include
3065
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
3066
     can be read and edited only by proprietary word processors, SGML or
3067
     XML for which the DTD and/or processing tools are not generally
3068
     available, and the machine-generated HTML, PostScript or PDF
3069
     produced by some word processors for output purposes only.
3070
 
3071
     The "Title Page" means, for a printed book, the title page itself,
3072
     plus such following pages as are needed to hold, legibly, the
3073
     material this License requires to appear in the title page.  For
3074
     works in formats which do not have any title page as such, "Title
3075
     Page" means the text near the most prominent appearance of the
3076
     work's title, preceding the beginning of the body of the text.
3077
 
3078
     A section "Entitled XYZ" means a named subunit of the Document
3079
     whose title either is precisely XYZ or contains XYZ in parentheses
3080
     following text that translates XYZ in another language.  (Here XYZ
3081
     stands for a specific section name mentioned below, such as
3082
     "Acknowledgements", "Dedications", "Endorsements", or "History".)
3083
     To "Preserve the Title" of such a section when you modify the
3084
     Document means that it remains a section "Entitled XYZ" according
3085
     to this definition.
3086
 
3087
     The Document may include Warranty Disclaimers next to the notice
3088
     which states that this License applies to the Document.  These
3089
     Warranty Disclaimers are considered to be included by reference in
3090
     this License, but only as regards disclaiming warranties: any other
3091
     implication that these Warranty Disclaimers may have is void and
3092
     has no effect on the meaning of this License.
3093
 
3094
  2. VERBATIM COPYING
3095
 
3096
     You may copy and distribute the Document in any medium, either
3097
     commercially or noncommercially, provided that this License, the
3098
     copyright notices, and the license notice saying this License
3099
     applies to the Document are reproduced in all copies, and that you
3100
     add no other conditions whatsoever to those of this License.  You
3101
     may not use technical measures to obstruct or control the reading
3102
     or further copying of the copies you make or distribute.  However,
3103
     you may accept compensation in exchange for copies.  If you
3104
     distribute a large enough number of copies you must also follow
3105
     the conditions in section 3.
3106
 
3107
     You may also lend copies, under the same conditions stated above,
3108
     and you may publicly display copies.
3109
 
3110
  3. COPYING IN QUANTITY
3111
 
3112
     If you publish printed copies (or copies in media that commonly
3113
     have printed covers) of the Document, numbering more than 100, and
3114
     the Document's license notice requires Cover Texts, you must
3115
     enclose the copies in covers that carry, clearly and legibly, all
3116
     these Cover Texts: Front-Cover Texts on the front cover, and
3117
     Back-Cover Texts on the back cover.  Both covers must also clearly
3118
     and legibly identify you as the publisher of these copies.  The
3119
     front cover must present the full title with all words of the
3120
     title equally prominent and visible.  You may add other material
3121
     on the covers in addition.  Copying with changes limited to the
3122
     covers, as long as they preserve the title of the Document and
3123
     satisfy these conditions, can be treated as verbatim copying in
3124
     other respects.
3125
 
3126
     If the required texts for either cover are too voluminous to fit
3127
     legibly, you should put the first ones listed (as many as fit
3128
     reasonably) on the actual cover, and continue the rest onto
3129
     adjacent pages.
3130
 
3131
     If you publish or distribute Opaque copies of the Document
3132
     numbering more than 100, you must either include a
3133
     machine-readable Transparent copy along with each Opaque copy, or
3134
     state in or with each Opaque copy a computer-network location from
3135
     which the general network-using public has access to download
3136
     using public-standard network protocols a complete Transparent
3137
     copy of the Document, free of added material.  If you use the
3138
     latter option, you must take reasonably prudent steps, when you
3139
     begin distribution of Opaque copies in quantity, to ensure that
3140
     this Transparent copy will remain thus accessible at the stated
3141
     location until at least one year after the last time you
3142
     distribute an Opaque copy (directly or through your agents or
3143
     retailers) of that edition to the public.
3144
 
3145
     It is requested, but not required, that you contact the authors of
3146
     the Document well before redistributing any large number of
3147
     copies, to give them a chance to provide you with an updated
3148
     version of the Document.
3149
 
3150
  4. MODIFICATIONS
3151
 
3152
     You may copy and distribute a Modified Version of the Document
3153
     under the conditions of sections 2 and 3 above, provided that you
3154
     release the Modified Version under precisely this License, with
3155
     the Modified Version filling the role of the Document, thus
3156
     licensing distribution and modification of the Modified Version to
3157
     whoever possesses a copy of it.  In addition, you must do these
3158
     things in the Modified Version:
3159
 
3160
       A. Use in the Title Page (and on the covers, if any) a title
3161
          distinct from that of the Document, and from those of
3162
          previous versions (which should, if there were any, be listed
3163
          in the History section of the Document).  You may use the
3164
          same title as a previous version if the original publisher of
3165
          that version gives permission.
3166
 
3167
       B. List on the Title Page, as authors, one or more persons or
3168
          entities responsible for authorship of the modifications in
3169
          the Modified Version, together with at least five of the
3170
          principal authors of the Document (all of its principal
3171
          authors, if it has fewer than five), unless they release you
3172
          from this requirement.
3173
 
3174
       C. State on the Title page the name of the publisher of the
3175
          Modified Version, as the publisher.
3176
 
3177
       D. Preserve all the copyright notices of the Document.
3178
 
3179
       E. Add an appropriate copyright notice for your modifications
3180
          adjacent to the other copyright notices.
3181
 
3182
       F. Include, immediately after the copyright notices, a license
3183
          notice giving the public permission to use the Modified
3184
          Version under the terms of this License, in the form shown in
3185
          the Addendum below.
3186
 
3187
       G. Preserve in that license notice the full lists of Invariant
3188
          Sections and required Cover Texts given in the Document's
3189
          license notice.
3190
 
3191
       H. Include an unaltered copy of this License.
3192
 
3193
       I. Preserve the section Entitled "History", Preserve its Title,
3194
          and add to it an item stating at least the title, year, new
3195
          authors, and publisher of the Modified Version as given on
3196
          the Title Page.  If there is no section Entitled "History" in
3197
          the Document, create one stating the title, year, authors,
3198
          and publisher of the Document as given on its Title Page,
3199
          then add an item describing the Modified Version as stated in
3200
          the previous sentence.
3201
 
3202
       J. Preserve the network location, if any, given in the Document
3203
          for public access to a Transparent copy of the Document, and
3204
          likewise the network locations given in the Document for
3205
          previous versions it was based on.  These may be placed in
3206
          the "History" section.  You may omit a network location for a
3207
          work that was published at least four years before the
3208
          Document itself, or if the original publisher of the version
3209
          it refers to gives permission.
3210
 
3211
       K. For any section Entitled "Acknowledgements" or "Dedications",
3212
          Preserve the Title of the section, and preserve in the
3213
          section all the substance and tone of each of the contributor
3214
          acknowledgements and/or dedications given therein.
3215
 
3216
       L. Preserve all the Invariant Sections of the Document,
3217
          unaltered in their text and in their titles.  Section numbers
3218
          or the equivalent are not considered part of the section
3219
          titles.
3220
 
3221
       M. Delete any section Entitled "Endorsements".  Such a section
3222
          may not be included in the Modified Version.
3223
 
3224
       N. Do not retitle any existing section to be Entitled
3225
          "Endorsements" or to conflict in title with any Invariant
3226
          Section.
3227
 
3228
       O. Preserve any Warranty Disclaimers.
3229
 
3230
     If the Modified Version includes new front-matter sections or
3231
     appendices that qualify as Secondary Sections and contain no
3232
     material copied from the Document, you may at your option
3233
     designate some or all of these sections as invariant.  To do this,
3234
     add their titles to the list of Invariant Sections in the Modified
3235
     Version's license notice.  These titles must be distinct from any
3236
     other section titles.
3237
 
3238
     You may add a section Entitled "Endorsements", provided it contains
3239
     nothing but endorsements of your Modified Version by various
3240
     parties--for example, statements of peer review or that the text
3241
     has been approved by an organization as the authoritative
3242
     definition of a standard.
3243
 
3244
     You may add a passage of up to five words as a Front-Cover Text,
3245
     and a passage of up to 25 words as a Back-Cover Text, to the end
3246
     of the list of Cover Texts in the Modified Version.  Only one
3247
     passage of Front-Cover Text and one of Back-Cover Text may be
3248
     added by (or through arrangements made by) any one entity.  If the
3249
     Document already includes a cover text for the same cover,
3250
     previously added by you or by arrangement made by the same entity
3251
     you are acting on behalf of, you may not add another; but you may
3252
     replace the old one, on explicit permission from the previous
3253
     publisher that added the old one.
3254
 
3255
     The author(s) and publisher(s) of the Document do not by this
3256
     License give permission to use their names for publicity for or to
3257
     assert or imply endorsement of any Modified Version.
3258
 
3259
  5. COMBINING DOCUMENTS
3260
 
3261
     You may combine the Document with other documents released under
3262
     this License, under the terms defined in section 4 above for
3263
     modified versions, provided that you include in the combination
3264
     all of the Invariant Sections of all of the original documents,
3265
     unmodified, and list them all as Invariant Sections of your
3266
     combined work in its license notice, and that you preserve all
3267
     their Warranty Disclaimers.
3268
 
3269
     The combined work need only contain one copy of this License, and
3270
     multiple identical Invariant Sections may be replaced with a single
3271
     copy.  If there are multiple Invariant Sections with the same name
3272
     but different contents, make the title of each such section unique
3273
     by adding at the end of it, in parentheses, the name of the
3274
     original author or publisher of that section if known, or else a
3275
     unique number.  Make the same adjustment to the section titles in
3276
     the list of Invariant Sections in the license notice of the
3277
     combined work.
3278
 
3279
     In the combination, you must combine any sections Entitled
3280
     "History" in the various original documents, forming one section
3281
     Entitled "History"; likewise combine any sections Entitled
3282
     "Acknowledgements", and any sections Entitled "Dedications".  You
3283
     must delete all sections Entitled "Endorsements."
3284
 
3285
  6. COLLECTIONS OF DOCUMENTS
3286
 
3287
     You may make a collection consisting of the Document and other
3288
     documents released under this License, and replace the individual
3289
     copies of this License in the various documents with a single copy
3290
     that is included in the collection, provided that you follow the
3291
     rules of this License for verbatim copying of each of the
3292
     documents in all other respects.
3293
 
3294
     You may extract a single document from such a collection, and
3295
     distribute it individually under this License, provided you insert
3296
     a copy of this License into the extracted document, and follow
3297
     this License in all other respects regarding verbatim copying of
3298
     that document.
3299
 
3300
  7. AGGREGATION WITH INDEPENDENT WORKS
3301
 
3302
     A compilation of the Document or its derivatives with other
3303
     separate and independent documents or works, in or on a volume of
3304
     a storage or distribution medium, is called an "aggregate" if the
3305
     copyright resulting from the compilation is not used to limit the
3306
     legal rights of the compilation's users beyond what the individual
3307
     works permit.  When the Document is included in an aggregate, this
3308
     License does not apply to the other works in the aggregate which
3309
     are not themselves derivative works of the Document.
3310
 
3311
     If the Cover Text requirement of section 3 is applicable to these
3312
     copies of the Document, then if the Document is less than one half
3313
     of the entire aggregate, the Document's Cover Texts may be placed
3314
     on covers that bracket the Document within the aggregate, or the
3315
     electronic equivalent of covers if the Document is in electronic
3316
     form.  Otherwise they must appear on printed covers that bracket
3317
     the whole aggregate.
3318
 
3319
  8. TRANSLATION
3320
 
3321
     Translation is considered a kind of modification, so you may
3322
     distribute translations of the Document under the terms of section
3323
     4.  Replacing Invariant Sections with translations requires special
3324
     permission from their copyright holders, but you may include
3325
     translations of some or all Invariant Sections in addition to the
3326
     original versions of these Invariant Sections.  You may include a
3327
     translation of this License, and all the license notices in the
3328
     Document, and any Warranty Disclaimers, provided that you also
3329
     include the original English version of this License and the
3330
     original versions of those notices and disclaimers.  In case of a
3331
     disagreement between the translation and the original version of
3332
     this License or a notice or disclaimer, the original version will
3333
     prevail.
3334
 
3335
     If a section in the Document is Entitled "Acknowledgements",
3336
     "Dedications", or "History", the requirement (section 4) to
3337
     Preserve its Title (section 1) will typically require changing the
3338
     actual title.
3339
 
3340
  9. TERMINATION
3341
 
3342
     You may not copy, modify, sublicense, or distribute the Document
3343
     except as expressly provided for under this License.  Any other
3344
     attempt to copy, modify, sublicense or distribute the Document is
3345
     void, and will automatically terminate your rights under this
3346
     License.  However, parties who have received copies, or rights,
3347
     from you under this License will not have their licenses
3348
     terminated so long as such parties remain in full compliance.
3349
 
3350
 10. FUTURE REVISIONS OF THIS LICENSE
3351
 
3352
     The Free Software Foundation may publish new, revised versions of
3353
     the GNU Free Documentation License from time to time.  Such new
3354
     versions will be similar in spirit to the present version, but may
3355
     differ in detail to address new problems or concerns.  See
3356
     `http://www.gnu.org/copyleft/'.
3357
 
3358
     Each version of the License is given a distinguishing version
3359
     number.  If the Document specifies that a particular numbered
3360
     version of this License "or any later version" applies to it, you
3361
     have the option of following the terms and conditions either of
3362
     that specified version or of any later version that has been
3363
     published (not as a draft) by the Free Software Foundation.  If
3364
     the Document does not specify a version number of this License,
3365
     you may choose any version ever published (not as a draft) by the
3366
     Free Software Foundation.
3367
 
3368
ADDENDUM: How to use this License for your documents
3369
====================================================
3370
 
3371
To use this License in a document you have written, include a copy of
3372
the License in the document and put the following copyright and license
3373
notices just after the title page:
3374
 
3375
       Copyright (C)  YEAR  YOUR NAME.
3376
       Permission is granted to copy, distribute and/or modify this document
3377
       under the terms of the GNU Free Documentation License, Version 1.2
3378
       or any later version published by the Free Software Foundation;
3379
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
3380
       Texts.  A copy of the license is included in the section entitled ``GNU
3381
       Free Documentation License''.
3382
 
3383
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
3384
replace the "with...Texts." line with this:
3385
 
3386
         with the Invariant Sections being LIST THEIR TITLES, with
3387
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
3388
         being LIST.
3389
 
3390
If you have Invariant Sections without Cover Texts, or some other
3391
combination of the three, merge those two alternatives to suit the
3392
situation.
3393
 
3394
If your document contains nontrivial examples of program code, we
3395
recommend releasing these examples in parallel under your choice of
3396
free software license, such as the GNU General Public License, to
3397
permit their use in free software.
3398
 
3399

3400
File: or1ksim.info,  Node: Index,  Prev: GNU Free Documentation License,  Up: Top
3401
 
3402
Index
3403
*****
3404
 
3405
 
3406
* Menu:
3407
3408
* --cumulative:                          Profiling Utility.   (line  26)
3409
* --debug-config:                        Standalone Simulator.
3410 235 jeremybenn
                                                              (line  50)
3411 82 jeremybenn
* --disable-all-tests:                   Configuring the Build.
3412 127 jeremybenn
                                                              (line 105)
3413 19 jeremybenn
* --disable-arith-flag:                  Configuring the Build.
3414 127 jeremybenn
                                                              (line 118)
3415 124 jeremybenn
* --disable-debug:                       Configuring the Build.
3416 127 jeremybenn
                                                              (line  98)
3417 19 jeremybenn
* --disable-ethphy:                      Configuring the Build.
3418 104 jeremybenn
                                                              (line  59)
3419 19 jeremybenn
* --disable-ov-flag:                     Configuring the Build.
3420 127 jeremybenn
                                                              (line 133)
3421 19 jeremybenn
* --disable-profiling:                   Configuring the Build.
3422 104 jeremybenn
                                                              (line  30)
3423 19 jeremybenn
* --disable-range-stats:                 Configuring the Build.
3424 127 jeremybenn
                                                              (line  92)
3425
* --disable-unsigned-xori:               Configuring the Build.
3426 104 jeremybenn
                                                              (line  69)
3427 82 jeremybenn
* --enable-all-tests:                    Configuring the Build.
3428 127 jeremybenn
                                                              (line 104)
3429 19 jeremybenn
* --enable-arith-flag:                   Configuring the Build.
3430 127 jeremybenn
                                                              (line 117)
3431 124 jeremybenn
* --enable-debug:                        Configuring the Build.
3432 127 jeremybenn
                                                              (line  97)
3433 19 jeremybenn
* --enable-ethphy:                       Configuring the Build.
3434 104 jeremybenn
                                                              (line  58)
3435 19 jeremybenn
* --enable-execution:                    Configuring the Build.
3436 104 jeremybenn
                                                              (line  37)
3437 19 jeremybenn
* --enable-mprofile:                     Standalone Simulator.
3438 235 jeremybenn
                                                              (line  79)
3439 19 jeremybenn
* --enable-ov-flag:                      Configuring the Build.
3440 127 jeremybenn
                                                              (line 132)
3441 19 jeremybenn
* --enable-profile:                      Standalone Simulator.
3442 235 jeremybenn
                                                              (line  76)
3443 19 jeremybenn
* --enable-profiling:                    Configuring the Build.
3444 104 jeremybenn
                                                              (line  29)
3445 19 jeremybenn
* --enable-range-stats:                  Configuring the Build.
3446 127 jeremybenn
                                                              (line  91)
3447
* --enable-unsigned-xori:                Configuring the Build.
3448 104 jeremybenn
                                                              (line  68)
3449 19 jeremybenn
* --file:                                Standalone Simulator.
3450
                                                              (line  24)
3451
* --filename:                            Memory Profiling Utility.
3452
                                                              (line  51)
3453
* --generate:                            Profiling Utility.   (line  34)
3454
* --group:                               Memory Profiling Utility.
3455
                                                              (line  47)
3456
* --help:                                Standalone Simulator.
3457
                                                              (line  20)
3458
* --help (memory profiling utility):     Memory Profiling Utility.
3459
                                                              (line  22)
3460
* --help (profiling utility):            Profiling Utility.   (line  22)
3461
* --interactive:                         Standalone Simulator.
3462 235 jeremybenn
                                                              (line  56)
3463 19 jeremybenn
* --mode:                                Memory Profiling Utility.
3464
                                                              (line  26)
3465
* --nosrv:                               Standalone Simulator.
3466
                                                              (line  32)
3467
* --quiet:                               Profiling Utility.   (line  30)
3468
* --srv:                                 Standalone Simulator.
3469
                                                              (line  40)
3470
* --strict-npc:                          Standalone Simulator.
3471 235 jeremybenn
                                                              (line  59)
3472 19 jeremybenn
* --version:                             Standalone Simulator.
3473
                                                              (line  16)
3474
* --version (memory profiling utility):  Memory Profiling Utility.
3475
                                                              (line  17)
3476
* --version (profiling utility):         Profiling Utility.   (line  17)
3477
* -c:                                    Profiling Utility.   (line  26)
3478
* -d:                                    Standalone Simulator.
3479 235 jeremybenn
                                                              (line  50)
3480 19 jeremybenn
* -f <1>:                                Memory Profiling Utility.
3481
                                                              (line  51)
3482
* -f:                                    Standalone Simulator.
3483
                                                              (line  24)
3484
* -g <1>:                                Memory Profiling Utility.
3485
                                                              (line  47)
3486
* -g:                                    Profiling Utility.   (line  34)
3487
* -h:                                    Standalone Simulator.
3488
                                                              (line  20)
3489
* -h (memory profiling utility):         Memory Profiling Utility.
3490
                                                              (line  22)
3491
* -h (profiling utility):                Profiling Utility.   (line  22)
3492
* -i:                                    Standalone Simulator.
3493 235 jeremybenn
                                                              (line  56)
3494 19 jeremybenn
* -m:                                    Memory Profiling Utility.
3495
                                                              (line  26)
3496
* -q:                                    Profiling Utility.   (line  30)
3497
* -v:                                    Standalone Simulator.
3498
                                                              (line  16)
3499
* -v (memory profiling utility):         Memory Profiling Utility.
3500
                                                              (line  17)
3501
* -v (profiling utility):                Profiling Utility.   (line  17)
3502
* 0x00 UART VAPI sub-command (UART verification): Verification API.
3503
                                                              (line  49)
3504
* 0x01 UART VAPI sub-command (UART verification): Verification API.
3505
                                                              (line  55)
3506
* 0x02 UART VAPI sub-command (UART verification): Verification API.
3507
                                                              (line  59)
3508
* 0x03 UART VAPI sub-command (UART verification): Verification API.
3509
                                                              (line  62)
3510
* 0x04 UART VAPI sub-command (UART verification): Verification API.
3511
                                                              (line  66)
3512
* 16550 (UART configuration):            UART Configuration.  (line  73)
3513 82 jeremybenn
* all tests enabled:                     Configuring the Build.
3514 127 jeremybenn
                                                              (line 105)
3515 19 jeremybenn
* Argtable2 debugging:                   Configuring the Build.
3516 127 jeremybenn
                                                              (line  98)
3517 19 jeremybenn
* ATA/ATAPI configuration:               Disc Interface Configuration.
3518
                                                              (line   6)
3519
* ATA/ATAPI device configuration:        Disc Interface Configuration.
3520
                                                              (line  88)
3521
* base_vapi_id (GPIO configuration - deprecated): GPIO Configuration.
3522
                                                              (line  32)
3523
* baseaddr (ATA/ATAPI configuration):    Disc Interface Configuration.
3524
                                                              (line  22)
3525
* baseaddr (DMA configuration):          DMA Configuration.   (line  24)
3526
* baseaddr (Ethernet configuration):     Ethernet Configuration.
3527
                                                              (line  22)
3528
* baseaddr (frame buffer configuration): Frame Buffer Configuration.
3529
                                                              (line  20)
3530
* baseaddr (generic peripheral configuration): Generic Peripheral Configuration.
3531
                                                              (line  22)
3532
* baseaddr (GPIO configuration):         GPIO Configuration.  (line  21)
3533
* baseaddr (keyboard configuration):     Keyboard Configuration.
3534
                                                              (line  36)
3535
* baseaddr (memory configuration):       Memory Configuration.
3536 98 jeremybenn
                                                              (line  87)
3537 19 jeremybenn
* baseaddr (memory controller configuration): Memory Controller Configuration.
3538 98 jeremybenn
                                                              (line  46)
3539 19 jeremybenn
* baseaddr (UART configuration):         UART Configuration.  (line  22)
3540
* baseaddr (VGA configuration):          Display Interface Configuration.
3541
                                                              (line  26)
3542
* blocksize (cache configuration):       Cache Configuration. (line  29)
3543
* BPB configuration:                     Branch Prediction Configuration.
3544
                                                              (line   6)
3545
* branch prediction configuration:       Branch Prediction Configuration.
3546
                                                              (line   6)
3547
* break (Interactive CLI):               Interactive Command Line.
3548
                                                              (line  57)
3549
* breakpoint list (Interactive CLI):     Interactive Command Line.
3550
                                                              (line  60)
3551
* breakpoint set/clear (Interactive CLI): Interactive Command Line.
3552
                                                              (line  57)
3553
* breaks (Interactive CLI):              Interactive Command Line.
3554
                                                              (line  60)
3555
* btic (branch prediction configuration): Branch Prediction Configuration.
3556
                                                              (line  19)
3557
* byte_enabled (generic peripheral configuration): Generic Peripheral Configuration.
3558
                                                              (line  48)
3559
* cache configuration:                   Cache Configuration. (line   6)
3560
* calling_convention (CUC configuration): CUC Configuration.  (line  34)
3561
* ce (memory configuration):             Memory Configuration.
3562 98 jeremybenn
                                                              (line 117)
3563 19 jeremybenn
* cfgr (CPU configuration):              CPU Configuration.   (line  47)
3564
* channel (UART configuration):          UART Configuration.  (line  29)
3565
* clear breakpoint (Interactive CLI):    Interactive Command Line.
3566
                                                              (line  57)
3567 202 julius
* clkcycle (simulator configuration):    Simulator Behavior.  (line 115)
3568 19 jeremybenn
* cm (Interactive CLI):                  Interactive Command Line.
3569
                                                              (line  54)
3570
* command line for Or1ksim standalone use: Standalone Simulator.
3571
                                                              (line   6)
3572
* complex model:                         Configuring the Build.
3573 104 jeremybenn
                                                              (line  37)
3574 19 jeremybenn
* config:                                Global Data Structures.
3575
                                                              (line   7)
3576
* config.bpb:                            Global Data Structures.
3577
                                                              (line  37)
3578
* config.cpu:                            Global Data Structures.
3579
                                                              (line  22)
3580
* config.cuc:                            Global Data Structures.
3581
                                                              (line  18)
3582
* config.dc:                             Global Data Structures.
3583
                                                              (line  25)
3584
* config.debug:                          Global Data Structures.
3585
                                                              (line  40)
3586
* config.pic:                            Global Data Structures.
3587
                                                              (line  33)
3588
* config.pm:                             Global Data Structures.
3589
                                                              (line  29)
3590
* config.sim:                            Global Data Structures.
3591
                                                              (line  11)
3592
* config.vapi:                           Global Data Structures.
3593
                                                              (line  14)
3594
* configuration dynamic structure:       Global Data Structures.
3595
                                                              (line  49)
3596
* configuration file structure:          Configuration File Format.
3597
                                                              (line   6)
3598
* configuration global structure:        Global Data Structures.
3599
                                                              (line   7)
3600
* configuration info (Interactive CLI):  Interactive Command Line.
3601
                                                              (line 119)
3602
* configuration of generic peripherals:  Generic Peripheral Configuration.
3603
                                                              (line   6)
3604
* configuration parameter setting (Interactive CLI): Interactive Command Line.
3605
                                                              (line 146)
3606
* configuring branch prediction:         Branch Prediction Configuration.
3607
                                                              (line   6)
3608
* configuring data & instruction caches: Cache Configuration. (line   6)
3609
* configuring data & instruction MMUs:   Memory Management Configuration.
3610
                                                              (line   6)
3611
* configuring DMA:                       DMA Configuration.   (line   6)
3612
* configuring memory:                    Memory Configuration.
3613
                                                              (line   6)
3614
* configuring Or1ksim:                   Configuration.       (line   6)
3615
* configuring power management:          Power Management Configuration.
3616
                                                              (line   6)
3617
* configuring the ATA/ATAPI interfaces:  Disc Interface Configuration.
3618
                                                              (line   6)
3619
* configuring the behavior of Or1ksim:   Simulator Behavior.  (line   6)
3620
* configuring the CPU:                   CPU Configuration.   (line   6)
3621
* configuring the Custom Unit Compiler (CUC): CUC Configuration.
3622
                                                              (line   6)
3623
* configuring the debug unit and interface to external debuggers: Debug Interface Configuration.
3624
                                                              (line   6)
3625
* configuring the Ethernet interface:    Ethernet Configuration.
3626
                                                              (line   6)
3627
* configuring the frame buffer:          Frame Buffer Configuration.
3628
                                                              (line   6)
3629
* configuring the GPIO:                  GPIO Configuration.  (line   6)
3630
* configuring the interrupt controller:  Interrupt Configuration.
3631
                                                              (line   6)
3632
* configuring the keyboard interface:    Keyboard Configuration.
3633
                                                              (line   6)
3634
* configuring the memory controller:     Memory Controller Configuration.
3635
                                                              (line   6)
3636
* configuring the processor:             CPU Configuration.   (line   6)
3637
* configuring the PS2 interface:         Keyboard Configuration.
3638
                                                              (line   6)
3639
* configuring the UART:                  UART Configuration.  (line   6)
3640
* configuring the Verification API (VAPI): Verification API Configuration.
3641
                                                              (line   6)
3642
* configuring the VGA interface:         Display Interface Configuration.
3643
                                                              (line   6)
3644
* copying memory (Interactive CLI):      Interactive Command Line.
3645
                                                              (line  54)
3646
* CPU configuration:                     CPU Configuration.   (line   6)
3647
* CUC configuration:                     CUC Configuration.   (line   6)
3648
* Custom Unit Compiler (Interactive CLI): Interactive Command Line.
3649
                                                              (line 162)
3650
* Custom Unit Compiler Configuration:    CUC Configuration.   (line   6)
3651
* data cache configuration:              Cache Configuration. (line   6)
3652
* data MMU configuration:                Memory Management Configuration.
3653
                                                              (line   6)
3654
* DCGE (power management register):      Power Management Configuration.
3655
                                                              (line  21)
3656
* debug (Interactive CLI):               Interactive Command Line.
3657
                                                              (line 151)
3658
* debug (simulator configuration):       Simulator Behavior.  (line  13)
3659
* debug channel toggle (Interactive CLI): Interactive Command Line.
3660
                                                              (line 141)
3661
* debug interface configuration:         Debug Interface Configuration.
3662
                                                              (line   6)
3663
* debug mode toggle (Interactive CLI):   Interactive Command Line.
3664
                                                              (line 151)
3665
* debug unit configuration:              Debug Interface Configuration.
3666
                                                              (line   6)
3667
* Debug Unit verification (VAPI):        Verification API.    (line  34)
3668
* debugging enabled (Argtable2):         Configuring the Build.
3669 127 jeremybenn
                                                              (line  98)
3670 104 jeremybenn
* DejaGnu board configurations:          Regression Testing.  (line  35)
3671
* DejaGnu configuration:                 Regression Testing.  (line  21)
3672
* DejaGNU tests directories:             Regression Testing.  (line  50)
3673
* DejaGnu tool specific configuration:   Regression Testing.  (line  39)
3674 19 jeremybenn
* delayr (memory configuration):         Memory Configuration.
3675 98 jeremybenn
                                                              (line 137)
3676 19 jeremybenn
* delayw (memory configuration):         Memory Configuration.
3677 98 jeremybenn
                                                              (line 143)
3678
* dependstats (CPU configuration):       CPU Configuration.   (line  89)
3679 19 jeremybenn
* dev_id (ATA/ATAPI configuration):      Disc Interface Configuration.
3680
                                                              (line  36)
3681
* disassemble (Interactive CLI):         Interactive Command Line.
3682
                                                              (line  41)
3683
* disc interface configuration:          Disc Interface Configuration.
3684
                                                              (line   6)
3685
* disc interface device configuration:   Disc Interface Configuration.
3686
                                                              (line  88)
3687
* display interface configuration:       Display Interface Configuration.
3688
                                                              (line   6)
3689
* displaying memory (Interactive CLI):   Interactive Command Line.
3690
                                                              (line  31)
3691
* displaying registers (Interactive CLI): Interactive Command Line.
3692
                                                              (line  14)
3693
* dm (Interactive CLI):                  Interactive Command Line.
3694
                                                              (line  31)
3695
* dma (Ethernet configuration):          Ethernet Configuration.
3696
                                                              (line  33)
3697
* DMA configuration:                     DMA Configuration.   (line   6)
3698
* DMA verification (VAPI):               Verification API.    (line  73)
3699
* dma_mode0_td (ATA/ATAPI configuration): Disc Interface Configuration.
3700
                                                              (line  70)
3701
* dma_mode0_teoc (ATA/ATAPI configuration): Disc Interface Configuration.
3702
                                                              (line  71)
3703
* dma_mode0_tm (ATA/ATAPI configuration): Disc Interface Configuration.
3704
                                                              (line  69)
3705
* DME (power management register):       Power Management Configuration.
3706
                                                              (line  15)
3707
* DMMU configuration:                    Memory Management Configuration.
3708
                                                              (line   6)
3709
* doze mode (power management register): Power Management Configuration.
3710
                                                              (line  15)
3711
* dv (Interactive CLI):                  Interactive Command Line.
3712
                                                              (line 124)
3713
* dynamic clock gating (power management register): Power Management Configuration.
3714
                                                              (line  21)
3715
* dynamic model:                         Configuring the Build.
3716 104 jeremybenn
                                                              (line  37)
3717 19 jeremybenn
* dynamic ports, use of:                 Verification API Configuration.
3718
                                                              (line  23)
3719
* edge_trigger (interrupt controller):   Interrupt Configuration.
3720
                                                              (line  16)
3721
* enable_bursts (CUC configuration):     CUC Configuration.   (line  38)
3722
* enabled (ATA/ATAPI configuration):     Disc Interface Configuration.
3723
                                                              (line  18)
3724
* enabled (branch prediction configuration): Branch Prediction Configuration.
3725
                                                              (line  15)
3726
* enabled (cache configuration):         Cache Configuration. (line  11)
3727
* enabled (debug interface configuration): Debug Interface Configuration.
3728
                                                              (line  11)
3729
* enabled (DMA configuration):           DMA Configuration.   (line  20)
3730
* enabled (Ethernet configuration):      Ethernet Configuration.
3731
                                                              (line  18)
3732
* enabled (frame buffer configuration):  Frame Buffer Configuration.
3733
                                                              (line  16)
3734
* enabled (generic peripheral configuration): Generic Peripheral Configuration.
3735
                                                              (line  18)
3736
* enabled (GPIO configuration):          GPIO Configuration.  (line  17)
3737
* enabled (interrupt controller):        Interrupt Configuration.
3738
                                                              (line  12)
3739
* enabled (keyboard configuration):      Keyboard Configuration.
3740
                                                              (line  32)
3741
* enabled (memory controller configuration): Memory Controller Configuration.
3742 98 jeremybenn
                                                              (line  35)
3743 19 jeremybenn
* enabled (MMU configuration):           Memory Management Configuration.
3744
                                                              (line  12)
3745
* enabled (power management configuration): Power Management Configuration.
3746
                                                              (line  35)
3747
* enabled (UART configuration):          UART Configuration.  (line  18)
3748
* enabled (verification API configuration): Verification API Configuration.
3749
                                                              (line  15)
3750
* enabled (VGA configuration):           Display Interface Configuration.
3751
                                                              (line  22)
3752
* enabling Ethernet via socket:          Configuring the Build.
3753 104 jeremybenn
                                                              (line  59)
3754 19 jeremybenn
* entrysize (MMU configuration):         Memory Management Configuration.
3755
                                                              (line  32)
3756
* ETH_VAPI_CTRL (Ethernet verification): Verification API.    (line  86)
3757
* ETH_VAPI_DATA (Ethernet verification): Verification API.    (line  84)
3758
* Ethernet configuration:                Ethernet Configuration.
3759
                                                              (line   6)
3760
* Ethernet verification (VAPI):          Verification API.    (line  78)
3761
* Ethernet via socket, enabling:         Configuring the Build.
3762 104 jeremybenn
                                                              (line  59)
3763 127 jeremybenn
* exclusive-OR immediate operand:        Configuring the Build.
3764
                                                              (line  69)
3765 202 julius
* exe_bin_insn_log (simulator configuration): Simulator Behavior.
3766
                                                              (line 103)
3767
* exe_bin_insn_log_file (simulator configuration): Simulator Behavior.
3768
                                                              (line 111)
3769 82 jeremybenn
* exe_log (simulator configuration):     Simulator Behavior.  (line  49)
3770
* exe_log_end (simulator configuration): Simulator Behavior.  (line  89)
3771
* exe_log_file (simulator configuration): Simulator Behavior. (line  97)
3772 19 jeremybenn
* exe_log_fn (simulator configuration - deprecated): Simulator Behavior.
3773 82 jeremybenn
                                                              (line  97)
3774 19 jeremybenn
* exe_log_marker (simulator configuration): Simulator Behavior.
3775 82 jeremybenn
                                                              (line  93)
3776 19 jeremybenn
* exe_log_start (simulator configuration): Simulator Behavior.
3777 82 jeremybenn
                                                              (line  86)
3778
* exe_log_type (simulator configuration): Simulator Behavior. (line  55)
3779 19 jeremybenn
* exe_log_type=default (simulator configuration): Simulator Behavior.
3780 82 jeremybenn
                                                              (line  58)
3781 19 jeremybenn
* exe_log_type=hardware (simulator configuration): Simulator Behavior.
3782 82 jeremybenn
                                                              (line  62)
3783 19 jeremybenn
* exe_log_type=simple (simulator configuration): Simulator Behavior.
3784 82 jeremybenn
                                                              (line  69)
3785 19 jeremybenn
* exe_log_type=software (simulator configuration): Simulator Behavior.
3786 82 jeremybenn
                                                              (line  74)
3787 19 jeremybenn
* executing code (Interactive CLI):      Interactive Command Line.
3788
                                                              (line  23)
3789
* execution history (Interactive CLI):   Interactive Command Line.
3790
                                                              (line  67)
3791
* file (ATA/ATAPI device configuration): Disc Interface Configuration.
3792
                                                              (line 104)
3793
* file (keyboard configuration):         Keyboard Configuration.
3794
                                                              (line  51)
3795
* filename (frame buffer configuration - deprecated): Frame Buffer Configuration.
3796 82 jeremybenn
                                                              (line  36)
3797 19 jeremybenn
* filename (VGA configuration - deprecated): Display Interface Configuration.
3798
                                                              (line  47)
3799
* firmware (ATA/ATAPI device configuration): Disc Interface Configuration.
3800
                                                              (line 117)
3801
* flag setting by instructions:          Configuring the Build.
3802 127 jeremybenn
                                                              (line 118)
3803 104 jeremybenn
* floating point multiply and add:       Known Issues.        (line  56)
3804
* floating point support:                Known Issues.        (line  42)
3805 19 jeremybenn
* frame buffer configuration:            Frame Buffer Configuration.
3806
                                                              (line   6)
3807
* generic peripheral configuration:      Generic Peripheral Configuration.
3808
                                                              (line   6)
3809
* GPIO configuration:                    GPIO Configuration.  (line   6)
3810
* GPIO verification (VAPI):              Verification API.    (line  88)
3811
* GPIO_VAPI_AUX (GPIO verification):     Verification API.    (line 100)
3812
* GPIO_VAPI_CLOCK (GPIO verification):   Verification API.    (line 103)
3813
* GPIO_VAPI_CTRL (GPIO verification):    Verification API.    (line 119)
3814
* GPIO_VAPI_DATA (GPIO verification):    Verification API.    (line  97)
3815
* GPIO_VAPI_INTE (GPIO verification):    Verification API.    (line 110)
3816
* GPIO_VAPI_PTRIG (GPIO verification):   Verification API.    (line 113)
3817
* GPIO_VAPI_RGPIO (GPIO verification):   Verification API.    (line 107)
3818 100 julius
* hardfloat (CPU configuration):         CPU Configuration.   (line 110)
3819 98 jeremybenn
* hazards (CPU configuration):           CPU Configuration.   (line  74)
3820 19 jeremybenn
* heads (ATA/ATAPI device configuration): Disc Interface Configuration.
3821
                                                              (line 121)
3822
* help (Interactive CLI):                Interactive Command Line.
3823
                                                              (line 170)
3824
* hexadecimal memory dump (Interactive CLI): Interactive Command Line.
3825
                                                              (line 133)
3826
* hide_device_id (verification API configuration): Verification API Configuration.
3827
                                                              (line  36)
3828
* hist (Interactive CLI):                Interactive Command Line.
3829
                                                              (line  67)
3830 82 jeremybenn
* history (simulator configuration):     Simulator Behavior.  (line  40)
3831 19 jeremybenn
* history of execution (Interactive CLI): Interactive Command Line.
3832
                                                              (line  67)
3833
* hitdelay (branch prediction configuration): Branch Prediction Configuration.
3834
                                                              (line  33)
3835
* hitdelay (instruction cache configuration): Cache Configuration.
3836
                                                              (line  38)
3837
* hitdelay (MMU configuration):          Memory Management Configuration.
3838
                                                              (line  51)
3839 104 jeremybenn
* host test code:                        Regression Testing.  (line  57)
3840 19 jeremybenn
* hw_enabled (generic peripheral configuration): Generic Peripheral Configuration.
3841
                                                              (line  49)
3842
* IMMU configuration:                    Memory Management Configuration.
3843
                                                              (line   6)
3844
* index (memory controller configuration): Memory Controller Configuration.
3845 98 jeremybenn
                                                              (line  68)
3846 19 jeremybenn
* info (Interactive CLI):                Interactive Command Line.
3847
                                                              (line 119)
3848
* installing Or1ksim:                    Installation.        (line   6)
3849
* instruction cache configuration:       Cache Configuration. (line   6)
3850
* instruction MMU configuration:         Memory Management Configuration.
3851
                                                              (line   6)
3852
* instruction profiling for Or1ksim:     Profiling Utility.   (line   6)
3853
* instruction profiling utility (Interactive CLI): Interactive Command Line.
3854
                                                              (line 178)
3855
* internal debugging:                    Internal Debugging.  (line   6)
3856
* interrupt controller configuration:    Interrupt Configuration.
3857
                                                              (line   6)
3858
* irq (ATA/ATAPI configuration):         Disc Interface Configuration.
3859
                                                              (line  32)
3860
* irq (DMA configuration):               DMA Configuration.   (line  34)
3861
* irq (GPIO configuration):              GPIO Configuration.  (line  29)
3862
* irq (keyboard configuration):          Keyboard Configuration.
3863
                                                              (line  47)
3864
* irq (UART configuration):              UART Configuration.  (line  70)
3865
* irq (VGA configuration):               Display Interface Configuration.
3866
                                                              (line  37)
3867
* jitter (UART configuration):           UART Configuration.  (line  78)
3868
* keyboard configuration:                Keyboard Configuration.
3869
                                                              (line   6)
3870 104 jeremybenn
* lf.madd.s:                             Known Issues.        (line  56)
3871 19 jeremybenn
* library version of Or1ksim:            Simulator Library.   (line   6)
3872
* license for Or1ksim:                   GNU Free Documentation License.
3873
                                                              (line   6)
3874
* list breakpoints (Interactive CLI):    Interactive Command Line.
3875
                                                              (line  60)
3876
* load_hitdelay (data cache configuration): Cache Configuration.
3877
                                                              (line  46)
3878
* load_missdelay (data cache configuration): Cache Configuration.
3879
                                                              (line  50)
3880
* log (memory configuration):            Memory Configuration.
3881 98 jeremybenn
                                                              (line 149)
3882 19 jeremybenn
* log_enabled (verification API configuration): Verification API Configuration.
3883
                                                              (line  28)
3884 93 jeremybenn
* long:                                  Simulator Library.   (line  87)
3885 104 jeremybenn
* make file for tests:                   Regression Testing.  (line  27)
3886 19 jeremybenn
* mc (memory configuration):             Memory Configuration.
3887 98 jeremybenn
                                                              (line 126)
3888 19 jeremybenn
* memory configuration:                  Memory Configuration.
3889
                                                              (line   6)
3890
* memory controller configuration:       Memory Controller Configuration.
3891
                                                              (line   6)
3892
* memory copying (Interactive CLI):      Interactive Command Line.
3893
                                                              (line  54)
3894
* memory display (Interactive CLI):      Interactive Command Line.
3895
                                                              (line  31)
3896
* memory dump, hexadecimal (Interactive CLI): Interactive Command Line.
3897
                                                              (line 133)
3898
* memory dump, Verilog (Interactive CLI): Interactive Command Line.
3899
                                                              (line 124)
3900
* memory patching (Interactive CLI):     Interactive Command Line.
3901
                                                              (line  48)
3902
* memory profiling end address:          Memory Profiling Utility.
3903
                                                              (line  56)
3904
* memory profiling start address:        Memory Profiling Utility.
3905
                                                              (line  56)
3906
* memory profiling utility (Interactive CLI): Interactive Command Line.
3907
                                                              (line 173)
3908
* memory profiling version of Or1ksim:   Memory Profiling Utility.
3909
                                                              (line   6)
3910
* memory_order (CUC configuration):      CUC Configuration.   (line  15)
3911
* memory_order=exact (CUC configuration): CUC Configuration.  (line  27)
3912
* memory_order=none (CUC configuration): CUC Configuration.   (line  18)
3913
* memory_order=strong (CUC configuration): CUC Configuration. (line  25)
3914
* memory_order=weak (CUC configuration): CUC Configuration.   (line  21)
3915
* missdelay (branch prediction configuration): Branch Prediction Configuration.
3916
                                                              (line  37)
3917
* missdelay (instruction cache configuration): Cache Configuration.
3918
                                                              (line  42)
3919
* missdelay (MMU configuration):         Memory Management Configuration.
3920
                                                              (line  55)
3921
* MMU configuration:                     Memory Management Configuration.
3922
                                                              (line   6)
3923 82 jeremybenn
* mprof_file (simulator configuration):  Simulator Behavior.  (line  34)
3924 19 jeremybenn
* mprof_fn (simulator configuration - deprecated): Simulator Behavior.
3925 82 jeremybenn
                                                              (line  34)
3926 19 jeremybenn
* mprofile (Interactive CLI):            Interactive Command Line.
3927
                                                              (line 173)
3928 82 jeremybenn
* mprofile (simulator configuration):    Simulator Behavior.  (line  29)
3929 19 jeremybenn
* mwdma (ATA/ATAPI device configuration): Disc Interface Configuration.
3930
                                                              (line 128)
3931
* name (generic peripheral configuration): Generic Peripheral Configuration.
3932
                                                              (line  42)
3933
* name (memory configuration):           Memory Configuration.
3934 98 jeremybenn
                                                              (line 108)
3935 19 jeremybenn
* no_multicycle (CUC configuration):     CUC Configuration.   (line  42)
3936
* nsets (cache configuration):           Cache Configuration. (line  15)
3937
* nsets (MMU configuration):             Memory Management Configuration.
3938
                                                              (line  16)
3939
* nways (cache configuration):           Cache Configuration. (line  22)
3940
* nways (MMU configuration):             Memory Management Configuration.
3941
                                                              (line  22)
3942 93 jeremybenn
* or1ksim_get_time_period:               Simulator Library.   (line  77)
3943
* or1ksim_init:                          Simulator Library.   (line  14)
3944
* or1ksim_interrupt:                     Simulator Library.   (line  92)
3945
* or1ksim_interrupt_clear:               Simulator Library.   (line 110)
3946
* or1ksim_interrupt_set:                 Simulator Library.   (line 101)
3947
* or1ksim_is_le:                         Simulator Library.   (line  82)
3948 104 jeremybenn
* or1ksim_jtag_reset:                    Simulator Library.   (line 119)
3949
* or1ksim_jtag_shift_dr:                 Simulator Library.   (line 141)
3950
* or1ksim_jtag_shift_ir:                 Simulator Library.   (line 127)
3951 93 jeremybenn
* or1ksim_reset_duration:                Simulator Library.   (line  62)
3952
* or1ksim_run:                           Simulator Library.   (line  57)
3953
* or1ksim_set_time_point:                Simulator Library.   (line  73)
3954 19 jeremybenn
* output rediretion:                     Concepts.            (line   7)
3955
* overflow flag setting by instructions: Configuring the Build.
3956 127 jeremybenn
                                                              (line 133)
3957 19 jeremybenn
* packet (ATA/ATAPI device configuration): Disc Interface Configuration.
3958
                                                              (line 113)
3959
* pagesize (MMU configuration):          Memory Management Configuration.
3960
                                                              (line  27)
3961
* patching memory (Interactive CLI):     Interactive Command Line.
3962
                                                              (line  48)
3963
* patching registers (Interactive CLI):  Interactive Command Line.
3964
                                                              (line  28)
3965
* patching the program counter (Interactive CLI): Interactive Command Line.
3966
                                                              (line  51)
3967
* pattern (memory configuration):        Memory Configuration.
3968 98 jeremybenn
                                                              (line  75)
3969 19 jeremybenn
* pc (Interactive CLI):                  Interactive Command Line.
3970
                                                              (line  51)
3971
* PIC configuration:                     Interrupt Configuration.
3972
                                                              (line   6)
3973
* pio (ATA/ATAPI device configuration):  Disc Interface Configuration.
3974
                                                              (line 132)
3975
* pio_mode0_t1 (ATA/ATAPI configuration): Disc Interface Configuration.
3976
                                                              (line  51)
3977
* pio_mode0_t2 (ATA/ATAPI configuration): Disc Interface Configuration.
3978
                                                              (line  52)
3979
* pio_mode0_t4 (ATA/ATAPI configuration): Disc Interface Configuration.
3980
                                                              (line  53)
3981
* pio_mode0_teoc (ATA/ATAPI configuration): Disc Interface Configuration.
3982
                                                              (line  54)
3983
* pm (Interactive CLI):                  Interactive Command Line.
3984
                                                              (line  48)
3985
* PMR - DGCE:                            Power Management Configuration.
3986
                                                              (line  21)
3987
* PMR - DME:                             Power Management Configuration.
3988
                                                              (line  15)
3989
* PMR - SDF:                             Power Management Configuration.
3990
                                                              (line  12)
3991
* PMR - SME:                             Power Management Configuration.
3992
                                                              (line  16)
3993
* PMR - SUME:                            Power Management Configuration.
3994
                                                              (line  24)
3995
* PMU configuration:                     Power Management Configuration.
3996
                                                              (line   6)
3997
* poc (memory controller configuration): Memory Controller Configuration.
3998 98 jeremybenn
                                                              (line  55)
3999 19 jeremybenn
* port range for TCP/IP:                 Verification API Configuration.
4000
                                                              (line  23)
4001
* power management configuration:        Power Management Configuration.
4002
                                                              (line   6)
4003
* power management register, DGCE:       Power Management Configuration.
4004
                                                              (line  21)
4005
* power management register, DME:        Power Management Configuration.
4006
                                                              (line  15)
4007
* power management register, SDF:        Power Management Configuration.
4008
                                                              (line  12)
4009
* power management register, SME:        Power Management Configuration.
4010
                                                              (line  16)
4011
* power management register, SUME:       Power Management Configuration.
4012
                                                              (line  24)
4013
* pr (Interactive CLI):                  Interactive Command Line.
4014
                                                              (line  28)
4015
* private ports, use of:                 Verification API Configuration.
4016
                                                              (line  23)
4017
* processor configuration:               CPU Configuration.   (line   6)
4018
* processor stall (Interactive CLI):     Interactive Command Line.
4019
                                                              (line  72)
4020
* processor unstall (Interactive CLI):   Interactive Command Line.
4021
                                                              (line  78)
4022
* prof_file (simulator configuration):   Simulator Behavior.  (line  23)
4023
* prof_fn (simulator configuration - deprecated): Simulator Behavior.
4024
                                                              (line  23)
4025
* profile (simulator configuration):     Simulator Behavior.  (line  19)
4026
* profiling for Or1ksim:                 Profiling Utility.   (line   6)
4027
* profiling utility (Interactive CLI):   Interactive Command Line.
4028
                                                              (line 178)
4029
* program counter patching (Interactive CLI): Interactive Command Line.
4030
                                                              (line  51)
4031
* programmable interrupt controller configuration: Interrupt Configuration.
4032
                                                              (line   6)
4033
* PS2 configuration:                     Keyboard Configuration.
4034
                                                              (line   6)
4035
* q (Interactive CLI):                   Interactive Command Line.
4036
                                                              (line  11)
4037
* quitting (Interactive CLI):            Interactive Command Line.
4038
                                                              (line  11)
4039
* r (Interactive CLI):                   Interactive Command Line.
4040
                                                              (line  14)
4041
* random_seed (memory configuration):    Memory Configuration.
4042 98 jeremybenn
                                                              (line  65)
4043 19 jeremybenn
* refresh_rate (frame buffer configuration): Frame Buffer Configuration.
4044 82 jeremybenn
                                                              (line  30)
4045 19 jeremybenn
* refresh_rate (VGA configuration):      Display Interface Configuration.
4046
                                                              (line  41)
4047
* reg_sim_reset:                         Concepts.            (line  13)
4048
* register display (Interactive CLI):    Interactive Command Line.
4049
                                                              (line  14)
4050
* register over time statistics:         Configuring the Build.
4051 127 jeremybenn
                                                              (line  92)
4052 19 jeremybenn
* register patching (Interactive CLI):   Interactive Command Line.
4053
                                                              (line  28)
4054 104 jeremybenn
* regression testing:                    Regression Testing.  (line   6)
4055 19 jeremybenn
* Remote Serial Protocol:                Debug Interface Configuration.
4056
                                                              (line  20)
4057 235 jeremybenn
* Remote Serial Protocol, --nosrv:       Standalone Simulator.
4058
                                                              (line  32)
4059
* Remote Serial Protocol, --srv:         Standalone Simulator.
4060
                                                              (line  40)
4061 19 jeremybenn
* reset (Interactive CLI):               Interactive Command Line.
4062
                                                              (line  63)
4063
* reset hooks:                           Concepts.            (line  13)
4064
* reset the simulator (Interactive CLI): Interactive Command Line.
4065
                                                              (line  63)
4066
* rev (ATA/ATAPI configuration):         Disc Interface Configuration.
4067
                                                              (line  44)
4068
* rev (CPU configuration):               CPU Configuration.   (line  15)
4069
* rsp_enabled (debug interface configuration): Debug Interface Configuration.
4070
                                                              (line  20)
4071
* rsp_port (debug interface configuration): Debug Interface Configuration.
4072 235 jeremybenn
                                                              (line  32)
4073 19 jeremybenn
* rtx_type (Ethernet configuration):     Ethernet Configuration.
4074
                                                              (line  46)
4075
* run (Interactive CLI):                 Interactive Command Line.
4076
                                                              (line  23)
4077
* running code (Interactive CLI):        Interactive Command Line.
4078
                                                              (line  23)
4079
* running Or1ksim:                       Usage.               (line   6)
4080
* runtime:                               Global Data Structures.
4081
                                                              (line  58)
4082
* runtime global structure:              Global Data Structures.
4083
                                                              (line  58)
4084
* runtime.cpu:                           Global Data Structures.
4085
                                                              (line  62)
4086
* runtime.cpu.fout:                      Concepts.            (line   7)
4087
* runtime.cuc:                           Global Data Structures.
4088
                                                              (line  62)
4089
* runtime.vapi:                          Global Data Structures.
4090
                                                              (line  62)
4091
* rx_channel (Ethernet configuration):   Ethernet Configuration.
4092
                                                              (line  59)
4093
* rxfile (Ethernet configuration):       Ethernet Configuration.
4094
                                                              (line  68)
4095
* sbp_bf_fwd (branch prediction configuration): Branch Prediction Configuration.
4096
                                                              (line  23)
4097
* sbp_bnf_fwd (branch prediction configuration): Branch Prediction Configuration.
4098
                                                              (line  28)
4099 98 jeremybenn
* sbuf_len (CPU configuration):          CPU Configuration.   (line 101)
4100 19 jeremybenn
* SDF (power management register):       Power Management Configuration.
4101
                                                              (line  12)
4102
* section ata:                           Disc Interface Configuration.
4103
                                                              (line   6)
4104
* section bpb:                           Branch Prediction Configuration.
4105
                                                              (line   6)
4106
* section cpio:                          GPIO Configuration.  (line   6)
4107
* section cpu:                           CPU Configuration.   (line   6)
4108
* section cuc:                           CUC Configuration.   (line   6)
4109
* section dc:                            Cache Configuration. (line   6)
4110
* section debug:                         Debug Interface Configuration.
4111
                                                              (line   6)
4112
* section dma:                           DMA Configuration.   (line   6)
4113
* section dmmu:                          Memory Management Configuration.
4114
                                                              (line   6)
4115
* section ethernet:                      Ethernet Configuration.
4116
                                                              (line   6)
4117
* section fb:                            Frame Buffer Configuration.
4118
                                                              (line   6)
4119
* section generic:                       Generic Peripheral Configuration.
4120
                                                              (line   6)
4121
* section ic:                            Cache Configuration. (line   6)
4122
* section immu:                          Memory Management Configuration.
4123
                                                              (line   6)
4124
* section kb:                            Keyboard Configuration.
4125
                                                              (line   6)
4126
* section mc:                            Memory Controller Configuration.
4127
                                                              (line   6)
4128
* section memory:                        Memory Configuration.
4129
                                                              (line   6)
4130
* section pic:                           Interrupt Configuration.
4131
                                                              (line   6)
4132
* section pmu:                           Power Management Configuration.
4133
                                                              (line   6)
4134
* section sim:                           Simulator Behavior.  (line   6)
4135
* section uart:                          UART Configuration.  (line   6)
4136
* section vapi:                          Verification API Configuration.
4137
                                                              (line   6)
4138
* section vga:                           Display Interface Configuration.
4139
                                                              (line   6)
4140
* sections:                              Global Data Structures.
4141
                                                              (line  49)
4142
* sectors (ATA/ATAPI device configuration): Disc Interface Configuration.
4143
                                                              (line 125)
4144
* server_port (verification API configuration): Verification API Configuration.
4145
                                                              (line  19)
4146
* set (Interactive CLI):                 Interactive Command Line.
4147
                                                              (line 146)
4148
* set breakpoint (Interactive CLI):      Interactive Command Line.
4149
                                                              (line  57)
4150
* setdbch (Interactive CLI):             Interactive Command Line.
4151
                                                              (line 141)
4152
* simple model:                          Configuring the Build.
4153 104 jeremybenn
                                                              (line  37)
4154 19 jeremybenn
* simulator configuration:               Simulator Behavior.  (line   6)
4155
* simulator configuration info (Interactive CLI): Interactive Command Line.
4156
                                                              (line 119)
4157
* simulator reset (Interactive CLI):     Interactive Command Line.
4158
                                                              (line  63)
4159
* simulator statistics (Interactive CLI): Interactive Command Line.
4160
                                                              (line  83)
4161
* size (ATA/ATAPI device configuration): Disc Interface Configuration.
4162
                                                              (line 109)
4163
* size (generic peripheral configuration): Generic Peripheral Configuration.
4164
                                                              (line  30)
4165
* size (memory configuration):           Memory Configuration.
4166 98 jeremybenn
                                                              (line  92)
4167 19 jeremybenn
* sleep mode (power management register): Power Management Configuration.
4168
                                                              (line  16)
4169
* slow down factor (power management register): Power Management Configuration.
4170
                                                              (line  12)
4171
* SME (power management register):       Power Management Configuration.
4172
                                                              (line  16)
4173
* sockif (Ethernet configuration):       Ethernet Configuration.
4174
                                                              (line  83)
4175
* sr (CPU configuration):                CPU Configuration.   (line  53)
4176
* stall (Interactive CLI):               Interactive Command Line.
4177
                                                              (line  72)
4178
* stall the processor (Interactive CLI): Interactive Command Line.
4179
                                                              (line  72)
4180
* statistics, register over time:        Configuring the Build.
4181 127 jeremybenn
                                                              (line  92)
4182 19 jeremybenn
* statistics, simulation (Interactive CLI): Interactive Command Line.
4183
                                                              (line  83)
4184
* stats (Interactive CLI):               Interactive Command Line.
4185
                                                              (line  83)
4186
* stepping code (Interactive CLI):       Interactive Command Line.
4187
                                                              (line  19)
4188
* store_hitdelay (data cache configuration): Cache Configuration.
4189
                                                              (line  54)
4190
* store_missdelay (data cache configuration): Cache Configuration.
4191
                                                              (line  58)
4192
* SUME (power management register):      Power Management Configuration.
4193
                                                              (line  24)
4194 98 jeremybenn
* superscalar (CPU configuration):       CPU Configuration.   (line  63)
4195 19 jeremybenn
* suspend mode (power management register): Power Management Configuration.
4196
                                                              (line  24)
4197
* t (Interactive CLI):                   Interactive Command Line.
4198
                                                              (line  19)
4199 104 jeremybenn
* target test code:                      Regression Testing.  (line  63)
4200 19 jeremybenn
* TCP/IP port range:                     Verification API Configuration.
4201
                                                              (line  23)
4202
* TCP/IP port range for or1ksim-rsp service: Debug Interface Configuration.
4203 235 jeremybenn
                                                              (line  37)
4204 104 jeremybenn
* test code for host:                    Regression Testing.  (line  57)
4205
* test code for target:                  Regression Testing.  (line  63)
4206
* test make file:                        Regression Testing.  (line  27)
4207
* test README:                           Regression Testing.  (line  32)
4208
* testing:                               Regression Testing.  (line   6)
4209 82 jeremybenn
* tests, all enabled.:                   Configuring the Build.
4210 127 jeremybenn
                                                              (line 105)
4211 19 jeremybenn
* timings_file (CUC configuration):      CUC Configuration.   (line  46)
4212
* timings_fn (CUC configuration - deprecated): CUC Configuration.
4213
                                                              (line  46)
4214
* toggle breakpoint (Interactive CLI):   Interactive Command Line.
4215
                                                              (line  57)
4216
* toggle debug channels (Interactive CLI): Interactive Command Line.
4217
                                                              (line 141)
4218
* toggle debug mode (Interactive CLI):   Interactive Command Line.
4219
                                                              (line 151)
4220
* tx_channel (Ethernet configuration):   Ethernet Configuration.
4221
                                                              (line  60)
4222
* txfile (Ethernet configuration):       Ethernet Configuration.
4223
                                                              (line  69)
4224
* txfile (frame buffer configuration):   Frame Buffer Configuration.
4225 82 jeremybenn
                                                              (line  36)
4226 19 jeremybenn
* txfile (VGA configuration):            Display Interface Configuration.
4227
                                                              (line  47)
4228
* type (ATA/ATAPI device configuration): Disc Interface Configuration.
4229
                                                              (line  99)
4230
* type (memory configuration):           Memory Configuration.
4231 98 jeremybenn
                                                              (line  36)
4232 19 jeremybenn
* type=pattern (memory configuration):   Memory Configuration.
4233 98 jeremybenn
                                                              (line  46)
4234 19 jeremybenn
* type=random (memory configuration):    Memory Configuration.
4235 98 jeremybenn
                                                              (line  40)
4236 19 jeremybenn
* type=unknown (memory configuration):   Memory Configuration.
4237 98 jeremybenn
                                                              (line  50)
4238 19 jeremybenn
* type=zero (memory configuration):      Memory Configuration.
4239 98 jeremybenn
                                                              (line  54)
4240 19 jeremybenn
* UART configuration:                    UART Configuration.  (line   6)
4241
* UART I/O from/to a physical serial port: UART Configuration.
4242
                                                              (line  62)
4243
* UART I/O from/to an xterm:             UART Configuration.  (line  38)
4244
* UART I/O from/to files:                UART Configuration.  (line  33)
4245
* UART I/O from/to open file descriptors: UART Configuration. (line  58)
4246
* UART I/O from/to TCP/IP:               UART Configuration.  (line  45)
4247
* UART verification (VAPI):              Verification API.    (line  41)
4248
* unstall (Interactive CLI):             Interactive Command Line.
4249
                                                              (line  78)
4250
* unstall the processor (Interactive CLI): Interactive Command Line.
4251
                                                              (line  78)
4252
* upr (CPU configuration):               CPU Configuration.   (line  21)
4253
* ustates (cache configuration):         Cache Configuration. (line  33)
4254
* ustates (MMU configuration):           Memory Management Configuration.
4255
                                                              (line  41)
4256
* VAPI configuration:                    Verification API Configuration.
4257
                                                              (line   6)
4258
* VAPI for Debug Unit:                   Verification API.    (line  34)
4259
* VAPI for DMA:                          Verification API.    (line  73)
4260
* VAPI for Ethernet:                     Verification API.    (line  78)
4261
* VAPI for GPIO:                         Verification API.    (line  88)
4262
* VAPI for UART:                         Verification API.    (line  41)
4263
* vapi_id (debug interface configuration): Debug Interface Configuration.
4264 235 jeremybenn
                                                              (line  43)
4265 19 jeremybenn
* vapi_id (DMA configuration) <1>:       Ethernet Configuration.
4266
                                                              (line  88)
4267
* vapi_id (DMA configuration):           DMA Configuration.   (line  38)
4268
* vapi_id (GPIO configuration):          GPIO Configuration.  (line  32)
4269
* vapi_id (UART configuration):          UART Configuration.  (line  85)
4270
* vapi_log_file (verification API configuration): Verification API Configuration.
4271
                                                              (line  41)
4272
* vapi_log_fn (verification API configuration - deprecated): Verification API Configuration.
4273
                                                              (line  41)
4274
* ver (CPU configuration):               CPU Configuration.   (line  15)
4275
* verbose (simulator configuration):     Simulator Behavior.  (line  10)
4276
* Verification API configuration:        Verification API Configuration.
4277
                                                              (line   6)
4278
* Verilog memory dump (Interactive CLI): Interactive Command Line.
4279
                                                              (line 124)
4280
* VGA configuration:                     Display Interface Configuration.
4281
 
4282
 
4283
                                                              (line  50)
4284
4285
4286

4287
Tag Table:
4288 234 jeremybenn
Node: Top814
4289
Node: Installation1224
4290
Node: Preparation1471
4291
Node: Configuring the Build1766
4292
Node: Build and Install7880
4293
Node: Known Issues8726
4294
Node: Usage11788
4295
Node: Standalone Simulator12002
4296 235 jeremybenn
Node: Profiling Utility15030
4297
Node: Memory Profiling Utility15940
4298
Node: Simulator Library17305
4299
Node: Configuration25083
4300
Node: Configuration File Format25695
4301
Node: Configuration File Preprocessing25987
4302
Node: Configuration File Syntax26284
4303
Node: Simulator Configuration29069
4304
Node: Simulator Behavior29360
4305
Node: Verification API Configuration33889
4306
Node: CUC Configuration35829
4307
Node: Core OpenRISC Configuration37746
4308
Node: CPU Configuration38248
4309
Node: Memory Configuration42366
4310
Node: Memory Management Configuration48824
4311
Node: Cache Configuration51201
4312
Node: Interrupt Configuration53587
4313
Node: Power Management Configuration54323
4314
Node: Branch Prediction Configuration55600
4315
Node: Debug Interface Configuration56960
4316
Node: Peripheral Configuration59303
4317
Node: Memory Controller Configuration59929
4318
Node: UART Configuration63343
4319
Node: DMA Configuration66862
4320
Node: Ethernet Configuration68729
4321
Node: GPIO Configuration72705
4322
Node: Display Interface Configuration74338
4323
Node: Frame Buffer Configuration76647
4324
Node: Keyboard Configuration78511
4325
Node: Disc Interface Configuration80749
4326
Node: Generic Peripheral Configuration85692
4327
Node: Interactive Command Line87987
4328
Node: Verification API94961
4329
Node: Code Internals99391
4330
Node: Coding Conventions99974
4331
Node: Global Data Structures104401
4332
Node: Concepts107058
4333
Ref: Output Redirection107203
4334
Node: Internal Debugging107742
4335
Node: Regression Testing108266
4336
Node: GNU Free Documentation License112061

powered by: WebSVN 2.1.0

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