Data transfer control method and controller for universal serial bus interface
First Claim
1. A data transfer control method applicable to a peripheral device that performs data communications with a host by using a plurality of endpoints via a universal serial bus interface, comprising the steps of:
- determining assignments for memories to be used as function-specified buffers and at least one common buffer that are adequately allocated to the plurality of endpoints respectively;
upon receipt of a token from the host, automatically determining a first endpoint for performing data transfer in response to the token within the plurality of endpoints;
if the common buffer is previously allocated to the first endpoint, actualizing a double buffer configuration for the first endpoint by using a pair of the function-specified buffer and the common buffer, so that the first endpoint proceeds to the data transfer in response to the token;
if the common buffer is not previously allocated to the first endpoint bus is allocated to a second endpoint within the plurality of endpoints so that the second endpoint actualizes a double buffer configuration by using a pair of the function-specified buffer and the common buffer, making a decision as to whether the function-specified buffer or the common buffer for use in the second endpoint becomes vacant so as to determine a vacant buffer from among them;
automatically allocating the vacant buffer of the second endpoint as a new common buffer to the first endpoint, which in turn actualizes a double buffer configuration by using a pair of the function-specified buffer and the new common buffer, thus performing the data transfer in response to the token; and
if a read buffer of the second endpoint corresponding to one of the function-specified buffer and the common buffer is not vacant, controlling the first endpoint to perform the data transfer using the function-specified buffer in response to the token.
4 Assignments
0 Petitions
Accused Products
Abstract
A USB device controller is applied to a peripheral device that performs data communications with a host by using a transmission endpoint and a reception endpoint via a USB interface. Herein, a USB endpoint controller performs data transmission and data reception by using the reduced number of memories, which contribute to downsizing of the circuit scale of the USB device controller. The USB endpoint controller contains a transmission control block, a reception control block and a buffer switch control block as well as the memories. The buffer switch control block controls allocation of the memories to a transmission endpoint and a reception endpoint respectively in response to a type of a token issued from the host. In response to an OUT token, the data transmission is performed on the transmission endpoint that actualizes a double buffer configuration while the reception endpoint is also available in data reception by a single buffer configuration. In response to an IN token, the data reception is performed on the reception endpoint that actualizes a double buffer configuration while the transmission endpoint is also available in data transmission by a single buffer configuration. Because of the actualization of the double buffer configuration, it is possible to perform high-speed processing in communications of data, particularly transaction data based on the updated standard of USB 2.0.
56 Citations
13 Claims
-
1. A data transfer control method applicable to a peripheral device that performs data communications with a host by using a plurality of endpoints via a universal serial bus interface, comprising the steps of:
-
determining assignments for memories to be used as function-specified buffers and at least one common buffer that are adequately allocated to the plurality of endpoints respectively;
upon receipt of a token from the host, automatically determining a first endpoint for performing data transfer in response to the token within the plurality of endpoints;
if the common buffer is previously allocated to the first endpoint, actualizing a double buffer configuration for the first endpoint by using a pair of the function-specified buffer and the common buffer, so that the first endpoint proceeds to the data transfer in response to the token;
if the common buffer is not previously allocated to the first endpoint bus is allocated to a second endpoint within the plurality of endpoints so that the second endpoint actualizes a double buffer configuration by using a pair of the function-specified buffer and the common buffer, making a decision as to whether the function-specified buffer or the common buffer for use in the second endpoint becomes vacant so as to determine a vacant buffer from among them;
automatically allocating the vacant buffer of the second endpoint as a new common buffer to the first endpoint, which in turn actualizes a double buffer configuration by using a pair of the function-specified buffer and the new common buffer, thus performing the data transfer in response to the token; and
if a read buffer of the second endpoint corresponding to one of the function-specified buffer and the common buffer is not vacant, controlling the first endpoint to perform the data transfer using the function-specified buffer in response to the token. - View Dependent Claims (2)
-
-
3. A data transfer control method applicable to a peripheral device that performs data communications with a host by using at least a pair of a transmission endpoint and a reception endpoint via a universal serial bus interface, comprising the steps of:
-
determining assignments for memories to be used as function-specified buffers such as a transmission-specified buffer and a reception-specified buffer which are respectively allocated to the transmission endpoint and the reception endpoint, and one common buffer that is shared by the transmission endpoint and the reception endpoint for actualization of a double buffer configuration respectively;
upon receipt of a token from the host, controlling the transmission endpoint or the reception endpoint to perform data transfer in response to the token;
if the common buffer is previously allocated to a first endpoint corresponding to one of the transmission endpoint and the reception endpoint, actualizing a double buffer configuration for the first endpoint by using a pair of the function-specified buffer and the common buffer, so that the first endpoint proceeds to the data transfer in response to the token;
if the common buffer is not previously allocated to the first endpoint but is allocated to a second endpoint corresponding to the other one of the transmission endpoint and the reception endpoint so that a double buffer configuration is actualized for the second endpoint by using a pair of the function-specified buffer and the common buffer, making a decision as to whether the function-specified buffer or the common buffer becomes vacant so as to determine a vacant buffer from among them;
automatically allocating the vacant buffer as a new common buffer to the first endpoint, which in turn actualizes a double buffer configuration by using a pair of the function-specified buffer and the new common buffer, thus performing the data transfer in response to the token; and
if a read buffer corresponding to one of the function-specified buffer and the common buffer that are allocated to the second endpoint is not vacant, controlling the first endpoint to perform the data transfer using the function-specified buffer in response to the token. - View Dependent Claims (4, 5)
-
-
6. A USB device controller installed in a peripheral device that performs data communications with a host by using a plurality of endpoints via a universal serial bus interface, said USB device controller comprising:
-
a plurality of memories that are respectively assigned as function-specified buffers and at least one common buffer, which are adequately allocated to the plurality of endpoints respectively;
a plurality of control devices containing at least a first control device and a second control device, each of which can actualize a double buffer configuration by using a pair of the function-specified buffer and the common buffer when performing data transfer in response to a token issued from the host, or each of which uses only the function-specified buffer thereof to perform data transfer in response to a token issued from the host; and
a buffer switch control device for if the common buffer is not allocated to the first control device for performing the data transfer in response to the token from the host, detecting a vacant buffer from among a read buffer or a write buffer in the double buffer configuration actualized by the second control device to which the common buffer is allocated, so that the buffer switch control device allocates the vacant buffer as a new common buffer to the first control device. - View Dependent Claims (7)
-
-
8. A USB device controller installed in a peripheral device that performs data communications with a host by using a plurality of endpoints via a universal serial bus interface, said USB device controller comprising:
-
a plurality of memories that are respectively assigned as function-specified buffers such as a transmission-specified buffer and a reception-specified buffer and at least one common buffer, which are adequately allocated to the plurality of endpoints such as a transmission endpoint and a reception endpoint respectively;
a plurality of control devices containing a transmission control device and a reception control device, each of which can actualize a double buffer configuration by using a pair of the function-specified buffer and the common buffer when performing data transfer in response to a token issued from the host, or each of which uses only the function-specified buffer thereof to perform data transfer in response to a token issued from the host; and
a buffer switch control device for if the common buffer is not allocated to a first control device corresponding to one of the transmission control device and the reception control device for performing the data transfer in response to the token from the host, detecting a vacant buffer from among a read buffer or a write buffer in the double buffer configuration actualized by a second control device corresponding to the other one of the transmission control device and the reception control device to which the common buffer is allocated, so that the buffer switch control device allocates the vacant buffer as a new common buffer to the first control device. - View Dependent Claims (9, 10)
-
-
11. A USB device controller applicable to a peripheral device that performs data communications with a host by using a transmission endpoint and a reception endpoint, comprising:
-
a USB interface connected with a USB bus for interconnection with the host;
a USB endpoint controller for performing data transmission and data reception by using a plurality of memories via the USB interface; and
an external bus interface connected with the peripheral device, wherein the USB endpoint controller comprises a transmission control device for controlling the data transmission using a transmission endpoint that is configured by at least one memory, a reception control device for controlling the data reception using a reception endpoint that is configured by at least one memory, and an allocation controller for controlling allocation of the memories to the transmission endpoint and the reception endpoint respectively in response to a type of a token issued from the host. - View Dependent Claims (12, 13)
-
Specification