Line 1... |
Line 1... |
This is ../../doc/or1ksim.info, produced by makeinfo version 4.13 from
|
This is ../../or1ksim/doc/or1ksim.info, produced by makeinfo version
|
../../doc/or1ksim.texi.
|
4.13 from ../../or1ksim/doc/or1ksim.texi.
|
|
|
INFO-DIR-SECTION Embedded development
|
INFO-DIR-SECTION Embedded development
|
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
* Or1ksim: (or32-uclinux-or1ksim). The OpenRISC 1000 Architectural
|
* Or1ksim: (or32-elf-or1ksim). The OpenRISC 1000 Architectural
|
Simulator
|
Simulator
|
END-INFO-DIR-ENTRY
|
END-INFO-DIR-ENTRY
|
|
|
This file documents the OpenRISC Architectural Simulator, Or1ksim.
|
This file documents the OpenRISC Architectural Simulator, Or1ksim.
|
|
|
Line 79... |
Line 79... |
|
|
The most significant argument is `--target', which should specify the
|
The most significant argument is `--target', which should specify the
|
OpenRISC 1000 32-bit architecture. If this argument is omitted, it will
|
OpenRISC 1000 32-bit architecture. If this argument is omitted, it will
|
default to OpenRISC 1000 32-bit with a warning
|
default to OpenRISC 1000 32-bit with a warning
|
|
|
../or1ksim-2010-12-08/configure --target=or32-uclinux ...
|
../or1ksim-2010-12-08/configure --target=or32-elf ...
|
|
|
There are several other options available, many of which are standard
|
There are several other options available, many of which are standard
|
to GNU `configure' scripts. Use `configure --help' to see all the
|
to GNU `configure' scripts. Use `configure --help' to see all the
|
options. The most useful is `--prefix' to specify a directory for
|
options. The most useful is `--prefix' to specify a directory for
|
installation of the tools.
|
installation of the tools.
|
Line 237... |
Line 237... |
Install the tool with:
|
Install the tool with:
|
|
|
make install
|
make install
|
|
|
This will install the three variations of the Or1ksim tool,
|
This will install the three variations of the Or1ksim tool,
|
`or32-uclinux-sim', `or32-uclinux-psim' and `or32-uclinux-mpsim', the
|
`or32-elf-sim', `or32-elf-psim' and `or32-elf-mpsim', the Or1ksim
|
Or1ksim library, `libsim', the header file, `or1ksim.h' and this
|
library, `libsim', the header file, `or1ksim.h' and this documentation
|
documentation in `info' format.
|
in `info' format.
|
|
|
The documentation may be created and installed in alternative formats
|
The documentation may be created and installed in alternative formats
|
(PDF, Postscript, DVI, HTML) with for example:
|
(PDF, Postscript, DVI, HTML) with for example:
|
|
|
make pdf
|
make pdf
|
Line 283... |
Line 283... |
* Menu:
|
* Menu:
|
|
|
* Standalone Simulator::
|
* Standalone Simulator::
|
* Profiling Utility::
|
* Profiling Utility::
|
* Memory Profiling Utility::
|
* Memory Profiling Utility::
|
|
* Trace Generation::
|
* Simulator Library::
|
* Simulator Library::
|
* Ethernet TUN/TAP Interface::
|
* Ethernet TUN/TAP Interface::
|
|
|
|
|
File: or1ksim.info, Node: Standalone Simulator, Next: Profiling Utility, Up: Usage
|
File: or1ksim.info, Node: Standalone Simulator, Next: Profiling Utility, Up: Usage
|
Line 294... |
Line 295... |
2.1 Standalone Simulator
|
2.1 Standalone Simulator
|
========================
|
========================
|
|
|
The general form the standalone command is:
|
The general form the standalone command is:
|
|
|
or32-uclinux-sim [-vhiqVt] [-f FILE] [--nosrv] [--srv=[N]]
|
or32-elf-sim [-vhiqVt] [-f FILE] [--nosrv] [--srv=[N]]
|
[-m ][-d STR]
|
[-m ][-d STR]
|
[--enable-profile] [--enable-mprofile] [FILE]
|
[--enable-profile] [--enable-mprofile] [FILE]
|
|
|
Many of the options have both a short and a long form. For example
|
Many of the options have both a short and a long form. For example
|
`-h' or `--help'.
|
`-h' or `--help'.
|
Line 419... |
Line 420... |
|
|
This utility analyses instruction profile data generated by Or1ksim.
|
This utility analyses instruction profile data generated by Or1ksim.
|
It may be invoked as a standalone command, or from the Or1ksim CLI.
|
It may be invoked as a standalone command, or from the Or1ksim CLI.
|
The general form the standalone command is:
|
The general form the standalone command is:
|
|
|
or32-uclinux-profile [-vhcq] [-g=FILE]
|
or32-elf-profile [-vhcq] [-g=FILE]
|
|
|
Many of the options have both a short and a long form. For example
|
Many of the options have both a short and a long form. For example
|
`-h' or `--help'.
|
`-h' or `--help'.
|
|
|
`-v'
|
`-v'
|
Line 448... |
Line 449... |
The data file to analyse. If omitted, the default file,
|
The data file to analyse. If omitted, the default file,
|
`sim.profile' is used.
|
`sim.profile' is used.
|
|
|
|
|
|
|
File: or1ksim.info, Node: Memory Profiling Utility, Next: Simulator Library, Prev: Profiling Utility, Up: Usage
|
File: or1ksim.info, Node: Memory Profiling Utility, Next: Trace Generation, Prev: Profiling Utility, Up: Usage
|
|
|
2.3 Memory Profiling Utility
|
2.3 Memory Profiling Utility
|
============================
|
============================
|
|
|
This utility analyses memory profile data generated by Or1ksim. It may
|
This utility analyses memory profile data generated by Or1ksim. It may
|
be invoked as a standalone command, or from the Or1ksim CLI. The
|
be invoked as a standalone command, or from the Or1ksim CLI. The
|
general form the standalone command is:
|
general form the standalone command is:
|
|
|
or32-uclinux-mprofile [-vh] [-m=M] [-g=N] [-f=FILE] FROM TO
|
or32-elf-mprofile [-vh] [-m=M] [-g=N] [-f=FILE] FROM TO
|
|
|
Many of the options have both a short and a long form. For example
|
Many of the options have both a short and a long form. For example
|
`-h' or `--help'.
|
`-h' or `--help'.
|
|
|
`-v'
|
`-v'
|
Line 508... |
Line 509... |
FROM and TO are respectively the start and end address of the
|
FROM and TO are respectively the start and end address of the
|
region of memory to be analysed.
|
region of memory to be analysed.
|
|
|
|
|
|
|
File: or1ksim.info, Node: Simulator Library, Next: Ethernet TUN/TAP Interface, Prev: Memory Profiling Utility, Up: Usage
|
File: or1ksim.info, Node: Trace Generation, Next: Simulator Library, Prev: Memory Profiling Utility, Up: Usage
|
|
|
2.4 Simulator Library
|
2.4 Trace Generation
|
|
====================
|
|
|
|
An execution trace can be generated at run time with options passed by
|
|
the command line, or via the operating system's signal passing
|
|
mechanism.
|
|
|
|
`-t'
|
|
`--trace'
|
|
Dump instruction just executed and any register/memory location
|
|
chaged after each instruction (one line per instruction).
|
|
|
|
|
|
File: or1ksim.info, Node: Simulator Library, Next: Ethernet TUN/TAP Interface, Prev: Trace Generation, Up: Usage
|
|
|
|
2.5 Simulator Library
|
=====================
|
=====================
|
|
|
Or1ksim may be used as a static of dynamic library, `libsim.a' or
|
Or1ksim may be used as a static of dynamic library, `libsim.a' or
|
`libsim.so'. When compiling with the static library, the flag, `-lsim'
|
`libsim.so'. When compiling with the static library, the flag, `-lsim'
|
should be added to the link command.
|
should be added to the link command.
|
Line 758... |
Line 774... |
|
|
|
|
|
|
File: or1ksim.info, Node: Ethernet TUN/TAP Interface, Prev: Simulator Library, Up: Usage
|
File: or1ksim.info, Node: Ethernet TUN/TAP Interface, Prev: Simulator Library, Up: Usage
|
|
|
2.5 Ethernet TUN/TAP Interface
|
2.6 Ethernet TUN/TAP Interface
|
==============================
|
==============================
|
|
|
When an Ethernet peripheral is configured (*note Ethernet
|
When an Ethernet peripheral is configured (*note Ethernet
|
Configuration: Ethernet Configuration.), one option is to tunnel
|
Configuration: Ethernet Configuration.), one option is to tunnel
|
traffic through a TUN/TAP interface. The low level TAP interface is
|
traffic through a TUN/TAP interface. The low level TAP interface is
|
Line 788... |
Line 804... |
* Tearing Down a Bridge::
|
* Tearing Down a Bridge::
|
|
|
|
|
File: or1ksim.info, Node: Setting Up a Persistent TAP device, Next: Establishing a Bridge, Up: Ethernet TUN/TAP Interface
|
File: or1ksim.info, Node: Setting Up a Persistent TAP device, Next: Establishing a Bridge, Up: Ethernet TUN/TAP Interface
|
|
|
2.5.1 Setting Up a Persistent TAP device
|
2.6.1 Setting Up a Persistent TAP device
|
----------------------------------------
|
----------------------------------------
|
|
|
TUN/TAP devices can be created dynamically, but this requires superuser
|
TUN/TAP devices can be created dynamically, but this requires superuser
|
privileges (or at least `CAP_NET_ADMIN' capability). The solution is
|
privileges (or at least `CAP_NET_ADMIN' capability). The solution is
|
to create a persistent TAP device. This can be done using either
|
to create a persistent TAP device. This can be done using either
|
Line 803... |
Line 819... |
openvpn --mktun --dev tap_n_ --user _username_ --group _groupname_
|
openvpn --mktun --dev tap_n_ --user _username_ --group _groupname_
|
|
|
|
|
File: or1ksim.info, Node: Establishing a Bridge, Next: Opening the Firewall, Prev: Setting Up a Persistent TAP device, Up: Ethernet TUN/TAP Interface
|
File: or1ksim.info, Node: Establishing a Bridge, Next: Opening the Firewall, Prev: Setting Up a Persistent TAP device, Up: Ethernet TUN/TAP Interface
|
|
|
2.5.2 Establishing a Bridge
|
2.6.2 Establishing a Bridge
|
---------------------------
|
---------------------------
|
|
|
A bridge is a "virtual" local area network interfaces, subsuming two or
|
A bridge is a "virtual" local area network interfaces, subsuming two or
|
more existing network interfaces. In this case we will bridge the
|
more existing network interfaces. In this case we will bridge the
|
physical Ethernet interface of the host with the TAP interface that
|
physical Ethernet interface of the host with the TAP interface that
|
Line 844... |
Line 860... |
various problems.
|
various problems.
|
|
|
|
|
File: or1ksim.info, Node: Opening the Firewall, Next: Disabling Ethernet Filtering, Prev: Establishing a Bridge, Up: Ethernet TUN/TAP Interface
|
File: or1ksim.info, Node: Opening the Firewall, Next: Disabling Ethernet Filtering, Prev: Establishing a Bridge, Up: Ethernet TUN/TAP Interface
|
|
|
2.5.3 Opening the Firewall
|
2.6.3 Opening the Firewall
|
--------------------------
|
--------------------------
|
|
|
Firewall rules should be added to ensure traffic flows freely through
|
Firewall rules should be added to ensure traffic flows freely through
|
the TAP and bridge interfaces. As superuser the following commands are
|
the TAP and bridge interfaces. As superuser the following commands are
|
appropriate.
|
appropriate.
|
Line 858... |
Line 874... |
iptables -A FORWARD -i br_n_ -j ACCEPT
|
iptables -A FORWARD -i br_n_ -j ACCEPT
|
|
|
|
|
File: or1ksim.info, Node: Disabling Ethernet Filtering, Next: Networking from OpenRISC Linux and BusyBox, Prev: Opening the Firewall, Up: Ethernet TUN/TAP Interface
|
File: or1ksim.info, Node: Disabling Ethernet Filtering, Next: Networking from OpenRISC Linux and BusyBox, Prev: Opening the Firewall, Up: Ethernet TUN/TAP Interface
|
|
|
2.5.4 Disabling Ethernet Filtering
|
2.6.4 Disabling Ethernet Filtering
|
----------------------------------
|
----------------------------------
|
|
|
Some systems may have ethernet filtering enabled (`ebtables',
|
Some systems may have ethernet filtering enabled (`ebtables',
|
`bridge-nf', `arptables') which will stop traffic flowing through the
|
`bridge-nf', `arptables') which will stop traffic flowing through the
|
bridge.
|
bridge.
|
Line 875... |
Line 891... |
for f in bridge-nf-*; do echo 0 > $f; done
|
for f in bridge-nf-*; do echo 0 > $f; done
|
|
|
|
|
File: or1ksim.info, Node: Networking from OpenRISC Linux and BusyBox, Next: Tearing Down a Bridge, Prev: Disabling Ethernet Filtering, Up: Ethernet TUN/TAP Interface
|
File: or1ksim.info, Node: Networking from OpenRISC Linux and BusyBox, Next: Tearing Down a Bridge, Prev: Disabling Ethernet Filtering, Up: Ethernet TUN/TAP Interface
|
|
|
2.5.5 Networking from OpenRISC Linux and BusyBox
|
2.6.5 Networking from OpenRISC Linux and BusyBox
|
------------------------------------------------
|
------------------------------------------------
|
|
|
The main use of this style of Ethernet interface to Or1ksim is when
|
The main use of this style of Ethernet interface to Or1ksim is when
|
running the OpenRISC Linux kernel with BusyBox. The following commands
|
running the OpenRISC Linux kernel with BusyBox. The following commands
|
in the BusyBox console window will configure the Ethernet interface
|
in the BusyBox console window will configure the Ethernet interface
|
Line 916... |
Line 932... |
process can be killed from a telnet connection.
|
process can be killed from a telnet connection.
|
|
|
|
|
File: or1ksim.info, Node: Tearing Down a Bridge, Prev: Networking from OpenRISC Linux and BusyBox, Up: Ethernet TUN/TAP Interface
|
File: or1ksim.info, Node: Tearing Down a Bridge, Prev: Networking from OpenRISC Linux and BusyBox, Up: Ethernet TUN/TAP Interface
|
|
|
2.5.6 Tearing Down a Bridge
|
2.6.6 Tearing Down a Bridge
|
---------------------------
|
---------------------------
|
|
|
There is little reason why a bridge should ever need to be torn down,
|
There is little reason why a bridge should ever need to be torn down,
|
but if desired, the following commands will achieve the effect.
|
but if desired, the following commands will achieve the effect.
|
|
|
Line 3807... |
Line 3823... |
(line 91)
|
(line 91)
|
* --srv: Standalone Simulator.
|
* --srv: Standalone Simulator.
|
(line 60)
|
(line 60)
|
* --strict-npc: Standalone Simulator.
|
* --strict-npc: Standalone Simulator.
|
(line 100)
|
(line 100)
|
|
* --trace <1>: Trace Generation. (line 12)
|
* --trace: Standalone Simulator.
|
* --trace: Standalone Simulator.
|
(line 39)
|
(line 39)
|
* --verbose: Standalone Simulator.
|
* --verbose: Standalone Simulator.
|
(line 33)
|
(line 33)
|
* --version: Standalone Simulator.
|
* --version: Standalone Simulator.
|
Line 3840... |
Line 3857... |
* -m: Standalone Simulator.
|
* -m: Standalone Simulator.
|
(line 70)
|
(line 70)
|
* -q <1>: Profiling Utility. (line 30)
|
* -q <1>: Profiling Utility. (line 30)
|
* -q: Standalone Simulator.
|
* -q: Standalone Simulator.
|
(line 29)
|
(line 29)
|
|
* -t <1>: Trace Generation. (line 12)
|
* -t: Standalone Simulator.
|
* -t: Standalone Simulator.
|
(line 39)
|
(line 39)
|
* -V: Standalone Simulator.
|
* -V: Standalone Simulator.
|
(line 33)
|
(line 33)
|
* -v: Standalone Simulator.
|
* -v: Standalone Simulator.
|
Line 4593... |
Line 4611... |
(line 57)
|
(line 57)
|
* toggle debug channels (Interactive CLI): Interactive Command Line.
|
* toggle debug channels (Interactive CLI): Interactive Command Line.
|
(line 141)
|
(line 141)
|
* toggle debug mode (Interactive CLI): Interactive Command Line.
|
* toggle debug mode (Interactive CLI): Interactive Command Line.
|
(line 151)
|
(line 151)
|
|
* trace generation of Or1ksim: Trace Generation. (line 6)
|
* tx_channel (Ethernet configuration): Ethernet Configuration.
|
* tx_channel (Ethernet configuration): Ethernet Configuration.
|
(line 68)
|
(line 68)
|
* txfile (Ethernet configuration): Ethernet Configuration.
|
* txfile (Ethernet configuration): Ethernet Configuration.
|
(line 77)
|
(line 77)
|
* txfile (frame buffer configuration): Frame Buffer Configuration.
|
* txfile (frame buffer configuration): Frame Buffer Configuration.
|
Line 4665... |
Line 4684... |
(line 50)
|
(line 50)
|
|
|
|
|
|
|
Tag Table:
|
Tag Table:
|
Node: Top814
|
Node: Top826
|
Node: Installation1224
|
Node: Installation1236
|
Node: Preparation1471
|
Node: Preparation1483
|
Node: Configuring the Build1766
|
Node: Configuring the Build1778
|
Node: Build and Install7910
|
Node: Build and Install7918
|
Node: Known Issues8688
|
Node: Known Issues8684
|
Node: Usage9743
|
Node: Usage9739
|
Node: Standalone Simulator9988
|
Node: Standalone Simulator10005
|
Node: Profiling Utility14552
|
Node: Profiling Utility14565
|
Node: Memory Profiling Utility15462
|
Node: Memory Profiling Utility15471
|
Node: Simulator Library16827
|
Node: Trace Generation16831
|
Node: Ethernet TUN/TAP Interface27267
|
Node: Simulator Library17286
|
Node: Setting Up a Persistent TAP device28350
|
Node: Ethernet TUN/TAP Interface27718
|
Node: Establishing a Bridge29025
|
Node: Setting Up a Persistent TAP device28801
|
Node: Opening the Firewall30708
|
Node: Establishing a Bridge29476
|
Node: Disabling Ethernet Filtering31199
|
Node: Opening the Firewall31159
|
Node: Networking from OpenRISC Linux and BusyBox31824
|
Node: Disabling Ethernet Filtering31650
|
Node: Tearing Down a Bridge33486
|
Node: Networking from OpenRISC Linux and BusyBox32275
|
Node: Configuration34229
|
Node: Tearing Down a Bridge33937
|
Node: Configuration File Format34841
|
Node: Configuration34680
|
Node: Configuration File Preprocessing35226
|
Node: Configuration File Format35292
|
Node: Configuration File Syntax35523
|
Node: Configuration File Preprocessing35677
|
Node: Simulator Configuration38308
|
Node: Configuration File Syntax35974
|
Node: Simulator Behavior38599
|
Node: Simulator Configuration38759
|
Node: Verification API Configuration43180
|
Node: Simulator Behavior39050
|
Node: CUC Configuration45120
|
Node: Verification API Configuration43631
|
Node: Core OpenRISC Configuration47112
|
Node: CUC Configuration45571
|
Node: CPU Configuration47614
|
Node: Core OpenRISC Configuration47563
|
Node: Memory Configuration51733
|
Node: CPU Configuration48065
|
Node: Memory Management Configuration58455
|
Node: Memory Configuration52184
|
Node: Cache Configuration60832
|
Node: Memory Management Configuration58906
|
Node: Interrupt Configuration63218
|
Node: Cache Configuration61283
|
Node: Power Management Configuration65051
|
Node: Interrupt Configuration63669
|
Node: Branch Prediction Configuration66328
|
Node: Power Management Configuration65502
|
Node: Debug Interface Configuration67688
|
Node: Branch Prediction Configuration66779
|
Node: Peripheral Configuration70031
|
Node: Debug Interface Configuration68139
|
Node: Memory Controller Configuration70657
|
Node: Peripheral Configuration70482
|
Node: UART Configuration74437
|
Node: Memory Controller Configuration71108
|
Node: DMA Configuration77956
|
Node: UART Configuration74888
|
Node: Ethernet Configuration79823
|
Node: DMA Configuration78407
|
Node: GPIO Configuration84468
|
Node: Ethernet Configuration80274
|
Node: Display Interface Configuration86101
|
Node: GPIO Configuration84919
|
Node: Frame Buffer Configuration88410
|
Node: Display Interface Configuration86552
|
Node: Keyboard Configuration90274
|
Node: Frame Buffer Configuration88861
|
Node: Disc Interface Configuration92512
|
Node: Keyboard Configuration90725
|
Node: Generic Peripheral Configuration97616
|
Node: Disc Interface Configuration92963
|
Node: Interactive Command Line99911
|
Node: Generic Peripheral Configuration98067
|
Node: Verification API106885
|
Node: Interactive Command Line100362
|
Node: Code Internals111315
|
Node: Verification API107336
|
Node: Coding Conventions111898
|
Node: Code Internals111766
|
Node: Global Data Structures116325
|
Node: Coding Conventions112349
|
Node: Concepts118982
|
Node: Global Data Structures116776
|
Ref: Output Redirection119127
|
Node: Concepts119433
|
Ref: Interrupts Internal119665
|
Ref: Output Redirection119578
|
Node: Internal Debugging120818
|
Ref: Interrupts Internal120116
|
Node: Regression Testing121342
|
Node: Internal Debugging121269
|
Node: GNU Free Documentation License125131
|
Node: Regression Testing121793
|
Node: Index147538
|
Node: GNU Free Documentation License125582
|
|
Node: Index147989
|
|
|
End Tag Table
|
End Tag Table
|