|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.simulator.SimObject
hades.models.rtlib.GenericRtlibObject
hades.models.rtlib.arith.UserDefinedALU
Nested Class Summary | |
protected class |
UserDefinedALU.ConfigDialog
|
Nested classes inherited from class hades.models.rtlib.GenericRtlibObject |
GenericRtlibObject.BinaryValueLabelFormatter, GenericRtlibObject.DecimalValueLabelFormatter, GenericRtlibObject.DINColorSource, GenericRtlibObject.FlexibleLabelFormatter, GenericRtlibObject.HexValueLabelFormatter |
Fields inherited from class hades.models.rtlib.GenericRtlibObject |
BINARY, DECIMAL, defaultdelay, delay, enableAnimationFlag, HEX, labelFormatter, n_bits, valueLabel, vector, vector_000, vector_111, vector_UUU, vector_XXX, vector_ZZZ, vectorOutputPort |
Fields inherited from class hades.simulator.SimObject |
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible |
Constructor Summary | |
UserDefinedALU()
|
Method Summary | |
protected void |
calculateOutput(StdLogicVector A,
StdLogicVector B,
StdLogic1164 Cin,
int opcode)
calculateOutput: internal method to evaluate the ALU operation specified by the opcode on input operands A, B, and Cin. |
void |
configure()
create and display a 'ConfigDialog' to set the parameters for a SimObject. |
void |
constructPorts()
|
SimObject |
copy()
copy(): This function is used to create a clone of a UserDefinedALU object, including the values for width (n_bits), version ID, propagation delay, and the selected opcodes. |
int |
decodeOpcode(StdLogicVector OPC)
|
void |
evaluate(java.lang.Object arg)
evaluate(): called by the simulation engine on all events that concern this object. |
java.lang.String |
getCurrentOpcodeName()
|
java.awt.Component |
getPropertySheet()
return a reference to the 'property sheet' or configuration window for this SimObject. |
java.lang.String |
getToolTip(java.awt.Point position,
long millis)
construct a (not so short) tool tip message. |
boolean |
initialize(java.lang.String s)
initialize a UserDefinedALU object from a String which contains the integer version id, the width of this vector, the default output delay, the number of opcodes, and a list of the individual opcodes (starting with opcde[0]): |
static void |
main(java.lang.String[] argv)
|
static void |
msg(java.lang.String s)
|
(package private) void |
schedule(SimKernel simulator,
double time,
Port port,
java.lang.Object value)
|
(package private) void |
schedule(SimKernel simulator,
double time,
Port port,
StdLogic1164 v)
|
protected void |
scheduleOutputsAndFlags()
|
protected void |
updateFlags(StdLogicVector A,
StdLogicVector B)
updateFlags: update the values of the output flags (ZERO, NEG, EQ, OVF) from the current values of vector_Y and value_Cout. |
void |
write(java.io.PrintWriter ps)
write the following data to PrintWriter ps: our versionId, the width (n_bits), the default delay, and finally the number of opcodes and a list of the individual opcodes. |
Methods inherited from class hades.models.rtlib.GenericRtlibObject |
assign, constructStandardValues, elaborate, getDelay, getEnableAnimationFlag, getFormattedValue, getNumberFormat, getValue, getWidth, initValueLabel, isConnected, scheduleAfter, scheduleAfter, scheduleVectorOutputPort, setDelay, setDelay, setEnableAnimationFlag, setEnableAnimationFlag, setFormattedValue, setNumberFormat, setNumberFormat, setSymbol, setValue, setValue, setWidth, setWidth, toString, updateSymbol, wakeup, wakeupAfter |
Methods inherited from class hades.simulator.SimObject |
constructDynamicSymbol, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setVersionId, setVisible, tearDown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface hades.simulator.Simulatable |
message |
Field Detail |
protected PortStdLogicVector port_OPC
protected PortStdLogicVector port_A
protected PortStdLogicVector port_B
protected PortStdLogicVector port_Y
protected PortStdLogic1164 port_Cin
protected PortStdLogic1164 port_Cout
protected PortStdLogic1164 port_ZERO
protected PortStdLogic1164 port_NEG
protected PortStdLogic1164 port_EQ
protected PortStdLogic1164 port_OVF
protected StdLogicVector vector_Y
protected StdLogic1164 value_Cout
protected StdLogic1164 value_ZERO
protected StdLogic1164 value_NEG
protected StdLogic1164 value_EQ
protected StdLogic1164 value_OVF
public final int n_operations
protected int[] opcodeArray
protected int currentOpcode
public final StdLogic1164 ieee_U
public final StdLogic1164 ieee_0
public final StdLogic1164 ieee_1
public final int CONST_0
public final int CONST_1
public final int CONST_FFFF
public final int PASS_A
public final int PASS_B
public final int INCR_A
public final int INCR_B
public final int DECR_A
public final int DECR_B
public final int ADD_AB
public final int ADD_AB1
public final int ADD_ABCin
public final int SUB_AB
public final int NOT_A
public final int NOT_B
public final int AND_AB
public final int OR_AB
public final int XOR_AB
public final int XNOR_AB
public final int SHL_A
public final int SRL_A
public final int SRA_A
public final int ROL_A
public final int ROR_A
public final int ROL_AC
public final int ROR_AC
java.lang.String[] operationLabels
protected UserDefinedALU.ConfigDialog configDialog
Constructor Detail |
public UserDefinedALU()
Method Detail |
public void constructPorts()
constructPorts
in class GenericRtlibObject
public void write(java.io.PrintWriter ps)
write
in class GenericRtlibObject
public boolean initialize(java.lang.String s)
initialize
in class GenericRtlibObject
public SimObject copy()
copy
in class GenericRtlibObject
public void configure()
SimObject
configure
in class GenericRtlibObject
public java.awt.Component getPropertySheet()
SimObject
getPropertySheet
in class SimObject
public void evaluate(java.lang.Object arg)
Simulatable
evaluate
in interface Simulatable
evaluate
in class SimObject
arg
- an arbitrary object argumentpublic int decodeOpcode(StdLogicVector OPC)
protected void updateFlags(StdLogicVector A, StdLogicVector B)
protected void scheduleOutputsAndFlags()
void schedule(SimKernel simulator, double time, Port port, StdLogic1164 v)
void schedule(SimKernel simulator, double time, Port port, java.lang.Object value)
protected void calculateOutput(StdLogicVector A, StdLogicVector B, StdLogic1164 Cin, int opcode)
Either one of A, B, and Cin may be undefined, but none of the input or output objects may be null. Depending on the operation type, the value of Cout and the flags may be modified or not.
public java.lang.String getCurrentOpcodeName()
public java.lang.String getToolTip(java.awt.Point position, long millis)
getToolTip
in interface ContextToolTip
getToolTip
in class GenericRtlibObject
public static void msg(java.lang.String s)
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |