Or1ksim is configured via a configuration file, which is specified
by the -f
. This is used to specify the detailed
behavior of the CPU (virtual memory, caches etc), the various
memories to be attached and the behavior of the various peripherals
modeled. The structure of the configuration file is described in
comments within the default configuration file
(sim.cfg
supplied in the main directory of
Or1ksim).
The Linux distribution, as patched for OpenRISC, is supplied with
a configuration file, sim.cfg
in its main
directory. Three changes are needed to this, for the Linux kernel
built in Section 3.4.
Caution | |
---|---|
Do not attempt to use the |
Find the line beginning section sim
in the file sim.cfg
in the main Linux
directory. This is followed by lines giving parameter values for the
simulation. Linux was built to run at a notional 100MHz. The
specification of the time taken by one clock cycle is out by a
factor of 1000. Change the value of clkcycle
option
to 10ns
.
Find section uart
. This specifies
that the channel for I/O should be via TCP port 84. This will
probably fail, since the port is in the Well Known Ports range,
requiring administrative privileges. If it is desired to run
Linux through a telnet link, this should be changed to a value in
the Dynamic Range (49152-65535). A separate window can then connect
to this port using telnet.
Rather more elegant is to use an xterm for output. For this, change the channel specification to:
channel = "xterm:"
Find section ethernet
. Linux was
built without Ethernet, so this should be disabled. Set the
enabled
option to 0.