|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.simulator.SimObject
hades.models.gates.GenericGate
hades.models.register.CounterRE
CounterRE: abstract base class for n-bit positive-edge triggered counters with enable and reset. The maximum value of the counter is also user-settable. Subclasses output some of the (lower) bits of the counter to ports.
Field Summary | |
protected int |
n_outputs
|
protected PortStdLogic1164 |
port_CLK
|
protected PortStdLogic1164 |
port_COUT
|
protected PortStdLogic1164 |
port_ENABLE
|
protected PortStdLogic1164 |
port_NRESET
|
Fields inherited from class hades.models.gates.GenericGate |
t_delay |
Fields inherited from class hades.simulator.SimObject |
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible |
Constructor Summary | |
CounterRE(int n_outputs)
|
Method Summary | |
void |
configure()
create and display a 'ConfigDialog' to set the parameters for a SimObject. |
SimObject |
copy()
create a copy of this counter register with the same "limit" value and an initial counter value of "0". |
void |
elaborate(java.lang.Object arg)
on elaboration, set the initial value of the counter. |
void |
evaluate(java.lang.Object arg)
evaluate: on a rising-edge of the CLK input calculate a new shift-register value, and put the lower bits of the new value on the Q outputs. |
int |
getLimit()
|
java.lang.String |
getToolTip(java.awt.Point position,
long millis)
construct a (short) tool tip message for a logic gate with name, class name, and gate delay. |
int |
getValue()
|
boolean |
initialize(java.lang.String s)
initialize the counter from a String that contains the integer version id of this register, the propagation delay (in seconds), and the current "value" and maximum "limit" counter values. |
void |
setLimit(int limit)
|
void |
setLimit(java.lang.String s)
|
void |
setValue(int value)
|
void |
setValue(java.lang.String s)
|
void |
write(java.io.PrintWriter ps)
write "versionId", gate delay "t_delay", current counter "value" and maximum counter value "limit". |
Methods inherited from class hades.models.gates.GenericGate |
getDelay, scheduleEvent, scheduleEventAfter, scheduleOutputValue, scheduleOutputValueAfter, setDelay, setDelay |
Methods inherited from class hades.simulator.SimObject |
constructDynamicSymbol, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setSymbol, setVersionId, setVisible, tearDown, toString |
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 int n_outputs
protected PortStdLogic1164 port_CLK
protected PortStdLogic1164 port_NRESET
protected PortStdLogic1164 port_ENABLE
protected PortStdLogic1164 port_COUT
Constructor Detail |
public CounterRE(int n_outputs)
Method Detail |
public void elaborate(java.lang.Object arg)
elaborate
in interface Simulatable
elaborate
in class GenericGate
public void evaluate(java.lang.Object arg)
evaluate
in interface Simulatable
evaluate
in class SimObject
arg
- an arbitrary object argumentpublic void write(java.io.PrintWriter ps)
write
in class GenericGate
public boolean initialize(java.lang.String s)
initialize
in class GenericGate
public int getValue()
public void setValue(java.lang.String s)
public void setValue(int value)
public int getLimit()
public void setLimit(java.lang.String s)
public void setLimit(int limit)
public void configure()
SimObject
configure
in class GenericGate
public java.lang.String getToolTip(java.awt.Point position, long millis)
GenericGate
getToolTip
in interface ContextToolTip
getToolTip
in class GenericGate
public SimObject copy()
copy
in class GenericGate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |