|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.apps.Stimulator.functions.Random
This class implements the ValueProvider interface to provide a random value for wire stimulus.
Constructor Summary | |
Random()
Creates a new Random ValueProvider that uses the current time as the seed for the random values. |
|
Random(long seed)
Creates a new Random ValueProvider that uses the given value as a seed for the random values. |
Method Summary | |
java.lang.String |
getForceSchedule(int radix)
Used by Stimulator to get a nicely printed view of the function or series of values that are scheduled to be put on the wire |
java.lang.String |
getForceSchedule(java.lang.String format)
Used by Stimulator to get a nicely printed view of the function or series of values that are scheduled to be put on the wire |
boolean |
getNextBooleanValue()
|
BV |
getNextBVValue(BV bv)
|
int |
getNextIntegerValue()
|
long |
getNextLongValue()
|
boolean |
getResetBooleanValue()
Resets the random number generator based on the original seed and returns the first boolean value from it. |
BV |
getResetBVValue(BV bv)
Resets the random number generator based on the original seed and returns the first boolean value from it. |
int |
getResetIntegerValue()
Resets the random number generator based on the original seed and returns the first int value from it. |
long |
getResetLongValue()
Resets the random number generator based on the original seed and returns the first boolean value from it. |
boolean |
isDrivingOutput()
This method is used if the wire being driven is a tri-state bus wire. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Random(long seed)
seed
- the seed for the random values. It is often a good
idea to set this seed in order to reproduce simulation results in
subsequent runs.public Random()
Method Detail |
public boolean getNextBooleanValue()
getNextBooleanValue
in interface BooleanValueProvider
public boolean getResetBooleanValue()
getResetBooleanValue
in interface BooleanValueProvider
public int getNextIntegerValue()
getNextIntegerValue
in interface IntegerValueProvider
public int getResetIntegerValue()
getResetIntegerValue
in interface IntegerValueProvider
public long getNextLongValue()
getNextLongValue
in interface LongValueProvider
public long getResetLongValue()
getResetLongValue
in interface LongValueProvider
public BV getNextBVValue(BV bv)
getNextBVValue
in interface BVValueProvider
bv
- the BV object to place the value in. This object
should be modified as necessary, and also returned.
public BV getResetBVValue(BV bv)
getResetBVValue
in interface BVValueProvider
bv
- the BV object to place the value in. This object
should be modified as necessary, and also returned.
public java.lang.String getForceSchedule(int radix)
getForceSchedule
in interface ValueProvider
radix
- the custom ValueProvider may use this value to
change the radix in which values will be shown in the schedulepublic java.lang.String getForceSchedule(java.lang.String format)
getForceSchedule
in interface ValueProvider
format
- the custom ValueProvider may use this value to
change the way values are shown in the schedule. This parameter
is meant to be a BV format string.public boolean isDrivingOutput()
isDrivingOutput
in interface ValueProvider
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |