jaga.pj.circuits.fpgaft
Class SimulatorLUT
java.lang.Object
|
+--jaga.pj.circuits.SimulatorLogicElement
|
+--jaga.pj.circuits.SimulatorDelayLE
|
+--jaga.pj.circuits.fpgaft.SimulatorFaultyDelayLE
|
+--jaga.pj.circuits.fpgaft.SimulatorLUT
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class SimulatorLUT
- extends SimulatorFaultyDelayLE
Faulty Logic Element with delay implementing a Lookup-Table of configurable inputs.
When cloning one of these, the same lookup table table
object will be pointed
at by the original and the clone. This is OK unless tables are likely to get modified during the
object's lifetime. The getClone() method should be overriden if this is unacceptable.
- See Also:
- Serialized Form
Constructor Summary |
SimulatorLUT(BitSet table,
int delay)
Creates new SimulatorLUT from a BitSet representing the results of the
LUT in ascending order having the last input as the lowest significant
element in the table composition. |
SimulatorLUT(boolean[] table,
int delay)
|
Method Summary |
void |
sampleInputs()
Copied from SimulatorDelayLE, coudl have put in here and declared final.. |
static void |
setMode(int mode)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PRINT_TABLE
public static final int PRINT_TABLE
PRINT_DESCRIPTION
public static final int PRINT_DESCRIPTION
table
public boolean[] table
isLut2
public boolean isLut2
SimulatorLUT
public SimulatorLUT(BitSet table,
int delay)
Creates new SimulatorLUT from a BitSet representing the results of the
LUT in ascending order having the last input as the lowest significant
element in the table composition. Eg: if we have
I0 I1 F
0 0 0
0 1 1
1 0 0
1 1 1
then we initiliaze with new BitSet( "0101" )
So the input with largest index in the input array is the least significant bit when calculating
the line in the lookup table. Similar to Little Endian. IE. The string formed by the concatenation
of input values with I0 on the left and I(n-1) on the right is a binary encoding of the line number
where the output value for this input combination is to be found in the table.
- Parameters:
table
- BitSet representing the results of the LUT in ascending order. Its length must be power of two.
SimulatorLUT
public SimulatorLUT(boolean[] table,
int delay)
sampleInputs
public final void sampleInputs()
- Copied from SimulatorDelayLE, coudl have put in here and declared final..
- Overrides:
sampleInputs
in class SimulatorDelayLE
setMode
public static void setMode(int mode)
toString
public java.lang.String toString()
- Overrides:
toString
in class SimulatorDelayLE