Browse Prior Art Database

Barrel Shifter Rotator

IP.com Disclosure Number: IPCOM000038609D
Original Publication Date: 1987-Feb-01
Included in the Prior Art Database: 2005-Jan-31
Document File: 4 page(s) / 74K

Publishing Venue

IBM

Related People

Butler, ND: AUTHOR [+2]

Abstract

The use of multiplexers for shifting data is known and extended here to provide a multi-function shifter rotator. Two designs are given with differing ways the functions are implemented and slightly different functions. The first uses a standard barrel data rotator followed by a mask generator and output multiplexer to output data. The second requires no masker, but the required functions are provided by inserting generated mask data as it is being shifted in each stage of the shifter. A microprocessor designed for high performance bit manipulation requires a powerful bit shifter/rotater capable of shifting or rotating its input by multiple bits in a single operation. Here, we describe two barrel shifter designs using multiplexers, commonly available for gate arrays, to perform the shifting.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 38% of the total text.

Page 1 of 4

Barrel Shifter Rotator

The use of multiplexers for shifting data is known and extended here to provide a multi-function shifter rotator. Two designs are given with differing ways the functions are implemented and slightly different functions. The first uses a standard barrel data rotator followed by a mask generator and output multiplexer to output data. The second requires no masker, but the required functions are provided by inserting generated mask data as it is being shifted in each stage of the shifter. A microprocessor designed for high performance bit manipulation requires a powerful bit shifter/rotater capable of shifting or rotating its input by multiple bits in a single operation. Here, we describe two barrel shifter designs using multiplexers, commonly available for gate arrays, to perform the shifting. For a 16-bit shifter, four levels of multiplexer are used, each one being fed by the output of the previous stage. Design 1 The designed shift and rotate functions are shown in Fig. 1. The registers shown are 16 bits long with an extension position to hold the

(Image Omitted)

carry. Most of the operations involve all 17 bits but rotate left(ROL) and rotate right (ROR) use only 16 bits, i.e., the carry is unchanged. The amount of shift is maintained in a 4-bit shift counter register, and the direction of shift is obtained by decoding the instruction. The convention used to number the data bits in the shift and count register is that the most significant bit is bit 0 (also C or carry bit), bit 1 is the sign, and the least significant bit of count and data is 3 and 16, respectively.

(Image Omitted)

This description divides the implementation into four areas. Shift Counter, Shifter, Mask Generator, and Output Multiplexer. In order to save hardware, the Shifter is designed to rotate the data in one direction only (Right). If the command is a shift or rotate right, the amount of shift is contained in the shift counter. However, if the shift or rotate is left, the contents of the shift counter are twos complemented. A left rotate of n bits is the same as a right rotate of 16-n. It will be seen later that the shift right and left is done by the rotate function and masking off the appropriate end bits. The Shift Counter therefore has to have the facility of twos complementing its contents for shift or rotate left. The count is the same for RORX and ROLX (17 bit operations). The Shift Counter controls a standard barrel rotator capable of rotating data to provide the shifter.

(Image Omitted)

1

Page 2 of 4

The mask generator is required to mask out the rotated data generated so that it appears as if it were shifted left or right. It is also used for generating the leading sign bits for arithmetic right shift. This mask is ANDed with the data. The mask operates over bits 1 through 16, and its decode signifies the amount of shift (Fig. 2). Consider a right shift of n bits, the mask must be zero up to the value of the count and one for...