Introduction to Mixed-Signal, Embedded Design by Alex Doboli & Edward H. Currie

Introduction to Mixed-Signal, Embedded Design by Alex Doboli & Edward H. Currie

Author:Alex Doboli & Edward H. Currie
Language: eng
Format: epub
Publisher: Springer New York, New York, NY


For the multiply accumulate function, the two multiplicands are loaded into registers MAC_X and MAC_Y. The product is summed with the previous results, and stored as a 32-bit, signed number in the ACC_DR3, ACC_DR2, ACC_DR1, and ACC_DR0 registers. These registers are reset by writing into the MAC_CL1 or MAC_CL0 register. The type of MAC function, that is either multiplication, or multiply and accumulate, is selected by loading the multiplicands into the respective register pair.

Example (Scalar product of two vectors).

This example illustrates the computational speed benefits offered by the use of MAC, as compared to software routines, by calculating the scalar product of two vectors, a and b. The two vectors can have dimensions of 16, 64, or 256. This example compares three implementations of the scalar product algorithm using C language, assembly code, and assembly code using the MAC for multiplication and summing the partial results.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.