Designing with core-based high-density FPGAs

Robert S. Grimes

July 27, 2011

Robert S. Grimes


High-speed processing

The high-speed processing entailed several measurements:
  • Pulse detection.
  • Timing of pulse (delay, width, onset, offset).
  • Peak amplitude.
  • Total energy.
  • Inadvertent emissions.
These measurements had to be determined on a data stream at 200 Msps—a new sample every 5 ns! Fortunately, I had three things in my favor. First, the optics design ensured that the laser pulses—if they occurred at all—would always appear within a few hundred nanoseconds from when the Q-switches are pulsed; this allowed me to capture a block of A/D readings triggered by the Q-switch pulse, and process the data between pulses (as shown in Figure 2).


Click on image to enlarge.

Second, the analog design of the photodiode amplifier, filtering, and A/D conversion was very good, and simple thresholds were sufficient to pick out the pulses and inadvertent emissions (laser energy outside of the expected window after Q-switch firing). Finally, I had the FPGA logic and block RAM resources at my disposal, without which there really was no hope!

The first step in processing the laser data, after acquisition, is to compare against a threshold to detect whether a pulse or inadvertent emission is present; actually, three thresholds were used: pulse start, pulse end, and inadvertent emission. The logic for selecting which to use is simple:
  • From the Q-switch trigger until a pulse is found, the pulse start threshold is used.
  • From the starting of the pulse, the pulse end threshold is used until the signal returns below that.
  • After the pulse is complete, or after the window is filled, the inadvertent emission threshold is used to look for signal excursions above the nominal level between pulses.
The time of each pulse threshold crossing is noted in a register, and inadvertent events are counted.

As I mentioned earlier, the laser pulses always happen shortly after the Q-switches are triggered. The Virtex-4FX has a number of 18 kilobit block RAM resources, which can conveniently hold 1,024 samples of A/D values, which at 200 MHz represents a 5-µs window; fortunately, the pulses arrive well within that window. So, a simple state machine was used to look for the Q-switch trigger, then direct the next 1,024 samples into the block RAM.

After the block RAM has been filled, an interrupt is sent to the PowerPC, informing it of data to be processed. Because the lasers are pulsed at 5 kHz, the PowerPC must process the four channels of data within 200 µs. This processing is greatly simplified by the onset and offset delay measurements, as only we only need to sum (for pulse energy calculations) those few points.

(An interesting aside here is that, during development, a bug caused the pulse start and end offset measurements to be mishandled, and very weird behavior ensued. The number of pulses seen was exactly a tenth of what was expected, for three of the four channels, but the fourth channel was much worse, and it varied considerably. It turned out that because the offsets were wrong, most of the buffers were being processed, and the PowerPC was not able to keep up; interrupts were being missed. A not-so-subtle reminder of how little time 5 ns is to a PowerPC!)

Statistics were gathered over a 1/10 second window of the minimum, maximum, and average values for the pulse characteristics (for example, delays, width, peak amplitude, and total energy), and these were sent, along with a representative pulse, to the main processor for storage.
< Previous
Page 3 of 6
Next >

Loading comments...

Most Commented

  • Currently no items

Parts Search Datasheets.com

KNOWLEDGE CENTER