The magnitude detector consists of an input stage, a leaky integrator filter, a threshold comparator and two hysteresis counter based filter instances.
The following figure shows the architecture of the detector.
Figure 1. Power Detector Block Diagram