Comparator-based thresholding circuits are often described in simple terms: an analog signal crosses a threshold, the comparator changes its output voltage level, typically to a standard logic level like 3.3V or 5V. The digital section can then process this logic level directly on silicon or in application logic. How this occurs in programmable logic depends on the comparator propagation delay.
The important question is when the comparator output transition arrives at the programmable logic input, how much that timing moves with input conditions, and whether the downstream logic can capture the event reliably. Comparator propagation delay is a latency term plus a timing uncertainty term, and your programmable logic may need to account for the comparator propagation delay to ensure timing closure and stability.
Comparator propagation delay is simply defined as the amount of time required for the comparator output to respond to the input analog signal passing above/below the reference voltage threshold (including hysteresis). If the analog input crosses the comparator threshold at time T(0), the output transition appears later:
T(out) = T(0) + T(pd)
Typical values of T(pd) in a mixed-signal ASIC are ~1 us, but note that T(pd) delay shifts with:
A fast overdriven input crossing tends to produce a faster and more repeatable output edge. A slow ramp near the transition threshold usually produces a later and less repeatable edge.
This is where a programmable logic design can get into trouble. The comparator output is already at a valid logic amplitude, so it is easy to treat it like any other digital source. In reality, that output is still an asynchronous event whose timing is shaped by analog behavior. Once it reaches a clocked input inside an FPGA or CPLD, the design has to anticipate or tolerate the delay and any delay variation.
A comparator feeding programmable logic should usually be treated as an asynchronous input. Unless the analog event is already phase-related to the internal system clock, the comparator output can transition at any point in the clock cycle. That means the first destination register inside the programmable logic has setup and hold exposure just like any discrete flip-flop.
For timing analysis, the useful quantities are the earliest and latest possible arrival times at the programmable logic input register:
T(max) = T(0, max) + T(pd, max) + T(signal)
T(min) = T(0, min) + T(pd, min) + T(signal)
For digital logic designs, the values must satisfy the setup and hold limits of the receiving register relative to the internal clock. A single typical propagation delay value from the comparator datasheet is usually not enough to make that determination.
Since the comparator output is an asynchronous event relative to the internal system clock, the primary challenge is dealing with metastability at the first flip-flop (register) that samples the signal. Programmable logic provides a structured environment to manage this uncertainty, concentrating the analog-to-digital boundary issues at the initial capture point.
The most common and disciplined method to account for the asynchronous nature of the input is to use a two-register synchronizer chain. This structure works as follows:
The purpose of the second register is to provide the first stage sufficient time to resolve any metastability before the rest of the synchronous digital design uses the signal. Once synchronized, the remaining logic path can be analyzed using standard synchronous timing methods.
A critical architectural constraint is to avoid using the comparator output as a clock source within the programmable logic. Although the output is a valid digital signal, treating its edge as a clock distributes the inherent analog uncertainty and delay variation throughout the entire timing reference of the design.
Furthermore, designers must account for how propagation delay can lead to pulse width distortion or missed events. If the comparator's turn-on and turn-off delays are unequal, the width of the digital pulse at the programmable logic input may be longer or shorter than the actual analog threshold-crossing interval. If a short pulse occurs entirely between two clock edges, the event will be missed. Simulation is often used to ensure the pulse is long enough to be sampled reliably, even under worst-case delay and sampling overlap conditions.
A programmable mixed-signal matrix processor gives the unique ability to implement analog sensing and processing alongside programmable logic. These features would typically require discrete comparator/logic components or an ADC with a standard digital bus output. With Renesas GreenPAK, designers can implement an analog comparator sensing stage directly in a custom ASIC, which is also reconfigurable thanks to built-in reprogrammable mixed-signal blocks.
This brings CPLD-like custom logic and fully customizable analog circuitry into the same programmable component. In GreenPAK designs, the comparator delays are physical silicon features and cannot be easily changed, which may make detecting very short pulses (e.g., 500 ns) unstable. When reconfiguring comparators in application code, a delay (e.g., 15 us) may need to be required to allow for propagation and settling before reading the output of a comparator.
The developer tools in Renesas GreenPAK give designers the ability to develop fully custom digital, analog, or mixed signal ICs. These programmable mixed-signal processors allow consolidation of functions found in clock and signal management circuitry, allowing for smaller, more efficient systems. To learn more, take a look at the GreenPAK components and reference examples.
Whether you need to build reliable power electronics or advanced digital systems, use the complete set of PCB design features and world-class CAD tools offered by Altium to implement your GreenPAK solutions. Altium provides the world’s premier electronic product development platform, complete with the industry’s best PCB design tools and cross-disciplinary collaboration features for advanced design teams. Contact an expert at Altium today!