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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 429 julius
This is ../../or1ksim/doc/or1ksim.info, produced by makeinfo version
2
4.13 from ../../or1ksim/doc/or1ksim.texi.
3 19 jeremybenn
 
4
INFO-DIR-SECTION Embedded development
5
START-INFO-DIR-ENTRY
6
* 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 420 jeremybenn
     tar jxf or1ksim-2010-11-11.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 420 jeremybenn
     ../or1ksim-2010-11-11/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 420 jeremybenn
     Dump instruction just executed and any register/memory location
330
     chaged after each instruction (one line per instruction).
331 385 jeremybenn
 
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 418 julius
`type=random|pattern|unknown|zero|exitnops'
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 420 jeremybenn
               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 418 julius
    `exitnops'
1317
          Set the memory values to be an instruction used to signal end
1318
          of simulation. This is useful for causing immediate end of
1319
          simulation when PC corruption occurs.
1320
 
1321 19 jeremybenn
 
1322
`random_seed = VALUE'
1323 82 jeremybenn
     Set the seed for the random number generator to VALUE.  This only
1324 19 jeremybenn
     has any effect for memory type `random'.
1325
 
1326
     The default value is -1, which means the seed will be set from a
1327
     call to the `time' function, thus ensuring different random values
1328 82 jeremybenn
     are used on each run.  The simulator prints out the seed used in
1329 19 jeremybenn
     this case, allowing repeat runs to regenerate the same random
1330
     values used in any particular run.
1331
 
1332
`pattern = VALUE'
1333 82 jeremybenn
     Set the pattern to be used when initializing memory to VALUE.  The
1334
     default value is 0.  This only has any effect for memory type
1335
     `pattern'.  The least significant 8 bits of this value is used to
1336
     initialize each byte.  More than 8 bits can be specified, but will
1337 19 jeremybenn
     ignored with a warning.
1338
 
1339
          Tip: The default value, is equivalent to setting the memory
1340 82 jeremybenn
          `type' to be `zero'.  If that is what is intended, then using
1341 19 jeremybenn
          `type=zero' explicitly is better than using `type=pattern'
1342
          and not specifying a value for `pattern'.
1343
 
1344
`baseaddr = VALUE'
1345 82 jeremybenn
     Set the base address of the memory to VALUE.  It should be aligned
1346 19 jeremybenn
     to a multiple of the memory size rounded up to the nearest 2^n.
1347
     The default value is 0.
1348
 
1349
`size = VALUE'
1350 82 jeremybenn
     Set the size of the memory block to be VALUE bytes.  This should
1351
     be a multiple of 4 (i.e.  word aligned).  The default value is
1352
     1024.
1353 19 jeremybenn
 
1354
          Note: When allocating memory, the simulator will allocate the
1355
          nearest 2^n bytes greater than or equal to VALUE, and will not
1356
          notice memory misses in any part of the memory between VALUE
1357
          and the amount allocated.
1358
 
1359
          As a consequence users are strongly recommended to specify
1360 82 jeremybenn
          memory sizes that are an exact power of 2.  If some other
1361 19 jeremybenn
          amount of memory is required, it should be specified as
1362
          separate, contiguous blocks, each of which is a power of 2 in
1363
          size.
1364
 
1365
`name = "TEXT"'
1366 82 jeremybenn
     Name the block.  Typically these describe the type of memory being
1367
     modeled (thus `"SRAM"' or `"Flash"'.  The default is
1368 19 jeremybenn
     `"anonymous memory block"'.
1369
 
1370
          Note: It is not clear that this information is currently ever
1371 82 jeremybenn
          used in normal operation of the simulator.  Even the `info'
1372 19 jeremybenn
          command of the simulator ignores it.
1373
 
1374
`ce = VALUE'
1375 82 jeremybenn
     Set the chip enable index of the memory instance.  Each memory
1376 19 jeremybenn
     instance should have a unique chip enable index, which should be
1377 82 jeremybenn
     greater than or equal to zero.  This is used by the memory
1378 19 jeremybenn
     controller when identifying different memory instances.
1379
 
1380 346 jeremybenn
     There is no requirement to set `ce' if a memory controller is not
1381
     enabled.  The default value is -1 (invalid).
1382 19 jeremybenn
 
1383
`mc = VALUE'
1384 82 jeremybenn
     Specifies the memory controller this memory is connected to.  It
1385 19 jeremybenn
     should correspond to the `index' field specified in a `section mc'
1386
     for a memory controller (*note Memory Controller Configuration:
1387
     Memory Controller Configuration.).
1388
 
1389 346 jeremybenn
     There is no requirement to set `mc' if a memory controller is not
1390
     enabled.  Default value is 0, which is also the default value of a
1391 98 jeremybenn
     memory controller `index' field.  This is suitable therefore for
1392
     designs with just one memory controller.
1393 19 jeremybenn
 
1394
`delayr = VALUE'
1395 82 jeremybenn
     The number of cycles required for a read access.  Set to -1 if the
1396
     memory does not support reading.  Default value 1.  The simulator
1397 19 jeremybenn
     will add this number of cycles to the total instruction cycle
1398
     count when reading from main memory.
1399
 
1400
`delayw = VALUE'
1401 82 jeremybenn
     The number of cycles required for a write access.  Set to -1 if the
1402
     memory does not support writing.  Default value 1.  The simulator
1403 19 jeremybenn
     will add this number of cycles to the total instruction cycle
1404
     count when writing to main memory.
1405
 
1406
`log = "FILE"'
1407
     If specified, `file' names a file for all memory accesses to be
1408 82 jeremybenn
     logged.  If not specified, the default value, NULL is used, meaning
1409 19 jeremybenn
     that the memory is not logged.
1410
 
1411
 
1412

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2964 104 jeremybenn
File: or1ksim.info,  Node: Internal Debugging,  Next: Regression Testing,  Prev: Concepts,  Up: Code Internals
2965 19 jeremybenn
 
2966
6.4 Internal Debugging
2967
======================
2968
 
2969
The function `debug' is like `printf', but with an extra first
2970 82 jeremybenn
argument, which is the debug level.  If the debug level specified in
2971
the simulator configuration (*note Simulator Behavior: Simulator
2972
Behavior.) is greater than or equal to this value, the remaining
2973
arguments are printed to the current output stream (*note Output
2974
Redirection: Output Redirection.).
2975 19 jeremybenn
 
2976

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

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

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

4412
Tag Table:
4413 429 julius
Node: Top830
4414
Node: Installation1240
4415
Node: Preparation1487
4416
Node: Configuring the Build1782
4417
Node: Build and Install7926
4418
Node: Known Issues8704
4419
Node: Usage9759
4420
Node: Standalone Simulator9973
4421
Node: Profiling Utility14537
4422
Node: Memory Profiling Utility15447
4423
Node: Simulator Library16812
4424
Node: Configuration26895
4425
Node: Configuration File Format27507
4426
Node: Configuration File Preprocessing27892
4427
Node: Configuration File Syntax28189
4428
Node: Simulator Configuration30974
4429
Node: Simulator Behavior31265
4430
Node: Verification API Configuration35846
4431
Node: CUC Configuration37786
4432
Node: Core OpenRISC Configuration39778
4433
Node: CPU Configuration40280
4434
Node: Memory Configuration44399
4435
Node: Memory Management Configuration51121
4436
Node: Cache Configuration53498
4437
Node: Interrupt Configuration55884
4438
Node: Power Management Configuration56620
4439
Node: Branch Prediction Configuration57897
4440
Node: Debug Interface Configuration59257
4441
Node: Peripheral Configuration61600
4442
Node: Memory Controller Configuration62226
4443
Node: UART Configuration66006
4444
Node: DMA Configuration69525
4445
Node: Ethernet Configuration71392
4446
Node: GPIO Configuration75474
4447
Node: Display Interface Configuration77107
4448
Node: Frame Buffer Configuration79416
4449
Node: Keyboard Configuration81280
4450
Node: Disc Interface Configuration83518
4451
Node: Generic Peripheral Configuration88622
4452
Node: Interactive Command Line90917
4453
Node: Verification API97891
4454
Node: Code Internals102321
4455
Node: Coding Conventions102904
4456
Node: Global Data Structures107331
4457
Node: Concepts109988
4458
Ref: Output Redirection110133
4459
Node: Internal Debugging110672
4460
Node: Regression Testing111196
4461
Node: GNU Free Documentation License114985

powered by: WebSVN 2.1.0

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