Line 62... |
Line 62... |
===============
|
===============
|
|
|
Unpack the software and create a _separate_ directory in which to build
|
Unpack the software and create a _separate_ directory in which to build
|
it:
|
it:
|
|
|
tar jxf or1ksim-2010-04-21.tar.bz2
|
tar jxf or1ksim-2010-04-28.tar.bz2
|
mkdir builddir_or1ksim
|
mkdir builddir_or1ksim
|
cd builddir_or1ksim
|
cd builddir_or1ksim
|
|
|
|
|
File: or1ksim.info, Node: Configuring the Build, Next: Build and Install, Prev: Preparation, Up: Installation
|
File: or1ksim.info, Node: Configuring the Build, Next: Build and Install, Prev: Preparation, Up: Installation
|
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-04-21/configure --target=or32-uclinux ...
|
../or1ksim-2010-04-28/configure --target=or32-uclinux ...
|
|
|
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 241... |
Line 241... |
|
|
1.4 Known Problems and Issues
|
1.4 Known Problems and Issues
|
=============================
|
=============================
|
|
|
The following problems and issues are known about with Or1ksim
|
The following problems and issues are known about with Or1ksim
|
2010-04-21. The OpenRISC tracker may be used to see the current state
|
2010-04-28. The OpenRISC tracker may be used to see the current state
|
of these issues and to raise new problems and feature requests. It may
|
of these issues and to raise new problems and feature requests. It may
|
be found at `http://www.opencores.org/ptracker.cgi/view/or1k/398'.
|
be found at `http://www.opencores.org/ptracker.cgi/view/or1k/398'.
|
|
|
* The Supervision Register Little Endian Enable (LEE) bit is
|
* The Supervision Register Little Endian Enable (LEE) bit is
|
ignored. Or1ksim can be built for either little endian or big
|
ignored. Or1ksim can be built for either little endian or big
|
Line 485... |
Line 485... |
should be added to the link command.
|
should be added to the link command.
|
|
|
The header file `or1ksim.h' contains appropriate declarations of the
|
The header file `or1ksim.h' contains appropriate declarations of the
|
functions exported by the Or1ksim library. These are:
|
functions exported by the Or1ksim library. These are:
|
|
|
-- `or1ksim.h': int or1ksim_init (const char *CONFIG_FILE, const char
|
-- `or1ksim.h': int or1ksim_init (const char
|
*IMAGE_FILE, void *CLASS_PTR, unsigned long int (*UPR)(void
|
*CONFIG_FILE, const char *IMAGE_FILE, void *CLASS_PTR, int
|
*CLASS_PTR, unsigned long int ADDR, unsigned long int MASK),
|
(*UPR)(void *CLASS_PTR, unsigned long int ADDR, unsigned char
|
void (*UPW)(void *CLASS_PTR, unsigned long int ADDR, unsigned
|
MASK[], unsigned char RDATA[], int DATA_LEN), int (*UPW)(void
|
long int MASK, unsigned long int WDATA))
|
*CLASS_PTR, unsigned long int ADDR, unsigned char MASK[], unsigned
|
|
char WDATA[], int DATA_LEN))
|
|
|
The initialization function is supplied with the name of a
|
The initialization function is supplied with the name of a
|
configuration file, CONFIG_FILE, an executable image, IMAGE_FILE,
|
configuration file, CONFIG_FILE, an executable image, IMAGE_FILE,
|
a pointer to the calling class, CLASS_PTR (since the library may
|
a pointer to the calling class, CLASS_PTR (since the library may
|
be used from C++) and two up-call functions, one for reads, UPR,
|
be used from C++) and two up-call functions, one for reads, UPR,
|
and one for writes, UPW.
|
and one for writes, UPW.
|
Line 504... |
Line 506... |
UPW is called for any write to an address external to the model
|
UPW is called for any write to an address external to the model
|
(determined by a `generic' section in the configuration file).
|
(determined by a `generic' section in the configuration file).
|
UPR is called for any reads to an external address. The CLASS_PTR
|
UPR is called for any reads to an external address. The CLASS_PTR
|
is passed back with these upcalls, allowing the function to
|
is passed back with these upcalls, allowing the function to
|
associate the call with the class which originally initialized the
|
associate the call with the class which originally initialized the
|
library.
|
library. Both UPW and UPR should return zero on success and
|
|
non-zero otherwise. At the present time the meaning of non-zero
|
|
values is not defined but this may change in the future.
|
|
|
MASK indicates which bytes in the word are to be written or read.
|
MASK indicates which bytes in the data are to be written or read.
|
Bytes to be read/written should have 0xff set in MASK. Otherwise
|
Bytes to be read/written should have 0xff set in MASK. Otherwise
|
the byte should be zero.
|
the byte should be zero. The adddress, ADDR, is the _full_
|
|
address, since the upcall function must handle all generic
|
ADDR, MASK, WDATA and the result from UPR all use host-endianess,
|
devices, using the full address for decoding.
|
_not_ model-endianess. The internal Or1ksim routines manage all
|
|
the conversion.
|
Endianness is not completely transparent, since Or1ksim is
|
|
transferring byte vectors, not multi-byte values.
|
|
|
|
Caution: This is a change from version 0.3.0. It simplifies
|
|
the interface, and makes Or1ksim more consistent with payload
|
|
representation in SystemC TLM 2.0.
|
|
|
|
Note: The current implementation of Or1ksim always transfers
|
|
single words (4 bytes), using masks if smaller values are
|
|
required. In this it mimcs the behavior of the WishBone bus.
|
|
|
|
|
-- `or1ksim.h': int or1ksim_run (double DURATION)
|
-- `or1ksim.h': int or1ksim_run (double DURATION)
|
Run the simulator for the simulated duration specified (in
|
Run the simulator for the simulated duration specified (in
|
seconds).
|
seconds).
|
Line 3665... |
Line 3678... |
(line 50)
|
(line 50)
|
* log (memory configuration): Memory Configuration.
|
* log (memory configuration): Memory Configuration.
|
(line 122)
|
(line 122)
|
* log_enabled (verification API configuration): Verification API Configuration.
|
* log_enabled (verification API configuration): Verification API Configuration.
|
(line 28)
|
(line 28)
|
* long: Simulator Library. (line 74)
|
* long: Simulator Library. (line 87)
|
* mc (memory configuration): Memory Configuration.
|
* mc (memory configuration): Memory Configuration.
|
(line 100)
|
(line 100)
|
* memory configuration: Memory Configuration.
|
* memory configuration: Memory Configuration.
|
(line 6)
|
(line 6)
|
* memory controller configuration: Memory Controller Configuration.
|
* memory controller configuration: Memory Controller Configuration.
|
Line 3722... |
Line 3735... |
* nsets (MMU configuration): Memory Management Configuration.
|
* nsets (MMU configuration): Memory Management Configuration.
|
(line 16)
|
(line 16)
|
* nways (cache configuration): Cache Configuration. (line 22)
|
* nways (cache configuration): Cache Configuration. (line 22)
|
* nways (MMU configuration): Memory Management Configuration.
|
* nways (MMU configuration): Memory Management Configuration.
|
(line 22)
|
(line 22)
|
* or1ksim_get_time_period: Simulator Library. (line 64)
|
* or1ksim_get_time_period: Simulator Library. (line 77)
|
* or1ksim_init: Simulator Library. (line 18)
|
* or1ksim_init: Simulator Library. (line 14)
|
* or1ksim_interrupt: Simulator Library. (line 79)
|
* or1ksim_interrupt: Simulator Library. (line 92)
|
* or1ksim_interrupt_clear: Simulator Library. (line 97)
|
* or1ksim_interrupt_clear: Simulator Library. (line 110)
|
* or1ksim_interrupt_set: Simulator Library. (line 88)
|
* or1ksim_interrupt_set: Simulator Library. (line 101)
|
* or1ksim_is_le: Simulator Library. (line 69)
|
* or1ksim_is_le: Simulator Library. (line 82)
|
* or1ksim_reset_duration: Simulator Library. (line 49)
|
* or1ksim_reset_duration: Simulator Library. (line 62)
|
* or1ksim_run: Simulator Library. (line 44)
|
* or1ksim_run: Simulator Library. (line 57)
|
* or1ksim_set_time_point: Simulator Library. (line 60)
|
* or1ksim_set_time_point: Simulator Library. (line 73)
|
* output rediretion: Concepts. (line 7)
|
* output rediretion: Concepts. (line 7)
|
* overflow flag setting by instructions: Configuring the Build.
|
* overflow flag setting by instructions: Configuring the Build.
|
(line 70)
|
(line 70)
|
* packet (ATA/ATAPI device configuration): Disc Interface Configuration.
|
* packet (ATA/ATAPI device configuration): Disc Interface Configuration.
|
(line 113)
|
(line 113)
|
Line 4069... |
Line 4082... |
Node: Usage10232
|
Node: Usage10232
|
Node: Standalone Simulator10446
|
Node: Standalone Simulator10446
|
Node: Profiling Utility13349
|
Node: Profiling Utility13349
|
Node: Memory Profiling Utility14259
|
Node: Memory Profiling Utility14259
|
Node: Simulator Library15624
|
Node: Simulator Library15624
|
Node: Configuration21109
|
Node: Configuration21816
|
Node: Configuration File Format21718
|
Node: Configuration File Format22425
|
Node: Configuration File Preprocessing22010
|
Node: Configuration File Preprocessing22717
|
Node: Configuration File Syntax22381
|
Node: Configuration File Syntax23088
|
Node: Simulator Configuration25166
|
Node: Simulator Configuration25873
|
Node: Simulator Behavior25457
|
Node: Simulator Behavior26164
|
Node: Verification API Configuration29501
|
Node: Verification API Configuration30208
|
Node: CUC Configuration31441
|
Node: CUC Configuration32148
|
Node: Core OpenRISC Configuration33358
|
Node: Core OpenRISC Configuration34065
|
Node: CPU Configuration33860
|
Node: CPU Configuration34567
|
Node: Memory Configuration37665
|
Node: Memory Configuration38372
|
Node: Memory Management Configuration42978
|
Node: Memory Management Configuration43685
|
Node: Cache Configuration45355
|
Node: Cache Configuration46062
|
Node: Interrupt Configuration47741
|
Node: Interrupt Configuration48448
|
Node: Power Management Configuration48477
|
Node: Power Management Configuration49184
|
Node: Branch Prediction Configuration49754
|
Node: Branch Prediction Configuration50461
|
Node: Debug Interface Configuration51114
|
Node: Debug Interface Configuration51821
|
Node: Peripheral Configuration55334
|
Node: Peripheral Configuration56041
|
Node: Memory Controller Configuration55960
|
Node: Memory Controller Configuration56667
|
Node: UART Configuration58565
|
Node: UART Configuration59272
|
Node: DMA Configuration62084
|
Node: DMA Configuration62791
|
Node: Ethernet Configuration63951
|
Node: Ethernet Configuration64658
|
Node: GPIO Configuration67929
|
Node: GPIO Configuration68636
|
Node: Display Interface Configuration69562
|
Node: Display Interface Configuration70269
|
Node: Frame Buffer Configuration71871
|
Node: Frame Buffer Configuration72578
|
Node: Keyboard Configuration73735
|
Node: Keyboard Configuration74442
|
Node: Disc Interface Configuration75973
|
Node: Disc Interface Configuration76680
|
Node: Generic Peripheral Configuration80916
|
Node: Generic Peripheral Configuration81623
|
Node: Interactive Command Line83211
|
Node: Interactive Command Line83918
|
Node: Verification API90185
|
Node: Verification API90892
|
Node: Code Internals94615
|
Node: Code Internals95322
|
Node: Coding Conventions95175
|
Node: Coding Conventions95882
|
Node: Global Data Structures99602
|
Node: Global Data Structures100309
|
Node: Concepts102259
|
Node: Concepts102966
|
Ref: Output Redirection102404
|
Ref: Output Redirection103111
|
Node: Internal Debugging102943
|
Node: Internal Debugging103650
|
Node: GNU Free Documentation License103440
|
Node: GNU Free Documentation License104147
|
Node: Index125847
|
Node: Index126554
|
|
|
End Tag Table
|
End Tag Table
|