Use four request bits and four grant bits . A high requests service for the coming allocation period, and a high identifies the requester granted the resource during the current period. At most one grant may be high. An all-zero grant vector means idle. The synchronous sequential circuit also has a clock and an initialization signal.
Requests are sampled at a clock edge; the resulting allocation appears during the following cycle. This fixes the Moore machine timing convention: current grants depend on the stored state, rather than combinationally on requests that can change within the cycle.
Store three state bits: a two-bit index identifying the most recent recipient, and a valid bit indicating whether that recipient is receiving service in the current cycle. Then
When no requests are present at a decision edge, clear but preserve . Preserving implements round-robin arbitration with idle memory. Four possible last recipients each have an active and an idle state, giving eight states. The four idle states have equal outputs but different future priorities, so they cannot all be merged. One valid reset is , which gives requester zero first priority at startup.
All requester indices in the following expressions are interpreted modulo four. Let mean that requester is the first asserted request after last recipient :
An empty logical conjunction is true. Decode the remembered index and combine the four priority orders:
Exactly one is high when any request is high. Write as bits . The next-state function and Moore machine outputs are
Thus an idle step preserves the priority memory. The are combinational selection signals, not the current-cycle grants: exposing them directly as outputs would change the design into a Mealy machine. If a requester remains continuously asserted, each intervening successful grant advances the circular order, so it receives service after at most four grant decisions.
For a single read-only memory implementing both the next-state and output equations, the address has four request bits plus three present-state bits. Each word contains three next-state bits and four grant bits. Hence
Three D flip-flops store the state outside this combinational ROM. This is the direct truth-table implementation for the encoding above. A smaller factored implementation exploits the independence of the next-state equations from : a next-state ROM and an output ROM use stored bits in total, or the output decoder can be ordinary logic. These are different implementation organizations, not different state counts.

Articles by others on the same topic (0)

There are currently no matching articles.