Class ProcGen

java.lang.Object
  extended by ProcGen

public class ProcGen
extends java.lang.Object

This class takes in a list of opcode names and values and produces some of the methods and data structures used to implement a processor.

Note that the main use of this class is to reduce some of the tedious typing required by model. Some of the data generated may be useful, some may not. It all depends on the processor architecture. It is intended to provide some help with getting started.

It is also tempting to push this into a more generic tool to fully describe a processor. This is not really necessary or desirable for two reasons. First, the framework is fairly simple and requires little effort for a simple processor. Second, the wide architectural variety and the various implementation trade-offs make such generators of limited value. More complex processors will require hand-coding to describe their unique features. Attempting to provide a description language for all possible processor architectures would be difficult and not likely to be as useful as just providing access to a framework in a standard programming language.

Copyright (c) 2004 Cmpware, Inc. All Rights Reserved.

Author:
SAG

Field Summary
static java.lang.String copyright
          Copyright string
 
Constructor Summary
ProcGen()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static int parseInt(java.lang.String s)
          This method parses a string and returns an integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
Copyright string

See Also:
Constant Field Values
Constructor Detail

ProcGen

public ProcGen()
Method Detail

main

public static void main(java.lang.String[] args)

parseInt

public static int parseInt(java.lang.String s)
                    throws java.lang.NumberFormatException
This method parses a string and returns an integer. If the string begins with "0x", it is assumed to be a hexadecimal number. Otherwise an integer is assumed.

Parameters:
s - The string to be converted into an integer.
Returns:
This method returns the integer representation of the string s.
Throws:
java.lang.NumberFormatException - if the string is not a proper decimal or hexadecimal integer.