User`s guide

Queue
5-355
Examples Example 1
The table below illustrates the Queue block’s operation for a Register size of 4,
Trigger type of Either edge, and Clear output port on reset enabled.
Because the block triggers on both rising and falling edges in this example,
each transition from
1 to 0 or 0 to 1 in the Push, Pop, and Clr columns below
represents a distinct trigger event. A
1 in the Empty column indicates an empty
queue, while a
1 in the Full column indicates a full queue.
Note that at the last step shown, the
Push and Clr ports are triggered
simultaneously. The
Clr trigger takes precedence, and the queue is first
cleared and then pushed.
Example 2
The dspqdemo demo provides another example of Queue operation.
In Push Pop Clr
Queue
Out Empty Full Num
1 0 0 0 0 1 0 0
2 1 0 0 0 0 0 1
3 0 0 0 0 0 0 2
4 1 0 0 0 0 0 3
5 0 0 0 0 0 1 4
6 0 1 0 2 0 0 3
7 0 0 0 3 0 0 2
8 0 1 0 4 0 0 1
9 0 0 0 5 1 0 0
10 1 0 0 5 0 0 1
11 0 0 0 5 0 0 2
12 1 0 1 0 0 0 1
top bottom
top bottom
2
top bottom
32
top bottom
324
top bottom
3245
top bottom
345
top bottom
54
top bottom
5
top bottom
top bottom
10
top bottom
11 10
top bottom
12