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

Subversion Repositories openrisc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1643
File: or1ksim.info,  Node: Peripheral Configuration,  Prev: Core OpenRISC Configuration,  Up: Configuration
1644
 
1645
3.4 Configuring Memory Mapped Peripherals
1646
=========================================
1647
 
1648 82 jeremybenn
All peripheral components are optional.  If they are specified, then
1649 19 jeremybenn
(unlike other components) by default they are enabled.
1650
 
1651
* Menu:
1652
 
1653
* Memory Controller Configuration::
1654
* UART Configuration::
1655
* DMA Configuration::
1656
* Ethernet Configuration::
1657
* GPIO Configuration::
1658
* Display Interface Configuration::
1659
* Frame Buffer Configuration::
1660
* Keyboard Configuration::
1661
* Disc Interface Configuration::
1662
* Generic Peripheral Configuration::
1663
 
1664

1665
File: or1ksim.info,  Node: Memory Controller Configuration,  Next: UART Configuration,  Up: Peripheral Configuration
1666
 
1667
3.4.1 Memory Controller Configuration
1668
-------------------------------------
1669
 
1670
The memory controller used in Or1ksim is the component implemented at
1671 98 jeremybenn
OpenCores, and found in the top level SVN directory, `mem_ctrl'.  It is
1672 19 jeremybenn
described in the document `Memory Controller IP Core' by Rudolf
1673 82 jeremybenn
Usselmann, which can be found in the `doc' subdirectory.  It is a
1674
memory mapped component, which resides on the main OpenRISC Wishbone
1675
data bus.
1676 19 jeremybenn
 
1677 82 jeremybenn
The memory controller configuration is described in `section mc'.  This
1678 19 jeremybenn
section may appear multiple times, specifying multiple memory
1679 98 jeremybenn
controllers.
1680 19 jeremybenn
 
1681 98 jeremybenn
     Caution: The standard OpenRISC C libraries will initialize the
1682
     memory controller to expect 64MB memory blocks, and any memory
1683
     declarations _must_ reflect this.
1684
 
1685
     If smaller memory blocks are declared with a memory controller,
1686
     then sufficient memory will not be allocated by Or1ksim, but out of
1687
     range memory accesses will not be trapped. For example declaring a
1688
     memory section from 0-4MB with a memory controller enabled would
1689
     mean that accesses between 4MB and 64MB would be permitted, but
1690
     having no allocated memory would likely cause a segmentation fault.
1691
 
1692
     If the user is determined to use smaller memories with the memory
1693
     controller, then custom initialization code must be provided, to
1694
     ensure the memory controller traps out-of-memory accesses.
1695
 
1696
The following parameters may be specified.
1697
 
1698 19 jeremybenn
`enabled = 0|1'
1699 82 jeremybenn
     If 1 (true, the default), this memory controller is enabled.  If
1700
     0, it is disabled.
1701 19 jeremybenn
 
1702
          Note: The memory controller can effectively also be disabled
1703
          by setting an appropriate power on control register value
1704 82 jeremybenn
          (see below).  However this should only be used if it is
1705 19 jeremybenn
          desired to specifically model this behavior of the memory
1706
          controller, not as a way of disabling the memory controller
1707
          in general.
1708
 
1709
`baseaddr = VALUE'
1710
     Set the base address of the memory controller's memory mapped
1711 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
1712 19 jeremybenn
     sensible value.
1713
 
1714
     The memory controller has a 7 bit address bus, with a total of 19
1715
     32-bit registers, at addresses 0x00 through 0x4c (address 0x0c and
1716
     addresses 0x50 through 0x7c are not used).
1717
 
1718
`poc = VALUE'
1719
     Specifies the value of the power on control register, The least
1720
     signficant two bits specify the bus width (use 0 for an 8-bit bus,
1721
     1 for a 16-bit bus and 2 for a 32-bit bus) and the next two bits
1722
     the type of memory connected (use 0 for a disabled interface, 1
1723
     for SSRAM, 2 for asyncrhonous devices and 3 for synchronous
1724
     devices).
1725
 
1726
     If other bits are specified, they are ignored with a warning.
1727
 
1728
          Caution: The default value, 0, corresponds to a disabled
1729
          8-bit bus, and is likely not the most suitable value
1730
 
1731
`index = VALUE'
1732
     Specify the index of this memory controller amongst all the memory
1733 82 jeremybenn
     controllers.  This value should be unique for each memory
1734 19 jeremybenn
     controller, and is used to associate specific memories with the
1735
     controller, through the `mc' field in the `section memory'
1736
     configuration (*note Memory Configuration: Memory Configuration.).
1737
 
1738
     The default value, 0, is suitable when there is only one memory
1739
     controller.
1740
 
1741
 
1742

1743
File: or1ksim.info,  Node: UART Configuration,  Next: DMA Configuration,  Prev: Memory Controller Configuration,  Up: Peripheral Configuration
1744
 
1745
3.4.2 UART Configuration
1746
------------------------
1747
 
1748
The UART implemented in Or1ksim follows the specification of the
1749 82 jeremybenn
National Semiconductor 16450 and 16550 parts.  It is a memory mapped
1750 19 jeremybenn
component, which resides on the main OpenRISC Wishbone data bus.
1751
 
1752
The component provides a number of interfaces to emulate the behavior
1753
of an external terminal connected to the UART.
1754
 
1755 82 jeremybenn
UART configuration is described in `section uart'.  This section may
1756
appear multiple times, specifying multiple UARTs.  The following
1757 19 jeremybenn
parameters may be specified.
1758
 
1759
`enabled = 0|1'
1760 82 jeremybenn
     If 1 (true, the default), this UART is enabled.  If 0, it is
1761 19 jeremybenn
     disabled.
1762
 
1763
`baseaddr = VALUE'
1764
     Set the base address of the UART's memory mapped registers to
1765 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1766 19 jeremybenn
 
1767
     The UART has a 3 bit address bus, with a total of 8 8-bit
1768
     registers, at addresses 0x0 through 0x7.
1769
 
1770
`channel = "TYPE:ARGS"'
1771
     Specify the channel representing the terminal connected to the UART
1772
     Rx & Tx pins.
1773
 
1774
    `channel="file:`rxfile',`txfile'"'
1775
          Read input characters from the file `rxfile' and write output
1776
          characters to the file `txfile' (which will be created if
1777
          required).
1778
 
1779
    `channel="xterm:ARGS"'
1780
          Create an xterm on startup, write UART Tx traffic to the
1781
          xterm and take Rx traffic from the keyboard when the xterm
1782 82 jeremybenn
          window is selected.  Additional arguments to the xterm
1783
          command (for example specifying window size may be specified
1784
          in ARGS, or this may be left blank.
1785 19 jeremybenn
 
1786
    `channel="tcp:VALUE"'
1787
          Open the TCP/IP port specified by VALUE and read and write
1788
          UART traffic from and to it.
1789
 
1790
          Typically a telnet session is connected to the other end of
1791
          this port.
1792
 
1793
               Tip: There is no registered port for Or1ksim telnet UART
1794 82 jeremybenn
               connection.  Priviledged access is required to read
1795 19 jeremybenn
               traffic on the registered "well-known" telnet port (23).
1796
               Instead users should use port values in the "Dynamic" or
1797 82 jeremybenn
               "Private" port range, i.e.  49152-65535.
1798 19 jeremybenn
 
1799
    `channel="fd:`rxfd',`txfd'"'
1800
          Read and write characters from and to the existing open
1801
          numerical file descriptors, file `rxfd' and `txfd'.
1802
 
1803
    `channel="tty:device=/dev/ttyS0,baud=9600"'
1804
          Read and write characters from and to a physical serial port.
1805
          The precise device (shown here as `/dev/ttyS0') may vary from
1806
          machine to machine.
1807
 
1808
 
1809
     The default value for this field is `"xterm:"'.
1810
 
1811
`irq = VALUE'
1812 82 jeremybenn
     Use VALUE as the IRQ number of this UART.  Default value 0.
1813 19 jeremybenn
 
1814
`16550 = 0|1'
1815 82 jeremybenn
     If 1 (true), the UART has the functionality of a 16550.  If 0 (the
1816
     default), it has the functionality of a 16450.  The principal
1817 19 jeremybenn
     difference is that the 16550 can buffer multiple characters.
1818
 
1819
`jitter = VALUE'
1820
     Set the jitter, modeled as a time to block, to VALUE milliseconds.
1821 82 jeremybenn
     Set to -1 to disable jitter modeling.  Default value 0.
1822 19 jeremybenn
 
1823
          Note: This functionality has yet to be implemented, so this
1824
          parameter has no effect.
1825
 
1826
`vapi_id = VALUE'
1827
     VALUE specifies the value of the Verification API (VAPI) base
1828 82 jeremybenn
     address to be used with the UART.  *Note Verification API:
1829 19 jeremybenn
     Verification API, for more details, which details the use of the
1830
     VAPI with the UART.
1831
 
1832
 
1833

1834
File: or1ksim.info,  Node: DMA Configuration,  Next: Ethernet Configuration,  Prev: UART Configuration,  Up: Peripheral Configuration
1835
 
1836
3.4.3 DMA Configuration
1837
-----------------------
1838
 
1839
The DMA controller used in Or1ksim is the component implemented at
1840 98 jeremybenn
OpenCores, and found in the top level SVN directory, `wb_dma'.  It is
1841 19 jeremybenn
described in the document `Wishbone DMA/Bridge IP Core' by Rudolf
1842 82 jeremybenn
Usselmann, which can be found in the `doc' subdirectory.  It is a
1843
memory mapped component, which resides on the main OpenRISC Wishbone
1844
data bus.  The present implementation is incomplete, intended only to
1845
support the Ethernet interface (*note Ethernet Configuration::),
1846
although the Ethernet interface is not yet completed.
1847 19 jeremybenn
 
1848 82 jeremybenn
DMA configuration is described in `section dma'.  This section may
1849
appear multiple times, specifying multiple DMA controllers.  The
1850 19 jeremybenn
following parameters may be specified.
1851
 
1852
`enabled = 0|1'
1853 82 jeremybenn
     If 1 (true, the default), this DMA controller is enabled.  If 0,
1854
     it is disabled.
1855 19 jeremybenn
 
1856
`baseaddr = VALUE'
1857
     Set the base address of the DMA's memory mapped registers to
1858 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1859 19 jeremybenn
 
1860
     The DMA controller has a 10 bit address bus, with a total of 253
1861 82 jeremybenn
     32-bit registers.  The first 5 registers at addresses 0x000 through
1862
     0x010 control the overall behavior of the DMA controller.  There
1863
     are then 31 blocks of 8 registers, controlling each of the 31 DMA
1864
     channels available.  Addresses 0x014 through 0x01c are not used.
1865 19 jeremybenn
 
1866
`irq = VALUE'
1867 82 jeremybenn
     Use VALUE as the IRQ number of this DMA controller.  Default value
1868 19 jeremybenn
     0.
1869
 
1870
`vapi_id = VALUE'
1871
     VALUE specifies the value of the Verification API (VAPI) base
1872 82 jeremybenn
     address to be used with the DMA controller.  *Note Verification
1873 19 jeremybenn
     API: Verification API, for more details, which details the use of
1874
     the VAPI with the DMA controller.
1875
 
1876
 
1877

1878
File: or1ksim.info,  Node: Ethernet Configuration,  Next: GPIO Configuration,  Prev: DMA Configuration,  Up: Peripheral Configuration
1879
 
1880
3.4.4 Ethernet Configuration
1881
----------------------------
1882
 
1883
The Ethernet MAC used in Or1ksim is the component implemented at
1884 98 jeremybenn
OpenCores, and found in the top level SVN directory, `ethmac'.  It also
1885
forms part of the OpenRISC SoC, ORPSoC.  It is described in the
1886 19 jeremybenn
document `Ethernet IP Core Specification' by Igor Mohor, which can be
1887 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
1888
which resides on the main OpenRISC Wishbone data bus.
1889 19 jeremybenn
 
1890 82 jeremybenn
Ethernet configuration is described in `section ethernet'.  This
1891
section may appear multiple times, specifying multiple Ethernet
1892
interfaces.  The following parameters may be specified.
1893 19 jeremybenn
 
1894
`enabled = 0|1'
1895 82 jeremybenn
     If 1 (true, the default), this Ethernet MAC is enabled.  If 0, it
1896
     is disabled.
1897 19 jeremybenn
 
1898
`baseaddr = VALUE'
1899
     Set the base address of the MAC's memory mapped registers to
1900 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1901 19 jeremybenn
 
1902
     The Ethernet MAC has a 7-bit address bus, with a total of 21
1903 82 jeremybenn
     32-bit registers.  Addresses 0x54 through 0x7c are not used.
1904 19 jeremybenn
 
1905
          Note: The Ethernet specification describes a Tx control
1906 82 jeremybenn
          register, `TXCTRL', at address 0x50.  However this register
1907
          is not implemented in the Or1ksim model.
1908 19 jeremybenn
 
1909
`dma = VALUE'
1910
     VALUE specifies the DMA controller with which this Ethernet is
1911 82 jeremybenn
     associated.  The default value is 0.
1912 19 jeremybenn
 
1913
          Note: Support for external DMA is not provided in the current
1914 82 jeremybenn
          implementation, and this value is ignored.  In any case there
1915 19 jeremybenn
          is no equivalent field to which this can be matched in the
1916
          current DMA component implementation (*note DMA
1917
          Configuration: DMA Configuration.).
1918
 
1919
`irq = VALUE'
1920 82 jeremybenn
     Use VALUE as the IRQ number of this Ethernet MAC.  Default value 0.
1921 19 jeremybenn
 
1922
`rtx_type = 0|1'
1923
     If 1 (true) use a socket interface to the Ethernet (see parameter
1924 82 jeremybenn
     `sockif' below).  If 0 (the default), use a file interface,
1925
     reading and writing from and to the files specified in the
1926
     `rxfile' and `txfile' parameters (see below).
1927 19 jeremybenn
 
1928
          Note: By default the socket interface is not provided in
1929 82 jeremybenn
          Or1ksim.  If it is required, this must be requested when
1930 19 jeremybenn
          configuring, by use of the `--enable-ethphy' option to
1931
          `configure'.
1932
 
1933
               configure --target=or32-uclinux --enable-ethphy ...
1934
 
1935
`rx_channel = RXVALUE'
1936
`tx_channel = TXVALUE'
1937
     RXVALUE specifies the DMA channel to use for receive and TXVALUE
1938 82 jeremybenn
     the DMA channel to use for transmit.  Both default to 0.
1939 19 jeremybenn
 
1940
          Note: As noted above, support for external DMA is not
1941
          provided in the current implementation, and so these values
1942
          are ignored.
1943
 
1944
`rxfile = "RXFILE"'
1945
`txfile = "TXFILE"'
1946
     When `rtx_type' is 0 (see above), RXFILE specifies the file to use
1947
     as input and TXFILE specifies the fie to use as output.
1948
 
1949 82 jeremybenn
     The file contains a sequence of packets.  Each packet consists of a
1950
     packet length (32 bits), followed by that many bytes of data.
1951
     Once the input file is empty, the Ethernet MAC behaves as though
1952
     there were no data on the Ethernet.  The default values of these
1953 19 jeremybenn
     parameters are `"eth_rx"' and `"eth_tx"' respectively.
1954
 
1955 82 jeremybenn
     The input file must exist and be readable.  The output file must be
1956
     writable and will be created if necessary.  If either of these
1957 19 jeremybenn
     conditions is not met, a warning will be given.
1958
 
1959
`sockif = "SERVICE"'
1960
     When `rtx_type' is 1 (see above), SERVICE specifies the service to
1961 82 jeremybenn
     use for communication.  This may be TCP/IP or UDP/IP.  The default
1962 19 jeremybenn
     value of this parameter is `"or1ksim_eth"'.
1963
 
1964
`vapi_id = VALUE'
1965
     VALUE specifies the value of the Verification API (VAPI) base
1966 82 jeremybenn
     address to be used with the Ethernet PHY.  *Note Verification API:
1967 19 jeremybenn
     Verification API, for more details, which details the use of the
1968
     VAPI with the DMA controller.
1969
 
1970
 
1971

1972
File: or1ksim.info,  Node: GPIO Configuration,  Next: Display Interface Configuration,  Prev: Ethernet Configuration,  Up: Peripheral Configuration
1973
 
1974
3.4.5 GPIO Configuration
1975
------------------------
1976
 
1977
The GPIO used in Or1ksim is the component implemented at OpenCores, and
1978 98 jeremybenn
found in the top level SVN directory, `gpio'.  It is described in the
1979 19 jeremybenn
document `GPIO IP Core Specification' by Damjan Lampret and Goran
1980 82 jeremybenn
Djakovic, which can be found in the `doc' subdirectory.  It is a memory
1981 19 jeremybenn
mapped component, which resides on the main OpenRISC Wishbone data bus.
1982
 
1983 82 jeremybenn
GPIO configuration is described in `section gpio'.  This section may
1984
appear multiple times, specifying multiple GPIO devices.  The following
1985 19 jeremybenn
parameters may be specified.
1986
 
1987
`enabled = 0|1'
1988 82 jeremybenn
     If 1 (true, the default), this GPIO is enabled.  If 0, it is
1989 19 jeremybenn
     disabled.
1990
 
1991
`baseaddr = VALUE'
1992
     Set the base address of the GPIO's memory mapped registers to
1993 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
1994 19 jeremybenn
 
1995
     The GPIO has a 6 bit address bus, with a total of 10 32-bit
1996
     registers, although the number of bits that are actively used
1997 82 jeremybenn
     varies.  Addresses 0x28 through 0x3c are not used.
1998 19 jeremybenn
 
1999
`irq = VALUE'
2000 82 jeremybenn
     Use VALUE as the IRQ number of this GPIO.  Default value 0.
2001 19 jeremybenn
 
2002
`vapi_id = VALUE'
2003
     VALUE specifies the value of the Verification API (VAPI) base
2004 82 jeremybenn
     address to be used with the GPIO.  *Note Verification API:
2005 19 jeremybenn
     Verification API, for more details, which details the use of the
2006 82 jeremybenn
     VAPI with the GPIO controller.  For backwards compatibility, the
2007 19 jeremybenn
     alternative name `base_vapi_id' is supported for this parameter,
2008
     but deprecated.
2009
 
2010
 
2011

2012
File: or1ksim.info,  Node: Display Interface Configuration,  Next: Frame Buffer Configuration,  Prev: GPIO Configuration,  Up: Peripheral Configuration
2013
 
2014
3.4.6 Display Interface Configuration
2015
-------------------------------------
2016
 
2017
Or1ksim models a VGA interface to an external monitor.  The VGA
2018
controller used in Or1ksim is the component implemented at OpenCores,
2019 98 jeremybenn
and found in the top level SVN directory, `vga_lcd', with no support
2020 82 jeremybenn
for the optional hardware cursors.  It is described in the document
2021 19 jeremybenn
`VGA/LCD Core v2.0 Specifications' by Richard Herveille, which can be
2022 82 jeremybenn
found in the `doc' subdirectory.  It is a memory mapped component,
2023
which resides on the main OpenRISC Wishbone data bus.
2024 19 jeremybenn
 
2025
The current implementation provides only functionality to dump the
2026
screen to a file at intervals.
2027
 
2028 82 jeremybenn
VGA controller configuration is described in `section vga'.  This
2029 19 jeremybenn
section may appear multiple times, specifying multiple VGA controllers.
2030
The following parameters may be specified.
2031
 
2032
`enabled = 0|1'
2033 82 jeremybenn
     If 1 (true, the default), this VGA is enabled.  If 0, it is
2034 19 jeremybenn
     disabled.
2035
 
2036
`baseaddr = VALUE'
2037
     Set the base address of the VGA controller's memory mapped
2038 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2039 19 jeremybenn
     sensible value.
2040
 
2041
     The VGA controller has a 12-bit address bus, with 7 32-bit
2042
     registers, at addresses 0x000 through 0x018, and two color lookup
2043 82 jeremybenn
     tables at addresses 0x800 through 0xfff.  The hardware cursor
2044 19 jeremybenn
     registers are not implemented, so addresses 0x01c through 0x7fc
2045
     are not used.
2046
 
2047
`irq = VALUE'
2048 82 jeremybenn
     Use VALUE as the IRQ number of this VGA controller.  Default value
2049 19 jeremybenn
     0.
2050
 
2051
`refresh_rate = VALUE'
2052 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2053 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2054
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2055
     50 times per simulated second.
2056
 
2057
`txfile = "FILE"'
2058
     FILE specifies the base of the filename for screen dumps.
2059
     Successive screen dumps will be in BMP format, in files with the
2060
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2061 82 jeremybenn
     screen dumps starting at zero.  The default value is `"vga_out"'.
2062 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2063
     supported for this parameter, but deprecated.
2064
 
2065
 
2066

2067
File: or1ksim.info,  Node: Frame Buffer Configuration,  Next: Keyboard Configuration,  Prev: Display Interface Configuration,  Up: Peripheral Configuration
2068
 
2069
3.4.7 Frame Buffer Configuration
2070
--------------------------------
2071
 
2072 82 jeremybenn
     Caution: The frame buffer is only partially implemented.  Its
2073 19 jeremybenn
     configuration fields are described here, but the component should
2074 82 jeremybenn
     not be used at this time.  Like the VGA controller, it is designed
2075 19 jeremybenn
     to make screen dumps to file.
2076
 
2077 82 jeremybenn
Frame buffer configuration is described in `section fb'.  This section
2078
may appear multiple times, specifying multiple frame buffers.  The
2079 19 jeremybenn
following parameters may be specified.
2080
 
2081
`enabled = 0|1'
2082 82 jeremybenn
     If 1 (true, the default), this frame buffer is enabled.  If 0, it
2083 19 jeremybenn
     is disabled.
2084
 
2085
`baseaddr = VALUE'
2086
     Set the base address of the frame buffer's memory mapped registers
2087 82 jeremybenn
     to VALUE.  The default is 0, which is probably not a sensible
2088
     value.
2089 19 jeremybenn
 
2090
     The frame buffer has an 121-bit address bus, with 4 32-bit
2091
     registers, at addresses 0x000 through 0x00c, and a PAL lookup
2092 82 jeremybenn
     table at addresses 0x400 through 0x4ff.  Addresses 0x010 through
2093 19 jeremybenn
     0x3fc and addresses 0x500 through 0x7ff are not used.
2094
 
2095
`refresh_rate = VALUE'
2096 82 jeremybenn
     VALUE specifies number of cycles between screen dumps.  Default
2097 19 jeremybenn
     value is derived from the simulation clock cycle time (*note
2098
     Simulator Behavior: Simulator Behavior.), to correspond to dumping
2099
     50 times per simulated second.
2100
 
2101
`txfile = "FILE"'
2102
     FILE specifies the base of the filename for screen dumps.
2103
     Successive screen dumps will be in BMP format, in files with the
2104
     name `FILENNNN.bmp', where NNNN is a sequential count of the
2105 82 jeremybenn
     screen dumps starting at zero.  The default value is `"fb_out"'.
2106 19 jeremybenn
     For backwards compatibility, the alternative name `filename' is
2107
     supported for this parameter, but deprecated.
2108
 
2109
 
2110

2111
File: or1ksim.info,  Node: Keyboard Configuration,  Next: Disc Interface Configuration,  Prev: Frame Buffer Configuration,  Up: Peripheral Configuration
2112
 
2113
3.4.8 Keyboard Configuration (PS2)
2114
----------------------------------
2115
 
2116 82 jeremybenn
The PS2 interface provided by Or1ksim is not documented.  It may be
2117 98 jeremybenn
based on the PS2 project at OpenCores, and found in the top level SVN
2118 82 jeremybenn
directory, `ps2'.  However this project lacks any documentation beyond
2119
its project webpage.  Since most PS2 interfaces follow the Intel i8042
2120 19 jeremybenn
standard, this is presumably what is expected with this device.
2121
 
2122
The implementation only provides for keyboard support, which is
2123 82 jeremybenn
modelled as a file of keystrokes.  There is no mouse support.
2124 19 jeremybenn
 
2125
     Caution: A standard i8042 device has two registers at addresses
2126 82 jeremybenn
     0x60 (command) and 0x64 (status).  Inspection of the code,
2127
     suggests that the Or1ksim component places these registers at
2128
     addresses 0x00 and 0x04.
2129 19 jeremybenn
 
2130
     The port of Linux for the OpenRISC 1000, which runs on Or1ksim
2131
     implements the i8042 device driver, anticipating these registers
2132 82 jeremybenn
     reside at their conventional address.  It seems unlikel that this
2133 19 jeremybenn
     code will work.
2134
 
2135
     This component should be used with caution.
2136
 
2137 82 jeremybenn
Keyboard configuration is described in `section kbd'.  This section may
2138
appear multiple times, specifying multiple keyboard interfaces.  The
2139 19 jeremybenn
following parameters may be specified.
2140
 
2141
`enabled = 0|1'
2142 82 jeremybenn
     If 1 (true, the default), this keyboard is enabled.  If 0, it is
2143 19 jeremybenn
     disabled.
2144
 
2145
`baseaddr = VALUE'
2146
     Set the base address of the keyboard's memory mapped registers to
2147 82 jeremybenn
     VALUE.  The default is 0, which is probably not a sensible value.
2148 19 jeremybenn
 
2149
     The keyboard PS/2 interface has an 3-bit address bus, with 2 8-bit
2150
     registers, at addresses 0x000 and 0x004.
2151
 
2152
          Caution: As noted above, a standard Intel 8042 interface
2153
          would expect to find these registers at locations 0x60 and
2154
          0x64, thus requiring at least a 7-bit bus.
2155
 
2156
`irq = VALUE'
2157 82 jeremybenn
     Use VALUE as the IRQ number of this Keyboard interface.  Default
2158 19 jeremybenn
     value 0.
2159
 
2160
`rxfile = "FILE"'
2161
     `file' specifies a file containing raw key stroke data, which
2162 82 jeremybenn
     models the input from a physical keyboard.  The default value is
2163 19 jeremybenn
     `"kbd_in"'.
2164
 
2165
 
2166

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

2302
File: or1ksim.info,  Node: Generic Peripheral Configuration,  Prev: Disc Interface Configuration,  Up: Peripheral Configuration
2303
 
2304
3.4.10 Generic Peripheral Configuration
2305
---------------------------------------
2306
 
2307
When used as a library (*note Simulator Library: Simulator Library.),
2308
Or1ksim makes provision for any additional peripheral to be implemented
2309 82 jeremybenn
externally.  Any read or write access to this peripheral's memory map
2310
generates "upcall"s to an external handler.  This interface can support
2311 19 jeremybenn
either C or C++, and was particularly designed to facilitate support
2312
for OSCI SystemC (see `http://www.systemc.org').
2313
 
2314
Generic peripheral configuration is described in `section generic'.
2315
This section may appear multiple times, specifying multiple external
2316 82 jeremybenn
peripherals.  The following parameters may be specified.
2317 19 jeremybenn
 
2318
`enabled = 0|1'
2319 82 jeremybenn
     If 1 (true, the default), this ATA/ATAPI interface is enabled.  If
2320 19 jeremybenn
     0, it is disabled.
2321
 
2322
`baseaddr = VALUE'
2323
     Set the base address of the generic peripheral's memory mapped
2324 82 jeremybenn
     registers to VALUE.  The default is 0, which is probably not a
2325 19 jeremybenn
     sensible value.
2326
 
2327
     The size of the memory mapped register space is controlled by the
2328
     `size' paramter, described below.
2329
 
2330
`size = VALUE'
2331
     Set the size of the generic peripheral's memory mapped register
2332 82 jeremybenn
     space to VALUE bytes.  Any read or write accesses to addresses with
2333 19 jeremybenn
     offsets of 0 to VALUE-1 bytes from the base address specified in
2334
     parameter `baseaddr' (see above) will be directed to the external
2335
     interface.
2336
 
2337 82 jeremybenn
     VALUE will be rounded up the nearest power of 2.  It's default
2338
     value is zero.  If VALUE is not an exact power of two, accesses to
2339 19 jeremybenn
     address offsets of VALUE or above up to the next power of 2 will
2340
     generate a warning, and have no effect (reads will return zero).
2341
 
2342
`name = "STR"'
2343 82 jeremybenn
     This gives the peripheral the name `"STR"'.  This is used to
2344 19 jeremybenn
     identify the peripheral in error messages and warnings, and when
2345 82 jeremybenn
     reporting its status.  The default value is
2346 19 jeremybenn
     `"anonymous external peripheral"'.
2347
 
2348
`byte_enabled = 0|1'
2349
`hw_enabled = 0|1'
2350
`word_enabled = 0|1'
2351
     If 1 (true, the default), these parameters respectively enable the
2352 82 jeremybenn
     device for byte wide, half-word wide and word wide accesses.  If 0,
2353 19 jeremybenn
     accesses of that width will fail.
2354
 
2355
 
2356

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

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

2676
File: or1ksim.info,  Node: Code Internals,  Next: GNU Free Documentation License,  Prev: Verification API,  Up: Top
2677
 
2678
6 A Guide to Or1ksim Internals
2679
******************************
2680
 
2681 82 jeremybenn
These are notes to help those wanting to extend Or1ksim.  This section
2682 19 jeremybenn
assumes the use of a tag file, so file locations of entities'
2683 82 jeremybenn
definitions are not in general provided.  For more on tags, see the
2684
Linux manual page for `etags'.  A tag file can be created with:
2685 19 jeremybenn
 
2686
     make tags
2687
 
2688
* Menu:
2689
 
2690
* Coding Conventions::
2691
* Global Data Structures::
2692
* Concepts::
2693
* Internal Debugging::
2694 104 jeremybenn
* Regression Testing::
2695 19 jeremybenn
 
2696

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

2816
File: or1ksim.info,  Node: Global Data Structures,  Next: Concepts,  Prev: Coding Conventions,  Up: Code Internals
2817
 
2818
6.2 Global Data Structures
2819
==========================
2820
 
2821
`config'
2822
     The global variable `config' of type `struct config' holds the
2823
     configuration data for some of the Or1ksim components which are
2824 82 jeremybenn
     always present.  At present the components are:
2825 19 jeremybenn
 
2826
        * The simulator defined in `section sim' (*note Simulator
2827
          Configuration: Simulator Configuration.).
2828
 
2829
        * The Verification API (VAPI) defined  in `section vapi' (*note
2830
          Verification API (VAPI) Configuration: Verification API
2831
          Configuration.).
2832
 
2833
        * The Custom Unit Compiler (CUC), defined in `section cuc'
2834
          (*note Custom Unit Compiler (CUC) Configuration: CUC
2835
          Configuration.).
2836
 
2837
        * The CPU, defined in `section cpu' (*note CPU Configuration:
2838
          CPU Configuration.).
2839
 
2840
        * The data cache (but not the instruction cache), defined in
2841
          `section dc' (*note Cache Configuration: Cache
2842
          Configuration.).
2843
 
2844
        * The power management unit, defined in `section pm' (*note
2845
          Power Management Configuration: Power Management
2846
          Configuration.).
2847
 
2848
        * The programmable interrupt controller, defined in
2849
          `section pic' (*note Interrupt Configuration: Interrupt
2850
          Configuration.).
2851
 
2852
        * Branch prediciton, defined in `section bpb' (*note Branch
2853
          Prediction Configuration: Branch Prediction Configuration.).
2854
 
2855
        * The debug unit, defined in `section debug' (*note Debug
2856
          Interface Configuration: Debug Interface Configuration.).
2857
 
2858
 
2859
     This struct is made of a collection of structs, one for each
2860 82 jeremybenn
     component.  For example the simulator configuration is held in
2861 19 jeremybenn
     `config.sim'.
2862
 
2863
`config'
2864
     This is a linked list of data structures holding configuration data
2865
     for all sections which are not held in the main `config' data
2866 82 jeremybenn
     structure.  In general these are components (such as peripherals
2867
     and memory) which may occur multiple times.  However it also
2868
     handles some architectural components which may occur only once,
2869
     such as the memory management units, the instruction cache, the
2870
     interrupt controller and branch prediction.
2871 19 jeremybenn
 
2872
`runtime'
2873
     The global variable `runtime' of type `struct runtime' holds all
2874 82 jeremybenn
     the runtime information about the simulation.  To access this
2875 19 jeremybenn
     variable, `sim-config.h' must be included.
2876
 
2877
     This struct is itself made of 3 other structs, `cpu' (for CPU run
2878
     time state), `vapi' (for Verification API state) and `cuc' (for
2879
     Custom Unit Compiler state).
2880
 
2881
 
2882

2883
File: or1ksim.info,  Node: Concepts,  Next: Internal Debugging,  Prev: Global Data Structures,  Up: Code Internals
2884
 
2885
6.3 Concepts
2886
============
2887
 
2888
_Output Redirection_
2889 82 jeremybenn
     The current output stream is held in `runtime.cpu.fout'.  Output
2890 19 jeremybenn
     should be explicitly written to this stream, or may use the
2891
     `PRINTF' macro, which will write its arguments to this output
