com.newisys.dv
Class PortSignalWrapper

java.lang.Object
  extended by com.newisys.dv.PortSignalWrapper
All Implemented Interfaces:
ClockSignal, InOutSignal, InputSignal, OutputSignal, Signal

public final class PortSignalWrapper
extends Object
implements InOutSignal, ClockSignal

A wrapper that allows InputSignals and OutputSignals to be referenced as InOutSignals. This class is used especially for port classes, which, when not directionally constrained, are made up entirely of InOutSignal members.

While this class allows input or output signals to be referenced as in/outs, it is still a runtime error to drive an input signal or sample an output signal. Specifically, if InputSignal methods are called on a wrapped OutputSignal, or vice versa, a DVRuntimeException is thrown.


Constructor Summary
PortSignalWrapper(InputSignal signal)
          Creates a new PortSignalWrapper with the specified InputSignal.
PortSignalWrapper(OutputSignal signal)
          Creates a new PortSignalWrapper with the specified OutputSignal.
 
Method Summary
 void drive(Object value)
          Performs a strong drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().
 void driveAsync(Object value)
          Performs an immediate strong drive of this signal, without synchronizing to the drive edge of the clock.
 void driveAsyncSoft(Object value)
          Performs an immediate soft drive of this signal, without synchronizing to the drive edge of the clock.
 void driveDelay(int cycles, Object value)
          Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a strong drive of the signal.
 void driveDelayNB(int cycles, Object value)
          Performs a non-blocking strong drive of this signal the given number of cycles into the future.
 void driveDelaySoft(int cycles, Object value)
          Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a soft drive of the signal.
 void driveDelaySoftNB(int cycles, Object value)
          Performs a non-blocking soft drive of this signal the given number of cycles into the future.
 void driveNB(Object value)
          Performs a non-blocking strong drive of this signal.
 void driveRange(BitRange range, Object value)
          Performs a strong range drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().
 void driveRange(int highBit, int lowBit, Object value)
          Performs a strong range drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().
 void driveRangeAsync(BitRange range, Object value)
          Performs an immediate strong range drive of this signal, without synchronizing to the drive edge of the clock.
 void driveRangeAsync(int highBit, int lowBit, Object value)
          Performs an immediate strong range drive of this signal, without synchronizing to the drive edge of the clock.
 void driveRangeAsyncSoft(BitRange range, Object value)
          Performs an immediate soft range drive of this signal, without synchronizing to the drive edge of the clock.
 void driveRangeAsyncSoft(int highBit, int lowBit, Object value)
          Performs an immediate soft range drive of this signal, without synchronizing to the drive edge of the clock.
 void driveRangeDelay(int cycles, BitRange range, Object value)
          Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a strong range drive of the signal.
 void driveRangeDelay(int cycles, int highBit, int lowBit, Object value)
          Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a strong range drive of the signal.
 void driveRangeDelayNB(int cycles, BitRange range, Object value)
          Performs a non-blocking strong range drive of this signal the given number of cycles into the future.
 void driveRangeDelayNB(int cycles, int highBit, int lowBit, Object value)
          Performs a non-blocking strong range drive of this signal the given number of cycles into the future.
 void driveRangeDelaySoft(int cycles, BitRange range, Object value)
          Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a soft range drive of the signal.
 void driveRangeDelaySoft(int cycles, int highBit, int lowBit, Object value)
          Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a soft range drive of the signal.
 void driveRangeDelaySoftNB(int cycles, BitRange range, Object value)
          Performs a non-blocking soft range drive of this signal the given number of cycles into the future.
 void driveRangeDelaySoftNB(int cycles, int highBit, int lowBit, Object value)
          Performs a non-blocking soft range drive of this signal the given number of cycles into the future.
 void driveRangeNB(BitRange range, Object value)
          Performs a non-blocking strong range drive of this signal.
 void driveRangeNB(int highBit, int lowBit, Object value)
          Performs a non-blocking strong range drive of this signal.
 void driveRangeSoft(BitRange range, Object value)
          Performs a soft range drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().
 void driveRangeSoft(int highBit, int lowBit, Object value)
          Performs a soft range drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().
 void driveRangeSoftNB(BitRange range, Object value)
          Performs a non-blocking soft range drive of this signal.
 void driveRangeSoftNB(int highBit, int lowBit, Object value)
          Performs a non-blocking soft range drive of this signal.
 void driveSoft(Object value)
          Performs a soft drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().
 void driveSoftNB(Object value)
          Performs a non-blocking soft drive of this signal.
 Event getChangeEvent(BitVector mask, boolean async)
          Returns an event that will be notified each time any of the signal bits corresponding to the given mask changes value.
 ClockSignal getClock()
          Returns the clock signal that this signal is sampled/driven relative to.
 int getCycleCount()
          Returns the cycle count for this clock, which is the number of times it has made a transition in EdgeSet.POSEDGE.
 Event getEdgeEvent(com.newisys.verilog.EdgeSet edges, int bit, boolean async)
          Returns an event that will be notified each time the given bit of this signal reaches an edge in the given set.
 int getInputDepth()
          Returns the sample buffer depth for this signal, which is the number of samples stored for back-references.
 com.newisys.verilog.EdgeSet getInputEdges()
          Returns the set of clock edges this signal is sampled at.
 int getInputSkew()
          Returns the skew (in simulator ticks) relative to the clock edge at which this signal is sampled.
 String getName()
          Returns the full name of this signal, as specified to the appropriate getSignal() method of DVSimulation.
 com.newisys.verilog.EdgeSet getOutputEdges()
          Returns the set of clock edges this signal is driven at.
 int getOutputSkew()
          Returns the skew (in simulator ticks) relative to the clock edge at which this signal is driven.
 int getSize()
          Returns the width of this signal in bits.
 boolean isClock()
          Returns whether or not this signal wrapped by this PortSignalWrapper is a ClockSignal.
 boolean isInput()
          Returns whether or not this signal wrapped by this PortSignalWrapper is an InputSignal.
 boolean isOutput()
          Returns whether or not this signal wrapped by this PortSignalWrapper is an OutputSignal.
 BitVector sample()
          Samples the value of this signal, after synchronizing to the sample edge of the clock, as if by a call to syncSample().
 BitVector sampleAsync()
          Samples the value of this signal immediately, without synchronizing to the sample edge of the clock.
 BitVector sampleDepth(int depth)
          Returns the value of this signal the given number of cycles in the past, after synchronizing to the sample edge of the clock, as if by a call to syncSample().
 BitVector sampleDepthAsync(int depth)
          Returns the value of this signal the given number of cycles in the past, without synchronizing to the sample edge of the clock.
 void syncChange()
          Suspends this thread until a) (any bit of) this signal changes value and then b) the clock for this signal reaches its next sample edge.
 void syncChange(BitVector mask)
          Suspends this thread until a) one of the signal bits corresponding to the given mask changes value and then b) the clock for this signal reaches its next sample edge.
 void syncChangeAsync()
          Suspends this thread until (any bit of) this signal changes value.
 void syncChangeAsync(BitVector mask)
          Suspends this thread until one of the signal bits corresponding to the given mask changes value.
 void syncDrive()
          Suspends this thread until the clock for this signal is at the drive edge.
 void syncDriveDelay(int cycles)
          Suspends this thread until the clock for this signal reaches the drive edge the given number of times.
 void syncEdge(com.newisys.verilog.EdgeSet edges)
          Suspends this thread until a) (the low bit of) this signal reaches an edge in the given set and then b) the clock for this signal reaches its next sample edge.
 void syncEdge(com.newisys.verilog.EdgeSet edges, int bit)
          Suspends this thread until a) the given bit of this signal reaches an edge in the given set and then b) the clock for this signal reaches its next sample edge.
 void syncEdgeAsync(com.newisys.verilog.EdgeSet edges)
          Suspends this thread until (the low bit of) this signal reaches an edge in the given set.
 void syncEdgeAsync(com.newisys.verilog.EdgeSet edges, int bit)
          Suspends this thread until the given bit of this signal reaches an edge in the given set.
 void syncSample()
          Suspends this thread until the clock for this signal is at the sample edge.
 void syncSampleDelay(int cycles)
          Suspends this thread until the clock for this signal reaches the sample edge the given number of times.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortSignalWrapper

public PortSignalWrapper(InputSignal signal)
Creates a new PortSignalWrapper with the specified InputSignal.

Parameters:
signal - the InputSignal to wrap

PortSignalWrapper

public PortSignalWrapper(OutputSignal signal)
Creates a new PortSignalWrapper with the specified OutputSignal.

Parameters:
signal - the OutputSignal to wrap
Method Detail

getName

public String getName()
Returns the full name of this signal, as specified to the appropriate getSignal() method of DVSimulation.

Specified by:
getName in interface Signal
Returns:
the full name of this signal

getClock

public ClockSignal getClock()
Returns the clock signal that this signal is sampled/driven relative to. For clock signals, this method returns this.

Specified by:
getClock in interface Signal
Returns:
the clock signal for this signal

getSize

public int getSize()
Returns the width of this signal in bits. For clock signals, the width is always 1.

Specified by:
getSize in interface Signal
Returns:
the width of this signal

isInput

public boolean isInput()
Returns whether or not this signal wrapped by this PortSignalWrapper is an InputSignal.

Returns:
true if the wrapped signal is an InputSignal, false otherwise

isOutput

public boolean isOutput()
Returns whether or not this signal wrapped by this PortSignalWrapper is an OutputSignal.

Returns:
true if the wrapped signal is an OutputSignal, false otherwise

isClock

public boolean isClock()
Returns whether or not this signal wrapped by this PortSignalWrapper is a ClockSignal.

Returns:
true if the wrapped signal is a ClockSignal, false otherwise

getInputEdges

public com.newisys.verilog.EdgeSet getInputEdges()
Returns the set of clock edges this signal is sampled at.

Specified by:
getInputEdges in interface InputSignal
Returns:
the sample edge set

getInputSkew

public int getInputSkew()
Returns the skew (in simulator ticks) relative to the clock edge at which this signal is sampled. The skew can be any non-positive integer, though the use of zero skew is not recommended for input signals. For in/out signals, the skew must be negative. For clock signals, the skew is always 0.

Specified by:
getInputSkew in interface InputSignal
Returns:
the sample skew

getInputDepth

public int getInputDepth()
Returns the sample buffer depth for this signal, which is the number of samples stored for back-references. The depth is always at least 1.

Specified by:
getInputDepth in interface InputSignal
Returns:
the sample buffer depth
See Also:
InputSignal.sampleDepth(int)

sample

public BitVector sample()
Samples the value of this signal, after synchronizing to the sample edge of the clock, as if by a call to syncSample().

Specified by:
sample in interface InputSignal
Returns:
the value of this signal
See Also:
InputSignal.syncSample()

sampleDepth

public BitVector sampleDepth(int depth)
Returns the value of this signal the given number of cycles in the past, after synchronizing to the sample edge of the clock, as if by a call to syncSample(). The given depth must be >= 0 and less than the sample buffer depth of this signal, as returned by getInputDepth(). Calling this method with depth 0 is equivalent to calling sample().

Specified by:
sampleDepth in interface InputSignal
Parameters:
depth - the number of cycles in the past
Returns:
the value of this signal
See Also:
InputSignal.syncSample(), InputSignal.getInputDepth()

sampleAsync

public BitVector sampleAsync()
Samples the value of this signal immediately, without synchronizing to the sample edge of the clock.

Specified by:
sampleAsync in interface InputSignal
Returns:
the value of this signal

sampleDepthAsync

public BitVector sampleDepthAsync(int depth)
Returns the value of this signal the given number of cycles in the past, without synchronizing to the sample edge of the clock. The given depth must be >= 0 and less than the sample buffer depth of this signal, as returned by getInputDepth(). Calling this method with depth 0 returns the value of this signal at the last clock edge.

Specified by:
sampleDepthAsync in interface InputSignal
Parameters:
depth - the number of cycles in the past
Returns:
the value of this signal
See Also:
InputSignal.getInputDepth()

