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

Subversion Repositories openrisc

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

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

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

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

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

59
File: or1ksim.info,  Node: Preparation,  Next: Configuring the Build,  Up: Installation
60
 
61
1.1 Preparation
62
===============
63
 
64
Unpack the software and create a _separate_ directory in which to build
65
it:
66
 
67 123 jeremybenn
     tar jxf or1ksim-2010-06-15.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 123 jeremybenn
     ../or1ksim-2010-06-15/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
`--enable-range-stats'
139
`--disable-range-stats'
140
     If enabled, this option allows statistics to be collected to
141 82 jeremybenn
     analyse register access over time.  The default is for this to be
142 19 jeremybenn
     disabled.
143
 
144
`--enable-debug'
145
`--disable-debug'
146
     This is a feature of the Argtable2 package used to process
147 82 jeremybenn
     arguments.  If enabled, some debugging features are turned on in
148
     Argtable2.  It is provided for completeness, but there is no
149
     reason why this feature should ever be needed by any Or1ksim user.
150 19 jeremybenn
 
151 82 jeremybenn
`--enable-all-tests'
152
`--disable-all-tests'
153
     Some of the tests (at the time of writing just one) will not
154
     compile without error.  If enabled with this flag, all test
155
     programs will be compiled with `make check'.
156 19 jeremybenn
 
157 82 jeremybenn
     This flag is intended for those working on the test package, who
158
     wish to get the missing test(s) working.
159
 
160
 
161 112 jeremybenn
A number of configuration flags have been removed since version 0.3.0,
162 124 jeremybenn
because they led to invalid behavior of Or1ksim. Those removed are:
163 112 jeremybenn
 
164 124 jeremybenn
`--enable-arith-flag'
165
`--disable-arith-flag'
166
     If enabled, this option caused certain instructions to set the flag
167
     (`F' bit) in the supervision register if the result were zero.
168
     The instructions affected by this were `l.add', `l.addc',
169
     `l.addi', `l.and' and `l.andi'.
170
 
171
     If set, this caused incorrect behavior. Whether or not flags are
172
     set is part of the OpenRISC 1000 architectural specification.  The
173
     only flags which should set this are the "set flag" instructions:
174
     `l.sfeq', `l.sfeqi', `l.sfges', `l.sfgesi', `l.sfgeu', `l.sfgeui',
175
     `l.sfgts', `l.sfgtsi', `l.sfgtu', `l.sfgtui', `l.sfles',
176
     `l.sflesi', `l.sfleu', `l.sfleui', `l.sflts', `l.sfltsi',
177
     `l.sfltu', `l.sfltui', `l.sfne' and `l.sfnei'.
178
 
179 112 jeremybenn
`--enable-ov-flag'
180
`--disable-ov-flag'
181 124 jeremybenn
     This flag caused certain instructions to set the overflow flag.
182
     If not, those instructions would not set the overflow flat.  The
183
     instructions affected by this were `l.add', `l.addc', `l.addi',
184
     `l.and', `l.andi', `l.div', `l.divu', `l.mul', `l.muli', `l.or',
185
     `l.ori', `l.sll', `l.slli', `l.srl', `l.srli', `l.sra', `l.srai',
186
     `l.sub', `l.xor' and `l.xori'.
187 112 jeremybenn
 
188
     This guaranteed incorrect behavior.  The OpenRISC 1000 architecture
189
     specification defines which flags are set by which instructions.
190
 
191
     Within the above list, the arithmetic instructions (`l.add',
192
     `l.addc', `l.addi', `l.div', `l.divu', `l.mul', `l.muli' and
193
     `l.sub'), together with `l.addic' which is missed out, set the
194
     overflow flag.  All the others (`l.and', `l.andi', `l.or',
195
     `l.ori', `l.sll', `l.slli', `l.srl', `l.srli', `l.sra', `l.srai',
196
     `l.xor' and `l.xori') do not.
197
 
198
 
199 19 jeremybenn

200
File: or1ksim.info,  Node: Build and Install,  Next: Known Issues,  Prev: Configuring the Build,  Up: Installation
201
 
202
1.3 Building and Installing
203
===========================
204
 
205 82 jeremybenn
Build the tool with:
206 19 jeremybenn
 
207
     make all
