GB1575158A - Parallel bidirectional shifter - Google Patents

Parallel bidirectional shifter Download PDF

Info

Publication number
GB1575158A
GB1575158A GB15005/78A GB1500578A GB1575158A GB 1575158 A GB1575158 A GB 1575158A GB 15005/78 A GB15005/78 A GB 15005/78A GB 1500578 A GB1500578 A GB 1500578A GB 1575158 A GB1575158 A GB 1575158A
Authority
GB
United Kingdom
Prior art keywords
word
shifting
data
positions
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
GB15005/78A
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nortel Networks Ltd
Original Assignee
Northern Telecom Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northern Telecom Ltd filed Critical Northern Telecom Ltd
Publication of GB1575158A publication Critical patent/GB1575158A/en
Expired legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • G06F5/015Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising having at least two separately controlled shifting levels, e.g. using shifting matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Shift Register Type Memory (AREA)
  • Executing Machine-Instructions (AREA)
  • Communication Control (AREA)
  • Time-Division Multiplex Systems (AREA)
  • Use Of Switch Circuits For Exchanges And Methods Of Control Of Multiplex Exchanges (AREA)

Description

(54) PARALLEL BIDIRECTIONAL SHIFTER (71) We, NORTHERN TELECOM LIMI TED, a company organized under the laws of Canada, of 1600 Dorchester Boulevard, West, Montreal, Quebec, Canada H3H lRl, do hereby declare the invention, for which we pray that a patent may be granted to us, and the method by which it is to be performed, to be particularly described in and by the following statement: The invention relates to a data processor generally and more particularly to a circuit for the bidirectional shifting and data handling of a binary word.
It is well known in the data processor art to provide a means for shifting the relative positions of bits in a binary word. It is equally well known to provide circuit means to mask a first portion of a binary word to isolate the second portion thereof for further processing.
In the case of a byte-by-byte processor, it is well known to provide the shifting function by using a pair of memories, a shifting circuit and logic circuitry for rearranging the relative positions of the bits as they are transferred from one memory to the other. Such a circuit is described in United States patent number 3,996,566.
In the case of processors which operate on the full binary word, it is also well known to achieve the shifting function by means of a shifting network which shifts the data at a plurality of levels. For example, such a circuit is described in United States patent number 3,596,251. This patent describes a logical shifting device having a plurality of levels, each of which includes a left shift logical unit, a no-shift logical unit and a right shift logical unit.
These units are logically interconnected to permit an input binary word comprising N-bits to be shifted left Qr right by up to N-l positions. During shifting, a binary word to be shifted is allowed to propagate through one of the logical units at each level and the time taken for a shifting operation is constant for all magnitudes of shift. That device has been found to be completely adequate for its intended purpose of shifting the relative position of bits in a binary word but it is not well adapted to perform other logical functions.
It is an object of this invention to provide a parallel bidirectional shifter and data handler which exhibits advantages over the prior art circuits. It is a feature of the invention that the circuit may be used to efficiently isolate a field of data within an input binary word whereby the field is right justified; that is, the output binary word contains only the isolated bits located at the least significant positions of the word. It is also a feature of the circuit of the invention that it may be realized using a minimum of components and of the type which are available commercially on an off-theshelf basis. It is a further feature of the invention that any function of the circuit may be completed in minimum real time and in which the time taken to complete any operation is constant.
In accordance with the invention, there is provided a parallel bidirectional shifter circuit for shifting a binary data word having N-bits any number up to N-l positions left or right, comprising, a shifting network for shifting a binary data word any number up to N-l positions in one predetermined direction, the shifting network having N output leads; and a data register having N storage locations and N input leads, the output leads of the shifting network being cross-connected to the input leads of the data register such that a binary word loaded in the data register from the shifting network is the mirror image of the binary word appearing at the output of the shifting network, the output of the data register being connected back to the input of the shifting network.
It will become apparent that because the circuit performs the shifting function using two microinstructions, the second one being performed on the mirror image data resulting from the first instruction, the data field isolation (masking) function may be efficiently performed using the same circuit and in minimum real time.
The invention further provides a method of shifting an input binary data word having N-bits any desired number up to N-l positions left or right using a shifting network adapted to shift a binary word any number up to N-l positions in only one predetermined direction, comprising the steps of: passing the input binary-word through the shifting network a first time to impart to it a first positional shift in the one direction, interchanging the relative positions of the bits in the binary word resulting from the first pass to form the mirror-image thereof, passing the mirrorimage word through the switching network to impart to it a second positional shift in said one direction, and interchanging the relative positions of the bits in the binary word resulting from the second pass through the shifting network to form the mirror image thereof, whereby the second formed mirror-image word is the original binary word shifted left or right by the desired number of positions.
The invention will become clearer upon consideration of the following example embodiment of the invention in conjunction with the drawings in which: Figure 1 is a block diagram of a parallel bidirectional shifting circuit in accordance with the invention; Figure 2 is a schematic block diagram of the circuit shown in figure 1; Figure 3 is a schematic diagram of one of the gates illustrated in figure 2 together with the associated truth table; Figure 4 is a timing diagram depicting the operation of the circuit of figure 2; and Figures 5-7 illustrate binary words appearing at different points in the circuit of figure 2 for different functions.
The following example embodiment of the invention is a circuit adapted to operate on a binary word having sixteen bits (0-15). It should be realized that a bidirectional shifting and data handling circuit using the invention may be constructed to operate on binary words of any length.
Figure 1 shows a shifting network 20 having four levels identilfied as SH-1 or SH-0, SH-2 or SH-0, SH-4 or SH-0 and SH-8 or SH-0. These are logically interconnected as described below and each level is adapted to shift an input data word a predetermined number of positions or zero position. A shift control circuit 21 is responsive to clock signals and to a fourbit data field from a microprocessor data register (not shown) for providing the enabling signals (20, 21, 22, 23) for the cor- responding levels of the shifting network 20. An accumulator register 22 has a selective gating input for accepting data from an input data bus or from the shifting network 20. The accumulator register 22 is controlled by a select control signal from the microprocessor and clock signals. The parallel output leads 0-15 of the shifting network 20 are cross-connected to the sixteen inputs 15-0 of the register 22 such that the register 22 stores the mirror image of the binary word appearing at the output of the shifting network 20. The outputs from the register 22 are connected to a bus 23 which serves as the output data bus for the device and as a circulating bus for feeding the output data from the register 22 back to the input of the shifting network 20.
Figure 2 is a schematic diagram of the circuit of figure 1. The shift control circuit 21 is not shown in any greater detail than it is in figure 1 since it may simply be a register controlled by the clock signals for providing the four enable signals Si, S2, S4 and S8 corresponding to the four levels of shifting gates in the network 20.
Each shifting level in the network 20 comprises sixteen gates Aha15, BO-B15, C0-C15 and D0-D15. Each of these gates has a pair of inputs either of which may be selected by a control signal (S1, S2, S4, S8). Figure 3 illustrates one such gate together with a truth table showing the operation of the gate. When the select or enable lead is idle, the gate G allows the data on input lead A to appear on the output lead C and when the select lead is enabled, the gate G allows the data on input B to appear on the output lead C.
This type of gate is available commercially as an off-the-shelf component and is commonly known as a dual-input data select gate.
The gates at each level of the shifting network are logically connected to the gates at the previous level for shifting the binary word a predetermined number of positions to the left. For example, each of the gates A0-A15 at the first level is connected to two leads of the bus 23. If the lead S1 is not enabled the gates A0-A15 have no effect on the data word appearing on the bus 23 other than allowing it to appear at their output; however, if the lead S1 is enabled, the gates A0-A15 effectively shift the data appearing on the bus 23 one position to the left. Similarly, the gates BW B15 at the second level are adapted to not shift (lead S2 not enabled) or to shift (lead S2 enabled) the data appearing at the output of the first level gates A() A15, 2 positions to the left. The gates at the third and fourth levels are similarly adapted to not shift or to shift left 4 and 8 positions respectively. Therefore, by allowing a binary word having N-bits to propagate through the four levels of the shifting network 20 and by selectively enabling the levels thereof, the binary word appearing at the output of the shifting network may reflect a shift-left of any number of positions up to N-i.
The accumulator register 22 comprises sixteen fiip-flops (RO-R15) each having two-input selective gates of the type previously described. These elements are also available commercially as off-the-shelf components. A first set of inputs-to the elements RO-R15 are respectively connected to the leads of an input data bus. A binary data word appearing on that bus may be loaded in register 22 on a clock signal and by enabling the select lead. This signal is normally generated in the microprocessor (not shown) of the system. A second set of inputs (RO-R15) to the elements RO R15 of the register 22 are cross-connected to the outputs DeD15 of the network 20.
These cross-connections are represented by the intersecting arrows 24. Eflectively, output DO is connected to input R15, Dl to R14, D2 to R13, D3 to R12, D4 to R11 and and D15 to RO. Therefore, register 22 stores the mirror image of the binary data word which appears at the output of the network 20.
The outputs of elements RO-R15 in the register 22 are connected to a bus 23 which serves as the output data bus for the device and also serves to feed back to the input of the shifting network 20 the binary data word appearing at the output of register 22.
It should be understood that the input data bus is only connected to the input of the register 22 for convenience. It could just as well be connected directly to the input of the shifting network 20.
Operation A greater understanding of the above described circuit may be obtained from the following description of operation in conjunction with the timing diagram of figure 4 and the examples illustrated in figures 5 to 7.
The binary word to be shifted is applied to leads 0-15 of the input data bus. At the same time, the select lead is enabled (one level), and the shift quantity data field is sent to the shift control circuit 21. On the occurrence of the next clock pulse (t,, fig. 4) the appropriate levels of the shifting network 20 are enabled, the binary data word on the input data bus is-loaded into register 22 and appears at the input of the network 20 via bus 23 and propagates therethrough. At the next clock pulse (tX, fig. 4) this data is loaded into register 22 and the operation is repeated except that the select control lead is not enabled (zero level).
Figures 5 to 7 illustrate the operation on a binary word to achieve various functions.
Figure 5 illustrates the operation on a binary word to achieve a shift-left of seven positions. On the first pass through the device, the binary word is shifted left seven positions (levels 1, 2 and 3 are enabled) however, the resultant word is mirrorimaged in the register 22 because of the cross-connections 24. On the second pass the -shifting network is not enabled at any level and because of the cross-connections 24, the register 22 contains the desired binary data word which is available on the output data bus.
Figure 6 illustrates the operation on a binary word to achieve a shift-right of nine positions. On the first pass through the network none of the levels are enabled, but because of the cross-connections 24, the binary word in the register 22 is the mirror image of the input data bus binary word.
On the second pass through the network 20, the binary data word now in register 22 is shifted left nine' positions (levels 1 and 4 are enabled) and loaded again into the register 22 via the cross-connections.
24. The binary data word now in the register 22 reflects a shift of nine positions to the right relative the original binary data word and is now available on the output data bus.
Figure 7 illustrates the operation on a binary data word to achieve the isolation of a data field within the word. It is desired to isolate the data field comprising bits 3 to 6 of the binary word and to locate it at the least significant positions of the word. On the first pass through the network, the word is shifted left nine positions (levels 1 and 4 enabled) and because of the cross-connections 24, the resultant data word in register 22 contains the mirrorimage of the data field located at the least significant positions, with the bits 0, 1 and 2, adjacent thereto. These are removed from the word by passing it again through the shifting network with a left shift of twelve positions (levels 3 and 4 enabled).
The resultant binary word in register 22 contains the required data field located at the least significant positions of the word with the remainder of the bits in the word being zeros.
Generally, the operation of the circuit may be summarized as follows. For a left shift of Y bit positions of a binary word having N bits-the binary word is shifted Y positions left on the first pass through the circuit and is shifted zero positions on the second pass. For a shift right of X bit positionsthe binary word is shifted zero positions on the first pass through the circuit and is shifted X positions left on the second pass. If it is desired to isolate and right justify a data field W bits wide which is D bit positions from the most significant edge of the word-the binary word is shifted D positions on the first pass through the circuit and is shifted N-W positions on the second pass.
As is depicted in the above examples, each shifting function left or right, and each data field isolation or masking function requires two passes through the de vice. These correspond to two microinstructions of a microprocessor which with current technology can readily operate on about a fifty nanoseconds per instruction basis. Therefore, the invention provides a bidirectional parallel shifter and data handling circuit which performs all of its intended functions in constant time and in minimum real time. It has the added advantages that it is simple, economical, and may be realized using commercially available off-the-shelf components. These advantages are accrued partly because only the hardware necessary for shifting in one direction is required.
The embodiment of the invention described above uses a shifting network for shifting a binary data word to the left. It should be realized that the invention applies just as well to a shifting device using a shift right network. It is only a matter of inverting and interchanging the shifting functions of the first and second passes through the device. For example, let us consider the case of figure 5 where it is desired to obtain a shift of seven positions left using a right-shifting network. On the first pass through the network, none of the levels are enabled (no-shift) and the word in register 22 is the mirror image of the original word. On the second pass, the word in register 22 is shifted right seven positions and mirror-imaged due to the cross-connections 24. The resultant word in register 22 reflects a shift left of seven positions relative the original word.
Of course, it should be realized that if a right-shifting network is used, the masking function results in the bits of the isolated field being left-justified; that is, the field occupies the most significant positions of the word in the accumulator register.
WHAT WE CLAIM IS: 1. A parallel bidirectional shifter circuit for shifting a binary data word having N-bits any number up to N-l positions left or right, comprising, a shifting network for shifting a binary data word any number up to N-l positions in one predetermined direction, the shifting network having N output leads; and a data register having N storage locations and N input leads, the output leads of the shifting network being crossconnected to the input leads of the data register such that a binary word loaded in the data register from the shifting network is the mirror image of the binary word appearing at the output of the shifting network, the output of the data register being connected back to the input of the shifting network.
2. A parallel bidirectional shifter circuit for shifting a binary data word having N-bits any number up to N-l positions left or right comprising, a shifting network having a plurality of shifting levels each comprising a plurality of gates; the gates at each level of the network being logically connected to the gates at the previous level for selectively shifting a binary data word at the output of the gates at the previous level a predetermined number of positions in one predetermined direction, the gates at each level being also logically connected to the corresponding gates at the previous level for selectively transmitting a binary data word at the output of the gates at the previous level without positional shift; means for receiving signals for controlling the operation of the gates at each level; and a data register having its input crossconnected to the output of the shifting network such that a binary word loaded in the data register from the shifting network is the mirror image of the binary data word appearing at the output of the shifting network, the output of the data register being connected back to the input of the shifting network.
3. A shifter circuit as defined in claim 2 wherein each of the gates at each level of the shifting network is a dual-input data select gate.
4. A shifter circuit as defined in claim 3 and further comprising, a plurality of input terminals for connection to input and output data buses respectively and wherein each storage element of the data register includes a dual-input data select gate having a first input connected to one of said input terminals, a second input cross-connected to the shifting network, and an output connected to the input of the storage element, the output of each storage element being also connected to a respective one of the output terminals, and means for receiving signals for controlling the operation of the data select gates.
5. A shifter circuit as defined in claim 4 and further comprising means for receiving signals for controlling the loading of an input data word into the data register and for circulating the word twice through the shifting network and data register.
6. A method of shifting an input binary data word having N-bits any desired number up to N-l positions left or right using a shifting network adapted to shift a binary word any number up to N-1 positions in
**WARNING** end of DESC field may overlap start of CLMS **.

Claims (8)

**WARNING** start of CLMS field may overlap end of DESC **. right justify a data field W bits wide which is D bit positions from the most significant edge of the word-the binary word is shifted D positions on the first pass through the circuit and is shifted N-W positions on the second pass. As is depicted in the above examples, each shifting function left or right, and each data field isolation or masking function requires two passes through the de vice. These correspond to two microinstructions of a microprocessor which with current technology can readily operate on about a fifty nanoseconds per instruction basis. Therefore, the invention provides a bidirectional parallel shifter and data handling circuit which performs all of its intended functions in constant time and in minimum real time. It has the added advantages that it is simple, economical, and may be realized using commercially available off-the-shelf components. These advantages are accrued partly because only the hardware necessary for shifting in one direction is required. The embodiment of the invention described above uses a shifting network for shifting a binary data word to the left. It should be realized that the invention applies just as well to a shifting device using a shift right network. It is only a matter of inverting and interchanging the shifting functions of the first and second passes through the device. For example, let us consider the case of figure 5 where it is desired to obtain a shift of seven positions left using a right-shifting network. On the first pass through the network, none of the levels are enabled (no-shift) and the word in register 22 is the mirror image of the original word. On the second pass, the word in register 22 is shifted right seven positions and mirror-imaged due to the cross-connections 24. The resultant word in register 22 reflects a shift left of seven positions relative the original word. Of course, it should be realized that if a right-shifting network is used, the masking function results in the bits of the isolated field being left-justified; that is, the field occupies the most significant positions of the word in the accumulator register. WHAT WE CLAIM IS:
1. A parallel bidirectional shifter circuit for shifting a binary data word having N-bits any number up to N-l positions left or right, comprising, a shifting network for shifting a binary data word any number up to N-l positions in one predetermined direction, the shifting network having N output leads; and a data register having N storage locations and N input leads, the output leads of the shifting network being crossconnected to the input leads of the data register such that a binary word loaded in the data register from the shifting network is the mirror image of the binary word appearing at the output of the shifting network, the output of the data register being connected back to the input of the shifting network.
2. A parallel bidirectional shifter circuit for shifting a binary data word having N-bits any number up to N-l positions left or right comprising, a shifting network having a plurality of shifting levels each comprising a plurality of gates; the gates at each level of the network being logically connected to the gates at the previous level for selectively shifting a binary data word at the output of the gates at the previous level a predetermined number of positions in one predetermined direction, the gates at each level being also logically connected to the corresponding gates at the previous level for selectively transmitting a binary data word at the output of the gates at the previous level without positional shift; means for receiving signals for controlling the operation of the gates at each level; and a data register having its input crossconnected to the output of the shifting network such that a binary word loaded in the data register from the shifting network is the mirror image of the binary data word appearing at the output of the shifting network, the output of the data register being connected back to the input of the shifting network.
3. A shifter circuit as defined in claim 2 wherein each of the gates at each level of the shifting network is a dual-input data select gate.
4. A shifter circuit as defined in claim 3 and further comprising, a plurality of input terminals for connection to input and output data buses respectively and wherein each storage element of the data register includes a dual-input data select gate having a first input connected to one of said input terminals, a second input cross-connected to the shifting network, and an output connected to the input of the storage element, the output of each storage element being also connected to a respective one of the output terminals, and means for receiving signals for controlling the operation of the data select gates.
5. A shifter circuit as defined in claim 4 and further comprising means for receiving signals for controlling the loading of an input data word into the data register and for circulating the word twice through the shifting network and data register.
6. A method of shifting an input binary data word having N-bits any desired number up to N-l positions left or right using a shifting network adapted to shift a binary word any number up to N-1 positions in
only one predetermined direction, comprising the steps of: passing the input binary word through the shifting network a first time to impart to it a first positional shift in the one direction, interchanging the relative positions of the bits in the binary word resulting from the first pass to form the mirror-image thereof, passing the mirror-image word through the switching network to impart to it a second positional shift in said one direction, and interchanging the relative positions of the bits in the binary word resulting from the second pass through the shifting network to form the mirror image thereof, whereby the second formed mirror-image word is the original binary word shifted left or right by the desired number of positions.
7. A parallel bidirectional shifter circuit substantially as described herein with reference to Figures 1 to 4 of the accompanying drawings.
8. A method of shifting a binary data word left or right substantially as described herein with reference to Figures 1 to 7 of the accompanying drawings.
GB15005/78A 1977-06-16 1978-04-17 Parallel bidirectional shifter Expired GB1575158A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CA280,669A CA1076708A (en) 1977-06-16 1977-06-16 Parallel bidirectional shifter

Publications (1)

Publication Number Publication Date
GB1575158A true GB1575158A (en) 1980-09-17

Family

ID=4108895

Family Applications (1)

Application Number Title Priority Date Filing Date
GB15005/78A Expired GB1575158A (en) 1977-06-16 1978-04-17 Parallel bidirectional shifter

Country Status (5)

Country Link
JP (1) JPS6036612B2 (en)
CA (1) CA1076708A (en)
FR (1) FR2394869A1 (en)
GB (1) GB1575158A (en)
SE (1) SE438044B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56109156U (en) * 1980-01-18 1981-08-24
JPS58144947A (en) * 1982-02-23 1983-08-29 Toshiba Corp Data shifting system
JPS59161731A (en) * 1983-03-07 1984-09-12 Hitachi Ltd Barrel shifter
JPS60179839A (en) * 1984-02-28 1985-09-13 Fujitsu Ltd Data shift circuit for processing digital signal
JPH02145364A (en) * 1988-11-28 1990-06-04 Olympus Optical Co Ltd Recoding head
US5988974A (en) * 1997-03-21 1999-11-23 Zackovich; Stanley E. Vehicle lifting and towing apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3781819A (en) * 1971-10-08 1973-12-25 Ibm Shift unit for variable data widths
US3768077A (en) * 1972-04-24 1973-10-23 Ibm Data processor with reflect capability for shift operations