syncSample

public void syncSample()
Suspends this thread until the clock for this signal is at the sample edge. If the clock is already at the sample edge, this method returns immediately.

Specified by:
syncSample in interface InputSignal

syncSampleDelay

public void syncSampleDelay(int cycles)
Suspends this thread until the clock for this signal reaches the sample edge the given number of times. If cycles is 1, this method waits for the next sample edge. If cycles is 0 and the clock is already at the sample edge, this method returns immediately. In other words, syncSampleDelay(0) is equivalent to syncSample().

Specified by:
syncSampleDelay in interface InputSignal
Parameters:
cycles - the number of times the sample edge must be observed

syncEdge

public void syncEdge(com.newisys.verilog.EdgeSet edges)
Suspends this thread until a) (the low bit of) this signal reaches an edge in the given set and then b) the clock for this signal reaches its next sample edge. At the time of the call, if the last transition of the signal in the current cycle matches the given edge set, condition a) is considered satisfied and this method simply waits for condition b). This method is intended for use with single bit signals; for multiple bit signals, use syncEdge(EdgeSet, int).

Specified by:
syncEdge in interface InputSignal
Parameters:
edges - the set of edges to wait for
See Also:
InputSignal.syncEdge(EdgeSet, int)

syncEdge

public void syncEdge(com.newisys.verilog.EdgeSet edges,
                     int bit)
Suspends this thread until a) the given bit of this signal reaches an edge in the given set and then b) the clock for this signal reaches its next sample edge. At the time of the call, if the last transition of the signal in the current cycle matches the given edge set, condition a) is considered satisfied and this method simply waits for condition b).

Specified by:
syncEdge in interface InputSignal
Parameters:
edges - the set of edges to wait for
bit - the index of the bit to wait for the edge on

syncEdgeAsync

public void syncEdgeAsync(com.newisys.verilog.EdgeSet edges)
Suspends this thread until (the low bit of) this signal reaches an edge in the given set. This method does not synchronize to the sample edge of the clock. This method is intended for use with single bit signals; for multiple bit signals, use syncEdgeAsync(EdgeSet, int).

Specified by:
syncEdgeAsync in interface InputSignal
Parameters:
edges - the set of edges to wait for
See Also:
InputSignal.syncEdgeAsync(EdgeSet, int)

syncEdgeAsync

public void syncEdgeAsync(com.newisys.verilog.EdgeSet edges,
                          int bit)
Suspends this thread until the given bit of this signal reaches an edge in the given set. This method does not synchronize to the sample edge of the clock.

Specified by:
syncEdgeAsync in interface InputSignal
Parameters:
edges - the set of edges to wait for
bit - the index of the bit to wait for the edge on

getEdgeEvent

public Event getEdgeEvent(com.newisys.verilog.EdgeSet edges,
                          int bit,
                          boolean async)
Returns an event that will be notified each time the given bit of this signal reaches an edge in the given set. Unless the async flag is set, the event is not notified until the next sample edge of the clock.

Specified by:
getEdgeEvent in interface InputSignal
Parameters:
edges - the set of edges to wait for
bit - the index of the bit to wait for edges on
async - indicates not to wait for the next sample edge
Returns:
an event notified each time the requested edge(s) occurs

syncChange

public void syncChange()
Suspends this thread until a) (any bit of) this signal changes value and then b) the clock for this signal reaches its next sample edge. At the time of the call, if the signal has changed value in the current cycle, condition a) is considered satisfied and this method simply waits for condition b).

Specified by:
syncChange in interface InputSignal

syncChange

public void syncChange(BitVector mask)
Suspends this thread until a) one of the signal bits corresponding to the given mask changes value and then b) the clock for this signal reaches its next sample edge. At the time of the call, if the signal has changed value in the current cycle, condition a) is considered satisfied and this method simply waits for condition b).

Specified by:
syncChange in interface InputSignal
Parameters:
mask - a bit vector containing a ONE for each signal bit to watch, or null to watch the entire signal

syncChangeAsync