2892
     stream.
2893
 
2894
_Reset Hooks_
2895
     Any peripheral may register a routine to be called when the the
2896
     processor is reset by calling `reg_sim_reset', providing a
2897 82 jeremybenn
     function and pointer to a data structure as arguments.  On reset
2898 19 jeremybenn
     that function will be called with the data stucture pointer as
2899
     argument.
2900
 
2901
 
2902

2903 104 jeremybenn
File: or1ksim.info,  Node: Internal Debugging,  Next: Regression Testing,  Prev: Concepts,  Up: Code Internals
2904 19 jeremybenn
 
2905
6.4 Internal Debugging
2906
======================
2907
 
2908
The function `debug' is like `printf', but with an extra first
2909 82 jeremybenn
argument, which is the debug level.  If the debug level specified in
2910
the simulator configuration (*note Simulator Behavior: Simulator
2911
Behavior.) is greater than or equal to this value, the remaining
2912
arguments are printed to the current output stream (*note Output
2913
Redirection: Output Redirection.).
2914 19 jeremybenn
 
2915

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

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

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

4328
Tag Table:
4329 202 julius
Node: Top830
4330
Node: Installation1240
4331
Node: Preparation1487
4332
Node: Configuring the Build1782
4333
Node: Build and Install7896
4334
Node: Known Issues8742
4335
Node: Usage11804
4336
Node: Standalone Simulator12018
4337
Node: Profiling Utility14921
4338
Node: Memory Profiling Utility15831
4339
Node: Simulator Library17196
4340
Node: Configuration24974
4341
Node: Configuration File Format25583
4342
Node: Configuration File Preprocessing25875
4343
Node: Configuration File Syntax26246
4344
Node: Simulator Configuration29031
4345
Node: Simulator Behavior29322
4346
Node: Verification API Configuration33855
4347
Node: CUC Configuration35795
4348
Node: Core OpenRISC Configuration37712
4349
Node: CPU Configuration38214
4350
Node: Memory Configuration42332
4351
Node: Memory Management Configuration48790
4352
Node: Cache Configuration51167
4353
Node: Interrupt Configuration53553
4354
Node: Power Management Configuration54289
4355
Node: Branch Prediction Configuration55566
4356
Node: Debug Interface Configuration56926
4357
Node: Peripheral Configuration61146
4358
Node: Memory Controller Configuration61772
4359
Node: UART Configuration65186
4360
Node: DMA Configuration68705
4361
Node: Ethernet Configuration70572
4362
Node: GPIO Configuration74548
4363
Node: Display Interface Configuration76181
4364
Node: Frame Buffer Configuration78490
4365
Node: Keyboard Configuration80354
4366
Node: Disc Interface Configuration82592
4367
Node: Generic Peripheral Configuration87535
4368
Node: Interactive Command Line89830
4369
Node: Verification API96804
4370
Node: Code Internals101234
4371
Node: Coding Conventions101817
4372
Node: Global Data Structures106244
4373
Node: Concepts108901
4374
Ref: Output Redirection109046
4375
Node: Internal Debugging109585
4376
Node: Regression Testing110109
4377
Node: GNU Free Documentation License113904

powered by: WebSVN 2.1.0

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