The invention relates to the field of data communication in a digital system. More specifically, the invention relates to methods or protocols for transferring information on a serial bus.
The Universal Serial Bus protocol (“USB”) provides a standard for communicating with up to 127 devices using a single, standardized communication scheme, and operates under several versions. USB 1.1 is capable of transmission speeds of 1.5 Megabits per second (“Mbps”) (a “low-speed” bus) and 12 Mbps (a “full-speed” bus, and together with a low speed bus, a “full-/low-speed” bus). USB 2.0 transmits data at 480 Mbps (a “high-speed” bus), approximately forty times faster than USB 1.1. USB 2.0 defines a multiple speed signaling environment where a single high-speed bus may support one or more full-/low-speed busses through a transaction translator (“TT”) in a USB 2.0 hub.
Under this scheme, system software (the “host controller driver” or “HCD”) must allocate and manage the bandwidth of the subordinate full-/low-speed busses. The HCD defines a single data structure (an “interrupt queue head” or “IQH”) to represent and manage traffic to a particular interrupt endpoint (a transaction between the host and a remote device) behind a given TT. The period of service for each IQH (e.g., 1, 2, 4, 8, 16 . . . 225 Ms) is defined by the pattern of access by system hardware (the “host controller”). Each time the host controller visits an IQH, the host controller may issue another request to the remote device. The HCD controls the host controller's access to an IQH by setting up a tree structure of IQHs (the “interrupt tree”) connected to the host controller's frame list. The frame list is a data structure of pointers that direct the host controller to the first work item in the frame's interrupt tree for the current micro-frame, and is accessed by the host controller on a frame-by-frame basis. Because of the difference in speed between the high-speed and full-/low-speed busses, the TT requires multiple transactions on the high-speed bus to complete a single transaction on the full-/low-speed bus. These transactions, depending on the position in the classic frame, may require the host controller to visit an IQH in consecutive millisecond frames. Currently, the only position in the interrupt tree that is accessible from consecutive frames is the position at period one.
When an IQH is promoted to period one, i.e., period promotion, it consumes at least N times more bandwidth than when operating at its normal period (where N is the normal period of the device, typically 8). This increased bandwidth usage limits the number of devices that can operate behind a TT. This can result in common remote devices coupled with the TT, for example, conferencing cameras, speakers, keyboards, and mice, not operating properly.
Embodiments of the invention may be best understood by referring to the following description and accompanying drawings that illustrate such embodiments. The numbering scheme for the Figures included herein are such that the leading number for a given element in a Figure is associated with the number of the Figure. For example, host 100 can be located in
In the drawings:
A method and apparatus for generating, initializing, and scheduling of two interrupt queue heads to represent a single endpoint are described. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be evident, however, to one skilled in the art that the present invention may be practiced without these specific details. For example, embodiments of the present invention are described in relation to the USB 2.0 and USB 1.1 standards; however, embodiments of the present invention may be implemented in another serial bus environment.
As illustrated in
Chipset 120 for one embodiment comprises memory controller hub (“MCH”) 130, input/output (“I/O”) controller hub (“ICH”) 140, and firmware hub (“FWH”) 170. MCH 130, ICH 140, and FWH 170 may each comprise any suitable circuitry and for one embodiment is each formed as a separate integrated circuit chip. In other embodiments, chipset 120 may comprise any suitable one or more integrated circuit devices.
MCH 130 may comprise any suitable interface controllers to provide for any suitable communication link to processor bus 110 and/or to any suitable device or component in communication with MCH 130. MCH 130 for one embodiment provides suitable arbitration, buffering, and coherency management for each interface.
MCH 130 is coupled with processor bus 110 and provides an interface to processor(s) 102 and 104 over processor bus 110. Processor 102(s) and/or 104 may alternatively be combined with MCH 130 to form a single chip. In one embodiment, MCH 130 also provides an interface to main memory 132 and graphics controller 134, each of which are coupled with MCH 130. Main memory 132 stores data and/or instructions, for example, for host 100 and may comprise any suitable memory, for example, a dynamic random access memory (“DRAM”). Graphics controller 134 controls the display of information on display 136, for example, a cathode ray tube (“CRT”) or liquid crystal display (“LCD”) coupled with graphics controller 134. MCH 130 for one embodiment interfaces with graphics controller 134 through an accelerated graphics port (“AGP”). Graphics controller 134 for one embodiment may alternatively be combined with MCH 130 to form a single chip.
MCH 130 is also coupled with ICH 140 to provide access to ICH 140 through a hub interface. ICH 140 provides an interface to I/O devices or peripheral components for host 100. ICH 140 may comprise any suitable interface controllers to provide for any suitable communication link to MCH 130 and/or to any suitable device or component in communication with ICH 140. ICH 140 for one embodiment provides suitable arbitration and buffering for each interface.
For one embodiment, ICH 140 provides an interface to one or more suitable integrated drive electronics (“IDE”) drive(s) 142, for example, a hard disk drive (“HDD”) or compact disc read only memory (“CD ROM”) drive, to store data and/or instructions one or more suitable universal serial bus (“USB”) devices through one or more USB port(s) 144, audio coder/decoder (“codec”) 146, or modem codec 148. In one embodiment, ICH 140 also provides an interface through super I/O controller 150 to keyboard 151, mouse 152, one or more suitable devices, for example, a printer, through one or more parallel ports(s) 153, one or more suitable devices through one or more serial port(s) 154, and floppy disk drive 155. ICH 140 for one embodiment further provides an interface to one or more suitable peripheral component interconnect (“PCI”) devices coupled with ICH 140 through one or more PCI slot(s) 162 on a PCI bus and an interface to one or more suitable industry standard architecture (“ISA”) devices coupled to ICH 140 by the PCI bus through ISA bridge 164. ISA bridge 164 interfaces with one or more ISA devices through one or more ISA slot(s) 166 on an ISA bus.
ICH 140 is also coupled with FWH 170 to provide an interface to FWH 170. FWH 170 may comprise any suitable interface controller to provide for any suitable communication link to ICH 140. FWH 170 for one embodiment may share at least a portion of the interface between ICH 140 and super I/O controller 150. FWH 170 comprises a basic input/output system (“BIOS”) memory 172 to store suitable system and/or video BIOS software. BIOS memory 172 may comprise any suitable non-volatile memory, for example, a flash memory.
Additionally, host 100 includes enhanced host controller interface unit 114. In an embodiment enhanced host controller interface unit 114 includes host controller unit 112, which is coupled with processor bus 110. In another embodiment, host controller unit 112 is a PCI device that is coupled with the PCI bus. In an embodiment, host controller unit 112 is a USB 2.0 host controller. Enhanced host controller interface unit 114 can provide a hardware/software interface between software executing within system 100 and host controller unit 114. In an embodiment, host controller unit 112 can transmit bits of data to and receive bits of data from high-, full-, and low-speed remote devices through USB port(s) 144.
Accordingly, host 100 includes a machine-readable medium on which is stored a set of instructions (i.e., software) embodying any one, or all, of the methodologies described above. For example, software can reside, completely or at least partially, within main memory 132 and/or within processors 102 and 104. For the purposes of this specification, the term “machine-readable medium” shall be taken to include any mechanism that provides (i.e., stores and/or transmits) information in a form readable by a machine (e.g., a computer). For example, a machine-readable medium includes read only memory (“ROM”), random access memory (“RAM”), magnetic disk storage media, optical storage media, flash memory devices, and electrical, optical, acoustical, or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.) etc.
Description of the Relationship Between Host 100 and Hub 202
Hub 202 comprises repeater unit 226 and transaction translator unit 228, such that repeater unit 226 is coupled with transaction translator unit 228 via high-speed bus 240. In an embodiment, repeater unit 226 is coupled with host controller unit 112, high-speed device 214, and high-speed device 212, via high-speed busses 230, 232, and 234, respectively. In an embodiment, high-speed busses 230, 232, 234, and 240 are busses operating in a high-speed signaling environment that follow the USB 2.0 standard, which can transmit data at 480 Mbps. In an embodiment, high-speed devices 214 and 212 are a video camera and an external hard drive, respectively; however, embodiments of the present invention are not so limited, as other embodiments may comprise different types of high-speed remote devices. In an embodiment, transaction translator unit 228 is coupled with full-speed device 208 and low-speed device 210, via full-/low-speed busses 238 and 236 respectively. In an embodiment, full-/low-speed busses 238 and 236 are busses operating in a full-/low-speed signaling environment that follow the USB 1.1 standard, which can transmit data at 1.5 Mbps (for low-speed devices) and 12 Mbps (for full-speed devices). In an embodiment, full-speed device 208 is a flash reader, and low-speed device 210 is a mouse; however, embodiments of the present invention are not so limited, as other embodiments may comprise different types of full- and low-speed remote devices.
Transaction translator unit 228 includes the mechanisms that support full- and low-speed remote devices behind hub 202, while transmitting remote device data between host 100 and hub 202 at high-speed. In an embodiment, transaction translator unit 228 includes a number of buffers to store start- and complete-split transactions transmitted from host 100 to a remote device coupled with hub 202 (discussed in more detail below). In an embodiment, repeater unit 226 forwards high-speed signals to and from high-speed devices 214 and 212. Embodiments of the present invention are not limited to the number of high-, full-, and low-speed remote devices and busses as shown in
In an embodiment, host controller unit 112 transmits bits of data from host 100 to transaction translator unit 228 (intended for full-speed device 208 and low-speed device 210), via high-speed busses 230 and 240. In a further embodiment, the bits of data represent the execution of an endpoint, i.e., a particular transaction with one of the remote devices. Transaction translator unit 228 transmits these bits of data to the appropriate remote device, e.g., full-speed device 208 or low-speed device 210. The remote device can transmit bits representing the further execution of the endpoint to transaction translator unit 228 via a full-/low-speed bus. Transaction translator unit 228 can transmit those bits to host 100 via high-speed busses 240 and 230. In another embodiment, a remote device, such as full-speed device 208 or low-speed device 210, transmits bit of data to transaction translator unit 228 via a full-/low-speed bus. Transaction translator unit 228 then transmits the bits of data to host 100 via high-speed busses 240 and 230. Host 100 can transmit bits representing the further execution of the endpoint to transaction translator unit 228 via high-speed busses 230 and 240. Transaction translator can transmit those bits to the remote device via a full-/low-speed bus.
Split ISO TDs list 340 is a list of split isochronous transfer descriptors (“split ISO TDs”) that are executed by host controller unit 112 before interrupt endpoints within a particular micro-frame. Examples of remote devices requiring split ISO TDs transactions are USB cameras and speakers behind a hub; however embodiments of the present invention are not so limited, as a different type of remote device may require split ISO TDs transactions. As illustrated, split ISO TDs list 340 includes split ISO TDs 342–356, which stem from frames 0–7 in frame list 302, respectively.
In an embodiment, interrupt tree 342 is a data structure comprising interrupt queue heads (“IQHs”) 304–338. Primary 308 and secondary 310 are also interrupt queue heads included within interrupt tree 342, and are discussed in more detail in connection with
Because of the difference in speed between the high-speed and full-/low-speed busses, transaction translator unit 228 requires multiple transactions on the high-speed busses to complete a single transaction on a full-/low-speed bus. These transactions, depending on the position in interrupt tree 342, may require host controller unit 112 to visit an IQH in consecutive frames. Currently, the only position in interrupt tree 342 that is accessible from consecutive frames is the position at period one (e.g., IQH 322 is scheduled in period one). In such a situation, host controller driver unit 224 may promote the IQH to period one. When an IQH is promoted to period one, i.e., period promotion, it consumes at least N times more bandwidth than when operating at its normal period (where N is the normal period of the device, for example 8). This increased bandwidth usage limits the number of remote devices that can operate behind transaction translator unit 228. This can result in common remote devices, like conferencing cameras, speakers, keyboards, and mice, not working.
For example, for a high-speed endpoint, host controller unit 112 will visit an IQH, execute a high-speed transaction (if criteria are met), and advance the transfer state (or not), depending on the results of the entire transaction. For full-/low-speed endpoints, the details of the execution phase are different, i.e., it takes more than one bus transaction to complete, but the remainder of the operational framework is intact. This means that the transfer advancement, etc. occurs on the completion of a split transaction. For example, in a first micro-frame, host controller unit 112 can issue one start-split, wait one micro-frame, and issue three complete-splits in three subsequent micro-frames.
Specifically,
In cases three through five, where the high-speed transaction is scheduled to begin at bus frames three through five, respectively, the final complete-split necessary to ensure completion of the transaction is not guaranteed to be issued within the frame (H-frame zero of the next frame in case three; H-frame one of the next frame in case four; and H-frame two of the next frame (not pictured) in case five).
When transaction translator unit 228 receives an interrupt start-split transaction, it stores the packet. In this fashion, transaction translator unit 228 accumulates some number of start-split transactions for a following micro-frame. At the beginning of the next micro-frame, these transactions are available to be issued by transaction translator unit 228 on a downstream full-/low-speed busses in the order that they were stored. Transaction translator unit 228 issues each transaction on a downstream facing full-/low-speed bus. The remote device responds to the full-/low-speed transaction with an appropriate handshake, and transaction translator unit 112 stores the results of the transaction (in an embodiment: data, NAK, STALL, trans_err, etc.).
In the following micro-frames, host controller unit 112 issues high-speed complete-split transactions to retrieve the data/handshake from transaction translator unit 228. For an interrupt IN transaction, i.e., host controller unit 112 is requesting data from a remote device, when transaction translator unit 228 receives a complete-split transaction from host controller unit 112, it returns to host controller unit 112 whatever data it has received during a micro-frame. If the full-/low-speed transaction was started and completed in a single frame (i.e., begun in micro-frames 0–2), transaction translator unit 228 returns all of the data for the transaction in the complete-split response occurring in the following micro-frame. Previously, as discussed in connection with
Interrupt OUT split transactions (i.e., host controller unit 112 is transmitting data to a remote device) are scheduled by host controller unit 112 as normal high-speed transactions with the start- and complete-splits scheduled as described previously. When there are several full-/low-speed transactions allocated for a given micro-frame, they are stored by transaction translator unit 228. The start-splits are saved in the order that they are received until the end of the micro-frame. At the end of the micro-frame, these transactions are available to be issued by transaction translator unit 228 on the full-/low-speed busses in the order that they were received.
In a following micro-frame, transaction translator unit 228 issues the transactions that had been stored on the downstream facing full-/low-speed busses. Some transactions could be leftover from a previous micro-frame because the high-speed schedule was built assuming best case bit stuffing, and the full-/low-speed transactions could be taking longer on the full-/low-speed busses. As transaction translator unit 228 issues transactions on the downstream facing full-/low-speed busses, it receives and stores the results in the periodic complete-split pipeline stage and then advances to the next transaction in the start-split pipeline. In a following micro-frame, host controller unit 112 issues a high-speed complete-split transaction and transaction translator unit 228 responds appropriately.
Operation of Host Controller Unit 112 and Host Controller Driver Unit 224
Certain operations of host controller unit 112 and host controller driver unit 224 will now be described in conjunction with the flow diagrams of
Flow diagram 501 of
If not, host controller driver unit 224 determines whether the IQH being polled has sufficient micro-frames available to complete the endpoint that it represents, at decision block 504. If so, host controller unit 112 will execute the IQH as scheduled when host controller unit 112 next visits the IQH, at process block 526, the flow diagram then returns to process block 502, and the process repeats itself. In an embodiment, split ISO TDs 342–356 (as illustrated in
If the IQH is not scheduled to be polled at period 4 or greater, then host controller driver unit 224 shifts to process block 512 and promotes the period of the IQH to period one, so that it may be polled during each frame of host controller schedule unit 222. Period promotion accomplishes the task of enabling an IQH to be executed and polled at every frame, but it consumes a large amount of bandwidth to promote a low-speed device to period one (as discussed in connection with
If the IQH is scheduled to begin at bus frames 3–5, then host controller driver unit 224 generates primary 308 and secondary 310, each an IQH (as discussed in connection with
At process block 516, host controller driver unit 224 initializes primary 308 and secondary 310. In an embodiment, host controller driver unit 224 sets the fields in primary 308 and secondary 310 to do a predetermined number of start- and complete-splits, depending on their start position. At process block 518, host controller driver unit 224 schedules primary 308 and secondary 310 in interrupt tree 342 such that primary 308 is to begin at and continue through the end of a set of micro-frames, and such that secondary 310 is to begin at the first micro-frame in the immediately subsequent frame. In an embodiment, split ISO TDs may be present within host controller schedule unit 222, which require host controller unit 112 to visit them first in a particular frame. In such an embodiment, secondary 310 is scheduled at the first micro-frame subsequent to the split ISO TD. At process block 520, host controller driver unit 224 sets primary 308 and secondary 310 to be polled at one-half their periods. Host controller driver unit 224 then executes process block 502, and repeats flow diagram 501.
At decision block 706, host controller driver unit 224 determines whether secondary 310 is not active and not halted. If secondary 310 is not active and not halted, host controller driver unit 224 completes the transaction from secondary 310, at process block 708, and continues processing at flow diagram 501 of
At decision block 806, host controller driver unit 224 determines whether primary 308 is not active and not halted. If primary 308 is not active and not halted, host controller unit 112 completes the transaction from primary 308 as scheduled, at process block 808, and host controller driver unit 224 continues processing at flow diagram 501 of
If host controller driver unit 224 does not detect an MDATA at decision block 810, it checks for the presence of a NAK, at decision block 822. In an embodiment, transaction translator unit 228 responds to a start- or complete-split transaction from hub controller unit 112 with a signal indicating the presence of a NAK. In such an embodiment, host controller unit 112 sets the active bit in field 408 (status) of primary 308 to one, sets the SplitXState bit in field 408 of primary 308 to do a complete-split, and sets field 424 (Total Bytes to Transfer) of primary 308 to its initial value. Upon reading such a pattern of bits in primary 308, host controller driver unit 224 can discern the presence of an NAK. If a NAK exists, host controller driver unit 224 continues processing at process block 816. Otherwise, in an embodiment, the SplitXState bit in field 408 of primary 308 may be set to do a start-split in response to a NYET signal from transaction translator unit 228, and upon reading such a pattern of bits in primary 308, host controller driver unit 224 determines whether secondary 310 is halted and not active, at decision block 828. In an embodiment, if secondary 310 is halted and not active, host controller driver unit 224 continues processing at process block 804. Otherwise, host controller driver unit 224 determines whether secondary 310 is not active and not halted, at decision block 830. If secondary 310 is not active and not halted, host controller unit 112 completes the transaction from secondary 310 as scheduled, at process block 826, and host controller driver unit 224 continues processing at flow diagram 501 of
At decision block 906, host controller driver unit 224 determines whether primary 308 is not active and not halted. If primary 308 is not active and not halted, host controller unit 112 completes the transaction from primary 308 as scheduled, at process block 908, and host controller driver unit 224 continues processing at flow diagram 501 of
If host controller driver unit 224 does not detect an MDATA at decision block 910, it checks for the presence of a NAK, at decision block 922. In an embodiment, transaction translator unit 228 responds to a start- or complete-split transaction from hub controller unit 112 with a signal indicating the presence of a NAK. In such an embodiment, host controller unit 112 sets the active bit in field 408 (status) of primary 308 to one, sets the SplitXState bit in field 408 of primary 308 to do a start-split, and sets field 424 (Total Bytes to Transfer) of primary 308 to its initial value. Upon reading such a pattern of bits in primary 308, host controller driver unit 224 can discern the presence of an NAK. If a NAK exists, host controller driver unit 224 executes process block 916. Otherwise, in an embodiment, the SplitXState bit in field 408 of primary 308 may be set to do a complete-split in response to a NYET signal from transaction translator unit 228, and upon reading such a pattern of bits in primary 308, host controller driver unit 224 determines whether secondary 310 is halted and not active, at decision block 928. If secondary 310 is halted and not active, host controller driver unit 224 executes process block 904. Otherwise, host controller driver unit 224 determines whether secondary 310 is not active and not halted, at decision block 930. If secondary 310 is not active and not halted, host controller unit 112 completes the transaction from primary 308 and secondary 310 as scheduled, at process block 926, and host controller driver unit 224 executes flow diagram 501 of
Generating, initializing, and scheduling two interrupt queue heads to represent a single full-/low-speed interrupt endpoint avoids costly period promotions. Previously, a full-/low-speed IQH that was scheduled late in a frame would have to be promoted to period one to ensure that its split transaction was completed properly. As discussed herein, using two IQHs (e.g., primary 308 and secondary 310) to represent a single full/low-speed endpoint permits scheduling of the high-speed split transaction in a greater range of bus frames, where it was limited to bus frames zero through two previously.
Thus, a method and apparatus for generating, initializing, and scheduling two interrupt queue heads to represent a single endpoint are described have been described. Although the present invention has been described with reference to specific exemplary embodiments, it will be evident that various modifications and changes may be made to these embodiments without departing from the broader spirit and scope of the invention. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense.
Number | Name | Date | Kind |
---|---|---|---|
4785394 | Fischer | Nov 1988 | A |
4792495 | Taniguchi et al. | Dec 1988 | A |
4819229 | Pritty et al. | Apr 1989 | A |
5291614 | Baker et al. | Mar 1994 | A |
5533204 | Tipley | Jul 1996 | A |
5553310 | Taylor et al. | Sep 1996 | A |
5564114 | Popat et al. | Oct 1996 | A |
5594882 | Bell | Jan 1997 | A |
5617418 | Shirani et al. | Apr 1997 | A |
5621897 | Boury et al. | Apr 1997 | A |
5630174 | Stone, III et al. | May 1997 | A |
5694555 | Morriss et al. | Dec 1997 | A |
5708794 | Parks et al. | Jan 1998 | A |
5732244 | Gujral | Mar 1998 | A |
5742847 | Knoll et al. | Apr 1998 | A |
5784581 | Hannah | Jul 1998 | A |
5819111 | Davies et al. | Oct 1998 | A |
5832492 | Wooten | Nov 1998 | A |
5838991 | Shipman | Nov 1998 | A |
5870567 | Hausauer et al. | Feb 1999 | A |
5881255 | Kondo et al. | Mar 1999 | A |
5890015 | Garney et al. | Mar 1999 | A |
5915087 | Hammond et al. | Jun 1999 | A |
5933611 | Shakkarwar | Aug 1999 | A |
5936967 | Baldwin et al. | Aug 1999 | A |
5978878 | Lange | Nov 1999 | A |
6012115 | Chambers et al. | Jan 2000 | A |
6034950 | Sauer et al. | Mar 2000 | A |
6046762 | Sonesh et al. | Apr 2000 | A |
6067591 | Howard et al. | May 2000 | A |
6069872 | Bonomi et al. | May 2000 | A |
6098134 | Michels et al. | Aug 2000 | A |
6098137 | Goodrum et al. | Aug 2000 | A |
6104708 | Bergamo | Aug 2000 | A |
6108739 | James et al. | Aug 2000 | A |
6145039 | Ajanovic et al. | Nov 2000 | A |
6205501 | Brief et al. | Mar 2001 | B1 |
6219736 | Klingman | Apr 2001 | B1 |
6243778 | Fung et al. | Jun 2001 | B1 |
6266731 | Riley et al. | Jul 2001 | B1 |
6272499 | Wooten | Aug 2001 | B1 |
6308215 | Kolbet et al. | Oct 2001 | B1 |
6353866 | Fensore et al. | Mar 2002 | B1 |
6366590 | Hu | Apr 2002 | B1 |
6389029 | McAlear | May 2002 | B1 |
6483839 | Gemar et al. | Nov 2002 | B1 |
6505263 | Larson et al. | Jan 2003 | B1 |
6515965 | Hou et al. | Feb 2003 | B1 |
6587053 | Lee | Jul 2003 | B1 |
6600739 | Evans et al. | Jul 2003 | B1 |
6678761 | Garney et al. | Jan 2004 | B1 |
6701399 | Brown | Mar 2004 | B1 |
6771664 | Garney et al. | Aug 2004 | B1 |
6792495 | Garney et al. | Sep 2004 | B1 |
6813251 | Garney et al. | Nov 2004 | B1 |
6889265 | Garney et al. | May 2005 | B1 |
20030005182 | Leete et al. | Jan 2003 | A1 |
20040008684 | Garney et al. | Jan 2004 | A1 |
20040268010 | Garney et al. | Dec 2004 | A1 |
Number | Date | Country |
---|---|---|
09044443 | Feb 1997 | JP |
WO 00 49507 | Aug 2000 | WO |
WO 01 08018 | Feb 2001 | WO |
Number | Date | Country | |
---|---|---|---|
20030061424 A1 | Mar 2003 | US |