Barrel shifter

Abstract: There is disclosed a barrel shifter for providing efficient wiring therein and a compact composition as compared with conventional ones, in which a low-level-input resistor (10) and a high-level-input resistor (11) are arranged in parallel to each other, and low-level-input-bit lines (LB) and high-level-input-bit lines (HB) are alternately arranged corresponding to both resistors respectively, the width of both the input and output sides of a barrel-shifter main unit (12) are so arranged as to be substantially the same as the width of the respective resistors substantially defined by wiring width of the respective input-bit lines, and a wiring area from the high-level-input resistor (11) is incorporated in the barrel-shifter main unit (12) as well as a wiring area from the low-level-input resistor (10).

Description: The present invention relates to a barrel shifter, and particularly to a barrel shifter to be mounted on an LSI for a microprocessor for producing efficient wiring and having a compact composition as compared with conventional ones. Generally, a customary barrel shifter has a low-level-input register, a high-level-input register, a barrel-shifter main unit, and a bus driver. The low-level-input register has a predetermined number of low-level-input-bit lines and width substantially defined by wiring width of the lines, and the high-level-input register has high-level-input-bit lines of the same number as the low-level-input-bit lines and width substantially the same as the low-level-input register. Both the input registers are arranged at the input side of the main unit, and the bus driver is arranged at the output side thereof. Conventionally, the circuit width of the input side of the main unit for wiring from both the input registers is wider than the circuit width of the output side thereof for wiring to the bus driver, so that the main unit and the other compositional elements arranged at either side of the main unit are disordered in the respective circuit wiring area, and hence wiring for the entire circuit of a barrel shifter becomes complicated and a dead space results. In order to clarify the defects of conventional barrel shifters, the operational principle is now described. Fig. 1 is a schematic view for explaining operation of a barrel shifter. In the left-shift operative mode, data to be shifted are set in a low-level-input register 1, and all zeros are set as shift-in data in a high-level-input register. By such setting, for example, a resultant output shifted by 2 bits in the left direction can be obtained at a main unit 3 as shown. Similarly, the right-shift operation of the barrel shifter is shown in Fig. 2. In the right-shift operative mode, all zeros or coded numbers of MSB (the highest bit) are set as shift-in data in the low-level-input register 1, and data to be shifted are set in the high-level-input register 2. By such setting, for example, a resultant output shifted by 2 bits in the right direction can be obtained at the main unit 3. One conventional barrel shifter for effecting such shift operation is shown in Fig. 3. In the drawing, there are shown a low-level-input register 1, a high-level-input register 2 and a barrel-shifter main unit 3, and reference numeral 4 designates a bus driver. The low-level-input register 1 and the high-level-input register 2 are respectively provided with low-level-input-bit lines LB 0 -LB 31 , connected to a low-level bus and high-level-input-bit lines HB 0 -HB 31 , connected to a high-level-bus, and their circuit width are respectively and substantially defined by wiring width of the respective input-bit lines. In this case, the circuit width of the input side of the main unit 3 corresponds to the output from a total of 62 bits of both the low-level-input register 1 and the high-level-input register 2. On the other hand, the width of the output side of the main unit 3 only corresponds to an output of 32 bits having been shifted by a predetermined bit number. barrel shifter, as shown in Fig. 3, the input side of the main unit 3 is wider than the output side thereof, and hence a specific portion of the main unit 3, i.e., an area designated by oblique lines becomes a dead space. Moreover, when the shifted output from the main unit 3 is outputted into low-level-output lines LB' or high-level-output lines HB' through the bus driver 4, a wiring area designated by reference character "A" in the drawing where wires to be wired in the circuit must be bent is inevitably required in the input side of the bus driver 4. While, as shown in Fig. 4, when the barrel shifter is so composed that the low-level-input-bit lines LB 0 -lB 3] and the high-level input-bit lines HB 0 -HB 31 are alternately arranged at the low-level-input register 1 and the high level-input register 2 respectively, the width of the bus driver 4 can be reduced and the area where the wires must be bent can be avoided. However, in this case, as shown in Fig. 4, another area designated by reference character "A" in which wires to be wired must be similarly bent to the area A shown in Fig. 3 is inevitably required at the input side of the high-level-input register 2, thus efficient circuit wiring can not be performed even by the composition. Moreover, there also remains a dead space designated by oblique lines substantially similar to the one shown in Fig. 3. As stated above, in the conventional barrel shifter, since the width of the input side of the main unit is wider than that of the output side thereof, an area where the wires must be bent is inevitably required. EP-A-0 228 948 shows a barrel shifter in which each output line is connected to six input lines through a single transistor, rather than using a bank of selectors. A single control line can switch a number of transistors. A single matrix arrangement can be used but for large bus widths a large array results. Output bus drivers are known from proceedings IEEE ICCC 1980 p1184-1187. SUMMARY OF THE INVENTION It is therefore an object of the present invention to utilize the circuit area of a barrel shifter more effectively by improving the composition of the barrel shifter and alternately arranging the low-level-input-bit lines and the high-level-input lines at the respective input registers. According to the present invention there is provided a barrel shifter as set out in claim 1. By such composition, efficient circuit wiring in a barrel shifter can be achieved. These and other objects, features and advantages of the present invention will be more apparent from the following description of a preferred embodiment, taken in conjunction with the accompanying drawings, in which: Fig. 1 is a schematic view for explaining a general left-shift operation of a barrel shifter, Fig. 2 is a schematic view for explaining a general right-shift operation of a barrel shifter, Fig. 3 is a compositional view of a conventional barrel shifter, Fig. 4 is a compositional view of another conventional barrel shifter, Fig. 5 is a fundamental compositional view of a barrel shifter according to the present invention, Fig. 6 is a compositional view of an embodiment of a barrel shifter according to the present invention, and Fig. 7 is a compositional view of a circuit per bit in each selector for composing a main unit of a barrel shifter. DETAILED DESCRIPTION OF THE EMBODIMENT Fig. 5 shows a fundamental compositional view of a barrel shifter according to the present invention. In the drawing, there are shown a low-level-input register 10, a high-level-input register 11, a barrel-shifter main unit 12 having a shift control input lines, and a bus driver 33. In the barrel shifter according to the present invention, the low-level-input register 10 and the high- level-input register 11 are arranged in parallel to each other as shown in the drawing, and low-level-input-bit lines LB 0 - LB 31 and high-level-input-bit lines HB 0 - HB 31 are alternately connected to the input registers 10, 11 respectively. With respect to the barrel-shifter main unit 12, there is incorporated in an area designated by oblique lines R in the main unit 12 the wiring area designated by broken lines where wiring corresponding to the bit number of the high-level-input register 11 was conventionally provided. Fig. 6 shows a composition of an embodiment of a barrel, shifter according to the present invention. In the drawing, there are shown a low-level-input register 10 of 32 bits from LR 0 to LR 31 , a high-level-input register 11 of 32 bits from HR 0 to HR 31 , and a barrel-shifter main unit 12 is composed with a selector 20 for effecting 16-bit shift and connecting to an input line S16, a selector 21 for effecting 8-bit-shift and connecting to an input line S8, a selecting 22 for effecting 4-bit shift and connecting to an input line S1, a selector 23 for effecting 2-bit shift and connecting to an input line S2, and a selector 24 for effecting ]-bit shift and connecting to an input line S1. A bus driver 13 has 3-state bus drivers 25, and selects output from the selector 24 of the final step at any of the 3-state bus drivers, and outputs to the low-level output-bit lines LB' 0 - LB' 31 or the high-level-input-bit lines HB' 0 -HB' 31 or the high-level-input-bit lines HB' 0 - HB' 31 . In Fig. 6, the wires to be wired in the area designated by oblique lines R Shown in Fig. 5 are connected to shift-left input (designated by SL) and shift-right input (designated by SR) of respective selectors. Hereinafter, operation of the above-mentioned embodiment of a barrel shifter according to the present invention will be described. In the left-shift operative mode, data to be shifted are inputted in the low-level-input register 10, while all zeros are inputted as shift-in data in the high-level-input register 11. When is desired output to be shifted by 16 bits, an input signal is given to the input line S16 of the selector 20,so that the resultant data shifted by 16 bits through the selector 20 is outputted to the input side of the bus driver 25. Thereafter, when a selective line 1, of the bus driver 25 is set in a high level mode, output of the main unit 12 is outputted into the low-level-output-bit lines LB' 0 - LB' 31 , while when a selective line l 2 is set in a high level mode, the output of the main unit 12 is outputted into the high-level-output-bit lines HB' 0 - HB' 31 . On the other hand, in the right-shift operative mode, all zeros are inputted as shift-in data in the low-level-input register 10, while data to be shifted are inputted in the high-level-input register 11. Then, when any of the shift control input lines S1 - S16 corresponding to the bit number to be shifted is energized, desired right-shift can be effected. In this case, the operational principle of the shift is the same as that of the above-mentioned well-known barrel shifters. Fig. 7 shows a circuit composition per bit included in each selector 20, 21, 22, 23 or 24 respectively composing the main unit 12 shown in Fig. 6. The circuit is composed by two pairs of N-channel transistors and P-channel transistors, i.e., T 1 , T 2 and T 3 , T 4 as shown in the drawing. When a shift control line S 1 is given "1", an input signal 2 is selected, while given "2", an input signal "1" is selected. In summary, in the barrel shifter according to the present invention, the low-level-input register and the high-level-input register are arranged in parallel to each other, and the low-level-input-bit lines and high-level-input bit lines are arranged alternately corresponding to the respective input registers, and the width if both the input and output sides of the barrel-shifter main unit are so arranged as to be substantially the same as that of one of the low-level and high-level input registers and further the wiring area corresponding to the bit number of the high-level-input register is incorporated in the barrel-shifter main unit. Accordingly, there can be eliminated the wiring area which is inevitably required in conventional barrel shifters and in which wires to be wired must be bent for input from the input registers to the main unit or output from the main unit to the bus driver, so that wiring area for the barrel shifter can be reduced. Moreover, the width of both the input and output sides of the main unit is so arranged as to be substantially the same as the low-level-input register and the high-level-input register and further is incorporated in the main unit the wiring area which was inevitably and additionally provided at the main unit in conventional barrel shifters and caused the width of the input side of the main unit to be wider than the width of the output side thereof, so that there can be provided a barrel shifter with a compact composition. Moreover, in the barrel shifter according to the present invention, the wiring area which was inevitably and additionally provided at the main unit in conventional barrel shifters may be incorporated in the main unit in a wedge form. Additionally, in the barrel shifter according to the invention high-level-input register may be piled in parallel with each other. Various modifications will become possible for those skilled in the art after receiving the teachings of the present disclosure without departing from the scope of the claims.

Claims: A barrel shifter, comprising: (a) a barrel shifter main unit (12) having a predetermined number of low-level input-bit lines (LB0-LB31) and a predetermined number of high-level input-bit lines (HB0-HB31), for obtaining a shifted resultant from first and second data to be shifted, wiring areas in which wires for the first and second data to be shifted are wired being incorporated in the barrel shifter main unit (12); (b) the low-level input-bit lines (LB0-LB31) and the high-level input-bit lines (HB0-HB31) being arranged alternately; (c) a low-level-input register (10) having said predetermined number of low-level-input-bit lines (LB0-LB31) for setting said first data to be shifted; (d) a high-level-input register (11) having said predetermined number of high-level-input-bit lines (HB0-HB31) for setting said second data to be shifted; (e) the low-level-input register (10) and the high-level-input register (11) being arranged in parallel with and alongside of each other such that the associated low-level-input-bit lines (LB0-LB31) and high-level-input-bit lines (HB0-HB31) alternate at a predetermined spacing in a region between the main unit and the registers; and (f) a width of an input side of the barrel shifter main unit (12) being arranged to be substantially the same as the width of the low-level-input register (10) or the high-level-input register (11). A barrel shifter according to claim 1 wherein the barrel shifter main unit (12) includes a plurality of sequential stages (20, 21, 22, 23, 24), the respective stages being adapted so that a magnitude of the shift performed by one stage is greater than that of the shift performed by another stage immediately subsequent to the one stage. A barrel shifter, according to claim 1 or 2 wherein a bus driver (13) is provided for supplying the shifted resultant from the barrel shifter main unit (12) to a bus.

Inventors: TOKUMARU TAKEJI, TOKUMARU, TAKEJI
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1989
Main classification: G06F5
IPC codes: G06F7, G06F5