208 82 jeremybenn
 
209
If you have the OpenRISC tool chain and DejaGNU installed, you can
210
verify the tool as follows (otherwise omit this step):
211
 
212
     make check
213
 
214
Install the tool with:
215
 
216 19 jeremybenn
     make install
217
 
218
This will install the three variations of the Or1ksim tool,
219
`or32-uclinux-sim', `or32-uclinux-psim' and `or32-uclinux-mpsim', the
220
Or1ksim library, `libsim', the header file, `or1ksim.h' and this
221
documentation in `info' format.
222
 
223
     Note: Testing Or1ksim with `make check' is not yet supported.
224
 
225
The documentation may be created and installed in alternative formats
226
(PDF, Postscript, DVI, HTML) with for example:
227
 
228
     make pdf
229
     make install-pdf
230
 
231

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

295
File: or1ksim.info,  Node: Usage,  Next: Configuration,  Prev: Installation,  Up: Top
296
 
297
2 Usage
298
*******
299
 
300
* Menu:
301
 
302
* Standalone Simulator::
303
* Profiling Utility::
304
* Memory Profiling Utility::
305
* Simulator Library::
306
 
307

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

388
File: or1ksim.info,  Node: Profiling Utility,  Next: Memory Profiling Utility,  Prev: Standalone Simulator,  Up: Usage
389
 
390
2.2 Profiling Utility
391
=====================
392
 
393 82 jeremybenn
This utility analyses instruction profile data generated by Or1ksim.
394
It may be invoked as a standalone command, or from the Or1ksim CLI.
395
The general form the standalone command is:
396 19 jeremybenn
 
397
     or32-uclinux-profile [-vhcq] [-g=FILE]
398
 
399 82 jeremybenn
Many of the options have both a short and a long form.  For example
400
`-h' or `--help'.
401 19 jeremybenn
 
402
`-v'
403
`--version'
404
     Print out the version and copyright notice for the Or1ksim
405
     profiling utility and exit.
406
 
407
`-h'
408
`--help'
409
     Print out help about the command line options and what they mean.
410
 
411
`-c'
412
`--cumulative'
413
     Show cumulative sum of cycles in functions
414
 
415
`-q'
416
`--quiet'
417
     Suppress messages
418
 
419
`-g=FILE'
420
`--generate=FILE'
421 82 jeremybenn
     The data file to analyse.  If omitted, the default file,
422 19 jeremybenn
     `sim.profile' is used.
423
 
424
 
425

426
File: or1ksim.info,  Node: Memory Profiling Utility,  Next: Simulator Library,  Prev: Profiling Utility,  Up: Usage
427
 
428
2.3 Memory Profiling Utility
429
============================
430
 
431 82 jeremybenn
This utility analyses memory profile data generated by Or1ksim.  It may
432
be invoked as a standalone command, or from the Or1ksim CLI.  The
433 19 jeremybenn
general form the standalone command is:
434
 
435
     or32-uclinux-mprofile  [-vh] [-m=M] [-g=N] [-f=FILE] FROM TO
436
 
437 82 jeremybenn
Many of the options have both a short and a long form.  For example
438
`-h' or `--help'.
439 19 jeremybenn
 
440
`-v'
441
`--version'
442
     Print out the version and copyright notice for the Or1ksim memory
443
     profiling utility and exit.
444
 
445
`-h'
446
`--help'
447
     Print out help about the command line options and what they mean.
448
 
449
`-m=M'
450
`--mode=M'
451 82 jeremybenn
     Specify the mode out output.  Permitted options are
452 19 jeremybenn
 
453
    `detailed'
454
    `d'
455 82 jeremybenn
          Detailed output.  This is the default if no mode is specified.
456 19 jeremybenn
 
457
    `pretty'
458
    `p'
459
          Pretty printed output.
460
 
461
    `access'
462
    `a'
463
          Memory accesses only.
464
 
465
    `width'
466
    `w'
467
          Access width only.
468
 
469
 
470
`-g=N'
471
`--group=N'
472
     Group 2^n bits of successive addresses together.
473
 
474
`-f=FILE'
475
`--filename=FILE'
476 82 jeremybenn
     The data file to analyse.  If not specified, the default,
