PERIPHERAL DEVICE COMPLYING WITH SDIO STANDARD AND METHOD FOR MANAGING SDIO COMMAND
The invention provides a method of managing SDIO commands. Firstly, before a first packet complying with a first SDIO data format is transmitted, an operation request is converted into a converted command. The operation request is originally set to be converted into a command complying with a SDIO command format. Then, the fist packet and the converted command are combined to generate a first combined packet. Afterward, the first combined packet is transmitted. After the first combined packet is received, the first combined packet is parsed to obtain the converted command. Finally, a processing procedure is performed according to the converted command.
1. Field of the Invention
The invention relates to a peripheral device complying with Secure Digital Input/Output (SDIO) standard and a method for managing SDIO command, more particularly, to a peripheral device and method used to convert an operation request into a converted command and to transmit the converted command combined with a packet.
2. Description of the Prior Art
In a general SDIO frame, a peripheral device complying with SDIO standard is connected to a host device complying with SDIO standard. According to SDIO standard, some commands complying with SDIO command format (such as CMD—52 format) are used to perform the processing procedure for reading or writing single byte. After receiving the command, the peripheral device transmits a return receipt to a host device for returning what performs the command.
However, some host devices complying with SDIO standard are based on a multiplexing mechanism. When there are some commands needed to be processed, each command is processed completely (which comprises transmitting the command and receiving the return receipt), and there is a long interval before the next command to be processed, so the processing efficiency of the command is decreased.
Please refer to
Therefore, the main scope of the invention is to provide a peripheral device complying with SDIO standard and a method, so as to solve the aforesaid problems.
SUMMARY OF THE INVENTIONA object of the present invention is to provide a peripheral device complying with SDIO standard and a method for managing the SDIO command. The present invention is used for transmitting a combined packet with a command which is originally set to be transmitted. Thereby, the invention is capable of processing with a shorter interval between commands, so as to enhance the efficiency of processing SDIO command.
According an embodiment of the invention, the method is used for managing SDIO command. Before a first packet complying with a first SDIO data format is transmitted, an operation request is converted into a converted command, wherein the operation request is originally set to be converted into the command complying with an SDIO command format, and the command is originally set to be transmitted. Further, the first packet is combined with the converted command, so as to generate a first combined packet. After that, the first combined packet is transmitted. Then, the first combined packet is received. After this, the first combined packet is parsed to obtain the converted command. Finally, a processing procedure is performed according to the converted command.
According to another embodiment of the invention, a peripheral device complies with SDIO standard and is connected to a host device complying with SDIO standard. Before the host device transmits a first packet complying with a first SDIO data format to the peripheral device, the host device converts an operation request into a converted command and combines the first packet with the converted command, so as to generate a first combined packet and then the host device transmits the first combined packet to the peripheral device. The host device is originally set to convert the operation request into the command which is complying with an SDIO command format, and then transmits the command to the peripheral device. The peripheral device comprises a receiving module, a parsing module, and a performing module. The receiving module is used for receiving the first combined packet. And the parsing module is coupled to the receiving module for parsing the first combined packet, so as to obtain the converted command. The performing module is coupled to the parsing module for performing a processing procedure based on the converted command.
According to the present invention, the peripheral device and the method for managing commands are used for transmitting the combined packet with the command which is originally set to be transmitted. Thereby, the invention is capable of processing with shorter intervals between the commands, so as to enhance the efficiency of processing SDIO command.
The advantage and spirit of the invention may be understood by the following recitations with the appended drawings.
The present invention provides a peripheral device complying with SDIO standard and a method for managing the SDIO command. And the present invention is used for transmitting a combined packet with a command which is originally set to be transmitted. Thereby, the present invention is capable of processing less time interval between commands, so as to enhance the efficiency of processing SDIO command.
Please refer to
In this embodiment, the host device 3 originally plans to convert the operation request into the command complying with an SDIO command format, and then transmits the command to the peripheral device 1. According to the present invention, the command is originally set to be transmitted to the peripheral device 1 by the host device 3 via the command transmission line of SD bus 5. According to the present invention, the operation request and the command complying with the SDIO command format is not limited to one, but can respectively be a plurality.
If the host device 3 originally plans to transmit a first packet complying with an SDIO data format to the peripheral device 1, before transmitting the first packet to the peripheral device 1, the host device 3 converts the operation request into a converted command. In other words, the operation that the host device 3 originally plans to convert the operation request into the command complying with the SDIO data format is replaced by the operation of converting the operation request into the converted command. Practically, before transmitting the first packet to the peripheral device 1, the host device 3 transmits a packet complying with another SDIO command format to the peripheral device 1, so as to notify the peripheral device 1 that the host device 3 will transmit the first packet.
Further, the host device 3 can combine the first packet with the converted command, so as to generate a first combined packet. It is worthy to notice that there are a plurality of the operation requests with the commands, so the converted commands also can be a plurality. In other words, the host devices 3 can combine the first packet with a plurality of converted commands, so as to generate the first combined packet. In short, the first combined packet can comprise a plurality of converted commands, so as to enhance the transmission efficiency.
Please refer to
Please refer to
Finally, the host device 3 transmits the first combined packet to the peripheral device 1. On the other hand, the host device 3 transmits the first combined packet replaced with the first packet to the peripheral device 1, wherein the first combined packet comprises the converted command. According to the present invention, the host device 3 transmits the first combined packet to the peripheral device 1 via the data transmission line of SD bus 5.
Thereby, when there are a plurality of commands originally set to be transmitted to the peripheral device 1 via the host device 3, a plurality of converted commands can replace the commands, and then the host device 3 can transmit the converted commands with the first combined packet to the peripheral device 1. As described as in prior arts, the time interval of the host device 3 when processing a plurality of commands can decrease the processing efficiency, so the method is to replace the command with the converted command and transmit the converted command combined with the first combined packet, so as to decrease the time interval of processing plurality of commands and further enhancing the processing efficiency. As shown in
In this embodiment, the receiving module 10 is used for receiving the first combined packet. The parsing module 12 is used for parsing the first combined packet, so as to obtain the converted command. And the performing module 14 is used for performing a processing procedure based on the converted command.
According to the present invention, the peripheral device 1 can further comprise a first buffer 16 coupled between the parsing module 12 and the performing module 14 for buffering the converted command. Practically, the first buffer 16 can be a first in first out (FIFO) buffer, but not limited to it.
According to the present invention, when the converted command is a write command, the processing procedure is a write procedure. After receiving the converted command, the performing module 14 performs the write procedure based on the converted command.
According to the present invention, when the converted command is a read command, the processing procedure is a read procedure. After the performing module 14 performs the read procedure to generate a return receipt, the peripheral device further comprises a combining module 18 and a transmitting module 20, and the transmitting module 20 is coupled to the combining module 18, as shown in
If the peripheral device 1 is originally set to transmit a second packet complying with a second data format to the host device 3, before transmitting the second packet, the combined module 18 can combine the second packet with the return receipt, so as to generate a second combined packet. Then the transmitting module 20 can transmit the second combined packet to the host device 3. It is worth noticing that the converted commands are plural, so the return receipts are also plural.
Please refer to
Please refer to
If the second packet is not transmitted to the host device 3 in advance, the host device 3 will immediately receive the return receipt. Then the host device 3 can selectively transmit a special read command for reading the return receipt from the second buffer 22.
According to the method of converting and combining, the summaries of commands complying with SDIO command format can be decreased, so as to decrease the time interval of processing the commands and further to enhance the system efficiency.
Please refer to
Further, step S12 is performed to combine the first packet with the converted command to generate the first combined packet. According to the present invention, the first combined packet comprises the first header for indicating whether the first combined packet comprises the converted command.
However, step S14 is performed to transmit the first combined packet. Further, step S16 is performed to receive the first combined packet. And further still, step S18 is performed to parse the first combined packet, so as to obtain the converted command. Finally, step S20 is performed to perform a processing procedure according to the converted command. According to the present invention, when the converted command is the write command, the processing procedure is the write procedure.
Please refer to
Compared to the prior arts, according to the present invention, a peripheral device complying with SDIO standard and a method for managing SDIO command can transmit the packet combined with the command which is originally set to be transmitted. Thereby, the invention can shorten the time interval between the commands, so as to enhance the efficiency of processing SDIO command. In addition, when the command is the read command, the return receipt combined with the packet also can be transmitted, so as to enhance the processing efficiency.
With the example and explanations above, the features and spirits of the invention will be hopefully well described. Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teaching of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Claims
1. A method for managing Secure Digital Input/Output (SDIO) commands, comprising steps of:
- converting an operation request into a converted command;
- combining a first packet with the converted command, so as to generate a first combined packet;
- transmitting the first combined packet;
- receiving the first combined packet;
- parsing the first combined packet, so as to obtain the converted command; and
- performing a processing procedure according to the converted command.
2. The method of claim 1, wherein the operation request is originally set to be converted into a command complying with an SDIO command format, the command is originally set to be transmitted, and the step of converting the operation request into the converted command is performed before the first packet is transmitted.
3. The method of claim 1, wherein the first packet complies with an SDIO data format.
4. The method of claim 1, wherein the first combined packet comprises a first header for indicating whether the first combined packet comprises the converted command.
5. The method of claim 1, wherein the converted command is a read command, and the processing procedure is a read procedure.
6. The method of claim 5, after the step of performing the processing procedure according to the converted command, further comprising steps of:
- generating a return receipt;
- combining a second packet with the return receipt, so as to generate a second combined packet; and
- transmitting the second combined packet.
7. The method of claim 6, wherein the second packet complies with an SDIO data format.
8. The method of claim 6, wherein the second combined packet comprises a second header for indicating whether the second combined packet comprises the return receipt.
9. The method of claim 1, wherein the converted command is a write command, and the processing procedure is a write procedure.
10. A peripheral device complying with an SDIO standard and being used for receiving a packet from a host device, wherein the host device converts an operation request into a converted command, combines a first packet with the converted command to generate a first combined packet, and transmits the first combined packet to the peripheral device, the peripheral device comprising:
- a receiving module for receiving the first combined packet;
- a parsing module, coupled to the receiving module, for parsing the first combined packet, so as to obtain the converted command; and
- a performing module, coupled to the parsing module, for performing a processing procedure according to the converted command.
11. The peripheral device of claim 10, wherein the operation request is originally set to be converted into a command complying with an SDIO command format by the host device, the command is originally set to be transmitted to the peripheral device by the host device, and the host device converts the operation request into the converted command before the first packet is transmitted.
12. The peripheral device of claim 10, further comprising a first buffer, coupled between the parsing module and the performing module, for buffering the converted command.
13. The peripheral device of claim 10, wherein the first combined packet comprises a first header for indicating whether the first combined packet comprises the converted command.
14. The peripheral device of claim 10, wherein the converted command is a read command, the processing procedure is a read procedure, and the performing module performs the read procedure to generate a return receipt, the peripheral device further comprises:
- a combining module for combining a second packet with the return receipt, so as to generate a second combined packet; and
- a transmitting module, coupled to the combining module, for transmitting the second combined packet to the host device.
15. The peripheral device of claim 14, further comprising a second buffer, coupled between the performing module and the combining module, for buffering the return receipt.
16. The peripheral device of claim 14, wherein the second combined packet comprises a second header for indicating whether the second combined packet comprises the return receipt.
17. The peripheral device of claim 10, wherein the converted command is a write command, and the processing procedure is a write procedure.
18. The peripheral device of claim 10, wherein an SD bus connects the peripheral device and the host device.
19. The peripheral device of claim 18, wherein the SD bus comprises a command transmission line and a data transmission line, the host device transmits the first combined packet to the peripheral device via the data transmission line.
Type: Application
Filed: Oct 7, 2008
Publication Date: Jun 25, 2009
Inventor: Chao-Yu HU (Toufen Township)
Application Number: 12/246,853
International Classification: G06F 13/42 (20060101);