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 are suitable for the PCI-Express, PCI-X and PCI and slot interfaces. The newest interface, PCI-Express, offers the greatest opportunities 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.

By comparison the PCI interface has been around for many years and may now be considered obsolete, however the PCI-X version, essentially an enhanced PCI bus with higher clock speed, does offer over twice the bandwidth of standard PCI for data transmission. Hence it still offers some operational value. It is generally only found on server computer motherboards. PCI and PCI-X use purely a parallel communications bus.

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 (waveform capture), 2 giga bytes/sec (waveform generation)
PCIe (single-lane): 130 mega bytes/sec
PCI-X: (high speed PCI): 200 mega bytes/sec
PCI: 100 mega bytes/sec

Note this is not the theoretical maximum, which is higher, but takes into effect the current interface chip performance and system overheads. Also in PC operating systems, the memory management is based on memory pages, normally 4 kilo byte (4096 bytes). During continuous data transfer, data is allocated into these pages and different addresses have to be accessed, this slows down the process of streaming data. There is a easy way to improve this, by utilising a driver setting for the Spectrum range of high-speed cards, so raising the aforementioned transmission speeds by about 25%. Our engineers at DataQuest Solutions will be pleased to provide more information about this.

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 million samples per second, a quick estimate of the bus transfer bandwidth is simply:

100 million samples per second * 1 byte = 100 million 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


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 million 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. However taking the result of using a higher resolution converter (12, 14 or 16 bits, would certainly require the capabilities of the multi-lane PCI-Express or PCI-X bus to allow constant data streaming. 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 cards can rearm very quickly. These times are shown in the relevant datasheets.

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 Hard Disk.
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 Spectrum cards have at least 512 mega bytes of memory as standard and can be upgraded to 2 giga bytes. The M4i card version has a massive 4 giga bytes as standard! In most situations the standard memory when used as a FIFO buffer has enough room to allow continuous data transfer. The host computer has its own data buffer that works in tandem, commonly referred to as PC RAM. 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 Hard Disk Drive (HDD) and with the Spectrum M2i/M3i/M4i card driver it is even possible to do this real time with the signal capture going on, however note that the HDD can be a bottleneck to ultra fast data capture. Even a new high performance SATA drive might only read/write in the region of 200 mega bytes/sec and perhaps less than half this rate for older examples. One way around this is with a RAID system using two or more SATA 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 the Solid State drive (SSD) has gradually moved into mainstream use, with read/write speeds three or four times faster than the average disk-based SATA hard drive. SSD can be used in a RAID configuration too, 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 relates 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 Web site with its links to datasheets and operation notes for an extensive range of PCI-Express and PCI/PCI-X cards, plus the PXI and compact PCI chassis mounted versions. We provide converter resolutions from 8 to 16 bit, with sampling rates from 1 KHz to 5 GHz.

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

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