com.cmpware.tools
Class AutoModelVLIW.Field

java.lang.Object
  extended by com.cmpware.tools.AutoModelVLIW.Field
Enclosing class:
AutoModelVLIW

public static final class AutoModelVLIW.Field
extends java.lang.Object

This class defines an instruction field. The field is given the number of bits and the start of the field. It also may contain a list of symbols which may map to the values of the bits in this field.


Field Summary
 int bits
          The number of bits in the field
 boolean isDecode
          The decode field (used only in the assembler)
 int start
          The start bit fo the field
 java.util.Hashtable symbolNameLookup
          This looks up symbols by name
 java.util.Hashtable symbolValueLookup
          This looks up symbols by value
 int val
          A temporary place to store the value of the field
 
Constructor Summary
AutoModelVLIW.Field(int bits, int start)
          Constructor
AutoModelVLIW.Field(int bits, int start, AutoModelVLIW.Symbol[] symbols)
          Constructor
AutoModelVLIW.Field(int bits, int start, boolean isDecode)
          Constructor
 
Method Summary
 int get(java.math.BigInteger instr)
          This method extracts the field data from an instruction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bits

public int bits
The number of bits in the field


start

public int start
The start bit fo the field


isDecode

public boolean isDecode
The decode field (used only in the assembler)


val

public int val
A temporary place to store the value of the field


symbolNameLookup

public java.util.Hashtable symbolNameLookup
This looks up symbols by name


symbolValueLookup

public java.util.Hashtable symbolValueLookup
This looks up symbols by value

Constructor Detail

AutoModelVLIW.Field

public AutoModelVLIW.Field(int bits,
                           int start,
                           AutoModelVLIW.Symbol[] symbols)
Constructor

Parameters:
bits - The number of bits in the field
start - The start bit of the field
symbols - a symbol table associated with this field.

AutoModelVLIW.Field

public AutoModelVLIW.Field(int bits,
                           int start)
Constructor

Parameters:
bits - The number of bits in the field
start - The start bit of the field

AutoModelVLIW.Field

public AutoModelVLIW.Field(int bits,
                           int start,
                           boolean isDecode)
Constructor

Parameters:
bits - The number of bits in the field
start - The start bit of the field
isDecode - True if this is a decode field. This is used by the assembler and disassembler to ignore the decode fields. This could also be used to tag any fields which the assembler and disassembler should ignore.
Method Detail

get

public int get(java.math.BigInteger instr)
This method extracts the field data from an instruction.

Parameters:
instr - The instruction containing the field.
Returns:
This method returns the field data extracted from an instruction.