477 19 jeremybenn
     `sim.profile' is used.
478
 
479
`FROM'
480
`TO'
481
     FROM and TO are respectively the start and end address of the
482
     region of memory to be analysed.
483
 
484
 
485

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

670
File: or1ksim.info,  Node: Configuration,  Next: Interactive Command Line,  Prev: Usage,  Up: Top
671
 
672
3 Configuration
673
***************
674
 
675 82 jeremybenn
Or1ksim is configured through a configuration file.  This is specified
676 19 jeremybenn
through the `-f' parameter to the Or1ksim command, or passed as a
677 82 jeremybenn
string when initializing the Or1ksim library.  If no file is specified,
678
the default `sim.cfg' is used.  The file is looked for first in the
679 19 jeremybenn
current directory, then in the `$HOME/.or1k' directory of the user.
680
 
681
* Menu:
682
 
683
* Configuration File Format::
684
* Simulator Configuration::
685
* Core OpenRISC Configuration::
686
* Peripheral Configuration::
687
 
688

689
File: or1ksim.info,  Node: Configuration File Format,  Next: Simulator Configuration,  Up: Configuration
690
 
691
3.1 Configuration File Format
692
=============================
693
 
694
The configuration file is a plain text file.
695
 
696
* Menu:
697
 
698
* Configuration File Preprocessing::
699
* Configuration File Syntax::
700
 
701

702
File: or1ksim.info,  Node: Configuration File Preprocessing,  Next: Configuration File Syntax,  Up: Configuration File Format
703
 
704
3.1.1 Configuration File Preprocessing
705
--------------------------------------
706
 
