Bit-Slice Design: Controllers and ALUs

by Donnamaie E. White

Copyright © 1996, 2001, 2002 Donnamaie E. White

 
 

Preface

Table of Contents

1. Introduction

2. Simple Controllers

3. Adding Programming Support to the Controller

4. Refining the CCU

5. Evolution of the ALU

6. The ALU and Basic Arithmetic

7. Tying the System Together

Glossary

 

 

The ALU and Basic Arithmetic

Last Edit November 1, 1996; May 1, 1999 ; July 18, 2001


Multiplication with the Am2901

To implement the above algorithm using the Am2901, the bits of the multiplier need to be examined one at a time. To perform the addition, shifting down is necessary to maintain alignment. To conditionally ass the multiplicand or 0, control of the source-operand pair (A, B) or (A, 0) is required and a method of conditional subtraction is needed.

The functional diagram of the multiply operation is given in Figure 6-6. The actual schematic of a 16-bit Am2901 ALU is shown in Figure 6-7.

Figure 6-6 Am2901A Multiply functional diagram

Figure 6-7 Specific interconnections for 16-bit multiply - ripple carry

The additional hardware provides the following connections:

  1. When Q is loaded and after each instance when it is shifted, Q0, is inverted and connected to a MUX which is controlled from the CCU. Under multiply, the MUX selects Q0; under normal operation, the MUX selects 1i. Q0 operates to control the source operands so that:

  2. Q0
    Ii
    Source Pair
    0
    1
    B + 0
    1
    0
    B + A

  3. When RB is shifted down (RB is any scratchpad register), RB0 is shifted into Q3 of the most significant slice.
  4. When RB is shifted down SIGN OVR is shifted into RB3 of the most significant slice. This is equivalent to:

    RB3 = F3 EXOR Cn+4 EXOR Cn+3

The Algorithm

The 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 walkthrough 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 Eaxmple: 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 Multiply

Unsigned Multiply

The 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 (leasat significant bit) of the RAM register (S0) to the MSB (most significant bit) of the Q register (Q3) of the most significant slaice.

The actual microcode is two microwords

  1. load the Am2910 counter with the number of bits minus 1 (for 16 x 16, load with 15) and place the multiplier into Q
  2. use RCPT for the Am2910 to repeat the actual multiply operation

Two's Complement Multiply

The 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 repeast 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 dew@Donnamaie.com

Copyright © September 1996, 1999, 2001, 2002 Donnamaie E. White White Enterprises

CST Webinar Series
Verific: SystemVerilog & VHDL Parsers
TrueCircuits: IoTPLL



Internet Business Systems © 2016 Internet Business Systems, Inc.
595 Millich Dr., Suite 216, Campbell, CA 95008
+1 (408)-337-6870 — Contact Us, or visit our other sites:
AECCafe - Architectural Design and Engineering TechJobsCafe - Technical Jobs and Resumes GISCafe - Geographical Information Services  MCADCafe - Mechanical Design and Engineering ShareCG - Share Computer Graphic (CG) Animation, 3D Art and 3D Models
  Privacy Policy