class StreamDriver[T <: Data] extends AnyRef
Drive a Stream with a callback, by default randomly.
Call the lambda when new data should be presented to the Stream, the return value indicating if the data is valid. For example:
val payloads = Queue(0xff, 0xab, 0x11) StreamDriver(dut.io.push, dut.clockDomain) { payload => if (payloads.nonEmpty) { payload.address #= payloads.dequeue(); true } else false }
See setFactor for the random behavior and how to change it.
- See also
- Alphabetic
- By Inheritance
- StreamDriver
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StreamDriver(stream: Stream[T], clockDomain: ClockDomain, driver: (T) ⇒ Boolean)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val _: SimManager
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
- var delay: Int
- var driver: (T) ⇒ Boolean
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- var factor: Option[Float]
- def fsm(): Unit
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- val readyProxy: SimProxy
- def reset(): Unit
-
def
setFactor(value: Float): Unit
Set a fixed probability of executing the driver callback.
Set a fixed probability of executing the driver callback.
If not set, there is a new delay of
(x*x*10).toIntclock cycles (withx = simRandom.nextDouble()) between each callback. When set, the callback is executed clock wheresimRandom.nextFloat() < value. This means that the callback is always executed withvalue >= 1.0fand never with<= 0.0f. -
def
setFactorPeriodically(period: Long): Unit
Set a periodic simulation step change of setFactor.
Set a periodic simulation step change of setFactor.
Each
periodsimulation steps, executesetFactor(simRandom.nextFloat()), i.e. a new uniform probability that the driver callback is executed each clock sample. - var state: Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- var transactionDelay: () ⇒ Int
- val validProxy: SimProxy
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated