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

Subversion Repositories openrisc

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

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

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

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

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

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

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

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

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

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

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

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

514 442 julius
File: or1ksim.info,  Node: Trace Generation,  Next: Simulator Library,  Prev: Memory Profiling Utility,  Up: Usage
515 19 jeremybenn
 
516 442 julius
2.4 Trace Generation
517
====================
518
 
519
An execution trace can be generated at run time with options passed by
520
the command line, or via the operating system's signal passing
521
mechanism.
522
 
523
`-t'
524
`--trace'
525
     Dump instruction just executed and any register/memory location
526
     chaged after each instruction (one line per instruction).
527
 
528

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

777 440 jeremybenn
File: or1ksim.info,  Node: Ethernet TUN/TAP Interface,  Prev: Simulator Library,  Up: Usage
778
 
779 442 julius
2.6 Ethernet TUN/TAP Interface
780 440 jeremybenn
==============================
781
 
782
When an Ethernet peripheral is configured (*note Ethernet
783
Configuration: Ethernet Configuration.), one option is to tunnel
784
traffic through a TUN/TAP interface.  The low level TAP interface is
785
used to tunnel raw Ethernet datagrams.
786
 
787
The TAP interface can then be connected to a physical Ethernet through a
788
bridge, allowing the Or1ksim model to connect to a physical network.
789
This is particularly when Or1ksim is running the OpenRISC Linux kernel
790
image.
791
 
792
This section explains how to set up a bridge for use by Or1ksim. It does
793
require superuser access to the host machine (or at least the relevant
794
network capabilities). A system administrator can modify these
795
guidelines so they are executed on reboot if appropriate.
796
 
797
* Menu:
798
 
799
* Setting Up a Persistent TAP device::
800
* Establishing a Bridge::
801
* Opening the Firewall::
802
* Disabling Ethernet Filtering::
803
* Networking from OpenRISC Linux and BusyBox::
804
* Tearing Down a Bridge::
805
 
806

807
File: or1ksim.info,  Node: Setting Up a Persistent TAP device,  Next: Establishing a Bridge,  Up: Ethernet TUN/TAP Interface
808
 
809 442 julius
2.6.1 Setting Up a Persistent TAP device
810 440 jeremybenn
----------------------------------------
811
 
812
TUN/TAP devices can be created dynamically, but this requires superuser
813
privileges (or at least `CAP_NET_ADMIN' capability).  The solution is
814
to create a persistent TAP device.  This can be done using either
815
`openvpn' or `tunctl'.  In either case the package must be installed on
816
the host system.  Using `openvpn', the following would set up a TAP
817
interface for a specified user and group.
818
 
819
     openvpn --mktun --dev tap_n_ --user _username_ --group _groupname_
820
 
821

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

863
File: or1ksim.info,  Node: Opening the Firewall,  Next: Disabling Ethernet Filtering,  Prev: Establishing a Bridge,  Up: Ethernet TUN/TAP Interface
864
 
865 442 julius
2.6.3 Opening the Firewall
866 440 jeremybenn
--------------------------
867
 
868
Firewall rules should be added to ensure traffic flows freely through
869
the TAP and bridge interfaces. As superuser the following commands are
870
appropriate.
871
 
872
     iptables -A INPUT -i tap_y_ -j ACCEPT
873
     iptables -A INPUT -i br_n_ -j ACCEPT
874
     iptables -A FORWARD -i br_n_ -j ACCEPT
875
 
876

877
File: or1ksim.info,  Node: Disabling Ethernet Filtering,  Next: Networking from OpenRISC Linux and BusyBox,  Prev: Opening the Firewall,  Up: Ethernet TUN/TAP Interface
878
 
879 442 julius
2.6.4 Disabling Ethernet Filtering
880 440 jeremybenn
----------------------------------
881
 
882
Some systems may have ethernet filtering enabled (`ebtables',
883
`bridge-nf', `arptables') which will stop traffic flowing through the
884
bridge.
885
 
886
The easiest way to disable this is by writing zero to all `bridge-nf-*'
887
entries in `/proc/sys/net/bridge'. As superuser the following commands
888
will achieve this.
889
 
890
     cd /proc/sys/net/bridge
891
     for f in bridge-nf-*; do echo 0 > $f; done
892
 
893

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

935
File: or1ksim.info,  Node: Tearing Down a Bridge,  Prev: Networking from OpenRISC Linux and BusyBox,  Up: Ethernet TUN/TAP Interface
936
 
937 442 julius
2.6.6 Tearing Down a Bridge
938 440 jeremybenn
---------------------------
939
 
940
There is little reason why a bridge should ever need to be torn down,
941
but if desired, the following commands will achieve the effect.
942
 
943
     ifconfig br_n_ down
944
     brctl delbr br_n_
945
 
946
     dhclient eth_x_
947
 
948
As before this will leave a spare `dhclient' process in the background
949
which should be killed.
950
 
951
If desired the TAP interface can be deleted using
952
 
953
     openvpn --rmtun -dev tap_y_
954
 
955
     Caution: The TAP interface should not be in use when running this
956
     command. For example any OpenRISC Linux/BusyBox sessions should be
957
     closed first.
958
 
959

960 19 jeremybenn
File: or1ksim.info,  Node: Configuration,  Next: Interactive Command Line,  Prev: Usage,  Up: Top
961
 
962
3 Configuration
963
***************
964
 
965 82 jeremybenn
Or1ksim is configured through a configuration file.  This is specified
966 19 jeremybenn
through the `-f' parameter to the Or1ksim command, or passed as a
967 82 jeremybenn
string when initializing the Or1ksim library.  If no file is specified,
968
the default `sim.cfg' is used.  The file is looked for first in the
969 224 jeremybenn
current directory, then in the `$HOME/.or1ksim' directory of the user.
970 19 jeremybenn
 
971
* Menu:
972
 
973
* Configuration File Format::
974
* Simulator Configuration::
975
* Core OpenRISC Configuration::
976
* Peripheral Configuration::
977
 
978

979
File: or1ksim.info,  Node: Configuration File Format,  Next: Simulator Configuration,  Up: Configuration
980
 
981
3.1 Configuration File Format
982
=============================
983
 
984 346 jeremybenn
The configuration file is a plain text file.  A reference example,
985
`sim.cfg', is included in the top level directory of the distribution.
986 19 jeremybenn
 
987
* Menu:
988
 
989
* Configuration File Preprocessing::
990
* Configuration File Syntax::
991
 
992

993
File: or1ksim.info,  Node: Configuration File Preprocessing,  Next: Configuration File Syntax,  Up: Configuration File Format
994
 
995
3.1.1 Configuration File Preprocessing
996
--------------------------------------
997
 
998 82 jeremybenn
The configuration file may include C style comments (i.e.  delimited by
999 19 jeremybenn
`/*' and `*/').
1000
 
1001

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

1082
File: or1ksim.info,  Node: Simulator Configuration,  Next: Core OpenRISC Configuration,  Prev: Configuration File Format,  Up: Configuration
1083
 
1084
3.2 Simulator Configuration
1085
===========================
1086
 
1087
* Menu:
1088
 
1089
* Simulator Behavior::
1090
* Verification API Configuration::
1091
* CUC Configuration::
1092
 
1093

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

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

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

1315
File: or1ksim.info,  Node: Core OpenRISC Configuration,  Next: Peripheral Configuration,  Prev: Simulator Configuration,  Up: Configuration
1316
 
1317
3.3 Configuring the OpenRISC Architectural Components
1318
=====================================================
1319
 
1320
* Menu:
1321
 
1322
* CPU Configuration::
1323
* Memory Configuration::
1324
* Memory Management Configuration::
1325
* Cache Configuration::
1326
* Interrupt Configuration::
1327
* Power Management Configuration::
1328
* Branch Prediction Configuration::
1329
* Debug Interface Configuration::
1330
 
1331

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

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

1606
File: or1ksim.info,  Node: Memory Management Configuration,  Next: Cache Configuration,  Prev: Memory Configuration,  Up: Core OpenRISC Configuration
1607
 
1608
3.3.3 Memory Management Configuration
1609
-------------------------------------
1610
 
1611
Memory Management Unit (MMU) configuration is described in `section
1612
dmmu' (for the data MMU) and `section immu' (for the instruction MMU).
1613 82 jeremybenn
Each section should appear at most once.  The following parameters may
1614 19 jeremybenn
be specified.
1615
 
1616
`enabled = 0|1'
1617
     If 1 (true), the data or instruction (as appropriate) MMU is
1618 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1619 19 jeremybenn
 
1620
`nsets = VALUE'
1621
     Sets the number of data or instruction (as appropriate) TLB sets to
1622 82 jeremybenn
     VALUE, which must be a power of two, not exceeding 128.  Values
1623
     which do not fit these criteria are ignored with a warning.  The
1624 19 jeremybenn
     default value is 1.
1625
 
1626
`nways = VALUE'
1627
     Sets the number of data or instruction (as appropriate) TLB ways to
1628 82 jeremybenn
     VALUE.  The value must be in the range 1 to 4.  Values outside
1629
     this range are ignored with a warning.  The default value is 1.
1630 19 jeremybenn
 
1631
`pagesize = VALUE'
1632
     The data or instruction (as appropriate) MMU page size is set to
1633 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1634
     of 2 are ignored with a warning.  The default is 8192 (0x2000).
1635 19 jeremybenn
 
1636
`entrysize = VALUE'
1637
     The data or instruction (as appropriate) MMU entry size is set to
1638 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1639
     of 2 are ignored with a warning.  The default value is 1.
1640 19 jeremybenn
 
1641
          Note: Or1ksim does not appear to use the `entrysize' parameter
1642 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1643 19 jeremybenn
          not seem to matter.
1644
 
1645
`ustates = VALUE'
1646
     The number of instruction usage states for the data or instruction
1647
     (as appropriate) MMU is set to VALUE, which must be 2, 3 or 4.
1648 82 jeremybenn
     Values outside this range are ignored with a warning.  The default
1649 19 jeremybenn
     value is 2.
1650
 
1651
          Note: Or1ksim does not appear to use the `ustates' parameter
1652 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1653 19 jeremybenn
          not seem to matter.
1654
 
1655
`hitdelay = VALUE'
1656
     Set the number of cycles a data or instruction (as appropriate) MMU
1657 82 jeremybenn
     hit costs.  Default value 1.
1658 19 jeremybenn
 
1659
`missdelay = VALUE'
1660
     Set the number of cycles a data or instruction (as appropriate) MMU
1661 82 jeremybenn
     miss costs.  Default value 1.
1662 19 jeremybenn
 
1663
 
1664

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

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

1769
File: or1ksim.info,  Node: Power Management Configuration,  Next: Branch Prediction Configuration,  Prev: Interrupt Configuration,  Up: Core OpenRISC Configuration
1770
 
1771
3.3.6 Power Management Configuration
1772
------------------------------------
1773
 
1774 82 jeremybenn
Power management implementation is incomplete.  At present the effect
1775 19 jeremybenn
(which only happens when the power management unit is enabled) of
1776
setting the different bits in the power management Special Purpose
1777
Register (PMR, SPR 0x4000) is
1778
 
1779
`SDF (bit mask 0x0000000f)'
1780
     No effect - these bits are ignored
1781
 
1782
`DME (bit mask 0x00000010)'
1783
`SME (bit mask 0x00000020)'
1784
     Both these bits cause the processor to stop executing
1785 82 jeremybenn
     instructions.  However all other functions (debug interaction, CLI,
1786 19 jeremybenn
     VAPI etc) carry on as normal.
1787
 
1788
`DCGE (bit mask 0x00000004)'
1789
     No effect - this bit is ignored
1790
 
1791
`SUME (bit mask 0x00000008)'
1792
     Enabling this bit causes a message to be printed, advising that the
1793
     processor is suspending and the simulator exits.
1794
 
1795
 
1796
On reset all bits are cleared.
1797
 
1798 82 jeremybenn
Power management configuration is described in `section pm'.  This
1799
section may appear at most once.  The following parameter may be
1800 19 jeremybenn
specified.
1801
 
1802
`enabled = 0|1'
1803 82 jeremybenn
     If 1 (true), power management is enabled.  If 0 (the default), it
1804
     is disabled.
1805 19 jeremybenn
 
1806
 
1807

1808
File: or1ksim.info,  Node: Branch Prediction Configuration,  Next: Debug Interface Configuration,  Prev: Power Management Configuration,  Up: Core OpenRISC Configuration
1809
 
1810
3.3.7 Branch Prediction Configuration
1811
-------------------------------------
1812
 
1813
From examining the code base, it seems the branch prediction function
1814 82 jeremybenn
is not fully implemented.  At present the functionality seems
1815
restricted to collection of statistics.
1816 19 jeremybenn
 
1817 82 jeremybenn
Branch prediction configuration is described in `section bpb'.  This
1818
section may appear at most once.  The following parameters may be
1819 19 jeremybenn
specified.
1820
 
1821
`enabled = 0|1'
1822 82 jeremybenn
     If 1 (true), branch prediction is enabled.  If 0 (the default), it
1823 19 jeremybenn
     is disabled.
1824
 
1825
`btic = 0|1'
1826
     If 1 (true), the branch target instruction cache model is enabled.
1827
     If 0 (the default), it is disabled.
1828
 
1829
`sbp_bf_fwd = 0|1'
1830 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bf' instruction.  If
1831 19 jeremybenn
 
1832
     instruction.
1833
 
1834
`sbp_bnf_fwd = 0|1'
1835 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bnf' instruction.
1836
     If 0 (the default), do not use forward prediction for this
1837 19 jeremybenn
     instruction.
1838
 
1839
`hitdelay = VALUE'
1840 82 jeremybenn
     Set the number of cycles a branch prediction hit costs.  Default
1841 19 jeremybenn
     value 0.
1842
 
1843
`missdelay = VALUE'
1844 82 jeremybenn
     Set the number of cycles a branch prediction miss costs.  Default
1845 19 jeremybenn
     value 0.
1846
 
1847
 
1848

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

1902
File: or1ksim.info,  Node: Peripheral Configuration,  Prev: Core OpenRISC Configuration,  Up: Configuration
1903
 
1904
3.4 Configuring Memory Mapped Peripherals
1905
=========================================
1906
 
1907 82 jeremybenn
All peripheral components are optional.  If they are specified, then
1908 19 jeremybenn
(unlike other components) by default they are enabled.
1909
 
1910
* Menu:
1911
 
1912
* Memory Controller Configuration::
1913
* UART Configuration::
1914
* DMA Configuration::
1915
* Ethernet Configuration::
1916
* GPIO Configuration::
1917
* Display Interface Configuration::
1918
* Frame Buffer Configuration::
1919
* Keyboard Configuration::
1920
* Disc Interface Configuration::
1921
* Generic Peripheral Configuration::
1922
 
1923

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

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

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

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

2256
File: or1ksim.info,  Node: GPIO Configuration,  Next: Display Interface Configuration,  Prev: Ethernet Configuration,  Up: Peripheral Configuration
2257
 
2258
3.4.5 GPIO Configuration
2259
------------------------
2260
 
2261
The GPIO used in Or1ksim is the component implemented at OpenCores, and
2262 98 jeremybenn
found in the top level SVN directory, `gpio'.  It is described in the
2263 19 jeremybenn
document `GPIO IP Core Specification' by Damjan Lampret and Goran
2264 82 jeremybenn
Djakovic, which can be found in the `doc' subdirectory.  It is a memory
2265 19 jeremybenn
mapped component, which resides on the main OpenRISC Wishbone data bus.
2266
 
2267 82 jeremybenn
GPIO configuration is described in `section gpio'.  This section may
2268
appear multiple times, specifying multiple GPIO devices.  The following
2269 19 jeremybenn
parameters may be specified.
2270
 
2271
`enabled = 0|1'
2272 82 jeremybenn
     If 1 (true, the default), this GPIO is enabled.  If 0, it is
2273 19 jeremybenn
     disabled.
2274
 
2275
`baseaddr = VALUE'
2276
     Set the base address of the GPIO's memory mapped registers to
2277 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2278 19 jeremybenn
 
2279
     The GPIO has a 6 bit address bus, with a total of 10 32-bit
2280
     registers, although the number of bits that are actively used
2281 82 jeremybenn
     varies.  Addresses 0x28 through 0x3c are not used.
2282 19 jeremybenn
 
2283
`irq = VALUE'
2284 82 jeremybenn
     Use VALUE as the IRQ number of this GPIO.  Default value 0.
2285 19 jeremybenn
 
2286
`vapi_id = VALUE'
2287
     VALUE specifies the value of the Verification API (VAPI) base
2288 82 jeremybenn
     address to be used with the GPIO.  *Note Verification API:
2289 19 jeremybenn
     Verification API, for more details, which details the use of the
2290 82 jeremybenn
     VAPI with the GPIO controller.  For backwards compatibility, the
2291 19 jeremybenn
     alternative name `base_vapi_id' is supported for this parameter,
2292
     but deprecated.
2293
 
2294
 
2295

2296
File: or1ksim.info,  Node: Display Interface Configuration,  Next: Frame Buffer Configuration,  Prev: GPIO Configuration,  Up: Peripheral Configuration
2297
 
2298
3.4.6 Display Interface Configuration
2299
-------------------------------------
2300
 
2301
Or1ksim models a VGA interface to an external monitor.  The VGA
2302
controller used in Or1ksim is the component implemented at OpenCores,
2303 98 jeremybenn
and found in the top level SVN directory, `vga_lcd', with no support
2304 82 jeremybenn
for the optional hardware cursors.  It is described in the document
2305 19 jeremybenn
`VGA/LCD Core v2.0 Specifications' by Richard Herveille, which can be
2306 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
2307
which resides on the main OpenRISC Wishbone data bus.
2308 19 jeremybenn
 
2309
The current implementation provides only functionality to dump the
2310
screen to a file at intervals.
2311
 
2312 82 jeremybenn
VGA controller configuration is described in `section vga'.  This
2313 19 jeremybenn
section may appear multiple times, specifying multiple VGA controllers.
2314
The following parameters may be specified.
2315
 
2316
`enabled = 0|1'
2317 82 jeremybenn
     If 1 (true, the default), this VGA is enabled.  If 0, it is
2318 19 jeremybenn
     disabled.
2319
 
2320
`baseaddr = VALUE'
2321
     Set the base address of the VGA controller's memory mapped
2322 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2323 19 jeremybenn
     sensible value.
2324
 
2325
     The VGA controller has a 12-bit address bus, with 7 32-bit
2326
     registers, at addresses 0x000 through 0x018, and two color lookup
2327 82 jeremybenn
     tables at addresses 0x800 through 0xfff.  The hardware cursor
2328 19 jeremybenn
     registers are not implemented, so addresses 0x01c through 0x7fc
2329
     are not used.
2330
 
2331
`irq = VALUE'
2332 82 jeremybenn
     Use VALUE as the IRQ number of this VGA controller.  Default value
2333 19 jeremybenn
     0.
2334
 
2335
`refresh_rate = VALUE'
2336 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2337 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2338
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2339
     50 times per simulated second.
2340
 
2341
`txfile = "FILE"'
2342
     FILE specifies the base of the filename for screen dumps.
2343
     Successive screen dumps will be in BMP format, in files with the
2344
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2345 82 jeremybenn
     screen dumps starting at zero.  The default value is `"vga_out"'.
2346 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2347
     supported for this parameter, but deprecated.
2348
 
2349
 
2350

2351
File: or1ksim.info,  Node: Frame Buffer Configuration,  Next: Keyboard Configuration,  Prev: Display Interface Configuration,  Up: Peripheral Configuration
2352
 
2353
3.4.7 Frame Buffer Configuration
2354
--------------------------------
2355
 
2356 82 jeremybenn
     Caution: The frame buffer is only partially implemented.  Its
2357 19 jeremybenn
     configuration fields are described here, but the component should
2358 82 jeremybenn
     not be used at this time.  Like the VGA controller, it is designed
2359 19 jeremybenn
     to make screen dumps to file.
2360
 
2361 82 jeremybenn
Frame buffer configuration is described in `section fb'.  This section
2362
may appear multiple times, specifying multiple frame buffers.  The
2363 19 jeremybenn
following parameters may be specified.
2364
 
2365
`enabled = 0|1'
2366 82 jeremybenn
     If 1 (true, the default), this frame buffer is enabled.  If 0, it
2367 19 jeremybenn
     is disabled.
2368
 
2369
`baseaddr = VALUE'
2370
     Set the base address of the frame buffer's memory mapped registers
2371 82 jeremybenn
     to VALUE.  The default is 0, which is probably not a sensible
2372
     value.
2373 19 jeremybenn
 
2374
     The frame buffer has an 121-bit address bus, with 4 32-bit
2375
     registers, at addresses 0x000 through 0x00c, and a PAL lookup
2376 82 jeremybenn
     table at addresses 0x400 through 0x4ff.  Addresses 0x010 through
2377 19 jeremybenn
     0x3fc and addresses 0x500 through 0x7ff are not used.
2378
 
2379
`refresh_rate = VALUE'
2380 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2381 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2382
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2383
     50 times per simulated second.
2384
 
2385
`txfile = "FILE"'
2386
     FILE specifies the base of the filename for screen dumps.
2387
     Successive screen dumps will be in BMP format, in files with the
2388
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2389 82 jeremybenn
     screen dumps starting at zero.  The default value is `"fb_out"'.
2390 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2391
     supported for this parameter, but deprecated.
2392
 
2393
 
2394

2395
File: or1ksim.info,  Node: Keyboard Configuration,  Next: Disc Interface Configuration,  Prev: Frame Buffer Configuration,  Up: Peripheral Configuration
2396
 
2397
3.4.8 Keyboard Configuration (PS2)
2398
----------------------------------
2399
 
2400 82 jeremybenn
The PS2 interface provided by Or1ksim is not documented.  It may be
2401 98 jeremybenn
based on the PS2 project at OpenCores, and found in the top level SVN
2402 82 jeremybenn
directory, `ps2'.  However this project lacks any documentation beyond
2403
its project webpage.  Since most PS2 interfaces follow the Intel i8042
2404 19 jeremybenn
standard, this is presumably what is expected with this device.
2405
 
2406
The implementation only provides for keyboard support, which is
2407 82 jeremybenn
modelled as a file of keystrokes.  There is no mouse support.
2408 19 jeremybenn
 
2409
     Caution: A standard i8042 device has two registers at addresses
2410 82 jeremybenn
     0x60 (command) and 0x64 (status).  Inspection of the code,
2411
     suggests that the Or1ksim component places these registers at
2412
     addresses 0x00 and 0x04.
2413 19 jeremybenn
 
2414
     The port of Linux for the OpenRISC 1000, which runs on Or1ksim
2415
     implements the i8042 device driver, anticipating these registers
2416 82 jeremybenn
     reside at their conventional address.  It seems unlikel that this
2417 19 jeremybenn
     code will work.
2418
 
2419
     This component should be used with caution.
2420
 
2421 82 jeremybenn
Keyboard configuration is described in `section kbd'.  This section may
2422
appear multiple times, specifying multiple keyboard interfaces.  The
2423 19 jeremybenn
following parameters may be specified.
2424
 
2425
`enabled = 0|1'
2426 82 jeremybenn
     If 1 (true, the default), this keyboard is enabled.  If 0, it is
2427 19 jeremybenn
     disabled.
2428
 
2429
`baseaddr = VALUE'
2430
     Set the base address of the keyboard's memory mapped registers to
2431 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2432 19 jeremybenn
 
2433
     The keyboard PS/2 interface has an 3-bit address bus, with 2 8-bit
2434
     registers, at addresses 0x000 and 0x004.
2435
 
2436
          Caution: As noted above, a standard Intel 8042 interface
2437
          would expect to find these registers at locations 0x60 and
2438
          0x64, thus requiring at least a 7-bit bus.
2439
 
2440
`irq = VALUE'
2441 82 jeremybenn
     Use VALUE as the IRQ number of this Keyboard interface.  Default
2442 19 jeremybenn
     value 0.
2443
 
2444
`rxfile = "FILE"'
2445
     `file' specifies a file containing raw key stroke data, which
2446 82 jeremybenn
     models the input from a physical keyboard.  The default value is
2447 19 jeremybenn
     `"kbd_in"'.
2448
 
2449
 
2450

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

2590
File: or1ksim.info,  Node: Generic Peripheral Configuration,  Prev: Disc Interface Configuration,  Up: Peripheral Configuration
2591
 
2592
3.4.10 Generic Peripheral Configuration
2593
---------------------------------------
2594
 
2595
When used as a library (*note Simulator Library: Simulator Library.),
2596
Or1ksim makes provision for any additional peripheral to be implemented
2597 82 jeremybenn
externally.  Any read or write access to this peripheral's memory map
2598
generates "upcall"s to an external handler.  This interface can support
2599 19 jeremybenn
either C or C++, and was particularly designed to facilitate support
2600
for OSCI SystemC (see `http://www.systemc.org').
2601
 
2602
Generic peripheral configuration is described in `section generic'.
2603
This section may appear multiple times, specifying multiple external
2604 82 jeremybenn
peripherals.  The following parameters may be specified.
2605 19 jeremybenn
 
2606
`enabled = 0|1'
2607 82 jeremybenn
     If 1 (true, the default), this ATA/ATAPI interface is enabled.  If
2608 19 jeremybenn
     0, it is disabled.
2609
 
2610
`baseaddr = VALUE'
2611
     Set the base address of the generic peripheral's memory mapped
2612 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2613 19 jeremybenn
     sensible value.
2614
 
2615
     The size of the memory mapped register space is controlled by the
2616
     `size' paramter, described below.
2617
 
2618
`size = VALUE'
2619
     Set the size of the generic peripheral's memory mapped register
2620 82 jeremybenn
     space to VALUE bytes.  Any read or write accesses to addresses with
2621 19 jeremybenn
     offsets of 0 to VALUE-1 bytes from the base address specified in
2622
     parameter `baseaddr' (see above) will be directed to the external
2623
     interface.
2624
 
2625 82 jeremybenn
     VALUE will be rounded up the nearest power of 2.  It's default
2626
     value is zero.  If VALUE is not an exact power of two, accesses to
2627 19 jeremybenn
     address offsets of VALUE or above up to the next power of 2 will
2628
     generate a warning, and have no effect (reads will return zero).
2629
 
2630
`name = "STR"'
2631 82 jeremybenn
     This gives the peripheral the name `"STR"'.  This is used to
2632 19 jeremybenn
     identify the peripheral in error messages and warnings, and when
2633 82 jeremybenn
     reporting its status.  The default value is
2634 19 jeremybenn
     `"anonymous external peripheral"'.
2635
 
2636
`byte_enabled = 0|1'
2637
`hw_enabled = 0|1'
2638
`word_enabled = 0|1'
2639
     If 1 (true, the default), these parameters respectively enable the
2640 82 jeremybenn
     device for byte wide, half-word wide and word wide accesses.  If 0,
2641 19 jeremybenn
     accesses of that width will fail.
2642
 
2643
 
2644

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

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

2964
File: or1ksim.info,  Node: Code Internals,  Next: GNU Free Documentation License,  Prev: Verification API,  Up: Top
2965
 
2966
6 A Guide to Or1ksim Internals
2967
******************************
2968
 
2969 82 jeremybenn
These are notes to help those wanting to extend Or1ksim.  This section
2970 19 jeremybenn
assumes the use of a tag file, so file locations of entities'
2971 82 jeremybenn
definitions are not in general provided.  For more on tags, see the
2972
Linux manual page for `etags'.  A tag file can be created with:
2973 19 jeremybenn
 
2974
     make tags
2975
 
2976
* Menu:
2977
 
2978
* Coding Conventions::
2979
* Global Data Structures::
2980
* Concepts::
2981
* Internal Debugging::
2982 104 jeremybenn
* Regression Testing::
2983 19 jeremybenn
 
2984

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

3104
File: or1ksim.info,  Node: Global Data Structures,  Next: Concepts,  Prev: Coding Conventions,  Up: Code Internals
3105
 
3106
6.2 Global Data Structures
3107
==========================
3108
 
3109
`config'
3110
     The global variable `config' of type `struct config' holds the
3111
     configuration data for some of the Or1ksim components which are
3112 82 jeremybenn
     always present.  At present the components are:
3113 19 jeremybenn
 
3114
        * The simulator defined in `section sim' (*note Simulator
3115
          Configuration: Simulator Configuration.).
3116
 
3117
        * The Verification API (VAPI) defined  in `section vapi' (*note
3118
          Verification API (VAPI) Configuration: Verification API
3119
          Configuration.).
3120
 
3121
        * The Custom Unit Compiler (CUC), defined in `section cuc'
3122
          (*note Custom Unit Compiler (CUC) Configuration: CUC
3123
          Configuration.).
3124
 
3125
        * The CPU, defined in `section cpu' (*note CPU Configuration:
3126
          CPU Configuration.).
