qcnt¶
-
qcnt(din: Queue, running=False, lvl=1, init=0, cnt_one_more=False, w_out=16) → Uint[w_out] | Queue[Uint[w_out]]¶ Counts the number of elements in a
Queue. Thelvlparameter is used with multi-levelQueue-s to designate the level of elements which are counted. Iflvl==1, the single elements are counted. If for an examplelvl==2, the level 1 transactiona are counted. Theinitparameter can be used to offset the count, andw_outspecifies the size of the counter in number of bits.If
running==False, singleUintnumber that represents the number of elements is output.drv(t=Queue[Uint[4]], seq=[[1, 2, 3, 4, 5]]) \ | qcnt \ | check(ref=[5])
If
running==True, aQueueofUint-s is output showing the live count of the elements.drv(t=Queue[Uint[4]], seq=[[1, 2, 3, 4, 5]]) \ | qcnt(running=True) \ | check(ref=[[1, 2, 3, 4, 5]])