Simulation gears

Implemented in pygears.sim.modules

drv(*, t, seq) → b't'

Outputs one data at the time from the iterable seq cast to the type t.

Parameters
  • t – Type of the data to output

  • seq – An iterable generating data to be output

Returns

Data of the type t

>>> drv(t=Uint[8], seq=range(10))

If t is a Queue type of certain level, then seq should generate nested iterables of the same level:

q1 = ((11, 12), (21, 22, 23))
q2 = ((11, 12, 13))
>>> drv(t=Queue[Uint[8], 2], seq=[q1, q2])