Also Published As

Publication number Publication date
SE438044B (en) 1985-03-25
FR2394869B1 (en) 1984-10-26
FR2394869A1 (en) 1979-01-12
JPS6036612B2 (en) 1985-08-21
SE7806741L (en) 1978-12-17
JPS546740A (en) 1979-01-19
CA1076708A (en) 1980-04-29

Similar Documents

Publication Publication Date Title
US4122534A (en) Parallel bidirectional shifter
US4591979A (en) Data-flow-type digital processing apparatus
CA1325281C (en) Multiple function data processor
EP0045634B1 (en) Programmable digital data processing apparatus arranged for the execution of instructions in overlap
US3702988A (en) Digital processor
US4627018A (en) Priority requestor accelerator
US3753234A (en) Multicomputer system with simultaneous data interchange between computers
DE3851858T2 (en) Digital signal processor.
EP0100511B1 (en) Processor for fast multiplication
US4674032A (en) High-performance pipelined stack with over-write protection
US4649512A (en) Interface circuit having a shift register inserted between a data transmission unit and a data reception unit
US4782457A (en) Barrel shifter using bit reversers and having automatic normalization
US4542455A (en) Signal-processing multiprocessor system
EP0112982B1 (en) Method and apparatus for determining minimum/maximum of multiple data words
US4447870A (en) Apparatus for setting the basic clock timing in a data processing system
EP0128194A4 (en) Programmed logic array.
US4811267A (en) Digital signal processor with addressable and shifting memory
CA1076708A (en) Parallel bidirectional shifter
US3997771A (en) Apparatus and method for performing an arithmetic operation and multibit shift
US4090237A (en) Processor circuit
US4387294A (en) Shift register-latch circuit driven by clocks with half cycle phase deviation and usable with a serial alu
US5465222A (en) Barrel shifter or multiply/divide IC structure
US4009468A (en) Logic network for programmable data concentrator
GB1597694A (en) Clock-signal generator for a data-processing system
US3380033A (en) Computer apparatus

Legal Events

Date Code Title Description
PS Patent sealed [section 19, patents act 1949]
PE20 Patent expired after termination of 20 years

Effective date: 19980416