Using an NI FPGA card as Pulsed-Pattern Generator (PPG)

This class allows producing sequences of bit patterns at well defined times with a precision down to a few nanoseconds. The class is based on the NI-FPGA_PPG_Driver. The main idea is using a reconfigurable IO (RIO), a field programmable gate array (FPGA), as PPG.

Specifications and Connection of Signals

The specifications and the assignment of individual I/O lines is describes here.

Structure of Software

The interface to the FPGA is encapsulated in an instrument driver NI-FPGA_PPG driver, which allows to switch betweeen different FPGA targets in the LabVIEW development system. For CS, a dedicated class NI_FPGA_PPG uses the FPGA instrument driver. A derived class, PGA_ABC, uses pattern definitions, that are based on using a mixture of upper case and lower case letters (like"abcD"), where capital letters have the meaning of switching a channel to logic HIGH. Each letter has a unique time associated that is defined in a time table. The PPG_ABC class is mainly used by ion trap experiments.

Switching Between Different FPGA Targets

In case you would like to switch to another target, please do the following.
  1. Instrument Driver "NI-FPGA_PPG_Driver". Please select the correct FPGA-bitfile. This needs to be done in two places.
    1. Edit the properties of the "FPGA_reference" indicator on the front panel.
    2. Edit the properties of the "Open FPGA VI Reference" VI in the "SET" case in the block diagram.
  2. CSclass "NI_FPGA_PPG"
    1. Just open the "" of that class.
    2. Close the VI acknowlodging to save all changed sub-VIs.

Using PPG_ABC with MM8

The PPG_ABC class is primary designed as an interface class to MM8 (or MM6). There, it has to be configured in the UsedDevs as well as in the timing configuration window.


In the UsedDevs -Window the name of the CS object has to be specified and you can decide whether to use an external trigger (see the check-box next to the names of the PPG objects). It is also possible (like in the example above) to enter two times the same PPG object. This leads to the possibility to use also channel 16-31 from this FPGA card.

In the timing configuration window you can configure the timing sequence of your experiment.


With the yellow marked check-box you can select the PPG card you want to configure (compare with the UsedDevs window above). Normally each PPG card uses it is own Time table. But you can change it by selecting another one with the green marked check-box. At last the red marked check-box can be used to change the Time tables without switching to another memory table.

So for example, if you want to use 26 letters and 32 channels on one FPGA card and, you have to use two entries in the UsedDevs window (like above), and change the green marked check-box for Memory 2 to 1.

Using more than 16 channels

As described in the previous section it is possible to use more than 16 channels. But note: Right now the software is configured in a way that the second group of channels (16-31) is always started once the first 16 (0-15) are completely finished, and the third group waits for the second one to be finished. In the UsedDevs Window of MM8 one can switch on and off an external trigger for each of the channel groups. In the database (Special 2) the detailed trigger configuration can be set. So for example if the database entry is "001 002 000" and the first two channel groups are used together with their triggers, the FPGA card, once armed, will first wait for an external trigger at Input 32, then executes the patterns on channels 0-15, then waits for another external trigger at Input 33 (because the 2nd db entry is "002") and executes the patterns on channels 16-31. If you would uncheck the trigger for the second group of channels in the UsedDevs Window, the patterns on channel 16-31 would be executed without waiting for a second external trigger.

Note also, that right now it is not possible to use a second FPGA card to increase the number of channels even further. The source code accepts only one object. If you enter a second name in the UsedDevs Window, this second entry will overwrite the first entry! Depending on the need of the experiments this could be maybe changed, even that one would have to think about how to connect both cards (probably one would have to trigger the other one).

-- DennisNeidherr - 28 Jul 2016
Topic revision: r6 - 2016-07-28, DennisNeidherr - This page was cached on 2024-07-20 - 20:30.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)