Bus Structure

The basic data structures defined in the standard and used in this document are the quadlet (32 bit quantity) and the octlet (64 bit quantity) and blocks (any quantity of bytes). The bus byte ordering is big endian. A transmission can be sent at one of multiple possible speeds, which are 100, 200 and 400 Mbit/s for the currently mostly used IEEE 1394a spec and up to 3.2 Gbit/s in the recently finalized 1394.b standard (these speeds are also referred to as S100, S200, ...).

A 1394 bus consists of up to 64 nodes (with multiple buses possibly being connected, but that is outside of the scope of this document and not completely standardized yet). Each node is addressed with a 16 bit address, which is further divided into a 10 bit bus ID and a 6 bit local node number, the so-called physical ID. The physical IDs are completely dynamic and determined during the bus reset. The highest values for both are special values. Bus ID equal to 1023 means "local bus" (the bus the node is connected to), physical ID equal to 63 means "all nodes" (broadcast).

The local bus ID 1023 is the only one that can be used unless IEEE 1394.1 bridge portals to more buses were available. Therefore the node IDs have to be given as (1023<<6) | phy_ID. (This is also true if libraw1394 runs at a host which contains multiple 1394 bus adapters. The local ID 1023 is valid on each of these buses. The Linux host itself is no IEEE 1394.1 bridge.)

Each node has a local address space with 48 bit wide addressing. The whole bus can thus be seen as a linear 64 bit address space by concatenating the node ID (most significant bits) and local address (least significant bits). libraw1394 treats them separately in function arguments to save the application some fiddling with the bits.

Unlike other buses there aren't many transactions or commands defined, higher level commands are defined in terms of addresses accessed instead of separate transaction types (comparable to memory mapped registers in hardware). The 1394 transactions are:

  • read (quadlets and blocks)
  • write (quadlets and blocks)
  • lock (some atomic modifications)
There is also the isochronous transaction (the above three are called asynchronous transactions), which is a broadcast stream with guaranteed bandwidth. It doesn't contain any address but is distinguished by a 6 bit channel number.

The bus view is only logical, physically it consists of many point-to-point connections between nodes with every node forwarding data it receives to every other port which is capable of the speed the transaction is sent at (thus a S200 node in the path between two S400 nodes would limit their communication speed to S200). It forms a tree structure with all but one node having a parent and a number of children. One node is the root node and has no parents.