NEGATION-BASED ROUND-ROBIN ARBITER
A device includes an M-bit input request for service bus, a MASKGEN component that generates a shifting mask, the MASK component that generates an 2*M-bit enabled request for service bus, a NEGATE component that may perform a negation operation on the MASK 2*M-bit enabled request for service output, and a COMBINE component which receives the MASK 2*M-bit enabled request for service output and 2*M-bit NEGATE output and combines them into M-bit 1-HOT grant output bus. The COMBINE output indicates which request for service is being granted by the device.
This application claims the benefit of U.S. Provisional Application Ser. No. 61/120,048 entitled “NEGATION BASED ROUND-ROBIN ARBITER,” filed on Dec. 4, 2008, which is incorporated herein by reference.
BACKGROUND INFORMATION1. Field of the Invention
Implementations described herein relate generally to an arbiter used in electrical computer systems and digital data processing systems. More particularly, an implementation described herein may relate to a method and apparatus that includes a round-robin arbiter using negation logic in Field Programmable Gate Arrays (FPGAs) and other integrated circuits.
2. Discussion of the Related Art
One building block needed in logic design of FPGAs and other integrated circuits may be an arbiter. The simple arbiter may include a round-robin arbiter, which has “M” requests for service and “M” grant signals. At most, one grant may be asserted, indicating service is being granted to a particular master device that is requesting service. If more than one request is asserted at the same time, the request with the highest priority may be granted and the lower priority request(s) may be ignored. A rotating priority is calculated after each clock cycle. If there are no requests pending, the highest priority master (NXT) for the next cycle is set to (NXT+1) mod M. If a request is granted (i.e., ZEC, see below), the highest priority master (NXT) for the next cycle is set to (ZEC+1) mod M. The highest priority request is REQ[NXT], followed by REQ[(NXT+1) mod M], followed by REQ[(NXT+2) mod M], etc.
Merit of the arbiter may be determined by one or more metrics, which may include gate count, minimum cycle time, and power consumption. Because FPGAs may have many limitations, logic blocks may need to be specifically designed for FPGAs to obtain highest merit. Implementations described herein may provide exceptional merit for FPGAs as well as other integrated circuits.
SUMMARY OF THE INVENTIONAccording to one aspect, a device may include a M-bit input request for service bus where M includes a positive integer, a MASKGEN component that generates a M-bit shifting mask, a MASK component that generates an 2*M-bit enabled request for service bus, a NEGATE component that may subtract the MASK 2*M-bit enabled request bus from zero, a COMBINE component which receives the MASK 2*M-bit enabled request for service bus and 2*M-bit NEGATE output and combines them into M-bit 1-HOT grant output bus. The COMBINE output indicates which request for service is being granted by the device. Additionally, a carry out from the NEGATE component may also generate the grant summary output indicating a request of service is being granted. Additionally, the device may include a 1-HOT to binary encoder to generate an N-bit binary-encoded grant output signal. N may be determined by rounding to positive infinity, a logarithm of M base 2. Combinatorial signals 1-HOT grant output, a binary-encoded grant output, and a grant summary output may be synchronized to a device clock input resulting in a synchronized 1-HOT grant output, synchronized binary-encoded grant output and synchronized grant summary output, respectfully.
According to another aspect, a method, performed by an electronic device, may include receiving an M-bit signal that includes one or more requests for service; generating a M-bit shifting mask; generating a 2*M-bit enabled request signal from the M-bit input signal and the M-bit shifting mask; negating the 2*M-bit enabled request signal; combining the 2*M-bit enabled request signal and the 2*M-bit negated output into a 1-HOT encoded M-bit grant output signal that indicates a particular request for service, from the one or more requests for service, is being granted.
The negation-based round-robin arbiter may be utilized within one or more FPGAs, application specific integrated circuits (ASICs), microprocessors, microcontrollers, digital signal processors, network processors, or any other integrated circuit or combinations thereof.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate one or more systems and/or methods described herein and, together with the description, explain these systems and/or methods. In the drawings:
The following detailed description refers to the accompanying drawings. The same reference numbers in different drawings identify the same or similar elements. Also, the following detailed description does not limit the invention.
Exemplary implementations described herein may relate to a round-robin arbiter with high merit for FPGAs and other integrated circuits. The implementations described herein, including any logic circuit, may be modeled, generated, or both, by a computer based on a description of the hardware, expressed in the syntax and the semantics of a hardware description language (HDL). Such HDL descriptions are often stored on a computer readable medium. A computer-readable medium may be defined as a physical or logical memory device. A logical memory device may include memory space within a single physical memory device or spread across multiple physical memory devices. Applicable HDLs include those at the layout, circuit netlist, register transfer, and/or schematic capture levels. Examples of HDLs include, but are not limited to: GDS II and OASIS (layout level); various SPICE languages, and IBIS (circuit netlist level); Verilog, and VHDL (register transfer level); and Virtuoso custom design language and Design Architecture-IC custom design language (schematic capture level). HDL descriptions may also be used for a variety of purposes, including but not limited to layout, behavior, logic and circuit design verification, modeling, and/or simulation.
The 110 MASK block may set the 111 MRQ bus as follows
MRQ={(REQ&˜MSK), (REQ&MSK)}
where {,} indicates concatenation in Verilog. Here the request REQ bus may be duplicated (upper and lower sections) and enabled by 113 MSK and inverted 113 MSK. Note that the MRQ bus width may be two times the number of arbiter input request bits 103 REQ (i.e., 2*M). The 150 MASKGEN causes the round-robin operation by enabling MRQ upper and lower sections by shifting 113 MSK bus.
The 120 NEGATE block component may receive enabled requests on the 111 MRQ bus and perform the negation operation by setting the output 121 NGA to (0-MRQ). The 120 NEGATE block may also generate a carry out and be connected to 104 YSB to indicate a request for service is being honored. 120 NEGATE may use a standard method of negation by adding zero to the ones'-complement of 111 MRQ plus 1.
The 160 COMBINE block may set the output 108 YOT as follows
YOT=(NGA[2M-1:M]&MRQ[2M-1:M])|(NGA[M-1:0]&MRQ[M-1:0])
The “&” operator may form the 1-of-(2*M) fixed-priority encoding of the MRQ bus by calculating (0-MRQ) & MRQ.
The 1-of-(2*M) fixed-priority arbiter operation is illustrated in the following example:
The “|” operator above may combine the upper and lower sections of the 1-of-(2*M) fixed-priority arbiter so as to generate the 108 YOT round-robin arbiter output. Because fast negation may be supported in many FPGAs, the FPGA implementation may perform well in all three merit categories. In other integrated circuits, fast-carry look-ahead subtraction (i.e., for 0-MRQ) may be used to optimize the circuit, resulting in implementation of an arbiter with high merit.
There may be the following 152 MMUX conditions:
-
- 1) grant is pending (line 2),
- 2) grant is not pending and MSK[M-1]!=0 (line 4), and
- 3) grant is not pending and MSK[M-1]==0 (line 6).
The following is an example with a pending grant.
-
- YSB=1 (grant is pending)
- YOT=00001000 (1-of-M round-robin output)
- NGC=11111000
- MSK=xxxxxxxx (don't care)
- MKD=11110000 (NGC<<1)
The following is an example with no pending grant and MSK[M-1]!=0.
-
- YSB=0 (grant is not pending)
- YOT=00000000 (1-of-M round-robin output)
- NGC=00000000
- MSK=11110000 (for instance)
- MKD=11100000 (MSK<<1)
The following is an example with no pending grant and MSK[M-1]==0.
-
- YSB=0 (grant is not pending)
- YOT=00000000 (1-of-M round-robin output)
- NGC=00000000
- MSK=00000000 (for instance)
- MKD=11111110 (˜1)
Because the least-significant bit MKD[0] is always zero (see LIST 1), the circuit can be optimized by reducing the MRQ and ENB buses by one bit and achieve the same result. The 130 ENCODER block component may take the 1-HOT 108 YOT grant bus and generate the 109 YEC binary-encoded grant output bus.
The 140 REGISTER block component may be used to generate synchronous outputs 105 ZSB, 106 ZOT[M-1:0] and 107 ZEC[N-1:0] from the combinatorial output signals 104 YSB, 108 YOT[M-1:0] and 109 YEC[N-1:0], respectively. The 101 CLK signal may be the synchronizing input signal and 102 RST may be the reset signal that may set the REGISTER state to an initial value.
Although
Although
While
The 100 ARBITER uses a different structure to obtain the same round-robin arbiter operation. Instead of scanning REQ, the 110 MASK, 120 NEGATE, and 160 COMBINE blocks are used to generate YOT directly. The 150 MASKGEN block component generates a shifting mask that is used by 110 MASK block. The 130 ENCODER block is then used to generate YEC replacing Line 13. The 120 NEGATE block carry output generates YSB output which replaces Line 14. The 140 REGISTER block is similar to Lines 17-28 in the synchronous section.
It will be appreciated by one skilled in the art that additional functionality may be implemented in the present invention such as input masking, parking and locking. Input masking is selectively enabling only a subset of requests at a particular time. Parking is defined as asserting a particular grant when no requests are pending. Locking describes grants that are held over multiple cycles as determined by a primary input locking bus.
CONCLUSIONThe foregoing description provides illustration and description, but is not intended to be exhaustive or to limit the invention to the precise form disclosed. Modifications and variations are possible in light of the above teachings or may be acquired from practice of the invention.
Still further, aspects have been mainly described in the context of a FPGA. As discussed above, the device and methods described herein may be used with any type of device that includes service requests. It should also be understood that particular devices discussed above are exemplary only and other devices may be used in alternative implementations to generate the desired information.
It will be apparent that aspects, as described above, may be implemented in many different forms of software, firmware, and hardware in the implementations illustrated in the figures. The actual software code or specialized control hardware used to implement these aspects should not be construed as limiting. Thus, the operation and behavior of the aspects were described without reference to the specific software code—it being understood that software and control hardware could be designed to implement the aspects based on the description herein.
It should be emphasized that the term “comprises/comprising” when used in this specification is taken to specify the presence of stated features, integers, steps, or components, but does not preclude the presence or addition of one or more other features, integers, steps, components, or groups thereof.
Even though particular combinations of features are recited in the claims and/or disclosed in the specification, these combinations are not intended to limit the description. In fact, many of these features may be combined in ways not specifically recited in the claims and/or disclosed in the specification.
No element, act, or instruction used in the description of the present application should be construed as critical or essential to the description unless explicitly described as such. Also, as used herein, the article “a” is intended to include one or more items. Where only one item is intended, the term “one” or similar language is used. Further, the phrase “based on,” as used herein is intended to mean “based, at least in part, on” unless explicitly stated otherwise.
Claims
1. A device comprising:
- a clock input used for synchronization;
- an input bus that includes M bits, where the input bus is to receive an M-bit signal that includes one or more requests for service;
- an output bus that includes M bits, where the output bus is to generate an 1-HOT encoded M-bit output signal that indicates a particular request for service, from the one or more requests for service, is being granted;
- a grant summary output that indicates a request of service is being granted;
- a MASKGEN component that generates a shifting mask from the M-bit 1-HOT encoded grant output and grant summary output;
- The MASK component generates a 2*M-bit enabled request bus by concatenating 1) the M-bit request for service input bus Boolean AND with the inverted output from the MASKGEN circuit, and 2) the M-bit request for service input bus Boolean AND with the output from the MASKGEN circuit.
- a NEGATE component that is to perform a negation operation on the 2*M-bit MASK enabled request output bus; and
- a COMBINE component receives the 2*M-bit MASK enabled request output and 2*M-bit NEGATE output and combines them into the M-bit 1-HOT grant output signal.
2. The device of claim 1, where M includes a positive integer.
3. The device of claim 1, where the MASKGEN component further includes
- a MGEN component that performs the Boolean OR operation of 1) arithmetic operation: zero minus 1-HOT M-bit grant of service output bus, and 2) 1-HOT M-bit grant of service output bus;
- a MMUX component outputs 1) the output of MGEN shifted left one bit when grant summary output is set, else 2) the output of MASKGEN shifted left one bit when most significant MASKGEN bit is set, else 3) ones' complement of 1; and
- a MREG component to generate the MASKGEN output by synchronizing MMUX combinatorial output signal to the device clock input.
4. The device of claim 1, where the NEGATE component is further to perform an arithmetic operation that includes subtracting the 2*M-bit MASK enabled request output from zero.
5. The device of claim 4, where the negate component further includes a carry output and where the negate component may generate the grant summary output.
6. The device of claim 1, where the COMBINE component is further to generate the 1-HOT M-bit grant of service output by performing the Boolean OR operation of 1) Boolean AND of the most significant M bits of the MASK enabled request output with the most significant M bits NEGATE output, and 2) Boolean AND of the least significant M bits of the MASK enabled request output with the least significant M bits NEGATE output.
7. The device of claim 1, further comprising:
- an encoder component that is to receive the 1-HOT M-bit grant output signal and generate an N-bit binary-encoded output signal that indicates which request for service included in the input signal is being granted.
8. The device of claim 7, where the encoder component is to determine N based on rounding to positive infinity, the logarithm of M base 2.
9. The device of claim 1, further comprising:
- a register component, comprising: a first input signal to receive the M-bit 1-HOT grant output signal; a second input signal to receive the N-bit binary-encoded grant output signal; a third input signal to receive the grant summary output signal; and a first output signal to generate a synchronized M-bit 1-HOT grant output signal; a second output signal to generate a synchronized N-bit binary-encoded grant output signal; and a third output signal to generate a synchronized grant summary output signal.
10. The device of claim 9, further comprising a clock input and where the register component is to synchronize to the clock input, the N-bit 1-HOT grant output signal, the binary-encoded grant output signal, and the grant summary output signal.
10. A method, performed by an electronic device, comprising:
- receiving an M-bit signal that includes one or more requests for service;
- generating a M-bit shifting mask;
- generating a 2*M-bit enabled request signal from the M-bit input signal and the M-bit shifting mask;
- negating the 2*M-bit enabled request signal;
- combining the 2*M-bit enabled request signal and the 2*M-bit negated output signal into a combined 1-HOT output signal; and
- generating a 1-HOT encoded M-bit output signal that indicates a particular request for service, from the one or more requests for service, is being granted, the generating being based on the combined signal.
Type: Application
Filed: Dec 4, 2009
Publication Date: Jun 10, 2010
Inventor: Daaven Shawn Messinger (Austin, TX)
Application Number: 12/630,842
International Classification: G06F 13/00 (20060101);