~~ODT~~
===== IEEE 1394 DATA =====
==== Type 0x58, IEEE 1394 Data, Format 0 (IEEE 1394 Transaction) ====
IEEE 1394 Data, Format 0 packets are used to record data messages at the transaction layer of the IEEE 1394
serial data bus. Currently IEEE 1394, IEEE 1995, IEEE 1394a, and IEEE 1394b are supported.
There are two major classes of IEEE 1394 data transfer, synchronous and isochronous.
Synchronous data transfer is used to transport real time data streams such as video. Isochronous
transfer is used to transport other non-time critical data on a best effort basis without latency or
throughput guarantees.
At the lowest network level, IEEE 1394 defines three types of bus packets; a PHY
packet, a Primary packet, and an Acknowledgement packet. There are several different types of
Primary packets. Primary packets contain a Transaction Code to distinguish them.
There are three different types of IEEE 1394 Data, Format 0 packets. The Chapter 10 standard
refers to these as Type 0, Type 1, and Type 2. Type 0 packets are used to record bus events such
as Bus Reset. Type 1 packets are used to record synchronous streams only (Primary packets
with a TCODE of 0x0A). Type 2 packets are for more general purpose use and are used to
record all 1394 packets including PHY, Primary, and Ack packets.
The layout of the CSDW is shown in Figure 6-47. The uPacketType value indicates
the packet body type. The uSyncCode value is the value of the 1394 Synchronization Code
between transaction packets. The IEEE 1394 standard describes the Synchronization Code as
“an application-specific control field”, and “a synchronization point may be the defined as
boundary between video or audio frames, or any other point in the data stream the application
may consider appropriate.” The uTransCnt value is the number of separate transaction
messages in the data packet.
struct Su1394F0_ChanSpec
{
uint32_t uTransCnt : 16; // Transaction count
uint32_t Reserved : 9;
uint32_t uSyncCode : 4; // Synchronization code
uint32_t uPacketType : 3; // Packet body type
};
Type 0x58 IEEE 1394 Data Format 0 CSDW
Type 0 and Type 1 data packets will not have an intra-packet header. Type 2 data
packets will have intra-packet headers between transaction data messages with the data packet.
The Type 2 intra-packet header is an 8 byte time value. Time is represented in either 48-bit
relative time format derived from the RTC (format shown in Figure 6-5), or as absolute time. If
this time is absolute time, it is in either Chapter 4 weighted 48-bit time (format shown in
Figure 6-6) or IEEE 1588 time format (format shown in Figure 6-7).
The IEEE 1394 standards contain quite a bit of example code and data structures in
the C language to aid in data interpretation.
Chapter 10 of IRIG 106-07 (and prior editions of the standard) incorrectly state that Bit 7
of the Packet Flags (in the packet header) is used to determine if the intra-packet time is relative
time or absolute time. The correct bit to use is Bit 6. This handbook is based on (and correlates
to) the IRIG 106-07 edition; however the "bit 7" error will be corrected in future releases of this
handbook.
----
==== IEEE 1394 Data, Format 1 (IEEE 1394 Physical Layer) ====
IEEE 1394 Data, Format 1 packets are used to record IEEE 1394 at the physical layer. All bus data and bus events
can be recorded in Format 1 packets. The IEEE 1394 Data, Format 0, Type 2 data packet
provides a similar capability for capturing all bus traffic at the physical level. This Format 1
packet provides more status information, though, and is preferred over the Format 0, Type 2 data
packet.
The layout of the CSDW is shown in Figure 6-48. The uPacketCnt value indicates the
number of separate 1394 data messages in the data packet.
struct Su1394F1_ChanSpec
{
uint32_t uPacketCnt : 16; // Number of messages
uint32_t Reserved : 16;
};
Type 0x58 IEEE 1394 Data Format 1 CSDW
Individual 1394 data messages follow the CSDW. The format of the intra-packet data
header is shown in Figure 6-49. The suIntrPckTime value is an eight byte representation of
time in either 48-bit relative time format derived from the RTC (format shown in Figure 6-5) , or
as absolute time. If this time is absolute time, it is in either Chapter 4 weighted 48-bit time
(format shown in Figure 6-6) or IEEE 1588 time format (format shown in Figure 6-7). The
uDataLength field is the length of the 1394 data message in bytes. The bLBO flag indicates
that some 1394 packets were lost by the bus monitor due to an overflow in the local message
buffer. The uTrfOvf value indicates a 1394 transfer protocol error. The uStatus field
indicates the value of the eight-bit Bus Status Transfer from the PHY to the link layer of the
1394 bus. Bus Status Transfers are used to signal:
a. A Bus Reset indication. \\
b. An Arbitration Reset Gap indication (both even and odd). \\
c. A Subaction Gap indication. \\
d. A Cycle Start indication (both even and odd).
See IEEE 1394b-2002 Section 17.8 for more details about interpreting uStatus.
struct SuIEEE1394F1_Header
{
uint64_t suIntraPckTime; // Reference time
uint32_t uDataLength : 16; // Data length
uint32_t Reserved : 1; //
uint32_t bLBO : 1; // Local buffer overflow
uint32_t uTrfOvf : 2; // Transfer overflow
uint32_t uSpeed : 4; // Transmission speed
uint32_t uStatus : 8; // Status byte
};
Type 0x59 IEEE 1394 Data Format 1 intra-packet data header
The complete 1394 bus data message follows the intra-packet data header. The length of
the 1394 data message is indicated in the intra-packet data header. If the data length is not a
multiple of four, the data buffer will contain padding bytes to align the buffer on a four byte
boundary. The IEEE 1394 standards contain quite a bit of example code and data structures in
the C language to aid in data interpretation.
----
==== Type 0x5A - 0x5F, IEEE 1394 Data, Format 2 - Format 7 ====
Reserved for future use.