jfrace
Class CPUConfigurator

java.lang.Object
  |
  +--jfrace.CPUConfigurator

public class CPUConfigurator
extends java.lang.Object

Create a CPU and add it to an AddressSpace. Creation and configuration is determined by a description string of the following syntax:

<class name> [<offset>] [<method call 1> <method call 2> ...].

where <class name> is the class name of the CPU without the common subpackage name, <offset> is the optional offset in the AddressSpace (default value is 0), and <method call 1> <method call 2> ... are optional method calls of the form

<method name>(<1. argument>,<2. argument>,...)

Arguments starting with a digit will be treated as int. Otherwise String will be assumed. NOTE: Because white space is used as the delimiter between method calls there should be no white space in a method call.

Author:
Franz-Josef Elmer

Constructor Summary
CPUConfigurator()
           
 
Method Summary
static void configureCPU(AddressSpace as, java.lang.String description, java.lang.String packageCPUPrefix)
          Create a CPU from the given description and add it to the given AddressSpace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CPUConfigurator

public CPUConfigurator()
Method Detail

configureCPU

public static void configureCPU(AddressSpace as,
                                java.lang.String description,
                                java.lang.String packageCPUPrefix)
                         throws ConfigurationException
Create a CPU from the given description and add it to the given AddressSpace.
Parameters:
as - address space.
description - CPU description.
packageCPUPrefix - Class name prefix of all classes implementing CPU.
Throws:
ConfigurationException - in the case of an error (including syntax errors in description).