1. Field of the Invention
Embodiments of the invention relate generally to the field of electrical computer systems and digital data processing systems. More particularly, an embodiment of the invention relates to an execution unit (EU) and methods of executing data processing instructions.
2. Discussion of the Related Art
The trend in computer processors is to accommodate applications that demand greater performance and speed yet use less power and are implemented in less silicon area.
Execution units are the basic computation engines within typical processors. An EU accepts a stream of operands and operations to be performed and generates the required results. The computational power of the processor is dependent on the instructions that can be performed by the EU.
One problem with this existing approach is that power consumption is high and circuit size is large because all the blocks exist and are operational even though only one function block output is selected. Therefore, what is required is a solution that reduces power consumption and circuit size.
Heretofore, the requirements of more complex instructions, low power consumption, smaller circuit size, and lower design cost referred to above have not been fully met. What is needed is a solution that solves all of these problems.
There is a need for the following embodiments of the invention. Of course, the invention is not limited to these embodiments.
According to an embodiment of the invention, a process includes receiving an instruction and one or more operands, determining a plurality of program bits and one or more sets of pluralities of select input bits (based on the instruction and the one or more operands), determining a plurality of extra adder input bits (based on the instruction and the one or more operands), determining a plurality of multiplexer output bits (based on the plurality of program bits and the one or more sets of pluralities of select input bits), determining one or more carry-save adder tree outputs (based on the plurality of multiplexer output bits and the plurality of extra adder input bits), determining a carry-propagate adder sum output (based on the one or more carry-save adder tree outputs), and determining the result of the instruction on the one or more operands (based on the carry-propagate adder sum output).
According to another embodiment of the invention, a machine includes a finite state machine comprising an instruction input, a plurality of operand inputs, a plurality of outputs, a plurality of extra adder inputs, a result output and condition code output flags; an array of multiplexers coupled to the plurality of outputs and comprising a plurality of multiplexer outputs; a carry-save adder tree coupled to the plurality of multiplexer outputs and coupled to the extra adder inputs and comprising a plurality of carry-save adder tree outputs coupled to the finite state machine; and a carry-propagate adder coupled to the plurality of carry-save adder tree outputs and comprising a plurality of carry-propagate adder outputs coupled to the finite state machine.
According to another embodiment of the invention, a machine includes an execution unit configured to execute a plurality of instructions through substantially the same data path.
These and other embodiments of the invention will be better appreciated and understood when considered in conjunction with the following description and the accompanying drawings. It should be understood, however, that the following description, while indicating various embodiments of the invention and numerous specific details thereof, is given by way of illustration and not of limitation. Many substitutions, modifications, additions and/or rearrangements may be made within the scope of an embodiment of the invention without departing from the spirit thereof, and embodiments of the invention include all such substitutions, modifications, additions and/or rearrangements.
The drawings accompanying and forming part of this specification are included to depict certain embodiments of the invention. A clearer conception of embodiments of the invention, and of the components combinable with, and operation of systems provided with, embodiments of the invention, will become more readily apparent by referring to the exemplary, and therefore nonlimiting, embodiments illustrated in the drawings, wherein identical reference numerals (if they occur in more than one view) designate the same elements. Embodiments of the invention may be better understood by reference to one or more of these drawings in combination with the description presented herein. It should be noted that the features illustrated in the drawings are not necessarily drawn to scale.
Embodiments of the invention and the various features and advantageous details thereof are explained more fully with reference to the nonlimiting embodiments that are illustrated in the accompanying drawings and detailed in the following description. Descriptions of well known starting materials, processing techniques, components and equipment are omitted so as not to unnecessarily obscure the embodiments of the invention in detail. It should be understood, however, that the detailed description and the specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only and not by way of limitation. Various substitutions, modifications, additions and/or rearrangements within the spirit and/or scope of the underlying inventive concept will become apparent to those skilled in the art from this disclosure.
In general, the context of an embodiment of the invention may include an execution unit that reduces power consumption compared to existing execution units by not activating all the independent function blocks during each clock cycle (see
The EU may be utilized within a microprocessor, micro controller, digital signal processor, or equivalent integrated circuit. The EU may form part of an integrated circuit on a circuit board implemented in any electronic device. Such devices may include, but are not limited to a mobile communication device such as a cell phone, a PDA, a media playing device such as an MP3 player, a digital video disc (DVD) player, a video game playing device, a laptop computer, a desktop device (i.e., a personal computer or a workstation), a household appliance (e.g., a microwave oven and/or appliance remote control), an automobile radio faceplate, a television, a point-of-sale terminal, an automated teller machine, an industrial device (e.g., test equipment, control equipment), or any other device that requires manipulation of digital data.
In the figures and examples that follow, a 32-bit execution unit is described for illustration purposes unless otherwise indicated. It is to be understood that a different number of bits may be used.
The components of EU 300 could be implemented in a variety of ways including programmable logic array (PLA), field programmable gate array (FPGA), memory-based finite-state machine, gate-array, application-specific integrated circuit (ASIC), structured ASIC, standard cell ASIC, or application-specific standard product (ASSP) circuits.
EU 300 of
Finite state machine FSM 310 component may be coupled to receive a plurality of inputs. A dock input line 311 sets the dock cycle and synchronizes the operation of the EU. An instruction input line 312 receives the instruction to be performed on a plurality of operands. For example, and not by way of limitation, two operand input lines, an A operand input line 313, and a B operand input line 314, are depicted in
EU 300 may be coupled to multiplexer array MUX 320 through a plurality of outputs. For example, and not by way of limitation, four output lines are depicted in
WAL 330 is a carry-save adder tree that can add m operands in a time that is proportional to log 2(m). WAL 330 may be coupled to extra adder input line EXA 332 from FSM 310. WAL 330 may also be coupled to an adder partitioning control line CTR 334 and adder segmentation control line SEG 335 from FSM 310. The purpose of extra adder input line EXA 332 and adder partitioning control line CTR 334 and adder segmentation control line SEG 335 will be explained in detail below. The outputs of WAL 330 may include two outputs, YOA 336 and YOB 337, which may be coupled as input to both ADD 340 and FSM 310. Outputs YOA 336 and YOB 337 may, among other things, make a partial result of the instruction being executed by EU 300 available to FSM 310.
Carry propagate adder ADD 340 may receive two input lines YOA 336 and YOB 337 from WAL 330 and perform an addition on these inputs. ADD 340 may also be coupled to adder partitioning control line CTR 334 and adder segmentation control line SEG 335 as an input from FSM 310. ADD 340 may also be coupled to FSM 310 through RND line 318, which acts as a fast carry-in for floating-point rounding. The output of ADD 340 may be coupled to FSM 310 through result line YOT 342 and carry output line COT 341. FSM 310 may, in turn, take these lines COT 341 and YOT 342 and generate the condition code flags CCF 316 and the final EU results output ZOT 317.
One advantage of the aforementioned design is that all instructions implemented by the execution unit share the same data path. This is in contrast to existing designs where instructions are coded in separate logical blocks. In conventional designs, all logical blocks are active and only one output is selected. An execution unit consistent with the invention uses the same data path for all instructions. Furthermore, during the execution of many instructions, most of the XOT 325 and EXA 332 are zeroes. Since adding zeros in the WAL 330 and ADD 340 uses less power, the overall power consumption is reduced.
The EU may use a single circuit 300 (
The output of MUX 320 can be written as:
The values set for the AXI, BXI, CXI, and PRG lines are determined by the FSM 310 based on the instruction and the operands. How the FSM 310 determines these values will be explained below with reference to
The top row in
The second row of MUX 320 will now be described. The second row of multiplexers receives as the input row PRG(15) buses. Thus, first multiplexer 530 receives the four bits of the first bus of row (15), or PRG(15) (0) (3:0). Second multiplexer 531 receives the second bus of row PRG(15), or PRG(15) (1) (3:0), and so on, until the last multiplexer 532 receives the PRG(15) (31) (3:0) bus. First multiplexer 530 receives the BXI(1) bit as the msb select line, and the BXI(2) bit as the lsb select line. Second multiplexer 531 receives the BXI(2) bit as the msb select line, and the BXI(3) bit as the lsb select line. This pattern is repeated until the last bit BXI(31) is reached for the msb select line, at which point the multiplexer lsb select line in the row receives the AXI(0) bit. Thus, the next to last multiplexer in the second row that receives the PRG(15) (30) (3:0), has as the msb select line the BXI(31) bit and the AXI(0) bit as the lsb select line. Last multiplexer 532 receives the AXI(0) bit as the msb select line and the AXI(1) bit as the lsb select line.
This pattern is repeated down the rows of multiplexers. Each subsequent row begins with the next higher bit of the BXI bus, and switches to the AXI bus when the last bit of the BXI bus is reached. For example, the second to last row of multiplexers is connected as follows. Each multiplexer in the second to last row receives the PRG(1) bus. Going from right to left, first multiplexer 520 receives the PRG(1) (0) (3:0) bus, second multiplexer 521 receives the PRG(1) (1) (3:0) bus, and so on until last multiplexer 522 receives the PRG(1) (31) (3:0) bus. First multiplexer 520 in the second to last row receives the BXI(29) bit as the msb select line input and the BXI(30) bit as the lsb select line input. Second multiplexer 521 in the second to last row receives the BXI(30) bit as the msb select line input and the BXI(31) bit as the lsb select line input. The next multiplexer would thus receive the BXI(31) bit as the msb select line input and the AXI(0) bit as the lsb select line input. Last multiplexer 522 in this row thus receives the AXI(28) bit as the msb select line input and the AXI(29) bit as the lsb select line input.
For completion, the last row of MUX 320 will be described. The last row in MUX 320 receives the PRG(0) buses as the input lines to each multiplexer. Thus, first multiplexer 510 receives the PRG(0) (0) (3:0) bus, second multiplexer 511 receives the PRG(0) (1) (3:0) bus, and so on until last multiplexer 512, which receives the PRG(0) (31) (3:0) bus. First multiplexer 510 receives the BXI(31) bit as the msb select line input and the AXI(0) bit as the lsb select line input, second multiplexer 511 receives the AXI(0) bit as the msb select line input and the AXI(1) bit as the lsb select line input, and last multiplexer 512 receives the AXI(30) bit as the msb select line input and the AXI(31) bit as the lsb select line input.
As can be seen in
Two bytes are illustrated in
As explained above with reference to
In addition to partitioning the adder into byte slices, WAL 330 and ADD 340 may be segmented into four regions to allow 64-bit results on a 32-bit EU in one cycle.
The FSM 310 is the finite-state machine that controls data path blocks MUX 320, WAL 330 and ADD 340 as shown in
The basic structure of FSM 310 is described in VHDL code listed in
Line 11 implements a SIMD mask generator described below with reference to
Similarly, for the OR operation, the PRG line broadcasts hexadecimal “e” (“1110” in binary). Therefore, the output of a MUX will be 1 unless both select lines are set to “0”. The result will be an OR operation on the AOP and BOP bits. The other logic functions are implemented in a similar manner. Assigning a value of “2” to the PRG line results in an ANDI operation on the AOP and BOP operands, assigning a value of “5” to the PRG line inverts the AOP operand, assigning the value hexadecimal “b” to the PRG line results in an ORI operation, assigning the value “6” to the PRG line results in a XOR operation on the AOP and BOP operands, and assigning the value of “9” to the PRG line results in an XNOR operation on the AOP and BOP operands.
For each instruction in
For this class of instructions for FSM controller logic implementation 1210, the EXA(0) bus is assigned the AOP operand and the PRG bus row 16 is assigned the value hexadecimal “c” (“1100” in binary). Binary value “1100” as the input into a 4-to-1 MUX has the effect of propagating the value broadcast on the msb select line. As seen in
The ADC_4 instruction is an add operation with a carry in, where the carry in is assigned to the EXA(1)(0) bit. For the ADC_4 instruction, the operation is the same as ADD_4 except it includes Line 07, which causes the carry input, cin(0), to be added also.
The subtraction instruction is implemented by taking the 2's complement of the BOP operand and adding it to the AOP operand. The row 16 PRG value of “3” propagates the inverse of the BOP operand through the MUX 320. This has the result of assigning NOT BOP to the XOT(16) bus. Assigning “1” to the EXA(1) (0) bus leads to AOP+NOT(BOP)+1, which is the same as AOP−BOP.
Similarly, the SBC_4 instruction is a subtraction with a carry in, where the carry in is assigned to the EXA (1) (0) bit. The operation is the same as SUB_4 except it includes Line 17 which causes the inverted carry input, (not cin(0)), to be added to form the result ZOT=AOP−BOP−cin(0).
To perform the different vector addition and subtraction operations listed in Table 1, the CTR bus is set as in Table 2 along with EXA(1) for the proper carry input.
ZOT(i)<=AOP(i) when positive(AOP(i)) else 0−AOP(i);
Which is equivalent to
ZOT(i)<=AOP(i) when positive(AOP(i)) else not AOP(i)+1;
where i represents the ith element of a vector or the only operand of a scalar.
The setting of the PRG line for absolute value instructions is shown in Table 4. In all these cases, PRG(16) is set to all 6's. The differences between
For the CNT1_4 instruction, with the first cycle (cyc=0), AOP's even “one” bits are totaled. During the second cycle (cyc=1), AOP's odd “one” bits are added to the accumulated total in EXA(0) and EXA(1) Lines 11 and 12. ADD 340 generates the final total at the end of the second cycle. The CNT0_4 instruction is similarly calculated, except the number of zeros in AOP is totaled.
ZOT<=BOP+AOP(3)+AOP(2)+AOP(1)+AOP(0);
Line 02 causes BOP to be added to the total. Lines 04-06 cause the properly aligned byte operands to be added. The SUMS_1 instruction is also covered in
ZOT<=BOP+resize(AOP(3),32)+resize(AOP(2),32)+resize(AOP(1),32)+resize(AOP(0),32);
ZOT(31 downto 0)<=AOP(0 to 31);
With this instruction, comment lines 02-17 show the regular pattern of PRG assignment. The MUX 320 select connections shown in
For shifts, the lower left MUX triangle LOL 620 (shown in
For rotates, both the UPR and LOL triangles are set during positive even (Line 23) or during positive odd (Line 29) or during negative even (Line 35) or during negative odd (Line 43) effective rotates.
Similar to
For use in bit field set and clear operations SET_1, SET_2, SET_4, CLR_1, CLR_2 and CLR_4, a vector mask generator is implemented as shown by exemplary VHDL code in
The mask unit 2200 circuit contains a 4-to-16 bit decoder for the M field 2210, a 4-to-16 bit decoder for the L field 2220, a subtractor SUB 2230 and XNOR 2240 gates. The subtract operand DCA is shifted left one bit when compared to the DCB operand. The XNOR 2240 gates are used to flip the SUB 2230 output according to the fill value F.
Mask 2200 may be implemented within the finite state machine of the execution unit. Mask 2200 may be implemented separate from the finite state machine. While
To accommodate vector operations, the mask unit is modified as shown in
The EU can perform floating-point operations. For example, exemplary VHDL code for a double precision floating-point multiply instruction FMUL_8 is coded as shown by the exemplary VHDL code in
Special cases such as AOP=“not a number” (NAN); BOP=NAN; 0.0*∞; AOP*0.0; BOP*0.0; AOP*∞; or BOP*∞ are coded as shown in Lines 007-023. Lines 028-036 form the AOP fraction AFRACT64 for normal and denormal numbers. Similarly, Lines 037-045 form the BOP fraction BFRACT64. The signed integer multiply MULS_8 is performed with AFRACT64 and BFRACT64 as shown in Lines 046-049. The multiplication result is captured and held in ZHD during the second cycle, as shown in Lines 053 and 054. The shift amount that the resulting fraction ZFRACT64 needs to be shifted to the right is calculated on Line 058. Special cases such as ZFRACT64=0; results=∞; or results<denormal number are coded in Lines 060-066. Lines 068-077 determine whether the result is either a normal or denormal number. Lines 078-099 perform a right shift of ZFRACT64(55 downto 3) and a right rotate of ZFRACT64(2 downto 0). The final FMUL_8 result is calculated as shown in
Through the use of logic synthesis, the timing, area and power consumption of the EU 300 can be optimized. The individual blocks FSM 310, MUX 320, WAL 330, and ADD 340 can be optimized separately and/or the entire circuit can be optimized. Flattening some or all of the hierarchy can further optimize the circuit. For example, in
While circuits and physical structures are generally presumed, it is well recognized that in modern semiconductor design and fabrication, physical structures and circuits may be embodied in computer readable descriptive form suitable for use in subsequent design, test or fabrication stages as well as in resultant fabricated semiconductor integrated circuits. Accordingly, claims directed to traditional circuits or structures may, consistent with particular language thereof, read upon computer readable encodings and representations of same, whether embodied in media or combined with suitable reader facilities to allow fabrication, test, or design refinement of the corresponding circuits and/or structures. The invention is contemplated to include circuits, related methods or operation, related methods for making such circuits, and computer-readable medium encodings of such circuits and methods, all as described herein, and as defined in the appended claims. As used herein, a computer-readable medium includes at least disk, tape, or other magnetic, optical, semiconductor (e.g., flash memory cards, ROM), or other electronic medium. An encoding of a circuit may include circuit schematic information, physical layout information, behavioral simulation information, and/or may include any other encoding from which the circuit may be represented or communicated.
An embodiment of the invention may also be included in a kit-of-parts. The kit-of-parts may include some, or all, of the components that an embodiment of the invention includes. The kit-of-parts may be an in-the-field retrofit kit-of-parts to improve existing systems that are capable of incorporating an embodiment of the invention. The kit-of-parts may include software, firmware and/or hardware for carrying out an embodiment of the invention. The kit-of-parts may also contain instructions for practicing an embodiment of the invention. Unless otherwise specified, the components, software, firmware, hardware and/or instructions of the kit-of-parts can be the same as those used in an embodiment of the invention.
Embodiments of the invention can be cost effective and advantageous for at least the following reasons. Embodiments of the invention improve quality and/or reduce costs compared to previous approaches. The foregoing need for complex EU operations with reduced circuit size and power consumption along with optimal timing is satisfied by this approach to EU design. Using synthesis, simulation and power estimation tools, the present invention demonstrates measurably significant advances in all metrics as shown in Table 6 below (for a 64 bit EU). Because the power requirement is only one-fifth that of a conventional EU, many applications become viable including next-generation mobile handsets known as software-defined radio (SDR) for military, homeland security agencies, emergency responders and commercial users.
The term program and/or the phrase computer program are intended to mean a sequence of instructions designed for execution on a computer system (e.g., a program and/or computer program, may include a subroutine, a function, a procedure, an object method, an object implementation, an executable application, an applet, a servlet, a source code, an object code, a shared library/dynamic load library and/or other sequence of instructions designed for execution on a computer or computer system).
The term substantially is intended to mean largely but not necessarily wholly that which is specified. The term approximately is intended to mean at least dose to a given value (e.g., within 10% of). The term generally is intended to mean at least approaching a given state. The term coupled is intended to mean connected, although not necessarily directly, and not necessarily mechanically. The term proximate, as used herein, is intended to mean close, near adjacent and/or coincident; and includes spatial situations where specified functions and/or results (if any) can be carried out and/or achieved. The term deploying is intended to mean designing, building, shipping, installing and/or operating.
The terms first or one, and the phrases at least a first or at least one, are intended to mean the singular or the plural unless it is clear from the intrinsic text of this document that it is meant otherwise. The terms second or another, and the phrases at least a second or at least another, are intended to mean the singular or the plural unless it is clear from the intrinsic text of this document that it is meant otherwise. Unless expressly stated to the contrary in the intrinsic text of this document, the term or is intended to mean an inclusive or and not an exclusive or. Specifically, a condition A or B is satisfied by any one of the following: A is true (or present) and B is false (or not present), A is false (or not present) and B is true (or present), or both A and B are true (or present). The terms a or an are employed for grammatical style and merely for convenience.
The term plurality is intended to mean two or more than two. The term any is intended to mean all applicable members of a set or at least a subset of all applicable members of the set. The phrase any integer derivable therein is intended to mean an integer between the corresponding numbers recited in the specification. The phrase any range derivable therein is intended to mean any range within such corresponding numbers. The term means, when followed by the term “for” is intended to mean hardware, firmware and/or software for achieving a result. The term step, when followed by the term “for” is intended to mean a (sub)method, (sub)process and/or (sub)routine for achieving the recited result.
The terms “comprises,” “comprising,” “includes,” “including,” “has,” “having” or any other variation thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms “consisting” (consists, consisted) and/or “composing” (composes, composed) are intended to mean closed language that does not leave the recited method, apparatus or composition to the inclusion of procedures, structure(s) and/or ingredient(s) other than those recited except for ancillaries, adjuncts and/or impurities ordinarily associated therewith. The recital of the term “essentially” along with the term “consisting” (consists, consisted) and/or “composing” (composes, composed), is intended to mean modified close language that leaves the recited method, apparatus and/or composition open only for the inclusion of unspecified procedure(s), structure(s) and/or ingredient(s) which do not materially affect the basic novel characteristics of the recited method, apparatus and/or composition.
Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. In case of conflict, the present specification, including definitions, will control.
The described embodiments and examples are illustrative only and not intended to be limiting. Although embodiments of the invention can be implemented separately, embodiments of the invention may be integrated into the system(s) with which they are associated. All the embodiments of the invention disclosed herein can be made and used without undue experimentation in light of the disclosure. Although the best mode of the invention contemplated by the inventor(s) is disclosed, embodiments of the invention are not limited thereto. Embodiments of the invention are not limited by theoretical statements (if any) recited herein. The individual steps of embodiments of the invention need not be performed in the disclosed manner, or combined in the disclosed sequences, but may be performed in any and all manner and/or combined in any and all sequences. The individual components of embodiments of the invention need not be formed in the disclosed shapes, or combined in the disclosed configurations, but could be provided in any and all shapes, and/or combined in any and all configurations. The individual components need not be fabricated from the disclosed materials, but could be fabricated from any and all suitable materials. Homologous replacements may be substituted for the substances described herein. Agents that are both chemically and physiologically related may be substituted for the agents described herein where the same or similar results would be achieved.
It can be appreciated by those of ordinary skill in the art to which embodiments of the invention pertain that various substitutions, modifications, additions and/or rearrangements of the features of embodiments of the invention may be made without deviating from the spirit and/or scope of the underlying inventive concept. All the disclosed elements and features of each disclosed embodiment can be combined with, or substituted for, the disclosed elements and features of every other disclosed embodiment except where such elements or features are mutually exclusive. The spirit and/or scope of the underlying inventive concept as defined by the appended claims and their equivalents cover all such substitutions, modifications, additions and/or rearrangements.
The appended claims are not to be interpreted as including means-plus-function limitations, unless such a limitation is explicitly recited in a given claim using the phrase(s) “means for” and/or “step for.” Subgeneric embodiments of the invention are delineated by the appended independent claims and their equivalents. Specific embodiments of the invention are differentiated by the appended dependent claims and their equivalents.
This application claims the benefit of U.S. Provisional Application Ser. No. 60/928,006 entitled “UNIVERSAL EXECUTION UNIT,” filed on May 7, 2007, which is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
60928006 | May 2007 | US |