KeysightOscilloscopes

How to Make Use of New Mask Testing Technology

Blog Post created by KeysightOscilloscopes Employee on Oct 18, 2017

Written by Doug Beck

What is mask testing?

A fundamental aspect of electrical engineering is finding problems with signal integrity. In the real world, systems don’t always work as simulation says they are supposed to. There is the concept of a “golden trace” where the waveforms are precisely where they need to be. But there are a great number of things that can cause a waveform to vary from the “golden trace.” Unfortunately, these problems can also be quite rare, which makes them difficult to find.

 

The idea of a mask on an oscilloscope is to provide a region around the golden trace where the waveform can vary without causing any problems. An example is shown in Figure 1. The gray area is the mask. This can be thought of as “out of bounds” because if the waveform strays into the gray areas, it is considered an error. However, if the waveform remains within the black areas, the waveform is considered fine.

 

Figure 1. An example of a mask on a waveform

 

The most common alternative to using a mask is to use triggers such as glitch, run, slow edge, fast edge, etc. However, a mask combines all of these triggers into a single test. In general, oscilloscope hardware does not allow all of these errors to be searched for at the same time. The bottom line is that using a mask test can save quite a bit of time.

 

Standards-based mask testing

Because mask tests can be so effective, it is very common for masks to be provided for common standards. Examples include Ethernet and FlexRay. The good news is that if your signal happens to be one where an industry standard mask is available, the job is very easy. Just load the mask into an oscilloscope that supports mask testing and you will quickly find errors.

 

However, it is very common for industry standard masks to be unavailable. An obvious case is proprietary buses. In my experience, not having an industry standard mask is the rule rather than the exception. Fortunately, there are alternatives which allow users to create a mask on their own.

 

Creating your own mask with Auto Mask

A very simple method to create a mask is known as Auto Mask. The idea behind an Auto Mask is to take a single waveform and add a tolerance of the desired size around it both vertically and horizontally. An example of an Auto Mask setup dialog from a Keysight Infiniium oscilloscope is shown in Figure 2. It should be noted that the selection of the source channel is made in the main Mask Test dialog.

 

Figure 2. Auto-mask setup dialog

 

In one single step, a mask is created, such as the one shown previously in Figure 1. It is easy to think that this solves the problem completely. Regrettably, it does not work for most situations where masks are needed.

 

Auto Mask only works where the waveform only follows a specific path and only that path. This means if there is an entire unit interval (or more) on screen, the mask will continually fail. Consider the example in Figure 3. We have what seems to be a perfectly good auto mask drawn on the screen. However, in this case, we only have a single run’s worth of waveforms.

 

 

Figure 3. An auto mask of multiple unit intervals

 

Figure 4 shows what happens when we do multiple runs. Suddenly, we get a whole bunch of errors. What happened? The key point is: unless we are zoomed in on a very small part of the waveform, there are many points where either a rising edge or falling edge are valid. This means that the Auto Mask finds a great number of errors when there is actually none at all, in this case.

 

Figure 4. Showing the same auto mask as Figure 3 with multiple runs

 

This problem is just as bad with a single unit interval, which is known as an eye diagram. Eye diagrams are a very powerful method to determine signal integrity but auto mask will never work. An example of an eye diagram is shown in Figure 5. The middle opening is known as the “eye”. The size of this opening is one key measure of signal integrity.

 

Figure 5. Eye diagrams show a single unit interval

 

Creating your own mask with Draw Mask

For a long time, users who needed to create their own mask needed to use Excel to create a mask file. This is very error prone and tedious. However, starting in Version 6.0, Keysight Infiniium oscilloscopes provide a Draw Mask dialog. An example is shown in Figure 6. There is the option for manual creation of polygons which are used to indicate the areas where the waveform should not go. Much of the focus is typically on the eye area itself, although users are free to put the polygons anywhere.

 

 

Figure 6. Manually creating a mask using the Draw Mask dialog

 

Up to eight polygons are allowed, and each polygon can have up to fifteen points. Each point can be editable simply by clicking it and moving it to a new location. Moving the entire polygon at once is done by clicking anywhere inside it and dragging it to a new location. The bottom line is that users can create a new mask visually which is far less error-prone because they can see the existing waveforms in the editor. This is a massive improvement over creating mask files by hand in Excel!

 

The readout at the bottom shows the numeric values for each of the points in the selected polygon. These can be manually edited as shown in Figure 7. This is useful because sometimes users have specific values in mind to match a specification.

 

Figure 7. Entering a specific value for a point in a polygon

 

Each polygon can consist of as few as three points or as many as fifteen points. The reason to allow this flexibility is to give users the option to be as accurate as they desire. Fifteen points are the most accurate, but it also takes the most time to create.

 

An example of a complex multi-polygon mask is shown Figure 8. Notice the use of a different numbers of points. Creating this example took me only a couple of minutes. With Excel, it could have taken hours to get right.

 

Figure 8. Creating a complex mask in the Draw Mask dialog

 

The final result in the oscilloscope is shown in Figure 9. In this case, the waveform is well behaved and we have no errors.


Figure 9a. An eye diagram with a complex mask

 

Figure 10 shows the same mask with some errors. Notice the edges of the mask are now in a bright red. These are waveforms which violate the mask. Optionally, users can stop as soon as a failure occurs to allow them to see what led up to the problem.

 

Figure 9b. An eye diagram with a complex mask

 

It gets better: Automatic mask creation

While creating polygons is pretty fast and definitely a big improvement over manually creating mask files, users asked for even more efficiency. Can’t the oscilloscope automatically create shapes based upon an eye diagram? An example of doing this is shown in Figure 10. To use “Auto Eye,” users need to specify a tolerance and the maximum number of points and then click in the region where they want the shape created.  These shapes are still editable so that users can tweak them if desired. But most of the time the points are fairly close to the desired location so the amount of editing isn’t large. The key point of Auto Eye is not that it always gets the points exactly right but rather that it reduces the amount of editing by putting the points in approximately the correct location. That way, users might only have to adjust a few points of the polygon instead of moving all of them.

 

Figure 10. Automatic creation of polygons for an eye diagram

 

Mask testing transformed

Mask testing has come a long way! Because of enhancements such as Keysight’s Draw Mask dialog, it is now an analysis that can be used on any waveform. This means mask testing has moved from a relatively small niche to a fast and effective tool that should be used early in the testing process to quickly detect errors. Debugging electronics is challenging and can often be time-consuming, but mask testing is now a huge asset to oscilloscope users.

 

 

About the Author

Doug Beck is an Expert Usability Engineer with Keysight Technologies focused on oscilloscopes. He holds a PhD in Industrial & Operations Engineering from the University of Michigan and has 12 patents.

Outcomes