byucc.jhdl.apps.Stimulator.functions
Class Pulse

java.lang.Object
  extended bybyucc.jhdl.apps.Stimulator.functions.Pulse
All Implemented Interfaces:
BooleanValueProvider, ValueProvider

public class Pulse
extends java.lang.Object
implements BooleanValueProvider

This class implements the ValueProvider interface to provide a pulse function for wire stimulus.

Author:
Anthony L. Slade

Constructor Summary
Pulse(long pulseStart, int pulseDuration)
          The cycle count will start at zero, so this constructor should usually only be used to add the Pulse function at the beginning of simulation.
Pulse(long pulseStart, int pulseDuration, boolean inverted)
          The cycle count will start at zero, so this constructor should usually only be used to add the Pulse function at the beginning of simulation.
Pulse(long pulseStart, int pulseDuration, long cycleCountStart)
          The signal will be non-inverted.
Pulse(long pulseStart, int pulseDuration, long cycleCountStart, boolean inverted)
           
 
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()
           
 boolean getResetBooleanValue()
          Resets the cycle count and returns the proper value for the reset condition.
 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

Pulse

public Pulse(long pulseStart,
             int pulseDuration)
The cycle count will start at zero, so this constructor should usually only be used to add the Pulse function at the beginning of simulation. The signal will be non-inverted.

Parameters:
pulseStart - the starting cycle number for the pulse (zero if it should start at reset)
pulseDuration - the length of the pulse

Pulse

public Pulse(long pulseStart,
             int pulseDuration,
             boolean inverted)
The cycle count will start at zero, so this constructor should usually only be used to add the Pulse function at the beginning of simulation.

Parameters:
pulseStart - the starting cycle number for the pulse (zero if it should start at reset)
pulseDuration - the length of the pulse
inverted - if true, then the non-pulse signal will true and the pulse will go down to false.

Pulse

public Pulse(long pulseStart,
             int pulseDuration,
             long cycleCountStart)
The signal will be non-inverted.

Parameters:
pulseStart - the starting cycle number for the pulse (zero if it should start at reset)
pulseDuration - the length of the pulse
cycleCountStart - the cycle count at which this value provider should start. This is useful if adding this ValueProvider later in the simulation so that if a reset occurs, this provider can take that into account to provide the same pulse function as if this ValueProvider was added at the beginning of simulation

Pulse

public Pulse(long pulseStart,
             int pulseDuration,
             long cycleCountStart,
             boolean inverted)
Parameters:
pulseStart - the starting cycle number for the pulse (zero if it should start at reset)
pulseDuration - the length of the pulse
cycleCountStart - the cycle count at which this value provider should start. This is useful if adding this ValueProvider later in the simulation so that if a reset occurs, this provider can take that into account to provide the same pulse function as if this ValueProvider was added at the beginning of simulation
inverted - if true, then the non-pulse signal will true and the pulse will go down to false.
Method Detail

getNextBooleanValue

public boolean getNextBooleanValue()
Specified by:
getNextBooleanValue in interface BooleanValueProvider
Returns:
true if the cycle count is within the specifice pulse range, otherwise false

getResetBooleanValue

public boolean getResetBooleanValue()
Resets the cycle count and returns the proper value for the reset condition.

Specified by:
getResetBooleanValue in interface BooleanValueProvider
Returns:
the value (true|false) for the wire at reset

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

Specified by:
getForceSchedule in interface ValueProvider
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

Specified by:
getForceSchedule in interface ValueProvider
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.

Specified by:
isDrivingOutput in interface ValueProvider
Returns:
true


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.