
Two independent double-ended queues in one tiny footprint.
Each deque is an array of flip flops with a pointer to the top. The empty and full status flags for each are directly available on pins. The push and pop inputs as well as data bus lines are multiplexed using the deque select line.
Hold end_select low to operate as a stack. Tie end_select to push to operate
as a queue.
To push (if full is low):
data_indeque_selectend_selectpush high for one cycleTo pop (if empty is low):
deque_selectend_selectpop high for one cycleTo replace the last element of the deque (if empty is low):
deque_selectend_selectdata_inpush and pop high for one cycleTo read the end of the deque:
deque_selectend_selectdata_outYou would probably want to connect this to other devices that would find it useful.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Data In 0 | Data Out 0 | Deque Select |
| 1 | Data In 1 | Data Out 1 | End Select |
| 2 | Data In 2 | Data Out 2 | Push |
| 3 | Data In 3 | Data Out 3 | Pop |
| 4 | Data In 4 | Data Out 4 | Deque 0 Empty |
| 5 | Data In 5 | Data Out 5 | Deque 0 Full |
| 6 | Data In 6 | Data Out 6 | Deque 1 Empty |
| 7 | Data In 7 | Data Out 7 | Deque 1 Full |