Design of Bidirectional Transmission Device Driver Based on IEEE1394b

Publisher:心境恬淡Latest update time:2010-12-22 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Most of the existing data transmission interface buses are expensive and difficult to meet the transmission rate requirements in actual applications, which has become a major barrier to improving the performance of the entire system. IEEE-1394 is one of the fastest serial bus interfaces today. IEEE1394lb is even faster and supports longer distances based on the original IEEE1394, and has broad application prospects in real-time batch data transmission.

Most of the device driver documents based on 1394 transmission system are based on IEEE1394a, while IEEE1394b has shown greater charm with its higher speed, which is of great significance for real-time and large-scale data transmission. However, Microsoft does not provide support for 1394b. The 1394 that comes with Windows cannot support its S800 speed, so 1394b is limited in application. Unibrian provides the FireAPI SDK development kit, which provides full support for 1394b and is currently the only driver development kit that supports 1394b.

1 Overview of IEEEl394 Serial Bus

IEEE1394, also known as Fire Wire, is a high-quality, high-speed serial bus technology developed by Apple Computer Inc. In 1995, IEEE officially approved the IEEE1394-1995 specification, and in 2000, it launched the IEEE1394a-2000 specification. In 2002, IEEE1394b-2002 was launched with a transmission rate of up to 3.2 Gb·s-1, which is compatible with IEEE1394a, but the shape of the interface changes from 6 Pins of IEEE1394a to 9 Pins. The main features of IEEE1394 are as follows:

(1) High speed and upgradeable, supporting transmission rates of 100 Mb·s-1, 200 Mb·s-1, and 400 Mb·s-1. IEEE1394b increases the transmission rates of 800 Mb·s-1, 1600 bib·s-1, and 3200 Mb·s-1. The chips currently available on the market support up to 800 Mb·s-1.
(2) Supports point-to-point transmission, and each node can execute transactions independently of the host.
(3) Supports long-distance transmission; the distance between IEEE1394 nodes cannot exceed 4.5 m. The maximum distance of IEEE1394b is up to 100 m, and more transmission media can be selected, such as unshielded Category 5 twisted pair, plastic optical fiber, and glass optical fiber.
(4) Supports plug-and-play, and devices can be added or deleted from the IEEE1394 network at any time.
(5) Hot-swappable, devices can be added and removed without powering off the system.
(6) Supports two types of transactions, including isochronous and asynchronous transactions.
(7) Topology: devices use a tree or daisy chain topology, and each bus can connect up to 63 devices.
(8) Fair arbitration: isochronous transmission has a higher priority, while asynchronous transmission can also obtain fair access to the bus.

2 Basic structure of IEEE1394b driver

The Unibrianl394 driver stack adopts a top-down architecture. The core of this stack is the 1394 class driver, which completes all 1394 transactions and provides all services required by the application. This 1394 class driver is the class driver in the WDM driver. Figure 1 shows the Unibrianl394 driver stack.

a.JPG

3 Implementation of IEEE1394b Driver

3.1 Driver Entry Point

The first thing to do when using FireAPI is to call C1394Initialize. C1394Initialize performs all necessary actions for 1394 initialization support. This function checks whether the FireAPI driver stack has been fully installed, whether the corresponding driver has been started, and initializes the internal structure required by the driver stack.

3.2 How to open the device

When one or more devices are added or deleted from the 1394 bus, the physical device address will be automatically reconfigured to support plug-and-play features. At this time, the physical ID of the device will be reallocated and the node number of the device may change. However, 1394 requires that each node must have a globally unique identifier GUID, which is stored in Bus_Into_Block. It is unique and unchanged throughout the life of the device. Therefore, when the device handle is opened in the program according to the device's GUID, there is no need to worry about bus reset and physical ID changes during transmission.

4 IEEE1394b specific communication mechanism

The IEEE1394 serial bus supports two types of transmission: asynchronous transmission and isochronous transmission.

(1) Asynchronous transmission: Asynchronous transmission uses a certain physical address to point to a certain node to complete read, write, and lock operations. The request and response mechanism is used to ensure the correctness of data transmission.

(2) Isochronous transmission: Isochronous transmission is a type of transmission that does not require confirmation of data. It mainly emphasizes the real-time nature of the transmitted data. Isochronous transmission uses a 6-bit channel number to identify one or more devices. It sends data at fixed time intervals (125 ms), so a fixed bus bandwidth must be allocated, and it has a higher priority than asynchronous transmission. The maximum bandwidth used by isochronous transmission is 80% of the total bandwidth.

4.1 IEEE1394b asynchronous transmission

The main steps of asynchronous transmission are as follows:

(1) Set the transmission speed. The maximum speed supported by 1394b is 800 Mb·s-1. The driver can set the speed between nodes through C1394GetMaxSpeedToNode or 1394Get-MaxSpeedBetweenNodes immediately after the bus is reset.

(2) Set the maximum packet length. The maximum packet length supported by 1394b at S800 speed is 4096 bits. The maximum packet length can be set through C1394GetMaxPayloadForSpeed ​​and C1394GetMaxPayloadF-orMaxRec.

(3) Set the bandwidth. It should be noted that the bandwidth depends not only on the size of the packet, but also on the transmission rate between nodes. When the transmission rate increases, the required bandwidth will decrease.

(4) Asynchronous reading/writing. Asynchronous transmission is divided into blocking calls and non-blocking calls. C1394ReadNode/C1394WriteNode is a blocking call, which returns only after the read or write transaction is completed (including sending request data packets, checking confirmation, waiting for response or timeout). C1394ReadNodeAsynch/C1394WriteNodeAsynch is a non-blocking call. Non-blocking calls save more time and resources than blocking calls.

4.2 IEEE1394b isochronous transmission mechanism

Different from asynchronous transmission, isochronous transmission emphasizes the real-time nature of data. Isochronous transmission is based on time slices.

The steps to establish isochronous transmission are: (1) Set the transmission rate, the maximum is 800 Mb·s-1. (2) Set the bandwidth. (3) Allocate isochronous channels. (4) Allocate isochronous resources. (5) Process isochronous transactions. (6) Release resources after completion.

Sometimes the application does not send only one isochronous request, so the adapter channel has to process the next request, and the program also has to process the result of the previous request. This ensures that no data packets are lost during isochronous reception. At this time, the isochronous request queue is used to complete it. The kernel mode API has two isochronous processing models, queue-completion and immediate-completion. The driver can use any of them, and can mix them if necessary. In user mode, there are some restrictions on the operation mode, and direct callback is not possible. Applications usually use the queue-completion mode to process all isochronous requests. Figures 2 and 3 are the processing flow charts of the queue-completion and immediate-completion models, respectively.

b.JPG

c.JPG

5 Conclusion

The development of IEEE1394b driver was introduced, and device driver and application program were developed on this basis, and 1394 networking platform was established. The experiment proved that the interconnection and transmission were realized, and the system could work at a rate of 800 Mb·s-1, achieving the predetermined goal.

Reference address:Design of Bidirectional Transmission Device Driver Based on IEEE1394b

Previous article:Understanding Hot Swap Technology: Example of Hot Swap Protection Circuit Design Process
Next article:Optocoupler linearization and application of linear optocoupler devices

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号