MAC-unit
From Wikipedia, the free encyclopedia
Multiply and Accumulate Unit is a term used in computing, especially digital signal processing to describe a hardware unit which takes a stream of numbers which get scaled and summed. This is an operation used extensively in filtering algorithms and having it implemented in hardware (as opposed to having to perform the multiply and addition functions as separate instructions) greatly improves performance of DSP related tasks.
Typically, a MAC-unit consists of a multiplier implemented in combinational logic followed by an adder and an accumulator register which stores the result when clocked. The output of the register is fed back to one input of the adder, so that on each clock the output of the multiplier is added to the register. Combinational multipliers require a large amount of logic, but can compute a product much more quickly than the alternative method of shifting and adding typical of earlier computers. The first processors to be equipped with MAC-units were digital signal processors, but the technique is now common in general purpose processors too.