czip¶
Zips two or more Queue
-s together
-
czip
(*din)¶ Example shows how to form a
Queue
of points from the twoQueue
-s, one withx
coordinates[10, 11, 12]
, and the other withy
coordinates[20, 21, 22]
.x = drv(t=Queue[Uint[5]], seq=[[10, 11, 12]]) y = drv(t=Queue[Uint[5]], seq=[[20, 21, 22]]) czip(x, y) | check(ref=[[(10, 20), (11, 21), (12, 22)]])
Next example demonstrates how
czip()
waits for its inputs. The producer of thex
coordinate outputs the data only once every three cycles. Checkout howczip.din1
is acknowledged only whenczip.din0
also becomes available:x = drv(t=Queue[Uint[5]], seq=[[10, 11, 12]]) | delay(2) y = drv(t=Queue[Uint[5]], seq=[[20, 21, 22]]) czip(x, y) | check(ref=[[(10, 20), (11, 21), (12, 22)]])