A pattern detector on the output of DSP58 detects if the P bus matches a specified pattern or if it exactly matches the complement of the pattern. The PATTERNDETECT output goes High if the output of the adder matches a set pattern. The PATTERNBDETECT output goes High if the output of the adder matches the complement of the set pattern.
A mask field can also be used to hide certain bit locations in the pattern detector. PATTERNDETECT computes ((P = = pattern)||mask) on a bitwise basis and then ANDs the results to a single output bit. Similarly, PATTERNBDETECT can detect if ((P = = ~pattern)||mask). The pattern and the mask fields can each come from a distinct 58-bit configuration field or from the (registered) C input. When the C input is used as the PATTERN, the OPMODE must be set to select a 0 at the input of the Z multiplexer. If all the registers are reset, PATTERNDETECT is High for one clock cycle immediately after the RESET is deasserted.
The pattern detector allows DSP58 to support convergent rounding and counter auto reset when a count value has been reached as well as support overflow, underflow, and saturation in accumulators.