public void syncChangeAsync()
Suspends this thread until (any bit of) this signal changes value. This method does not synchronize to the sample edge of the clock.

Specified by:
syncChangeAsync in interface InputSignal

syncChangeAsync

public void syncChangeAsync(BitVector mask)
Suspends this thread until one of the signal bits corresponding to the given mask changes value. This method does not synchronize to the sample edge of the clock.

Specified by:
syncChangeAsync in interface InputSignal
Parameters:
mask - a bit vector containing a ONE for each signal bit to watch, or null to watch the entire signal

getChangeEvent

public Event getChangeEvent(BitVector mask,
                            boolean async)
Returns an event that will be notified each time any of the signal bits corresponding to the given mask changes value. Unless the async flag is set, the event is not notified until the next sample edge of the clock.

Specified by:
getChangeEvent in interface InputSignal
Parameters:
mask - a bit vector containing a ONE for each signal bit to watch, or null to watch the entire signal
async - indicates not to wait for the next sample edge
Returns:
an event notified each time the requested change occurs

getOutputEdges

public com.newisys.verilog.EdgeSet getOutputEdges()
Returns the set of clock edges this signal is driven at.

Specified by:
getOutputEdges in interface OutputSignal
Returns:
the drive edge set

getOutputSkew

public int getOutputSkew()
Returns the skew (in simulator ticks) relative to the clock edge at which this signal is driven. The skew can be any non-negative integer, though the use of zero skew is not recommended for output signals. For in/out signals, the skew must be postive.

Specified by:
getOutputSkew in interface OutputSignal
Returns:
the drive skew

drive

public void drive(Object value)
Performs a strong drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().

Specified by:
drive in interface OutputSignal
Parameters:
value - the value to drive
See Also:
OutputSignal.syncDrive()

driveNB

public void driveNB(Object value)
Performs a non-blocking strong drive of this signal. If the clock for this signal is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). If the clock is not at the drive edge, the drive is queued until that edge (i.e. at next edge time + skew).

Specified by:
driveNB in interface OutputSignal
Parameters:
value - the value to drive

driveDelay

public void driveDelay(int cycles,
                       Object value)
Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a strong drive of the signal. If cycles is 1, this method waits for the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveDelay(0, value) is equivalent to drive(value).

Specified by:
driveDelay in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
value - the value to drive

driveDelayNB

public void driveDelayNB(int cycles,
                         Object value)
Performs a non-blocking strong drive of this signal the given number of cycles into the future. If cycles is 1, this method drives the value at the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveDelayNB(0, value) is equivalent to driveNB(value).

Specified by:
driveDelayNB in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
value - the value to drive

driveAsync

public void driveAsync(Object value)
Performs an immediate strong drive of this signal, without synchronizing to the drive edge of the clock.

Specified by:
driveAsync in interface OutputSignal
Parameters:
value - the value to drive

driveSoft

public void driveSoft(Object value)
Performs a soft drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().

Specified by:
driveSoft in interface OutputSignal
Parameters:
value - the value to drive
See Also:
OutputSignal.syncDrive()

driveSoftNB

public void driveSoftNB(Object value)
Performs a non-blocking soft drive of this signal. If the clock for this signal is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). If the clock is not at the drive edge, the drive is queued until that edge (i.e. at next edge time + skew).

Specified by:
driveSoftNB in interface OutputSignal
Parameters:
value - the value to drive

driveDelaySoft

public void driveDelaySoft(int cycles,
                           Object value)
Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a soft drive of the signal. If cycles is 1, this method waits for the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveDelaySoft(0, value) is equivalent to driveSoft(value).

Specified by:
driveDelaySoft in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
value - the value to drive

driveDelaySoftNB

public void driveDelaySoftNB(int cycles,
                             Object value)
Performs a non-blocking soft drive of this signal the given number of cycles into the future. If cycles is 1, this method drives the value at the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveDelaySoftNB(0, value) is equivalent to driveSoftNB(value).

Specified by:
driveDelaySoftNB in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
value - the value to drive

driveAsyncSoft

public void driveAsyncSoft(Object value)
Performs an immediate soft drive of this signal, without synchronizing to the drive edge of the clock.

Specified by:
driveAsyncSoft in interface OutputSignal
Parameters:
value - the value to drive

driveRange

public void driveRange(int highBit,
                       int lowBit,
                       Object value)
Performs a strong range drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().

Specified by:
driveRange in interface OutputSignal
Parameters:
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive
See Also:
OutputSignal.syncDrive()

driveRange

public void driveRange(BitRange range,
                       Object value)
Performs a strong range drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().

Specified by:
driveRange in interface OutputSignal
Parameters:
range - the range of bits to drive
value - the value to drive
See Also:
OutputSignal.syncDrive()

driveRangeNB

public void driveRangeNB(int highBit,
                         int lowBit,
                         Object value)
Performs a non-blocking strong range drive of this signal. If the clock for this signal is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). If the clock is not at the drive edge, the drive is queued until that edge (i.e. at next edge time + skew).

Specified by:
driveRangeNB in interface OutputSignal
Parameters:
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive

driveRangeNB

public void driveRangeNB(BitRange range,
                         Object value)
Performs a non-blocking strong range drive of this signal. If the clock for this signal is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). If the clock is not at the drive edge, the drive is queued until that edge (i.e. at next edge time + skew).

Specified by:
driveRangeNB in interface OutputSignal
Parameters:
range - the range of bits to drive
value - the value to drive

driveRangeDelay

public void driveRangeDelay(int cycles,
                            int highBit,
                            int lowBit,
                            Object value)
Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a strong range drive of the signal. If cycles is 1, this method waits for the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveRangeDelay(0, value) is equivalent to driveRange(value).

Specified by:
driveRangeDelay in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive

driveRangeDelay

public void driveRangeDelay(int cycles,
                            BitRange range,
                            Object value)
Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a strong range drive of the signal. If cycles is 1, this method waits for the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveRangeDelay(0, value) is equivalent to driveRange(value).

Specified by:
driveRangeDelay in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
range - the range of bits to drive
value - the value to drive

driveRangeDelayNB

public void driveRangeDelayNB(int cycles,
                              int highBit,
                              int lowBit,
                              Object value)
Performs a non-blocking strong range drive of this signal the given number of cycles into the future. If cycles is 1, this method drives the value at the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveRangeDelayNB(0, value) is equivalent to driveRangeNB(value).

Specified by:
driveRangeDelayNB in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive

driveRangeDelayNB

public void driveRangeDelayNB(int cycles,
                              BitRange range,
                              Object value)
Performs a non-blocking strong range drive of this signal the given number of cycles into the future. If cycles is 1, this method drives the value at the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveRangeDelayNB(0, value) is equivalent to driveRangeNB(value).

Specified by:
driveRangeDelayNB in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
range - the range of bits to drive
value - the value to drive

driveRangeAsync

public void driveRangeAsync(int highBit,
                            int lowBit,
                            Object value)
Performs an immediate strong range drive of this signal, without synchronizing to the drive edge of the clock.

Specified by:
driveRangeAsync in interface OutputSignal
Parameters:
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive

driveRangeAsync

public void driveRangeAsync(BitRange range,
                            Object value)
Performs an immediate strong range drive of this signal, without synchronizing to the drive edge of the clock.

Specified by:
driveRangeAsync in interface OutputSignal
Parameters:
range - the range of bits to drive
value - the value to drive

driveRangeSoft

public void driveRangeSoft(int highBit,
                           int lowBit,
                           Object value)
Performs a soft range drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().

Specified by:
driveRangeSoft in interface OutputSignal
Parameters:
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive
See Also:
OutputSignal.syncDrive()

driveRangeSoft

public void driveRangeSoft(BitRange range,
                           Object value)
Performs a soft range drive of this signal, after synchronizing to the drive edge of the clock, as if by a call to syncDrive().

Specified by:
driveRangeSoft in interface OutputSignal
Parameters:
range - the range of bits to drive
value - the value to drive
See Also:
OutputSignal.syncDrive()

driveRangeSoftNB

public void driveRangeSoftNB(int highBit,
                             int lowBit,
                             Object value)
Performs a non-blocking soft range drive of this signal. If the clock for this signal is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). If the clock is not at the drive edge, the drive is queued until that edge (i.e. at next edge time + skew).

Specified by:
driveRangeSoftNB in interface OutputSignal
Parameters:
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive

driveRangeSoftNB

public void driveRangeSoftNB(BitRange range,
                             Object value)
Performs a non-blocking soft range drive of this signal. If the clock for this signal is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). If the clock is not at the drive edge, the drive is queued until that edge (i.e. at next edge time + skew).

Specified by:
driveRangeSoftNB in interface OutputSignal
Parameters:
range - the range of bits to drive
value - the value to drive

driveRangeDelaySoft

public void driveRangeDelaySoft(int cycles,
                                int highBit,
                                int lowBit,
                                Object value)
Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a soft range drive of the signal. If cycles is 1, this method waits for the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveRangeDelaySoft(0, value) is equivalent to driveRangeSoft(value).

Specified by:
driveRangeDelaySoft in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive

driveRangeDelaySoft

public void driveRangeDelaySoft(int cycles,
                                BitRange range,
                                Object value)
Suspends this thread until the clock for this signal reaches the drive edge the given number of times, then performs a soft range drive of the signal. If cycles is 1, this method waits for the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveRangeDelaySoft(0, value) is equivalent to driveRangeSoft(value).

Specified by:
driveRangeDelaySoft in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
range - the range of bits to drive
value - the value to drive

driveRangeDelaySoftNB

public void driveRangeDelaySoftNB(int cycles,
                                  int highBit,
                                  int lowBit,
                                  Object value)
Performs a non-blocking soft range drive of this signal the given number of cycles into the future. If cycles is 1, this method drives the value at the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveRangeDelaySoftNB(0, value) is equivalent to driveRangeSoftNB(value).

Specified by:
driveRangeDelaySoftNB in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive

driveRangeDelaySoftNB

public void driveRangeDelaySoftNB(int cycles,
                                  BitRange range,
                                  Object value)
Performs a non-blocking soft range drive of this signal the given number of cycles into the future. If cycles is 1, this method drives the value at the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method drives the value relative the current edge (i.e. at current time + skew). In other words, driveRangeDelaySoftNB(0, value) is equivalent to driveRangeSoftNB(value).

Specified by:
driveRangeDelaySoftNB in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed
range - the range of bits to drive
value - the value to drive

driveRangeAsyncSoft

public void driveRangeAsyncSoft(int highBit,
                                int lowBit,
                                Object value)
Performs an immediate soft range drive of this signal, without synchronizing to the drive edge of the clock.

Specified by:
driveRangeAsyncSoft in interface OutputSignal
Parameters:
highBit - the index of the highest bit to drive
lowBit - the index of the lowest bit to drive
value - the value to drive

driveRangeAsyncSoft

public void driveRangeAsyncSoft(BitRange range,
                                Object value)
Performs an immediate soft range drive of this signal, without synchronizing to the drive edge of the clock.

Specified by:
driveRangeAsyncSoft in interface OutputSignal
Parameters:
range - the range of bits to drive
value - the value to drive

syncDrive

public void syncDrive()
Suspends this thread until the clock for this signal is at the drive edge. If the clock is already at the drive edge, this method returns immediately.

Specified by:
syncDrive in interface OutputSignal

syncDriveDelay

public void syncDriveDelay(int cycles)
Suspends this thread until the clock for this signal reaches the drive edge the given number of times. If cycles is 1, this method waits for the next drive edge. If cycles is 0 and the clock is already at the drive edge, this method returns immediately. In other words, syncDriveDelay(0) is equivalent to syncDrive().

Specified by:
syncDriveDelay in interface OutputSignal
Parameters:
cycles - the number of times the drive edge must be observed

getCycleCount

public int getCycleCount()
Returns the cycle count for this clock, which is the number of times it has made a transition in EdgeSet.POSEDGE.

Specified by:
getCycleCount in interface ClockSignal
Returns:
the cycle count for this clock