[go: up one dir, main page]

CN101887403B - Data transmission method and device for saving memory for storing packets in USB protocol - Google Patents

Data transmission method and device for saving memory for storing packets in USB protocol Download PDF

Info

Publication number
CN101887403B
CN101887403B CN2010102189344A CN201010218934A CN101887403B CN 101887403 B CN101887403 B CN 101887403B CN 2010102189344 A CN2010102189344 A CN 2010102189344A CN 201010218934 A CN201010218934 A CN 201010218934A CN 101887403 B CN101887403 B CN 101887403B
Authority
CN
China
Prior art keywords
data
package
shared
protocol layer
data link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2010102189344A
Other languages
Chinese (zh)
Other versions
CN101887403A (en
Inventor
张倬炫
许铭勋
谢登全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Etron Technology Inc
Original Assignee
Etron Technology Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Etron Technology Inc filed Critical Etron Technology Inc
Priority to CN2010102189344A priority Critical patent/CN101887403B/en
Publication of CN101887403A publication Critical patent/CN101887403A/en
Application granted granted Critical
Publication of CN101887403B publication Critical patent/CN101887403B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

A data transmission method for saving the memory used to store packet in universal serial bus protocol is characterized by that when the transmitting end wants to transmit data load, the protocol layer of transmitting end writes the data load into the shared data load memory. The protocol layer generates corresponding file head according to the data load, writes the corresponding file head into the shared file head memory, and the data link layer of the transmitting end directly combines the file head stored in the shared file head memory and the data load stored in the shared data load memory into a packet and transmits the packet. Therefore, when the sender intends to send the corresponding data payload, the sender only needs to have a memory space equal to the size of one packet to store the packet corresponding to the data payload. Thus, memory space can be saved to reduce cost.

Description

节省USB协议中存封包的存储器的数据传输方法及装置Data transmission method and device for saving memory for storing packets in USB protocol

技术领域 technical field

本发明是有关于一种数据传输方法,更明确地说,是有关于一种可节省通用串行总线(Universal Serial Bus,USB)协议中用来储存封包的存储器的数据传输方法。The present invention relates to a data transmission method, more specifically, to a data transmission method capable of saving memory used for storing packets in the Universal Serial Bus (USB) protocol.

背景技术 Background technique

请参考图1。图1是为说明于先前技术中USB 3.0封包DP的封包格式的示意图。如图1所示,封包DP包含一档头H,以及一数据负载P。档头H包含一型态信息TP、一端点信息(end point)EP、一链路命令字元(link commandword)LW、一档头错误校验码CRCH,以及一保留区RA。数据负载P包含一数据段D,以及一数据错误校验码CRCDPlease refer to Figure 1. FIG. 1 is a schematic diagram illustrating the packet format of the USB 3.0 packet DP in the prior art. As shown in FIG. 1 , the packet DP includes a header H and a data payload P. The file header H includes type information TP, end point information (end point) EP, a link command word (link command word) LW, a file header error check code CRC H , and a reserved area RA. The data payload P includes a data segment D and a data error checking code CRC D .

型态信息TP可用来判断封包DP的封包类型。封包类型,举例来说,可为握手(handshake)、数据(data)...等。端点信息EP可用来判断封包DP所属的传输类型。举例而言,在USB协议3.0版中,包含四种传输类型:控制型传输类型(control transfer type)、中断型传输类型(interrupt transfer type)、巨量型传输类型(bulk transfer type),以及同时型传输类型(isochronous transfer type)。每种传输类型分别用来传输具有不同特性的数据,如同时型传输类型用来即时传输(real-time transfer),可应用传输语音和视讯数据,以避免所传输的语音或视讯产生不连续或不同步(延迟)的现象。链路命令字元LW用来表示数据链路的情况,且链路命令字元LW另包含一链路命令字元错误校验码CRCL与档头顺序参数(Header Sequence Number)HSEQ。链路命令字元错误校验码CRCL用来判断链路命令字元LW是否有错误。档头顺序参数HSEQ用来判断封包DP的封包顺序是否有错误。档头错误校验码CRCH用来判断档头H是否有错误。保留区RA是可用来储存使用者所自行定义的数据。The type information TP can be used to determine the packet type of the packet DP. The packet type, for example, can be handshake (handshake), data (data) . . . and so on. The endpoint information EP can be used to determine the transmission type of the packet DP. For example, in the USB protocol version 3.0, there are four transfer types: control transfer type, interrupt transfer type, bulk transfer type, and simultaneous Type transfer type (isochronous transfer type). Each transmission type is used to transmit data with different characteristics. For example, the simultaneous transmission type is used for real-time transfer, and can be applied to transmit voice and video data to avoid discontinuity or discontinuity in the transmitted voice or video. Desynchronization (delay). The link command character LW is used to indicate the status of the data link, and the link command character LW further includes a link command character error check code CRC L and a header sequence parameter (Header Sequence Number) HSEQ. The link command character error check code CRC L is used to judge whether there is an error in the link command character LW. The header sequence parameter HSEQ is used to judge whether there is any error in the packet sequence of the packet DP. The file head error check code CRC H is used to judge whether the file head H has an error. The reserved area RA can be used to store user-defined data.

数据段D提供传送端实际所传输的数据,如摄影机所传送的视讯数据与随身碟所储存的数据等。数据错误校验码CRCD用来判断数据段D是否有错误。此外,数据段D可包含N笔数据SD1~SDNThe data segment D provides data actually transmitted by the transmitting end, such as video data transmitted by the camera and data stored in the flash drive. The data error check code CRC D is used to judge whether the data segment D has an error. In addition, the data segment D may include N pieces of data SD 1 -SD N .

在先前技术中,于USB传输时,可分为传送端T与接收端R。传送端T可为一主控端(host)或一装置端(device),而接收端R则为一对应的装置端或一对应的主控端。传送端T与接收端R于传输封包时的数据处理是从最底部依序分层为物理层(physical layer)PH、数据链路层(data link layer)DL与协议层(protocollayer)PR。以下分别说明于接收端R接收封包DP与传送端T欲传送封包DP的工作原理。In the prior art, during USB transmission, it can be divided into a transmitting end T and a receiving end R. The transmitter T can be a host or a device, and the receiver R can be a corresponding device or a corresponding host. The data processing of the transmitting end T and the receiving end R when transmitting packets is layered sequentially from the bottom into physical layer (physical layer) PH, data link layer (data link layer) DL and protocol layer (protocol layer) PR. The working principles of receiving the packet DP at the receiving end R and transmitting the packet DP at the transmitting end T are respectively described below.

当接收端R接收到封包DP时,接收端R会将封包DP储存于接收端R的数据链路层DL的数据链路存储器DLM。接收端R的数据链路层DL判断封包DP的档头H正确时,接收端R的数据链路层DL会将储存于数据链路存储器DLM的封包DP复制到接收端R的协议层PR的协议存储器PRM。如此,接收端R的协议层PR可对储存于协议存储器PRM的封包DP进行后续处理。When the receiving end R receives the packet DP, the receiving end R will store the packet DP in the data link memory DLM of the data link layer DL of the receiving end R. When the data link layer DL of the receiving end R judges that the header H of the packet DP is correct, the data link layer DL of the receiving end R will copy the packet DP stored in the data link memory DLM to the protocol layer PR of the receiving end R. Protocol memory PRM. In this way, the protocol layer PR of the receiving end R can perform subsequent processing on the packet DP stored in the protocol memory PRM.

当传送端T需要传送数据负载P时,传送端T的协议层PR会根据数据负载P产生档头H,并根据档头H与数据负载P于传送端T的协议层PR的协议存储器PRM内产生封包DP。传送端T会将储存于协议存储器PRM封包DP复制到传送端T的数据链路层DL的数据链路存储器DLM。此时,传送端T的协议层PRM会通知传送端T的数据链路层DL发送储存于数据链路存储器DLM的封包DP。When the transmitting end T needs to transmit the data payload P, the protocol layer PR of the transmitting end T will generate a header H according to the data payload P, and store it in the protocol memory PRM of the protocol layer PR of the transmitting end T according to the header H and the data payload P Generate packet DP. The transmitting end T copies the packet DP stored in the protocol memory PRM to the data link memory DLM of the data link layer DL of the transmitting end T. At this time, the protocol layer PRM of the transmitting end T will notify the data link layer DL of the transmitting end T to send the packet DP stored in the data link memory DLM.

由于在先前技术中,无论是传送端T或接收端R的协议层PR与数据链路层DL皆需要有存储器来储存封包(如协议存储器PRM与数据链路存储器DLM)。也就是说,当接收或传送封包DP时,封包DP会在接收端R或传送端T占用两倍于封包DP的大小的存储器空间。如此,造成存储器不必要的浪费,而使成本上升,带给使用者极大的不便。Because in the prior art, both the protocol layer PR and the data link layer DL of the transmitting end T or the receiving end R need a memory to store packets (such as a protocol memory PRM and a data link memory DLM). That is to say, when receiving or transmitting the packet DP, the packet DP will occupy twice the size of the memory space of the packet DP at the receiving end R or the transmitting end T. In this way, unnecessary waste of memory is caused, which increases the cost and brings great inconvenience to users.

发明内容 Contents of the invention

本发明提供一种可节省通用串行总线协议中用来储存封包的存储器的数据传输方法。该数据传输方法包含一接收端接收一传送端所传送的一封包,且将该封包储存于一共用存储器、该接收端的一数据链路层对储存于该共用存储器内的该封包的一档头进行错误码校验,以得出一数据链路校验结果,并据以传送一协议层处理讯号给该接收端的一协议层,以及该接收端的该协议层根据该协议层处理讯号,直接对储存于该共用存储器内的该封包进行后续处理。The invention provides a data transmission method which can save the memory used for storing packets in the universal serial bus protocol. The data transmission method includes a receiving end receiving a packet transmitted by a transmitting end, and storing the packet in a shared memory, a data link layer of the receiving end storing a header of the packet in the shared memory Perform error code check to obtain a data link check result, and transmit a protocol layer processing signal to a protocol layer of the receiving end, and the protocol layer of the receiving end processes the signal according to the protocol layer, directly to The packets stored in the shared memory are processed later.

本发明另提供一种可节省通用串行总线协议中用来储存封包的存储器的数据传输方法。该数据传输方法包含一传送端的一协议层将一数据负载写入于一共用数据负载存储器、该传送端的该协议层根据该数据负载产生一档头,并将该档头写入一共用档头存储器,以及该传送端的一数据链路层直接将储存于该共用档头存储器内的该档头与储存于该共用数据负载存储器内的该数据负载组成一封包,并将该封包传送至一接收端。The present invention also provides a data transmission method that can save the memory used to store packets in the Universal Serial Bus protocol. The data transmission method includes a protocol layer at a transmitting end writing a data payload into a shared data payload storage, the protocol layer at the transmitting end generating a file header according to the data payload, and writing the file header into a shared file header memory, and a data link layer at the transmitting end directly compose a packet with the file header stored in the shared header memory and the data payload stored in the shared data payload memory, and transmit the packet to a receiving end.

本发明另提供一种可节省通用串行总线协议中用来储存封包的存储器的装置。该装置包含一传送装置,以及一接收装置。该传送装置包含一共用档头存储器、一共用数据负载存储器、一第一协议层装置,以及一第一数据链路层装置。该第一协议层装置,用来根据一数据负载,以产生一档头,并储存该数据负载于该共用数据负载存储器,以及储存该档头于该共用档头存储器。该第一数据链路层装置,用来直接将储存于该共用档头存储器的该档头与储存于该共用数据负载存储器的该数据负载组成一封包,并发送该封包。该接收装置,用来接收该封包。该接收装置包含一共用存储器、一第二数据链路层装置,以及一第二协议层装置。该共用存储器,用来储存该封包。该第二数据链路层装置,用来对储存于该共用存储器内的该封包的该档头进行错误码校验,以产生一数据链路校验结果,并根据该数据链路校验结果,以传送一数据链路回复讯号至该传送装置,与产生一协议层处理讯号。该第二协议层装置,用来根据该协议层处理讯号与储存于该共用存储器的该封包的该档头的一端点信息,以判断储存于该共用存储器的该封包为同时型传输类型封包。The present invention also provides a device that can save the memory used for storing packets in the Universal Serial Bus protocol. The device includes a transmitting device and a receiving device. The transmission device includes a shared header memory, a shared data payload memory, a first protocol layer device, and a first data link layer device. The first protocol layer device is used to generate a file header according to a data payload, store the data payload in the shared data payload memory, and store the file header in the shared file header memory. The first data link layer device is used for directly combining the file header stored in the shared header memory and the data payload stored in the shared data payload memory into a packet, and sending the packet. The receiving device is used for receiving the packet. The receiving device includes a shared memory, a second data link layer device, and a second protocol layer device. The shared memory is used to store the packet. The second data link layer device is used to check the error code of the header of the packet stored in the shared memory to generate a data link check result, and according to the data link check result , to send a data link reply signal to the transmitting device, and generate a protocol layer processing signal. The second protocol layer device is used to process the signal according to the protocol layer and an endpoint information of the header of the packet stored in the shared memory to determine that the packet stored in the shared memory is a simultaneous transmission type packet.

本发明另提供一种节省存储器的接收装置,该接收装置依据一通讯协议接收一封包,该封包包含一档头与一数据负载。该接收装置包含一共用存储器、一第二数据链路层装置,以及一第二协议层装置。该共用存储器包含复数个封包储存单元。该复数个封包储存单元的一第一封包储存单元储存该封包且该第一封包储存单元对应一第一存储器位址。该第二数据链路层装置电性连接于该共用存储器。该第二数据链路层装置依据该第一存储器位址来读取储存于该第一封包储存单元的该封包。该第二协议层装置电性连接于该共用存储器。该第二协议层装置依据该第一存储器位址读取储存于该第一封包储存单元的该封包。The present invention also provides a receiving device for saving memory. The receiving device receives a packet according to a communication protocol, and the packet includes a file header and a data payload. The receiving device includes a shared memory, a second data link layer device, and a second protocol layer device. The shared memory includes a plurality of packet storage units. A first packet storage unit of the plurality of packet storage units stores the packet and corresponds to a first memory address. The second data link layer device is electrically connected to the shared memory. The second data link layer device reads the packet stored in the first packet storage unit according to the first memory address. The second protocol layer device is electrically connected to the shared memory. The second protocol layer device reads the packet stored in the first packet storage unit according to the first memory address.

本发明另提供一种节省存储器的接收装置,该接收装置依据一通讯协议接收一封包,该封包包含一档头与一数据负载。该接收装置包含一数据链路存储器、一协议存储器、一第二数据链路层装置,以及一第二协议层装置。该数据链路存储器包含复数个档头储存单元,该复数个档头储存单元一第一档头储存单元储存该封包的该档头而不储存该封包的该数据负载。该第一档头储存单元对应一第二存储器位址。该协议存储器包含复数个数据负载储存单元,该复数个数据负载储存单元的一第一数据负载储存单元储存该封包的该数据负载而不储存该封包的该档头。该第一数据负载储存单元对应一第三存储器位址。该第二数据链路层装置电性连接于该数据链路存储器。该第二数据链路层装置依据该第二存储器位址来读取该封包的该档头。该第二协议层装置电性连接于该协议存储器。该第二协议层装置依据该第三存储器位址读取该封包的该数据负载。The present invention also provides a receiving device for saving memory. The receiving device receives a packet according to a communication protocol, and the packet includes a file header and a data payload. The receiving device includes a data link memory, a protocol memory, a second data link layer device, and a second protocol layer device. The data link memory includes a plurality of header storage units, a first header storage unit of the plurality of header storage units stores the header of the packet but does not store the data payload of the packet. The first head storage unit corresponds to a second memory address. The protocol memory includes a plurality of data payload storage units, and a first data payload storage unit of the plurality of data payload storage units stores the data payload of the packet but does not store the header of the packet. The first data load storage unit corresponds to a third memory address. The second data link layer device is electrically connected to the data link memory. The second data link layer device reads the header of the packet according to the second memory address. The second protocol layer device is electrically connected to the protocol memory. The second protocol layer device reads the data payload of the packet according to the third memory address.

本发明另提供一种节省存储器的传送装置。该传送装置依据一通讯协议传送一封包,该封包包含一档头与一数据负载。该传送装置包含一第一协议层装置、一共用档头存储器、一共用数据负载存储器,以及一第一数据链路层装置。该第一协议层装置用来根据该封包的该数据负载以产生该封包的该档头。该共用档头存储器电性连接于该第一协议层装置。该共用档头存储器包含复数个共用档头储存单元。该复数个共用档头储存单元的一第一共用档头储存单元储存该封包的该档头而不储存该封包的该数据负载。该第一共用档头储存单元对应一第四存储器位址。该共用数据负载存储器电性连接于该第一协议层装置。该共用数据负载存储器包含复数个共用数据负载储存单元。该复数个共用数据负载储存单元的一第一共用数据负载储存单元储存该封包的该数据负载而不储存该封包的该档头。该第一共用数据负载储存单元对应一第五存储器位址。该第一数据链路层装置电性连接于该共用数据负载存储器与该共用档头存储器。该第一数据链路层装置依据该第四存储器位址与该第五存储器位址将该档头与该数据负载组成该封包并发送该封包至该传送装置所对应的一接收装置。The present invention also provides a transmission device that saves memory. The transmission device transmits a packet according to a communication protocol, and the packet includes a file header and a data payload. The transmission device includes a first protocol layer device, a shared header memory, a shared data payload memory, and a first data link layer device. The first protocol layer device is used for generating the header of the packet according to the data payload of the packet. The common file header memory is electrically connected to the first protocol layer device. The shared file header storage includes a plurality of shared file header storage units. A first shared header storage unit of the plurality of shared header storage units stores the header of the packet but does not store the data payload of the packet. The first shared header storage unit corresponds to a fourth memory address. The shared data payload memory is electrically connected to the first protocol layer device. The shared data payload memory includes a plurality of shared data payload storage units. A first shared data payload storage unit of the plurality of shared data payload storage units stores the data payload of the packet but does not store the header of the packet. The first shared data load storage unit corresponds to a fifth memory address. The first data link layer device is electrically connected to the shared data payload memory and the shared header memory. The first data link layer device composes the packet with the header and the data payload according to the fourth memory address and the fifth memory address and sends the packet to a receiving device corresponding to the transmitting device.

附图说明 Description of drawings

图1是为说明于先前技术中USB 3.0封包的封包格式的示意图;FIG. 1 is a schematic diagram illustrating the packet format of the USB 3.0 packet in the prior art;

图2是为说明根据本发明的第一实施例的可节省USB协议中用来储存封包的存储器的数据传输方法的流程图;2 is a flow chart illustrating a data transmission method that can save memory used to store packets in the USB protocol according to the first embodiment of the present invention;

图3是为说明根据本发明的第二实施例的可节省USB协议中用来储存封包的存储器的数据传输方法的流程图;3 is a flow chart illustrating a data transmission method that can save memory used to store packets in the USB protocol according to a second embodiment of the present invention;

图4是为说明本发明的可节省USB协议中用来储存封包的存储器的装置的示意图;Fig. 4 is the schematic diagram of the device for illustrating the device of the present invention that can save the memory used to store packets in the USB protocol;

图5、图6以及图7分别为说明当已确认指针大于、小于,或等于待发送指针时的可被写入的共用档头存储器的档头储存单元的示意图;FIG. 5, FIG. 6 and FIG. 7 are schematic diagrams illustrating the header storage unit of the shared header memory that can be written when the confirmed pointer is greater than, smaller than, or equal to the pointer to be sent;

图8是为说明协议层写入档头至档头储存单元之后,设定待发送指针为对应的档头位址的示意图;Fig. 8 is a schematic diagram of setting the pointer to be sent as the corresponding file header address after the protocol layer writes the file header to the file header storage unit;

图9、图10以及图11分别为说明当待发送指针大于、小于、等于已发送指针时传送端的数据链路层需发送其所储存的数据的数据储存单元的示意图;FIG. 9, FIG. 10 and FIG. 11 are respectively schematic diagrams illustrating the data storage unit where the data link layer at the transmitting end needs to send the stored data when the pointer to be sent is greater than, smaller than, or equal to the sent pointer;

图12是为说明本发明的接收装置的另一实施例的示意图。FIG. 12 is a schematic diagram illustrating another embodiment of the receiving device of the present invention.

附图标记说明:Explanation of reference signs:

200、300-方法;201~203、301~305-步骤;400-装置;410-传送装置;411、421、521-数据链路层装置;412、422、522-协议层装置;420、520-接收装置;ADDRH_(K-1)、ADDRH_X、ADDRH_Y-档头位址;CRCH、CRCD、CRCL-错误校验码;DP-封包;D-数据段;DLM-数据链路存储器;EP-端点信息;H-档头;HM1~HMN-档头储存单元;HSEQ-档头顺序参数;LW-链路命令字元;P-数据负载;PLM1~PLMN-数据负载储存单元;PRM-协议存储器;PTRAA-已确认指针;PTRAS-已发送指针;PTRWS-待发送指针;RA-保留区;SACK-交握讯号;SDL-数据链路回复讯号;SPRP-协议层处理讯号;SD1~SDN-数据;SHHM-共用档头存储器;T-传送端;TP-型态信息。200, 300-method; 201-203, 301-305-step; 400-device; 410-transmission device; 411, 421, 521-data link layer device; 412, 422, 522-protocol layer device; 420, 520 -receiving device; ADDR H_(K-1) , ADDR H_X , ADDR H_Y -file header address; CRC H , CRC D , CRC L -error check code; DP-packet; D-data segment; DLM-data link EP-endpoint information; H-file header; HM 1 ~HM N -file header storage unit; HSEQ-file header sequence parameter; LW-link command character; P-data load; PLM 1 ~PLM N - Data payload storage unit; PRM-protocol memory; PTR AA -acknowledged pointer; PTR AS -sent pointer; PTR WS -waiting to send pointer; RA-reserved area; S ACK -handshake signal; S DL -data link reply Signal; S PRP - protocol layer processing signal; SD 1 ~ SD N - data; SHHM - shared file header memory; T - transmission end; TP - type information.

具体实施方式 Detailed ways

有鉴于此,本发明提供一种数据传输方法,无论是传送端或接收端的协议层与数据链路层皆可共用同一存储器来储存封包,以节省储存封包时所需的存储器空间,进而降低成本。In view of this, the present invention provides a data transmission method, both the protocol layer and the data link layer of the transmitting end or the receiving end can share the same memory to store the packets, so as to save the memory space required for storing the packets, thereby reducing the cost .

请参考图2。图2是为说明根据本发明的第一实施例的可节省USB协议中用来储存封包的存储器的数据传输方法200的流程图。于数据传输方法200中,设接收端R为一主控端(host)或一装置端(device),而传送端T则为对应于接收端R的一装置端或一主控端。接收端R包含一实体层PH、一数据链路层DL、一协议层PR,以及一共用存储器SHM。共用存储器SHM用来储存数据。共用存储器SHM包含封包储存单元DPM1~DPMN以及标号(flag)F1~FN。封包储存单元DPM1~DPMN用来储存封包。标号F1~FN分别用来指示封包储存单元DPM1~DPMN是否可被写入数据。数据传输方法200的步骤说明如下:Please refer to Figure 2. FIG. 2 is a flow chart illustrating a data transmission method 200 that can save memory for storing packets in the USB protocol according to the first embodiment of the present invention. In the data transmission method 200, it is assumed that the receiving end R is a host or a device, and the transmitting end T is a device or a device corresponding to the receiving end R. The receiver R includes a physical layer PH, a data link layer DL, a protocol layer PR, and a shared memory SHM. The shared memory SHM is used to store data. The shared memory SHM includes packet storage units DPM 1 -DPM N and flags F 1 -F N . The packet storage units DPM 1 -DPM N are used to store packets. The labels F 1 -F N are respectively used to indicate whether data can be written into the packet storage units DPM 1 -DPM N. The steps of the data transmission method 200 are described as follows:

步骤201:接收端R接收传送端T所传送的封包DP,且将封包DP储存于共用存储器SHM;Step 201: the receiver R receives the packet DP sent by the transmitter T, and stores the packet DP in the shared memory SHM;

步骤202:接收端R的数据链路层DL对储存于共用存储器SHM内的封包DP的档头H进行错误码校验,以得出数据链路校验结果EDL,并据以传送协议层处理讯号SPRP给接收端R的协议层PR;Step 202: The data link layer DL of the receiving end R performs an error code check on the header H of the packet DP stored in the shared memory SHM to obtain a data link check result E DL , and transmit the protocol layer accordingly Process the signal S PRP to the protocol layer PR of the receiver R;

步骤203:接收端R的协议层PR根据协议层处理讯号SPRP,直接对储存于共用存储器SHM内的封包DP进行后续处理。Step 203: The protocol layer PR of the receiving end R directly performs subsequent processing on the packet DP stored in the shared memory SHM according to the protocol layer processing signal S PRP .

于步骤201中,当接收端R接收传送端T所传送的封包DP时,接收端R会先根据标号F1~FN,以找出可被写入的封包储存单元。举例而言,当标号FK表示「可被写入」时,代表此时共用存储器SHM的封包储存单元DPMK可被写入数据;当标号FK表示「已被写入」时,代表此时共用存储器SHM的封包储存单元DPMK已经有储存数据,因此不可再被写入数据,以免覆盖掉原本储存于封包储存单元DPMK的数据。设此时标号FK表示「可被写入」,因此接收端R会将封包DP写入且储存于共用存储器SHM的封包储存单元DPMK,且接收端R会将标号FK标记为「已被写入」。In step 201, when the receiving end R receives the packet DP sent by the transmitting end T, the receiving end R will firstly find out the packet storage unit that can be written according to the labels F 1 -F N . For example, when the label F K indicates "can be written", it means that the packet storage unit DPM K of the shared memory SHM can be written into data; when the label F K indicates "has been written", it means that The packet storage unit DPM K of the time-shared memory SHM already has stored data, so data cannot be written in, so as not to overwrite the data originally stored in the packet storage unit DPM K. Assume that the label F K means "writable", so the receiving end R will write the packet DP and store it in the packet storage unit DPM K of the shared memory SHM, and the receiving end R will mark the label F K as "already be recorded".

于步骤202中,接收端R的数据链路层DL对储存于共用存储器SHM内的封包储存单元DPMK的封包DP的档头H进行错误码校验,以得出数据链路校验结果EDL。更明确地说,接收端R的数据链路层DL会依据封包DP的链路命令字元错误校验码CRCL与档头错误校验码CRCH,判断封包DP的档头H是否正确。封包DP的档头H的错误校验码CRCH可为16位元的循环冗余校验码(Cyclic Redundancy Check 16,CRC-16),而错误校验码CRCL可为5位元的循环冗余校验码(CRC-5)。数据链路层DL利用错误校验码CRCH与CRCL以分别对封包DP的档头H与链路命令字元LW进行循环冗余校验。举例来说,档头H整体的循环冗余校验,是将封包DP的档头H(包含错误校验码CRCH)除以一预定除数CRCDH,以据以得一对应的余数CRCRH。当余数CRCRH等于一预定值X(举例而言,X等于零)时,校验结果EH表示封包DP的档头H为正确;当余数CRCRH不等于预定值X时,校验结果EH表示封包DP的档头H为错误。而链路命令字元校验结果EL可以类似的方式得出。In step 202, the data link layer DL of the receiving end R performs an error code check on the header H of the packet DP stored in the packet storage unit DPM K in the shared memory SHM to obtain a data link check result E DL . More specifically, the data link layer DL of the receiving end R judges whether the file header H of the packet DP is correct or not according to the link command character error check code CRC L and the file header error check code CRC H of the packet DP. The error check code CRC H of the header H of the packet DP can be a 16-bit cyclic redundancy check code (Cyclic Redundancy Check 16, CRC-16), and the error check code CRC L can be a 5-bit cycle Redundancy check code (CRC-5). The data link layer DL uses the error check codes CRC H and CRC L to perform cyclic redundancy check on the header H and the link command character LW of the packet DP respectively. For example, the overall cyclic redundancy check of the header H is to divide the header H (including the error check code CRC H ) of the packet DP by a predetermined divisor CRC DH to obtain a corresponding remainder CRC RH . When the remainder CRC RH is equal to a predetermined value X (for example, X is equal to zero), the verification result E H indicates that the header H of the packet DP is correct; when the remainder CRC RH is not equal to the predetermined value X, the verification result E H Indicates that the header H of the packet DP is an error. The link command character verification result E L can be obtained in a similar manner.

当校验结果EL与EH中有一者为错误时,则接收端R的数据链路层DL判断档头H为错误。此时,数据链路校验结果EDL表示错误,且接收端R的数据链路层DL会发送重送讯号SLBAD至传送端T,以告知传送端T所传送的封包DP于接收端R的数据链路校验结果EDL表示错误,来使传送端T重新传送封包DP。反的,当校验结果EL与EH皆为正确时,接收端R的数据链路层DL会判断档头H为正确。此时,数据链路校验结果EDL表示正确,且接收端R的数据链路层DL会发送确认讯号SLGOOD至传送端T,以告知传送端T所传送的封包DP于接收端R的数据链路校验结果EDL表示正确。When one of the verification results E L and E H is wrong, the data link layer DL of the receiving end R judges that the file header H is wrong. At this time, the data link verification result E DL indicates an error, and the data link layer DL of the receiving end R will send a retransmission signal S LBAD to the transmitting end T to inform the transmitting end T that the packet DP transmitted by the receiving end R The data link check result E DL of the data link indicates an error, so that the transmitting end T retransmits the packet DP. Conversely, when the verification results E L and E H are both correct, the data link layer DL at the receiving end R will determine that the file header H is correct. At this time, the data link verification result E DL is correct, and the data link layer DL of the receiving end R will send an acknowledgment signal SLGOOD to the transmitting end T to inform the sending end T that the packet DP transmitted by the receiving end R The data link check result E DL is correct.

此外,当数据链路校验结果EDL表示正确时,接收端R的数据链路层DL会传送协议层处理讯号SPRP给接收端R的协议层PR。协议层处理讯号SPRP是用来指示对应于共用存储器SHM的封包储存单元DPMK的封包位址ADDR,以使协议层PR对储存于共用存储器SHM内的封包储存单元DPMK的封包DP进行后续处理。In addition, when the data link verification result E DL is correct, the data link layer DL of the receiving end R sends the protocol layer processing signal S PRP to the protocol layer PR of the receiving end R. The protocol layer processing signal S PRP is used to indicate the packet address ADDR corresponding to the packet storage unit DPM K of the shared memory SHM, so that the protocol layer PR can follow up the packet DP stored in the packet storage unit DPM K in the shared memory SHM deal with.

于步骤203中,设数据链路层DL所传送的协议层处理讯号SPRP所指示的封包位址ADDR代表「K」,因此协议层PR可根据代表「K」的封包位址ADDR,以读取对应于封包位址ADDR的共用存储器SHM的封包储存单元DPMK所储存的数据。也就是说,接收端R的协议层PR可读取封包储存单元DPMK所储存的封包DP。如此,接收端R的协议层PR可根据封包DP的档头H的端点信息EP,以接收封包DP的数据负载P以进行后续处理。In step 203, set the packet address ADDR indicated by the protocol layer processing signal SPRP transmitted by the data link layer DL to represent "K", so the protocol layer PR can read according to the packet address ADDR representing "K". The data stored in the packet storage unit DPM K of the shared memory SHM corresponding to the packet address ADDR is retrieved. That is to say, the protocol layer PR of the receiving end R can read the packet DP stored in the packet storage unit DPM K. In this way, the protocol layer PR of the receiving end R can receive the data payload P of the packet DP for subsequent processing according to the endpoint information EP of the header H of the packet DP.

更进一步地说,接收端R的协议层PR根据封包DP的档头H的端点信息EP,以判断封包DP是否为同时型传输类型封包。Furthermore, the protocol layer PR of the receiving end R judges whether the packet DP is a simultaneous transmission type packet according to the endpoint information EP of the header H of the packet DP.

当端点信息EP指示封包DP为同时型传输类型封包时,接收端R的协议层PR直接接收封包DP的数据负载P以进行后续处理。举例而言,数据负载P为传输端T传送给接收端R的语音数据,因此接收端R可直接接收封包DP的数据负载P,以根据数据负载P的语音数据来播放语音。When the endpoint information EP indicates that the packet DP is a simultaneous transmission type packet, the protocol layer PR of the receiving end R directly receives the data payload P of the packet DP for subsequent processing. For example, the data payload P is voice data transmitted from the transmitting terminal T to the receiving terminal R, so the receiving terminal R can directly receive the data payload P of the packet DP to play the voice according to the voice data of the data payload P.

当端点信息EP指示封包DP非为同时型传输类型封包时,接收端R的协议层PR对封包DP的数据负载P的数据负载错误校验码CRCD进行循环冗余校验,得出数据负载校验结果EPL,并据以发送交握(ACK)封包SACK至传送端T。其中数据负载错误校验码CRCD可为32位元的循环冗余校验码(CRC-32)。接收端R的协议层PL利用数据负载错误校验码CRCD进行循环冗余校验,以得到数据负载校验结果EPL,其工作原理与前述的数据链路层DL利用错误校验码CRCH与CRCL封包DP的档头H与链路命令字元LW进行循环冗余校验的方式类似,故不再赘述。当根据数据负载错误校验码CRCD所得到的数据负载校验结果EPL表示正确时,接收端R的协议层PR会传送交握讯号SACK至传送端T,其中交握讯号SACK包含有关封包DP的档头顺序参数HSEQ,以使传送端T可根据档头顺序参数HSEQ,判断交握讯号SACK是对应于封包DP,且此时交握讯号SACK是用来告知传送端T于接收端R中对应于封包DP的数据负载校验结果EPL表示正确(意即接收端R已正确地接收封包DP)。反的,当根据数据负载错误校验码CRCD所得到的数据负载校验结果EPL表示错误时,此时接收端R的协议层PR所传送的交握讯号SACK会告知传送端T于接收端R中对应于封包DP的数据负载校验结果EPL表示错误。如此,传送端T根据档头顺序参数HSEQ,可得知对应于档头顺序参数HSEQ的封包DP没有被接收端R正确地接收。因此,传送端T会再重新传送封包DP。When the endpoint information EP indicates that the packet DP is not a simultaneous transmission type packet, the protocol layer PR of the receiving end R performs a cyclic redundancy check on the data payload error check code CRC D of the data payload P of the packet DP to obtain the data payload Check the result E PL , and send the handshake (ACK) packet S ACK to the transmitting end T accordingly. The data load error check code CRC D may be a 32-bit cyclic redundancy check code (CRC-32). The protocol layer PL of the receiving end R uses the data load error check code CRC D to perform a cyclic redundancy check to obtain the data load check result E PL , and its working principle is the same as that of the aforementioned data link layer DL using the error check code CRC H and CRC L The header H of the CRC L packet DP performs the cyclic redundancy check in a similar way to the link command character LW, so it will not be described again. When the data load check result E PL obtained according to the data load error check code CRC D is correct, the protocol layer PR of the receiving end R will send a handshake signal S ACK to the transmitting end T, wherein the handshake signal S ACK includes The header sequence parameter HSEQ of the packet DP, so that the transmitting end T can judge that the handshake signal S ACK corresponds to the packet DP according to the header sequence parameter HSEQ, and at this time the handshaking signal S ACK is used to inform the transmitting end T The data payload check result E PL corresponding to the packet DP in the receiving end R is correct (that is, the receiving end R has correctly received the packet DP). Conversely, when the data load check result E PL obtained according to the data load error check code CRC D indicates an error, the handshake signal S ACK transmitted by the protocol layer PR of the receiving end R will inform the transmitting end T of The data payload check result E PL corresponding to the packet DP in the receiving end R indicates an error. In this way, the transmitting end T can know that the packet DP corresponding to the header sequence parameter HSEQ has not been correctly received by the receiving end R according to the header sequence parameter HSEQ. Therefore, the transmitter T will retransmit the packet DP again.

根据前述的说明可知,在本发明的数据传输方法200中,当接收端R接收封包DP时,封包DP是储存于共用存储器SHM的一封包储存单元。也就是说,当接收端R接收封包DP时,接收端R仅需要有等同于一个封包大小的存储器空间(如封包储存单元DPMK),以储存封包DP。如此,可节省储存封包时所需的存储器空间,来降低成本。According to the foregoing description, in the data transmission method 200 of the present invention, when the receiving end R receives the packet DP, the packet DP is stored in a packet storage unit of the shared memory SHM. That is to say, when the receiving end R receives the packet DP, the receiving end R only needs a memory space equivalent to the size of one packet (such as the packet storage unit DPM K ) to store the packet DP. In this way, the memory space required for storing the packets can be saved, thereby reducing the cost.

此外,根据数据传输方法200的基本精神可衍生出另一实施例。于另一实施例中,前述的共用存储器SHM中每一封包储存单元DPM1~DPMN可分成两个主要部份,第一部份是储存档头,第二部份用来储存数据负载。以下将作更进一步地说明。In addition, another embodiment can be derived according to the basic spirit of the data transmission method 200 . In another embodiment, each packet storage unit DPM 1 -DPM N in the aforementioned shared memory SHM can be divided into two main parts, the first part is used to store the file header, and the second part is used to store the data payload. Further explanation will be given below.

共用存储器SHM包含一数据链路存储器DLM,以及一协议存储器PRM。数据链路存储器DLM包含档头储存单元HM1~HMN。档头储存单元HM1~HMN用来储存档头。档头储存单元HM1~HMN分别包含共用档头标号FH1~~FHN。共用档头标号FH1~FHN分别用来指示档头储存单元HM1~HMN是否可被写入数据。协议存储器PRM包含数据负载储存单元PLM1~PLMN。数据负载储存单元PLM1~PLMN用来储存数据负载。数据负载储存单元PLM1~PLMN分别包含共用数据负载标号FPL1~FPLN。共用数据负载标号FPL1~FPLN是分别用来指示数据负载储存单元PLM1~PLMN是否可被写入数据。The shared memory SHM includes a data link memory DLM and a protocol memory PRM. The data link memory DLM includes header storage units HM 1 -HM N . The gear head storage units HM 1 -HM N are used to store gear heads. The file header storage units HM 1 ˜HM N respectively contain common file header labels F H1 ˜F HN . The common header labels F H1 ˜ F HN are respectively used to indicate whether data can be written into the header storage units HM 1 ˜HM N. The protocol memory PRM includes data payload storage units PLM 1 -PLM N . The data load storage units PLM 1 -PLM N are used for storing data loads. The data payload storage units PLM 1 ˜PLM N respectively include common data payload labels F PL1 ˜F PLN . The shared data load labels F PL1 -F PLN are respectively used to indicate whether the data load storage units PLM 1 -PLM N can be written into.

类似于步骤201,当接收端R接收传送端T所传送的封包DP时,接收端R会先根据共用档头标号FH1~FHN,以找出可被写入的档头储存单元,以及根据共用数据负载标号FPL1~FPLN以找出可被写入的数据负载储存单元。举例而言,当共用档头标号FHK表示「可被写入」时,代表此时数据链路存储器DLM的档头储存单元HMK可被写入数据;当共用档头标号FHK表示「已被写入」时,代表此时数据链路存储器DLM的档头储存单元HMK已经有储存数据,因此不可再被写入数据,以免覆盖掉原本储存于档头储存单元HMK的数据。利用类似的方法可根据共用数据负载标号FPL1~FPLN以找出可被写入的数据负载储存单元,故不再赘述。Similar to step 201, when the receiving end R receives the packet DP transmitted by the transmitting end T, the receiving end R will first find out the file header storage unit that can be written according to the common file header labels F H1 ˜F HN , and According to the shared data load labels F PL1 ˜F PLN , the writable data load storage units are found. For example, when the common file header label F HK indicates "can be written", it means that data can be written into the file header storage unit HM K of the data link memory DLM at this time; when the common file header label F HK indicates " When "has been written", it means that the header storage unit HM K of the data link memory DLM has stored data at this time, so the data cannot be written in again, so as not to overwrite the data originally stored in the header storage unit HM K. A similar method can be used to find the writable data load storage unit according to the shared data load labels F PL1 ˜F PLN , so details are not repeated here.

设此时共用档头标号FHK与共用数据负载标号FPLK皆表示「可被写入」,因此接收端R会将封包DP的档头H写入且储存于数据链路存储器DLM的档头储存单元HMK,将封包DP的数据负载P写入且储存于协议存储器PRM的数据负载储存单元PLMK,且接收端R会将共用档头标号FHK与共用数据负载标号FPLK皆标记为「已被写入」。Assume that the common file header label F HK and the shared data load label F PLK both indicate "writable", so the receiving end R will write the file header H of the packet DP and store it in the file header of the data link memory DLM The storage unit HM K writes and stores the data payload P of the packet DP into the data payload storage unit PLM K of the protocol memory PRM, and the receiving end R marks both the common file header label F HK and the common data payload label F PLK as "Written".

类似于步骤202,接收端R的数据链路层DL对储存于数据链路存储器DLM内的档头储存单元HMK的封包DP的档头H进行错误码校验,以得出数据链路校验结果EDL。更明确地说,接收端R的数据链路层DL会依据封包DP的链路命令字元错误校验码CRCL与档头错误校验码CRCH,判断封包DP的档头H是否正确。数据链路层DL利用错误校验码CRCH与CRCL以分别对封包DP的档头H与链路命令字元LW进行循环冗余校验,以分别得到校验结果EH与EL。其工作原理如同前述说明,故不再赘述。Similar to step 202, the data link layer DL of the receiving end R performs an error code check on the header H of the packet DP stored in the header storage unit HM K in the data link memory DLM to obtain the data link calibration Test result E DL . More specifically, the data link layer DL of the receiving end R judges whether the file header H of the packet DP is correct or not according to the link command character error check code CRC L and the file header error check code CRC H of the packet DP. The data link layer DL uses the error check codes CRC H and CRC L to perform cyclic redundancy check on the header H and the link command character LW of the packet DP respectively, so as to obtain check results E H and E L respectively. Its working principle is the same as the foregoing description, so it will not be repeated.

当校验结果EL与EH中有一者为错误时,则接收端R的数据链路层DL判断档头H为错误。此时,数据链路校验结果EDL表示错误,且接收端R的数据链路层DL会发送重送讯号SLBAD至传送端T,以告知传送端T所传送的封包DP于接收端R的数据链路校验结果EDL表示错误,来使传送端T重新传送封包DP。反之,当校验结果EL与EH皆为正确时,接收端R的数据链路层DL会判断档头H为正确。此时,数据链路校验结果EDL表示正确,且接收端R的数据链路层DL会发送确认讯号SLGOOD至传送端T,以告知传送端T所传送的封包DP于接收端R的数据链路校验结果EDL表示正确。When one of the verification results E L and E H is wrong, the data link layer DL of the receiving end R judges that the file header H is wrong. At this time, the data link verification result E DL indicates an error, and the data link layer DL of the receiving end R will send a retransmission signal S LBAD to the transmitting end T to inform the transmitting end T that the packet DP transmitted by the receiving end R The data link check result E DL of the data link indicates an error, so that the transmitting end T retransmits the packet DP. Conversely, when the verification results E L and E H are both correct, the data link layer DL at the receiving end R will determine that the file header H is correct. At this time, the data link verification result E DL is correct, and the data link layer DL of the receiving end R will send an acknowledgment signal SLGOOD to the transmitting end T to inform the sending end T that the packet DP transmitted by the receiving end R The data link check result E DL is correct.

此外,当数据链路校验结果EDL表示正确时,接收端R的数据链路层DL会传送协议层处理讯号SPRP给接收端R的协议层PR。协议层处理讯号SPRP是用来指示对应于数据链路存储器DLM的档头储存单元HMK的档头位址ADDRH以及协议存储器PRM的数据负载储存单元PLMK的数据负载位址ADDRPLIn addition, when the data link verification result E DL is correct, the data link layer DL of the receiving end R sends the protocol layer processing signal S PRP to the protocol layer PR of the receiving end R. The protocol layer processing signal S PRP is used to indicate the header address ADDR H corresponding to the header storage unit HM K of the data link memory DLM and the data payload address ADDR PL of the data payload storage unit PLM K of the protocol memory PRM.

类似于步骤203,协议层PR可根据数据链路层DL所传送的协议层处理讯号SPRP所指示的档头位址ADDRH与数据负载位址ADDRPL,以分别读取储存于数据链路存储器DLM的档头储存单元HMK的封包DP的档头H,以及储存于协议存储器PRM的数据负载储存单元PLMK的封包DP的数据负载P。因此,协议层PR可将档头H与数据负载P组成封包DP后,根据封包DP的档头H的端点信息EP,以判断封包DP是否为同时型传输类型封包,并对封包DP进行后续处理。其后续处理的方法与前述说明类似,故不再赘述。Similar to step 203, the protocol layer PR can process the header address ADDR H and the data load address ADDR PL indicated by the signal S PRP according to the protocol layer transmitted by the data link layer DL, so as to respectively read and store in the data link The header H of the packet DP stored in the header storage unit HM K of the memory DLM, and the data payload P of the packet DP stored in the data payload storage unit PLM K of the protocol memory PRM. Therefore, the protocol layer PR can compose the packet DP with the header H and the data payload P, and judge whether the packet DP is a simultaneous transmission type packet according to the endpoint information EP of the header H of the packet DP, and perform subsequent processing on the packet DP . The subsequent processing method is similar to the foregoing description, so it will not be repeated here.

因此,在本实施例中,当接收端R接收封包DP时,封包DP的档头H是储存于数据链路存储器DLM的一档头储存单元,且封包DP的数据负载P是储存于协议存储器DLM的一数据负载储存单元。也就是说,当接收端R接收封包DP时,接收端R仅需要有等同于一个封包大小的存储器空间(如档头储存单元HMK加上数据负载储存单元PLMK),以储存封包DP。如此,可节省储存封包时所需的存储器空间,来降低成本。Therefore, in this embodiment, when the receiving end R receives the packet DP, the header H of the packet DP is stored in a header storage unit of the data link memory DLM, and the data load P of the packet DP is stored in the protocol memory A data load storage unit of the DLM. That is to say, when the receiving end R receives the packet DP, the receiving end R only needs a memory space equivalent to the size of one packet (such as the header storage unit HM K plus the data load storage unit PLM K ) to store the packet DP. In this way, the memory space required for storing the packets can be saved, thereby reducing the cost.

请参考图3。图3是为说明根据本发明的第二实施例的可节省USB协议中用来储存封包的存储器的数据传输方法300的流程图。于数据传输方法300中,设传送端T可为一主控端或一装置端,而接收端R则为对应于传送端T的一装置端或一主控端。传送端T包含一实体层PH、一数据链路层DL、一协议层PR、一共用档头存储器SHHM,以及一共用数据负载存储器SHPM。共用数据负载存储器SHPM包含数据负载储存单元PLM1~PLMN以及共用数据负载标号FPL1~FPLN。数据负载储存单元PLM1~PLMN用来储存数据负载。共用数据负载标号FPL1~FPLN是分别用来指示数据负载储存单元PLM1~PLMN是否可被写入数据。举例而言,当共用数据负载标号FPLK表示「可被写入」时,代表此时共用数据负载存储器SHPM的数据负载储存单元PLMK可被写入数据;当共用数据负载标号FPLK表示「已被写入」时,代表此时共用数据负载存储器SHPM的数据负载储存单元PLMK已经有储存数据,因此不可再被写入数据,以避免覆盖掉原本储存于数据负载储存单元PLMK的数据。共用档头存储器SHHM包含档头储存单元HM1~HMN、一待发送指针PTRWS、一已发送指针PTRAS,以及一已确认指针PTRAA。档头储存单元HM1~HMN用来储存档头。待发送指针PTRWS是用来指示在档头储存单元HM1~HMN之中,需要传送端T将所储存的数据传送至接收端R的档头储存单元。已发送指针PTRAS是用来指示在档头储存单元HM1~HMN之中,传送端T已经将所储存的数据传送至接收端R的档头储存单元。已确认指针PTRAA是用来指示在档头储存单元HM1~HMN之中,传送端T已经将所储存的数据传送至接收端R,且传送端T也接收到接收端R所传送的对应的代表正确地接收的交握讯号SACK的档头储存单元。数据传输方法300的步骤说明如下:Please refer to Figure 3. FIG. 3 is a flow chart illustrating a data transmission method 300 that can save memory for storing packets in the USB protocol according to a second embodiment of the present invention. In the data transmission method 300 , it is assumed that the transmitting end T may be a host end or a device end, and the receiving end R is a device end corresponding to the transmitting end T or a master end. The transmitting end T includes a physical layer PH, a data link layer DL, a protocol layer PR, a shared header memory SHHM, and a shared data payload memory SHPM. The shared data payload memory SHPM includes data payload storage units PLM 1 ˜PLM N and shared data payload labels F PL1 ˜F PLN . The data load storage units PLM 1 -PLM N are used for storing data loads. The shared data load labels F PL1 -F PLN are respectively used to indicate whether the data load storage units PLM 1 -PLM N can be written into. For example, when the shared data load label F PLK indicates "can be written", it means that data can be written into the data load storage unit PLM K of the shared data load memory SHPM at this time; when the shared data load label F PLK indicates " When "has been written", it means that the data load storage unit PLM K of the shared data load memory SHPM has stored data at this time, so the data cannot be written any more to avoid overwriting the data originally stored in the data load storage unit PLM K . The shared header memory SHHM includes header storage units HM 1 ˜HM N , a pointer to send PTR WS , a pointer to sent PTR AS , and an acknowledged pointer PTR AA . The gear head storage units HM 1 -HM N are used to store gear heads. The to-be-sent pointer PTR WS is used to indicate that among the header storage units HM 1 -HM N , the data stored in the transmitting end T is required to be transmitted to the header storage unit R of the receiving end. The sent pointer PTR AS is used to indicate that among the header storage units HM 1 -HM N , the transmitting end T has transmitted the stored data to the header storage unit of the receiving end R. The confirmed pointer PTR AA is used to indicate that in the file header storage units HM 1 ~ HM N , the transmitting terminal T has transmitted the stored data to the receiving terminal R, and the transmitting terminal T has also received the data transmitted by the receiving terminal R The corresponding header storage unit represents the correctly received handshake signal S ACK . The steps of the data transmission method 300 are described as follows:

步骤301:传送端T的协议层PR将数据负载P写入于共用数据负载存储器SHPM;Step 301: The protocol layer PR of the transmitter T writes the data payload P into the shared data payload memory SHPM;

步骤302:传送端T的协议层PR根据数据负载P产生档头H,并将档头H写入共用档头存储器SHHM;Step 302: The protocol layer PR of the transmitting end T generates a file header H according to the data load P, and writes the file header H into the shared file header memory SHHM;

步骤303:传送端T的数据链路层DL直接将储存于共用档头存储器SHHM内的档头H与储存于共用数据负载存储器SHPM内的数据负载P组成一封包DP,并将封包DP传送至接收端R;Step 303: The data link layer DL at the transmitting end T directly forms a packet DP from the header H stored in the shared header memory SHHM and the data payload P stored in the shared data payload memory SHPM, and sends the packet DP to Receiver R;

步骤304:传送端T的数据链路层DL根据接收端R所传送的对应于封包DP的数据链路回复讯号SDL,以判断是否要重新传送封包DP;Step 304: The data link layer DL of the transmitting end T determines whether to retransmit the packet DP according to the data link reply signal S DL corresponding to the packet DP transmitted by the receiving end R;

步骤305:传送端T的协议层PR根据接收端R所传送的对应于封包DP的交握讯号SACK,以进行后续处理。Step 305: The protocol layer PR of the transmitter T performs subsequent processing according to the handshake signal S ACK corresponding to the packet DP transmitted by the receiver R.

于步骤301中,当传送端T欲传送数据负载P,传送端T的协议层PR会根据共用数据负载标号FPL1~FPLN,以找出可被写入的数据负载储存单元。举例而言,设此时共用数据负载标号FPLK表示「可被写入」,因此传送端T会将封包DP写入且储存于共用数据负载存储器SHPM的数据负载储存单元PLMK,且传送端T会将共用数据负载标号FPLK标记为「已被写入」。In step 301, when the transmitting end T intends to transmit the data payload P, the protocol layer PR of the transmitting end T finds the data payload storage unit that can be written according to the shared data payload labels F PL1 ˜F PLN . For example, assuming that the shared data payload label F PLK indicates “writable”, the transmitter T will write the packet DP into the data payload storage unit PLM K of the shared data payload memory SHPM, and the transmitter T T will mark the common data payload label F PLK as "written".

于步骤302中,传送端T的协议层PR根据数据负载P与对应于数据负载储存单元PLMK的数据负载位址信息DADDR_PL,以产生档头H。举例而言,当数据负载P是为传送端T欲传送给接收端R的控制命令,协议层PR设定档头H的端点信息EP代表控制型传输类型;当数据负载P是为传送端T欲传送给接收端R的语音或视讯数据,协议层PR设定档头H的端点信息EP代表同时型传输类型。协议层PR除了产生USB协议中所规范的档头H所包含的信息(如型态信息TP、端点信息EP、链路命令字元LW、错误校验码CRCL与CRCH、档头顺序参数HSEQ等)的外,协议层PR还会在档头H的保留区RA写入用来指示数据负载储存单元PLMK的数据负载位址ADDRPL_K的数据负载位址信息DADDR_PLIn step 302, the protocol layer PR of the transmitter T generates a header H according to the data payload P and the data payload address information D ADDR_PL corresponding to the data payload storage unit PLM K. For example, when the data payload P is a control command that the transmitter T intends to transmit to the receiver R, the protocol layer PR sets the endpoint information EP of the header H to represent the control transmission type; when the data payload P is a control command for the transmitter T For voice or video data to be transmitted to the receiving end R, the protocol layer PR sets the endpoint information EP in the header H to represent the simultaneous transmission type. In addition to generating the information contained in the file header H specified in the USB protocol (such as the type information TP, the endpoint information EP, the link command character LW, the error check code CRC L and CRC H , and the file header sequence parameters), the protocol layer PR generates HSEQ, etc.), the protocol layer PR also writes data load address information D ADDR_PL for indicating the data load address ADDR PL_K of the data load storage unit PLM K in the reserved area RA of the file header H.

传送端T的协议层PR根据待发送指针PTRWS与已确认指针PTRAA以找到可被写入的共用档头存储器SHHM的档头储存单元。图5、图6以及图7分别为说明当已确认指针PTRAA大于、小于,或等于待发送指针PTRWS时的可被写入的共用档头存储器SHHM的档头储存单元的示意图。举例而言,设待发送指针PTRWS是为档头储存单元HM(K-1)的档头位址ADDRH_(K-1),而已确认指针PTRAA是为档头储存单元HMX的档头位址ADDRH_X。在图5中,档头位址ADDRH_X大于档头ADDRH_(K-1),此时表示档头储存单元HMK~HMX是可被写入数据,而其他储存单元则已有储存数据。在图6中,档头位址ADDRH_X小于档头ADDRH_(K-1),此时表示HM1~HMX与HMK~HMN是可被写入数据,而其他储存单元则已有储存数据。在图7中,档头位址ADDRH_X等于档头ADDRH_(K-1),此时表示HM1~HMN皆可被写入数据。设于步骤302中,待发送指针PTRWS是为档头储存单元HM(K-1)的档头位址ADDRH_(K-1)且已确认指针PTRAA也等于档头位址ADDRH_(K-1),则协议层PR可将档头H写入档头储存单元HMK,且协议层PR写入档头H至档头储存单元HMK之后,会设定待发送指针PTRWS为档头储存单元HMK的档头位址ADDRH_K(如图8所示)。The protocol layer PR of the transmitting end T finds the file header storage unit of the shared file header memory SHHM that can be written according to the pending pointer PTR WS and the acknowledged pointer PTR AA . FIG. 5 , FIG. 6 and FIG. 7 are schematic diagrams respectively illustrating the header storage unit of the shared header memory SHHM that can be written when the confirmed pointer PTR AA is greater than, smaller than, or equal to the pending pointer PTR WS . For example, assume that the pointer to be sent PTR WS is the address ADDR H_ (K-1) of the file head storage unit HM (K -1), and the confirmed pointer PTR AA is the file of the file head storage unit HM X Header address ADDR H_X . In Figure 5, the head address ADDR H_X is greater than the head ADDR H_(K-1) , which means that the head storage units HM K ~ HM X can be written into data, while other storage units have stored data . In Fig. 6, the address ADDR H_X of the file head is smaller than the address ADDR H_(K-1) of the file head, which means that HM 1 ~ HM X and HM K ~ HM N can be written into data, while other storage units already have Store data. In FIG. 7 , the head address ADDR H_X is equal to the head ADDR H_(K-1) , which means that data can be written into HM 1 ˜HM N. Assumed in step 302, the pointer PTR WS to be sent is the head address ADDR H_( K-1) of the head storage unit HM ( K-1) and the confirmed pointer PTR AA is also equal to the head address ADDR H_( K-1) , then the protocol layer PR can write the file header H into the file header storage unit HM K , and after the protocol layer PR writes the file header H to the file header storage unit HM K , the pointer PTR WS to be sent will be set as The head address ADDR H_K of the head storage unit HM K (as shown in FIG. 8 ).

于步骤303中,传送端T的数据链路层DL根据待发送指针PTRWS与已发送指针PTRAS,以判断在共用档头存储器SHHM的档头储存单元HM1~HMN之中,需传送端T的数据链路层DL发送其所储存的数据的数据储存单元。图9、图10以及图11分别为说明当待发送指针PTRWS大于、小于、等于已发送指针PTRAS时传送端T的数据链路层DL需发送其所储存的数据的数据储存单元的示意图。举例而言,假设此时待发送指针PTRWS所指示的位址为档头储存单元HMK的档头位址ADDRH_K,而已发送指针PTRASS为档头储存单元HMY的档头位址ADDRH_Y。由图9可看出,若档头位址ADDRK大于档头位址ADDRH_Y,则表示传送端T需发送对应于档头储存单元HM(Y+1)~HMK所储存的档头的封包。由图10可看出,若档头位址ADDRH_K小于档头位址ADDRH_Y,则表示传送端T需发送对应于档头储存单元HM(Y+1)~HMN与HM1~HMK所储存的档头的封包。由图11可看出,若档头位址ADDRH_K等于档头位址ADDRH_Y,则表示传送端T目前没有需要发送的封包。In step 303, the data link layer DL of the transmitting end T judges that among the header storage units HM 1 -HM N of the shared header memory SHHM, there is a need to send The data link layer DL of the terminal T transmits its stored data to the data storage unit. Fig. 9, Fig. 10 and Fig. 11 are schematic diagrams illustrating the data storage unit where the data link layer DL of the transmitting end T needs to send the stored data when the pointer to be sent PTR WS is greater than, smaller than, or equal to the pointer PTR AS that is sent . For example, assume that the address indicated by the pointer PTR WS to be sent at this time is the address ADDR H_K of the header storage unit HM K , and the sent pointer PTR ASS is the address ADDR of the header storage unit HM Y H_Y . It can be seen from FIG. 9 that if the address ADDR K of the file head is greater than the address ADDR H_Y of the file head, it means that the transmitting end T needs to send the data corresponding to the file head stored in the file head storage unit HM (Y+1) ~ HM K packet. It can be seen from FIG. 10 that if the head address ADDR H_K is smaller than the head address ADDR H_Y , it means that the transmitting end T needs to send the corresponding head storage units HM (Y+1) ~ HM N and HM 1 ~ HM K Packets of stored file headers. It can be seen from FIG. 11 that if the header address ADDR H_K is equal to the header address ADDR H_Y , it means that the transmitting end T has no packets to send at present.

当传送端T的数据链路层DL根据待发送指针PTRWS与已发送指针PTRAS,判断需发送对应于档头储存单元HMK所储存的档头H的封包后,传送端T的数据链路层DL会读取储存于档头储存单元HMK所储存的档头H。传送端T的数据链路层DL根据档头H的保留区RA的数据负载位址信息DADDR_PL,以得到储存于共用数据负载存储器SHPM的数据负载储存单元PLMK的数据负载位址ADDRPL_K。如此,传送端T的数据链路层DL可根据数据负载位址ADDRPL_K,以读取储存于数据负载储存单元PLMK的数据负载P,并将数据负载P与档头H组成一封包DP,以将封包DP传送至接收端R。When the data link layer DL of the transmitting end T judges that the packet corresponding to the file header H stored in the file header storage unit HM K needs to be sent according to the pointer to be sent PTR WS and the sent pointer PTR AS , the data link layer of the transmitting end T The road layer DL reads the header H stored in the header storage unit HM K. The data link layer DL of the transmitting end T obtains the data payload address ADDR PL_K stored in the data payload storage unit PLM K of the shared data payload memory SHPM according to the data payload address information D ADDR_PL of the reserved area RA of the file header H. In this way, the data link layer DL of the transmitting end T can read the data payload P stored in the data payload storage unit PLM K according to the data payload address ADDR PL_K , and compose the data payload P and the file header H into a packet DP, to send the packet DP to the receiving end R.

于步骤304中,当接收端R所传送的数据链路回复讯号SDL是为重送讯号SLBAD时,此时传送端T的数据链路层DL可根据已确认指针PTRAA以调整已发送指针PTRAS,以使数据链路层DL重新传送封包DP。以下将作更进一步地说明。In step 304, when the data link reply signal S DL transmitted by the receiving end R is a retransmission signal S LBAD , the data link layer DL of the transmitting end T can adjust the sent Pointer PTR AS to make the data link layer DL retransmit the packet DP. Further explanation will be given below.

由于传送端T的数据链路层DL是根据已确认指针PTRAA与已发送指针PTRAS,以判断在档头储存单元HM1~HMN中,已传送过数据但尚未接收到接收端R所传送的代表正确地接收的交握讯号SACK的档头储存单元。举例而言,设已确认指针PTRAA所指示的位址为档头储存单元HMZ的档头位址ADDRH_Z,而已发送指针PTRAS所指示的位址为档头储存单元HMK的档头位址ADDRH_K。若档头位址ADDRH_K大于档头位址ADDRH_Z,则表示传送端T已发送对应于档头储存单元HMZ~HMK所储存的档头的封包,但尚未接收到接收端R所传送的代表正确地接收的交握讯号SACK;若档头位址ADDRH_K小于档头位址ADDRH_Z,则表示传送端T已发送对应于档头储存单元HMZ~HMN与HM1~HMK所储存的档头的封包,但尚未接收到接收端R所传送的代表正确地接收的交握讯号SACK的档头储存单元;若档头位址ADDRH_K等于档头位址ADDRH_Z,则表示针对对应于传送端T所发送的封包,皆已接收到接收端R所传送的代表正确地接收的交握讯号SACKSince the data link layer DL of the transmitting end T judges that in the header storage units HM 1 -HM N , data has been transmitted but not yet received by the receiving end R according to the confirmed pointer PTR AA and the sent pointer PTR AS . The transmitted header storage unit represents the correctly received handshake signal S ACK . For example, assume that the address indicated by the confirmed pointer PTR AA is the address ADDR H_Z of the file header storage unit HM Z , and the address indicated by the sent pointer PTR AS is the file header of the file header storage unit HM K Address ADDR H_K . If the file header address ADDR H_K is greater than the file header address ADDR H_Z , it means that the transmitting end T has sent the packet corresponding to the file header stored in the file header storage units HM Z ~ HM K , but has not yet received the packet sent by the receiving end R represents the correctly received handshake signal S ACK ; if the head address ADDR H_K is less than the head address ADDR H_Z , it means that the transmitting end T has sent the corresponding head storage units HM Z ~ HM N and HM 1 ~ HM K stores the header packet, but has not yet received the header storage unit representing the correctly received handshake signal S ACK sent by the receiving end R; if the header address ADDR H_K is equal to the header address ADDR H_Z , It means that the handshake signal S ACK sent by the receiving end R representing correct reception has been received for the packets corresponding to the sending end T.

设于步骤304中,已确认指针PTRAA所指示的位址为档头储存单元HM(K-1)的档头位址ADDRH_(K-1),且已发送指针PTRAS所指示的位址为档头储存单元HMK的档头位址ADDRH_K。此时,若数据链路回复讯号SDL是为重送讯号SLBAD时,表示重送讯号SLBAD是对应于档头储存单元HMK所储存的档头H的封包DP,因此数据链路层DL可将已发送指针PTRAS设为已确认指针PTRAA(意即档头位址ADDRH_(K-1))。如此一来,如同前述(于步骤303)的说明,当数据链路层DL根据待发送指针PTRWS与已发送指针PTRAS,以判断在共用档头存储器SHHM的档头储存单元HM1~HMN之中,数据链路层DL需发送其所储存的数据的数据储存单元时,由于此时待发送指针PTRWS仍为档头位址ADDRH_K而已发送指针PTRAS已被重新设定为档头位址ADDRH_(K-1),因此数据链路层DL会以类似于步骤303的说明的方式重新发送封包DP。Assuming in step 304, it has been confirmed that the address indicated by the pointer PTR AA is the head address ADDR H_ (K-1) of the file head storage unit HM ( K-1), and the bit indicated by the pointer PTR AS has been sent The address is the head address ADDR H_K of the head storage unit HM K. At this time, if the data link reply signal S DL is the retransmission signal S LBAD , it means that the retransmission signal S LBAD corresponds to the packet DP of the file header H stored in the file header storage unit HM K , so the data link layer DL can set the sent pointer PTR AS as the acknowledged pointer PTR AA (that is, the header address ADDR H_(K-1) ). In this way, as described above (in step 303), when the data link layer DL judges the file header storage units HM 1 -HM in the shared file header memory SHHM according to the pointer to be sent PTR WS and the pointer PTR AS to be sent Among N , when the data link layer DL needs to send the data storage unit of its stored data, because the pointer PTR WS to be sent is still the file head address ADDR H_K at this moment, the sent pointer PTR AS has been reset to the file The header address is ADDR H_(K−1) , so the data link layer DL resends the packet DP in a manner similar to that described in step 303 .

于步骤305中,由于交握讯号SACK是包含有关对应于封包DP的档头顺序参数HSEQ的信息,因此协议层PR可先根据交握讯号SACK所指示的档头顺序参数HSEQ,以判断交握讯号SACK是对应于封包DP。In step 305, since the handshake signal S ACK contains information about the header sequence parameter HSEQ corresponding to the packet DP, the protocol layer PR can first judge according to the header sequence parameter HSEQ indicated by the handshake signal S ACK The handshake signal S ACK corresponds to the packet DP.

当协议层PR判断交握讯号SACK是指示封包DP已被正确地接收时,协议层PR可调整已确认指针PTRAA,以释放用来储存封包DP的档头H的档头储存单元。举例而言,设封包DP的档头H储存于共用档头存储器SHHM的档头储存单元HMK,因此协议层PR会将已确认指针PTRAA设定为档头储存单元HMK的档头位址ADDRH_K,以表示针对对应于档头储存单元HMK所储存的档头H的封包DP,传送端T已接收到接收端R所传送的代表正确地接收的交握讯号SACK。由于根据步骤302的说明可知,协议层PR根据已确认指针PTRAA与待发送指针PTRWS,以判断共用档头存储器SHHM的档头储存单元HM1~HMN是否可被写入,因此当协议层PR设定已确认指针PTRAA为共用档头存储器SHHM的档头储存单元HMK的档头位址ADDRH_K时,表示协议层PR会判断档头储存单元HMK可被写入数据(意即释放共用档头存储器SHHM的档头储存单元HMK)。When the protocol layer PR judges that the handshake signal S ACK indicates that the packet DP has been received correctly, the protocol layer PR can adjust the acknowledged pointer PTR AA to release the header storage unit for storing the header H of the packet DP. For example, assume that the header H of the packet DP is stored in the header storage unit HM K of the shared header memory SHHM, so the protocol layer PR will set the confirmed pointer PTR AA as the header location of the header storage unit HM K address ADDR H_K to indicate that for the packet DP corresponding to the header H stored in the header storage unit HM K , the transmitting end T has received the handshake signal S ACK sent by the receiving end R representing correct reception. As can be seen from the description of step 302, the protocol layer PR judges whether the file header storage units HM 1 -HM N of the shared file header memory SHHM can be written according to the confirmed pointer PTR AA and the pending pointer PTR WS , so when the protocol When the layer PR sets the confirmed pointer PTR AA as the file header address ADDR H_K of the file header storage unit HM K of the shared file header memory SHHM, it means that the protocol layer PR will judge that the file header storage unit HM K can be written into data (meaning That is, the file header storage unit HM K of the shared file header memory SHHM is released.

此外,协议层PR可根据档头H的数据负载位址信息DADDR_PL,以得到数据负载位址ADDRPL_K。如此,协议层PR根据数据负载位址ADDRPL_K,可将对应于共用数据负载存储器SHPM的数据负载储存单元PLMK的共用数据负载标号FPL_K,标记为「可被写入」,以释放共用数据负载存储器SHPM的数据负载储存单元PLMKIn addition, the protocol layer PR can obtain the data payload address ADDR PL_K according to the data payload address information D ADDR_PL of the file header H. In this way, the protocol layer PR can mark the shared data load label F PL_K corresponding to the data load storage unit PLM K of the shared data load memory SHPM as “writable” according to the data load address ADDR PL_K to release the shared data Data load storage unit PLM K of the load memory SHPM.

因此,由前述的说明可知,当协议层PR判断交握讯号SACK是指示封包DP已被正确地接收时,协议层PR会调整已确认指针PTRAA与共用数据负载存储器SHPL中用来储存封包DP的数据负载P的数据负载储存单元PLMK所对应的共用数据负载标号FPL_K,以释放在共用档头存储器SHHM中用来储存封包DP的档头H的档头储存单元HMK与共用数据负载存储器SHPM中用来储存封包DP的数据负载P的数据负载储存单元PLMKTherefore, it can be known from the foregoing description that when the protocol layer PR judges that the handshake signal S ACK indicates that the packet DP has been received correctly, the protocol layer PR will adjust the acknowledged pointer PTR AA and the shared data load memory SHPL to store the packet The shared data load label F PL_K corresponding to the data load storage unit PLM K of the data load P of the DP is used to release the file header storage unit HM K and the shared data used to store the file header H of the packet DP in the shared file header memory SHHM The data payload storage unit PLM K in the payload memory SHPM is used to store the data payload P of the packet DP.

当协议层PR判断交握讯号SACK是指示封包DP没有被正确地接收时,协议层PR根据已确认指针PTRAA调整已发送指针PTRAS,以使该传送端T的数据链路层DL据以重新传送封包DP。其工作原理与步骤304中当数据链路层DL接收的数据链路回复讯号SDL为重送讯号SLBAD的方法类似,故不再赘述。When the protocol layer PR judges that the handshake signal S ACK indicates that the packet DP has not been received correctly, the protocol layer PR adjusts the sent pointer PTR AS according to the acknowledged pointer PTR AA so that the data link layer DL of the transmitting end T to retransmit the packet DP. Its working principle is similar to that in step 304 when the data link reply signal S DL received by the data link layer DL is the retransmission signal S LBAD , so it will not be described again.

另外,相较于先前技术,在本发明的数据传输方法300中,当传送端T欲传送对应于数据负载P的封包DP时,封包DP的档头H是储存于共用档头存储器SHHM的一档头储存单元,且封包DP的数据负载P是储存于共用数据负载存储器SHPM的一数据负载储存单元。也就是说,当传送端T欲传送对应于封包DP时,传送端T仅需要等同于一个档头的大小的存储器(如档头储存单元HMK)与等同于一个数据负载的大小的存储器(如数据负载储存单元PLMK),以储存封包DP。换句话说,当传送端T欲传送对应于数据负载P的封包DP时,传送端T仅需要有等同于一个封包大小的存储器空间,以储存封包DP。如此可节省存储器空间,以降低成本。In addition, compared with the prior art, in the data transmission method 300 of the present invention, when the transmitting end T intends to transmit the packet DP corresponding to the data payload P, the header H of the packet DP is a file stored in the shared header memory SHHM. The header storage unit, and the data payload P of the packet DP is stored in a data payload storage unit of the shared data payload memory SHPM. That is to say, when the transmitting end T intends to transmit the corresponding packet DP, the transmitting end T only needs a memory equivalent to the size of a file header (such as the file header storage unit HM K ) and a memory equivalent to the size of a data load ( For example, the data payload storage unit PLM K ) to store the packet DP. In other words, when the transmitting end T intends to transmit the packet DP corresponding to the data payload P, the transmitting end T only needs to have a memory space equivalent to the size of one packet to store the packet DP. This saves memory space and reduces costs.

请参考图4。图4是为说明本发明的可节省USB协议中用来储存封包的存储器的装置400的示意图。装置400用来传送数据。装置400包含一传送装置410与一接收装置420。传送装置510是为传送端。传送装置410包含一第一数据链路层装置411、一第一协议层装置412、一共用档头存储器SHHM,以及一共用数据负载存储器SHPM。接收装置420是为接收端。接收装置420包含一第二数据链路层装置421、一第二协议层装置422,以及一共用存储器SHM。装置400的接收装置420与传送装置410是分别根据本发明的第一实施例与第二实施例所衍生。Please refer to Figure 4. FIG. 4 is a schematic diagram illustrating a device 400 for saving memory for storing packets in the USB protocol according to the present invention. The device 400 is used to transmit data. The device 400 includes a transmitting device 410 and a receiving device 420 . The transmitting device 510 is a transmitting end. The transmission device 410 includes a first data link layer device 411 , a first protocol layer device 412 , a shared header memory SHHM, and a shared data payload memory SHPM. The receiving device 420 is a receiving end. The receiving device 420 includes a second data link layer device 421 , a second protocol layer device 422 , and a shared memory SHM. The receiving device 420 and the transmitting device 410 of the device 400 are respectively derived according to the first embodiment and the second embodiment of the present invention.

当传送装置410欲发送一数据负载P时,第一协议层装置412将数据负载P写入于共用数据负载存储器SHPM,且第一协议层装置412根据数据负载P产生档头H,并将档头H写入共用档头存储器SHHM。接着,第一数据链路层装置411直接将储存于共用档头存储器SHHM内的档头H与储存于共用数据负载存储器SHPM内的数据负载P组成一封包DP,并发送封包DP至接收装置420。When the transmission device 410 intends to send a data payload P, the first protocol layer device 412 writes the data payload P into the shared data payload memory SHPM, and the first protocol layer device 412 generates a file header H according to the data payload P, and writes the file The header H is written into the shared file header memory SHHM. Next, the first data link layer device 411 directly forms a packet DP from the header H stored in the shared header memory SHHM and the data payload P stored in the shared data payload memory SHPM, and sends the packet DP to the receiving device 420 .

当接收装置420接收到封包DP时,会将封包DP储存于共用存储器SHM。接收装置420的第二数据链路层装置421对储存于共用存储器SHM内的封包DP的档头H进行错误码校验,以得出数据链路校验结果EDL,并据以产生数据链路回复讯号SDL至传送装置410,以及传送协议层处理讯号SPRP至第二协议层装置422。当数据链路校验结果EDL表示错误时,第二数据链路层装置421所产生的数据链路回复讯号SDL是为重送讯号SLBAD,用来告知传送装置410对应于封包DP的数据链路校验结果EDL表示错误,以使传送装置410的第一数据链路层装置411据以发送封包DP。当数据链路校验结果EDL表示正确时,第二数据链路层装置421所产生的数据链路回复讯号SDL是为确认讯号SLGOOD,用来告知传送装置410对应于封包DP的数据链路校验结果EDL表示正确,且第二协议层装置412根据协议层处理讯号SPRP,直接对储存于共用存储器SHM内的封包DP进行后续处理。更明确地说,当第二协议层装置412接收到协议层处理讯号SPRP时,第二协议层装置412会根据封包DP的档头H的端点信息EP,以判断封包DP是否为同时型传输类型封包。当第二协议层装置412判断封包DP为同时型传输类型封包时,直接接收封包DP的数据负载P;当第二协议层装置412判断封包DP非为同时型传输类型封包时,对封包DP的数据负载P的数据负载错误校验码CRCD进行循环冗余校验,得出数据负载校验结果EPL,并据以发送一交握讯号SACK至传送装置410,以让传送装置410的第一协议层装置412据以作后续处理。When the receiving device 420 receives the packet DP, it will store the packet DP in the shared memory SHM. The second data link layer device 421 of the receiving device 420 performs an error code check on the file header H of the packet DP stored in the shared memory SHM to obtain a data link check result E DL and generate a data link The reply signal S DL is sent to the transmission device 410 , and the protocol layer processing signal S PRP is sent to the second protocol layer device 422 . When the data link verification result E DL indicates an error, the data link reply signal S DL generated by the second data link layer device 421 is a retransmission signal S LBAD , which is used to inform the transmission device 410 of the corresponding packet DP The data link check result E DL indicates an error, so that the first data link layer device 411 of the transmission device 410 sends the packet DP accordingly. When the data link verification result E DL is correct, the data link reply signal S DL generated by the second data link layer device 421 is a confirmation signal S LGOOD , which is used to inform the transmission device 410 of the data corresponding to the packet DP The link verification result E DL is correct, and the second protocol layer device 412 directly performs subsequent processing on the packet DP stored in the shared memory SHM according to the protocol layer processing signal S PRP . More specifically, when the second protocol layer device 412 receives the protocol layer processing signal SPRP , the second protocol layer device 412 will judge whether the packet DP is a simultaneous transmission according to the endpoint information EP of the header H of the packet DP type packet. When the second protocol layer device 412 judged that the packet DP was a simultaneous type transmission type packet, it directly received the data load P of the packet DP; when the second protocol layer device 412 judged that the packet DP was not a simultaneous type transmission type packet, the packet DP The data load error check code CRC D of the data load P performs a cyclic redundancy check to obtain the data load check result E PL , and sends a handshake signal S ACK to the transmission device 410 accordingly, so that the transmission device 410 The first protocol layer device 412 performs subsequent processing accordingly.

此外,上述的接收装置也可根据数据传输方法200的另一实施例而据以实施。举例而言,根据数据传输方法200的另一实施例的接收装置520是可用来替代上述的接收装置420。请参考图12,接收装置520包含一数据链路存储器DLM、一协议存储器PRM、一第二数据链路层装置521、一第二协议层装置522。数据链路存储器DLM包含档头储存单元HM1~HMN。档头储存单元HM1~HMN用来储存档头。档头储存单元HM1~HMN分别包含共用档头标号FH1~FHN。共用档头标号FH1~FHN分别用来指示档头储存单元HM1~HMN是否可被写入数据。协议存储器PRM包含数据负载储存单元PLM1~PLMN。数据负载储存单元PLM1~PLMN用来储存数据负载。数据负载储存单元PLM1~PLMN分别包含共用数据负载标号FPL1~FPLN。共用数据负载标号FPL1~FPLN是分别用来指示数据负载储存单元PLM1~PLMN是否可被写入数据。换句话说,数据链路存储器DLM是用来储存封包的档头而不储存封包的数据负载,协议存储器PRM用来储存封包的数据负载而不储存封包的档头。第二数据链路层装置521电性连接于数据链路存储器DLM。第二协议层装置522电性连接于协议存储器PRM。接收装置520与传送装置410之间的数据传输的工作原理与接收装置420与传送装置410之间的数据传输的工作原理类似,故不再赘述。In addition, the above-mentioned receiving device may also be implemented according to another embodiment of the data transmission method 200 . For example, the receiving device 520 according to another embodiment of the data transmission method 200 can be used to replace the above-mentioned receiving device 420 . Please refer to FIG. 12 , the receiving device 520 includes a data link memory DLM, a protocol memory PRM, a second data link layer device 521 , and a second protocol layer device 522 . The data link memory DLM includes header storage units HM 1 -HM N . The gear head storage units HM 1 -HM N are used to store gear heads. The file header storage units HM 1 ˜HM N respectively contain common file header labels F H1 ˜F HN . The common header labels F H1 ˜ F HN are respectively used to indicate whether data can be written into the header storage units HM 1 ˜HM N. The protocol memory PRM includes data payload storage units PLM 1 -PLM N . The data load storage units PLM 1 -PLM N are used for storing data loads. The data payload storage units PLM 1 ˜PLM N respectively include common data payload labels F PL1 ˜F PLN . The shared data load labels F PL1 -F PLN are respectively used to indicate whether the data load storage units PLM 1 -PLM N can be written into. In other words, the data link memory DLM is used to store the header of the packet but not the payload of the packet, and the protocol memory PRM is used to store the payload of the packet but not the header of the packet. The second data link layer device 521 is electrically connected to the data link memory DLM. The second protocol layer device 522 is electrically connected to the protocol memory PRM. The working principle of the data transmission between the receiving device 520 and the transmitting device 410 is similar to the working principle of the data transmission between the receiving device 420 and the transmitting device 410 , so it will not be repeated here.

综上所述,本发明提供的数据传输方法,当接收端接收到封包时,将封包储存于共用存储器,且数据链路层对储存于共用存储器内的封包的档头进行错误码校验,以得出数据链路校验结果,并据以传送协议层处理讯号给协议层。如此,协议层可根据协议层处理讯号,以直接对储存于共用存储器内的封包进行后续处理。利用本发明的数据传输方法,当接收端接收封包时,接收端仅需要有等同于封包大小的存储器空间,以储存该封包。此外,本发明另提供一数据传输方法,当传送端欲传送数据负载时,传送端的协议层将数据负载写入于共用数据负载存储器。协议层根据数据负载产生对应的档头,并将对应的档头写入共用档头存储器,且传送端的数据链路层直接将储存于共用档头存储器内的档头与储存于共用数据负载存储器内的数据负载组成一封包,并发送该封包。利用本发明的数据传输方法,当传送端欲传送对应数据负载时,传送端仅需要有等同于一个封包大小的存储器空间,以储存对应于数据负载的封包。如此可节省存储器空间,以降低成本,带给使用者更大的方便。To sum up, in the data transmission method provided by the present invention, when the receiving end receives the packet, it stores the packet in the shared memory, and the data link layer checks the header of the packet stored in the shared memory for an error code, To obtain the data link verification result, and transmit the protocol layer processing signal to the protocol layer accordingly. In this way, the protocol layer can process the signal according to the protocol layer, so as to directly perform subsequent processing on the packets stored in the shared memory. With the data transmission method of the present invention, when the receiving end receives a packet, the receiving end only needs a memory space equal to the size of the packet to store the packet. In addition, the present invention further provides a data transmission method. When the transmitting end intends to transmit the data payload, the protocol layer of the transmitting end writes the data payload into the shared data payload memory. The protocol layer generates the corresponding file header according to the data load, and writes the corresponding file header into the shared file header memory, and the data link layer at the transmitting end directly stores the file header stored in the shared file header memory and the shared data load memory. The data payload in it composes a packet and sends the packet. Using the data transmission method of the present invention, when the transmitting end wants to transmit the corresponding data payload, the transmitting end only needs to have a memory space equivalent to the size of a packet to store the packet corresponding to the data payload. In this way, memory space can be saved to reduce costs and bring greater convenience to users.

以上所述仅为本发明的较佳实施例,凡依本发明权利要求所做的均等变化与修饰,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the claims of the present invention shall fall within the scope of the present invention.

Claims (32)

1. the data transmission method that can save the storer that is used for storing package in the universal serial bus protocol is characterized in that, comprises following steps:
One receiving end receives the package that transmit a transmission end, and this package is stored in a shared storer;
One data link layer of this receiving end is carried out the error code verification to the one grade of head that is stored in this package in this shared storage, drawing a data link check results, and transmits a protocol layer according to this and handles the protocol layer that signal is given this receiving end; And
This protocol layer of this receiving end is handled signal according to this protocol layer, directly this package that is stored in this shared storage is carried out subsequent treatment, wherein,
This data link layer of this receiving end is carried out the error code verification to this grade head that is stored in this package in this shared storage, drawing this data link check results, and transmits this protocol layer according to this and handles this protocol layer that signal is given this receiving end, comprises:
One grade of error-checking code to this grade head of this package is carried out CRC, to draw one grade of check results;
Link command character error-checking code to this grade head of this package is carried out CRC, to draw a link command character check results; And
According to these shelves check results and this link command character check results, draw this data link check results; And
Represent when correct in this data link check results, transmit this protocol layer and handle this protocol layer that signal is given this receiving end, and transmit one and confirm that signal is to this transmission end;
Wherein this affirmation signal is to be used for informing that this package that transmits this transmission end representes correctly in this data link check results of this receiving end.
2. data transmission method according to claim 1; It is characterized in that; This data link layer of this receiving end is carried out the error code verification to this grade head that is stored in this package in this shared storage; Drawing this data link check results, and transmit this protocol layer according to this and handle signal and comprise for this protocol layer of this receiving end in addition:
When this data link check results is represented mistake, transmit one and heavily send signal to this transmission end;
Wherein this heavy signal that send is that this package that is used for notifying this transmission end to transmit is represented mistake in this data link check results of this receiving end.
3. data transmission method according to claim 2 is characterized in that, according to these shelves check results and this link command character check results, draws this data link check results and comprises:
When these shelves check results and this link command character check results are all when correct, this data link check results is represented correctly; And
When having one to be wrong in these shelves check results and this link command character check results, this data link check results is represented mistake.
4. data transmission method according to claim 1 is characterized in that, this protocol layer of this receiving end is handled signal according to this protocol layer, directly this package that is stored in this shared storage is carried out subsequent treatment, comprises:
Handle signal according to this protocol layer, to obtain an address of this shared storage;
According to this address of this shared storage, to read this package that is stored in this shared storage; And
According to a terminal point information of this grade head of this package, this data payload that receives this package is to carry out subsequent treatment.
5. data transmission method according to claim 4 is characterized in that, according to this terminal point information of this grade head of this package, this data payload that receives this package comprises to carry out subsequent treatment:
When this this package of terminal point information indication was simultaneous type transport-type package, this data payload that receives this package was to carry out subsequent treatment; And
This package is non-when being simultaneous type transport-type package when the indication of this terminal point information; Data payload error-checking code to this data payload of this stored package of this shared storage is carried out CRC; Draw a data payload check results, and send a friendship according to this and hold signal to this transmission end.
6. data transmission method according to claim 1 is characterized in that, this receiving end is to be a main control end or a device end, and this transmission end is to be a main control end or a device end corresponding to this receiving end.
7. the data transmission method that can save the storer that is used for storing package in the universal serial bus protocol is characterized in that, comprises following steps:
One protocol layer of one transmission end is written into a shared data payload storer with a data payload;
This protocol layer of this transmission end produces one grade of head according to this data payload, and this grade head is write a shared shelves storer; And
This grade head that one data link layer of this transmission end directly will be stored in this shared shelves storer is formed a package with this data payload that is stored in this shared data load memory, and this package is sent to a receiving end, wherein,
This protocol layer of this transmission end produces this grade head according to this data payload, and this grade head is write this shared shelves storer comprises:
Confirmed pointer according to a pointer to be sent and, to judge that this shared shelves storer is to be written into;
According to this data payload with corresponding to a data payload address information of this shared data load memory, producing this grade head, and this grade head is stored in this shared shelves storer; And
According to one grade of address, with this pointer to be sent of adjustment corresponding to this shared shelves storer;
Wherein this data payload address information corresponding to this shared data load memory is a data payload address that is used for indicating this shared data load memory.
8. data transmission method according to claim 7 is characterized in that, this protocol layer of this transmission end is written into this shared data load memory with this data payload and comprises:
According to a shared data payload label, this data payload is write this shared data load memory corresponding to this shared data load memory; And
Will be corresponding to this shared data load label of this shared data load memory, be labeled as and be written into.
9. data transmission method according to claim 7 is characterized in that, this data payload address information is a reserved area that is stored in this grade head.
10. data transmission method according to claim 7; It is characterized in that; This grade head that this data link layer of this transmission end will be stored in this shared shelves storer is formed this package with this data payload that is stored in this shared data load memory; And this package is sent to this receiving end, comprise:
This data link layer of this transmission end has been sent pointer according to this pointer to be sent and one, needs to send this package corresponding to stored this grade head of this shared shelves storer to judge;
This data link layer of this transmission end is according to this grade head, obtaining this data payload address information, and obtains being stored in this data payload of this shared data load memory according to this; And
This data link layer of this transmission end is formed this package with this grade head and this data payload, and is sent to this receiving end.
11. data transmission method according to claim 10 is characterized in that, this data transmission method comprises in addition:
This data link layer of this transmission end is replied signal according to the data link corresponding to this package that a receiving end is transmitted, to judge whether this package that will retransfer; And
This protocol layer of this transmission end is held signal according to handing over corresponding to one of this package that this receiving end transmitted, to carry out subsequent treatment.
12. data transmission method according to claim 11 is characterized in that, this data link layer of this transmission end is replied signal according to this data link corresponding to this package that this receiving end transmitted, and to judge whether this package that will retransfer, comprises:
Reply signal in this data link and attach most importance to when sending signal, this has sent pointer, this package so that this data link layer of this transmission end retransfers according to this to have confirmed the pointer adjustment according to this.
13. data transmission method according to claim 12 is characterized in that, replys signal in this data link and attaches most importance to when sending signal; Confirmed pointer according to this; Adjust this and sent pointer, this package so that this data link layer of this transmission end retransfers according to this comprises:
This data link layer of this transmission end has been sent pointer according to this pointer to be sent and this, needs to send this package corresponding to stored this grade head of this shared shelves storer to judge;
This data link layer of this transmission end is according to this grade head, obtaining this data payload address information, and obtains being stored in this data payload of this shared data load memory according to this; And
This data link layer of this transmission end is formed this package with this grade head and this data payload, and is sent to this receiving end.
14. data transmission method according to claim 11 is characterized in that, this protocol layer of this transmission end is held signal according to this friendship corresponding to this package that this receiving end transmitted, and to carry out subsequent treatment, comprises:
When this friendship is held this package of signal indication and has correctly been received; According to this friendship hold signal with adjust this confirmed pointer with corresponding to this shared data load label of this shared data load memory, should a shared grade of storer and this shared data load memory to discharge; And
When this friendship was held this package of signal indication and correctly do not received, this had sent pointer, this package so that this data link layer of this transmission end retransfers according to this to have confirmed the pointer adjustment according to this.
15. data transmission method according to claim 14; It is characterized in that; When this friendship is held this package of signal indication and has correctly been received; According to this friendship hold signal with adjust this confirmed pointer with corresponding to this shared data load label of this shared data load memory, should a shared grade of storer and this shared data load memory to discharge, comprise:
Hold one grade of stored in signal sequence parameter according to this friendship, with this grade address that obtains this shared shelves storer and this grade head that is stored in this shared shelves storer;
According to this data payload address information of this grade head, to obtain this data payload address of this shared data load memory;
According to these shelves address of this shared shelves storer, confirmed pointer to adjust this, discharge this shared shelves storer; And
According to this data payload address,, discharge this shared data load memory being labeled as and being written into corresponding to this shared data load label of shared data load memory.
16. data transmission method according to claim 14; It is characterized in that when this friendship was held this package of signal indication and correctly do not received, this had sent pointer to have confirmed the pointer adjustment according to this; This package so that this data link layer of this transmission end retransfers according to this comprises:
This data link layer of this transmission end has been sent pointer according to this pointer to be sent and this, needs to send this package corresponding to stored this grade head of this shared shelves storer to judge;
This data link layer of this transmission end is according to this grade head, obtaining this data payload address information, and obtains being stored in this data payload of this shared data load memory according to this; And
This data link layer of this transmission end is formed this package with this grade head and this data payload, and is sent to this receiving end.
17. data transmission method according to claim 16 is characterized in that, this transmission end is to be a main control end or a device end, and this receiving end is to be a main control end or a device end corresponding to this transmission end.
18. the device that can save the storer that is used for storing package in the universal serial bus protocol is characterized in that, comprises:
One conveyer, it comprises:
An one shared shelves storer;
One shared data payload storer;
One first protocol layer device is used for according to a data payload, producing one grade of head, and stores this data payload in this shared data load memory, and stores this grade head in this shared shelves storer; And
One first data link bed device, this grade head that is used for directly will being stored in this shared shelves storer is formed a package with this data payload that is stored in this shared data load memory, and sends this package; And
One receiving trap is used for receiving this package, and this receiving trap comprises:
One shared storer is used for storing this package;
One second data link bed device; Be used for this grade head that is stored in this package in this shared storage is carried out the error code verification; To produce a data link check results; And, reply signal to this conveyer, and produce protocol layer processing signal to transmit a data link according to this data link check results; And
One second protocol layer device is used for according to the terminal point information of this protocol layer processing signal with this grade head of this package that is stored in this shared storage, and whether this package that is stored in this shared storage with judgement is simultaneous type transport-type package, wherein,
When this data link check results was represented mistake, it was to attach most importance to sending signal so that this of this conveyer first data link layer is heavily given this package that this data link is replied signal; When this data link check results is represented when correct, it is for confirming that signal and this second data link device transmit this protocol layer and handle signal to this second protocol layer device that this data link is replied signal.
19. device according to claim 18 is characterized in that, when this second protocol layer device judges that this package is simultaneous type transport-type package, directly receives this data payload of this package; When this second protocol layer device is judged that this package is non-and is simultaneous type transport-type package; Data payload error-checking code to this data payload of this package is carried out CRC; Draw a data payload check results; And send a friendship according to this and hold signal to this conveyer, so that this of this conveyer first protocol layer is made subsequent treatment.
20. a receiving trap of saving storer, this receiving trap receives a package according to a universal serial bus protocol, and this package comprises one a grade of head and a data payload, it is characterized in that, this receiving trap comprises:
One shared storer comprises the plurality of packets storage element, the corresponding first memory address of one first this package of package storage unit stores of this plurality of packets storage element and this first package storage element;
One second data link bed device is electrically connected at this shared storage, and this second data link bed device reads this package that is stored in this first package storage element according to this first memory address; And
One second protocol layer device is electrically connected at this shared storage, and this second protocol layer device reads this package that is stored in this first package storage element according to this first memory address.
21. receiving trap according to claim 20 is characterized in that, this first package storage element comprises one first label and is used for indicating this first package storage element whether can be written into data.
22. receiving trap according to claim 20; It is characterized in that; This second data link bed device carries out the error code verification producing a data link check results according to this grade head of this package, and transmits a data link according to this data link check results and reply the pairing conveyer of signal to this receiving trap.
23. receiving trap according to claim 22; It is characterized in that; This second data link bed device is according to this data link check results; Optionally produce a protocol layer and handle signal to this second protocol layer device, this second protocol layer device is received this protocol layer and is handled behind signal the terminal point information according to this grade head of this package, and whether this package that is stored in this shared storage with judgement is simultaneous type transport-type package.
24. receiving trap according to claim 23 is characterized in that, this protocol layer is handled signal and is comprised this first memory address, makes this second protocol layer device read this package that is stored in this first package storage element according to this first memory address.
25. a receiving trap of saving storer, this receiving trap receives a package according to a universal serial bus protocol, and this package comprises one a grade of head and a data payload, it is characterized in that, this receiving trap comprises:
One data link storer; Comprise a plurality of shelves storage element; This grade head of one first grade of this package of storage unit stores of these a plurality of shelves storage elements and do not store this data payload of this package and the corresponding second memory address of this first grade of storage element;
One protocol memories; Comprise plurality of data load storage element; This data payload of one first this package of data payload storage unit stores of this plurality of data load storage element and do not store this grade head of this package, and corresponding one the 3rd storer address of this first data payload storage element;
One second data link bed device is electrically connected at this data link storer, and this second data link bed device reads this grade head of this package according to this second memory address; And
One second protocol layer device is electrically connected at this protocol memories, and this second protocol layer device reads this data payload of this package according to the 3rd storer address.
26. receiving trap according to claim 25; It is characterized in that; This first grade of storage element comprises one second label and is used for indicating this first grade of storage element whether can be written into data, is used for indicating this first data payload storage element whether can be written into data and this first data payload unit comprises one the 3rd label.
27. receiving trap according to claim 25; It is characterized in that; This second data link bed device carries out the error code verification producing a data link check results according to this grade head of this package, and transmits a data link according to this data link check results and reply the pairing conveyer of signal to this receiving trap.
28. receiving trap according to claim 27; It is characterized in that; This second data link bed device is according to this data link check results; Optionally produce a protocol layer and handle signal to this second protocol layer device, this second protocol layer device is received this protocol layer and is handled behind signal the terminal point information according to this grade head of this package, is simultaneous type transport-type package to judge this package.
29. receiving trap according to claim 28; It is characterized in that; This protocol layer is handled signal and is comprised this second memory address, makes this second protocol layer device read this grade head of this package that is stored in this first grade of storage element according to this second memory address.
30. receiving trap according to claim 28; It is characterized in that; This protocol layer is handled signal and is comprised the 3rd storer address; Wherein when this second protocol layer device judged that this package is simultaneous type transport-type package, this second protocol layer device directly read this data payload of this package that is stored in this first data payload storage element and a data payload error-checking code of this data payload is not carried out CRC according to the 3rd storer address; When this second protocol layer device is judged that this package is non-and is simultaneous type transport-type package; This second protocol layer device reads this data payload of this package that is stored in this first data payload storage element and this data payload error-checking code of this data payload is carried out CRC according to the 3rd storer address; Draw a data payload check results; And send a friendship according to this and hold signal to this conveyer, so that one first protocol layer of this conveyer is made subsequent treatment.
31. a conveyer of saving storer, this conveyer transmits a package according to a universal serial bus protocol, and this package comprises one a grade of head and a data payload, it is characterized in that, this conveyer comprises:
One first protocol layer device is used for this data payload according to this package to produce this grade head of this package;
An one shared shelves storer; Be electrically connected at this first protocol layer device; This shared shelves storer comprises a plurality of shared shelves storage element; This grade head of one first shared shelves this package of storage unit stores of these a plurality of shared shelves storage elements and do not store this data payload of this package and corresponding one the 4th storer address of this first shared shelves storage element;
One shared data payload storer; Be electrically connected at this first protocol layer device; This shared data load memory comprises a plurality of shared data load storage elements; This data payload of one first this package of shared data load storage unit stores of these a plurality of shared data load storage elements and do not store this grade head of this package, and corresponding one the 5th storer address of this first shared data load storage element; And
One first data link bed device; Be electrically connected at this shared data load memory and this shared shelves storer, this first data link bed device is formed this grade head and this data payload this package and is sent the pairing receiving trap of this package to this conveyer according to the 4th storer address and the 5th storer address.
32. conveyer according to claim 31 is characterized in that, this first shared data load storage element comprises one the 4th label and is used for indicating this first shared data load storage element whether can be written into data.
CN2010102189344A 2010-06-25 2010-06-25 Data transmission method and device for saving memory for storing packets in USB protocol Expired - Fee Related CN101887403B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102189344A CN101887403B (en) 2010-06-25 2010-06-25 Data transmission method and device for saving memory for storing packets in USB protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102189344A CN101887403B (en) 2010-06-25 2010-06-25 Data transmission method and device for saving memory for storing packets in USB protocol

Publications (2)

Publication Number Publication Date
CN101887403A CN101887403A (en) 2010-11-17
CN101887403B true CN101887403B (en) 2012-06-27

Family

ID=43073331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102189344A Expired - Fee Related CN101887403B (en) 2010-06-25 2010-06-25 Data transmission method and device for saving memory for storing packets in USB protocol

Country Status (1)

Country Link
CN (1) CN101887403B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI423037B (en) 2009-05-15 2014-01-11 Etron Technology Inc Method for increasing efficiency of transferring packet of isochronous transfer type and device thereof
CN101997648A (en) * 2010-11-24 2011-03-30 钰创科技股份有限公司 Method and device for improving efficiency of data packet transmission
TWI727269B (en) * 2019-02-27 2021-05-11 瑞昱半導體股份有限公司 Usb device and data transfer method thereof
US11592809B2 (en) 2019-11-29 2023-02-28 Rohde & Schwarz Gmbh & Co. Kg System and method for measurement data management in a distributed environment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100477608C (en) * 2002-06-07 2009-04-08 友讯科技股份有限公司 Method for increasing transmitting and receiving efficiency of embedded Ethernet controller
JP4777882B2 (en) * 2003-06-02 2011-09-21 クゥアルコム・インコーポレイテッド Generation and execution of signaling protocols and interfaces for higher data rates
CN101494623B (en) * 2008-01-25 2012-05-23 明泰科技股份有限公司 Method and device for accessing network storage devices in different private networks

Also Published As

Publication number Publication date
CN101887403A (en) 2010-11-17

Similar Documents

Publication Publication Date Title
TWI384810B (en) Data transfer method capable of saving memory for storing packet in usb protocol and apparatus thereof
CN101876963B (en) PCI.Express communication system and communication method thereof
TWI437444B (en) Usb transaction translator and a bulk transaction method
CN101887403B (en) Data transmission method and device for saving memory for storing packets in USB protocol
CN100437456C (en) Electronic device and control method thereof, host device and control method thereof
JP2008539497A (en) Device identification coding of slave devices between integrated circuits
JP2008547330A (en) Automated serial protocol initiator port transport layer retry mechanism
CN105007275B (en) A kind of one-way safety isolated data transmission method and system
US20100185803A1 (en) Method and apparatus for adaptive data chunk transfer
US7457898B2 (en) Substitute SATA host for communicating with a SATA device
GB2372680A (en) Error check code generation and data/code transmission utilising a single readout of the data from memory
CN101406001B (en) Method and device for transmitting data packets
CN104270550A (en) A reliable transmission method of image data based on CAN bus
US20120087379A1 (en) Method of reducing required capacity of retry buffer for real-time transfer through PCIe and related device
US8438445B2 (en) Methods and systems for error detection of data transmission
CN101488825B (en) Error detection method and system for data transmission
US8024495B2 (en) Communication data controller
JP4690271B2 (en) Data transfer buffer control device and data transfer control method
CN114337938B (en) A data transmission method, data retransmission method, device and related equipment
CN101465719B (en) Data retransmission method and device
WO2011035511A1 (en) Method and device for writing data into tag in radio frequency identification system
US20020141406A1 (en) Information processing apparatus and method, recording medium, and program
CN101453299A (en) Data transmission method
CN103001733B (en) A method for improving the efficiency of transmitting data packets
CN101800631A (en) Frame processing method and device in logic link control

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20160206

Address after: Taipei City, Taiwan, China

Patentee after: ETRON TECHNOLOGY, INC.

Address before: Hsinchu City, Taiwan, China

Patentee before: Etron Technology, Inc.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120627

Termination date: 20190625