3127
 
3128
        * The data cache (but not the instruction cache), defined in
3129
          `section dc' (*note Cache Configuration: Cache
3130
          Configuration.).
3131
 
3132
        * The power management unit, defined in `section pm' (*note
3133
          Power Management Configuration: Power Management
3134
          Configuration.).
3135
 
3136
        * The programmable interrupt controller, defined in
3137
          `section pic' (*note Interrupt Configuration: Interrupt
3138
          Configuration.).
3139
 
3140
        * Branch prediciton, defined in `section bpb' (*note Branch
3141
          Prediction Configuration: Branch Prediction Configuration.).
3142
 
3143
        * The debug unit, defined in `section debug' (*note Debug
3144
          Interface Configuration: Debug Interface Configuration.).
3145
 
3146
 
3147
     This struct is made of a collection of structs, one for each
3148 82 jeremybenn
     component.  For example the simulator configuration is held in
3149 19 jeremybenn
     `config.sim'.
3150
 
3151
`config'
3152
     This is a linked list of data structures holding configuration data
3153
     for all sections which are not held in the main `config' data
3154 82 jeremybenn
     structure.  In general these are components (such as peripherals
3155
     and memory) which may occur multiple times.  However it also
3156
     handles some architectural components which may occur only once,
3157
     such as the memory management units, the instruction cache, the
