Table 11-4 Addressing Of Queue Buffers; Figure 11-5 Queue Reading And Writing - ARM ARM1176JZF-S Technical Reference Manual

Table of Contents

Advertisement

ARM DDI 0301H
ID012310
A simple priority encoder, looking at the three flags, can supply the correct multiplexor select
signals. The state of the three flags can also determine how data are moved from one buffer to
another in the queue. Table 11-4 lists how the three flags are decoded.
Flag C
0
0
0
0
1
1
1
1
New data can be moved into buffer A, provided the queue is not full, even if its flag is set,
because the current contents of buffer A are moved to buffer B. When the queue is read, the flag
associated with the buffer providing the information must be cleared. This operation can be
combined with an input operation so that the buffer is overwritten at the end of the cycle during
which it provides the queue output. This can be implemented by using the read enable signal to
mask the flag of the selected stage, making it available for input. Figure 11-5 shows reading and
writing a queue.
Valid input
Buffer A
Flag A
Buffer B
Flag B
Buffer C
Flag C
Read queue
Output
Four valid inputs, labeled One, Two, Three, and Four, are written into the queue, and are clocked
into buffer A as they arrive. Figure 11-5 shows how these inputs are clocked from buffer to
buffer until the first input reaches buffer C. At this point a read from the queue is required.
Because buffer C is full, it is chosen to supply the data. Because it is being read, it is free to
accept more input, and so it receives the value Two from buffer B, that in turn receives the value
Three from buffer A. Because buffer A is being emptied by writing to buffer B, it can accept the
value Four from the input.
Copyright © 2004-2009 ARM Limited. All rights reserved.
Non-Confidential, Unrestricted Access

Table 11-4 Addressing of queue buffers

Flag B
Flag A
S1
S0
0
0
X
X
0
1
0
0
1
0
0
1
1
1
0
1
0
0
1
X
0
1
1
X
1
0
1
X
1
1
1
X
One
Two
One
One
One

Figure 11-5 Queue reading and writing

Coprocessor Interface
Remarks
Queue is empty
B = A
C = B
C = B, B = A
-
B = A
-
Queue is full. Input inhibited
Three
Four
Two
Three
One
Two
One
Two
11-10

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents