To use signal to signal comparison for
pulse width, edge count, phase, deadband the BLKTRIGCFG register must be configured
such that SIG1 and SIG2 have a common trigger input. This can be done by configuring
the BLKTRIGCFG[SIGx_TRIG_TYPE] to set either SIG1 or SIG2 to be set to synchronized
trigger.
Pulse Width SIG1 to SIG2
Comparison
- Signal to signal comparison is
enabled by the SIGTOSIGCFG[SIGTOSIG_CMPEN] register. The common configuration to
start signal comparison is to have a hardware trigger on one SIGx, and configure
a synchronized trigger for the other signal. This starts counting from a common
trigger point for both signals. This trigger mechanism of synchronized use is
common for all the SIGTOSIG operations including width, edge-count, dead-band,
and phase overlap.
- In case the SIGTOSIG compare
enabled and synchronized trigger is not configured to either SIG, then hardware
forces SIG1 trigger to be used for both SIG1 and SIG2.
- A valid signal to signal
comparison is when there are pulses occurring on both SIG1 and SIG2. An example
of an invalid signal to signal comparison is when comparing the widths of two
signals and there is no pulse on the second signal. If the next pulse is started
on the first signal, and second signal does not have a pulse then the earlier
reading of the signal is discarded and no comparison is reported.
- In such case, the error reported
within the BLKERRSTS[SIGTOSIG_ERR] register can be raised to indicate that after
trigger there was imbalance in compare points of two waveforms. The
BLKERRINFO[ERRCNT] register reflects the measurement count and the type of error
to log in this register is defined in the BLKERRINFO[ERRTYPE] register. Like any
other event that is triggering interrupt or RTDMA request,
BLKERRSTS[SIGTOSIG_ERR] also causes an interrupt or RTDMA request.
- The expected compare value and
margin for the difference between width of two signals can be defined in the
SIGTOSIGCFG[CMP] and SIGTOSIGCFG[CMPMARGIN] registers.
Pulse width Aggregation signal to
signal comparison
- Signal to signal aggregation
comparison: This comparison is exclusive of single pulse width measurement and
compares the difference of aggregated measurements of two signal values. The
width of signals is measured as per edge configuration and such N successive
measurements accumulated. Where N is the configured aggregation count. The
difference is taken when both readings are available and comparison is
performed. Compare values are programmed by user through SIGTOSIGCFG[CMP] and
SIGTOSIGCFG[CMPMARGIN]. These are same registers used for single pulse width
comparisons.
Pulse width average, Pulse width
peak signal to signal comparison
- Pulse width peak comparison is
detected for both signals and then the difference of peak values is compared to
the programmed threshold with margin.
- Pulse width average signal to
signal comparison is taken the average of accumulated value of N measurements of
both signals and finding the difference of average compared to the programmed
threshold with margin.
- Both peak and average have
separate compare values available hence these both checks can be simultaneous
and can also be concurrent with each other.
Edge count comparison
Edge count signal to signal
comparison can be done in two ways:
- Fixed window comparison
- Moving window comparison
While comparing the edge count, in a
given interval if there are zero edges from another signal, then the compare is not
a valid comparison point.
- Comparing edge counts of two
signals on moving window basis. This compares the fixed window accumulation for
every moving window completion between SIG1 and SIG2. Given that clock is common
for WADI block and same between SIG1 and SIG2, the same settings of moving time
window are used for both SIG1 and SIG2. This needs to be made sure by software.
Any mismatch leads to erroneous results that do not help in comparison. Note the
check can be simultaneous with MVW mode of individual signal characterization;
hence, no hardware restrictions are imposed.
Comparing the number of edges between
each interval such that there are no glitches or excursion within small windows and
at the same time the check of time-window having certain frequency range is covered.
The check works in similar manner as basic window comparison except that for basic
moving window check the differences between the counts is compared against
SIG_TO_SIG_CONFIG[DIFF_CMPARE_CNTRE] and with SIG_TO_SIG_CONFIG[DIFF_CMPARE_MARGIN]
margin.
Note: Pulse width and pulse width aggregation versus frequency
fixed time window and frequency with moving window are mutually exclusive. The WADI
block for accumulating measurement, and calculating the difference between
measurements must be for either pulse width or frequency measurement.