3158
     interrupt controller and branch prediction.
3159 19 jeremybenn
 
3160
`runtime'
3161
     The global variable `runtime' of type `struct runtime' holds all
3162 82 jeremybenn
     the runtime information about the simulation.  To access this
3163 19 jeremybenn
     variable, `sim-config.h' must be included.
3164
 
3165
     This struct is itself made of 3 other structs, `cpu' (for CPU run
3166
     time state), `vapi' (for Verification API state) and `cuc' (for
3167
     Custom Unit Compiler state).
3168
 
3169
 
3170

3171
File: or1ksim.info,  Node: Concepts,  Next: Internal Debugging,  Prev: Global Data Structures,  Up: Code Internals
3172
 
3173
6.3 Concepts
3174
============
3175
 
3176
_Output Redirection_
3177 82 jeremybenn
     The current output stream is held in `runtime.cpu.fout'.  Output
3178 19 jeremybenn
     should be explicitly written to this stream, or may use the
3179
     `PRINTF' macro, which will write its arguments to this output
3180
     stream.
3181
 
3182
_Reset Hooks_
3183
     Any peripheral may register a routine to be called when the the
3184
     processor is reset by calling `reg_sim_reset', providing a
3185 82 jeremybenn
     function and pointer to a data structure as arguments.  On reset
3186 19 jeremybenn
     that function will be called with the data stucture pointer as
3187
     argument.
3188
 
3189 432 jeremybenn
_Interrupts_
3190
     An internal peripheral can model the effect of an interrupt being
3191
     asserted by calling `report_interrupt'.  This is used for both edge
3192
     and level sensitive interrupts.
3193 19 jeremybenn
 
3194 432 jeremybenn
     The effect is to set the corresponding bit in the PICSR SPR and to
3195
     queue an interrupt exception to take place after the current
3196
     instruction completes execution.
3197
 
3198
     Externally, the different interrupts require different mechanisms
3199
     for clearing.  Level sensitive interrupts should be cleared by
3200
     deasserting the interrupt line, edge sensitive interrupts by
3201
     clearing the corresponding bit in the PICSR SPR.
3202
 
3203
     Internally this amounts to the same thing (clearing the PICSPR
3204
     bit), so a single function is provided, `clear_interrupt'.  Note
3205
     however that when level sensitive interrupts are configured, PICSR
3206
     is read only, and can only be cleared by calling
3207
     `clear_interrupt'.  Using the two functions provided will ensure
3208
     the peripheral works correctly whichever type of interrupt is used.
3209
 
3210
          Note: Until an interrupt is cleared, all subsequent
3211
          interrupts are ignored with a warning.
3212
 
3213
 
3214 19 jeremybenn

3215 104 jeremybenn
File: or1ksim.info,  Node: Internal Debugging,  Next: Regression Testing,  Prev: Concepts,  Up: Code Internals
3216 19 jeremybenn
 
3217
6.4 Internal Debugging
3218
======================
3219
 
3220
The function `debug' is like `printf', but with an extra first
3221 82 jeremybenn
argument, which is the debug level.  If the debug level specified in
3222
the simulator configuration (*note Simulator Behavior: Simulator
3223
Behavior.) is greater than or equal to this value, the remaining
3224
arguments are printed to the current output stream (*note Output
3225
Redirection: Output Redirection.).
3226 19 jeremybenn
 
3227

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

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

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

4688
Tag Table:
4689 442 julius
Node: Top826
4690
Node: Installation1236
4691
Node: Preparation1483
4692
Node: Configuring the Build1778
4693
Node: Build and Install7918
4694
Node: Known Issues8684
4695
Node: Usage9739
4696
Node: Standalone Simulator10005
4697
Node: Profiling Utility14565
4698
Node: Memory Profiling Utility15471
4699
Node: Trace Generation16831
4700
Node: Simulator Library17286
4701
Node: Ethernet TUN/TAP Interface27718
4702
Node: Setting Up a Persistent TAP device28801
4703
Node: Establishing a Bridge29476
4704
Node: Opening the Firewall31159
4705
Node: Disabling Ethernet Filtering31650
4706
Node: Networking from OpenRISC Linux and BusyBox32275
4707
Node: Tearing Down a Bridge33937
4708
Node: Configuration34680
4709
Node: Configuration File Format35292
4710
Node: Configuration File Preprocessing35677
4711
Node: Configuration File Syntax35974
4712
Node: Simulator Configuration38759
4713
Node: Simulator Behavior39050
4714
Node: Verification API Configuration43631
4715
Node: CUC Configuration45571
4716
Node: Core OpenRISC Configuration47563
4717
Node: CPU Configuration48065
4718
Node: Memory Configuration52184
4719
Node: Memory Management Configuration58906
4720
Node: Cache Configuration61283
4721
Node: Interrupt Configuration63669
4722
Node: Power Management Configuration65502
4723
Node: Branch Prediction Configuration66779
4724
Node: Debug Interface Configuration68139
4725
Node: Peripheral Configuration70482
4726
Node: Memory Controller Configuration71108
4727
Node: UART Configuration74888
4728
Node: DMA Configuration78407
4729
Node: Ethernet Configuration80274
4730
Node: GPIO Configuration84919
4731
Node: Display Interface Configuration86552
4732
Node: Frame Buffer Configuration88861
4733
Node: Keyboard Configuration90725
4734
Node: Disc Interface Configuration92963
4735
Node: Generic Peripheral Configuration98067
4736
Node: Interactive Command Line100362
4737
Node: Verification API107336
4738
Node: Code Internals111766
4739
Node: Coding Conventions112349
4740
Node: Global Data Structures116776
4741
Node: Concepts119433
4742
Ref: Output Redirection119578
4743
Ref: Interrupts Internal120116
4744
Node: Internal Debugging121269
4745
Node: Regression Testing121793
4746
Node: GNU Free Documentation License125582

powered by: WebSVN 2.1.0

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