All classes are loaded statically in the picoJavaTM-II environment.
Use the loadClass
command to load a class in IAS.
Use the +class+<classfile>
option or
call the loadClass
() function in libloader.a
for the RTL model and cosimulation.
Files of the form <class_prefix.binit>
and
<class_prefix>.init
, such as loadClass A
if found, are also loaded. This file in IAS reads
A.binit
,
A.init
, and A.class
.
The order of loading files into memory is:
For detailed information on class loading, see Chapter 2 of the picoJava-II Verification Guide.
Related sources related are in $DSVHOME/ldr/src/loader.c
and $DSVHOME/ldr/src/copy.c
files.
Note: All loader operations always operate directly on common or main memory, and can have unpredictable effects if the caches are enabled. Usually classes are preloaded into memory, before the caches are enabled, so this does not cause any problem. If this same loader is extended to a dynamic loader however, this point should be taken care of.
The .init
file format is:
The .binit
file format is:
Each section is compressed using the libz.a
library in
the
$DSVHOME/lib
directory.
The format of each section is as follows: