Signal transmission method and related main device and electronic device
By aggregating multiple commands in USB control transmission and efficient transmission, the problems of long transmission time and low efficiency are solved, and the rapid data transmission and power consumption are achieved.
Patent Information
- Application Number
- CN202310664208.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2024-12-06
AI Technical Summary
In USB control transmission, the control transmission handshake time is too long and each read or write operation requires a complete control transmission process, which results in the execution of a large number of read/write commands time-consuming and inefficient.
By receiving multiple different types of commands in the main device for aggregation operations, generating post-aggregation commands are transmitted to the electronic device through the interface circuit, which is deaggregated and executed in the electronic device, and using block confirmation information to ensure the consistency of the command sequence. And after success, enter power saving mode.
It effectively shortens the data transmission time, increases the time for the interface circuit to enter the power saving mode, and reduces the power consumption of the main device and electronic device.
Smart Images

Figure CN119088739A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a signal transmission method and a related main device and electronic device. Background Art
[0002] In electronic devices that perform control transfer via a Universal Serial Bus (USB), since the time interval of control transfer is scheduled by a host device, in some cases, there may be a problem of too long control transfer handshake time. In addition, in current read commands or write commands, each read operation or write operation performed via a USB interface requires a complete control transfer process, so the execution of a large number of read commands / write commands will consume a lot of time, resulting in low overall efficiency. Summary of the invention
[0003] Therefore, one of the objectives of the present invention is to provide a signal transmission method, which can aggregate multiple commands and transmit them together to solve the problems described in the prior art.
[0004] In one embodiment of the present invention, a signal transmission method for a main device is disclosed, which includes the following steps: receiving a plurality of commands, wherein the plurality of commands include at least two different types of commands; aggregating the plurality of commands to generate an aggregated command; and transmitting the aggregated command to an electronic device via a first interface circuit.
[0005] In one embodiment of the present invention, a main device is disclosed, which includes a command aggregation module and an interface circuit. The command aggregation module is used to receive multiple commands and aggregate the multiple commands to generate an aggregated command, wherein the multiple commands include at least two different types of commands. The interface circuit is used to transmit the aggregated command to an electronic device.
[0006] In one embodiment of the present invention, an electronic device is disclosed, which includes an interface circuit, a command deaggregation module, and a control circuit. The interface circuit is used to receive an aggregated command. The command deaggregation module is coupled to the interface circuit and is used to deaggregate the aggregated command to generate a plurality of commands, wherein the plurality of commands include at least two different types of commands. The control circuit is coupled to the command deaggregation module and is used to analyze the plurality of commands to transmit the plurality of commands to a plurality of circuit modules for execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1is a schematic diagram of a host device and an electronic device according to an embodiment of the present invention.
[0008] Figure 2 is a schematic diagram of transmitting a post-aggregation command according to an embodiment of the present invention.
[0009] Figure 3 is a schematic diagram of transmitting a post-aggregation command according to another embodiment of the present invention.
[0010] Figure 4 It is a schematic diagram of the present invention that can have a longer power saving mode.
[0011] Figure 5 is a flowchart of a signal transmission method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0012] Figure 1 1 is a schematic diagram of a main device 110 and an electronic device 120 according to an embodiment of the present invention. Figure 1 As shown, the main device 110 includes a processing circuit 112, a command aggregation module 114 and an interface circuit 116. The electronic device 120 includes an interface circuit 122, a command de-aggregation module 124, a control circuit 126 and a plurality of circuit modules 128_1 to 128_N. In this embodiment, the main device 110 can be any product that can generate commands to the electronic device 120, such as a desktop computer, a laptop computer or other portable devices. The electronic device 120 can be externally connected to the main device 110 or set in the main device. In addition, the interface circuits 116 and 122 used to connect the main device 110 and the electronic device 120 can comply with Universal Serial Bus (USB), Peripheral Component Interconnect Express (PCIe), Secure Digital Input and Output (SDIO), Universal Asynchronous Receiver / Transmitter (UART), Inter-Integrated Circuit (I2C), Serial Peripheral Interface (SPI), or any other suitable interface.
[0013] In this embodiment, the electronic device 120 may be an external network card, and the processing circuit 112 in the main device 110 is used to execute a Wi-Fi driver to generate multiple commands to the electronic device 120. The multiple circuit modules 128_1 to 128_N in the electronic device 120 may include a media access control (MAC) layer circuit, a baseband circuit, a radio frequency circuit, etc., however, the present invention is not limited thereto. The command aggregation module 114 may be implemented using a hardware circuit, or integrated into the processing circuit 112 and implemented in software. The command deaggregation module 124 may be implemented using a hardware circuit, or may use firmware to perform its related operations.
[0014] exist Figure 1 In the operation of the embodiment, first, the processing circuit 112 generates a plurality of commands CMD in sequence, wherein the plurality of commands CMD include a plurality of different types of input / output commands (I / O commands). For example, the plurality of commands CMD may include a write command, wherein the write command includes information such as an offset, a mask, and a value, which is used to write the value into a plurality of registers having the offset in one of the plurality of circuit modules 128_1 to 128_N. The plurality of commands CMD may include a compare command, wherein the compare command includes two offsets and a corresponding mask, which is used to compare whether the data of two groups of registers having the two offsets in one of the plurality of circuit modules 128_1 to 128_N are consistent. The plurality of commands CMD may include a delay command, wherein the delay command includes a delay time, to instruct one of the plurality of circuit modules 128_1 to 128_N to delay the command by the delay time before continuing to process subsequent commands. Multiple commands CMD may include a move command, wherein the move command includes a first offset, a second offset, and a mask to move data from a buffer with the first offset in a circuit module among multiple circuit modules 128_1 to 128_N to a buffer with the second offset, and the mask is used to indicate a write width of the data.
[0015] Next, after receiving the plurality of commands CMD from the processing circuit 112 , the command aggregation module 114 aggregates the plurality of commands CMD to generate an aggregated command A_CMD, and transmits the aggregated command A_CMD to the electronic device 120 through the interface circuit 116 .
[0016] The interface circuit 122 transmits the received aggregated command A_CMD to the command de-aggregation module 124, and the command de-aggregation module 124 de-aggregates the aggregated command A_CMD to generate a plurality of commands CMD. The plurality of commands CMD generated by the command de-aggregation module 124 may be the same as the plurality of commands CMD previously generated by the processing circuit 112. Then, the control circuit 126 analyzes the plurality of commands CMD and transmits the contents of the plurality of commands CMD to the corresponding circuit modules 128_1 to 128_N respectively. After each circuit module 128_1 to 128_N successfully processes the received command, it transmits an acknowledgment (ACK) and transmits it to the command de-aggregation module 124 through the control circuit 126, so that the command de-aggregation module 124 generates (integrates into) a block acknowledgment (BA) BA. Each acknowledgment is used to indicate whether the corresponding command CMD is successfully executed. The block acknowledgement information BA integrates multiple acknowledgement information from the circuit modules 128_1 to 128_N, and the multiple acknowledgement information included in the block acknowledgement information BA respectively corresponds to multiple commands CMD of the aggregated command A_CMD. Then, the block acknowledgement information BA is transmitted to the host device 110 through the interface circuit 122 .
[0017] In this embodiment, the order of the multiple confirmation messages included in the block confirmation message BA is the same as the order of the multiple commands in the aggregated command A_CMD, that is, the first confirmation message in the block confirmation message BA corresponds to the first command in the aggregated command A_CMD, the second confirmation message in the block confirmation message BA corresponds to the second command in the aggregated command A_CMD, and so on. By generating the block confirmation message BA, it can be ensured that the order of the multiple confirmation messages ACK is consistent with the order of the multiple commands CMD, so as to avoid the subsequent operation problems of the host device 110 caused by the wrong order.
[0018] The interface circuit 116 of the host device 110 transmits the received block acknowledgement information BA to the command aggregation module 114 , and the command aggregation module 114 decomposes the block acknowledgement information BA into a plurality of acknowledgement information ACKs for the processing circuit 112 to determine whether the plurality of commands CMD generated previously are successfully executed by the circuit modules 128_1 ˜ 128_N respectively.
[0019] In an embodiment, the command aggregation module 114 can actively determine whether the status carried by the received block confirmation information BA indicates that the command execution is successful. If the block confirmation information BA indicates that each command is successfully executed by the circuit modules 128_1-128_N, the command aggregation module 114 starts to aggregate the subsequent commands from the processing circuit 112 to generate the next aggregated command A_CMD to the electronic device 120. If the block confirmation information BA indicates that one or more commands are not successfully executed by the circuit modules 128_1-128_N, the command aggregation module 114 directly retransmits the aggregated command A_CMD temporarily stored therein to the electronic device 120, so that the circuit modules 128_1-128_N can re-execute the previously unsuccessfully executed commands.
[0020] As described in the above embodiments, the command aggregation module 114 aggregates multiple commands of different types for transmission, which can effectively shorten the data transmission time between the host device 110 and the electronic device 120. Therefore, the interface circuits 116 and 122 have more time to enter (or stay in) the power saving mode or sleep state, so as to reduce the power consumption of the host device 110 and the electronic device 120.
[0021] In an embodiment of the present invention, if the interface circuits 116 and 122 support a USB interface, the interface circuits 116 and 122 can complete the aggregation transmission and processing of multiple commands under a single control transfer. Specifically, referring to FIG. 2 , after the interface circuit 116 receives the aggregated command A_CMD generated by the command aggregation module, the interface circuit 116 will start the control transmission, wherein the control transmission includes three stages, namely, the setup stage, the data stage, and the status stage. First, in the setup stage, the interface circuit 116 transmits a setup token to the electronic device 120, and then transmits a USB setup command to the electronic device 120, so that the command de-aggregation module 124 can know the subsequent data parsing method in the data stage according to the USB setup command. For example, the USB setup command can include the length and format of the aggregated command A_CMD, wherein the format can include the size of each command CMD, and / or the offset in the aggregated command A_CMD. After receiving the USB configuration command, the command de-aggregation module 124 transmits an acknowledgement message ACK to the interface circuit 116 to complete the configuration phase of the control transmission.
[0022] Next, in the data phase, the interface circuit 116 transmits an output token (OUT token) to the electronic device 120, and then transmits the aggregated command A_CMD to the electronic device 120. After receiving the aggregated command A_CMD, the command de-aggregation module 124 transmits confirmation information ACK to the interface circuit 116 to complete the data phase of the control transmission. In addition, since the command de-aggregation module 124 has learned the length and format of the aggregated command A_CMD in the setting phase, the command de-aggregation module 124 can perform a de-aggregation operation to generate a plurality of commands CMD, and transmit these commands to the control circuit 126 in sequence, and then transmit them to the circuit modules 128_1~128_N through the control circuit 126 for processing. If the circuit modules 128_1~128_N successfully execute the command, they will return confirmation information ACK, and this will be transmitted to the command de-aggregation module 124 through the control circuit 126. If the circuit modules 128_1 - 128_N fail to execute the command successfully, the command de-aggregation module 124 will receive an error message through the control circuit 126 , or the command de-aggregation module 124 will regard the command as failed to execute if it does not receive any confirmation message after a period of time.
[0023] Next, in the status phase, the interface circuit 116 transmits an input token (IN token) to the electronic device 120. After receiving the input token, if the command de-aggregation module 124 has not yet determined whether each command is executed successfully, the command de-aggregation module 124 will transmit a negative acknowledgement (NAK) to the interface circuit 116. If the command de-aggregation module 124 has confirmed whether each command is executed successfully, the command de-aggregation module 124 will aggregate the received multiple acknowledgement messages ACK into a block acknowledgement message BA, and transmit the block acknowledgement message BA to the interface circuit 116. After receiving the block acknowledgement message BA from the electronic device 120, the interface circuit 116 may further transmit the block acknowledgement message BA to the command aggregation module 114. In addition, the processing circuit 112 or the command aggregation module 114 may transmit the acknowledgement message ACK to the command de-aggregation module 124 of the electronic device 120 through the interface circuit 116 to complete the status phase of the control transmission.
[0024] In another embodiment of the present invention, if the interface circuits 116 and 122 support USB interfaces, the interface circuits 116 and 122 can complete the aggregation transmission and processing of multiple commands under a single bulk transfer. Specifically, referring to FIG. 3 , after the interface circuit 116 receives the aggregated command A_CMD generated by the command aggregation module, the interface circuit 116 will start the bulk transfer, wherein the bulk transfer includes two phases, namely the data phase and the status phase. First, in the data phase, the interface circuit 116 transmits an output token to the electronic device 120, and then transmits a header and the aggregated command A_CMD to the electronic device 120. After receiving the aggregated command A_CMD, the command deaggregation module 124 transmits an acknowledgment message ACK to the interface circuit 116 to complete the data phase of the control transmission. In this embodiment, the header may include the length and format of the aggregated command A_CMD, wherein the format may include the size of each command CMD and / or the offset in the aggregated command A_CMD. Since the command de-aggregation module 124 can know the length and format of the aggregated command A_CMD through the header, the command de-aggregation module 124 can perform de-aggregation operations to generate multiple commands CMD, and transmit these commands to the control circuit 126 in sequence, and then transmit them to the circuit modules 128_1~128_N through the control circuit 126 for processing. If the circuit modules 128_1~128_N successfully execute the command, they will return confirmation information ACK, and this will be transmitted to the command de-aggregation module 124 through the control circuit 126. If the circuit modules 128_1~128_N do not successfully execute the command, the command de-aggregation module 124 will receive an error message through the control circuit 126, or the command de-aggregation module 124 will not receive the confirmation information after a period of time and regard the command as a failed execution.
[0025] Next, in the status phase, the interface circuit 116 transmits the input token to the electronic device 120. After receiving the input token, if the command de-aggregation module 124 has not yet determined whether each command is executed successfully, the command de-aggregation module 124 will transmit a negative confirmation message NAK to the interface circuit 116. If the command de-aggregation module 124 has confirmed whether each command is executed successfully, the command de-aggregation module 124 will aggregate the received multiple confirmation messages ACK into block confirmation messages BA, and transmit the block confirmation messages BA to the interface circuit 116. After receiving the block confirmation messages BA from the electronic device 120, the interface circuit 116 may further transmit the block confirmation messages BA to the command aggregation module 114. In addition, the processing circuit 112 or the command aggregation module 114 may transmit the confirmation message ACK to the command de-aggregation module 124 of the electronic device 120 through the interface circuit 116 to complete the status phase of the control transmission.
[0026] It should be noted that Figure 2 , Figure 3 The use of USB control transfer and USB bulk transfer to transmit the aggregated command A_CMD described in the embodiment is only an example, not a limitation of the present invention. In other embodiments, the interface circuit 116 can transmit the aggregated command A_CMD to the electronic device 120 via USB interrupt transfer or USB isochronous transfer, or the interface circuit 116 can transmit the aggregated command A_CMD via a memory write operation of a PCIe interface, a CMD53 command of an SDIO interface, or other interfaces.
[0027] refer to Figure 4 In the prior art, since a transfer handshake can only transmit one command, the host device and the electronic device will need more time to perform data transmission, resulting in only a short time for the interface circuits 116 and 122 to enter the power saving mode. On the other hand, by using the command aggregation transmission operation of the present invention, the data transmission time between the host device 110 and the electronic device 120 can be greatly reduced, so the interface circuits 116 and 122 can have more time to enter the power saving mode. The above-mentioned power saving mode can be L1 and L2 modes in the PCIe interface, and can be U1 and U2 modes in the USB interface.
[0028] Figure 5 is a flow chart of a signal transmission method according to an embodiment of the present invention. Referring to the contents described in the above embodiment, the flow of the signal transmission method is as follows.
[0029] Step 500: The process starts.
[0030] Step 502: Receive a plurality of commands, wherein the plurality of commands include at least two different types of commands.
[0031] Step 504: Aggregate the multiple commands to generate an aggregated command.
[0032] Step 506: Transmit the aggregated command to the electronic device via the first interface circuit.
[0033] Step 508: Receive the aggregated command through the second interface circuit of the electronic device.
[0034] Step 510: De-aggregate the aggregated command to generate the multiple commands.
[0035] Step 512: Transmit the plurality of commands to the plurality of circuit modules for execution by the plurality of circuit modules respectively.
[0036] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
[0037]
Explanation of symbols
[0038] 110: Main device
[0039] 112: Processing circuit
[0040] 114: Command Aggregation Module
[0041] 116: Interface Circuit
[0042] 120: Electronic devices
[0043] 122: Interface circuit
[0044] 124: Command deaggregation module
[0045] 126: Control circuit
[0046] 128_1~128_N:Circuit module
[0047] 500~512: Steps
[0048] ACK: Acknowledgement
[0049] A_CMD: Post-aggregation command
[0050] BA: Block confirmation information
[0051] CMD: Command
[0052] NAK: Negative acknowledgment
Claims
1. A signal transmission method for a master device, comprising: receiving a plurality of commands, wherein the plurality of commands include at least two different types of commands; Aggregating the multiple commands to generate an aggregated command; and The aggregated command is transmitted to the electronic device through the first interface circuit.
2. The signal transmission method according to claim 1, further comprising: receiving the aggregated command through a second interface circuit of the electronic device; performing a de-aggregation operation on the aggregated command to generate the plurality of commands; and The plurality of commands are transmitted to the plurality of circuit modules so as to be executed by the plurality of circuit modules respectively.
3. The signal transmission method according to claim 2, further comprising: receiving a plurality of confirmation messages from the plurality of circuit modules, wherein each confirmation message is used to indicate whether the corresponding command is successfully executed; Integrating the plurality of confirmation information to generate block confirmation information; The block confirmation information is transmitted to the first interface circuit through the second interface circuit.
4. The signal transmission method according to claim 3, further comprising: The block confirmation information is decomposed into the plurality of confirmation information to determine whether the plurality of commands are successfully executed by the plurality of circuit modules respectively. 5 . The signal transmission method as claimed in claim 1 , wherein the plurality of commands include at least two of a write command, a compare command, a delay command, and a move command.
6. The signal transmission method as claimed in claim 1, wherein the first interface circuit complies with the USB specification, and the step of transmitting the aggregated command to the electronic device through the first interface circuit comprises: The aggregated command is transmitted to the electronic device in a single control transmission, a single bulk transmission, a single interrupt transmission or a single real-time transmission.
7. The signal transmission method as claimed in claim 1, wherein the first interface circuit complies with USB specifications, and the step of transmitting the aggregated command to the electronic device through the first interface circuit comprises: In the setting phase of the control transmission, a USB setting command is transmitted to the electronic device through the first interface circuit, wherein the USB setting command includes the length and format of the aggregated command; During the data phase of the control transmission, transmitting an output token and the aggregated command to the electronic device through the first interface circuit; and In the control transfer state phase, an input token is transmitted to the electronic device through the first interface circuit.
8. The signal transmission method as claimed in claim 1, wherein the first interface circuit complies with USB specifications, and the step of transmitting the aggregated command to the electronic device through the first interface circuit comprises: In a data phase of a bulk transmission, transmitting an output token, a header, and the aggregated command to the electronic device through the first interface circuit, wherein the header includes the length and format of the aggregated command; and During the bulk transfer state, an input token is transmitted to the electronic device via the first interface circuit.
9. A main device, comprising: a command aggregation module, configured to receive a plurality of commands and aggregate the plurality of commands to generate an aggregated command, wherein the plurality of commands include at least two different types of commands; and The interface circuit is used to transmit the aggregated command to the electronic device.
10. An electronic device comprising: An interface circuit for receiving a post-aggregation command; A command deaggregation module, coupled to the interface circuit, for performing a deaggregation operation on the aggregated command to generate a plurality of commands, wherein the plurality of commands include at least two different types of commands; as well as The control circuit is coupled to the command de-aggregation module and is used for analyzing the plurality of commands to respectively transmit the plurality of commands to a plurality of circuit modules for execution.
