|
||||||||||
| 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.io.Stimulus
Stimulus: simple stimulus generator with 8 outputs and fixed-length period. No pause/rewind function yet. The underlying data structure for this class is a two-dimensional array of int-values: data[output][cycle]
| Field Summary | |
(package private) Circle |
circleOnOff
|
(package private) int[][] |
data
|
(package private) java.lang.String |
dataResourceName
|
(package private) boolean |
debug
|
(package private) int |
n_cycles
|
(package private) int |
n_outputs
|
(package private) StdLogic1164 |
output_0
|
(package private) StdLogic1164 |
output_1
|
(package private) StdLogic1164 |
output_U
|
(package private) double |
period
|
(package private) boolean |
running
|
(package private) StimuliEditor |
stimuliEditor
|
| Fields inherited from class hades.models.gates.GenericGate |
t_delay |
| Fields inherited from class hades.simulator.SimObject |
classloader, console, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible |
| Constructor Summary | |
Stimulus()
|
|
| Method Summary | |
void |
changeLength(int n_cycles)
|
void |
configure()
create and display a 'ConfigDialog' to set the parameters for a SimObject. |
SimObject |
copy()
copy(): icreate a clone of the current Stimulus generator. |
void |
deleteValueFromRow(int r,
int c)
|
void |
elaborate(java.lang.Object arg)
elaborate(): This method is called by the simulation engine to initialize the simulation object. |
void |
evaluate(java.lang.Object arg)
Should not be called: a Stimulus doesn't react to external events (yet) |
void |
expandRow(int rowindex,
int startindex)
expand one row: repeat all values from cycles 0 to startindex until the array is filled. |
int[][] |
getData()
|
int |
getDataAt(int r,
int c)
|
java.lang.String |
getDataResourceName()
|
java.lang.String[] |
getExternalResources()
return a String[] array of length 1 with our current hst stimuli file. |
int |
getIndexFromTime(double time)
|
int |
getNumberOfCycles()
|
int |
getNumberOfOutputs()
|
double |
getPeriod()
|
java.awt.Component |
getPropertySheet()
return a reference to the 'property sheet' or configuration window for this SimObject. |
(package private) java.lang.String |
getSecondToken(java.io.BufferedReader BR)
|
java.lang.String |
getSignalName(int i)
|
StdLogic1164 |
getStdLogic1164(int r,
int c)
|
(package private) void |
initConstants()
|
void |
initData()
initialize all cycles in all outputs with value StdLogic1164. |
(package private) void |
initDisplay()
|
boolean |
initialize(java.lang.String s)
initialize a Stimulus instance from a String which contains the integer version id and the resource/file name for the actual stimulus data. |
(package private) void |
initPorts()
|
void |
initRestOfRow(int index,
int startpos,
int value)
|
void |
initRow(int index,
int value)
initialize one output (one row of the data matrix) with 'value', which should be a valid StdLogic1164 value. |
void |
initRowWithClock(int r)
|
void |
initRowWithRandomData(int r)
|
void |
insertValueIntoRow(int r,
int c,
int value)
|
void |
invertRow(int index)
change 0->1, 1->0, and leave other values intact |
boolean |
needsExternalResources()
we use one external resource: the hst file to initialize our stimuli data. |
void |
parseData()
|
(package private) void |
scheduleData()
schedule the data corresponding to the current simulation time at our outputs. |
void |
setDataAt(int r,
int c,
int value)
|
void |
setDataResourceName(java.lang.String s)
|
void |
setNumberOfOutputs(int N)
|
void |
setPeriod(double period)
|
void |
setSymbol(Symbol s)
|
java.lang.String |
toString()
toString: generate a text description for this SimObject. |
void |
wakeup(java.lang.Object arg)
One cycle period has elapsed, schedule the next period's data. |
void |
write(java.io.PrintWriter ps)
write "versionId" and gate delay "t_delay" |
void |
writeData()
|
| Methods inherited from class hades.models.gates.GenericGate |
getDelay, getToolTip, scheduleEvent, scheduleEventAfter, scheduleOutputValue, scheduleOutputValueAfter, setDelay, setDelay |
| Methods inherited from class hades.simulator.SimObject |
constructDynamicSymbol, getClassLoader, getDebug, getEditor, getFullName, getName, getParent, getPort, getPorts, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, message, mousePressed, needsDynamicSymbol, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setVersionId, setVisible |
| 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 |
int n_outputs
int n_cycles
int[][] data
double period
boolean running
boolean debug
java.lang.String dataResourceName
Circle circleOnOff
StdLogic1164 output_0
StdLogic1164 output_1
StdLogic1164 output_U
StimuliEditor stimuliEditor
| Constructor Detail |
public Stimulus()
| Method Detail |
public boolean needsExternalResources()
needsExternalResources in class SimObjectpublic java.lang.String[] getExternalResources()
getExternalResources in class SimObjectpublic void setSymbol(Symbol s)
setSymbol in class SimObjectpublic java.lang.String getDataResourceName()
public void setDataResourceName(java.lang.String s)
public java.lang.String getSignalName(int i)
public int getNumberOfOutputs()
public void setNumberOfOutputs(int N)
public int getNumberOfCycles()
public int[][] getData()
void initPorts()
void initConstants()
void initDisplay()
public void write(java.io.PrintWriter ps)
GenericGate
write in class GenericGatepublic boolean initialize(java.lang.String s)
initialize in class GenericGatepublic void elaborate(java.lang.Object arg)
Simulatable
elaborate in interface Simulatableelaborate in class GenericGatepublic void evaluate(java.lang.Object arg)
evaluate in interface Simulatableevaluate in class SimObjectarg - an arbitrary object argumentpublic void wakeup(java.lang.Object arg)
wakeup in interface Wakeablearg - unused WakeupEventvoid scheduleData()
public void initRow(int index,
int value)
public void initRestOfRow(int index,
int startpos,
int value)
public void initData()
public void invertRow(int index)
public void expandRow(int rowindex,
int startindex)
public void initRowWithClock(int r)
public void initRowWithRandomData(int r)
public void setDataAt(int r,
int c,
int value)
public int getDataAt(int r,
int c)
public StdLogic1164 getStdLogic1164(int r,
int c)
public void insertValueIntoRow(int r,
int c,
int value)
public void deleteValueFromRow(int r,
int c)
public void writeData()
throws java.lang.Exception
java.lang.Exception
java.lang.String getSecondToken(java.io.BufferedReader BR)
throws java.lang.Exception
java.lang.Exception
public void parseData()
throws java.lang.Exception
java.lang.Exceptionpublic void changeLength(int n_cycles)
public void setPeriod(double period)
public double getPeriod()
public int getIndexFromTime(double time)
public SimObject copy()
copy in class GenericGatepublic java.awt.Component getPropertySheet()
SimObject
getPropertySheet in class SimObjectpublic void configure()
SimObject
configure in class GenericGatepublic java.lang.String toString()
SimObject
toString in class SimObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||