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

Subversion Repositories openrisc

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

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

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

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

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

59
File: or1ksim.info,  Node: Preparation,  Next: Configuring the Build,  Up: Installation
60
 
61
1.1 Preparation
62
===============
63
 
64
Unpack the software and create a _separate_ directory in which to build
65
it:
66
 
67 420 jeremybenn
     tar jxf or1ksim-2010-11-11.tar.bz2
68 19 jeremybenn
     mkdir builddir_or1ksim
69
     cd builddir_or1ksim
70
 
71

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

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

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

278
File: or1ksim.info,  Node: Usage,  Next: Configuration,  Prev: Installation,  Up: Top
279
 
280
2 Usage
281
*******
282
 
283
* Menu:
284
 
285
* Standalone Simulator::
286
* Profiling Utility::
287
* Memory Profiling Utility::
288
* Simulator Library::
289
 
290

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1534
File: or1ksim.info,  Node: Interrupt Configuration,  Next: Power Management Configuration,  Prev: Cache Configuration,  Up: Core OpenRISC Configuration
1535
 
1536
3.3.5 Interrupt Configuration
1537
-----------------------------
1538
 
1539
Programmable Interrupt Controller (PIC) configuration is described in
1540 82 jeremybenn
`section pic'.  This section may appear at most once--Or1ksim has no
1541
mechanism for handling multiple interrupt controllers.  The following
1542 19 jeremybenn
parameters may be specified.
1543
 
1544
`enabled = 0|1'
1545 82 jeremybenn
     If 1 (true), the programmable interrupt controller is enabled.  If
1546
 
1547 19 jeremybenn
 
1548
`edge_trigger = 0|1'
1549
     If 1 (true, the default), the programmable interrupt controller is
1550 82 jeremybenn
     edge triggered.  If 0 (false), it is level triggered.
1551 19 jeremybenn
 
1552 430 julius
          Note: When configured to be edge triggered, interrupts must
1553
          be cleared in the PICSR by the processor writing a '0' to the
1554
          appropriate bit.
1555 19 jeremybenn
 
1556 430 julius
          When configured to be level triggered, the interrupt must be
1557
          cleared by lowering the peripheral's IRQ line. Writing '0' to
1558
          the PICSR has no effect.
1559
 
1560
          Peripherals can call the function `report_interrupt' to
1561
          signal an interrupt request. When configured for level
1562
          triggered interrupts, the function `clear_interrupt' will
1563
          clear the appropriate bit in the PICSR. `clear_interrupt' has
1564
          no effect when Or1ksim is configured for edge triggered
1565
          interrupts - interrupts must be cleared by the processor
1566
          writing '0' to the appropriate bit in the PICSR in this case.
1567
 
1568
 
1569 19 jeremybenn

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

1609
File: or1ksim.info,  Node: Branch Prediction Configuration,  Next: Debug Interface Configuration,  Prev: Power Management Configuration,  Up: Core OpenRISC Configuration
1610
 
1611
3.3.7 Branch Prediction Configuration
1612
-------------------------------------
1613
 
1614
From examining the code base, it seems the branch prediction function
1615 82 jeremybenn
is not fully implemented.  At present the functionality seems
1616
restricted to collection of statistics.
1617 19 jeremybenn
 
1618 82 jeremybenn
Branch prediction configuration is described in `section bpb'.  This
1619
section may appear at most once.  The following parameters may be
1620 19 jeremybenn
specified.
1621
 
1622
`enabled = 0|1'
1623 82 jeremybenn
     If 1 (true), branch prediction is enabled.  If 0 (the default), it
1624 19 jeremybenn
     is disabled.
1625
 
1626
`btic = 0|1'
1627
     If 1 (true), the branch target instruction cache model is enabled.
1628
     If 0 (the default), it is disabled.
1629
 
1630
`sbp_bf_fwd = 0|1'
1631 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bf' instruction.  If
1632 19 jeremybenn
 
1633
     instruction.
1634
 
1635
`sbp_bnf_fwd = 0|1'
1636 82 jeremybenn
     If 1 (true), use forward prediction for the `l.bnf' instruction.
1637
     If 0 (the default), do not use forward prediction for this
1638 19 jeremybenn
     instruction.
1639
 
1640
`hitdelay = VALUE'
1641 82 jeremybenn
     Set the number of cycles a branch prediction hit costs.  Default
1642 19 jeremybenn
     value 0.
1643
 
1644
`missdelay = VALUE'
1645 82 jeremybenn
     Set the number of cycles a branch prediction miss costs.  Default
1646 19 jeremybenn
     value 0.
1647
 
1648
 
1649

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

1703
File: or1ksim.info,  Node: Peripheral Configuration,  Prev: Core OpenRISC Configuration,  Up: Configuration
1704
 
1705
3.4 Configuring Memory Mapped Peripherals
1706
=========================================
1707
 
1708 82 jeremybenn
All peripheral components are optional.  If they are specified, then
1709 19 jeremybenn
(unlike other components) by default they are enabled.
1710
 
1711
* Menu:
1712
 
1713
* Memory Controller Configuration::
1714
* UART Configuration::
1715
* DMA Configuration::
1716
* Ethernet Configuration::
1717
* GPIO Configuration::
1718
* Display Interface Configuration::
1719
* Frame Buffer Configuration::
1720
* Keyboard Configuration::
1721
* Disc Interface Configuration::
1722
* Generic Peripheral Configuration::
1723
 
1724

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

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

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

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

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

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

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

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

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

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

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

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

2753
File: or1ksim.info,  Node: Code Internals,  Next: GNU Free Documentation License,  Prev: Verification API,  Up: Top
2754
 
2755
6 A Guide to Or1ksim Internals
2756
******************************
2757
 
2758 82 jeremybenn
These are notes to help those wanting to extend Or1ksim.  This section
2759 19 jeremybenn
assumes the use of a tag file, so file locations of entities'
2760 82 jeremybenn
definitions are not in general provided.  For more on tags, see the
2761
Linux manual page for `etags'.  A tag file can be created with:
2762 19 jeremybenn
 
2763
     make tags
2764
 
2765
* Menu:
2766
 
2767
* Coding Conventions::
2768
* Global Data Structures::
2769
* Concepts::
2770
* Internal Debugging::
2771 104 jeremybenn
* Regression Testing::
2772 19 jeremybenn
 
2773

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

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

2960
File: or1ksim.info,  Node: Concepts,  Next: Internal Debugging,  Prev: Global Data Structures,  Up: Code Internals
2961
 
2962
6.3 Concepts
2963
============
2964
 
2965
_Output Redirection_
2966 82 jeremybenn
     The current output stream is held in `runtime.cpu.fout'.  Output
2967 19 jeremybenn
     should be explicitly written to this stream, or may use the
2968
     `PRINTF' macro, which will write its arguments to this output
2969
     stream.
2970
 
2971
_Reset Hooks_
2972
     Any peripheral may register a routine to be called when the the
2973
     processor is reset by calling `reg_sim_reset', providing a
2974 82 jeremybenn
     function and pointer to a data structure as arguments.  On reset
2975 19 jeremybenn
     that function will be called with the data stucture pointer as
2976
     argument.
2977
 
2978
 
2979

2980 104 jeremybenn
File: or1ksim.info,  Node: Internal Debugging,  Next: Regression Testing,  Prev: Concepts,  Up: Code Internals
2981 19 jeremybenn
 
2982
6.4 Internal Debugging
2983
======================
2984
 
2985
The function `debug' is like `printf', but with an extra first
2986 82 jeremybenn
argument, which is the debug level.  If the debug level specified in
2987
the simulator configuration (*note Simulator Behavior: Simulator
2988
Behavior.) is greater than or equal to this value, the remaining
2989
arguments are printed to the current output stream (*note Output
2990
Redirection: Output Redirection.).
2991 19 jeremybenn
 
2992

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

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

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

4428
Tag Table:
4429 429 julius
Node: Top830
4430
Node: Installation1240
4431
Node: Preparation1487
4432
Node: Configuring the Build1782
4433
Node: Build and Install7926
4434
Node: Known Issues8704
4435
Node: Usage9759
4436
Node: Standalone Simulator9973
4437
Node: Profiling Utility14537
4438
Node: Memory Profiling Utility15447
4439
Node: Simulator Library16812
4440
Node: Configuration26895
4441
Node: Configuration File Format27507
4442
Node: Configuration File Preprocessing27892
4443
Node: Configuration File Syntax28189
4444
Node: Simulator Configuration30974
4445
Node: Simulator Behavior31265
4446
Node: Verification API Configuration35846
4447
Node: CUC Configuration37786
4448
Node: Core OpenRISC Configuration39778
4449
Node: CPU Configuration40280
4450
Node: Memory Configuration44399
4451
Node: Memory Management Configuration51121
4452
Node: Cache Configuration53498
4453
Node: Interrupt Configuration55884
4454 430 julius
Node: Power Management Configuration57446
4455
Node: Branch Prediction Configuration58723
4456
Node: Debug Interface Configuration60083
4457
Node: Peripheral Configuration62426
4458
Node: Memory Controller Configuration63052
4459
Node: UART Configuration66832
4460
Node: DMA Configuration70351
4461
Node: Ethernet Configuration72218
4462
Node: GPIO Configuration76300
4463
Node: Display Interface Configuration77933
4464
Node: Frame Buffer Configuration80242
4465
Node: Keyboard Configuration82106
4466
Node: Disc Interface Configuration84344
4467
Node: Generic Peripheral Configuration89448
4468
Node: Interactive Command Line91743
4469
Node: Verification API98717
4470
Node: Code Internals103147
4471
Node: Coding Conventions103730
4472
Node: Global Data Structures108157
4473
Node: Concepts110814
4474
Ref: Output Redirection110959
4475
Node: Internal Debugging111498
4476
Node: Regression Testing112022
4477
Node: GNU Free Documentation License115811

powered by: WebSVN 2.1.0

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