707 82 jeremybenn
The configuration file may include C style comments (i.e.  delimited by
708 19 jeremybenn
`/*' and `*/').
709
 
710
Configure files may be included, using
711
 
712
     include FILENAME_TO_INCLUDE
713
 
714

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

795
File: or1ksim.info,  Node: Simulator Configuration,  Next: Core OpenRISC Configuration,  Prev: Configuration File Format,  Up: Configuration
796
 
797
3.2 Simulator Configuration
798
===========================
799
 
800
* Menu:
801
 
802
* Simulator Behavior::
803
* Verification API Configuration::
804
* CUC Configuration::
805
 
806

807
File: or1ksim.info,  Node: Simulator Behavior,  Next: Verification API Configuration,  Up: Simulator Configuration
808
 
809
3.2.1 Simulator Behavior
810
------------------------
811
 
812 82 jeremybenn
Simulator behavior is described in `section sim'.  This section should
813
appear only once.  The following parameters may be specified.
814 19 jeremybenn
 
815
`verbose = 0|1'
816 82 jeremybenn
     If 1 (true), print extra messages.  Default 0.
817 19 jeremybenn
 
818
`debug = 0-9'
819 82 jeremybenn
 
820
     higher the value the greater the number of messages.  Default 0.
821
     Negative values will be treated as 0 (with a warning).  Values
822
     that are too large will be treated as 9 (with a warning).
823 19 jeremybenn
 
824
`profile = 0|1'
825
     If 1 (true) generate a profiling file using the file specified in
826 82 jeremybenn
     the `prof_file' parameter or otherwise `sim.profile'.  Default 0.
827 19 jeremybenn
 
828
`prof_file = ``FILENAME'''
829 82 jeremybenn
     Specifies the file to be used with the `profile' parameter.
830
     Default `sim.profile'.  For backwards compatibility, the
831
     alternative name `prof_fn' is supported for this parameter, but
832
     deprecated.
833 19 jeremybenn
 
834
`mprofile = 0|1'
835
     If 1 (true) generate a memory profiling file using the file
836
     specified in the `mprof_file' parameter or otherwise
837 82 jeremybenn
     `sim.mprofile'.  Default 0.
838 19 jeremybenn
 
839
`mprof_fn = ``FILENAME'''
840
     Specifies the file to be used with the `mprofile' parameter.
841 82 jeremybenn
     Default `sim.mprofile'.  For backwards compatibility, the
842 19 jeremybenn
     alternative name `mprof_fn' is supported for this parameter, but
843
     deprecated.
844
 
845
`history = 0|1'
846 82 jeremybenn
     If 1 (true) track execution flow.  Default 0.
847 19 jeremybenn
 
848
          Note: Setting this parameter seriously degrades performance.
849
 
850
          Note: If this execution flow tracking is enabled, then
851
          `dependstats' must be enabled in the CPU configuration
852
          section (*note CPU Configuration: CPU Configuration.).
853
 
854
`exe_log = 0|1'
855 82 jeremybenn
     If 1 (true), generate an execution log.  Log is written to the
856
     file specified in parameter `exe_log_file'.  Default 0.
857 19 jeremybenn
 
858
          Note: Setting this parameter seriously degrades performance.
859
 
860
`exe_log_type = default|hardware|simple|software'
861
     Type of execution log to produce.
862
 
863
    `default'
864 82 jeremybenn
          Produce default output for the execution log.  In the current
865 19 jeremybenn
          implementation this is the equivalent of `hardware'.
866
 
867
    `hardware'
868
          After each instruction execution, log the number of
869
          instructions executed so far, the next instruction to execute
870
          (in hex), the general purpose registers (GPRs), status
871
          register, exception program counter, exception, effective
872
          address register and exception status register.
873
 
874
    `simple'
875
          After each instruction execution, log the number of
876
          instructions executed so far and the next instruction to
877
          execute, symbolically disassembled.
878
 
879
    `software'
880
          After each instruction execution, log the number of
881
          instructions executed so far and the next instruction to
882 82 jeremybenn
          execute, symbolically disassembled.  Also show the value of
883 19 jeremybenn
          each operand to the instruction.
884
 
885
 
886 82 jeremybenn
     Default value `hardware'.  Any unrecognized keyword (case
887 19 jeremybenn
     insensitive) will be treated as the default with a warning.
888
 
889
          Note: Execution logs can be _very_ big.
890
 
891
`exe_log_start = VALUE'
892 82 jeremybenn
     Address of the first instruction to start logging.  Default 0.
893 19 jeremybenn
 
894
`exe_log_end = VALUE'
895 82 jeremybenn
     Address of the last instruction to log.  Default no limit (i.e
896
     once started logging will continue until the simulator exits).
897 19 jeremybenn
 
898
`exe_log_marker = VALUE'
899
     Specifies the number of instructions between printing horizontal
900 82 jeremybenn
     markers.  Default is to produce no markers.
901 19 jeremybenn
 
902
`exe_log_file = FILENAME'
903
     Filename for the execution log filename if `exe_log' is enabled.
904 82 jeremybenn
     Default `executed.log'.  For backwards compatibility, the
905 19 jeremybenn
     alternative name `exe_log_fn' is supported for this parameter, but
906
     deprecated.
907
 
908
`clkcycle = VALUE[ps|ns|us|ms]'
909 82 jeremybenn
     Specify the time taken by one clock cycle.  If no units are
910
     specified, `ps' is assumed.  Default 4000ps (250MHz).
911 19 jeremybenn
 
912
 
913

914
File: or1ksim.info,  Node: Verification API Configuration,  Next: CUC Configuration,  Prev: Simulator Behavior,  Up: Simulator Configuration
915
 
916
3.2.2 Verification API (VAPI) Configuration
917
-------------------------------------------
918
 
919
The Verification API (VAPI) provides a TCP/IP interface to allow
920 82 jeremybenn
components of the simulation to be controlled externally.  *Note
921 19 jeremybenn
Verification API: Verification API, for more details.
922
 
923 82 jeremybenn
Verification API configuration is described in `section vapi'.  This
924
section may appear at most once.  The following parameters may be
925 19 jeremybenn
specified.
926
 
927
`enabled = 0|1'
928
     If 1 (true), verification API is enabled and its server started.
929
     If 0 (the default), it is disabled.
930
 
931
`server_port = VALUE'
932
     When VAPI is enabled, communication will be via TCP/IP on the port
933 82 jeremybenn
     specified by VALUE.  The value must lie in the range 1 to 65535.
934 19 jeremybenn
     The default value is 50000.
935
 
936 82 jeremybenn
          Tip: There is no registered port for Or1ksim VAPI.  Good
937 19 jeremybenn
          practice suggests users should adopt port values in the
938 82 jeremybenn
          "Dynamic" or "Private" port range, i.e.  49152-65535.
939 19 jeremybenn
 
940
`log_enabled = 0|1'
941
     If 1 (true), all VAPI requests and sent commands will be logged.
942 82 jeremybenn
     If 0 (the default), logging is diabled.  Logs are written to the
943 19 jeremybenn
     file specified by the `vapi_log_file' field (see below).
944
 
945
          Caution: This can generate a substantial amount of file I/O
946
          and seriously degrade simulator performance.
947
 
948
`hide_device_id = 0|1'
949 82 jeremybenn
     If 1 (true) don't log the device ID.  If 0 (the default), log the
950
     device ID.  This feature (when set to 1) is provided for backwards
951 19 jeremybenn
     compatibility with an old version of VAPI.
952
 
953
`vapi_log_file = "FILENAME"'
954
     Use `filename' as the file for logged data is logging is enabled
955 82 jeremybenn
     (see `log_enabled' above).  The default is `"vapi.log"'.  For
956 19 jeremybenn
     backwards compatibility, the alternative name `vapi_log_fn' is
957
     supported for this parameter, but deprecated.
958
 
959
 
960

961
File: or1ksim.info,  Node: CUC Configuration,  Prev: Verification API Configuration,  Up: Simulator Configuration
962
 
963
3.2.3 Custom Unit Compiler (CUC) Configuration
964
----------------------------------------------
965
 
966
The Custom Unit Compiler (CUC) was a project by Marko Mlinar to generate
967 82 jeremybenn
Verilog from ANSI C functions.  The project seems to not have progressed
968
beyond the initial prototype phase.  The configuration parameters are
969 19 jeremybenn
described here for the record.
970
 
971 82 jeremybenn
CUC configuration is described in `section cuc'.  This section may
972
appear at most once.  The following parameters may be specified.
973 19 jeremybenn
 
974
`memory_order = none|weak|strong|exact'
975
     This parameter specifies the memory ordering required:
976
 
977
    `memory_order=none'
978
          Different memory ordering, even if there are dependencies.
979
          Bursts can be made, width can change.
980
 
981 82 jeremybenn
          Different memory ordering, even if there are dependencies.  If
982 19 jeremybenn
          dependencies cannot occur, then bursts can be made, width can
983
          change.
984
 
985 82 jeremybenn
          Same memory ordering.  Bursts can be made, width can change.
986 19 jeremybenn
 
987
          Exactly the same memory ordering and widths.
988
 
989
 
990 82 jeremybenn
     The default value is `memory_order=exact'.  Invalid memory
991 19 jeremybenn
     orderings are ignored with a warning.
992
 
993
`calling_convention = 0|1'
994 82 jeremybenn
     If 1 (true), programs follow OpenRISC calling conventions.  If 0
995 19 jeremybenn
     (the default), they may use other convenitions.
996
 
997
`enable_bursts = 0 | 1'
998 82 jeremybenn
     If 1 (true), bursts are detected.  If 0 (the default), bursts are
999 19 jeremybenn
     not detected.
1000
 
1001
`no_multicycle = 0 | 1'
1002 82 jeremybenn
     If 1 (true), no multicycle logic paths will be generated.  If 0
1003
     (the default), multicycle logic paths will be generated.
1004 19 jeremybenn
 
1005
`timings_file = "FILENAME"'
1006 82 jeremybenn
     FILENAME specifies a file containing timing information.  The
1007
     default value is `"virtex.tim"'.  For backwards compatibility, the
1008 19 jeremybenn
     alternative name `timings_fn' is supported for this parameter, but
1009
     deprecated.
1010
 
1011
 
1012

1013
File: or1ksim.info,  Node: Core OpenRISC Configuration,  Next: Peripheral Configuration,  Prev: Simulator Configuration,  Up: Configuration
1014
 
1015
3.3 Configuring the OpenRISC Architectural Components
1016
=====================================================
1017
 
1018
* Menu:
1019
 
1020
* CPU Configuration::
1021
* Memory Configuration::
1022
* Memory Management Configuration::
1023
* Cache Configuration::
1024
* Interrupt Configuration::
1025
* Power Management Configuration::
1026
* Branch Prediction Configuration::
1027
* Debug Interface Configuration::
1028
 
1029

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

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

1297
File: or1ksim.info,  Node: Memory Management Configuration,  Next: Cache Configuration,  Prev: Memory Configuration,  Up: Core OpenRISC Configuration
1298
 
1299
3.3.3 Memory Management Configuration
1300
-------------------------------------
1301
 
1302
Memory Management Unit (MMU) configuration is described in `section
1303
dmmu' (for the data MMU) and `section immu' (for the instruction MMU).
1304 82 jeremybenn
Each section should appear at most once.  The following parameters may
1305 19 jeremybenn
be specified.
1306
 
1307
`enabled = 0|1'
1308
     If 1 (true), the data or instruction (as appropriate) MMU is
1309 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1310 19 jeremybenn
 
1311
`nsets = VALUE'
1312
     Sets the number of data or instruction (as appropriate) TLB sets to
1313 82 jeremybenn
     VALUE, which must be a power of two, not exceeding 128.  Values
1314
     which do not fit these criteria are ignored with a warning.  The
1315 19 jeremybenn
     default value is 1.
1316
 
1317
`nways = VALUE'
1318
     Sets the number of data or instruction (as appropriate) TLB ways to
1319 82 jeremybenn
     VALUE.  The value must be in the range 1 to 4.  Values outside
1320
     this range are ignored with a warning.  The default value is 1.
1321 19 jeremybenn
 
1322
`pagesize = VALUE'
1323
     The data or instruction (as appropriate) MMU page size is set to
1324 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1325
     of 2 are ignored with a warning.  The default is 8192 (0x2000).
1326 19 jeremybenn
 
1327
`entrysize = VALUE'
1328
     The data or instruction (as appropriate) MMU entry size is set to
1329 82 jeremybenn
     VALUE, which must be a power of 2.  Values which are not a power
1330
     of 2 are ignored with a warning.  The default value is 1.
1331 19 jeremybenn
 
1332
          Note: Or1ksim does not appear to use the `entrysize' parameter
1333 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1334 19 jeremybenn
          not seem to matter.
1335
 
1336
`ustates = VALUE'
1337
     The number of instruction usage states for the data or instruction
1338
     (as appropriate) MMU is set to VALUE, which must be 2, 3 or 4.
1339 82 jeremybenn
     Values outside this range are ignored with a warning.  The default
1340 19 jeremybenn
     value is 2.
1341
 
1342
          Note: Or1ksim does not appear to use the `ustates' parameter
1343 82 jeremybenn
          in its simulation of the MMUs.  Thus setting this value does
1344 19 jeremybenn
          not seem to matter.
1345
 
1346
`hitdelay = VALUE'
1347
     Set the number of cycles a data or instruction (as appropriate) MMU
1348 82 jeremybenn
     hit costs.  Default value 1.
1349 19 jeremybenn
 
1350
`missdelay = VALUE'
1351
     Set the number of cycles a data or instruction (as appropriate) MMU
1352 82 jeremybenn
     miss costs.  Default value 1.
1353 19 jeremybenn
 
1354
 
1355

1356
File: or1ksim.info,  Node: Cache Configuration,  Next: Interrupt Configuration,  Prev: Memory Management Configuration,  Up: Core OpenRISC Configuration
1357
 
1358
3.3.4 Cache Configuration
1359
-------------------------
1360
 
1361
Cache configuration is described in `section dc' (for the data cache)
1362 82 jeremybenn
and `seciton ic' (for the instruction cache).  Each section should
1363
appear at most once.  The following parameters may be specified.
1364 19 jeremybenn
 
1365
`enabled = 0|1'
1366
     If 1 (true), the data or instruction (as appropriate) cache is
1367 82 jeremybenn
     enabled.  If 0 (the default), it is disabled.
1368 19 jeremybenn
 
1369
`nsets = VALUE'
1370
     Sets the number of data or instruction (as appropriate) cache sets
1371
     to VALUE, which must be a power of two, not exceeding
1372
     `MAX_DC_SETS' (for the data cache) or `MAX_IC_SETS' (for the
1373 82 jeremybenn
     instruction cache).  At the time of writing, these constants are
1374
     both defined in the code to be 1024).  The default value is 1.
1375 19 jeremybenn
 
1376
`nways = VALUE'
1377
     Sets the number of data or instruction (as appropriate) cache ways
1378
     to VALUE, which must be a power of two, not exceeding
1379
     `MAX_DC_WAYS' (for the data cache) or `MAX_IC_WAYS' (for the
1380 82 jeremybenn
     instruction cache).  At the time of writing, these constants are
1381
     both defined in the code to be 32).  The default value is 1.
1382 19 jeremybenn
 
1383
`blocksize = VALUE'
1384
     The data or instruction (as appropriate) cache block size is set to
1385 82 jeremybenn
     VALUE bytes, which must be either 16 or 32.  The default is 16.
1386 19 jeremybenn
 
1387
`ustates = VALUE'
1388
     The number of instruction usage states for the data or instruction
1389
     (as appropriate) cache is set to VALUE, which must be 2, 3 or 4.
1390
     The default value is 2.
1391
 
1392
`hitdelay = VALUE'
1393 82 jeremybenn
     _Instruction cache only_.  Set the number of cycles an instruction
1394
     cache hit costs.  Default value 1.
1395 19 jeremybenn
 
1396
`missdelay = VALUE'
1397 82 jeremybenn
     _Instruction cache only_.  Set the number of cycles an instruction
1398
     cache miss costs.  Default value 1.
1399 19 jeremybenn
 
1400
`load_hitdelay = VALUE'
1401 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data load cache hit
1402
     costs.  Default value 2.
1403 19 jeremybenn
 
1404
`load_missdelay = VALUE'
1405 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data load cache
1406
     miss costs.  Default value 2.
1407 19 jeremybenn
 
1408
`store_hitdelay = VALUE'
1409 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data store cache hit
1410
     costs.  Default value 0.
1411 19 jeremybenn
 
1412
`store_missdelay = VALUE'
1413 82 jeremybenn
     _Data cache only_.  Set the number of cycles a data store cache
1414
     miss costs.  Default value 0.
1415 19 jeremybenn
 
1416
 
1417

1418
File: or1ksim.info,  Node: Interrupt Configuration,  Next: Power Management Configuration,  Prev: Cache Configuration,  Up: Core OpenRISC Configuration
1419
 
1420
3.3.5 Interrupt Configuration
1421
-----------------------------
1422
 
1423
Programmable Interrupt Controller (PIC) configuration is described in
1424 82 jeremybenn
`section pic'.  This section may appear at most once--Or1ksim has no
1425
mechanism for handling multiple interrupt controllers.  The following
1426 19 jeremybenn
parameters may be specified.
1427
 
1428
`enabled = 0|1'
1429 82 jeremybenn
     If 1 (true), the programmable interrupt controller is enabled.  If
1430
 
1431 19 jeremybenn
 
1432
`edge_trigger = 0|1'
1433
     If 1 (true, the default), the programmable interrupt controller is
1434 82 jeremybenn
     edge triggered.  If 0 (false), it is level triggered.
1435 19 jeremybenn
 
1436
 
1437

1438
File: or1ksim.info,  Node: Power Management Configuration,  Next: Branch Prediction Configuration,  Prev: Interrupt Configuration,  Up: Core OpenRISC Configuration
1439
 
1440
3.3.6 Power Management Configuration
1441
------------------------------------
1442
 
1443 82 jeremybenn
Power management implementation is incomplete.  At present the effect
1444 19 jeremybenn
(which only happens when the power management unit is enabled) of
1445
setting the different bits in the power management Special Purpose
1446
Register (PMR, SPR 0x4000) is
1447
 
1448
`SDF (bit mask 0x0000000f)'
1449
     No effect - these bits are ignored
1450
 
1451
`DME (bit mask 0x00000010)'
1452
`SME (bit mask 0x00000020)'
1453
     Both these bits cause the processor to stop executing
1454 82 jeremybenn
     instructions.  However all other functions (debug interaction, CLI,
1455 19 jeremybenn
     VAPI etc) carry on as normal.
1456
 
1457
`DCGE (bit mask 0x00000004)'
1458
     No effect - this bit is ignored
1459
 
1460
`SUME (bit mask 0x00000008)'
1461
     Enabling this bit causes a message to be printed, advising that the
1462
     processor is suspending and the simulator exits.
1463
 
1464
 
1465
On reset all bits are cleared.
1466
 
1467 82 jeremybenn
Power management configuration is described in `section pm'.  This
1468
section may appear at most once.  The following parameter may be
1469 19 jeremybenn
specified.
1470
 
1471
`enabled = 0|1'
1472 82 jeremybenn
     If 1 (true), power management is enabled.  If 0 (the default), it
1473
     is disabled.
1474 19 jeremybenn
 
1475
 
1476

1477
File: or1ksim.info,  Node: Branch Prediction Configuration,  Next: Debug Interface Configuration,  Prev: Power Management Configuration,  Up: Core OpenRISC Configuration
1478
 
1479
3.3.7 Branch Prediction Configuration
1480
-------------------------------------
1481
 
1482
From examining the code base, it seems the branch prediction function
1483 82 jeremybenn
is not fully implemented.  At present the functionality seems
1484
restricted to collection of statistics.
1485 19 jeremybenn
 
1486 82 jeremybenn
Branch prediction configuration is described in `section bpb'.  This
1487
section may appear at most once.  The following parameters may be
1488 19 jeremybenn
specified.
1489
 
1490
`enabled = 0|1'
1491 82 jeremybenn
     If 1 (true), branch prediction is enabled.  If 0 (the default), it
1492 19 jeremybenn
     is disabled.
1493
 
1494
`btic = 0|1'
1495
     If 1 (true), the branch target instruction cache model is enabled.
1496
     If 0 (the default), it is disabled.
1497
 
1498
`sbp_bf_fwd = 0|1'
1499 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bf' instruction.  If
1500 19 jeremybenn
 
1501
     instruction.
1502
 
1503
`sbp_bnf_fwd = 0|1'
1504 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bnf' instruction.
1505
     If 0 (the default), do not use forward prediction for this
1506 19 jeremybenn
     instruction.
1507
 
1508
`hitdelay = VALUE'
1509 82 jeremybenn
     Set the number of cycles a branch prediction hit costs.  Default
1510 19 jeremybenn
     value 0.
1511
 
1512
`missdelay = VALUE'
1513 82 jeremybenn
     Set the number of cycles a branch prediction miss costs.  Default
1514 19 jeremybenn
     value 0.
1515
 
1516
 
1517

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4283
Tag Table:
4284 112 jeremybenn
Node: Top814
4285
Node: Installation1224
4286
Node: Preparation1471
4287
Node: Configuring the Build1766
4288 124 jeremybenn
Node: Build and Install6975
4289
Node: Known Issues7821
4290
Node: Usage10883
4291
Node: Standalone Simulator11097
4292
Node: Profiling Utility14000
4293
Node: Memory Profiling Utility14910
4294
Node: Simulator Library16275
4295
Node: Configuration24053
4296
Node: Configuration File Format24662
4297
Node: Configuration File Preprocessing24954
4298
Node: Configuration File Syntax25325
4299
Node: Simulator Configuration28110
4300
Node: Simulator Behavior28401
4301
Node: Verification API Configuration32445
4302
Node: CUC Configuration34385
4303
Node: Core OpenRISC Configuration36302
4304
Node: CPU Configuration36804
4305
Node: Memory Configuration40922
4306
Node: Memory Management Configuration47380
4307
Node: Cache Configuration49757
4308
Node: Interrupt Configuration52143
4309
Node: Power Management Configuration52879
4310
Node: Branch Prediction Configuration54156
4311
Node: Debug Interface Configuration55516
4312
Node: Peripheral Configuration59736
4313
Node: Memory Controller Configuration60362
4314
Node: UART Configuration63776
4315
Node: DMA Configuration67295
4316
Node: Ethernet Configuration69162
4317
Node: GPIO Configuration73138
4318
Node: Display Interface Configuration74771
4319
Node: Frame Buffer Configuration77080
4320
Node: Keyboard Configuration78944
4321
Node: Disc Interface Configuration81182
4322
Node: Generic Peripheral Configuration86125
4323
Node: Interactive Command Line88420
4324
Node: Verification API95394
4325
Node: Code Internals99824
4326
Node: Coding Conventions100407
4327
Node: Global Data Structures104834
4328
Node: Concepts107491
4329
Ref: Output Redirection107636
4330
Node: Internal Debugging108175
4331
Node: Regression Testing108699
4332
Node: GNU Free Documentation License112494

powered by: WebSVN 2.1.0

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