<< 2012-3 >>
Department of
Computer Science
 

Introduction

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.

Operating The Machine

Installing The Machine

The simulator machine is written in Java 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 : machine% java -version java version "1.1.3" Having installed a Java runtime system, you should set up your CLASSPATH environment variable to point at the installation JAR file containing the machine system : machine% CLASSPATH=$CLASSPATH:machine.jar From now on you should be able to run programs written in the LIL language by issuing commands as discussed below : machine% java machine.Machine -process0Source programs/process0.asm

Customizing The Machine Behaviour

The behaviour of the machine is changed by the use of the command line options shown below : Supress the output of statistical information about the run.
Switch Default Value Resulting Behaviour
-commands <file> 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 <file> stdin Specify a file to read from should any input from the user be required.
-target <file> stdout Specify a file to write to should output from any of the running processes be produced.
-performance <file> stdout Specify a file to write the generated performance stats and run information to once all the processes have been run.
-memorySize <int> 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 <class> 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 <int> 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 <class> 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 <int> 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 <int> 256 This option allows the user to specify the number of lines that are present in the cache.
-[d|i|u]CacheWords <int> 4 This option allows the user to specify the number of words which appear in each line of the cache.
-[d|i|u]CacheVictimLines <int> 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 <file> Enable MACE traces to <file>.hit and <file>.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 <file> This option allows the user to specify the source code for process number #.
-process#DataPrefix <string> 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 <int> 0 Specifies the offset in memory of the data segment of process number #.
-process#BaseIMemory <int> 0 Specifies the offset in memory of the instruction (text) segment of process number #.
-process#BasePartition <int> 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 <int> 500 Alter the width of the display area allocated to each process when running in graphical mode.
-displayHeight <int> 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
-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 <dir> /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 <int> 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 <class> 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 <int> Alter the size of the history buffer in a branch predictor.
-help Prints a brief help screen to stdout detailing valid command line options.

Interpreting Ouput From The Machine

The machine generates statistics about program execution and displays them when all processes have finished executing. machine% java machine.Machine -processes 1 -process0Source programs/process0.asm -- Run Information --------------------------------------------- Run Start : Tue Feb 02 11:14:19 GMT+00:00 1999 Run End : Tue Feb 02 11:14:26 GMT+00:00 1999 ---------------------------------------------------------------- -- Data Cache Performance Breakdown ---------------------------- Cache Type : machine.cache.NWaySetAssociativeCache Cache Hits : 552897 Cache Misses : 85 Cache Hit Ratio : 99.98462879442731% Cache Reads : 85 Cache Writes : 228180 Cache Lines Used : 256 Performance Vs Cost Ratio : 25.412775 no performance breakdown ---------------------------------------------------------------- -- Instruction Cache Performance Breakdown --------------------- Cache Type : machine.cache.NWaySetAssociativeCache Cache Hits : 1766954 Cache Misses : 63 Cache Hit Ratio : 99.99643466927596% Cache Reads : 63 Cache Writes : 0 Cache Lines Used : 256 Performance Vs Cost Ratio : 109.56206 no performance breakdown ---------------------------------------------------------------- -- Machine Performance Breakdown ------------------------------- Process Number 0 Process ID : 0 Process Source : programs/process0.asm Process Base DMemory : 0 Process Base IMemory : 0 Process Base Partition : 0 Instructions Executed : 1767017 Execution Time : 6.959 seconds KIPS : 253.91823 Overall Instructions Executed : 1767017 Execution Time : 6.959 seconds KIPS : 253.91823 ---------------------------------------------------------------- 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.
© 1995-2013 University of Bristol  |  Terms and Conditions  |  Use of Cookies
About this Page