Designing with core-based high-density FPGAs
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.

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.
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.


Loading comments... Write a comment