LIL is a general purpose virtual machine, created and maintained for the purpose of
executing PHIL generated code. This page decribes LIL, and is the reference point for
the virtual machine used in the predictable cacheing simulations. The LIL machine is
RISC based with modified load and store instructions for partitioning. Extra
instructions are defined to manage partitions in the cache.
and so
to use it you must have a recent version of the Java runtime system installed. Once
this is achieved, you should be able to sucessfully issue the following command :
environment variable to point at the installation JAR file containing the machine
system :
From now on you should be able to run programs written in the LIL language by
issuing commands as discussed below :
The behaviour of the machine is changed by the use of the command line options shown
below :
| Switch |
Default Value |
Resulting Behaviour |
| -commands |
|
Specify a file from which the command line arguments should be read. This file
takes the form of a standard Java properties file and is useful where the
command line is very long or needs to be reused in some way.
|
| -source |
stdin |
Specify a file to read from should any input from the user be required.
|
| -target |
stdout |
Specify a file to write to should output from any of the running processes
be produced.
|
| -performance |
stdout |
Specify a file to write the generated performance stats and run information
to once all the processes have been run.
|
| -memorySize |
262144 |
Specify the size of memory that is used by the machine. The size is
given in number of addressable words of memory.
|
| -gui |
|
This option, when used in the command line, forces the machine to operate via a
graphical user interface which enables the user to single step through
instructions and view the contents of registers and memory in real time.
|
| -scheduler |
machine.scheduler.RoundRobinScheduler |
Where one or more processes are specified on the command line, a scheduler is
used to swap between them so the machine acts as a multiprogramming system. This
option allows the user to specify which scheduler should be used and hence to
alter the style of scheduling. The argument is expected to be the fully
qualified name of a suitable Java class file which implements the required
scheduling scheme.
|
| -schedulerSleepTime |
1000 |
When a scheduler is in use, this option specifies the length of time, in
milliseconds, which it should go to sleep for between invocations of the
scheduling process.
|
| -[d|i|u]Cache |
machine.cache.NWaySetAssociativeCache |
The cache type used for data, instruction and unified caching
can be specified using this option. The argument is expected to be the fully
qualified name of a suitable Java class file which implements the required
cache type.
|
| -[d|i|u]CacheNWay |
1 |
If the cache type being used is an associative cache, this option allows the
user to specify the number of associative sets in the cache. A value of 1
represents a direct mapped cache while if there are n lines in the cache, a
value of n represents a fully associative cache.
|
| -[d|i|u]CacheLines |
256 |
This option allows the user to specify the number of lines that are present in
the cache.
|
| -[d|i|u]CacheWords |
4 |
This option allows the user to specify the number of words which appear in each
line of the cache.
|
| -[d|i|u]CacheVictimLines |
256 |
If the cache type being used is a victim cache, this option allows the user to
specify the number of lines in the victim cache attachment of the cache.
|
| -[d|i|u]CachePrefetch |
|
Enable one line prefetch on the cache. (Assumes memory has the bandwidth
to implement this).
|
| -[d|i|u]CacheMACEFile |
|
Enable MACE traces to .hit and .loc
for instantaneous hit rate and instantaneous locality respectively.
|
| -unifyCaches |
|
By specifying this option on the command line, the user registers the wish to
use the same physical cache for both data and instruction caching. By default
different caches are used for both and are configured using the dCache and
iCache options. With intergrated caches turned on, the combined cache used in
the system is configured using the cCache option.
|
| -disableICache |
|
When this option is specified, the machine makes no attempt to perform caching
of instructions. This has the benifit of making the simulated machine run
slightly quicker.
|
| -process#Source |
|
This option allows the user to specify the source code for process number #.
|
| -process#DataPrefix |
|
This option allows the user to specify the data file prefix for process number #.
This prefix is the name of data files for the process onto which a number is
appended when passed via the call to access the file.
|
| -process#BaseDMemory |
0 |
Specifies the offset in memory of the data segment of process number #.
|
| -process#BaseIMemory |
0 |
Specifies the offset in memory of the instruction (text) segment of process
number #.
|
| -process#BasePartition |
0 |
Specifies the offset of partitions generated by process number #.
|
| -spreadsheetPerformance |
|
Alters the performance output of the machine to be formatted as comma delimited
text rather than the normal, more human readable, form.
|
| -serializePerformance |
|
Place holder for future improvement of resulting performance output.
|
| -displayWidth |
500 |
Alter the width of the display area allocated to each process when running in
graphical mode.
|
| -displayHeight |
500 |
Alter the height of the display area allocated to each process when running in
graphical mode.
|
| -instructionCounting |
|
Enable the output of a count of the number of each type of instruction
executed during the run.
|
| -quiet |
|
Supress the output of statistical information about the run.
| -jit |
|
Enable the use of the JIT compiler.
|
| -jitSaveSource |
|
Prevent the JIT compiler from deleting the source code after it has been used.
This allows the user to view the results of the JIT compilation and check for
potential errors in the code.
|
| -jitSourceDirectory |
/tmp |
Specifiy the directory where the JIT compiler will save the source code to.
It should be noted that which ever directory is used, it must be present in the classpath.
|
| -jitInstructionThreshold |
10 |
Alter the threshold that decides if a block of code is worth JIT compiling or not.
If a block is less than the threshold, it is left as machine instructions, otherwise
it is folded into a JIT instruction.
|
| -branchPredictor |
|
Enable the use of a branch prediction unit by the machine. This will aid instruction
caching results but slow down the overall execution speed of the machine. The argument
is expected to be the fully qualified name of a suitable Java class file which implements
the required branch prediction type.
|
| -branchPredictorBufferSize |
|
Alter the size of the history buffer in a branch predictor.
|
| -help |
|
Prints a brief help screen to stdout detailing valid command line options.
|
The machine generates statistics about program execution and displays them when all
processes have finished executing.
By using the -spreadsheet option, this human readable output can be formatted as
comma delimited text which is suitable for processing by some automated system.