1 Jun 2008

1394 vs USB

IEEE 1394 Firewire vs USB

USB was originally seen as a complement to FireWire (IEEE 1394), which was designed as a high-speed serial bus which could efficiently interconnect peripherals such as hard disks, audio interfaces, and video equipment.

USB originally operated at a far lower data rate and used much simpler hardware, and was suitable for small peripherals such as keyboards and mice.

The most significant technical differences between FireWire and USB include the following:

  • USB networks use a tiered-star topology, while FireWire networks use a repeater-based topology.
  • USB uses a "speak-when-spoken-to" protocol; peripherals cannot communicate with the host unless the host specifically requests communication. A FireWire device can communicate with any other node at any time, subject to network conditions.
  • A USB network relies on a single host at the top of the tree to control the network. In a FireWire network, any capable node can control the network.
  • USB runs with a 5v power line, whereas Firewire can supply up to 30v.

These and other differences reflect the differing design goals of the two buses: USB was designed for simplicity and low cost, while FireWire was designed for high performance, particularly in time-sensitive applications such as audio and video.

Although similar in theoretical maximum transfer rate, in real-world use, especially for high-bandwidth use such as external hard-drives, FireWire 400 generally, but not always, has a significantly higher throughput than USB 2.0 Hi-Speed.

The newer FireWire 800 standard is twice as fast as FireWire 400 and outperforms USB 2.0 Hi-Speed both theoretically and practically.

The chipset and drivers used to implement USB and Firewire have a crucial impact on how much of bandwidth prescribed by the specification is achieved in the real world, along with compatibility with peripherals. Audio peripherals in particular are affected by the USB driver implementation.

One reason USB supplanted FireWire, and became far more widespread, is cost; FireWire is more expensive to implement, producing more expensive hardware.


IEEE 1394/Firewire/iLink Protocol:


http://www.skipstone.com/compcon.html
http://www.xilinx.com/esp/consumer/home_networking/pdf_files/1394_firewire/complete.pdf



















  • Transmition is multicast-based,
  • A special SBM (Serial Bus Management) layer monitors overall physical layer to application layer timing, power, error correction
  • IEEE 1394 involves the low three ISO protocol layers: the Physical Layer, the Link Layer, and the Transaction Layer, plus the Serial Bus Management process that connects to all three layers.
  • The Physical Layer connects to the 1394 connector and the other layers connect to the application.

  • The Physical Layer provides the electrical and mechanical connection between the 1394 device and the 1394 cable. Besides the actual data transmission and reception tasks, the Physical Layer provides arbitration to insure all devices have fair access to the bus.
  • The Link Layer provides data packet delivery service for the two types of packet delivery: asynchronous and isochronous. As mentioned before, asynchronous is the conventional transmit-acknowledgment protocol and isochronous is a real-time guaranteed-bandwidth protocol for just-in-time delivery of information.
  • The Transaction Layer supports the asynchronous protocol write, read, and lock commands. A write sends data from the originator to the receiver and a read returns the data to the originator. Lock combines the function of the write and read commands by producing a round trip routing of data between sender and receiver including processing by the receiver.
  • Serial Bus Management provides overall configuration control of the serial bus in the form of optimizing arbitration timing, guarantee of adequate electrical power for all devices on the bus, assignment of which 1394 device is the cycle master, assignment of isochronous channel ID, and basic notification of errors. Bus management is built upon IEEE 1212 standard register architecture.

Universal Serial Bus USB

http://www2.rad.com/networks/2000/usb/indx.htm
http://en.wikipedia.org/wiki/Universal_Serial_Bus




















USB is intended to help retire all legacy varieties of serial and parallel ports. USB can connect computer peripherals such as mice, keyboards, PDAs, gamepads and joysticks, scanners, digital cameras, printers, personal media players, and flash drives.


The USB host (Computer) handles most of the complexity of the USB protocol, which makes the peripherals design simple and low cost. Data flow can be from host to device and from device to host.

USB transactions are done through packets. Each transaction is composed usually from three phases:
  • Token phase - the host initiates token indicating the future transaction type.
  • Data phase - the actual data is transmitted through packet. The data direction matches the direction indicated by the token that was transmitted previously.
  • Handshake phase - (optional) - handshake packet is sent, indicating the success or failure of the transaction.

There are four main USB transfer types:

  • Isochronous transfer: is used for multimedia devices such as audio, video, etc. Important characteristic of the transfer is that bandwidth is guaranteed - the required bandwidth is reserved for the devices uses this transfer type. In isochronous transfers there is less attention to the success of the transfer (whether or not the whole data arrived on time) since the traffic included in this transfer type has a high tolerance for errors.
  • Bulk transfer: Bulk transfer is consisted of massive amount of data and is used by devices requires it such as printers, scanners, etc. The bandwidth allocated in each transaction of the transfer varies according to the bus resources at the time. Bulk transfers are done in reliable mode - there is great deal of awareness to errors.
  • Interrupt transfer: Interrupt transfer is a limited-latency transfer and used for devices such as mouse, joystick that needs to report short event notification, characters or coordinates. A USB device that works in an interrupt transfer mode defines, as part of its configuration, the time interval it wants to send or receive information. The host is responsible to turn to device at that specific rate, and then the device is allowed to send or receive the necessary data.
  • Control transfer: Control transfers are used to configure a device. The configuration is done at the enumeration process but can be done also at any state of the communication process. When a device enters the system the host needs to learn about it and configure it at the appropriate configuration, all this communication is done using the control transfers. Control transfer can also includes special messages defined by the vendor.

2 comments:

Anonymous said...

Interesting comparison !

But does it mean that firewire is much more made for audio transmission than usb ? Is the sound quality improved if using firewire instead of usb on external soudcards for example ?

Appleteapot said...

It is difficult to compare head-on-head as there aren't many DAC which has both USB and Firewire interfaces, however, firewire looks better "on paper". THe only limitation is that USB 1.1 supports only up to 24/96, which will soon have limitation when 24/192 materials become available.