|
||||||||||
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.DcoreALU2
Nested Class Summary | |
protected class |
DcoreALU2.ConfigDialog
|
Nested classes inherited from class hades.models.rtlib.GenericRtlibObject |
GenericRtlibObject.BinaryValueLabelFormatter, GenericRtlibObject.DecimalValueLabelFormatter, GenericRtlibObject.DINColorSource, GenericRtlibObject.FlexibleLabelFormatter, GenericRtlibObject.HexValueLabelFormatter |
Field Summary | |
int |
ADDC
|
int |
ADDI
|
int |
ADDU
|
int |
AND_AB
|
int |
ANDI
|
int |
ASR
|
int |
ASRC
|
int |
BCLRI
|
int |
BSETI
|
int |
CMP_AGTB
|
int |
CMP_ALTB
|
int |
CMP_EQ
|
int |
CMP_NEQ
|
protected DcoreALU2.ConfigDialog |
configDialog
|
protected int |
currentOpcode
|
int |
ILLEGAL_0b
|
int |
ILLEGAL_0f
|
int |
LSL
|
int |
LSLC
|
int |
LSLI
|
int |
LSR
|
int |
LSRC
|
int |
LSRI
|
int |
MOV
|
int |
MOVI
|
int |
n_operations
|
int |
NOT_A
|
protected int[] |
opcodeArray
|
(package private) java.lang.String[] |
operationLabels
|
int |
OR_AB
|
protected PortStdLogicVector |
port_A
|
protected PortStdLogicVector |
port_B
|
protected PortStdLogic1164 |
port_Cin
|
protected PortStdLogic1164 |
port_Cout
|
protected PortStdLogicVector |
port_IMM
|
protected PortStdLogicVector |
port_OPC
|
protected PortStdLogicVector |
port_Y
|
int |
SUBI
|
int |
SUBU
|
protected StdLogic1164 |
value_Cout
|
protected StdLogicVector |
vector_Y
|
int |
XOR_AB
|
protected StdLogicVector |
zero12
|
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 | |
DcoreALU2()
|
Method Summary | |
protected void |
calculateOutput(StdLogicVector A,
StdLogicVector B,
StdLogic1164 Cin,
StdLogicVector IMM,
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 DcoreALU2 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 DcoreALU2 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()
|
void |
setCarry(long value)
set the carry bit for an ADD/SUB operation from the long integer result 'value' of the addition. |
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_IMM
protected PortStdLogicVector port_Y
protected PortStdLogic1164 port_Cin
protected PortStdLogic1164 port_Cout
protected StdLogicVector vector_Y
protected StdLogic1164 value_Cout
protected StdLogicVector zero12
public final int n_operations
protected int[] opcodeArray
protected int currentOpcode
public final int MOV
public final int ADDU
public final int ADDC
public final int SUBU
public final int AND_AB
public final int OR_AB
public final int XOR_AB
public final int NOT_A
public final int LSL
public final int LSR
public final int ASR
public final int ILLEGAL_0b
public final int LSLC
public final int LSRC
public final int ASRC
public final int ILLEGAL_0f
public final int CMP_EQ
public final int CMP_NEQ
public final int CMP_AGTB
public final int CMP_ALTB
public final int MOVI
public final int ADDI
public final int SUBI
public final int ANDI
public final int LSLI
public final int LSRI
public final int BSETI
public final int BCLRI
java.lang.String[] operationLabels
protected DcoreALU2.ConfigDialog configDialog
Constructor Detail |
public DcoreALU2()
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)
Warning: For the DcoreALU2, we ignore the opcodes found in the input file and use the standard mapping 0, 1, 2, 3, ...
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 scheduleOutputsAndFlags()
void schedule(SimKernel simulator, double time, Port port, java.lang.Object value)
void schedule(SimKernel simulator, double time, Port port, StdLogic1164 v)
protected void calculateOutput(StdLogicVector A, StdLogicVector B, StdLogic1164 Cin, StdLogicVector IMM, 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 void setCarry(long value)
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 |