CN101887403B - Data transmission method and device for saving space of memory used for accessing packet in universal serial bus protocol - Google Patents
Data transmission method and device for saving space of memory used for accessing packet in universal serial bus protocol Download PDFInfo
- 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
- package
- data
- shared
- shelves
- storer
- 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
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 171
- 230000015654 memory Effects 0.000 title claims abstract description 88
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000012795 verification Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 6
- 108010076504 Protein Sorting Signals Proteins 0.000 claims 1
- 230000014509 gene expression Effects 0.000 description 21
- 238000004583 scanning Hall probe microscopy Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 13
- 238000012546 transfer Methods 0.000 description 5
- 238000013500 data storage Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Abstract
The invention relates to a data transmission method for saving the space of a memory used for accessing a packet in universal serial bus (USB) protocol. The method comprises the following steps: when a sender prepares to transmit a data load, the protocol layer of the sender writes the data load in a data load sharing memory; the protocol layer generates a corresponding header according to the data load and writes the corresponding header in a header sharing memory; and the data link layer of the sender directly combines the header stored in the header sharing memory with the data load stored in the data load sharing memory to form a packet and transmits the packet. Therefore, when the sender prepares to transmit the corresponding data load, the sender only requires the memory space to be equal to the size of one memory for storing the packet corresponding to the data load, thus saving memory space and reducing cost.
Description
Technical field
The invention relates to a kind of data transmission method, more particularly, relate to and a kind ofly save USB (Universal Serial Bus USB) is used for storing the data transmission method of the storer of package in the agreement.
Background technology
Please refer to Fig. 1.Fig. 1 is for being illustrated in the synoptic diagram of the package form of USB 3.0 package DP in the prior art.As shown in Figure 1, package DP comprises one grade of H, and a data payload P.A shelves H comprises a kenel information TP, a terminal point information (end point) EP, a link command character (link command word) LW, one grade of error-checking code CRC
H, and a reserved area RA.Data payload P comprises a data segment D, and an error in data check code CRC
D
Kenel information TP can be used to judge the packet type of package DP.Packet type for instance, can be shake hands (handshake), data (data) ... etc.Terminal point information EP can be used to judge the transport-type under the package DP.For example; In usb protocol 3.0 editions; Comprise four kinds of transport-types: control type transport-type (control transfer type), interrupt-type transport-type (interrupt transfer type), flood tide type transport-type (bulk transfer type), and simultaneous type transport-type (isochronous transfer type).Every kind of transport-type is used for transmitting the data with different qualities respectively; Be used for instantaneous transmission (real-time transfer) like the simultaneous type transport-type; But application transport voice and video signal data, voice that transmitted to avoid or video signal produce the phenomenon of discontinuous or asynchronous (delay).Link command character LW is used for representing the situation of data link, and link command character LW comprises a link command character error-checking code CRC in addition
LWith a shelves sequence parameter (Header Sequence Number) HSEQ.Link command character error-checking code CRC
LBe used for judging whether link command character LW is wrong.A shelves sequence parameter HSEQ is used for judging whether the preamble sequence of package DP is wrong.A shelves error-checking code CRC
HBe used for judging whether a shelves H is wrong.Reserved area RA be can be used to store the user the data of definition voluntarily.
Data segment D provides the transmission end the actual data of being transmitted, like the stored data of video signal data that video camera transmitted and dish with oneself etc.Error in data check code CRC
DWhether be used for judgment data section D wrong.In addition, data segment D can comprise N data SD
1~SD
N
Formerly in the technology, when USB transmits, can be divided into transmission end T and receiving end R.Transmission end T can be a main control end (host) or a device end (device), and receiving end R then is the device end of a correspondence or the main control end of a correspondence.Transmission end T and the receiving end R data processing when the transmission package is to be layered as Physical layer (physical layer) PH, data link layer (data link layer) DL and protocol layer (protocol layer) PR in regular turn from bottommost.Below be illustrated in receiving end R reception package DP and transmission end T tendency to develop respectively and send the principle of work of package DP.
When receiving end R received package DP, receiving end R can be stored in package DP the data link storer DLM of the data link layer DL of receiving end R.The data link layer DL of receiving end R judges that the data link layer DL of receiving end R can copy to the package DP that is stored in data link storer DLM the protocol memories PRM of the protocol layer PR of receiving end R when the shelves H of package DP was correct.So, the protocol layer PR of receiving end R can carry out subsequent treatment to the package DP that is stored in protocol memories PRM.
When transmission end T need transmit data payload P, the protocol layer PR of transmission end T can produce a shelves H according to data payload P, and in the protocol memories PRM of the protocol layer PR of transmission end T, produces package DP according to a shelves H and data payload P.Transmission end T can copy to the data link storer DLM of the data link layer DL of transmission end T with being stored in protocol memories PRM package DP.At this moment, the protocol layer PRM of transmission end T can notify the data link layer DL of transmission end T to send the package DP that is stored in data link storer DLM.
Because formerly in the technology, no matter be that protocol layer PR and the data link layer DL of transmission end T or receiving end R all needs storer and store package (like protocol memories PRM and data link storer DLM).That is to say that when receiving or transmit package DP, package DP can take the storage space of the size that doubles package DP at receiving end R or transmission end T.So, cause the unnecessary waste of storer, and cost is risen, bring the user inconvenience greatly.
Summary of the invention
The present invention provides a kind of data transmission method of saving the storer that is used for storing package in the universal serial bus protocol.This data transmission method comprises a receiving end and receives the package that transmit a transmission end; And a data link layer that this package is stored in a shared storer, 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; To draw a data link check results; And transmit a protocol layer according to this and handle the protocol layer that signal is given this receiving end; And this protocol layer of this receiving end directly carries out subsequent treatment to this package that is stored in this shared storage according to this protocol layer processing signal.
The present invention provides a kind of data transmission method of saving the storer that is used for storing package in the universal serial bus protocol in addition.This protocol layer that the protocol layer that this data transmission method comprises a transmission end is written into a data payload one shared data payload storer, this transmission end produces one grade of head according to this data payload; And this grade head write a shared shelves storer; And a data link layer of this transmission end directly will be stored in this grade head in this shared shelves storer and this data payload that is stored in this shared data load memory is formed a package, and this package is sent to a receiving end.
The present invention provides a kind of device of saving the storer that is used for storing package in the universal serial bus protocol in addition.This device comprises a conveyer, and a receiving trap.This conveyer comprises a shared shelves storer, a shared data payload storer, one first protocol layer device, and one first data link bed device.This 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.This 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.This receiving trap is used for receiving this package.This receiving trap comprises a shared storer, one second data link bed device, and one second protocol layer device.This shared storage is used for storing this package.This 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 to transmit a data link according to this data link check results, handle signal with generation one protocol layer.This 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 this package that is stored in this shared storage with judgement is a simultaneous type transport-type package.
The present invention provides a kind of receiving trap of saving storer in addition, and this receiving trap receives a package according to a communications protocol, and this package comprises one a grade of head and a data payload.This receiving trap comprises a shared storer, one second data link bed device, and one second protocol layer device.This shared storage 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.This second data link bed device is electrically connected at this shared storage.This second data link bed device reads this package that is stored in this first package storage element according to this first memory address.This second protocol layer device is electrically connected at this shared storage.This second protocol layer device reads this package that is stored in this first package storage element according to this first memory address.
The present invention provides a kind of receiving trap of saving storer in addition, and this receiving trap receives a package according to a communications protocol, and this package comprises one a grade of head and a data payload.This receiving trap comprises a data link storer, a protocol memories, one second data link bed device, and one second protocol layer device.This data link storer comprises an 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.The corresponding second memory address of this first grade of storage element.This protocol memories comprises 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.Corresponding one the 3rd storer address of this first data payload storage element.This second data link bed device is electrically connected at this data link storer.This second data link bed device reads this grade head of this package according to this second memory address.This second protocol layer device is electrically connected at this protocol memories.This second protocol layer device reads this data payload of this package according to the 3rd storer address.
The present invention provides a kind of conveyer of saving storer in addition.This conveyer transmits a package according to a communications protocol, and this package comprises one a grade of head and a data payload.This conveyer comprises one first protocol layer device, a shared shelves storer, a shared data payload storer, and one first data link bed device.This first protocol layer device is used for this data payload according to this package to produce this grade head of this package.This shared shelves storer is 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.Corresponding one the 4th storer address of this first shared shelves storage element.This shared data load memory is 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.Corresponding one the 5th storer address of this first shared data load storage element.This first data link bed device is 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.
Description of drawings
Fig. 1 is for being illustrated in the synoptic diagram of the package form of USB 3.0 packages in the prior art;
Fig. 2 is the process flow diagram of explanation according to the data transmission method of the storer that is used for storing package in the usb protocol saved of the first embodiment of the present invention;
Fig. 3 is the process flow diagram for the data transmission method of the storer that is used for storing package in according to a second embodiment of the present invention the usb protocol saved of explanation;
Fig. 4 is for schematic representation of apparatus of saving the storer that is used for storing package in the usb protocol of the present invention is described;
Fig. 5, Fig. 6 and Fig. 7 be respectively explanation ought confirm pointer greater than, less than, or the synoptic diagram of a shelves storage element of the shared shelves storer that is written into when equaling pointer to be sent;
Fig. 8 writes after head to the shelves storage element that files for the description protocol layer, sets the synoptic diagram of pointer to be sent for a corresponding shelves address;
Fig. 9, Figure 10 and Figure 11 be respectively explanation when pointer to be sent greater than, less than, the data link layer of transmission end need be sent the synoptic diagram of the data storage element of its stored data when equaling to send pointer;
Figure 12 is the synoptic diagram for another embodiment that receiving trap of the present invention is described.
Description of reference numerals:
200,300-method; 201~203,301~305-step; The 400-device; The 410-conveyer; 411,421,521-data link bed device; 412,422,522-protocol layer device; 420,520-receiving trap; ADDR
H_ (K-1), ADDR
H_X, ADDR
H_Y-shelves address; CRC
H, CRC
D, CRC
L-error-checking code; The DP-package; The D-data segment; DLM-data link storer; The EP-terminal point information; H-shelves head; HM
1~HM
N-shelves storage element; A HSEQ-shelves sequence parameter; LW-link command character; The P-data payload; PLM
1~PLM
N-data payload storage element; The PRM-protocol memories; PTR
AA-confirmed pointer; PTR
AS-sent pointer; PTR
WS-pointer to be sent; The RA-reserved area; S
ACK-hand over and hold signal; S
DL-data link is replied signal; S
PRP-protocol layer is handled signal; SD
1~SD
N-data; The shared shelves of a SHHM-storer; The T-transmission end; TP-kenel information.
Embodiment
In view of this, the present invention provides a kind of data transmission method, but no matter be transmission end or receiving end protocol layer and data link layer all share same memory store package, required storage space when storing package, and then reduce cost to save.
Please refer to Fig. 2.Fig. 2 is the process flow diagram of explanation according to the data transmission method 200 of the storer that is used for storing package in the usb protocol saved of the first embodiment of the present invention.In data transmission method 200, establishing receiving end R is a main control end (host) or a device end (device), and transmission end T then is corresponding to the device end of receiving end R or a main control end.Receiving end R comprises a physical layer PH, a data link layer DL, a protocol layer PR, and a shared storer SHM.Shared storage SHM is used for storage data.Shared storage SHM comprises package storage element DPM
1~DPM
NAnd label (flag) F
1~F
NPackage storage element DPM
1~DPM
NBe used for storing package.Label F
1~F
NBe used for indicating package storage element DPM respectively
1~DPM
NWhether can be written into data.The step of data transmission method 200 is explained as follows:
Step 201: receiving end R receives the package DP that transmission end T is transmitted, and package DP is stored in shared storage SHM;
Step 202: the data link layer DL of receiving end R carries out the error code verification to a shelves H who is stored in the package DP in the shared storage SHM, to draw data link check results E
DL, and the transportation protocol layer is handled signal S according to this
PRPGive the protocol layer PR of receiving end R;
Step 203: the protocol layer PR of receiving end R handles signal S according to protocol layer
PRP, directly the package DP that is stored in the shared storage SHM is carried out subsequent treatment.
In step 201, when receiving end R received the package DP that transmission end T transmitted, receiving end R can be earlier according to label F
1~F
N, to find out the package storage element that can be written into.For example, as label F
KDuring expression " can be written into ", represent the package storage element DPM of shared storage SHM this moment
KCan be written into data; As label F
KDuring expression " being written into ", represent the package storage element DPM of shared storage SHM this moment
KStorage data has been arranged, therefore can not be written into data again, be stored in package storage element DPM originally in order to avoid override
KData.If this moment label F
KExpression " can be written into ", so receiving end R can write package DP and be stored in the package storage element DPM of shared storage SHM
K, and receiving end R can be with label F
KBe labeled as " being written into ".
In step 202, the data link layer DL of receiving end R is to being stored in the package storage element DPM in the shared storage SHM
KPackage DP shelves a H carry out the error code verification, to draw data link check results E
DLMore particularly, the data link layer DL of receiving end R can be according to the link command character error-checking code CRC of package DP
LWith a shelves error-checking code CRC
H, judge whether the shelves H of package DP is correct.The error-checking code CRC of the shelves H of package DP
HCan be 16 bits CRC (Cyclic Redundancy Check 16, CRC-16), and error-checking code CRC
LCan be the CRC (CRC-5) of 5 bits.Data link layer DL utilizes error-checking code CRC
HWith CRC
LRespectively shelves a H and the link command character LW of package DP carried out CRC.For instance, the whole CRC of shelves H is that the shelves H with package DP (comprises error-checking code CRC
H) divided by a predetermined divisor CRC
DH, to get the remainder CRC of a correspondence according to this
RHAs remainder CRC
RHWhen equaling a predetermined value X (for example, X equals zero), check results E
HThe shelves H of expression package DP is correct; As remainder CRC
RHWhen being not equal to predetermined value X, check results E
HThe shelves H of expression package DP is a mistake.And link command character check results E
LCan draw in a similar fashion.
As check results E
LWith E
HIn have one when wrong, then the data link layer DL of receiving end R judges that a shelves H is a mistake.At this moment, data link check results E
DLThe expression mistake, and the data link layer DL of receiving end R can send and heavily send signal S
LBADThe T to the transmission end is to inform that package DP that transmission end T transmitted is in the data link check results E of receiving end R
DLThe expression mistake makes the transmission end T package DP that retransfers.Anti-, as check results E
LWith E
HBe all when correct, the data link layer DL of receiving end R can judge that a shelves H is for correct.At this moment, data link check results E
DLExpression is correct, and the data link layer DL of receiving end R can send affirmation signal S
LGOODThe T to the transmission end is to inform that package DP that transmission end T transmitted is in the data link check results E of receiving end R
DLExpression is correct.
In addition, as data link check results E
DLRepresent when correct that the data link layer DL of receiving end R can handle signal S by the transportation protocol layer
PRPGive the protocol layer PR of receiving end R.Protocol layer is handled signal S
PRPBe to be used for indicating package storage element DPM corresponding to shared storage SHM
KPackage address ADDR so that protocol layer PR is to being stored in the package storage element DPM in the shared storage SHM
KPackage DP carry out subsequent treatment.
In step 203, establish the protocol layer processing signal S that data link layer DL is transmitted
PRPIndicated package address ADDR representative " K ", so protocol layer PR can be according to the package address ADDR of representative " K ", to read the package storage element DPM corresponding to the shared storage SHM of package address ADDR
KStored data.That is to say that the protocol layer PR of receiving end R can read package storage element DPM
KStored package DP.So, the protocol layer PR of receiving end R can be according to the terminal point information EP of the shelves H of package DP, with the data payload P that receives package DP to carry out subsequent treatment.
Say further whether the protocol layer PR of receiving end R is simultaneous type transport-type package according to the terminal point information EP of the shelves H of package DP to judge package DP.
When terminal point information EP indication package DP was simultaneous type transport-type package, the protocol layer PR of receiving end R directly received the data payload P of package DP to carry out subsequent treatment.For example, data payload P sends the speech data of receiving end R to for transmission ends T, so receiving end R can directly receive the data payload P of package DP, to play voice according to the speech data of data payload P.
When terminal point information EP indication package DP is non-when being simultaneous type transport-type package, the protocol layer PR of receiving end R is to the data payload error-checking code CRC of the data payload P of package DP
DCarry out CRC, draw data payload check results E
PL, and send according to this to hand over and hold (ACK) package S
ACKThe T to the transmission end.Data payload error-checking code CRC wherein
DCan be the CRC (CRC-32) of 32 bits.The protocol layer PL of receiving end R utilizes data payload error-checking code CRC
DCarry out CRC, to obtain data payload check results E
PL, its principle of work and aforesaid data link layer DL utilize error-checking code CRC
HWith CRC
LThe mode that the shelves H of package DP and link command character LW carry out CRC is similar, so repeat no more.When according to data payload error-checking code CRC
DResulting data payload check results E
PLRepresent when correct that the protocol layer PR of receiving end R can transmit to hand over and hold signal S
ACKThe T to the transmission end wherein hands over and holds signal S
ACKA shelves sequence parameter HSEQ who comprises relevant package DP is so that transmission end T can judge to hand over and hold signal S according to a shelves sequence parameter HSEQ
ACKBe corresponding to package DP, and hand over this moment and hold signal S
ACKBe to be used for informing transmission end T data payload check results E corresponding to package DP in receiving end R
PLExpression correct (meaning is that receiving end R correctly receives package DP).Anti-, when according to data payload error-checking code CRC
DResulting data payload check results E
PLWhen expression was wrong, this moment, signal S was held in the friendship that transmitted of protocol layer PR of receiving end R
ACKCan inform transmission end T data payload check results E corresponding to package DP in receiving end R
PLThe expression mistake.So, transmission end T is according to a shelves sequence parameter HSEQ, can learn that package DP corresponding to a shelves sequence parameter HSEQ is not received end R and correctly receives.Therefore, the transmission end T package DP that can retransfer again.
Can know that according to aforesaid explanation in data transmission method 200 of the present invention, when receiving end R received package DP, package DP was a package storage element that is stored in shared storage SHM.That is to say, when receiving end R receives package DP, receiving end R only need be equal to a packet size storage space (like package storage element DPM
K), to store package DP.So, can save storage space required when storing package, reduce cost.
In addition, the essence spirit according to data transmission method 200 can derive another embodiment.In another embodiment, each package storage element DPM among the aforesaid shared storage SHM
1~DPM
NCan being divided into two, main partly first partly is to store shelves heads, and second partly is used for the storage data load.Below will do further explanation.
Shared storage SHM comprises a data link storer DLM, and a protocol memories PRM.Data link storer DLM comprises a shelves storage element HM
1~HM
NA shelves storage element HM
1~HM
NBe used for storing the shelves head.A shelves storage element HM
1~HM
NComprise shared shelves header laber F respectively
H1~~F
HNShared shelves header laber F
H1~F
HNBe used for indicating a shelves storage element HM respectively
1~HM
NWhether can be written into data.Protocol memories PRM comprises data payload storage element PLM
1~PLM
NData payload storage element PLM
1~PLM
NBe used for the storage data load.Data payload storage element PLM
1~PLM
NComprise shared data load label F respectively
PL1~F
PLNShared data load label F
PL1~F
PLNBe to be used for designation data load storage element PLM respectively
1~PLM
NWhether can be written into data.
Be similar to step 201, when receiving end R received the package DP that transmission end T transmitted, receiving end R can be earlier according to shared shelves header laber F
H1~F
HN, to find out a shelves storage element that can be written into, and according to shared data load label F
PL1~F
PLNTo find out the data payload storage element that can be written into.For example, as shared shelves header laber F
HKDuring expression " can be written into ", represent the shelves storage element HM of data link storer DLM this moment
KCan be written into data; As shared shelves header laber F
HKDuring expression " being written into ", represent the shelves storage element HM of data link storer DLM this moment
KStorage data has been arranged, therefore can not be written into data again, be stored in a shelves storage element HM originally in order to avoid override
KData.Utilize the similar method can be according to shared data load label F
PL1~F
PLNTo find out the data payload storage element that can be written into, so repeat no more.
If at this moment shared shelves header laber F
HKWith shared data payload label F
PLKAll expressions " can be written into ", so receiving end R can write the shelves H of package DP and be stored in the shelves storage element HM of data link storer DLM
K, the data payload P of package DP is write and is stored in the data payload storage element PLM of protocol memories PRM
K, and receiving end R can be with shared shelves header laber F
HKWith shared data payload label F
PLKAll be labeled as " being written into ".
Be similar to step 202, the data link layer DL of receiving end R is to being stored in the shelves storage element HM in the data link storer DLM
KPackage DP shelves a H carry out the error code verification, to draw data link check results E
DLMore particularly, the data link layer DL of receiving end R can be according to the link command character error-checking code CRC of package DP
LWith a shelves error-checking code CRC
H, judge whether the shelves H of package DP is correct.Data link layer DL utilizes error-checking code CRC
HWith CRC
LRespectively shelves a H and the link command character LW of package DP carried out CRC, to obtain check results E respectively
HWith E
LIts principle of work is as above stated specification, so repeat no more.
As check results E
LWith E
HIn have one when wrong, then the data link layer DL of receiving end R judges that a shelves H is a mistake.At this moment, data link check results E
DLThe expression mistake, and the data link layer DL of receiving end R can send and heavily send signal S
LBADThe T to the transmission end is to inform that package DP that transmission end T transmitted is in the data link check results E of receiving end R
DLThe expression mistake makes the transmission end T package DP that retransfers.Otherwise, as check results E
LWith E
HBe all when correct, the data link layer DL of receiving end R can judge that a shelves H is for correct.At this moment, data link check results E
DLExpression is correct, and the data link layer DL of receiving end R can send affirmation signal S
LGOODThe T to the transmission end is to inform that package DP that transmission end T transmitted is in the data link check results E of receiving end R
DLExpression is correct.
In addition, as data link check results E
DLRepresent when correct that the data link layer DL of receiving end R can handle signal S by the transportation protocol layer
PRPGive the protocol layer PR of receiving end R.Protocol layer is handled signal S
PRPBe to be used for indicating a shelves storage element HM corresponding to data link storer DLM
KShelves an address ADDR
HAnd the data payload storage element PLM of protocol memories PRM
KData payload address ADDR
PL
Be similar to step 203, protocol layer PR can handle signal S according to the protocol layer that data link layer DL is transmitted
PRPAn indicated shelves address ADDR
HWith data payload address ADDR
PL, to read a shelves storage element HM who is stored in data link storer DLM respectively
KThe shelves H of package DP, and the data payload storage element PLM that is stored in protocol memories PRM
KThe data payload P of package DP.Therefore, after protocol layer PR can form package DP with a shelves H and data payload P, whether the terminal point information EP according to the shelves H of package DP was simultaneous type transport-type package to judge package DP, and package DP is carried out subsequent treatment.The method and the above stated specification of its subsequent treatment are similar, so repeat no more.
Therefore, in the present embodiment, when receiving end R received package DP, the shelves H of package DP was one grade of the storage element that is stored in data link storer DLM, and the data payload P of package DP is a data payload storage element that is stored in protocol memories DLM.That is to say, when receiving end R receives package DP, receiving end R only need be equal to a packet size storage space (like a shelves storage element HM
KAdd data payload storage element PLM
K), to store package DP.So, can save storage space required when storing package, reduce cost.
Please refer to Fig. 3.Fig. 3 is the process flow diagram for the data transmission method 300 of the storer that is used for storing package in according to a second embodiment of the present invention the usb protocol saved of explanation.In data transmission method 300, establish transmission end T and can be a main control end or a device end, receiving end R then is corresponding to the device end of transmission end T or a main control end.Transmission end T comprises a physical layer PH, a data link layer DL, a protocol layer PR, a shared shelves storer SHHM, and a shared data payload storer SHPM.Shared data load memory SHPM comprises data payload storage element PLM
1~PLM
NAnd shared data load label F
PL1~F
PLNData payload storage element PLM
1~PLM
NBe used for the storage data load.Shared data load label F
PL1~F
PLNBe to be used for designation data load storage element PLM respectively
1~PLM
NWhether can be written into data.For example, as shared data load label F
PLKDuring expression " can be written into ", represent the data payload storage element PLM of shared data load memory SHPM this moment
KCan be written into data; As shared data load label F
PLKDuring expression " being written into ", represent the data payload storage element PLM of shared data load memory SHPM this moment
KStorage data has been arranged, therefore can not be written into data again, be stored in data payload storage element PLM to avoid overriding script
KData.A shared shelves storer SHHM comprises a shelves storage element HM
1~HM
N, a pointer PTR to be sent
WS, one sent pointer PTR
AS, and one confirmed pointer PTR
AAA shelves storage element HM
1~HM
NBe used for storing the shelves head.Pointer PTR to be sent
WSBe to be used to refer to be shown in a shelves storage element HM
1~HM
NAmong, need transmission end T stored data to be sent to the shelves storage element of receiving end R.Sent pointer PTR
ASBe to be used to refer to be shown in a shelves storage element HM
1~HM
NAmong, transmission end T has been sent to stored data the shelves storage element of receiving end R.Confirmed pointer PTR
AABe to be used to refer to be shown in a shelves storage element HM
1~HM
NAmong, transmission end T is sent to receiving end R with stored data, and transmission end T also receives the friendship that the representative of the correspondence that receiving end R transmitted correctly receives and holds signal S
ACKShelves a storage element.The step of data transmission method 300 is explained as follows:
Step 301: the protocol layer PR of transmission end T is written into shared data load memory SHPM with data payload P;
Step 302: the protocol layer PR of transmission end T produces a shelves H according to data payload P, and a shelves H is write a shared shelves storer SHHM;
Step 303: the shelves H that the data link layer DL of transmission end T directly will be stored in the shared shelves storer SHHM forms a package DP with the data payload P that is stored in the shared data load memory SHPM, and package DP is sent to receiving end R;
Step 304: the data link layer DL of transmission end T replys signal S according to the data link corresponding to package DP that receiving end R is transmitted
DL, to judge whether the package DP that to retransfer;
Step 305: the protocol layer PR of transmission end T holds signal S according to the friendship corresponding to package DP that receiving end R is transmitted
ACK, to carry out subsequent treatment.
In step 301, when data payload P is sent in transmission end T tendency to develop, the protocol layer PR of transmission end T can be according to shared data load label F
PL1~F
PLN, to find out the data payload storage element that can be written into.For example, establish shared data load this moment label F
PLKExpression " can be written into ", so transmission end T can write package DP and be stored in the data payload storage element PLM of shared data load memory SHPM
K, and transmission end T can be with shared data load label F
PLKBe labeled as " being written into ".
In step 302, the protocol layer PR of transmission end T is according to data payload P and corresponding to data payload storage element PLM
KData payload address information D
ADDR_PL, to produce a shelves H.For example, when data payload P is the control command of giving receiving end R for transmission end T tendency to develop, the terminal point information EP that protocol layer PR sets a shelves H represents the control type transport-type; When data payload P is voice or a video signal data of giving receiving end R for transmission end T tendency to develop, the terminal point information EP that protocol layer PR sets a shelves H represents the simultaneous type transport-type.Protocol layer PR except the shelves information that H comprised that produces institute's standard in the usb protocol (like kenel information TP, terminal point information EP, link command character LW, error-checking code CRC
LWith CRC
H, a shelves sequence parameter HSEQ etc.) outside, protocol layer PR also can write at the reserved area RA of a shelves H and be used for designation data load storage element PLM
KData payload address ADDR
PL_KData payload address information D
ADDR_PL
The protocol layer PR of transmission end T is according to pointer PTR to be sent
WSWith confirm pointer PTR
AATo find the shelves storage element of a shared shelves storer SHHM that can be written into.Fig. 5, Fig. 6 and Fig. 7 are respectively explanation ought confirm pointer PTR
AAGreater than, less than, or equal pointer PTR to be sent
WSThe time the synoptic diagram of a shelves storage element of a shared shelves storer SHHM who is written into.For example, establish pointer PTR to be sent
WSBe to be a shelves storage element HM
(K-1)Shelves an address ADDR
H_ (K-1), confirm pointer PTR
AABe to be a shelves storage element HM
XShelves an address ADDR
H_XIn Fig. 5, a shelves address ADDR
H_XGreater than a shelves ADDR
H_ (K-1), an expression this moment shelves storage element HM
K~HM
XBe to be written into data, the then existing storage data of other storage elements.In Fig. 6, a shelves address ADDR
H_XLess than a shelves ADDR
H_ (K-1), represent HM this moment
1~HM
XWith HM
K~HM
NBe to be written into data, the then existing storage data of other storage elements.In Fig. 7, a shelves address ADDR
H_XEqual a shelves ADDR
H_ (K-1), represent HM this moment
1~HM
NAll can be written into data.Be located in the step 302 pointer PTR to be sent
WSBe to be a shelves storage element HM
(K-1)Shelves an address ADDR
H_ (K-1)And confirmed pointer PTR
AAAlso equal a shelves address ADDR
H_ (K-1), then protocol layer PR can write a storage element HM that files with a shelves H
K, and protocol layer PR writes a H that files to a shelves storage element HM
KAfterwards, can set pointer PTR to be sent
WSBe a shelves storage element HM
KShelves an address ADDR
H_K(as shown in Figure 8).
In step 303, the data link layer DL of transmission end T is according to pointer PTR to be sent
WSWith send pointer PTR
AS, to judge a shelves storage element HM at a shared shelves storer SHHM
1~HM
NAmong, need the data link layer DL of transmission end T to send the data storage element of its stored data.Fig. 9, Figure 10 and Figure 11 are respectively explanation as pointer PTR to be sent
WSGreater than, less than, equal to send pointer PTR
ASThe time transmission end T data link layer DL need send the synoptic diagram of the data storage element of its stored data.For example, suppose pointer PTR to be sent this moment
WSIndicated address is a shelves storage element HM
KShelves an address ADDR
H_K, send pointer PTR
ASSBe a shelves storage element HM
YShelves an address ADDR
H_YCan find out by Fig. 9, if a shelves address ADDR
KGreater than a shelves address ADDR
H_Y, represent that then transmission end T need send corresponding to a shelves storage element HM
(Y+1)~HM
KThe package of stored shelves head.Can find out by Figure 10, if a shelves address ADDR
H_KLess than a shelves address ADDR
H_Y, represent that then transmission end T need send corresponding to a shelves storage element HM
(Y+1)~HM
NWith HM
1~HM
KThe package of stored shelves head.Can find out by Figure 11, if a shelves address ADDR
H_KEqual a shelves address ADDR
H_Y, then represent the package that transmission end T need not send at present.
When the data link layer DL of transmission end T according to pointer PTR to be sent
WSWith send pointer PTR
AS, judging needs to send corresponding to a shelves storage element HM
KBehind the package of a stored shelves H, the data link layer DL of transmission end T can read and be stored in a shelves storage element HM
KA stored shelves H.The data link layer DL of transmission end T is according to the data payload address information D of the reserved area RA of a shelves H
ADDR_PL, to obtain being stored in the data payload storage element PLM of shared data load memory SHPM
KData payload address ADDR
PL_KSo, the data link layer DL of transmission end T can be according to data payload address ADDR
PL_K, be stored in data payload storage element PLM to read
KData payload P, and with data payload P with shelves a H form a package DP, so that package DP is sent to receiving end R.
In step 304, when the data link that receiving end R is transmitted is replied signal S
DLBe to attach most importance to sending signal S
LBADThe time, this moment, the data link layer DL of transmission end T can be according to confirming pointer PTR
AASent pointer PTR with adjustment
AS, package DP so that data link layer DL retransfers.Below will do further explanation.
Because the data link layer DL of transmission end T is according to confirming pointer PTR
AAWith send pointer PTR
AS, to judge at a shelves storage element HM
1~HM
NIn, transmit data but do not received the friendship that representative that receiving end R transmitted correctly receives as yet and held signal S
ACKShelves a storage element.For example, establish and confirm pointer PTR
AAIndicated address is a shelves storage element HM
ZShelves an address ADDR
H_Z, send pointer PTR
ASIndicated address is a shelves storage element HM
KShelves an address ADDR
H_KAn if shelves address ADDR
H_KGreater than a shelves address ADDR
H_Z, represent that then transmission end T has sent corresponding to a shelves storage element HM
Z~HM
KThe package of stored shelves head is not held signal S but receive the friendship that representative that receiving end R transmitted correctly receives as yet
ACKAn if shelves address ADDR
H_KLess than a shelves address ADDR
H_Z, represent that then transmission end T has sent corresponding to a shelves storage element HM
Z~HM
NWith HM
1~HM
KThe package of stored shelves head is not held signal S but receive the friendship that representative that receiving end R transmitted correctly receives as yet
ACKShelves a storage element; An if shelves address ADDR
H_KEqual a shelves address ADDR
H_Z, then expression is to the package that is sent corresponding to transmission end T, received the friendship that representative that receiving end R transmitted correctly receives all and held signal S
ACK
Be located in the step 304, confirmed pointer PTR
AAIndicated address is a shelves storage element HM
(K-1)Shelves an address ADDR
H_ (K-1), and sent pointer PTR
ASIndicated address is a shelves storage element HM
KShelves an address ADDR
H_KAt this moment, if data link is replied signal S
DLBe to attach most importance to sending signal S
LBADThe time, signal S is heavily sent in expression
LBADBe corresponding to a shelves storage element HM
KThe package DP of a stored shelves H, so data link layer DL can be with sending pointer PTR
ASBe made as and confirm pointer PTR
AA(meaning i.e. a shelves address ADDR
H_ (K-1)).Thus, as the explanation of aforementioned (in step 303), when data link layer DL according to pointer PTR to be sent
WSWith send pointer PTR
AS, to judge a shelves storage element HM at a shared shelves storer SHHM
1~HM
NAmong, when data link layer DL need send the data storage element of its stored data, owing to pointer PTR to be sent this moment
WSStill be a shelves address ADDR
H_KSend pointer PTR
ASBe reset to a shelves address ADDR
H_ (K-1), so data link layer DL can resend package DP with the mode of the explanation that is similar to step 303.
In step 305, hold signal S owing to hand over
ACKBe the information that comprises a relevant shelves sequence parameter HSEQ corresponding to package DP, so protocol layer PR can hold signal S according to friendship earlier
ACKAn indicated shelves sequence parameter HSEQ holds signal S to judge to hand over
ACKBe corresponding to package DP.
When judging to hand over, protocol layer PR holds signal S
ACKBe that protocol layer PR can adjust and confirm pointer PTR when indicating package DP correctly to be received
AA, be used for storing the shelves storage element of the shelves H of package DP with release.For example, a shelves H who establishes package DP is stored in the shelves storage element HM of a shared shelves storer SHHM
K, so protocol layer PR can be with confirming pointer PTR
AABe set at a shelves storage element HM
KShelves an address ADDR
H_K, be directed against corresponding to a shelves storage element HM with expression
KThe package DP of a stored shelves H, transmission end T have received the friendship that representative that receiving end R transmitted correctly receives and have held signal S
ACKOwing to can know according to the explanation of step 302, protocol layer PR is according to confirming pointer PTR
AAWith pointer PTR to be sent
WS, to judge the shelves storage element HM of a shared shelves storer SHHM
1~HM
NWhether can be written into, therefore confirm pointer PTR when protocol layer PR sets
AAShelves storage element HM for a shared shelves storer SHHM
KShelves an address ADDR
H_KThe time, presentation protocol layer PR can judge a shelves storage element HM
K(meaning promptly discharges the shelves storage element HM of a shared shelves storer SHHM can be written into data
K).
In addition, protocol layer PR can be according to the data payload address information D of a shelves H
ADDR_PL, to obtain data payload address ADDR
PL_KSo, protocol layer PR is according to data payload address ADDR
PL_K, can be with data payload storage element PLM corresponding to shared data load memory SHPM
KShared data load label F
PL_K, be labeled as " can be written into ", to discharge the data payload storage element PLM of shared data load memory SHPM
K
Therefore, can know, hold signal S when protocol layer PR judges to hand over by aforesaid explanation
ACKBe that protocol layer PR can adjust and confirm pointer PTR when indicating package DP correctly to be received
AAData payload storage element PLM with the data payload P that is used for storing package DP among the shared data payload storer SHPL
KPairing shared data load label F
PL_K, to be released in the shelves storage element HM of a shelves H who is used for storing package DP among the shared shelves storer SHHM
KData payload storage element PLM with the data payload P that is used for storing package DP among the shared data payload storer SHPM
K
When judging to hand over, protocol layer PR holds signal S
ACKBe that protocol layer PR is according to having confirmed pointer PTR when indicating package DP correctly not received
AAPointer PTR has been sent in adjustment
AS, package DP so that the data link layer DL of this transmission end T retransfers according to this.The data link that receives as data link layer DL in its principle of work and the step 304 is replied signal S
DLAttach most importance to and send signal S
LBADMethod similar, so repeat no more.
In addition; Compared to prior art; In data transmission method 300 of the present invention; When the package DP corresponding to data payload P was sent in transmission end T tendency to develop, the shelves H of package DP was one grade of the storage element that is stored in a shared shelves storer SHHM, and the data payload P of package DP is a data payload storage element that is stored in shared data load memory SHPM.That is to say that when transmission end T tendency to develop was sent corresponding to package DP, transmission end T only need be equal to the storer of the size of a shelves head (like a shelves storage element HM
K) with the storer that is equal to the size of a data load (like data load storage element PLM
K), to store package DP.In other words, when the package DP corresponding to data payload P was sent in transmission end T tendency to develop, transmission end T only needed the storage space that is equal to a packet size, to store package DP.So can save storage space, to reduce cost.
Please refer to Fig. 4.Fig. 4 is for the synoptic diagram of saving the device 400 of the storer that is used for storing package in the usb protocol of the present invention is described.Device 400 is used for transmitting data.Device 400 comprises a conveyer 410 and a receiving trap 420.Conveyer 510 is to be the transmission end.Conveyer 410 comprises one first data link bed device 411, one first protocol layer device, 412, one a shared shelves storer SHHM, and a shared data payload storer SHPM.Receiving trap 420 is to be receiving end.Receiving trap 420 comprises one second data link bed device 421, one second protocol layer device 422, and a shared storer SHM.The receiving trap 420 and the conveyer 410 of device 400 are to derive according to the first embodiment of the present invention and second embodiment respectively.
When conveyer 410 desires are sent a data payload P; The first protocol layer device 412 is written into shared data load memory SHPM with data payload P; And the first protocol layer device 412 produces a shelves H according to data payload P, and a shelves H is write a shared shelves storer SHHM.Then, the shelves H that the first data link bed device 411 directly will be stored in the shared shelves storer SHHM forms a package DP with the data payload P that is stored in the shared data load memory SHPM, and sends package DP to receiving trap 420.
When receiving trap 420 receives package DP, can package DP be stored in shared storage SHM.The shelves H that 421 pairs of the second data link bed devices of receiving trap 420 are stored in the package DP in the shared storage SHM carries out the error code verification, to draw data link check results E
DL, and produce data link answer signal S according to this
DLTo conveyer 410, and the transportation protocol layer is handled signal S
PRPTo the second protocol layer device 422.As data link check results E
DLWhen expression was wrong, the data link that the second data link bed device 421 is produced was replied signal S
DLBe to attach most importance to sending signal S
LBAD, be used for informing the data link check results E of conveyer 410 corresponding to package DP
DLThe expression mistake is so that the first data link bed device 411 of conveyer 410 sends package DP according to this.As data link check results E
DLRepresent when correct that the data link that the second data link bed device 421 is produced is replied signal S
DLBe for confirming signal S
LGOOD, be used for informing the data link check results E of conveyer 410 corresponding to package DP
DLExpression is correct, and the second protocol layer device 412 is handled signal S according to protocol layer
PRP, directly the package DP that is stored in the shared storage SHM is carried out subsequent treatment.More particularly, when receiving protocol layer, the second protocol layer device 412 handles signal S
PRPThe time, whether 412 meetings of the second protocol layer device are simultaneous type transport-type package according to the terminal point information EP of the shelves H of package DP to judge package DP.When the second protocol layer device 412 judges that package DP is simultaneous type transport-type package, directly receive the data payload P of package DP; When the second protocol layer device 412 is judged that package DP is non-and is simultaneous type transport-type package, to the data payload error-checking code CRC of the data payload P of package DP
DCarry out CRC, draw data payload check results E
PL, and send a friendship according to this and hold signal S
ACKTo conveyer 410, to let the first protocol layer device 412 of conveyer 410 make subsequent treatment according to this.
In addition, above-mentioned receiving trap also can be implemented according to another embodiment of data transmission method 200 according to this.For example, the receiving trap 520 according to another embodiment of data transmission method 200 is to can be used to substitute above-mentioned receiving trap 420.Please refer to Figure 12, receiving trap 520 comprises a data link storer DLM, a protocol memories PRM, one second data link bed device 521, one second protocol layer device 522.Data link storer DLM comprises a shelves storage element HM
1~HM
NA shelves storage element HM
1~HM
NBe used for storing the shelves head.A shelves storage element HM
1~HM
NComprise shared shelves header laber F respectively
H1~F
HNShared shelves header laber F
H1~F
HNBe used for indicating a shelves storage element HM respectively
1~HM
NWhether can be written into data.Protocol memories PRM comprises data payload storage element PLM
1~PLM
NData payload storage element PLM
1~PLM
NBe used for the storage data load.Data payload storage element PLM
1~PLM
NComprise shared data load label F respectively
PL1~F
PLNShared data load label F
PL1~F
PLNBe to be used for designation data load storage element PLM respectively
1~PLM
NWhether can be written into data.In other words, data link storer DLM is used for storing the shelves head of package and the data payload that do not store package, and protocol memories PRM is used for storing the data payload of package and does not store the shelves head of package.The second data link bed device 521 is electrically connected at data link storer DLM.The second protocol layer device 522 is electrically connected at protocol memories PRM.The principle of work of the data transmission between the principle of work of the data transmission between receiving trap 520 and the conveyer 410 and receiving trap 420 and the conveyer 410 is similar, so repeat no more.
In sum; Data transmission method provided by the invention; When receiving end receives package, package is stored in shared storage, and data link layer is carried out the error code verification to the shelves head that is stored in the package in the shared storage; Drawing the data link check results, and the transportation protocol layer is handled signal and is given protocol layer according to this.So, protocol layer can be handled signal according to protocol layer, directly the package that is stored in the shared storage is carried out subsequent treatment.Utilize data transmission method of the present invention, when receiving end received package, receiving end only needed the storage space that is equal to packet size, to store this package.In addition, the present invention provides a data transmission method in addition, and when data payload was sent in the transmission end tendency to develop, the protocol layer of transmission end was written into the shared data load memory with data payload.Protocol layer produces corresponding shelves head according to data payload; And the shelves head of correspondence write a shared shelves storer; And the shelves head that the data link layer of transmission end directly will be stored in the shared shelves storer is formed a package with the data payload that is stored in the shared data load memory, and sends this package.Utilize data transmission method of the present invention, when the corresponding data load was sent in the transmission end tendency to develop, the transmission end only needed the storage space that is equal to a packet size, to store the package corresponding to data payload.So can save storage space,, bring the user bigger convenience to reduce cost.
The above is merely preferred embodiment of the present invention, and all equalizations of doing according to claim of the present invention change and modify, and all should belong to covering 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.
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 space of memory used for accessing packet in universal serial bus 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 space of memory used for accessing packet in universal serial bus 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 space of memory used for accessing packet in universal serial bus protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101887403B (en) |
Families Citing this family (4)
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 |
CN103001733B (en) * | 2010-11-24 | 2015-08-12 | 钰创科技股份有限公司 | A kind of method promoting the efficiency of transmission packet |
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100477608C (en) * | 2002-06-07 | 2009-04-08 | 友讯科技股份有限公司 | Method for increasing transmitting-receiving efficiency of embedded Ethernet controller |
BRPI0410885B1 (en) * | 2003-06-02 | 2018-01-30 | Qualcomm Incorporated | GENERATE AND IMPLEMENT A SIGNAL AND INTERFACE PROTOCOL FOR HIGHER DATA RATES |
CN101494623B (en) * | 2008-01-25 | 2012-05-23 | 明泰科技股份有限公司 | Method and apparatus for accessing network memory device of different private network |
-
2010
- 2010-06-25 CN CN2010102189344A patent/CN101887403B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101887403A (en) | 2010-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101876963B (en) | PCI.Express communication system and communication method thereof | |
CN100437456C (en) | Electronic device, control method thereof, host device, and control method thereof | |
CN101645766B (en) | Method, device and system for realizing data packet retransmission | |
CN101887403B (en) | Data transmission method and device for saving space of memory used for accessing packet in universal serial bus protocol | |
CN109905205B (en) | Data sending method, data receiving method, data sending equipment, data receiving equipment, data transmission method and data transmission system | |
TWI384810B (en) | Data transfer method capable of saving memory for storing packet in usb protocol and apparatus thereof | |
KR20160018987A (en) | Interface circuit and packet transmission method thereof | |
CN105630424A (en) | Data processing method, device and system | |
CN105868136A (en) | Electronic device for packing multiple command/command frames and command frame processing method | |
CN104980257A (en) | Internet of things communication method and device | |
CN103338184A (en) | Data transmitting method and apparatus, data receiving apparatus and data transmission system | |
CN101304362B (en) | Retransmission buffering apparatus and data transmission method | |
US8767759B2 (en) | Method of reducing required capacity of retry buffer for real-time transfer through PCIe and related device | |
WO2023045795A1 (en) | Infrared communication method and apparatus, and storage medium and electronic apparatus | |
US9762353B2 (en) | Data packet for bidirectional transmission of data packets during data transmission between a first and a second communication appliance, and method for transmitting such a data packet | |
CN100490002C (en) | Memory device for serial transmission interface and error correction method thereof | |
US20100054165A1 (en) | Data trasnmitting and receiving method and communication system thereof | |
CN101465719B (en) | Data retransmission method and device | |
CN103117955A (en) | Method, device and system of message transmission | |
CN102035618B (en) | Data transmission method, device and system | |
CN102984086B (en) | Data transmission method for uplink in data communication and device | |
CN104102605B (en) | A kind of data transmission method, device and system | |
CN112084120A (en) | RapidIO data transmission processing method and device | |
CN108319557B (en) | Data buffer with data retransmission function and read-write method thereof | |
JPH03261255A (en) | Data transfer system |
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 |