byucc.jhdl.apps.Stimulator
Interface ValueProvider
- All Known Subinterfaces:
- BooleanValueProvider, BVValueProvider, IntegerValueProvider, LongValueProvider
- All Known Implementing Classes:
- Pulse, Random
- public interface ValueProvider
Interface that marks a class as being able to provide values for
the interactive stimulator. See the subinterfaces of this
interface, such as BVValueProvider
- Author:
- Anthony L. Slade
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 |
isDrivingOutput()
This method is used if the wire being driven is a tri-state bus
wire. |
getForceSchedule
public 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
- Parameters:
radix
- the custom ValueProvider may use this value to
change the radix in which values will be shown in the schedule
getForceSchedule
public 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
- Parameters:
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.
isDrivingOutput
public boolean isDrivingOutput()
- This method is used if the wire being driven is a tri-state bus
wire. States whether the cell is driving the tri-state output.
This method is only called if the wire is associated with
TriStateStimulator. In most cases, it is best to simply return
true, unless you know that you don't want to drive the wire at a
certain time. When driving a tri-state bus, this method is
queried on every clock step (a clock cycle is built of various
clock steps, based on the number and composition of all of the
clock schedules given to clock drivers), regardless of whether or
not the getNextValue method is called. The getNextValue method
is called only once per rising clock edge (or falling edge if the
user has set the Stimulator to be a falling-edge-triggered
cell). Therefore, it is up to the implementation of the
ValueProvider to determine when the Stimulator should drive the
bus or if it should let other cells drive it (or just let it
float). Usually, implementations of this method will remember
the last value put to the wire (i.e. the last value given by the
getNextValue method) and base the return value of this method on
that last value put. Hence, if the clock schedule is 1100, the
getNextValue method will be called (for rising-edge triggered) on
the first step of the schedule (the first 1). Then the
isDrivingOutput method will be called on the next three steps of
the clock. If the value that was put on the first step is to be
maintained through the next three steps as well, the
isDrivingOutput method should remember that and return true.
Note that no matter the value returned by isDrivingOutput, the
getNextValue method will be called on every pertinent edge of the
clock, but if the wire is a tri-state bus, the Stimulator will
not attempt to drive it if isDrivingOutput returns false.
- Returns:
- true if the driver is presently driving the output.
Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.