Those unfamiliar with the internal structure of the Tamarin processor need know something about the bus structure assumed by the multiplier. Three system busses are present: d1, d2, and r. They represent the pair of operands fetched from the memory (d1 and d2) and the result bus (r). The d1 operand is encoded and should be the smaller magnitude if this is known apriori and if the state machine can take advantage of this.
In addition to the d1 and d2 operands, there are busses for fltd1 and fltd2 which are the floating point representations of d1 and d2. These should be wired up to shift the mantissa to the correct position and to insert the hidden bit. Two control lines, EUControl and state complete the top level interface (nEUControl is just the complement of EUControl). Seven bits make up the EUControl signal to specify the particular unit and operation being performed. A summary of the relevant bits are shown below for reference (a complete listing of the bit encodings can be found on [Phylum]<CTamarin>Documentation>EUControlSpec.tioga).
EUControl[0:2] =>
110 Load Multiplier
111 Unload Multiplier (EUControl[3:6] are all don't cares).
EUControl[3:6] =>
x00x Load signed 32 bit number
x01x Load unsigned 32 bit number
x1?x Load Floating Point number
? should be set to 0 or 1 depending on whether or not mantissa is padded by a 0.
Use 0 if it is not padded and 1 if it is padded.
A state signal is also present. State must come from an external state machine to control the internal sequencing of the multiplier. Encodings for the state machine are shown below:
state[0:1] =>
00 done
01 doingLower
10 doingUpper
11 not allowed (no valid results for this combination)
An example of a proper state transition sequence would be to perform the load while in state "done". The next 8 states should be either "doingLower" or "doingUpper" and a "done" should then come true and remain true until another load takes place. Eight "doingLower" or "doingUppers" is the maximum number of intermediate states required and could be less if the numbers being multiplied have a precision less than the full 32 bits (an n bit signed number requires only n/4 cycles to complete).
The last detail about state concerns how unsigned multiplies are accomplished. These multiplies are important only for the upper product. Those familiar with the Booth algorithm know that it always assumes that the input numbers are signed (whether they are or not). When they are not signed, it is necessary to correct the sign by adding in the d2 input to the result already obtained. This can be accomplished by simply adding a state of "doingLower" after the 8 states of "doingUpper."