Bit-Slice Design: Controllers and ALUsby Donnamaie E. WhiteCopyright © 1996, 2001, 2002, 2008 Donnamaie E. White |
|||||||||||
3. Adding Programming Support to the Controller
6. The ALU and Basic Arithmetic
|
RB3 = F3 EXOR Cn+4 EXOR Cn+3 The AlgorithmThe microcode algorithm is as follows:
The result is across registers RB and Q, and the result is sign-extended to produce the proper number of bits so that multiplication with any two 8-bit two's complement numbers always produces a 16-bit result. A sample 8 x 8 bit multiply is shown in Figures 6-8 and 6-9. Figure 6-9 shows the step-by-step walk through of the problem. Sample microcode is given in the Am2900 Family Data Book and the 2900 Family Study Guide. [Rare books at this point.] Figure 6-8 Example: 8 x 8 bit multiply two's complement (B = -b, A = -a)
Figure 6-9 Walking through the Am2901A algorithm. The Am2901A algorithm takes advantage of added hardware to eliminate conditional jumps and therefore improve speed and reduce microcode
Am2903 MultiplyUnsigned MultiplyThe Am2903 has unsigned multiplication implemented as one of its special functions. To perform multiplication, zero out the RAM register which, with Q, will contain the final result. If it is not already present, load the multiplicand into another RAM register. Load the multiplier into the Q register. The shift connection should tie the LSB (least significant bit) of the RAM register (S0) to the MSB (most significant bit) of the Q register (Q3) of the most significant slice. The actual microcode is two microwords
Two's Complement MultiplyThe Am2903 has two other special functions which enable multiplication of a signed number. Two's complement multiply requires three microwords for any width multiplication. The same initialization is required, with the multiplier being replaced into the Q register. The counter is this case is loaded with the number of bits minus 2 (for 16x16, load with 14). The repeat loop instruction is the same as before. The added step is effectively the sign bit "correction" which was the last step in the Am2901 algorithm. The required interconnect of the slices is the same as before, with the addition of the Z status line tied to Cin.
| ||||||||||
For information about this file or to report problems in its use email
[email protected]
Copyright © September 1996, 1999, 2001, 2008 Donnamaie E. White WhitePubs Enterprises, Inc. |