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

Subversion Repositories openrisc

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

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

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

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

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

59
File: or1ksim.info,  Node: Preparation,  Next: Configuring the Build,  Up: Installation
60
 
61
1.1 Preparation
62
===============
63
 
64
Unpack the software and create a _separate_ directory in which to build
65
it:
66
 
67 385 jeremybenn
     tar jxf or1ksim-0.5.0rc2.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 385 jeremybenn
     ../or1ksim-0.5.0rc2/configure --target=or32-uclinux ...
85 19 jeremybenn
 
86
There are several other options available, many of which are standard
87 82 jeremybenn
to GNU `configure' scripts.  Use `configure --help' to see all the
88
options.  The most useful is `--prefix' to specify a directory for
89 19 jeremybenn
installation of the tools.
90
 
91 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
`or32-uclinux-sim', `or32-uclinux-psim' and `or32-uclinux-mpsim', the
243
Or1ksim library, `libsim', the header file, `or1ksim.h' and this
244
documentation in `info' format.
245
 
246
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
* Simulator Library::
289
 
290

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

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

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

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

767
File: or1ksim.info,  Node: Configuration,  Next: Interactive Command Line,  Prev: Usage,  Up: Top
768
 
769
3 Configuration
770
***************
771
 
772 82 jeremybenn
Or1ksim is configured through a configuration file.  This is specified
773 19 jeremybenn
through the `-f' parameter to the Or1ksim command, or passed as a
774 82 jeremybenn
string when initializing the Or1ksim library.  If no file is specified,
775
the default `sim.cfg' is used.  The file is looked for first in the
776 224 jeremybenn
current directory, then in the `$HOME/.or1ksim' directory of the user.
777 19 jeremybenn
 
778
* Menu:
779
 
780
* Configuration File Format::
781
* Simulator Configuration::
782
* Core OpenRISC Configuration::
783
* Peripheral Configuration::
784
 
785

786
File: or1ksim.info,  Node: Configuration File Format,  Next: Simulator Configuration,  Up: Configuration
787
 
788
3.1 Configuration File Format
789
=============================
790
 
791 346 jeremybenn
The configuration file is a plain text file.  A reference example,
792
`sim.cfg', is included in the top level directory of the distribution.
793 19 jeremybenn
 
794
* Menu:
795
 
796
* Configuration File Preprocessing::
797
* Configuration File Syntax::
798
 
799

800
File: or1ksim.info,  Node: Configuration File Preprocessing,  Next: Configuration File Syntax,  Up: Configuration File Format
801
 
802
3.1.1 Configuration File Preprocessing
803
--------------------------------------
804
 
805 82 jeremybenn
The configuration file may include C style comments (i.e.  delimited by
806 19 jeremybenn
`/*' and `*/').
807
 
808

809
File: or1ksim.info,  Node: Configuration File Syntax,  Prev: Configuration File Preprocessing,  Up: Configuration File Format
810
 
811
3.1.2 Configuration File Syntax
812
-------------------------------
813
 
814
The configuration file is divided into a series of sections, with the
815
general form:
816
 
817
     section SECTION_NAME
818
 
819
       ...
820
 
821
     end
822
 
823
Sections may also have sub-sections within them (currently only the
824
ATA/ATAPI disc interface uses this).
825
 
826
Within a section, or sub-section are a series of parameter assignments,
827
one per line, withe the general form
828
 
829
       PARAMETER = VALUE
830
 
831
Depending on the parameter, the value may be a named value (an
832
enumeration), an integer (specified in any format acceptable in C) or a
833 82 jeremybenn
string in doubple quotes.  For flag parameters, the value 1 is used to
834
mean "true" or "on" and the value "0" to mean "false" or "off".  An
835 19 jeremybenn
example from a memory section shows each of these
836
 
837
     section memory
838
       type    = random
839
       pattern = 0x00
840
       name    = "FLASH"
841
       ...
842
     end
843
 
844
Many parameters are optional and take reasonable default values if not
845 82 jeremybenn
specified.  However there are some parameters (for example the `ce'
846 19 jeremybenn
parameter in `section memory') _must_ be specified.
847
 
848
Subsections are introduced by a keyword, with a parameter value (no `='
849 82 jeremybenn
sign), and end with the same keyword prefixed by `end'.  Thus the
850 19 jeremybenn
ATA/ATAPI inteface (`section ata') has a `device' subsection, thus:
851
 
852
     section ata
853
       ...
854
       device 0
855
         type    = 1
856
         file = "FILENAME"
857
         ...
858
       enddevice
859
       ...
860
     end
861
 
862
Some sections (for example `section sim') should appear only once.
863
Others (for example `section memory' may appear multiple times.
864
 
865
Sections may be omitted, _unless they contain parameters which are
866 82 jeremybenn
non-optional_.  If the section describes a part of the simulator which
867 19 jeremybenn
is optional (for example whether it has a UART), then that
868 82 jeremybenn
functionality will not be provided.  If the section describes a part of
869 19 jeremybenn
the simulator which is not optional (for example the CPU), then all the
870
parameters of that section will take their default values.
871
 
872
All optional parts of the functionality are always described by
873
sections including a `enabled' parameter, which can be set to 0 to
874
ensure that functionality is explicitly omitted.
875
 
876
Even if a section is disabled, all its parameters will be read and
877 82 jeremybenn
stored.  This is helpful if the section is subsequently enabled from
878
the Or1ksim command line (*note Interactive Command Line: Interactive
879 19 jeremybenn
Command Line.).
880
 
881
     Tip: It generally clearer to have sections describing _all_
882
     components, with omitted functionality explicitly indicated by
883
     setting the `enabled' parameter to 0
884
 
885
The following sections describe the various configuration sections and
886
the parameters which may be set in each.
887
 
888

889
File: or1ksim.info,  Node: Simulator Configuration,  Next: Core OpenRISC Configuration,  Prev: Configuration File Format,  Up: Configuration
890
 
891
3.2 Simulator Configuration
892
===========================
893
 
894
* Menu:
895
 
896
* Simulator Behavior::
897
* Verification API Configuration::
898
* CUC Configuration::
899
 
900

901
File: or1ksim.info,  Node: Simulator Behavior,  Next: Verification API Configuration,  Up: Simulator Configuration
902
 
903
3.2.1 Simulator Behavior
904
------------------------
905
 
906 82 jeremybenn
Simulator behavior is described in `section sim'.  This section should
907
appear only once.  The following parameters may be specified.
908 19 jeremybenn
 
909
`verbose = 0|1'
910 82 jeremybenn
     If 1 (true), print extra messages.  Default 0.
911 19 jeremybenn
 
912
`debug = 0-9'
913 82 jeremybenn
 
914
     higher the value the greater the number of messages.  Default 0.
915
     Negative values will be treated as 0 (with a warning).  Values
916
     that are too large will be treated as 9 (with a warning).
917 19 jeremybenn
 
918
`profile = 0|1'
919
     If 1 (true) generate a profiling file using the file specified in
920 82 jeremybenn
     the `prof_file' parameter or otherwise `sim.profile'.  Default 0.
921 19 jeremybenn
 
922
`prof_file = ``FILENAME'''
923 82 jeremybenn
     Specifies the file to be used with the `profile' parameter.
924
     Default `sim.profile'.  For backwards compatibility, the
925
     alternative name `prof_fn' is supported for this parameter, but
926 346 jeremybenn
     deprecated.  Default `sim.profile'.
927 19 jeremybenn
 
928
`mprofile = 0|1'
929
     If 1 (true) generate a memory profiling file using the file
930
     specified in the `mprof_file' parameter or otherwise
931 82 jeremybenn
     `sim.mprofile'.  Default 0.
932 19 jeremybenn
 
933 346 jeremybenn
`mprof_file = ``FILENAME'''
934 19 jeremybenn
     Specifies the file to be used with the `mprofile' parameter.
935 82 jeremybenn
     Default `sim.mprofile'.  For backwards compatibility, the
936 19 jeremybenn
     alternative name `mprof_fn' is supported for this parameter, but
937 346 jeremybenn
     deprecated.  Default `sim.mprofile'.
938 19 jeremybenn
 
939
`history = 0|1'
940 82 jeremybenn
     If 1 (true) track execution flow.  Default 0.
941 19 jeremybenn
 
942
          Note: Setting this parameter seriously degrades performance.
943
 
944
          Note: If this execution flow tracking is enabled, then
945
          `dependstats' must be enabled in the CPU configuration
946
          section (*note CPU Configuration: CPU Configuration.).
947
 
948
`exe_log = 0|1'
949 82 jeremybenn
     If 1 (true), generate an execution log.  Log is written to the
950
     file specified in parameter `exe_log_file'.  Default 0.
951 19 jeremybenn
 
952
          Note: Setting this parameter seriously degrades performance.
953
 
954
`exe_log_type = default|hardware|simple|software'
955
     Type of execution log to produce.
956
 
957
    `default'
958 82 jeremybenn
          Produce default output for the execution log.  In the current
959 19 jeremybenn
          implementation this is the equivalent of `hardware'.
960
 
961
    `hardware'
962
          After each instruction execution, log the number of
963
          instructions executed so far, the next instruction to execute
964
          (in hex), the general purpose registers (GPRs), status
965
          register, exception program counter, exception, effective
966
          address register and exception status register.
967
 
968
    `simple'
969
          After each instruction execution, log the number of
970
          instructions executed so far and the next instruction to
971
          execute, symbolically disassembled.
972
 
973
    `software'
974
          After each instruction execution, log the number of
975
          instructions executed so far and the next instruction to
976 82 jeremybenn
          execute, symbolically disassembled.  Also show the value of
977 19 jeremybenn
          each operand to the instruction.
978
 
979
 
980 82 jeremybenn
     Default value `hardware'.  Any unrecognized keyword (case
981 19 jeremybenn
     insensitive) will be treated as the default with a warning.
982
 
983
          Note: Execution logs can be _very_ big.
984
 
985
`exe_log_start = VALUE'
986 82 jeremybenn
     Address of the first instruction to start logging.  Default 0.
987 19 jeremybenn
 
988
`exe_log_end = VALUE'
989 82 jeremybenn
     Address of the last instruction to log.  Default no limit (i.e
990
     once started logging will continue until the simulator exits).
991 19 jeremybenn
 
992
`exe_log_marker = VALUE'
993
     Specifies the number of instructions between printing horizontal
994 82 jeremybenn
     markers.  Default is to produce no markers.
995 19 jeremybenn
 
996
`exe_log_file = FILENAME'
997
     Filename for the execution log filename if `exe_log' is enabled.
998 82 jeremybenn
     Default `executed.log'.  For backwards compatibility, the
999 19 jeremybenn
     alternative name `exe_log_fn' is supported for this parameter, but
1000
     deprecated.
1001
 
1002 202 julius
`exe_bin_insn_log = 0|1'
1003 346 jeremybenn
     Enable logging of executed instructions to a file in binary format.
1004
     This is helpful for off-line dynamic execution analysis.
1005 202 julius
 
1006 346 jeremybenn
          Note: Execution logs can be _very_ big.  For example, while
1007 220 jeremybenn
          booting the Linux kernel, version 2.6.34, a log file 1.2GB in
1008
          size was generated.
1009 202 julius
 
1010
`exe_bin_insn_log_file = FILENAME'
1011
     Filename for the binary execution log filename if
1012
     `exe_bin_insn_log' is enabled.  Default `exe-insn.bin'.
1013
 
1014 19 jeremybenn
`clkcycle = VALUE[ps|ns|us|ms]'
1015 82 jeremybenn
     Specify the time taken by one clock cycle.  If no units are
1016
     specified, `ps' is assumed.  Default 4000ps (250MHz).
1017 19 jeremybenn
 
1018
 
1019

1020
File: or1ksim.info,  Node: Verification API Configuration,  Next: CUC Configuration,  Prev: Simulator Behavior,  Up: Simulator Configuration
1021
 
1022
3.2.2 Verification API (VAPI) Configuration
1023
-------------------------------------------
1024
 
1025
The Verification API (VAPI) provides a TCP/IP interface to allow
1026 82 jeremybenn
components of the simulation to be controlled externally.  *Note
1027 19 jeremybenn
Verification API: Verification API, for more details.
1028
 
1029 82 jeremybenn
Verification API configuration is described in `section vapi'.  This
1030
section may appear at most once.  The following parameters may be
1031 19 jeremybenn
specified.
1032
 
1033
`enabled = 0|1'
1034
     If 1 (true), verification API is enabled and its server started.
1035
     If 0 (the default), it is disabled.
1036
 
1037
`server_port = VALUE'
1038
     When VAPI is enabled, communication will be via TCP/IP on the port
1039 82 jeremybenn
     specified by VALUE.  The value must lie in the range 1 to 65535.
1040 19 jeremybenn
     The default value is 50000.
1041
 
1042 82 jeremybenn
          Tip: There is no registered port for Or1ksim VAPI.  Good
1043 19 jeremybenn
          practice suggests users should adopt port values in the
1044 82 jeremybenn
          "Dynamic" or "Private" port range, i.e.  49152-65535.
1045 19 jeremybenn
 
1046
`log_enabled = 0|1'
1047
     If 1 (true), all VAPI requests and sent commands will be logged.
1048 82 jeremybenn
     If 0 (the default), logging is diabled.  Logs are written to the
1049 19 jeremybenn
     file specified by the `vapi_log_file' field (see below).
1050
 
1051
          Caution: This can generate a substantial amount of file I/O
1052
          and seriously degrade simulator performance.
1053
 
1054
`hide_device_id = 0|1'
1055 82 jeremybenn
     If 1 (true) don't log the device ID.  If 0 (the default), log the
1056
     device ID.  This feature (when set to 1) is provided for backwards
1057 19 jeremybenn
     compatibility with an old version of VAPI.
1058
 
1059
`vapi_log_file = "FILENAME"'
1060
     Use `filename' as the file for logged data is logging is enabled
1061 82 jeremybenn
     (see `log_enabled' above).  The default is `"vapi.log"'.  For
1062 19 jeremybenn
     backwards compatibility, the alternative name `vapi_log_fn' is
1063
     supported for this parameter, but deprecated.
1064
 
1065
 
1066

1067
File: or1ksim.info,  Node: CUC Configuration,  Prev: Verification API Configuration,  Up: Simulator Configuration
1068
 
1069
3.2.3 Custom Unit Compiler (CUC) Configuration
1070
----------------------------------------------
1071
 
1072
The Custom Unit Compiler (CUC) was a project by Marko Mlinar to generate
1073 82 jeremybenn
Verilog from ANSI C functions.  The project seems to not have progressed
1074
beyond the initial prototype phase.  The configuration parameters are
1075 19 jeremybenn
described here for the record.
1076
 
1077 82 jeremybenn
CUC configuration is described in `section cuc'.  This section may
1078
appear at most once.  The following parameters may be specified.
1079 19 jeremybenn
 
1080
`memory_order = none|weak|strong|exact'
1081
     This parameter specifies the memory ordering required:
1082
 
1083
    `memory_order=none'
1084
          Different memory ordering, even if there are dependencies.
1085
          Bursts can be made, width can change.
1086
 
1087 346 jeremybenn
    `memory_order=weak'
1088 82 jeremybenn
          Different memory ordering, even if there are dependencies.  If
1089 19 jeremybenn
          dependencies cannot occur, then bursts can be made, width can
1090
          change.
1091
 
1092 346 jeremybenn
    `memory_order=strong'
1093 82 jeremybenn
          Same memory ordering.  Bursts can be made, width can change.
1094 19 jeremybenn
 
1095 346 jeremybenn
    `memory_order=exact'
1096 19 jeremybenn
          Exactly the same memory ordering and widths.
1097
 
1098
 
1099 82 jeremybenn
     The default value is `memory_order=exact'.  Invalid memory
1100 19 jeremybenn
     orderings are ignored with a warning.
1101
 
1102
`calling_convention = 0|1'
1103 82 jeremybenn
     If 1 (true), programs follow OpenRISC calling conventions.  If 0
1104 19 jeremybenn
     (the default), they may use other convenitions.
1105
 
1106
`enable_bursts = 0 | 1'
1107 82 jeremybenn
     If 1 (true), bursts are detected.  If 0 (the default), bursts are
1108 19 jeremybenn
     not detected.
1109
 
1110
`no_multicycle = 0 | 1'
1111 82 jeremybenn
     If 1 (true), no multicycle logic paths will be generated.  If 0
1112
     (the default), multicycle logic paths will be generated.
1113 19 jeremybenn
 
1114
`timings_file = "FILENAME"'
1115 82 jeremybenn
     FILENAME specifies a file containing timing information.  The
1116
     default value is `"virtex.tim"'.  For backwards compatibility, the
1117 19 jeremybenn
     alternative name `timings_fn' is supported for this parameter, but
1118
     deprecated.
1119
 
1120
 
1121

1122
File: or1ksim.info,  Node: Core OpenRISC Configuration,  Next: Peripheral Configuration,  Prev: Simulator Configuration,  Up: Configuration
1123
 
1124
3.3 Configuring the OpenRISC Architectural Components
1125
=====================================================
1126
 
1127
* Menu:
1128
 
1129
* CPU Configuration::
1130
* Memory Configuration::
1131
* Memory Management Configuration::
1132
* Cache Configuration::
1133
* Interrupt Configuration::
1134
* Power Management Configuration::
1135
* Branch Prediction Configuration::
1136
* Debug Interface Configuration::
1137
 
1138

1139
File: or1ksim.info,  Node: CPU Configuration,  Next: Memory Configuration,  Up: Core OpenRISC Configuration
1140
 
1141
3.3.1 CPU Configuration
1142
-----------------------
1143
 
1144 82 jeremybenn
CPU configuration is described in `section cpu'.  This section should
1145
appear only once.  At present Or1ksim does not model multi-CPU systems.
1146 19 jeremybenn
The following parameters may be specified.
1147
 
1148
`ver = VALUE'
1149
 
1150
`cfg = VALUE'
1151
 
1152
`rev = VALUE'
1153
     The values are used to form the corresponding fields in the `VR'
1154 82 jeremybenn
     Special Purpose Register (SPR 0).  Default values 0.  A warning is
1155 19 jeremybenn
     given and the value truncated if it is too large (8 bits for `ver'
1156
     and `cfg', 6 bits for `rev').
1157
 
1158
`upr = VALUE'
1159
     Used as the value of the Unit Present Register (UPR) Special
1160 82 jeremybenn
     Purpose Register (SPR 1) to VALUE.  Default value is 0x0000075f,
1161 19 jeremybenn
     i.e.
1162
        * UPR present (0x00000001)
1163
 
1164
        * Data cache present (0x00000002)
1165
 
1166
        * Instruction cache present (0x00000004)
1167
 
1168
        * Data MMY present (0x00000008)
1169
 
1170
        * Instruction MMU present (0x00000010)
1171
 
1172
        * Debug unit present (0x00000040)
1173
 
1174
        * Power management unit present (0x00000100)
1175
 
1176
        * Programmable interrupt controller present (0x00000200)
1177
 
1178
        * Tick timer present (0x00000400)
1179
 
1180
     However, with the exection of the UPR present (0x00000001) and tick
1181
     timer present, the various fields will be modified with the values
1182
     specified in their corresponding configuration sections.
1183
 
1184
`cfgr = VALUE'
1185
     Sets the CPU configuration register (Special Purpose Register 2) to
1186 82 jeremybenn
     VALUE.  Default value is 0x00000020, i.e.  support for the ORBIS32
1187
     instruction set.  Attempts to set any other value are accepted, but
1188 19 jeremybenn
     issue a warning that there is no support for the instruction set.
1189
 
1190
`sr = VALUE'
1191
     Sets the supervision register Special Purpose Register (SPR 0x11)
1192 82 jeremybenn
     to VALUE.  Default value is 0x00008001, i.e.  start in supervision
1193 19 jeremybenn
     mode (0x00000001) and set the "Fixed One" bit (0x00008000).
1194
 
1195 98 jeremybenn
          Note: This is particularly useful when an image is held in
1196
          Flash at high memory (0xf0000000).  The EPH  bit can be set,
1197
          so that interrupt vectors are basedf at 0xf0000000, rather
1198
          than 0x0.
1199
 
1200 19 jeremybenn
`superscalar = 0|1'
1201 82 jeremybenn
     If 1, the processor operates in superscalar mode.  Default value is
1202 19 jeremybenn
     0.
1203
 
1204
     In the current simulator, the only functional effect of superscalar
1205
     mode is to affect the calculation of the number of cycles taken to
1206
     execute an instruction.
1207
 
1208
          Caution: The code for this does not appear to be complete or
1209
          well tested, so users are advised not to use this option.
1210
 
1211
`hazards = 0|1'
1212 82 jeremybenn
     If 1, data hazards are tracked in a superscalar CPU.  Default
1213
     value is 0.
1214 19 jeremybenn
 
1215
     In the current simulator, the only functional effect is to cause
1216
     logging of hazard waiting information if the CPU is superscalar.
1217
     However nowhere in the simulator is this data actually computed,
1218
     so the net result is probably to have no effect.
1219
 
1220
     if harzards are tracked, current hazards can be displayed using the
1221
     simulator's `r' command.
1222
 
1223
          Caution: The code for this does not appear to be complete or
1224
          well tested, so users are advised not to use this option.
1225
 
1226
`dependstats = 0|1'
1227 82 jeremybenn
     If 1, inter-instruction dependencies are calculated.  Default
1228
     value 0.
1229 19 jeremybenn
 
1230
     If these values are calculated, the depencies can be displayed
1231
     using the simulator's `stat' command.
1232
 
1233
          Note: This field must be enabled, if execution execution flow
1234
          tracking (field `history') has been requested in the simulator
1235
          configuration section (*note Simulator Behavior: Simulator
1236
          Behavior.).
1237
 
1238
`sbuf_len = VALUE'
1239
     The length of the store buffer is set to VALUE, which must be no
1240 82 jeremybenn
     greater than 256.  Larger values will be truncated to 256 with a
1241
     warning.  Negative values will be treated as 0 with a warning.
1242
     Use 0 to disable the store buffer.
1243 19 jeremybenn
 
1244
     When the store buffer is active, stores are accumulated and
1245
     committed when I/O is idle.
1246
 
1247 100 julius
`hardfloat = 0|1'
1248 346 jeremybenn
     If 1, hardfloat instructions are enabled.  Default value 0.
1249 19 jeremybenn
 
1250 104 jeremybenn
 
1251 19 jeremybenn

1252
File: or1ksim.info,  Node: Memory Configuration,  Next: Memory Management Configuration,  Prev: CPU Configuration,  Up: Core OpenRISC Configuration
1253
 
1254
3.3.2 Memory Configuration
1255
--------------------------
1256
 
1257 82 jeremybenn
Memory configuration is described in `section memory'.  This section
1258 98 jeremybenn
may appear multiple times, specifying multiple blocks of memory.
1259 19 jeremybenn
 
1260 98 jeremybenn
     Caution: The user may choose whether or not to enable a memory
1261 385 jeremybenn
     controller.  If a memory controller is enabled, then appropriate
1262
     initalization code must be provided.  The section describing
1263
     memory controller configuration describes the steps necessary for
1264
     using smaller or larger memory sections (*note Memory Controller
1265
     Configuration: Memory Controller Configuration.).
1266 98 jeremybenn
 
1267 385 jeremybenn
     The "uClibc" startup code initalizes a memory controller, assumed
1268
     to be mapped at 0x93000000.  If a memory controller is _not_
1269
     enabled, then the standard C library code will generate memory
1270
     access errors.  The solution is to declare an additional writable
1271
     memory block, mimicing the memory controller's register bank as
1272
     follows.
1273 98 jeremybenn
 
1274
          section memory
1275
            pattern = 0x00
1276
            type = unknown
1277
            name = "MC shadow"
1278
            baseaddr = 0x93000000
1279
            size     = 0x00000080
1280
            delayr = 2
1281
            delayw = 4
1282
          end
1283
 
1284
 
1285
The following parameters may be specified.
1286
 
1287 19 jeremybenn
`type=random|pattern|unknown|zero'
1288 82 jeremybenn
     Specifies the values to which memory should be initialized.  The
1289 19 jeremybenn
     default value is `unknown'.
1290
 
1291
    `random'
1292 82 jeremybenn
          Set the memory values to be a random value.  A seed for the
1293 19 jeremybenn
          random generator may be set using the `random_seed' field in
1294
          this section (see below), thus ensuring the same "random"
1295
          values are used each time.
1296
 
1297
    `pattern'
1298
          Set the memory values to be a pattern value, which is set
1299
          using the `pattern' field in this section (see below).
1300
 
1301
    `unknown'
1302 82 jeremybenn
          The memory values are not initialized (i.e.  left "unknown").
1303 240 julius
          This option will yield faster initialization of the
1304 346 jeremybenn
          simulator.  This is the default.
1305 19 jeremybenn
 
1306
    `zero'
1307 82 jeremybenn
          Set the memory values to be 0.  This is the equivalent of
1308 19 jeremybenn
          `type=pattern' and a `pattern' value of 0, and implemented as
1309
          such.
1310
 
1311
               Note: As a consequence, if the `pattern' field is
1312
               _subsequently_ specified in this section, the value in
1313
               that field will be used instead of zero to initialize
1314
               the memory.
1315
 
1316
 
1317
`random_seed = VALUE'
1318 82 jeremybenn
     Set the seed for the random number generator to VALUE.  This only
1319 19 jeremybenn
     has any effect for memory type `random'.
1320
 
1321
     The default value is -1, which means the seed will be set from a
1322
     call to the `time' function, thus ensuring different random values
1323 82 jeremybenn
     are used on each run.  The simulator prints out the seed used in
1324 19 jeremybenn
     this case, allowing repeat runs to regenerate the same random
1325
     values used in any particular run.
1326
 
1327
`pattern = VALUE'
1328 82 jeremybenn
     Set the pattern to be used when initializing memory to VALUE.  The
1329
     default value is 0.  This only has any effect for memory type
1330
     `pattern'.  The least significant 8 bits of this value is used to
1331
     initialize each byte.  More than 8 bits can be specified, but will
1332 19 jeremybenn
     ignored with a warning.
1333
 
1334
          Tip: The default value, is equivalent to setting the memory
1335 82 jeremybenn
          `type' to be `zero'.  If that is what is intended, then using
1336 19 jeremybenn
          `type=zero' explicitly is better than using `type=pattern'
1337
          and not specifying a value for `pattern'.
1338
 
1339
`baseaddr = VALUE'
1340 82 jeremybenn
     Set the base address of the memory to VALUE.  It should be aligned
1341 19 jeremybenn
     to a multiple of the memory size rounded up to the nearest 2^n.
1342
     The default value is 0.
1343
 
1344
`size = VALUE'
1345 82 jeremybenn
     Set the size of the memory block to be VALUE bytes.  This should
1346
     be a multiple of 4 (i.e.  word aligned).  The default value is
1347
     1024.
1348 19 jeremybenn
 
1349
          Note: When allocating memory, the simulator will allocate the
1350
          nearest 2^n bytes greater than or equal to VALUE, and will not
1351
          notice memory misses in any part of the memory between VALUE
1352
          and the amount allocated.
1353
 
1354
          As a consequence users are strongly recommended to specify
1355 82 jeremybenn
          memory sizes that are an exact power of 2.  If some other
1356 19 jeremybenn
          amount of memory is required, it should be specified as
1357
          separate, contiguous blocks, each of which is a power of 2 in
1358
          size.
1359
 
1360
`name = "TEXT"'
1361 82 jeremybenn
     Name the block.  Typically these describe the type of memory being
1362
     modeled (thus `"SRAM"' or `"Flash"'.  The default is
1363 19 jeremybenn
     `"anonymous memory block"'.
1364
 
1365
          Note: It is not clear that this information is currently ever
1366 82 jeremybenn
          used in normal operation of the simulator.  Even the `info'
1367 19 jeremybenn
          command of the simulator ignores it.
1368
 
1369
`ce = VALUE'
1370 82 jeremybenn
     Set the chip enable index of the memory instance.  Each memory
1371 19 jeremybenn
     instance should have a unique chip enable index, which should be
1372 82 jeremybenn
     greater than or equal to zero.  This is used by the memory
1373 19 jeremybenn
     controller when identifying different memory instances.
1374
 
1375 346 jeremybenn
     There is no requirement to set `ce' if a memory controller is not
1376
     enabled.  The default value is -1 (invalid).
1377 19 jeremybenn
 
1378
`mc = VALUE'
1379 82 jeremybenn
     Specifies the memory controller this memory is connected to.  It
1380 19 jeremybenn
     should correspond to the `index' field specified in a `section mc'
1381
     for a memory controller (*note Memory Controller Configuration:
1382
     Memory Controller Configuration.).
1383
 
1384 346 jeremybenn
     There is no requirement to set `mc' if a memory controller is not
1385
     enabled.  Default value is 0, which is also the default value of a
1386 98 jeremybenn
     memory controller `index' field.  This is suitable therefore for
1387
     designs with just one memory controller.
1388 19 jeremybenn
 
1389
`delayr = VALUE'
1390 82 jeremybenn
     The number of cycles required for a read access.  Set to -1 if the
1391
     memory does not support reading.  Default value 1.  The simulator
1392 19 jeremybenn
     will add this number of cycles to the total instruction cycle
1393
     count when reading from main memory.
1394
 
1395
`delayw = VALUE'
1396 82 jeremybenn
     The number of cycles required for a write access.  Set to -1 if the
1397
     memory does not support writing.  Default value 1.  The simulator
1398 19 jeremybenn
     will add this number of cycles to the total instruction cycle
1399
     count when writing to main memory.
1400
 
1401
`log = "FILE"'
1402
     If specified, `file' names a file for all memory accesses to be
1403 82 jeremybenn
     logged.  If not specified, the default value, NULL is used, meaning
1404 19 jeremybenn
     that the memory is not logged.
1405
 
1406
 
1407

1408
File: or1ksim.info,  Node: Memory Management Configuration,  Next: Cache Configuration,  Prev: Memory Configuration,  Up: Core OpenRISC Configuration
1409
 
1410
3.3.3 Memory Management Configuration
1411
-------------------------------------
1412
 
1413
Memory Management Unit (MMU) configuration is described in `section
1414
dmmu' (for the data MMU) and `section immu' (for the instruction MMU).
1415 82 jeremybenn
Each section should appear at most once.  The following parameters may
1416 19 jeremybenn
be specified.
1417
 
1418
`enabled = 0|1'
1419
     If 1 (true), the data or instruction (as appropriate) MMU is
1420 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1421 19 jeremybenn
 
1422
`nsets = VALUE'
1423
     Sets the number of data or instruction (as appropriate) TLB sets to
1424 82 jeremybenn
     VALUE, which must be a power of two, not exceeding 128.  Values
1425
     which do not fit these criteria are ignored with a warning.  The
1426 19 jeremybenn
     default value is 1.
1427
 
1428
`nways = VALUE'
1429
     Sets the number of data or instruction (as appropriate) TLB ways to
1430 82 jeremybenn
     VALUE.  The value must be in the range 1 to 4.  Values outside
1431
     this range are ignored with a warning.  The default value is 1.
1432 19 jeremybenn
 
1433
`pagesize = VALUE'
1434
     The data or instruction (as appropriate) MMU page size is set to
1435 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1436
     of 2 are ignored with a warning.  The default is 8192 (0x2000).
1437 19 jeremybenn
 
1438
`entrysize = VALUE'
1439
     The data or instruction (as appropriate) MMU entry size is set to
1440 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1441
     of 2 are ignored with a warning.  The default value is 1.
1442 19 jeremybenn
 
1443
          Note: Or1ksim does not appear to use the `entrysize' parameter
1444 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1445 19 jeremybenn
          not seem to matter.
1446
 
1447
`ustates = VALUE'
1448
     The number of instruction usage states for the data or instruction
1449
     (as appropriate) MMU is set to VALUE, which must be 2, 3 or 4.
1450 82 jeremybenn
     Values outside this range are ignored with a warning.  The default
1451 19 jeremybenn
     value is 2.
1452
 
1453
          Note: Or1ksim does not appear to use the `ustates' parameter
1454 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1455 19 jeremybenn
          not seem to matter.
1456
 
1457
`hitdelay = VALUE'
1458
     Set the number of cycles a data or instruction (as appropriate) MMU
1459 82 jeremybenn
     hit costs.  Default value 1.
1460 19 jeremybenn
 
1461
`missdelay = VALUE'
1462
     Set the number of cycles a data or instruction (as appropriate) MMU
1463 82 jeremybenn
     miss costs.  Default value 1.
1464 19 jeremybenn
 
1465
 
1466

1467
File: or1ksim.info,  Node: Cache Configuration,  Next: Interrupt Configuration,  Prev: Memory Management Configuration,  Up: Core OpenRISC Configuration
1468
 
1469
3.3.4 Cache Configuration
1470
-------------------------
1471
 
1472
Cache configuration is described in `section dc' (for the data cache)
1473 82 jeremybenn
and `seciton ic' (for the instruction cache).  Each section should
1474
appear at most once.  The following parameters may be specified.
1475 19 jeremybenn
 
1476
`enabled = 0|1'
1477
     If 1 (true), the data or instruction (as appropriate) cache is
1478 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1479 19 jeremybenn
 
1480
`nsets = VALUE'
1481
     Sets the number of data or instruction (as appropriate) cache sets
1482
     to VALUE, which must be a power of two, not exceeding
1483
     `MAX_DC_SETS' (for the data cache) or `MAX_IC_SETS' (for the
1484 82 jeremybenn
     instruction cache).  At the time of writing, these constants are
1485
     both defined in the code to be 1024).  The default value is 1.
1486 19 jeremybenn
 
1487
`nways = VALUE'
1488
     Sets the number of data or instruction (as appropriate) cache ways
1489
     to VALUE, which must be a power of two, not exceeding
1490
     `MAX_DC_WAYS' (for the data cache) or `MAX_IC_WAYS' (for the
1491 82 jeremybenn
     instruction cache).  At the time of writing, these constants are
1492
     both defined in the code to be 32).  The default value is 1.
1493 19 jeremybenn
 
1494
`blocksize = VALUE'
1495
     The data or instruction (as appropriate) cache block size is set to
1496 82 jeremybenn
     VALUE bytes, which must be either 16 or 32.  The default is 16.
1497 19 jeremybenn
 
1498
`ustates = VALUE'
1499
     The number of instruction usage states for the data or instruction
1500
     (as appropriate) cache is set to VALUE, which must be 2, 3 or 4.
1501
     The default value is 2.
1502
 
1503
`hitdelay = VALUE'
1504 82 jeremybenn
     _Instruction cache only_.  Set the number of cycles an instruction
1505
     cache hit costs.  Default value 1.
1506 19 jeremybenn
 
1507
`missdelay = VALUE'
1508 82 jeremybenn
     _Instruction cache only_.  Set the number of cycles an instruction
1509
     cache miss costs.  Default value 1.
1510 19 jeremybenn
 
1511
`load_hitdelay = VALUE'
1512 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data load cache hit
1513
     costs.  Default value 2.
1514 19 jeremybenn
 
1515
`load_missdelay = VALUE'
1516 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data load cache
1517
     miss costs.  Default value 2.
1518 19 jeremybenn
 
1519
`store_hitdelay = VALUE'
1520 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data store cache hit
1521
     costs.  Default value 0.
1522 19 jeremybenn
 
1523
`store_missdelay = VALUE'
1524 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data store cache
1525
     miss costs.  Default value 0.
1526 19 jeremybenn
 
1527
 
1528

1529
File: or1ksim.info,  Node: Interrupt Configuration,  Next: Power Management Configuration,  Prev: Cache Configuration,  Up: Core OpenRISC Configuration
1530
 
1531
3.3.5 Interrupt Configuration
1532
-----------------------------
1533
 
1534
Programmable Interrupt Controller (PIC) configuration is described in
1535 82 jeremybenn
`section pic'.  This section may appear at most once--Or1ksim has no
1536
mechanism for handling multiple interrupt controllers.  The following
1537 19 jeremybenn
parameters may be specified.
1538
 
1539
`enabled = 0|1'
1540 82 jeremybenn
     If 1 (true), the programmable interrupt controller is enabled.  If
1541
 
1542 19 jeremybenn
 
1543
`edge_trigger = 0|1'
1544
     If 1 (true, the default), the programmable interrupt controller is
1545 82 jeremybenn
     edge triggered.  If 0 (false), it is level triggered.
1546 19 jeremybenn
 
1547
 
1548

1549
File: or1ksim.info,  Node: Power Management Configuration,  Next: Branch Prediction Configuration,  Prev: Interrupt Configuration,  Up: Core OpenRISC Configuration
1550
 
1551
3.3.6 Power Management Configuration
1552
------------------------------------
1553
 
1554 82 jeremybenn
Power management implementation is incomplete.  At present the effect
1555 19 jeremybenn
(which only happens when the power management unit is enabled) of
1556
setting the different bits in the power management Special Purpose
1557
Register (PMR, SPR 0x4000) is
1558
 
1559
`SDF (bit mask 0x0000000f)'
1560
     No effect - these bits are ignored
1561
 
1562
`DME (bit mask 0x00000010)'
1563
`SME (bit mask 0x00000020)'
1564
     Both these bits cause the processor to stop executing
1565 82 jeremybenn
     instructions.  However all other functions (debug interaction, CLI,
1566 19 jeremybenn
     VAPI etc) carry on as normal.
1567
 
1568
`DCGE (bit mask 0x00000004)'
1569
     No effect - this bit is ignored
1570
 
1571
`SUME (bit mask 0x00000008)'
1572
     Enabling this bit causes a message to be printed, advising that the
1573
     processor is suspending and the simulator exits.
1574
 
1575
 
1576
On reset all bits are cleared.
1577
 
1578 82 jeremybenn
Power management configuration is described in `section pm'.  This
1579
section may appear at most once.  The following parameter may be
1580 19 jeremybenn
specified.
1581
 
1582
`enabled = 0|1'
1583 82 jeremybenn
     If 1 (true), power management is enabled.  If 0 (the default), it
1584
     is disabled.
1585 19 jeremybenn
 
1586
 
1587

1588
File: or1ksim.info,  Node: Branch Prediction Configuration,  Next: Debug Interface Configuration,  Prev: Power Management Configuration,  Up: Core OpenRISC Configuration
1589
 
1590
3.3.7 Branch Prediction Configuration
1591
-------------------------------------
1592
 
1593
From examining the code base, it seems the branch prediction function
1594 82 jeremybenn
is not fully implemented.  At present the functionality seems
1595
restricted to collection of statistics.
1596 19 jeremybenn
 
1597 82 jeremybenn
Branch prediction configuration is described in `section bpb'.  This
1598
section may appear at most once.  The following parameters may be
1599 19 jeremybenn
specified.
1600
 
1601
`enabled = 0|1'
1602 82 jeremybenn
     If 1 (true), branch prediction is enabled.  If 0 (the default), it
1603 19 jeremybenn
     is disabled.
1604
 
1605
`btic = 0|1'
1606
     If 1 (true), the branch target instruction cache model is enabled.
1607
     If 0 (the default), it is disabled.
1608
 
1609
`sbp_bf_fwd = 0|1'
1610 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bf' instruction.  If
1611 19 jeremybenn
 
1612
     instruction.
1613
 
1614
`sbp_bnf_fwd = 0|1'
1615 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bnf' instruction.
1616
     If 0 (the default), do not use forward prediction for this
1617 19 jeremybenn
     instruction.
1618
 
1619
`hitdelay = VALUE'
1620 82 jeremybenn
     Set the number of cycles a branch prediction hit costs.  Default
1621 19 jeremybenn
     value 0.
1622
 
1623
`missdelay = VALUE'
1624 82 jeremybenn
     Set the number of cycles a branch prediction miss costs.  Default
1625 19 jeremybenn
     value 0.
1626
 
1627
 
1628

1629
File: or1ksim.info,  Node: Debug Interface Configuration,  Prev: Branch Prediction Configuration,  Up: Core OpenRISC Configuration
1630
 
1631
3.3.8 Debug Interface Configuration
1632
-----------------------------------
1633
 
1634
The debug unit and debug interface configuration is described in
1635 82 jeremybenn
`section debug'.  This section may appear at most once.  The following
1636 19 jeremybenn
parameters may be specified.
1637
 
1638
`enabled = 0|1'
1639 82 jeremybenn
     If 1 (true), the debug unit is enabled.  If 0 (the default), it is
1640 19 jeremybenn
     disabled.
1641
 
1642
          Note: This enables the functionality of the debug unit (its
1643 82 jeremybenn
          registers etc) within the mode.  It does not provide any
1644
          external interface to the debug unit.  For that, see
1645 235 jeremybenn
          `rsp_enabled' below.
1646 19 jeremybenn
 
1647
`rsp_enabled = 0|1'
1648
     If 1 (true), the GDB "Remote Serial Protocol" server is started,
1649
     provding an interface to an external GNU debugger, using the port
1650
     specified in the `rsp_port' field (see below), or the
1651 82 jeremybenn
     `or1ksim-rsp' TCP/IP service.  If 0 (the default), the server is
1652 19 jeremybenn
     not started, and no external interface is provided.
1653
 
1654
     For more detailed information on the interface to the GNU Debugger
1655
     see Embecosm Application Note 2, `Howto: Porting the GNU Debugger
1656
     Practical Experience with the OpenRISC 1000 Architecture', by
1657
     Jeremy Bennett, published by Embecosm Limited (`www.embecosm.com').
1658
 
1659
`rsp_port = VALUE'
1660
     VALUE specifies the port to be used for the GDB "Remote Serial
1661 82 jeremybenn
     Protocol" interface to the GNU Debugger (GDB).  Default value
1662
     51000.  If the value 0 is specified, Or1ksim will instead look for
1663 19 jeremybenn
     a TCP/IP service named `or1ksim-rsp'.
1664
 
1665
          Tip: There is no registered port for Or1ksim "Remote Serial
1666 82 jeremybenn
          Protocol" service `or1ksim-rsp'.  Good practice suggests
1667
          users should adopt port values in the "Dynamic" or "Private"
1668
          port range, i.e.  49152-65535.
1669 19 jeremybenn
 
1670
`vapi_id = VALUE'
1671
     VALUE specifies the value of the Verification API (VAPI) base
1672 82 jeremybenn
     address to be used with the debug unit.  *Note Verification API:
1673 19 jeremybenn
     Verification API, for more details.
1674
 
1675
     If this is specified and VALUE is non-zero, all OpenRISC Remote
1676
     JTAG protocol transactions will be logged to the VAPI log file, if
1677 82 jeremybenn
     enabled.  This is the only functionality associated with VAPI for
1678
     the debug unit.  No VAPI commands are sent, nor requests handled.
1679 19 jeremybenn
 
1680
 
1681

1682
File: or1ksim.info,  Node: Peripheral Configuration,  Prev: Core OpenRISC Configuration,  Up: Configuration
1683
 
1684
3.4 Configuring Memory Mapped Peripherals
1685
=========================================
1686
 
1687 82 jeremybenn
All peripheral components are optional.  If they are specified, then
1688 19 jeremybenn
(unlike other components) by default they are enabled.
1689
 
1690
* Menu:
1691
 
1692
* Memory Controller Configuration::
1693
* UART Configuration::
1694
* DMA Configuration::
1695
* Ethernet Configuration::
1696
* GPIO Configuration::
1697
* Display Interface Configuration::
1698
* Frame Buffer Configuration::
1699
* Keyboard Configuration::
1700
* Disc Interface Configuration::
1701
* Generic Peripheral Configuration::
1702
 
1703

1704
File: or1ksim.info,  Node: Memory Controller Configuration,  Next: UART Configuration,  Up: Peripheral Configuration
1705
 
1706
3.4.1 Memory Controller Configuration
1707
-------------------------------------
1708
 
1709
The memory controller used in Or1ksim is the component implemented at
1710 98 jeremybenn
OpenCores, and found in the top level SVN directory, `mem_ctrl'.  It is
1711 19 jeremybenn
described in the document `Memory Controller IP Core' by Rudolf
1712 82 jeremybenn
Usselmann, which can be found in the `doc' subdirectory.  It is a
1713
memory mapped component, which resides on the main OpenRISC Wishbone
1714
data bus.
1715 19 jeremybenn
 
1716 82 jeremybenn
The memory controller configuration is described in `section mc'.  This
1717 19 jeremybenn
section may appear multiple times, specifying multiple memory
1718 98 jeremybenn
controllers.
1719 19 jeremybenn
 
1720 385 jeremybenn
     Warning: There are known to be problems with the current memory
1721
     controller, which currently is not included in the regression test
1722
     suite. Users are advised not to use the memory controller in the
1723
     current release.
1724 98 jeremybenn
 
1725 385 jeremybenn
     Caution: There is no initialization code in the standard "newlib"
1726
     library.
1727
 
1728
     The standard "uClibc" library assumes a memory controller mapped
1729
     at 0x93000000 and will initialize the memory controller to expect
1730
     64MB memory blocks, and any memory declarations _must_ reflect
1731
     this.
1732
 
1733 98 jeremybenn
     If smaller memory blocks are declared with a memory controller,
1734
     then sufficient memory will not be allocated by Or1ksim, but out of
1735 346 jeremybenn
     range memory accesses will not be trapped.  For example declaring a
1736 98 jeremybenn
     memory section from 0-4MB with a memory controller enabled would
1737
     mean that accesses between 4MB and 64MB would be permitted, but
1738
     having no allocated memory would likely cause a segmentation fault.
1739
 
1740
     If the user is determined to use smaller memories with the memory
1741
     controller, then custom initialization code must be provided, to
1742
     ensure the memory controller traps out-of-memory accesses.
1743
 
1744
The following parameters may be specified.
1745
 
1746 19 jeremybenn
`enabled = 0|1'
1747 82 jeremybenn
     If 1 (true, the default), this memory controller is enabled.  If
1748
     0, it is disabled.
1749 19 jeremybenn
 
1750
          Note: The memory controller can effectively also be disabled
1751
          by setting an appropriate power on control register value
1752 82 jeremybenn
          (see below).  However this should only be used if it is
1753 19 jeremybenn
          desired to specifically model this behavior of the memory
1754
          controller, not as a way of disabling the memory controller
1755
          in general.
1756
 
1757
`baseaddr = VALUE'
1758
     Set the base address of the memory controller's memory mapped
1759 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
1760 19 jeremybenn
     sensible value.
1761
 
1762
     The memory controller has a 7 bit address bus, with a total of 19
1763
     32-bit registers, at addresses 0x00 through 0x4c (address 0x0c and
1764
     addresses 0x50 through 0x7c are not used).
1765
 
1766
`poc = VALUE'
1767
     Specifies the value of the power on control register, The least
1768
     signficant two bits specify the bus width (use 0 for an 8-bit bus,
1769
     1 for a 16-bit bus and 2 for a 32-bit bus) and the next two bits
1770
     the type of memory connected (use 0 for a disabled interface, 1
1771
     for SSRAM, 2 for asyncrhonous devices and 3 for synchronous
1772
     devices).
1773
 
1774
     If other bits are specified, they are ignored with a warning.
1775
 
1776
          Caution: The default value, 0, corresponds to a disabled
1777
          8-bit bus, and is likely not the most suitable value
1778
 
1779
`index = VALUE'
1780
     Specify the index of this memory controller amongst all the memory
1781 82 jeremybenn
     controllers.  This value should be unique for each memory
1782 19 jeremybenn
     controller, and is used to associate specific memories with the
1783
     controller, through the `mc' field in the `section memory'
1784
     configuration (*note Memory Configuration: Memory Configuration.).
1785
 
1786
     The default value, 0, is suitable when there is only one memory
1787
     controller.
1788
 
1789
 
1790

1791
File: or1ksim.info,  Node: UART Configuration,  Next: DMA Configuration,  Prev: Memory Controller Configuration,  Up: Peripheral Configuration
1792
 
1793
3.4.2 UART Configuration
1794
------------------------
1795
 
1796
The UART implemented in Or1ksim follows the specification of the
1797 82 jeremybenn
National Semiconductor 16450 and 16550 parts.  It is a memory mapped
1798 19 jeremybenn
component, which resides on the main OpenRISC Wishbone data bus.
1799
 
1800
The component provides a number of interfaces to emulate the behavior
1801
of an external terminal connected to the UART.
1802
 
1803 82 jeremybenn
UART configuration is described in `section uart'.  This section may
1804
appear multiple times, specifying multiple UARTs.  The following
1805 19 jeremybenn
parameters may be specified.
1806
 
1807
`enabled = 0|1'
1808 82 jeremybenn
     If 1 (true, the default), this UART is enabled.  If 0, it is
1809 19 jeremybenn
     disabled.
1810
 
1811
`baseaddr = VALUE'
1812
     Set the base address of the UART's memory mapped registers to
1813 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1814 19 jeremybenn
 
1815
     The UART has a 3 bit address bus, with a total of 8 8-bit
1816
     registers, at addresses 0x0 through 0x7.
1817
 
1818
`channel = "TYPE:ARGS"'
1819
     Specify the channel representing the terminal connected to the UART
1820
     Rx & Tx pins.
1821
 
1822
    `channel="file:`rxfile',`txfile'"'
1823
          Read input characters from the file `rxfile' and write output
1824
          characters to the file `txfile' (which will be created if
1825
          required).
1826
 
1827
    `channel="xterm:ARGS"'
1828
          Create an xterm on startup, write UART Tx traffic to the
1829
          xterm and take Rx traffic from the keyboard when the xterm
1830 82 jeremybenn
          window is selected.  Additional arguments to the xterm
1831
          command (for example specifying window size may be specified
1832
          in ARGS, or this may be left blank.
1833 19 jeremybenn
 
1834
    `channel="tcp:VALUE"'
1835
          Open the TCP/IP port specified by VALUE and read and write
1836
          UART traffic from and to it.
1837
 
1838
          Typically a telnet session is connected to the other end of
1839
          this port.
1840
 
1841
               Tip: There is no registered port for Or1ksim telnet UART
1842 82 jeremybenn
               connection.  Priviledged access is required to read
1843 19 jeremybenn
               traffic on the registered "well-known" telnet port (23).
1844 346 jeremybenn
               Instead users should use port values in the "Dynamic" or
1845
               "Private" port range, i.e.  49152-65535.
1846 19 jeremybenn
 
1847
    `channel="fd:`rxfd',`txfd'"'
1848
          Read and write characters from and to the existing open
1849
          numerical file descriptors, file `rxfd' and `txfd'.
1850
 
1851
    `channel="tty:device=/dev/ttyS0,baud=9600"'
1852
          Read and write characters from and to a physical serial port.
1853 346 jeremybenn
          The precise device (shown here as `/dev/ttyS0') may vary from
1854
          machine to machine.
1855 19 jeremybenn
 
1856
 
1857
     The default value for this field is `"xterm:"'.
1858
 
1859
`irq = VALUE'
1860 82 jeremybenn
     Use VALUE as the IRQ number of this UART.  Default value 0.
1861 19 jeremybenn
 
1862
`16550 = 0|1'
1863 82 jeremybenn
     If 1 (true), the UART has the functionality of a 16550.  If 0 (the
1864
     default), it has the functionality of a 16450.  The principal
1865 19 jeremybenn
     difference is that the 16550 can buffer multiple characters.
1866
 
1867
`jitter = VALUE'
1868
     Set the jitter, modeled as a time to block, to VALUE milliseconds.
1869 82 jeremybenn
     Set to -1 to disable jitter modeling.  Default value 0.
1870 19 jeremybenn
 
1871
          Note: This functionality has yet to be implemented, so this
1872
          parameter has no effect.
1873
 
1874
`vapi_id = VALUE'
1875
     VALUE specifies the value of the Verification API (VAPI) base
1876 82 jeremybenn
     address to be used with the UART.  *Note Verification API:
1877 19 jeremybenn
     Verification API, for more details, which details the use of the
1878
     VAPI with the UART.
1879
 
1880
 
1881

1882
File: or1ksim.info,  Node: DMA Configuration,  Next: Ethernet Configuration,  Prev: UART Configuration,  Up: Peripheral Configuration
1883
 
1884
3.4.3 DMA Configuration
1885
-----------------------
1886
 
1887
The DMA controller used in Or1ksim is the component implemented at
1888 98 jeremybenn
OpenCores, and found in the top level SVN directory, `wb_dma'.  It is
1889 19 jeremybenn
described in the document `Wishbone DMA/Bridge IP Core' by Rudolf
1890 82 jeremybenn
Usselmann, which can be found in the `doc' subdirectory.  It is a
1891
memory mapped component, which resides on the main OpenRISC Wishbone
1892
data bus.  The present implementation is incomplete, intended only to
1893
support the Ethernet interface (*note Ethernet Configuration::),
1894
although the Ethernet interface is not yet completed.
1895 19 jeremybenn
 
1896 82 jeremybenn
DMA configuration is described in `section dma'.  This section may
1897
appear multiple times, specifying multiple DMA controllers.  The
1898 19 jeremybenn
following parameters may be specified.
1899
 
1900
`enabled = 0|1'
1901 82 jeremybenn
     If 1 (true, the default), this DMA controller is enabled.  If 0,
1902
     it is disabled.
1903 19 jeremybenn
 
1904
`baseaddr = VALUE'
1905
     Set the base address of the DMA's memory mapped registers to
1906 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1907 19 jeremybenn
 
1908
     The DMA controller has a 10 bit address bus, with a total of 253
1909 82 jeremybenn
     32-bit registers.  The first 5 registers at addresses 0x000 through
1910
     0x010 control the overall behavior of the DMA controller.  There
1911
     are then 31 blocks of 8 registers, controlling each of the 31 DMA
1912
     channels available.  Addresses 0x014 through 0x01c are not used.
1913 19 jeremybenn
 
1914
`irq = VALUE'
1915 82 jeremybenn
     Use VALUE as the IRQ number of this DMA controller.  Default value
1916 19 jeremybenn
     0.
1917
 
1918
`vapi_id = VALUE'
1919
     VALUE specifies the value of the Verification API (VAPI) base
1920 82 jeremybenn
     address to be used with the DMA controller.  *Note Verification
1921 19 jeremybenn
     API: Verification API, for more details, which details the use of
1922
     the VAPI with the DMA controller.
1923
 
1924
 
1925

1926
File: or1ksim.info,  Node: Ethernet Configuration,  Next: GPIO Configuration,  Prev: DMA Configuration,  Up: Peripheral Configuration
1927
 
1928
3.4.4 Ethernet Configuration
1929
----------------------------
1930
 
1931
The Ethernet MAC used in Or1ksim is the component implemented at
1932 98 jeremybenn
OpenCores, and found in the top level SVN directory, `ethmac'.  It also
1933
forms part of the OpenRISC SoC, ORPSoC.  It is described in the
1934 19 jeremybenn
document `Ethernet IP Core Specification' by Igor Mohor, which can be
1935 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
1936
which resides on the main OpenRISC Wishbone data bus.
1937 19 jeremybenn
 
1938 82 jeremybenn
Ethernet configuration is described in `section ethernet'.  This
1939
section may appear multiple times, specifying multiple Ethernet
1940
interfaces.  The following parameters may be specified.
1941 19 jeremybenn
 
1942
`enabled = 0|1'
1943 82 jeremybenn
     If 1 (true, the default), this Ethernet MAC is enabled.  If 0, it
1944
     is disabled.
1945 19 jeremybenn
 
1946
`baseaddr = VALUE'
1947
     Set the base address of the MAC's memory mapped registers to
1948 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1949 19 jeremybenn
 
1950
     The Ethernet MAC has a 7-bit address bus, with a total of 21
1951 82 jeremybenn
     32-bit registers.  Addresses 0x54 through 0x7c are not used.
1952 19 jeremybenn
 
1953
          Note: The Ethernet specification describes a Tx control
1954 82 jeremybenn
          register, `TXCTRL', at address 0x50.  However this register
1955
          is not implemented in the Or1ksim model.
1956 19 jeremybenn
 
1957
`dma = VALUE'
1958
     VALUE specifies the DMA controller with which this Ethernet is
1959 82 jeremybenn
     associated.  The default value is 0.
1960 19 jeremybenn
 
1961
          Note: Support for external DMA is not provided in the current
1962 82 jeremybenn
          implementation, and this value is ignored.  In any case there
1963 19 jeremybenn
          is no equivalent field to which this can be matched in the
1964
          current DMA component implementation (*note DMA
1965
          Configuration: DMA Configuration.).
1966
 
1967
`irq = VALUE'
1968 82 jeremybenn
     Use VALUE as the IRQ number of this Ethernet MAC.  Default value 0.
1969 19 jeremybenn
 
1970
`rtx_type = 0|1'
1971
     If 1 (true) use a socket interface to the Ethernet (see parameter
1972 82 jeremybenn
     `sockif' below).  If 0 (the default), use a file interface,
1973
     reading and writing from and to the files specified in the
1974
     `rxfile' and `txfile' parameters (see below).
1975 19 jeremybenn
 
1976
          Note: By default the socket interface is not provided in
1977 82 jeremybenn
          Or1ksim.  If it is required, this must be requested when
1978 19 jeremybenn
          configuring, by use of the `--enable-ethphy' option to
1979
          `configure'.
1980
 
1981
               configure --target=or32-uclinux --enable-ethphy ...
1982
 
1983
`rx_channel = RXVALUE'
1984
`tx_channel = TXVALUE'
1985
     RXVALUE specifies the DMA channel to use for receive and TXVALUE
1986 82 jeremybenn
     the DMA channel to use for transmit.  Both default to 0.
1987 19 jeremybenn
 
1988
          Note: As noted above, support for external DMA is not
1989
          provided in the current implementation, and so these values
1990
          are ignored.
1991
 
1992
`rxfile = "RXFILE"'
1993
`txfile = "TXFILE"'
1994
     When `rtx_type' is 0 (see above), RXFILE specifies the file to use
1995
     as input and TXFILE specifies the fie to use as output.
1996
 
1997 82 jeremybenn
     The file contains a sequence of packets.  Each packet consists of a
1998
     packet length (32 bits), followed by that many bytes of data.
1999
     Once the input file is empty, the Ethernet MAC behaves as though
2000
     there were no data on the Ethernet.  The default values of these
2001 19 jeremybenn
     parameters are `"eth_rx"' and `"eth_tx"' respectively.
2002
 
2003 82 jeremybenn
     The input file must exist and be readable.  The output file must be
2004
     writable and will be created if necessary.  If either of these
2005 19 jeremybenn
     conditions is not met, a warning will be given.
2006
 
2007
`sockif = "SERVICE"'
2008
     When `rtx_type' is 1 (see above), SERVICE specifies the service to
2009 82 jeremybenn
     use for communication.  This may be TCP/IP or UDP/IP.  The default
2010 19 jeremybenn
     value of this parameter is `"or1ksim_eth"'.
2011
 
2012
`vapi_id = VALUE'
2013
     VALUE specifies the value of the Verification API (VAPI) base
2014 82 jeremybenn
     address to be used with the Ethernet PHY.  *Note Verification API:
2015 19 jeremybenn
     Verification API, for more details, which details the use of the
2016
     VAPI with the DMA controller.
2017
 
2018
 
2019

2020
File: or1ksim.info,  Node: GPIO Configuration,  Next: Display Interface Configuration,  Prev: Ethernet Configuration,  Up: Peripheral Configuration
2021
 
2022
3.4.5 GPIO Configuration
2023
------------------------
2024
 
2025
The GPIO used in Or1ksim is the component implemented at OpenCores, and
2026 98 jeremybenn
found in the top level SVN directory, `gpio'.  It is described in the
2027 19 jeremybenn
document `GPIO IP Core Specification' by Damjan Lampret and Goran
2028 82 jeremybenn
Djakovic, which can be found in the `doc' subdirectory.  It is a memory
2029 19 jeremybenn
mapped component, which resides on the main OpenRISC Wishbone data bus.
2030
 
2031 82 jeremybenn
GPIO configuration is described in `section gpio'.  This section may
2032
appear multiple times, specifying multiple GPIO devices.  The following
2033 19 jeremybenn
parameters may be specified.
2034
 
2035
`enabled = 0|1'
2036 82 jeremybenn
     If 1 (true, the default), this GPIO is enabled.  If 0, it is
2037 19 jeremybenn
     disabled.
2038
 
2039
`baseaddr = VALUE'
2040
     Set the base address of the GPIO's memory mapped registers to
2041 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2042 19 jeremybenn
 
2043
     The GPIO has a 6 bit address bus, with a total of 10 32-bit
2044
     registers, although the number of bits that are actively used
2045 82 jeremybenn
     varies.  Addresses 0x28 through 0x3c are not used.
2046 19 jeremybenn
 
2047
`irq = VALUE'
2048 82 jeremybenn
     Use VALUE as the IRQ number of this GPIO.  Default value 0.
2049 19 jeremybenn
 
2050
`vapi_id = VALUE'
2051
     VALUE specifies the value of the Verification API (VAPI) base
2052 82 jeremybenn
     address to be used with the GPIO.  *Note Verification API:
2053 19 jeremybenn
     Verification API, for more details, which details the use of the
2054 82 jeremybenn
     VAPI with the GPIO controller.  For backwards compatibility, the
2055 19 jeremybenn
     alternative name `base_vapi_id' is supported for this parameter,
2056
     but deprecated.
2057
 
2058
 
2059

2060
File: or1ksim.info,  Node: Display Interface Configuration,  Next: Frame Buffer Configuration,  Prev: GPIO Configuration,  Up: Peripheral Configuration
2061
 
2062
3.4.6 Display Interface Configuration
2063
-------------------------------------
2064
 
2065
Or1ksim models a VGA interface to an external monitor.  The VGA
2066
controller used in Or1ksim is the component implemented at OpenCores,
2067 98 jeremybenn
and found in the top level SVN directory, `vga_lcd', with no support
2068 82 jeremybenn
for the optional hardware cursors.  It is described in the document
2069 19 jeremybenn
`VGA/LCD Core v2.0 Specifications' by Richard Herveille, which can be
2070 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
2071
which resides on the main OpenRISC Wishbone data bus.
2072 19 jeremybenn
 
2073
The current implementation provides only functionality to dump the
2074
screen to a file at intervals.
2075
 
2076 82 jeremybenn
VGA controller configuration is described in `section vga'.  This
2077 19 jeremybenn
section may appear multiple times, specifying multiple VGA controllers.
2078
The following parameters may be specified.
2079
 
2080
`enabled = 0|1'
2081 82 jeremybenn
     If 1 (true, the default), this VGA is enabled.  If 0, it is
2082 19 jeremybenn
     disabled.
2083
 
2084
`baseaddr = VALUE'
2085
     Set the base address of the VGA controller's memory mapped
2086 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2087 19 jeremybenn
     sensible value.
2088
 
2089
     The VGA controller has a 12-bit address bus, with 7 32-bit
2090
     registers, at addresses 0x000 through 0x018, and two color lookup
2091 82 jeremybenn
     tables at addresses 0x800 through 0xfff.  The hardware cursor
2092 19 jeremybenn
     registers are not implemented, so addresses 0x01c through 0x7fc
2093
     are not used.
2094
 
2095
`irq = VALUE'
2096 82 jeremybenn
     Use VALUE as the IRQ number of this VGA controller.  Default value
2097 19 jeremybenn
     0.
2098
 
2099
`refresh_rate = VALUE'
2100 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2101 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2102
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2103
     50 times per simulated second.
2104
 
2105
`txfile = "FILE"'
2106
     FILE specifies the base of the filename for screen dumps.
2107
     Successive screen dumps will be in BMP format, in files with the
2108
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2109 82 jeremybenn
     screen dumps starting at zero.  The default value is `"vga_out"'.
2110 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2111
     supported for this parameter, but deprecated.
2112
 
2113
 
2114

2115
File: or1ksim.info,  Node: Frame Buffer Configuration,  Next: Keyboard Configuration,  Prev: Display Interface Configuration,  Up: Peripheral Configuration
2116
 
2117
3.4.7 Frame Buffer Configuration
2118
--------------------------------
2119
 
2120 82 jeremybenn
     Caution: The frame buffer is only partially implemented.  Its
2121 19 jeremybenn
     configuration fields are described here, but the component should
2122 82 jeremybenn
     not be used at this time.  Like the VGA controller, it is designed
2123 19 jeremybenn
     to make screen dumps to file.
2124
 
2125 82 jeremybenn
Frame buffer configuration is described in `section fb'.  This section
2126
may appear multiple times, specifying multiple frame buffers.  The
2127 19 jeremybenn
following parameters may be specified.
2128
 
2129
`enabled = 0|1'
2130 82 jeremybenn
     If 1 (true, the default), this frame buffer is enabled.  If 0, it
2131 19 jeremybenn
     is disabled.
2132
 
2133
`baseaddr = VALUE'
2134
     Set the base address of the frame buffer's memory mapped registers
2135 82 jeremybenn
     to VALUE.  The default is 0, which is probably not a sensible
2136
     value.
2137 19 jeremybenn
 
2138
     The frame buffer has an 121-bit address bus, with 4 32-bit
2139
     registers, at addresses 0x000 through 0x00c, and a PAL lookup
2140 82 jeremybenn
     table at addresses 0x400 through 0x4ff.  Addresses 0x010 through
2141 19 jeremybenn
     0x3fc and addresses 0x500 through 0x7ff are not used.
2142
 
2143
`refresh_rate = VALUE'
2144 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2145 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2146
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2147
     50 times per simulated second.
2148
 
2149
`txfile = "FILE"'
2150
     FILE specifies the base of the filename for screen dumps.
2151
     Successive screen dumps will be in BMP format, in files with the
2152
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2153 82 jeremybenn
     screen dumps starting at zero.  The default value is `"fb_out"'.
2154 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2155
     supported for this parameter, but deprecated.
2156
 
2157
 
2158

2159
File: or1ksim.info,  Node: Keyboard Configuration,  Next: Disc Interface Configuration,  Prev: Frame Buffer Configuration,  Up: Peripheral Configuration
2160
 
2161
3.4.8 Keyboard Configuration (PS2)
2162
----------------------------------
2163
 
2164 82 jeremybenn
The PS2 interface provided by Or1ksim is not documented.  It may be
2165 98 jeremybenn
based on the PS2 project at OpenCores, and found in the top level SVN
2166 82 jeremybenn
directory, `ps2'.  However this project lacks any documentation beyond
2167
its project webpage.  Since most PS2 interfaces follow the Intel i8042
2168 19 jeremybenn
standard, this is presumably what is expected with this device.
2169
 
2170
The implementation only provides for keyboard support, which is
2171 82 jeremybenn
modelled as a file of keystrokes.  There is no mouse support.
2172 19 jeremybenn
 
2173
     Caution: A standard i8042 device has two registers at addresses
2174 82 jeremybenn
     0x60 (command) and 0x64 (status).  Inspection of the code,
2175
     suggests that the Or1ksim component places these registers at
2176
     addresses 0x00 and 0x04.
2177 19 jeremybenn
 
2178
     The port of Linux for the OpenRISC 1000, which runs on Or1ksim
2179
     implements the i8042 device driver, anticipating these registers
2180 82 jeremybenn
     reside at their conventional address.  It seems unlikel that this
2181 19 jeremybenn
     code will work.
2182
 
2183
     This component should be used with caution.
2184
 
2185 82 jeremybenn
Keyboard configuration is described in `section kbd'.  This section may
2186
appear multiple times, specifying multiple keyboard interfaces.  The
2187 19 jeremybenn
following parameters may be specified.
2188
 
2189
`enabled = 0|1'
2190 82 jeremybenn
     If 1 (true, the default), this keyboard is enabled.  If 0, it is
2191 19 jeremybenn
     disabled.
2192
 
2193
`baseaddr = VALUE'
2194
     Set the base address of the keyboard's memory mapped registers to
2195 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2196 19 jeremybenn
 
2197
     The keyboard PS/2 interface has an 3-bit address bus, with 2 8-bit
2198
     registers, at addresses 0x000 and 0x004.
2199
 
2200
          Caution: As noted above, a standard Intel 8042 interface
2201
          would expect to find these registers at locations 0x60 and
2202
          0x64, thus requiring at least a 7-bit bus.
2203
 
2204
`irq = VALUE'
2205 82 jeremybenn
     Use VALUE as the IRQ number of this Keyboard interface.  Default
2206 19 jeremybenn
     value 0.
2207
 
2208
`rxfile = "FILE"'
2209
     `file' specifies a file containing raw key stroke data, which
2210 82 jeremybenn
     models the input from a physical keyboard.  The default value is
2211 19 jeremybenn
     `"kbd_in"'.
2212
 
2213
 
2214

2215
File: or1ksim.info,  Node: Disc Interface Configuration,  Next: Generic Peripheral Configuration,  Prev: Keyboard Configuration,  Up: Peripheral Configuration
2216
 
2217
3.4.9 Disc Interface Configuration
2218
----------------------------------
2219
 
2220
The ATA/ATAPI disc controller used in Or1ksim is the OCIDEC (OpenCores
2221
IDE Controller) component implemented at OpenCores, and found in the
2222 98 jeremybenn
top level SVN directory, `ata'.  It is described in the document
2223 19 jeremybenn
`ATA/ATAPI-5 Core Specification' by Richard Herveille, which can be
2224 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
2225
which resides on the main OpenRISC Wishbone data bus.
2226 19 jeremybenn
 
2227 385 jeremybenn
     Warning: In the current release of Or1ksim, parsing of the ATA
2228
     section is broken. Users should not configure the disc interface
2229
     in this release.
2230
 
2231 82 jeremybenn
ATA/ATAPI configuration is described in `section ata'.  This section
2232
may appear multiple times, specifying multiple disc controllers.  The
2233 19 jeremybenn
following parameters may be specified.
2234
 
2235
`enabled = 0|1'
2236 82 jeremybenn
     If 1 (true, the default), this ATA/ATAPI interface is enabled.  If
2237 19 jeremybenn
     0, it is disabled.
2238
 
2239
`baseaddr = VALUE'
2240
     Set the base address of the ATA/ATAPI interface's memory mapped
2241 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2242 19 jeremybenn
     sensible value.
2243
 
2244
     The ATA/ATAPI PS/2 interface has an 5-bit address bus, with 8
2245 82 jeremybenn
     32-bit registers.  Depending on the version of the OCIDEC
2246
     ATA/ATAPI interface selected (see `dev_id' below), not all
2247
     registers will be available.
2248 19 jeremybenn
 
2249
`irq = VALUE'
2250 82 jeremybenn
     Use VALUE as the IRQ number of this ATA/ATAPI interface.  Default
2251 19 jeremybenn
     value 0.
2252
 
2253
`dev_id = 1|2|3'
2254
     This parameter specifies which version of the OCIDEC ATA/ATAPI
2255 82 jeremybenn
     interface to model.  The default value is 1.
2256 19 jeremybenn
 
2257
     Version 1 supports only the `CTRL', `STAT' and `PCTR' registers.
2258
     Versions 2 & 3 add the `FCTR' registers, Version 3 adds the `DTR'
2259
     registers and the `RXD'/`TXD' registers.
2260
 
2261
`rev = VALUE'
2262
     Set the VALUE as the revision of the OCIDEC ATA/ATAPI interface.
2263 82 jeremybenn
     The default value is 1.  The default value is 0.  Its value should
2264
     be in the range 0-15.  Larger values are truncated with a warning.
2265 346 jeremybenn
     This only affects the reset value of the `STAT' register, where it
2266
     forms bits 24-27.
2267 19 jeremybenn
 
2268
`pio_mode0_t1 = VALUE'
2269
`pio_mode0_t2 = VALUE'
2270
`pio_mode0_t4 = VALUE'
2271
`pio_mode0_teoc = VALUE'
2272
     These parameters specify the timings for use with Programmed
2273 82 jeremybenn
     Input/Output (PIO) transfers.  They are specified as the number of
2274 19 jeremybenn
     clock cycles - 2, rounded up to the next highest integer, or zero
2275 82 jeremybenn
     if that would be negative.  The values should not exceed 255.  If
2276 19 jeremybenn
     they do, they will be ignored with a warning.
2277
 
2278
     See the ATA/ATAPI-5 specification for explanations of each of these
2279 82 jeremybenn
     timing parameters.  The default values are:
2280 19 jeremybenn
 
2281
          pio_mode0_t1   =  6
2282
          pio_mode0_t2   = 28
2283
          pio_mode0_t4   =  2
2284
          pio_mode0_teoc = 23
2285
 
2286
`dma_mode0_tm = VALUE'
2287
`dma_mode0_td = VALUE'
2288
`dma_mode0_teoc = VALUE'
2289
     These parameters specify the timings for use with DMA transfers.
2290
     They are specified as the number of clock cycles - 2, rounded up
2291
     to the next highest integer, or zero if that would be negative.
2292 82 jeremybenn
     The values should not exceed 255.  If they do, they will be
2293
     ignored with a warning.
2294 19 jeremybenn
 
2295
     See the ATA/ATAPI-5 specification for explanations of each of these
2296 82 jeremybenn
     timing parameters.  The default values are:
2297 19 jeremybenn
 
2298
          dma_mode0_tm   =  4
2299
          dma_mode0_td   = 21
2300
          dma_mode0_teoc = 21
2301
 
2302
 
2303
3.4.9.1 ATA/ATAPI Device Configuration
2304
......................................
2305
 
2306 82 jeremybenn
Within the `section ata', each device is specified separately.  The
2307 19 jeremybenn
device subsection is introduced by
2308
 
2309
     device VALUE
2310
 
2311 82 jeremybenn
VALUE is the device number, which should be 0 or 1.  The subsection
2312
ends with `enddevice'.  Note that if the same device number is
2313
specified more than once, the previous values will be overwritten.
2314
Within the `device' subsection, the following parameters may appear:
2315 19 jeremybenn
 
2316
`type = VALUE'
2317
     VALUEspecifies the type of device: 0 (the default) for "not
2318
     connected", 1 for hard disk simulated in a file and 2 for local
2319
     system hard disk.
2320
 
2321
`file = "FILENAME"'
2322
     `filename' specifies the file to be used for a simulated ATA
2323 82 jeremybenn
     device if the file type (see `type' above) is 1.  Default value
2324 346 jeremybenn
     `"ata_fileN"', where N is the device number.
2325 19 jeremybenn
 
2326
`size = VALUE'
2327
     VALUE specifies the size of a simulated ATA device if the file
2328 82 jeremybenn
     type (see `type' above) is 1.  The default value is zero.
2329 19 jeremybenn
 
2330
`packet = 0|1'
2331 82 jeremybenn
     If 1 (true), implement the PACKET command feature set.  If 0 (the
2332 19 jeremybenn
     default), do not implement the PACKET command feature set.
2333
 
2334
`firmware = "STR"'
2335
     Firmware to report in response to the "Identify Device" command.
2336
     Default `"02207031"'.
2337
 
2338
`heads = VALUE'
2339 82 jeremybenn
     Number of heads in the device.  Default 7, use -1 to disable all
2340 19 jeremybenn
     heads.
2341
 
2342
`sectors = VALUE'
2343 82 jeremybenn
     Number of sectors per track in the device.  Default 32.
2344 19 jeremybenn
 
2345
`mwdma = 0|1|2|-1'
2346 82 jeremybenn
     Highest multi-word DMA mode supported.  Default 2, use -1 to
2347 19 jeremybenn
     disable.
2348
 
2349
`pio = 0|1|2|3|4'
2350 82 jeremybenn
     Highest PIO mode supported.  Default 4.
2351 19 jeremybenn
 
2352
 
2353

2354
File: or1ksim.info,  Node: Generic Peripheral Configuration,  Prev: Disc Interface Configuration,  Up: Peripheral Configuration
2355
 
2356
3.4.10 Generic Peripheral Configuration
2357
---------------------------------------
2358
 
2359
When used as a library (*note Simulator Library: Simulator Library.),
2360
Or1ksim makes provision for any additional peripheral to be implemented
2361 82 jeremybenn
externally.  Any read or write access to this peripheral's memory map
2362
generates "upcall"s to an external handler.  This interface can support
2363 19 jeremybenn
either C or C++, and was particularly designed to facilitate support
2364
for OSCI SystemC (see `http://www.systemc.org').
2365
 
2366
Generic peripheral configuration is described in `section generic'.
2367
This section may appear multiple times, specifying multiple external
2368 82 jeremybenn
peripherals.  The following parameters may be specified.
2369 19 jeremybenn
 
2370
`enabled = 0|1'
2371 82 jeremybenn
     If 1 (true, the default), this ATA/ATAPI interface is enabled.  If
2372 19 jeremybenn
     0, it is disabled.
2373
 
2374
`baseaddr = VALUE'
2375
     Set the base address of the generic peripheral's memory mapped
2376 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2377 19 jeremybenn
     sensible value.
2378
 
2379
     The size of the memory mapped register space is controlled by the
2380
     `size' paramter, described below.
2381
 
2382
`size = VALUE'
2383
     Set the size of the generic peripheral's memory mapped register
2384 82 jeremybenn
     space to VALUE bytes.  Any read or write accesses to addresses with
2385 19 jeremybenn
     offsets of 0 to VALUE-1 bytes from the base address specified in
2386
     parameter `baseaddr' (see above) will be directed to the external
2387
     interface.
2388
 
2389 82 jeremybenn
     VALUE will be rounded up the nearest power of 2.  It's default
2390
     value is zero.  If VALUE is not an exact power of two, accesses to
2391 19 jeremybenn
     address offsets of VALUE or above up to the next power of 2 will
2392
     generate a warning, and have no effect (reads will return zero).
2393
 
2394
`name = "STR"'
2395 82 jeremybenn
     This gives the peripheral the name `"STR"'.  This is used to
2396 19 jeremybenn
     identify the peripheral in error messages and warnings, and when
2397 82 jeremybenn
     reporting its status.  The default value is
2398 19 jeremybenn
     `"anonymous external peripheral"'.
2399
 
2400
`byte_enabled = 0|1'
2401
`hw_enabled = 0|1'
2402
`word_enabled = 0|1'
2403
     If 1 (true, the default), these parameters respectively enable the
2404 82 jeremybenn
     device for byte wide, half-word wide and word wide accesses.  If 0,
2405 19 jeremybenn
     accesses of that width will fail.
2406
 
2407
 
2408

2409
File: or1ksim.info,  Node: Interactive Command Line,  Next: Verification API,  Prev: Configuration,  Up: Top
2410
 
2411
4 Interactive Command Line
2412
**************************
2413
 
2414
If started with the `-f' flag, or if interrupted with `ctrl-C', Or1ksim
2415 82 jeremybenn
provides the user with an interactive command line.  The commands
2416 19 jeremybenn
available, which may not be abbreviated, are:
2417
 
2418
`q'
2419
     Exit the simulator
2420
 
2421
`r'
2422 82 jeremybenn
     Display all the General Purpose Registers (GPRs).  Also shows the
2423 19 jeremybenn
     just executed and next to be executed instructions symbolically
2424
     and the state of the flag in the Supervision Register.
2425
 
2426
`t'
2427
     Execute the next instruction and then display register/instruction
2428
     information as with the `r' command (see above).
2429
 
2430
`run NUM [ hush ]'
2431 82 jeremybenn
     Execute NUM instructions.  The register/instruction information is
2432 19 jeremybenn
     displayed after each instruction, as with the `r' command (see
2433
     above) _unless_ `hush' is specified.
2434
 
2435
`pr REG VALUE'
2436
     Patch register REG with VALUE.
2437
 
2438
`dm FROMADDR [ TOADDR ]'
2439 82 jeremybenn
     Display memory bytes between FROMADDR and TOADDR.  If TOADDR is
2440
     not given, 64 bytes are displayed, starting at FROMADDR.
2441 19 jeremybenn
 
2442
          Caution: The output from this command is broken (a bug).
2443 82 jeremybenn
          Or1ksim attempts to print out 16 bytes per row.  However,
2444 19 jeremybenn
          instead of printing out the address at the start of each row,
2445
          it prints the address (of the first of the 16 bytes) before
2446
          _each_ byte.
2447
 
2448
`de FROMADDR [ TOADDR ]'
2449 82 jeremybenn
     Disassemble code between FROMADDR and TOADDR.  If TOADDR is not
2450 19 jeremybenn
     given, 16 instructions are disassembled.
2451
 
2452
     The disassembly is entirely numerical, and gives no symbolic
2453
     information.
2454
 
2455
`pm ADDR VALUE'
2456
     Patch the 4 bytes in memory starting at ADDR with the 32-bit VALUE.
2457
 
2458
`pc VALUE'
2459
     Patch the program counter with VALUE.
2460
 
2461
`cm FROMADDR TOADDR SIZE'
2462
     Copy SIZE bytes in memory from FROMADDR to TOADDR.
2463
 
2464
`break ADDR'
2465
     Toggle the breakpoint set at ADDR.
2466
 
2467
`breaks'
2468
     List all set breakpoints
2469
 
2470
`reset'
2471 82 jeremybenn
     Reset the simulator.  Includes modeling a reset of the processor,
2472
     so execution will restart from the reset vector location, 0x100.
2473 19 jeremybenn
 
2474
`hist'
2475
     If saving the execution history has been configured (*note
2476
     Simulator Behavior: Simulator Behavior.), display the execution
2477
     history.
2478
 
2479
`stall'
2480
     Stall the processor, so that control is passed to the debug unit.
2481 82 jeremybenn
     When stalled, the processor can execute no instructions.  This
2482 19 jeremybenn
     command is useful when debugging the JTAG interface, used by
2483
     debuggers such as GDB.
2484
 
2485
`unstall'
2486 82 jeremybenn
     Unstall the processor, so that normal execution can continue.
2487
     This command is useful when debugging the JTAG interface, used by
2488 19 jeremybenn
     debuggers such as GDB.
2489
 
2490
`stats CATEGORY | clear'
2491
     Print the statistics for the given CATEGORY, if available, or
2492 82 jeremybenn
     clear if `clear' is specified.  The categories are:
2493 19 jeremybenn
 
2494
    1
2495
          Miscellaneous statistics: branch predictions (if branch
2496
          predictions are enabled), branch target cache model (if
2497
          enabled), cache (if enbaled), MMU (if enabled) and number of
2498
          addtional load & store cycles.
2499
 
2500
          *Note Configuring the OpenRisc Achitectural Components: Core
2501
          OpenRISC Configuration, for details of how to enable these
2502
          various features.
2503
 
2504
    2
2505 82 jeremybenn
          Instruction usage statistics.  Requires hazard analysis to be
2506 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2507
 
2508
    3
2509 82 jeremybenn
          Instruction dependency statistics.  Requires hazard analysis
2510 19 jeremybenn
          to be enabled (*note CPU Configuration: CPU Configuration.).
2511
 
2512
    4
2513 82 jeremybenn
          Functional unit dependency statistics.  Requires hazard
2514 19 jeremybenn
          analysis to be enabled (*note CPU Configuration: CPU
2515
          Configuration.).
2516
 
2517
    5
2518 82 jeremybenn
          Raw register usage over time.  Requires hazard analysis to be
2519 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2520
 
2521
    6
2522 82 jeremybenn
          Store buffer statistics.  Requires the store buffer to be
2523 19 jeremybenn
          enabled (*note CPU Configuration: CPU Configuration.).
2524
 
2525
 
2526
`info'
2527
     Display detailed information about the simulator configuration.
2528
     This is quite a lengthy about, because all MMU TLB information is
2529
     displayed.
2530
 
2531
`dv FROMADDR [ TOADDR ] [ MODULE ]'
2532
     Dump the area of memory between FROMADDR and TOADDR as Verilog
2533 82 jeremybenn
     code for a synchronous, 23-bit wide SRAM module, named MODULE.  If
2534 19 jeremybenn
     TOADDR is not specified, then 64 bytes are dumped (as 16 32-bit
2535 82 jeremybenn
     words).  If MODULE is not specified, `or1k_mem' is used.
2536 19 jeremybenn
 
2537
     To save to a file, use the redirection function (described after
2538
     this table, below).
2539
 
2540
`dh FROMADDR [ TOADDR ]'
2541
     Dump the area of memory between FROMADDR and TOADDR as 32-bit hex
2542 82 jeremybenn
     numbers (no `0x', or `32'h' prefix).  If TOADDR is not specified,
2543 19 jeremybenn
     then 64 bytes are dumped (as 16 32-bit words).
2544
 
2545
     To save to a file, use the redirection function (described after
2546
     this table, below).
2547
 
2548
`setdbch'
2549 82 jeremybenn
     Toggle debug channels on/off.  *Note Standalone Simulator:
2550 19 jeremybenn
     Standalone Simulator, for a description of specifying debug
2551
     channels on the command line.
2552
 
2553
`set SECTION PARAM = VALUE'
2554
     Set the configuration parameter PARA in section SECTION to VALUE.
2555
     *Note Configuration: Configuration, for details of configuration
2556
     parameters and their settings.
2557
 
2558
`debug'
2559 82 jeremybenn
     Toggle the simulator debug mode.  *Note Debug Interface
2560 19 jeremybenn
     Configuration: Debug Interface Configuration, for information on
2561
     this parameter.
2562
 
2563
          Caution: This is effectively enabling or disabling the debug
2564 82 jeremybenn
          unit.  It does not effect the remote GDB debug interface.
2565 19 jeremybenn
          However using the remote debug interface while the debug unit
2566
          is disabled will lead to undefined behavior and likely crash
2567
          Or1ksim
2568
 
2569
`cuc'
2570
     Enter the the Custom Unit Compiler command prompt (*note CUC
2571
     Configuration: CUC Configuration.).
2572
 
2573
          Caution: The CUC must be properly configured, for this to
2574 82 jeremybenn
          succeed.  In particular a timing file must be available and
2575
          readable.  Otherwise Or1ksim will crash.
2576 19 jeremybenn
 
2577
`help'
2578
     Print out brief information about each command available.
2579
 
2580
`mprofile [-vh] [-m M] [-g N] [-f FILE] FROM TO'
2581 82 jeremybenn
     Run the memory profiling utility.  This follows the same usage as
2582 19 jeremybenn
     the standalone command (*note Memory Profiling Utility: Memory
2583
     Profiling Utility.).
2584
 
2585
`profile [-vhcq] [-g FILE]'
2586 82 jeremybenn
     Run the instruction profiling utility.  This follows the same
2587
     usage as the standalone command (*note Profiling Utility:
2588
     Profiling Utility.).
2589 19 jeremybenn
 
2590
 
2591
For all commands, it is possible to redirect the output to a file, by
2592
using the redirection operator, `>'.
2593
 
2594
     COMMAND > FILENAME
2595
 
2596
This is particularly useful for commands dumping a large amount of
2597
output, such as `dv'.
2598
 
2599
     Caution: Unfortunately there is a serious bug with the redirection
2600 82 jeremybenn
     operator.  It does not return output to standard output after the
2601
     command completes.  Until this bug is fixed, file redirection
2602 19 jeremybenn
     should not be used.
2603
 
2604

2605
File: or1ksim.info,  Node: Verification API,  Next: Code Internals,  Prev: Interactive Command Line,  Up: Top
2606
 
2607
5 Verification API (VAPI)
2608
*************************
2609
 
2610
The Verification API (VAPI) provides a TCP/IP interface to allow
2611 82 jeremybenn
components of the simulation to be controlled externally.  The
2612
interface is polled for new requests on each simulated clock cycle.
2613
Components within the simulator may send responses to such requests.
2614 19 jeremybenn
 
2615 82 jeremybenn
The inteface is an asynchronous duplex protocol.  On the request side
2616
it provides for simple commands, known as VAPI IDs (a 32 bit integer),
2617
with a single piece of data (also a 32 bit integer).  On the send side,
2618
it provides for sending a single VAPI ID and data.  However there is no
2619
explicit command-response structure.  Some components just accept
2620
requests (e.g.  to set values), some just generate sends (to report
2621 19 jeremybenn
values), and some do both.
2622
 
2623
Each component has a base ID (32 bit) and its commands will start from
2624 82 jeremybenn
that base ID.  This provides a simple partitioning of the command space
2625
amongst components.  Request commands will be directed to the component
2626 19 jeremybenn
with the closest base ID lower than the VAPI ID of the command.
2627
 
2628
Thus if there are two components with base IDs of 0x200 and 0x300, and
2629
a request with VAPI ID of 0x203 is received, it will be directed to the
2630
first component as its command #3.
2631
 
2632
The results of VAPI interactions are logged (by default in `vapi.log'
2633
unless an alternative is specified in `section vapi').
2634
 
2635
Currently the following components support VAPI:
2636
 
2637
Debug Unit
2638
     Although the Debug Unit can specify a base VAPI ID, it is not used
2639
     to send commands or receive requests.
2640
 
2641
     Instead, if the base VAPI ID is set, all remote JTAG protocol
2642
     exchanges are logged in the VAPI log file.
2643
 
2644
UART
2645
     If a base VAPI ID is specified, the UART sends details of any
2646
     chars or break characters sent, with dteails of the line control
2647
     register etc encoded in the data packet sent.
2648
 
2649
     This supports a single VAPI command request, but encodes a
2650
     sub-command in the top 8 bits of the associated data.
2651
 
2652
    `0x00'
2653
          This stuffs the least significant 8 bits of the data into the
2654
          serial register of the UART and the next 8 bits into the line
2655
          control register, effectively providing control of the next
2656
          character to be sent or received.
2657
 
2658
    `0x01'
2659
          The divisor latch bytes are set from the least significant 16
2660
          bits of the data.
2661
 
2662
    `0x02'
2663
          The line control register is set from bits 15-8 of the data.
2664
 
2665
    `0x03'
2666
          The UART skew is set from the least significant 16 bits of
2667
          the data
2668
 
2669
    `0x04'
2670
          If the 16th most significant bit of the data is 1, start
2671 82 jeremybenn
          sending breaks, otherwise stop sending breaks.  The breaks
2672
          are sent or cleared after the number of UART clock divider
2673
          ticks specified by the data (immediately if the data is zero).
2674 19 jeremybenn
 
2675
 
2676
DMA
2677
     Although the DMA unit supports a base VAPI ID in its configuration
2678
     (`section dma'), no VAPI data is sent, nor VAPI requests currently
2679
     implemented.
2680
 
2681
Ethernet
2682 82 jeremybenn
     The following requests are handled by the Ethernet.  Specified
2683 19 jeremybenn
     symbolically, these are the increments from the base VAPI ID of the
2684 82 jeremybenn
     Ethernet.  At present no implementation is provided behind these
2685 19 jeremybenn
     VAPI requests.
2686
 
2687
    `ETH_VAPI_DATA (0)'
2688
 
2689
    `ETH_VAPI_CTRL (0)'
2690
 
2691
GPIO
2692
     If a base VAPI ID is specified, the GPIO sends out on its base
2693
     VAPI ID (symbolically, GPIO_VAPI_DATA (0) offset from the base
2694
     VAPI ID) any changes in outputs.
2695
 
2696 82 jeremybenn
     The following requests are handled by the GPIO.  Specified
2697 19 jeremybenn
     symbolically, these are the increments from the VAPI base ID of the
2698
     GPIO.
2699
 
2700
    `GPIO_VAPI_DATA (0)'
2701
          Set the next input to the commands data field
2702
 
2703
    `GPIO_VAPI_AUX (1)'
2704
          Set the GPIO auxiliary inputs to the data field
2705
 
2706
    `GPIO_VAPI_CLOCK (2)'
2707
          Add an external GPIO clock trigger of period specified in the
2708
          data field.
2709
 
2710
    `GPIO_VAPI_RGPIO_OE (3)'
2711
          Set the GPIO output enable to the data field
2712
 
2713
    `GPIO_VAPI_RGPIO_INTE (4)'
2714
          Set the next interrupt to the data field
2715
 
2716
    `GPIO_VAPI_RGPIO_PTRIG (5)'
2717
          Set the next trigger to the data field
2718
 
2719
    `GPIO_VAPI_RGPIO_AUX (6)'
2720
          Set the next auxiliary input to the data field
2721
 
2722
    `GPIO_VAPI_RGPIO_CTRL (7)'
2723
          Set th next control input to the data field
2724
 
2725
 
2726
 
2727

2728
File: or1ksim.info,  Node: Code Internals,  Next: GNU Free Documentation License,  Prev: Verification API,  Up: Top
2729
 
2730
6 A Guide to Or1ksim Internals
2731
******************************
2732
 
2733 82 jeremybenn
These are notes to help those wanting to extend Or1ksim.  This section
2734 19 jeremybenn
assumes the use of a tag file, so file locations of entities'
2735 82 jeremybenn
definitions are not in general provided.  For more on tags, see the
2736
Linux manual page for `etags'.  A tag file can be created with:
2737 19 jeremybenn
 
2738
     make tags
2739
 
2740
* Menu:
2741
 
2742
* Coding Conventions::
2743
* Global Data Structures::
2744
* Concepts::
2745
* Internal Debugging::
2746 104 jeremybenn
* Regression Testing::
2747 19 jeremybenn
 
2748

2749
File: or1ksim.info,  Node: Coding Conventions,  Next: Global Data Structures,  Up: Code Internals
2750
 
2751
6.1 Coding Conventions for Or1ksim
2752
==================================
2753
 
2754
This chapter provides some guidelines for coding, to facilitate
2755
extensions to Or1ksim
2756
 
2757
_GNU Coding Standard_
2758
     Code should follow the GNU coding standard for C
2759 82 jeremybenn
     (`http://www.gnu.org/prep/standards/'.  If in doubt, put your code
2760 19 jeremybenn
     through the `indent' program.
2761
 
2762
_`#include' headers_
2763
     All C source code files should include `config.h' before any other
2764
     file.
2765
 
2766
     This should be followed by inclusion of any system headers (but see
2767
     the comments about portability and `port.h' below) and then by any
2768
     Or1ksim package headers.
2769
 
2770
     If `port.h' is required, it should be the first package header to
2771
     be included after the system headers.
2772
 
2773
     All C source code and header files should directly include any
2774 82 jeremybenn
     system or package header they depend on, i.e.  not rely on any
2775
     other header having already included it.  The two exceptions are
2776 19 jeremybenn
 
2777
       1. All header files may assume that `config.h' has already been
2778
          included.
2779
 
2780
       2. System headers which impose portability problems should be
2781
          included by using the package header `port.h', rather than
2782 82 jeremybenn
          the system headers themselves.  This is the case for code
2783 19 jeremybenn
          requiring
2784
 
2785
             * `strndup' (from `string.h')
2786
 
2787
             * Integer types (`intN_t', `uintN_t') (from `inttypes.h').
2788
 
2789
             * `isblank' (from `ctype.h')
2790
 
2791
 
2792
 
2793
_`#include' files once only_
2794
     All include files should be protected by `#ifndef' to ensure their
2795 82 jeremybenn
     definitions are only included once.  For instance a header file
2796 19 jeremybenn
     `X-Y.H' should surround its contents with:
2797
 
2798
          #ifndef X_Y__H
2799
          #define X_Y__H
2800
 
2801
          
2802
 
2803
          #endif  /* X_Y__H */
2804
 
2805
_Avoid `typedef'_
2806
     The GNU coding style for C does not have a clear way to distinguish
2807 82 jeremybenn
     between user type name and user variables.  For this reason
2808 19 jeremybenn
     `typedef' should be avoided except for the most ubiquitous user
2809 82 jeremybenn
     defined types.  This makes the code much easier to read.
2810 19 jeremybenn
 
2811
     There are some `typedef' declarations in the `argtable2' library
2812
     and the ELF and COFF headers, because this code is taken from
2813
     other places.
2814
 
2815
     Within Or1ksim legacy uses of `typedef' have largely been purged,
2816
     except in the Custom Unit Compiler (*note Custom Unit Compiler
2817
     (CUC) Configuration: CUC Configuration.).
2818
 
2819
     The remaining uses of `typedef' occur in two places:
2820
 
2821
        * `port/port.h' defines types to replace those in header files
2822
          that are not available (character functions, string
2823
          duplication, integer types).
2824
 
2825
          `cpu/or1k/arch.h' defines types for the key Or1ksim entities:
2826
          addresses (`oraddr_t'), unsigned register values (`uorreg_t')
2827
          and signed register (`orreg_t') values.
2828
 
2829
 
2830
     Where new types are defined, they should appear in one of these two
2831 82 jeremybenn
     files as appropriate.  Or1ksim specific types appearing in
2832
     `arch.h' should always have the suffix `_h'.
2833 19 jeremybenn
 
2834
_Don't begin names with underscore_
2835
     Names beginning with `_' are intended to be part of the C
2836 82 jeremybenn
     infrastructure.  They should not be used in the simulator code.
2837 19 jeremybenn
 
2838
_Keep Non-global top level entities static_
2839
     All top level entities (functions, variables), which are not
2840
     explicitly part of a global interface should be declared static.
2841
     This ensures that unwanted connections are not inadvertently built
2842
     across the program.
2843
 
2844
_Use of `inline'_
2845 82 jeremybenn
     Code should not be declared `inline'.  Modern compilers can work
2846 19 jeremybenn
     out for themselves what is best in this respect.
2847
 
2848
_Initialization_
2849 82 jeremybenn
     All data structures should be explicitly initialized.  In
2850
     particular code should not rely on static data structures being
2851
     initialized to zero.
2852 19 jeremybenn
 
2853
     The rationale is that in future static data structures may become
2854 82 jeremybenn
     dynamic.  This has been a particular source of bugs in Or1ksim
2855 19 jeremybenn
     historically.
2856
 
2857
     A specific case is with new peripherals, which should always
2858
     include a `start' function to pre-initialize all configuration
2859
     parameters to sensible defaults
2860
 
2861
_Configuration Validation_
2862
     All configuration values should be validated, preferably when
2863
     encountered, if not when the `section' is closed, or otherwise at
2864
     run time when the parameter is first used.
2865
 
2866
 
2867

2868
File: or1ksim.info,  Node: Global Data Structures,  Next: Concepts,  Prev: Coding Conventions,  Up: Code Internals
2869
 
2870
6.2 Global Data Structures
2871
==========================
2872
 
2873
`config'
2874
     The global variable `config' of type `struct config' holds the
2875
     configuration data for some of the Or1ksim components which are
2876 82 jeremybenn
     always present.  At present the components are:
2877 19 jeremybenn
 
2878
        * The simulator defined in `section sim' (*note Simulator
2879
          Configuration: Simulator Configuration.).
2880
 
2881
        * The Verification API (VAPI) defined  in `section vapi' (*note
2882
          Verification API (VAPI) Configuration: Verification API
2883
          Configuration.).
2884
 
2885
        * The Custom Unit Compiler (CUC), defined in `section cuc'
2886
          (*note Custom Unit Compiler (CUC) Configuration: CUC
2887
          Configuration.).
2888
 
2889
        * The CPU, defined in `section cpu' (*note CPU Configuration:
2890
          CPU Configuration.).
2891
 
2892
        * The data cache (but not the instruction cache), defined in
2893
          `section dc' (*note Cache Configuration: Cache
2894
          Configuration.).
2895
 
2896
        * The power management unit, defined in `section pm' (*note
2897
          Power Management Configuration: Power Management
2898
          Configuration.).
2899
 
2900
        * The programmable interrupt controller, defined in
2901
          `section pic' (*note Interrupt Configuration: Interrupt
2902
          Configuration.).
2903
 
2904
        * Branch prediciton, defined in `section bpb' (*note Branch
2905
          Prediction Configuration: Branch Prediction Configuration.).
2906
 
2907
        * The debug unit, defined in `section debug' (*note Debug
2908
          Interface Configuration: Debug Interface Configuration.).
2909
 
2910
 
2911
     This struct is made of a collection of structs, one for each
2912 82 jeremybenn
     component.  For example the simulator configuration is held in
2913 19 jeremybenn
     `config.sim'.
2914
 
2915
`config'
2916
     This is a linked list of data structures holding configuration data
2917
     for all sections which are not held in the main `config' data
2918 82 jeremybenn
     structure.  In general these are components (such as peripherals
2919
     and memory) which may occur multiple times.  However it also
2920
     handles some architectural components which may occur only once,
2921
     such as the memory management units, the instruction cache, the
2922
     interrupt controller and branch prediction.
2923 19 jeremybenn
 
2924
`runtime'
2925
     The global variable `runtime' of type `struct runtime' holds all
2926 82 jeremybenn
     the runtime information about the simulation.  To access this
2927 19 jeremybenn
     variable, `sim-config.h' must be included.
2928
 
2929
     This struct is itself made of 3 other structs, `cpu' (for CPU run
2930
     time state), `vapi' (for Verification API state) and `cuc' (for
2931
     Custom Unit Compiler state).
2932
 
2933
 
2934

2935
File: or1ksim.info,  Node: Concepts,  Next: Internal Debugging,  Prev: Global Data Structures,  Up: Code Internals
2936
 
2937
6.3 Concepts
2938
============
2939
 
2940
_Output Redirection_
2941 82 jeremybenn
     The current output stream is held in `runtime.cpu.fout'.  Output
2942 19 jeremybenn
     should be explicitly written to this stream, or may use the
2943
     `PRINTF' macro, which will write its arguments to this output
2944
     stream.
2945
 
2946
_Reset Hooks_
2947
     Any peripheral may register a routine to be called when the the
2948
     processor is reset by calling `reg_sim_reset', providing a
2949 82 jeremybenn
     function and pointer to a data structure as arguments.  On reset
2950 19 jeremybenn
     that function will be called with the data stucture pointer as
2951
     argument.
2952
 
2953
 
2954

2955 104 jeremybenn
File: or1ksim.info,  Node: Internal Debugging,  Next: Regression Testing,  Prev: Concepts,  Up: Code Internals
2956 19 jeremybenn
 
2957
6.4 Internal Debugging
2958
======================
2959
 
2960
The function `debug' is like `printf', but with an extra first
2961 82 jeremybenn
argument, which is the debug level.  If the debug level specified in
2962
the simulator configuration (*note Simulator Behavior: Simulator
2963
Behavior.) is greater than or equal to this value, the remaining
2964
arguments are printed to the current output stream (*note Output
2965
Redirection: Output Redirection.).
2966 19 jeremybenn
 
2967

2968 104 jeremybenn
File: or1ksim.info,  Node: Regression Testing,  Prev: Internal Debugging,  Up: Code Internals
2969
 
2970
6.5 Regression Testing
2971
======================
2972
 
2973
Or1ksim now includes a regression test suite for both standalone and
2974
library usage as described earlier (*note Building and Installing:
2975
Build and Install.).  Running the tests requires that the OpenRISC
2976
toolchain and DejaGNU are both installed.
2977
 
2978
Tests are written using `expect', a derivative of TCL.  Documentation
2979
of DejaGnu, `expect' and TCL are freely available on the Web.  The
2980
Embecosm Application Note 8, `Howto: Using DejaGnu for Testing: A
2981
Simple Introduction' (`http://www.embecosm.com/download/ean8.html')
2982
provides a concise introduction.
2983
 
2984
All test code is found in the `testsuite' directory.  The key files and
2985
directories used are as follows.
2986
 
2987
`global-conf.exp'
2988
     This is the global DejaGNU configuration file used to set up
2989
     parameters common to all tests.  If the user has the environment
2990
     varialbe `DEJAGNU' defined, it will be used instead, but this is
2991
     not recommended.
2992
 
2993
`Makefile.am'
2994
     This is the top level `automake' file for the testsuite.  The only
2995
     changes likely to be needed here is additional local cleanup of
2996
     files created by new tests.
2997
 
2998
`README'
2999
     This contains details of all the tests
3000
 
3001
`config'
3002
     This contains DejaGnu board configurations.  Since the tests are
3003
     generally run on a Unix host, this should just contain `Unix.exp'.
3004
 
3005
`lib'
3006
     This contains DejaGnu tool specific configurations.  "Tool" has a
3007
     specific meaning in DejaGNU, referring just to a grouping of
3008
     tests.  In this case there are two such "tools", "or1ksim" and
3009
     "libsim" for tests of the standalone tool and tests of the library.
3010
 
3011
     Corresponding to this, there are two tool specific configuration
3012
     files, `or1ksim.exp' and `libsim.exp'.  These contain `expect'/TCL
3013
     procedures for common use among the tests.
3014
 
3015
`libsim.tests'
3016
`or1ksim.tests'
3017
     These are the directories of tests of the Or1ksim library.  They
3018
     also include Or1ksim configuration files and each has a
3019
     `Makefile.am' file.  `Makefile.am' should be updated whenever
3020
     files are added to this directory, to ensure they are included in
3021
     the distribution.
3022
 
3023
`test-code'
3024
     These are all the test programs to be compiled on the host (each
3025
     in its own directory).  In general these are programs to support
3026
     testing of the library, and build various programs linking in the
3027
     library.
3028
 
3029
`test-code'
3030
     These are all the test programs to be compiled with the OpenRISC
3031
     tool chain to run with either standalone Or1ksim or the library.
3032
     This directory includes its own `configure.ac', since it must set
3033
     up a separate tool chain based on the target, not the host.
3034
 
3035
 
3036
To add a new test needs the following steps.
3037
 
3038 346 jeremybenn
   * Put new host C code in its own directory within `test-code'.  Add
3039 104 jeremybenn
     the directory to the existing `Makefile.am' in the `test-code'
3040
     directory and create a `Makefile.am' in the new directory to drive
3041 346 jeremybenn
     building the test program(s).  Don't forget to add the new
3042 104 jeremybenn
     `Makefile' to the top level `configure.ac' so it gets generated.
3043
     Not all tests require code here.
3044
 
3045 346 jeremybenn
   * Put new target C code in its own directory within `test-code-or1k'.
3046
     Once again modify & create `Makefile.am'.  This time modify the
3047
     `configure.ac' in the `test-code-or1k' so the `Makefile' gets
3048
     generated.  The existing programs provide examples to start from,
3049
     including custom linker scripts where needed.
3050 104 jeremybenn
 
3051
   * Add one or more tests and configuration files to the relevant
3052 346 jeremybenn
     "tool" test directory.  Use the existing tests as templates.  They
3053 104 jeremybenn
     make heavy use of the `expect'/TCL procedures in the `config'
3054
     directory to facilitate driving the tests.
3055
 
3056
 
3057

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

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

4395
Tag Table:
4396 346 jeremybenn
Node: Top814
4397
Node: Installation1224
4398
Node: Preparation1471
4399
Node: Configuring the Build1764
4400 385 jeremybenn
Node: Build and Install7906
4401
Node: Known Issues8684
4402
Node: Usage9739
4403
Node: Standalone Simulator9953
4404
Node: Profiling Utility14478
4405
Node: Memory Profiling Utility15388
4406
Node: Simulator Library16753
4407
Node: Configuration26836
4408
Node: Configuration File Format27448
4409
Node: Configuration File Preprocessing27833
4410
Node: Configuration File Syntax28130
4411
Node: Simulator Configuration30915
4412
Node: Simulator Behavior31206
4413
Node: Verification API Configuration35787
4414
Node: CUC Configuration37727
4415
Node: Core OpenRISC Configuration39719
4416
Node: CPU Configuration40221
4417
Node: Memory Configuration44340
4418
Node: Memory Management Configuration50848
4419
Node: Cache Configuration53225
4420
Node: Interrupt Configuration55611
4421
Node: Power Management Configuration56347
4422
Node: Branch Prediction Configuration57624
4423
Node: Debug Interface Configuration58984
4424
Node: Peripheral Configuration61327
4425
Node: Memory Controller Configuration61953
4426
Node: UART Configuration65733
4427
Node: DMA Configuration69252
4428
Node: Ethernet Configuration71119
4429
Node: GPIO Configuration75095
4430
Node: Display Interface Configuration76728
4431
Node: Frame Buffer Configuration79037
4432
Node: Keyboard Configuration80901
4433
Node: Disc Interface Configuration83139
4434
Node: Generic Peripheral Configuration88243
4435
Node: Interactive Command Line90538
4436
Node: Verification API97512
4437
Node: Code Internals101942
4438
Node: Coding Conventions102525
4439
Node: Global Data Structures106952
4440
Node: Concepts109609
4441
Ref: Output Redirection109754
4442
Node: Internal Debugging110293
4443
Node: Regression Testing110817
4444
Node: GNU Free Documentation License114606

powered by: WebSVN 2.1.0

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