Normalize, Bit accumulator – Maxim Integrated High-Speed Microcontroller Users Guide: Network Microcontroller Supplement User Manual

Page 167

Advertising
background image

High-Speed Microcontroller User’s

Guide: Network Microcontroller

Supplement

167

6. Poll the MST bit until cleared (for nine machine cycles).

7. Read MA for result MSB.

8. Read MA for result LSB + 2.

9. Read MA for result LSB + 1.

10. Read MA for result LSB.

Normalize

The normalize function is used to convert four byte-unsigned binary integers into floating point format by removing all leading zeros

through shift left operations. Following the operation, MA contains the normalized value (mantissa) and the MAS4–0 bits contain the

number of shifts performed (characteristic). The normalize function can only be used on nonzero values.

1. Load MA with data LSB.

2. Load MA with data LSB + 1.

3. Load MA with data LSB + 2.

4. Load MA with data MSB.

5. Write 00000b to the MAS4–0 bits in the MCNT0 register.

6. Poll the MST bit until cleared (for nine machine cycles).

7. Read MA for mantissa MSB.

8. Read MA for mantissa LSB + 2.

9. Read MA for mantissa LSB + 1.

10. Read MA for mantissa LSB.

11. Read MAS4–0 to determine the number of shifts performed.

40-BIT ACCUMULATOR

The accelerator also incorporates an automatic accumulator function, permitting the implementation of multiply-and-accumulate and

divide-and-accumulate functions without any additional delay. Each time the accelerator is used for a multiply or divide operation, the

result is transparently added to a 40-bit accumulator. This can greatly increase speed of DSP and other high-level math operations.

The accumulator can be accessed anytime the multiply/accumulate status flag (MCNT1.7) is cleared. The accumulator is initialized by

performing five writes to the multiplier C register (MC: D5h), LSB first. The 40-bit accumulator can be read by performing five reads of

the multiplier C register, MSB first.

Maxim Integrated

Advertising