A guide to the methodology of signal capture and generation from MHz to GHz

DataQuest Solutions have built up years of experience related to the requirements for ultra high-speed signal capture and waveform generation. Our customers look to us to provide PC instrumentation cards, most usually for an installation inside a PC, but also the industrial chassis. We also offer a complete solution with cards and software installed. To capture or generate signals at MHz and GHz speeds need not be a complicated process, certainly no more complicated than at slower sampling speeds, however it does bring with it extra considerations. What follows now is an explanation of these for someone new to this field, or for a person who wishes for an update as to the associated technology.

When using analogue to digital (A/D) conversion the binary data that represents the captured signal needs to be transferred, stored and processed. With a large enough memory on the card, data can simply be stored on that hardware until signal capture is complete. The data can then be processed after transfer to the host computer. In this situation the transfer speed is less critical unless one capture period is to follow very shortly after another. The second alternative is to stream directly to the computer, but this requires careful consideration as to the bandwidth limitations of the computer's interface with the card. This applies equally to where the programmer needs to do the reverse (i.e. generate a waveform), or indeed when using a digital I/O card and thus work with logic signals. Streaming data associated with relatively low sampling speeds of a few MHz is well within the capabilities of many types of interface including USB; however once the waveform frequency dictates that sampling needs to be faster, then hardware with and internal computer fitment is the most commonly used and effective interface. This interface is of the type that will be considered here.

Data exchange with the computer

DataQuest Solutions tackles the demands of very high-speed data transmission with the PC by using a range of "Spectrum" instrumentation cards which is suitable for the PCI-Express and PXI-Express slot interfaces. PCI-Express currently offers the greatest opportunity in terms of higher speeds for new applications, indeed with our Spectrum range of cards PCIe provides the advantage of allowing multiple cards to be used in the same PC without having to share available motherboard transfer bus bandwidth. Data transfer is by serial communication, however many of these communication lanes can be placed in parallel to increase overall transfer performance.

PCI-Express should not be confused with old PCI and PCI-X interface it replaced. PCI and PCI-X use purely a parallel communications bus which is rare now on computer motherboards. PCI and PCI-X are also slower and multiple cards have to share the available bandwidth. The ability of the chosen slot interface to have sufficient bandwidth is an important point to investigate. Here are some typical transmission speeds for the Spectrum range of cards:

PCIe (eight lane): 3 giga bytes/sec. (digitiser), 2 giga bytes/sec. (waveform generator)
PCIe (four lane): 700 mega bytes/sec.(digitiser and waveform generator)
PXI-Express: 1.7 giga bytes/sec. (digitiser), 1.4 giga bytes/sec. (waveform generator)

Note these are not the theoretical maximums, which are higher, but takes into effect the current interface chip performance and system overheads.

To calculate how much bus bandwidth your application will require, start by deciding the number of samples per second you wish to record, then note your preferred cards A/D or D/A converter resolution. For example to digitise a waveform with an 8 bit (1 byte) converter at 100 mega samples per second, a quick estimate of the bus transfer bandwidth is simply:

100 mega samples per second * 1 byte = 1 mega bytes per second

At the risk of complicating things a little, in the computer world one million bytes is usually referred to as a mega byte and can be interpreted as having two values; 1,000,000 bytes, or 1,048,576 bytes

Why?

The answer is that computers work in binary and multiples thereof, so the computer mega byte is 202, which = 1024*1024 bytes, which = 1,048,576 bytes!

So if we use the computer's mega byte and modify the earlier calculation; (sample rate * converter bytes) / 1048576 we get:

(100 mega samples per sec * 1 byte) / 1048576 = 95.367... mega bytes per second.

In reality the first (simpler) method is fine for most scenarios, as it gives a safety margin as to how much bandwidth the interface can handle.

Logically a 16 bit converter (2 bytes) would double the resulting bandwidth and it is the same for the 12 bit or 14 bit converter, as these too need a 16 bit "word" to hold the complete digitised value. A bandwidth of around 100 mega bytes per second is well within the bandwidth capabilities of all interface types. It is important to note that the above presumes constant streaming. It could be that all the data can fit into the cards on-board memory in which case the sampling rate can be as fast as desired, or the programmer simply set the card to capture in bursts, controlled by a repeating trigger (e,g, an external repeating pulse). These triggers can be very close together as the Spectrum range of cards can rearm very quickly. These times are shown in the relevant datasheets and relate to a mode called Multiple Recording

When data is transferred to or from a card using one the interfaces just mentioned, one of the problems is coping with the temporary effects of PC operating system "housekeeping", where it grabs priority over the card data transfer. To handle this, memory installed on the cards is used as a temporary FIFO (First In First Out) buffer, so that if a brief interruption does occur during data transfer with the PC, no loss of data will occur. This FIFO buffer holds the extra data until the card has full access again to the PC bus and memory again.

Signal capture and data transfer route to PC RAM and computer drive.
For a waveform generator card transfer will be in the opposite direction using the same route.

block diagram showing data transfer route and associated memory arrangement

All current Spectrum cards have at least 1 Gbytes bytes of memory as standard and the Spectrum's M4i card version has a massive 4 giga bytes! The card memory, when used as a FIFO buffer, aids continuous data transfer to the host computer, whose own data buffer (PC RAM) works in tandem. Even giga bytes of PC RAM are relatively inexpensive, so it makes sense for a fast and efficient system to have a large PC RAM; which brings us to an important point. Microsoft Windows based PC systems with a 32 bit operating system can work with up to 4 Giga Bytes of installed PC RAM. However the operating system will take up at least 0.5 Giga bytes of this and of the remaining address space only about 2 giga bytes will actually be available for signal data! This can be extended with special options at boot up, but the user should not rely on more than about 3 Giga bytes being available. Fortunately with the advent of 64 bit Linux and Windows operating systems - for which we can supply drivers, these restrictions need no longer apply and the programmer can work with as much memory as his motherboard can hold, well beyond 4 giga bytes.

Acquired signal data will usually end up being stored in the computer drive (SSD or HDD) and with the Spectrum M2p/M4i/M4x card driver it is even possible to do this real time with the signal capture going on, however note that the drive can be a bottleneck to ultra fast continuous data streaming. A single high performance solid-state (SSD) drive might read/write in the region of 500 mega bytes/sec, whilst a hard disk drives (HDD) might manage only half this data rate (but cost less). One way around the streaming speed limit is with a RAID system using two or more SATA connected disk drive devices working in parallel, where simultaneous access to multiple disks allows data to be written to or read from a RAID array faster than would be possible with a single drive. Having two drives can nearly double the speed and this set up is called RAID 0. Over the last few years with the Solid State drive (SSD) coming into mainstream use, SSD's can be used in a RAID configuration opening up the possibility of giga byte transfer speeds! This sort of set up compliments the streaming performance of a PCI x8-lane card series such as the M4i.44xx. A number of cards can be synchronised to work together in the same PC, sharing the computer's drive system.

Trigger control of data capture

Going to the front end of our instrumentation card, signal capture, or signal generation, needs to be controlled and this is normally done through triggering. This allows a signal to be captured (or generated) only when it is needed, cutting down the amount of data required and thus data rates. This can be software controlled, simply by a screen click, but at mega sample rates triggering is normally controlled by looking at the amplitude of the actual signal, or a separate external digital pulse, or indeed a digital pattern (should the application relate to the use of a digital I/O card). Time stamping of the trigger is often very useful here, particularly if there are multiple trigger events, so events and data can be correlated later. Spectrum hardware has this option.

Software programming

So we know something of ultra high-speed signal data, its storage and control and related hardware issues, but it is the software driver that allows the user to set parameters and have overall control of the system. Programming of the installed card(s) can be with many types of text code. It all comes down to the drivers supplied with the instrumentation. The Spectrum drivers are extremely versatile allowing text code programming in many types of code, most commonly Visual Basic, Delphi and C++, with many examples provided to get the programming underway. Other third party packages can be used too, these being LabVIEW™, LabWindowsCVI™ and MATLAB™. Every Spectrum card purchased comes with SBench6™, a menu driven signal capture, analysis & measurement software package. This includes an oscilloscope type display and easy access to board programmable options, allowing a basic working system to be up and running within a few minutes. This is a very good way to get familiar with a new system, or for more demanding applications where study of large data sets is required. For more information about software and programming options for our Spectrum high-speed instrumentation please click here

For more details and advice on putting together an ultra high speed system, DataQuest Solutions is glad to discuss your applications. Please also visit our website with its links to datasheets and operation notes for an extensive range of PCI-Express and PXI-Express cards. We provide A/D and D/A converter resolutions from 8 to 16 bit, with sampling rates from 1 KHz to 5 GHz.

Click here for more information about the PCI-Express interface.
Print version PDF pdf link

DataQuest Solutions Ltd. | Phone: 01526 557171 | Email: info@dqsolutions.co.uk