Point Grey Research Knowledge Base

Article 22 - Maximum number of IEEE-1394 cameras on a single 1394 bus.

Issue:
Maximum number of IEEE-1394 cameras on a single 1394 bus.

Solution:

A single IEEE-1394 OHCI host adapter card generally comprises a single 1394 bus. There are four elements that limit the number of cameras that can be used on the same 1394 bus:

  1. Number of Isochronous Channels
    Although the 1394a standard limits the maximum number of simultaneous isochronous channels to 16, there is currently no host adapter that is capable of supporting 16 channels. Host adapters based on the TI chipset can support at most 4 simultaneous DMA channels (or contexts). Similar adapters based on the Lucent/Agere chipset support up to 8 DMA contexts. Agere/LSI based 1394b cards, which support up to 8 DMA channels, are available from the FirePRO line of products offered by Point Grey Research. See Knowledge Base Article 146 for more information.
  2. Maximum IEEE-1394 Bandwidth
    The maximum bandwidth of the 1394a bus is 400Mb/s, or 50MB/s. This bandwidth must be split between isochronous (e.g. image streaming) and asynchronous (e.g. camera control) data transfers. 80% (40MB/s) of the bandwidth is allocated to ISO transfers and the other 20% (10MB/s) to ASYNC.

    The maximum size of a single data packet, as defined by the 1394a Trade Association and enforced by the Microsoft Windows 1394 driver stack (1394bus.sys, ohci1394.sys, etc.) is 4096 bytes. With 8000 ISO cycles per second, this equals approximately 33MB/s, which means there is an additional 7MB/s available for ISO data. Therefore, it is possible to allocate up to 4915Bytes/packet, although this violates the 1394a specification. As an alternative, there is nothing in the specification that indicates a device cannot transmit multiple packets per ISO cycle, provided the total number of bytes stays within the negotiated bandwidth. For example, a camera could send two 2450-byte packets per ISO cycle and still comply with the 1394a specification.

    The same general rules apply for IEEE-1394b buses, except that the maximum bandwidth increases to 800Mb/s, or 100MB/s, and the maximum packet size is 8192 bytes.
  3. Maximum Number of Devices
    The 1394a standard limits the maximum number of devices on a single bus to 63.
  4. Camera Power
    Consult the voltage and power requirements in the General Specifications section of your PGR camera's Technical Reference or Getting Started manual to determine the amount of power required to operate the cameras effectively.

Calculating Maximum Possible Frame Rate

The maximum frame rate allowable for each of the cameras on the bus depends on the type and resolution of the cameras being used i.e. single-lens (e.g. Dragonfly) or stereo (Bumblebee), hi-res or lo-res. The DCAM standard defines a specific number of bytes-per-pixel for every video format/mode/frame rate combination - a number generally higher than the minimum bandwidth that might be expected. In order to accurately determine whether or not there is enough bandwidth available for a given scenario, these numbers must be used.

For example, a single PGR Dragonfly in 640x480 Y16 mode running at 15fps is sending 640 pixels per packet. Each pixel consists of 16 bits, or 2 bytes, of data. Therefore, the camera is sending 640*2 = 1280 bytes of data. The maximum bandwidth of the 1394a bus for a single packet as discussed above is 4096 bytes, so it would be possible for 4096/1280 = 3 (rounded down) PGR Dragonfly's to run in 640x480 Y16 mode at 15fps on the same 1394a bus.

More information about IEEE-1394 bandwidth requirements can be found in the "Isochronous Bandwidth Requirements" table in Section 3 of the PGR IEEE-1394 Digital Camera Register Reference, available via the Downloads section.

Our interactive Bandwidth Calculator can be used to calculate approximate bandwidth requirments given various DCAM modes for the camera. The calculator can also provide approximate frame rates for given video formats.

Download Bandwidth Calculator (Microsoft Excel format)

Problems Maximizing Frame Rates

In some circumstances, due to the 1394a bus bandwidth limitations described in point (2) above, some cameras may not be able to achieve the maximum calculated frame rate. Example: According to the formula in the section above, it is possible to run four 640x480 cameras in Y8 (8-bit) mode at 30Hz on the same bus. However, when attempting to do this via the PGR software Format and Frame Rate controls, starting the fourth camera at 30Hz often results in a "bandwidth exceeded" error. The workaround to this problem is to circumvent the Windows bandwidth restrictions by directly manipulating the camera’s CURRENT_FRAME_RATE register 0x600. In the example above, start three instances of the PGR FlyCapture demo program, FlyCap, with each camera running at 30Hz. Start the fourth camera up at 15Hz, then access register 0x600 and set the register to 0x80000000 (30Hz).

Related Articles:
1.) Connecting more than 2 cameras to a 2-port IEEE-1394 card.
2.) My laptop's IEEE-1394 port or PCMCIA card doesn’t supply power to my camera.
3.) Suggestions for streaming images from a PGR camera to hard disk.
4.) Key differences between imaging cameras.
5.) Using PGR IEEE-1394a cameras with 1394b Open Host Controller interface cards.
6.) Avoiding dropped or missed images using PGR FlyCapture.
7.) Differences to consider when selecting an IEEE-1394 PCI / PCMCIA host adapter card.
8.) Exceeding bandwidth limitations when using Format 7 partial image modes
9.) Connecting 16 Point Grey FireWire cameras to a laptop / notebook computer.


Article ID:
22
Published:
12:00:00 AM
Last Modified:
2/15/2011 4:26:22 PM
Keywords:
bandwidth, isochronous, asynchronous, constraints, maximum, 1394, 1394a, Bpp, DMA contexts, bytes per packet, MB/s, Mbps, frame rate
Issue Type:
Configuration

Copyright © 2004 Point Grey Research Inc.