Logo
Get direct access via EPNdirect to Europe’s most comprehensive database of electronic products & suppliers
Search    Advanced Search Criteria
 FEATURE ARTICLE
Print | Digg This | Slashdot It! | Add to Del.icio.us |
Verifying Serial-Data Designs Using Physical-Layer Scans
New waveform-scanning techniques developed during the past year have made the task of troubleshooting automotive-serial-data designs systematic and precise. This article focuses on several powerful techniques for the rapid characterisation and debug of automotive signaling. Applications discussed include physical-layer-scanning techniques applied to signals such as CAN (controller area network) and SPI (serial peripheral interface).
EPN_Supplements, 20/09/2007
Reference: 26155

Identifying frequency-stability problems within automotive-serial-data signals can be greatly simplified when using an automated method. The ideal bit period of a serial-data signal is computed as the inverse of the bit rate; it is the amount of time corresponding to a single logical one or zero in the data stream.
Frequency stability
However, each actual bit period is not identical for every bit. When an oscilloscope measures each data period of a serial-data signal, this value can be directly inverted to compute the instantaneous data frequency for that specific bit. All-instance measurements are a technique of computing the value for all possible measurements within the acquisition. All-instance measurements does not only measure the value of one data period within the acquired waveform: the series of instantaneous frequencies of each data period of an entire acquired input waveform can be computed as an array. With a tolerance band applied to instantaneous frequencies, the array of continuous instantaneous frequencies can be scanned by the oscilloscope to detect anomalous frequency content on a per-cycle basis. The waveform-scanning technique incorporates this new approach and can report frequency anomalies graphically and numerically to identify all data periods that are outside of frequency-stability-margin requirements. Similarly, other timing parameters such as rise time, fall time, period, pulse width and duty cycle could be used as waveform-scanning criteria. Figure 1 shows a 125kbit/s CAN bus is probed single-ended and subtracted in math trace F1 to present the differential signal. In addition to displaying physical-layer characteristics such as pulse width and rise time, a protocol-layer decode is overlayed onto the trace. Individual fields of the CAN message are identified with corresponding colour-coded highlighting blocks. For example, the ID field with hex ID 0x400 is highlighted in red, while the CRC (cyclical redundancy check) is highlighted in blue with a decoded value of hex 0x3cc7. Stuff bits, highlighted in brown, show the locations of bits whose polarities were intentionally reversed in order to reduce capacitive-charge buildup during transmission. Within the decoded data fields, each byte is individually highlighted and translated both hexidecimally and symbolically. For example, within the engine message, the power level of 42W and the cam speed of 928rpm are
individually decoded and displayed.
Statistical analysis
To ensure proper device behaviour, the rise time of a CAN signal must be inspected. However, a single rise-time or fall-time measurement will not suffice. Statistically, a sample population of over 1000 corresponds to a ±3-sigma measurement confidence, and a sample population of 10,000 corresponds to over ±3.5-sigma measurement confidence. In Figure 1, using all-instance measurements of rise time, the green histicon (iconic histogram) shows a statistically significant rise-time-measurement population of over 5312 rise-time measurements, corresponding to greater than ±3-sigma confidence. The accumulation of measurements shows a mean value of 56.966ns and a standard deviation of 2.054ns. Minimum and maximum rise-times values of 51.1 and 71.7ns are anomalies forming the extreme at the 3-sigma tails of the histogram. Within each acquisition, waveform scanning has been enabled to capture the two rarest rise-time values from each acquisition. Of the 5312 measurements accumulated in the measurement histicon, waveform scanning has identified 746 transitions that met the user-defined measurement criteria for CAN-bus edge transitions. All values that meet the scanning criteria have been logged into the red histogram. This technique can also be used to verify CAN-bus falling-edge compliance by substituting fall time for rise time in the scan criteria.
Waveform scanning
The histogram distribution can quickly identify modulation characteristics. The green histogram contains the accumulation of all rise-time measurements, and the distribution is approximately gaussian but contains rise-time outliers that are biased heavily to the right of the mean value due to slow edge rates, which have low statistical probability. This could be due to a specific CAN node with a low load percentage transmitting slow rise times onto the bus, or a group of nodes whose rise times are intermittently slow. The gaussian portion of the histogram distribution contains one main mode, with rise-time values clustered around the mean, and randomly distributed out to the tails. The shape of this distribution indicates random noise within the rise-time measurement, which is due to broadband electrical noise generated by every electrical circuit. By contrast, the red histogram shown in center grid has two main modes in the histogram, or a bimodal distribution. The rise-time measurements are clustered around two central values and randomly distributed around these modes. The lack of data in this range between the peaks is a function of the user-defined criteria used for sorting rise times based on rarest events. In this case, the two most recent rise-time anomalies are listed in a tabular index in the upper left edge of the display. These values correspond to the two red areas highlighted in the F1 differential CAN waveform trace. Clicking on any of the index numbers will highlight that specific rise-time violation in bright yellow.
In addition, the Z1 zoom trace corresponds to the selected rise-time anomaly. Waveform data is automatically saved each time an anomaly is detected. Unlike triggering, waveform scanning will identify not one, but all anomalies within the acquisition window. In fact, the trigger can occur anywhere within the waveform, as this technique is independent of trigger position.
Non-monotonic edge detection
An important switching characteristic of an automotive-serial-data signal is its linearity in transition. Detection of non-monotonicity is performed automatically to examine each transition edge using waveform-scanning techniques. In Figure 2, non-monotonic mode has been selected and applied to the differential-input waveform trace. The scope has detected a considerable ringback in the acquired SPI waveform and has highlighted this in red within the graticule. Non-monotonicities such as these could easily lead to logical errors within the system as the ringback portion of the waveform has exceeded the decision threshold, and could be detected as a logic one level by the receiver. Hysteresis can be used to ensure the minimum distance that the edge must traverse to be considered for non-monotonicity, in order to avoid false detection of signals that contain large noise levels. Scan-overlay mode allows for waveform features meeting user-defined criteria to be shown in a persistent display. This is not a persistent display of all acquired waveforms - the overlaid pulses need not occur from separate acquisitions. Adjacent pulses from within the same single-waveform acquisition can be shown in an overlaid display, provided that they meet the user-defined criteria for scan identification and that not all waveforms will contribute anomalies to the scan overlay. For example, each non-monotonic edge acquired on the SPI signal could have been overlaid to show a persistence mapping of only those edges that meet the non-monotonic-definition requirements.
Parameter tracking
When applying a mathematical tracking function to a set of measurement-parameter values, a new waveform is constructed that plots parameter values as a function of time position. Unlike an acquired waveform, this new track waveform has measurement-parameter values - and not voltage - as its Y-axis. The X-axis of the track waveform is identical to the acquired pulse stream and shares the same X-axis time scaling. For example, a track of duty cycle will plot duty cycle as a function of time. As duty cycle changes slowly over time, the shape and timing characteristics of the track reveal important information not visually available from the input waveform itself. This method of parameter tracking is also useful for many applications - such as identifying the source of jitter - but has a very powerful display capability when applied to automotive signals. A CAN message embeds encoded data values in each byte field within the message. For example, parameters such as engine temperature, wheel speed, and steering angle can be encoded into a CAN message and output in regular intervals by the CAN nodes connected to the bus from each of these functional areas. Other devices connected to the CAN bus can also read and utilise these transmitted data values. For example, modern audio systems adjust radio-volume level proportional to engine RPM to provide a consistent ambient audio-sound level in the presence of changes in automotive background noise; and in most vehicles, cruise control can only be engaged when the wheel speed reaches a minimum rate. In automotive-signaling debugging, it would be useful to be able to view the changes in data values that take place relative to the timing of the CAN-bus message and relative to other data values concurrently transmitted on the CAN bus.
Advanced signaling analysis
In Figure 3, the orange trace (F1) is the differential CAN signal. With a large time capture of 100ms per division (1s of acquisition time acquired at 5 million samples/s), 99 decoded CAN messages are displayed in the upper grid. A CAN parameter - CAN-to-Value - is enabled in parameter P1, which has extracted and decoded each data byte within each of the 99 CAN messages. The result of P1 is tracked using mathematical operator F3 to display a time-correlated track of each decoded CAN value as a function of time. The time axis shared by the differential CAN signal and the track of the decoded CAN values is identical. This track shows the instantaneous values on the CAN bus encoded within CAN message (such as engine speed, brake pressure, or airbag status). We can see an oscillation forming in the decoded CAN values within this large acquisition window. Measurement parameters and mathematical operators can be chained together to form advanced processing chains for automotive-signaling analysis. In this case, the frequency-measurement parameter is applied to the track math operator, which is plotting the CAN-to-Value parameter. The CAN-to-Value parameter is decoding the data contained within the mathematical difference of the high and low CAN input channels. The chain of math and measurements in this case is 5 levels deep, and the result is the ability to measure macro-effects, such as the frequency of oscillation of the data decoded within the CAN message stream. In addition, short-term fluctuations are immediately revealed because they will appear as a large spike on the track. Each track can be applied to messages with matching message-ID values. Therefore, measurements could be used to compare two sets of decoded CAN messages. Beyond quantitative results, measurements on the track also help the user understand the automotive system's interactional response. For example, the skew-measurement parameter could be applied to determine the timing difference between the wheel speed of the left front wheel and that of the rear right wheel, with statistics outlining the mean and range. Analogue control signals found in automotive systems often either stimulate or respond to changes in encoded data traffic. The timing between these analogue control signals and these data signals can be measured to determine timing budgets and margin analysis. In each of these cases, waveform-scanning techniques can automatically monitor any of these conditions and perform user-defined actions when they occur.
Bus utilisation
Another important area of consideration is the overall bus utilisation. The load percentage of an automotive-serial-data signal can be calculated based on the message ID, thereby providing quantitative usage analysis of specific nodes on the bus. For example, the instantaneous value of coolant pressure can be transmitted onto the bus. The load percentage of messages as a ratio of acquisition time can be computed, showing for example that coolant-pressure messages used 3% of the total time on the bus. The selection could be further narrowed by only calculating bus utilisation of only that coolant message with data values above 8.5ktorr. By performing a track of the load percentage and by plotting load percentage as a function of time, this would allow applied measurement parameters to monitor the interval of time corresponding to anomalous automotive-circuit behaviour. For example, waveform scanning could guarantee that the coolant pressure only remained above 10ktorr for no more than 500ms by monitoring the pulse width of the track of coolant pressure and flagging the occurrence of any widths outside of the range. In this case, what can be measured and monitored as pulse width is actually the multi-leveled math and measurement output chain. This technique can simplify complex system interactions into a single parameter measurement.
Summary
Waveform scanning makes debugging a circuit fast and efficient. Automatic scans can monitor changes in parametric values, such as drifts in frequency, widths that are too narrow, non-monotonic edges, rise-time anomalies, intermittent events, variation in encoded CAN message data, and many other phenomena. When operating on a deep acquisition record with a large number of events, waveform scanning quickly locates and identifies anomalies. When operating on multiple acquisitions, the tool continuously scans and executes actions based on user-defined criteria. When an automotive signaling challenge is described in terms of a timing measurement, then this technique will rapidly find anomalous conditions. Measurement-filtering methods are available to further narrow the search criteria. The ability to view histogrammed and overlaid measurement and data values provides further analysis of the anomalies identified by the scan. These techniques can also be adapted for monitoring and troubleshooting virtually any other automotive-serial-data network to validate system behaviour and identify anomalies as they occur.

Figure 1: A symbolically decoded CAN signal (top grid) is monitored for
rise-time anomalies. A statistical view (middle grid) shows a bimodal distribution, and a zoom trace (bottom grid) shows a zoomed view of one of the anomalous transitions.

 

By Mike Hertz, Field-Application Engineer, LeCroy

LeCroy Europe GmbH
Waldhofer Strasse 104
69123 Heidelberg - Germany
tel: +49-(06221)82700
fax: +49-(06221)834655

RELATED ARTICLES FROM LeCroy Europe GmbH All their related products...
Search in the archives
Advanced Search Criteria
Magazine_sep_2008_small
Loupe
issue
Sep. 2008
Home  |  Products  |  Suppliers by company / by product type  |  Events  |  Subscription to Datasheet / to Magazine