
Here you see a typical SpaceWire signal. The yellow trace is CH1 and it shows the data line. CH2 is the strobe. While data is carried on CH1, the clock itself is generated by the XOR of CH1 and CH2. Whether I want to figure out the bits, create an eye, or just see the clock timing, I need to generate that XOR signal.
All of my analysis will be done with a Tektronix DPO5204, a 2GHz real-time oscilloscope that runs Microsoft Windows 7. SpaceWire signals are differential, meaning the signal has a + and - side, so I am using a TDP3500 differential probe to acquire the signals for best signal integrity.
The first step is to use a MATH trace to translate the analog signal into a digital one. In this case, I am using REF2 instead of CH2 (because I am analyzing saved data). I simply make an equation that Ref2 > VAR2. I could have put 0 instead of VAR2 because this is a differential signal probed with a differential probe. The reason I used VAR2 is that often designers will grab a single ended probe and look at just a single side of SpaceWire. By changing VAR2 to a higher voltage (like 1.2V), the designer doesn't need to alter the MATH equation.
Here you can see the result. MATH1 shows the digital version of CH1/REF1 and MATH2 shows the digital version of CH2/REF2. Note that the edges have ringing on them. This is because the channel itself is either 0 or 1. The oscilloscope interprets this quick transition in MATH as an improperly sampled edge since the display uses SinX/X interpolation, it adds some visual ringing to the edge.
To clean this up, I click on Display on the top menu, and set interpolation to Linear.

Of course, now my display is very busy. I am using 3 MATH channels when all I really need is MATH3.
Here I have combined everything into a single MATH1 equation. Now you can also see why using VAR1 instead of a real value is beneficial. If I change between differential and single ended probes, I don't have to edit the entire equation.
Below is my result - a clock has been successfully generated from my data and strobe. Next blog post, we will discuss how to decode the Data line into 1 and 0 values for export into a text file.
Nice trick for the XOR function - cool!
ReplyDeleteThe XOR function trick is simply amazing.Nice informative post.Thanks for sharing.
ReplyDelete