Ultra-high-speed universal serial bus control method and computer system implementing the same
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- VIA TECH INC
- Filing Date
- 2022-08-26
- Publication Date
- 2026-06-02
Smart Images

Figure CN115422113B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to control technology for Ultra High Speed Universal Serial Bus (USB 3.0) and supports UASP (Universal Serial Bus Attached Small Computer System Interface Protocol) devices. Background Technology
[0002] USB 3.0 supports UASP devices, which use a stream protocol that allows devices to perform bulk transfers, significantly improving system performance.
[0003] However, optimizing such batch transmission capabilities requires considerable resources to manage the operational status of each endpoint on the device. How to achieve maximum efficiency with minimal resources is an important challenge in this technical field. Summary of the Invention
[0004] This application provides an ultra-high-speed universal serial bus control technology.
[0005] A computer system implemented according to one embodiment of this application includes an interface controller. The interface controller has a cache space storing an endpoint list and runs logic to dynamically add and delete endpoints from the endpoint list. When the interface controller receives an unready data packet from a first streaming endpoint, it records the first streaming endpoint in the endpoint list. Upon the issuance of the unready data packet, a first streaming state machine of the first streaming endpoint switches to an idle state, waiting to enter a ready-to-transmit state. When the endpoint list records the first streaming endpoint, the interface controller skips switching the first streaming state machine from the idle state to a pipeline state. After all target transmissions of the first streaming endpoint are completed, the interface controller deletes the first streaming endpoint from the endpoint list.
[0006] In one implementation, the interface controller checks the endpoint list upon receiving an endpoint action doorbell directed at the first streaming endpoint. If the endpoint list does not yet record the first streaming endpoint, the interface controller provides a notification packet to the first streaming endpoint, causing the first streaming state machine to enter the main pipeline state and send the not-ready data packet to the interface controller.
[0007] In one embodiment, multiple endpoint operation doorbells targeting the first streaming endpoint carry multiple tag values, indicating multiple target transmissions of the first streaming endpoint. The first streaming state machine, in its idle state, switches to a pre-transmission state based on a ready data packet sent by the first streaming endpoint corresponding to a target tag value, and then switches to a transmission state, allowing a target transmission represented by the target tag value to be completed through interaction between the first streaming endpoint and the interface controller, causing the first streaming state machine to switch back to the idle state. The interface controller, upon the first streaming endpoint informing that the target transmission represented by the target tag value is complete, determines whether any target transmissions for any tag values of the first streaming endpoint are incomplete. If all are complete, the interface controller removes the first streaming endpoint from the endpoint list.
[0008] In one embodiment, the interface controller further stores a task status annotation in the cache space, providing the first streaming endpoint with a first set of bits corresponding to multiple tag values. Each bit is normally in a first state. When the corresponding tag value is configured to indicate a target transmission, the interface controller switches to a second state until the target transmission is completed, at which point it switches back to the first state. The interface controller determines that all target transmissions of the first streaming endpoint are complete based on the first set of bits, all of which are in the first state.
[0009] Another implementation method realizes the concept of this application as an ultra-high-speed universal serial bus control method.
[0010] The following detailed description of the invention is illustrated with specific examples and accompanying drawings. Attached Figure Description
[0011] Figure 1 The diagram is a block diagram illustrating a computer system according to one embodiment of this application, which supports a UASP device (USB 3.0 device).
[0012] Figure 2 A streaming state machine for data input endpoint 108;
[0013] Figure 3 The timing diagram illustrates the operation using a read operation as an example.
[0014] Figure 4 This is a flowchart illustrating an operation flow of an interface controller 118 according to one embodiment of this application, which involves the operation of logic 122, explaining how the interface controller 118 establishes the endpoint list 120; and
[0015] Figure 5 This is a flowchart illustrating an operation flow of an interface controller 118 according to one embodiment of this application, which involves the operation of logic 122, explaining how the interface controller 118 applies the endpoint list 120 and dynamically deletes or removes the contents of the endpoint list 120.
[0016] [Symbol Explanation]
[0017] 100: Host
[0018] 102: UASP (Universal Serial Bus Additional Small Computer System Interface Protocol) device
[0019] 104: Command endpoint
[0020] 106: Data Output Endpoint
[0021] 108: Data Input Endpoint
[0022] 110: State endpoint
[0023] 112: Operating System (OS)
[0024] 114: Protocol Driver (UAS driver)
[0025] 116: Interface driver (xHCI driver)
[0026] 118: Interface Controller (xHCI controller)
[0027] 119: Cache space
[0028] 120: Endpoint List
[0029] 122: Logic for dynamically adding and deleting lists
[0030] 124: Task Status Notes
[0031] 300: Read command
[0032] 302, 304, 306, 308: Packet groups
[0033] Disabled: Energy removal state
[0034] DP(Cmd, CIU), DP(Data-in), DP(Stat, SIU): Command, Data, and Status Packets
[0035] ERDY, ERDY(Data-in), ERDY(Stat): Ready data packets
[0036] Idle: Inactive
[0037] ITr(Stat), ITr(Data-in), OTr(Cmd, CIU), OTc(Cmd), ITc(Data-in), ITc(Stat, SIU): Requirements
[0038] InACK(Data-in, Prime), InACK(Stat, Prime), ACK(Cmd), InACK(Data-in), InACK(Stat), ACK(Stat): Notification packets
[0039] MoveData: Transfer Status
[0040] NRDY, NRDY(Data-in, Prime), NRDY(Stat, Prime): Not ready data packets
[0041] PrimePipe: Main Pipeline Status
[0042] S402…S410、S502…S510: Steps
[0043] StartStream: Ready to transmit Detailed Implementation
[0044] The following description illustrates various embodiments of the present invention. This description introduces the basic concepts of the invention and is not intended to limit its scope. The actual scope of the invention should be defined in accordance with the claims.
[0045] Figure 1 This is a block diagram illustrating a computer system that supports UASP devices (USB 3.0 devices) according to one embodiment of this application. As shown, a host 100 can connect to multiple UASP devices.
[0046] Taking the USAP device 102 as an example, it includes a command endpoint 104, a data-out endpoint 106, a data-in endpoint 108, and a status endpoint 110. The command endpoint 104 allows the host 100 to perform non-streaming bulk output of commands. Unlike the non-streaming design of the command endpoint 104, the data-out endpoint 106 allows the host 100 to perform bulk-out and streaming of written data, while the data-in endpoint 108 and the status endpoint 110 allow the host 100 to perform bulk-in and streaming of read data and device status. The streaming endpoints 106, 108, and 110 significantly improve the speed at which the host 100 reads and writes data to the USAP device 102.
[0047] Host 100 runs an operating system 112 that operates a protocol driver 114, which in turn drives an interface driver 116, which in turn drives an interface controller 118, controlling all endpoints on the UASP device and enabling the state machines of each endpoint to operate. This application specifically describes the control of streaming endpoints (including a data output endpoint 106, a data input endpoint 108, and a state endpoint 110); the described interface controller 118 can be implemented in a chipset. The computer system is interpreted as the interface controller 118, or a chipset including the interface controller 118, or the host 100 including the chipset, or the entire... Figure 1 Architecture.
[0048] Each streaming endpoint (data output endpoint 106, data input endpoint 108, and status endpoint 110) has a special streaming state machine. Traditional streaming endpoints, before performing multi-target transmissions, may repeatedly switch between the PrimePipe state and the Idle state, taking a considerable amount of time to return to the Idle state and wait to enter a pre-transmission state, StartStream. In this application, the interface controller 118 manages an endpoint list 120 in a buffer space 119, directly marking enabled streaming endpoints (all are recorded as soon as they enter the Idle state), thus eliminating the time-consuming switching between the PrimePipe state and the Idle state in its streaming state machine. In particular, the logic 122 running on the interface controller 118 has the ability to dynamically add and delete entries from the list. The logic 122 can be implemented by circuits and / or program code. The logic 122 not only adds newly enabled streaming endpoints to the endpoint list 120 but also removes streaming endpoints that have completed all target transmissions from the endpoint list 120. In this way, the endpoint list 120 is of a moderate size, which can save cache space.
[0049] The endpoint list 120 may be stored in multiple registers. In one embodiment, a streaming endpoint is annotated in the endpoint list 120 with 4B data, which may include the device number Slot# and the device endpoint number EP#.
[0050] In one implementation, the interface controller 118 further manages a task status note 124 in the cache space 119. Logic 122 can refer to the task status note 124 to determine whether a target streaming endpoint has completed all its target transmissions, and can then remove it from the endpoint list 120. The task status note 124 may also be stored in a register.
[0051] Figure 2The streaming state machine for data input endpoint 108 includes a Disabled state, a PrimePipe state, an Idle state, a StartStream state, and a MoveData state. Similar streaming state machines exist for data output endpoint 106 and state endpoint 110, which also use streaming transmission.
[0052] Traditional technologies, when handling multi-segment target transmissions, repeatedly switch the streaming state machine between the PrimePipe state and the Idle state. This application successfully reduces the frequency of switching between the PrimePipe state and the Idle state in the streaming state machine with low hardware cost.
[0053] According to the design of this application, after a streaming endpoint sends an unready data packet (NRDY), the streaming endpoint is recorded to control its streaming state machine to remain in the idle state as much as possible, waiting for ready data packets (ERDY) to be sent for each target transmission segment. The ready data packet (ERDY) will cause the streaming state machine to switch to the start-up state (StartStream) and the move-up state (MoveData) to complete the corresponding target transmission segment. Once all target transmissions for this streaming endpoint are completed, the control of this streaming endpoint ends, making the control cost reasonable.
[0054] The following explanation uses a read operation as an example. Figure 3 Diagram illustrating the operation sequence.
[0055] When the operating system 112 requests to read from the UASP device 102, it issues a data-in transfer command 300, informing the protocol driver 114 of a read address and a read size. The protocol driver 114 issues requests Itr(Stat), Itr(Data-in), and Otr(Cmd, CIU) to the interface driver 116, causing the interface driver 116 to drive the interface controller 118. Requests Itr(Stat) and Itr(Data-in) are used to configure the host hardware, preparing it to receive responses from the UASP device 102 (e.g., Sensing Information Unit (SIU)) and to read data. Request Otr(Cmd, CIU) is sent last and is used to transmit the command information unit (CIU).
[0056] The following discussion addresses how the streaming state machines of data input endpoint 108 and state endpoint 110 respond to the read instruction 300.
[0057] First, let's discuss data input endpoint 108. Based on the requirement Itr(Data-in), interface controller 118 generates a notification packet InAck(Data-in, Prime), causing the streaming state machine of the data input pipe to... Figure 2 Upon entering the PrimePipe state, the host 100 notifies the UASP device 102 that it is ready to receive read data from the UASP device 102. In response to this notification packet InAck(Data-in, Prime), the UASP device 102 responds with an incomplete packet NRDY(Data-in, Prime), causing the streaming state machine to switch from the PrimePipe state to the Idle state, facilitating a transition to the StartStream state. See also... Figure 1 At this point, the interface controller 118 adds the data input endpoint 108 to the endpoint list 120 using logic 122, indicating that the streaming state machine of the data input endpoint 108 has been set to the PrimePipe state and then the Idle state.
[0058] This section discusses state endpoint 110. Based on the requirement Itr(Stat), interface controller 118 generates a notification packet InAck(Stat, Prime), enabling the streaming state machine of the status pipe (similar to...) Figure 2 Upon entering the PrimePipe state, the host 100 notifies the UASP device 102 that it is ready to receive responses from the UASP device 102 (e.g., a Sensor Information Unit, SIU). In response to this notification packet InAck(Stat, Prime), the UASP device 102 responds with an inactive data packet NRDY(Stat, Prime), causing the streaming state machine to switch from the PrimePipe state to the Idle state, facilitating the transition to the StartStream state for transmission. See also... Figure 1 At this point, the interface controller 118 adds state endpoint 110 to the endpoint list 120 using logic 122, indicating that the streaming state machine of state endpoint 110 has been set to the PrimePipe state and then the Idle state.
[0059] After the streaming state machines of the data input pipeline and the state pipeline are indeed in the Idle state, according to the request Otr(Cmd, CIU), the interface controller 118 generates a command packet DP(Cmd, CIU) and transmits a command information unit CIU. Upon receiving the command packet DP(Cmd, CIU), the UASP device 102 responds with a notification packet ACK(Cmd) to indicate successful reception of the command information unit CIU. The interface controller 118 reports back to the interface driver 116 and the protocol driver 114 along with the request OTc(Cmd). Since the interface controller 118 is a non-streaming endpoint, it is not necessary to fill in the endpoint list 120.
[0060] In particular, the data requested by read instruction 300 can be divided into several segments for reading. For example, the 10K data requested by read instruction 300 can be divided into 10 segments, each 1K long.
[0061] In a conventional design, packet group 302, used for initial setup of data input endpoint 108 and status endpoint 110, is repeated 10 times. Subsequently, packet group 304, used for instruction transmission, is also repeated 10 times. Packet groups 302 / 304 read from different segments are distinguished by different tag values. One implementation is to assign a streaming ID (SID) to the packets, the value of which is set to the corresponding tag value. In particular, regarding streaming endpoints, the repeated execution of packet group 302 causes the streaming state machines of the data input pipeline and status pipeline to frequently switch between the PrimePipe state and the Idle state.
[0062] However, using the technology of this application, when packet group 302 is executed for the first time, endpoint list 120 will be marked with data input endpoint 108 and status endpoint 110, indicating that the streaming state machines of data input endpoint 108 and status endpoint 110 have been set to the PrimePipe state and then the Idle state. By querying the endpoint list 120, interface controller 118 can avoid switching the streaming state machines of data input endpoint 108 and status endpoint 110 from the Idle state to the PrimePipe state again. Therefore, packet group 302 of this application will not be executed repeatedly, and its packets do not need to carry tag values. Only packet group 304 for non-streaming endpoint communication is executed repeatedly. System performance is greatly improved.
[0063] Having completed the aforementioned steps, each endpoint has finished the preliminary steps for reading data. The data transmission process will now begin.
[0064] UASP device 102 generates a ready data packet ERDY(Data_in) to notify interface controller 118 that UASP device 102 is ready to transmit read data for a certain tag value. Based on the ready data packet ERDY(Data_in), the streaming state machine of the data input pipeline switches from the idle state to the ready-to-transmit state StartStream.
[0065] Upon receiving the ready data packet ERDY(Data_in), the interface controller 118 sends a notification packet InAck(Data-in) to the UASP device 102. Based on the notification packet InAck(Data-in), the streaming state machine of the data input pipeline switches from the ready-to-transmit state StartStream to the transmit state MoveData, and begins transmitting and reading data. The UASP device 102 then sends out a data packet DP(Data-in).
[0066] Upon receiving the corresponding data packet DP (Data-in), the interface controller 118 sends a notification packet InAck (Data-in) to the UASP device 102, indicating successful reception of the data read packet. After multiple interactions between packets DP (Data-in) and InAck (Data-in), the tag value representing the completion of the data read transmission is determined. The interface controller 118 then requests ITc (Data-in) and reports back to both the interface driver 116 and the protocol driver 114. The streaming state machine of the data input pipeline returns to the idle state.
[0067] Taking the aforementioned 10 reads of 1K segments each as an example, packet group 306 will be repeated 10 times, each corresponding to a tag value. Each packet is identified by a stream-coded (SID) tag value.
[0068] In particular, after all segments of read data have been transmitted (after repeating packet group 306), the interface controller 118 will remove the data input endpoint 108 from the endpoint list 120 using logic 122, thereby optimizing the utilization of the buffer space 119. In one embodiment, the task status annotation 124 has 32 bits provided for the data input endpoint 108, each corresponding to the transmission of read data for a tag value. Each bit is normally 1. A value of 0 indicates that the read data for that tag value has not yet been transmitted. If all 32 bits are 1, the interface controller 118 determines that all segments of read data for the data input endpoint 108 have been transmitted and removes the data input endpoint 108 from the endpoint list 120.
[0069] After all segmented data transmissions are completed, the UASP device 102 sends a ready data packet ERDY(Stat) to notify the interface controller 118 that the UASP device 102 is ready to transmit the Sensor Information Unit (SIU) through the state pipeline. The ready data packet ERDY(Stat) also has an identifier value. Based on the ready data packet ERDY(Stat), the streaming state machine of the state pipeline switches from the idle state to the ready-to-transmit state StartStream.
[0070] In response to the ready data packet ERDY(Stat), the interface controller 118 sends a notification packet InAck(Stat) to the UASP device 102. Based on the notification packet InAck(Stat), the streaming state machine of the state pipeline switches from the ready-to-transmit state StartStream to the transmit state MoveData, generating a state packet DP(Stat, SIU) to transmit the sensing information unit SIU. In response to the state packet DP(Stat, SIU), the interface controller 118 generates a notification packet ACK(Stat), indicating successful reception of the sensing information unit SIU. The streaming state machine of the state pipeline then returns to the idle state.
[0071] Taking the aforementioned 10 1K reads of each segment as an example, packet group 308 will be repeated 10 times, each corresponding to a tag value. Each packet is identified by a stream-coded (SID) tag value.
[0072] In particular, after all segmented device status transmissions are completed (after repeating packet group 308), the interface controller 118 will remove status endpoint 110 from endpoint list 120 using logic 122, thus optimizing the utilization of buffer space 119. In one embodiment, task status annotation 124 has 32 bits provided for status endpoint 110, each corresponding to the status transmission of a tag value. Each bit is normally 1. A value of 0 indicates that the tag value status has not yet been transmitted. If all 32 bits are 1, the interface controller 118 determines that the status transmission of all segments of status endpoint 110 is complete and removes status endpoint 110 from endpoint list 120.
[0073] The timing of a write operation initiated by the operating system 112 with a data-out transfer command is similar to... Figure 3 The timing of read operations is also described. Similarly, a small buffer space 119 is used to achieve efficient operation of the streaming endpoints (including data output endpoint 106 and status endpoint 110).
[0074] The above streaming endpoint operation concepts can be applied to various streaming endpoints, not limited to data output endpoint 106, data input endpoint 108, and status endpoint 110.
[0075] Figure 4 This is a flowchart illustrating an operation flow of an interface controller 118 according to one embodiment of this application, which involves the operation of logic 122 and explains how the interface controller 118 establishes the endpoint list 120.
[0076] In step S402, the interface controller 118 receives the endpoint operation doorbell (ITr, or Otr), which includes the device number Slot#, the device upstream endpoint number EP#, and the tag value Stream# (# represents the number). In one embodiment, the interface controller 118 can set the bit corresponding to the tag value Stream# in the task status register 124 corresponding to the device number Slot# and the device upstream endpoint number EP# to 0, indicating that a target transmission is to be completed.
[0077] In step S404, based on the device number Slot# and the device upper endpoint number EP#, the interface controller 118 queries the endpoint list 120 to determine whether this streaming endpoint has been enabled (the main pipeline status PrimePipe and idle status Idle have been set).
[0078] If the streaming endpoint currently requesting operation is not yet enabled and is not listed in endpoint list 120, interface controller 118 sends a notification packet according to step S406, causing the streaming state machine of the streaming endpoint to switch to the PrimePipe state. Then, according to step S408, it receives the inactive data packet NRDY from the streaming endpoint. At this time, the streaming state machine switches from the PrimePipe state to the Idle state. Interface controller 118 then loads the information of this streaming endpoint (including device number Slot# and endpoint number EP# on the device) into endpoint list 120 according to step S410, recording it as an enabled endpoint. The process ends.
[0079] Conversely, if the streaming endpoint currently requiring operation is already enabled and listed in endpoint list 120, interface controller 118 skips steps S406 and S408, and the streaming state machine will not switch between the PrimePipe state and the Idle state. The streaming state machine was already in the Idle state.
[0080] Figure 5 This is a flowchart illustrating an operation flow of an interface controller 118 according to one embodiment of this application, which involves the operation of logic 122, explaining how the interface controller 118 applies the endpoint list 120 and dynamically deletes or removes the contents of the endpoint list 120.
[0081] In step S502, the interface controller 118 receives a ready data packet ERDY from a streaming endpoint (marked by device number Slot# and device endpoint number EP#), which carries a tag value Stream#. The streaming state machine enters the start-up transmission state StartStream and the transmission state MoveData along with the ready data packet ERDY, performing a target transmission indicated by the tag value Stream#. At this time, the interface controller 118 receives a packet DP from the streaming endpoint in step S504. In step S506, the interface controller 118 learns that the streaming endpoint has completed the target transmission of tag value Stream#, and sets the bit corresponding to tag value Stream# in the register corresponding to the streaming endpoint in the task status annotation 124 to 1. In step S508, the interface controller 118 determines whether the register is fully reset to the preset value 1. If so, it indicates that all target transmissions of the streaming endpoint have been completed, and the interface controller 118 follows step S510 to delete the streaming endpoint from the endpoint list 120. If not, the process will end without adjusting endpoint list 120.
[0082] By streamlining the process, this application allows the removal of streaming endpoints that have completed all target transmissions from endpoint list 120. This significantly reduces the number of registers used in endpoint list 120. For example, in UASP device 102, data output endpoint 106 and data input endpoint 108 are not simultaneously enabled. Endpoint list 120 requires at most two entries for UASP device 102: one identifying data output endpoint 106 and the other identifying status endpoint 110; or the other identifying data input endpoint 108 and the other identifying status endpoint 110. Compared to preparing registers for each of the three streaming endpoints (data output endpoint 106, data input endpoint 108, and status endpoint 110) to record the transmission progress of the target transmission, the dynamic addition and deletion technique of endpoint list 120 in this application further saves cache space 119.
[0083] Furthermore, taking a computer system supporting 32 UASP devices as an example, it's unlikely that all 32 UASP devices will be used simultaneously. For instance, most applications will only use 15 UASP devices. Endpoint list 120 is designed to handle 20 UASP devices, requiring only 20*2*4B (160B) of storage capacity. Compared to allocating 32*3*4B (=384B) of space for all streaming endpoints on all devices, the 160B endpoint list 120 makes better use of cache space.
[0084] Table 1 below illustrates the addition and deletion of endpoint list 120.
[0085]
[0086]
[0087] Table 1
[0088] Step 3: On device 0x0E, the streaming endpoint (data output endpoint) numbered 0x04 is added to endpoint list 120 as (E, 4). This indicates that the streaming endpoint (E, 4) is ready for the transmission of tag value 0x02 (Idle state), and also that the streaming endpoint (E, 4) is capable of handling the transmission requirements of tag values 0x04 (step 7) and 0x09 (step 12). Neither the requirements in steps 7 nor 12 trigger the switching between the streaming state machine's PrimePipe state and the Idle state.
[0089] Step 6: The streaming endpoint (state endpoint) numbered 0x07 on device 0x0E is added to endpoint list 120 as (E, 7). This indicates that the streaming endpoint (E, 7) is ready for the transmission of tag value 0x02 (Idle state), and also that the streaming endpoint (E, 7) is capable of handling the transmission requests for tag values 0x04 (step 8) and 0x09 (step 14). Neither the requests in steps 8 nor 14 trigger the switching between the streaming state machine's PrimePipe state and the Idle state.
[0090] In step 20, the streaming endpoint (data input endpoint) numbered 0x03 on device 0x0C is added to endpoint list 120 as (C, 3). This indicates that the streaming endpoint (C, 3) is ready for the transmission of tag value 0x02 (Idle state), and also that the streaming endpoint (C, 3) is capable of handling the transmission requests for tag values 0x05 (step 24) and 0x09 (step 28). Neither the requests in steps 24 nor 28 trigger the switching between the streaming state machine's PrimePipe state and the Idle state.
[0091] Step 23: The streaming endpoint (state endpoint) numbered 0x07 on device 0x0C is added to endpoint list 120 as (C, 7). This indicates that the streaming endpoint (C, 7) is ready for the transmission of tag value 0x02 (Idle state), and also that the streaming endpoint (C, 7) is capable of handling the transmission requests for tag values 0x05 (step 26) and 0x09 (step 29). Neither the requests in steps 26 nor 29 trigger a switch between the streaming state machine's PrimePipe state and the Idle state.
[0092] In particular, in step 25, as the data output transmission of tag value 0x09 is completed, the data output endpoint numbered 0x04 on device 0x0E completes all tasks (the data output transmissions of the three segments indicated by tag values 0x02, 0x04, and 0x09 are all completed), and record (E, 4) is deleted from endpoint list 120.
[0093] Step 27: With the status transmission of tag value 0x09 completed, the status endpoint numbered 0x07 on device 0x0E completes all tasks (the three status transmissions indicated by tag values 0x02, 0x04, and 0x09 are all completed), and record (E, 7) is deleted from endpoint list 120.
[0094] Step 37: As the data input transmission of tag value 0x09 is completed, the data input endpoint numbered 0x03 on device 0x0C completes all tasks (the data input transmissions of tag values 0x02, 0x05, and the three segments indicated by 0x09 are all completed), and record (C, 3) is deleted from endpoint list 120.
[0095] Step 38: With the status transmission of tag value 0x09 completed, the status endpoint numbered 0x07 on device 0x0C completes all tasks (the three status transmissions indicated by tag values 0x02, 0x05, and 0x09 are all completed), and record (C, 7) is deleted from endpoint list 120.
[0096] Table 1 shows the dynamic addition and deletion of endpoint list 120. The interface controller 118 of this application significantly optimizes the cache space 119 occupied by endpoint list 120.
[0097] This application proposes a high-efficiency interface controller 118 for the Ultra High Speed Universal Serial Bus (USB 3.0).
[0098] The above concepts can be further implemented as a high-speed universal serial bus (USB 3.0) control method, including: storing an endpoint list 120 in a buffer space 119 and running a logic 122 to dynamically add and delete the endpoint list 120; corresponding to an unread data packet NRDY sent by a first streaming endpoint, recording the first streaming endpoint in the endpoint list 120, wherein, with the issuance of the unread data packet NRDY, a first streaming state machine of the first streaming endpoint switches to an idle state Idle, waiting to enter a ready transmission state StartStream; when the first streaming endpoint is recorded in the endpoint list 120, skipping the switch of the first streaming state machine from the idle state Idle to a pipeline state PipePrime; and after all target transmissions of the first streaming endpoint are completed, deleting the first streaming endpoint from the endpoint list 120.
[0099] In one embodiment, the control method further includes: correspondingly operating a doorbell on the endpoint aligned with the first streaming endpoint, checking the endpoint list 120; and when it is found that the endpoint list 120 has not yet recorded the first streaming endpoint, providing a notification packet InAck to the first streaming endpoint, causing the first streaming state machine to enter the PrimePipe state and send the incomplete data packet NRDY. The first streaming state machine switches to the Idle state, and the first streaming endpoint is added to the endpoint list 120.
[0100] In one embodiment, multiple endpoint operation doorbells targeting the first streaming endpoint carry multiple tag values, indicating multiple target transmissions of the first streaming endpoint. The first streaming state machine in the idle state switches to the start-up transmission state StartStream based on a ready data packet ERDY sent by the first streaming endpoint corresponding to a target tag value, then switches to a transmission state MoveData to complete a target transmission segment represented by the target tag value, causing the first streaming state machine to switch back to the idle state. The control method further determines whether any target transmissions with tag values associated with the first streaming endpoint are incomplete when the first streaming endpoint completes the target transmission segment represented by the target tag value; if all are completed, the first streaming endpoint is deleted from the endpoint list 120.
[0101] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Those skilled in the art can make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention is defined by the claims.
Claims
1. A computer system for implementing ultra-high-speed universal serial bus communication, comprising: The interface controller has a cache to store the endpoint list and runs logic to dynamically add or delete endpoints from the list. in: When the interface controller receives the first unready data packet from the first streaming endpoint, it records the first streaming endpoint in the endpoint list. The first streaming state machine of the first streaming endpoint switches to an idle state upon the issuance of the first unready data packet, waiting to enter the ready-to-transmit state. When the endpoint list records the first streaming endpoint, the interface controller skips switching the first streaming state machine from the idle state to the main pipeline state. After all target transmissions for the first streaming endpoint are completed, the interface controller removes the first streaming endpoint from the endpoint list; and When the interface controller receives the doorbell operation of each corresponding target transmission endpoint, it checks the endpoint list and skips switching the first streaming state machine, which is already loaded in the endpoint list, from the idle state to the main pipeline state. Instead, it keeps the first streaming state machine in the idle state and waits to enter the pre-transmission state, so as to switch to a transmission state to complete the corresponding target transmission.
2. The computer system for realizing ultra-high-speed universal serial bus communication as described in claim 1, wherein: The interface controller checks the endpoint list when it receives an endpoint action doorbell aligned with the first streaming endpoint, and When the endpoint list does not record the first streaming endpoint, the interface controller provides a notification packet to the first streaming endpoint, causing the first streaming state machine to enter the main pipeline state and send the first unready data packet to the interface controller.
3. The computer system for realizing ultra-high-speed universal serial bus communication as described in claim 1, wherein: The doorbells operated on multiple endpoints of the first streaming endpoint carry multiple tag values, indicating multiple target transmissions of the first streaming endpoint; The first streaming state machine in the idle state switches to the ready transmission state based on the ready data packet sent by the target tag value corresponding to the first streaming endpoint, and then switches to the transmission state, so that the target transmission represented by the target tag value is completed under the interaction between the first streaming endpoint and the interface controller, causing the first streaming state machine to switch back to the idle state; and When the first streaming endpoint informs that the target segment represented by the target tag value has been completed, the interface controller determines whether any target transmissions with the first streaming endpoint have not been completed. If all are completed, the interface controller removes the first streaming endpoint from the endpoint list.
4. The computer system for implementing ultra-high-speed universal serial bus communication as described in claim 1, wherein: The interface controller further stores task status annotations in the cache space, providing the first stream endpoint with a first set of bits corresponding to multiple tag values. Each bit is normally in the first state, and when the corresponding tag value is configured to indicate a target transmission segment, the interface controller switches it to the second state until the target transmission segment is completed, at which point it switches back to the first state. The interface controller determines that all target transmissions of the first streaming endpoint are complete based on the first set of bits, all of which are in the first state.
5. The computer system for realizing ultra-high-speed universal serial bus communication as described in claim 1, wherein: When the interface controller receives a doorbell operation from the first endpoint aligned with the first streaming endpoint, it checks that the endpoint list has not yet recorded the first streaming endpoint. Therefore, it provides a notification packet to the first streaming endpoint, causing the first streaming state machine to enter the main pipeline state and send the first unready data packet to the interface controller, so that the interface controller records the first streaming endpoint in the endpoint list and switches the first streaming state machine to the idle state. and The first endpoint operation doorbell, aligned with the first streaming endpoint, carries a first tag value indicating the first target transmission of the first streaming endpoint.
6. The computer system for implementing ultra-high-speed universal serial bus communication as described in claim 5, wherein: When the second endpoint operation doorbell is received and aligned with the first streaming endpoint, the interface controller checks that the first streaming endpoint is recorded in the endpoint list. The interface controller then skips the process of switching the first streaming state machine from the idle state to the main pipeline state. and The doorbell operated by the second endpoint, which is aligned with the first streaming endpoint, carries a second tag value indicating the second target transmission of the first streaming endpoint.
7. The computer system for realizing ultra-high-speed universal serial bus communication as described in claim 6, wherein: As the first streaming endpoint sends a ready data packet in response to the first tag value, the first streaming state machine enters the ready-to-transmit state from the idle state. The interface controller sends another notification packet in response to the ready data packet of the first tag value, causing the first streaming state machine to switch from the ready transmission state to the transmission state, so that the first streaming endpoint interacts with the interface controller to complete the first target transmission; and After the first target transmission is completed, the first streaming state machine returns to the idle state, and the interface controller determines that the first streaming endpoint still has the second target transmission that has not been completed, so the endpoint list continues to record the first streaming endpoint.
8. The computer system for realizing ultra-high-speed universal serial bus communication as described in claim 7, wherein: As the first streaming endpoint sends a ready data packet in response to the second tag value, the first streaming state machine enters the ready-to-transmit state from the idle state. The interface controller sends another notification packet in response to the ready data packet with the second tag value, causing the first streaming state machine to switch from the ready-to-transmit state to the transmit state, enabling the first streaming endpoint to interact with the interface controller and complete the second target transmission; and After the second target transmission is completed, the first streaming state machine returns to the idle state, and the interface controller determines that the first streaming endpoint has no target transmissions yet to be completed, and deletes the first streaming endpoint from the endpoint list.
9. The computer system for implementing ultra-high-speed universal serial bus communication as described in claim 6, wherein: When the interface controller receives a doorbell call from a third endpoint aligned with the second streaming endpoint, it checks that the endpoint list has not yet recorded the second streaming endpoint. It then provides another notification packet to the second streaming endpoint, causing the second streaming endpoint's second streaming state machine to enter the main pipeline state. The endpoint sends a pre-ready data packet to the interface controller, causing the interface controller to record the second streaming endpoint in the endpoint list. The second streaming state machine then switches to the idle state upon the issuance of the second pre-ready data packet, waiting to enter the ready-to-transmit state.
10. The computer system for implementing ultra-high-speed universal serial bus communication as described in claim 9, wherein: When the endpoint list records the second streaming endpoint, the interface controller skips switching the second streaming state machine from the idle state to the main pipeline state; and Once all target transmissions for the second streaming endpoint are complete, the interface controller removes the second streaming endpoint from the endpoint list.
11. A method for controlling an ultra-high-speed universal serial bus, comprising: Store a list of endpoints in the cache space and run logic to dynamically add or delete endpoints from the list; The first unready data packet sent by the corresponding first streaming endpoint is recorded in the endpoint list. The first streaming state machine of the first streaming endpoint switches to an idle state and waits to enter the ready transmission state as the first unready data packet is sent. When the endpoint list records the first streaming endpoint, the process of switching the first streaming state machine from the idle state to the main pipeline state is skipped; and Once all target transmissions for the first streaming endpoint are complete, remove the first streaming endpoint from the endpoint list. The ultra-high-speed universal serial bus control method, when receiving the doorbell operation of each corresponding target transmission endpoint, checks the endpoint list, skips the switch of the first streaming state machine already loaded in the endpoint list from the idle state to the main pipeline state, and instead keeps the first streaming state machine in the idle state waiting to enter the pre-transmission state, so as to switch to a transmission state to complete the corresponding target transmission.
12. The ultra-high-speed universal serial bus control method as described in claim 11, further comprising: The corresponding endpoint operation doorbell is aligned with the first streaming endpoint, and the endpoint list is checked. When it is found that the endpoint list has not yet recorded the first streaming endpoint, a notification packet is provided to the first streaming endpoint, causing the first streaming state machine to enter the main pipeline state and send the first unready data packet.
13. The ultra-high-speed universal serial bus control method as described in claim 11, wherein: The doorbells operated on multiple endpoints of the first streaming endpoint carry multiple tag values, indicating multiple target transmissions of the first streaming endpoint; The first streaming state machine in the idle state switches to the pre-transmission state based on the ready data packet sent by the target tag value corresponding to the first streaming endpoint, and then switches to the transmission state to complete the target transmission represented by the target tag value, causing the first streaming state machine to switch back to the idle state; and The ultra-high-speed universal serial bus control method further determines whether any target transmissions of tag values have not been completed when the first streaming endpoint completes the target transmission represented by the target tag value. If all are completed, the first streaming endpoint is removed from the endpoint list.
14. The ultra-high-speed universal serial bus control method as described in claim 11, further comprising: The cache space stores task status annotations, providing the first stream endpoint with a first set of bits corresponding to multiple tag values. Each bit is normally in the first state, switches to the second state when the corresponding tag value indicates a target transmission, and only switches back to the first state after the target transmission is completed. Based on the first group of bits, all of which are in the first state, it is determined that all target transmissions of the first streaming endpoint are complete.
15. The ultra-high-speed universal serial bus control method as described in claim 11, further comprising: The corresponding first endpoint operation doorbell is aligned with the first streaming endpoint. If it is found that the first streaming endpoint has not been recorded in the endpoint list, a notification packet is provided to the first streaming endpoint, causing the first streaming state machine to enter the main pipeline state, and the first unready data packet is sent, causing the first streaming endpoint to be recorded in the endpoint list, and the first streaming state machine to switch to the idle state. The first endpoint operation doorbell, which is aligned with the first streaming endpoint, carries a first tag value indicating the first target transmission of the first streaming endpoint.
16. The ultra-high-speed universal serial bus control method as described in claim 15, further comprising: The corresponding second endpoint operation doorbell is aligned with the first flow endpoint. If the endpoint list records the first flow endpoint, the first flow state machine is switched from the idle state to the main pipeline state. The doorbell operated by the second endpoint, which is aligned with the first streaming endpoint, carries a second tag value indicating the second target transmission of the first streaming endpoint.
17. The ultra-high-speed universal serial bus control method as described in claim 16, further comprising: As the first streaming endpoint sends a ready data packet corresponding to the first tag value, the first streaming state machine enters the ready-to-transmit state from the idle state. Another notification packet is sent in response to the ready data packet of the first tag value, causing the first streaming state machine to switch from the ready transmission state to the transmission state, so that the first target transmission of the first streaming endpoint is completed; and After the first target transmission is completed, the first streaming state machine is returned to the idle state, and it is determined that the first streaming endpoint still has the second target transmission that has not been completed, so the endpoint list continues to record the first streaming endpoint.
18. The ultra-high-speed universal serial bus control method as described in claim 17, further comprising: As the first streaming endpoint sends a ready data packet in response to the second tag value, the first streaming state machine enters the ready-to-transmit state from the idle state. Another notification packet is sent in response to the ready data packet with the second tag value, causing the first streaming state machine to switch from the ready transmission state to the transmission state, so that the second target transmission of the first streaming endpoint is completed; and After the second target transmission is completed, the first streaming state machine is returned to the idle state, and it is determined that the first streaming endpoint has no target transmissions yet to be completed, so the first streaming endpoint is deleted from the endpoint list.
19. The ultra-high-speed universal serial bus control method as described in claim 16, further comprising: When the doorbell is operated on the third endpoint corresponding to the second streaming endpoint, if it is found that the endpoint list has not yet recorded the second streaming endpoint, another notification packet is provided to the second streaming endpoint, causing the second streaming state machine of the second streaming endpoint to enter the main pipeline state, and a second unready data packet is sent, causing the second streaming endpoint to be recorded in the endpoint list, and the second streaming state machine switches to the idle state with the sending of the second unready data packet, waiting to enter the ready transmission state.
20. The ultra-high-speed universal serial bus control method as described in claim 19, further comprising: When the endpoint list records the second streaming endpoint, the process of switching the second streaming state machine from the idle state to the main pipeline state is skipped. and Once all target transmissions for the second streaming endpoint are complete, remove the second streaming endpoint from the endpoint list.