CN101123484B - Data transmission method and system - Google Patents

Data transmission method and system Download PDF

Info

Publication number
CN101123484B
CN101123484B CN2007101455593A CN200710145559A CN101123484B CN 101123484 B CN101123484 B CN 101123484B CN 2007101455593 A CN2007101455593 A CN 2007101455593A CN 200710145559 A CN200710145559 A CN 200710145559A CN 101123484 B CN101123484 B CN 101123484B
Authority
CN
China
Prior art keywords
buffer
bag
pointer
data
reading
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.)
Active
Application number
CN2007101455593A
Other languages
Chinese (zh)
Other versions
CN101123484A (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.)
Via Technologies Inc
Original Assignee
Via Technologies 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 Via Technologies Inc filed Critical Via Technologies Inc
Priority to CN2007101455593A priority Critical patent/CN101123484B/en
Publication of CN101123484A publication Critical patent/CN101123484A/en
Application granted granted Critical
Publication of CN101123484B publication Critical patent/CN101123484B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention relates to a data transmission method and a system, in particular to data transmission method, which is applied to the first electric device and the second electric device. The method is divided into four steps. Firstly, a package of data exported by the first electric device is received; secondly, the package of data is stored in a buffer; thirdly, the address of where the package of data is positioned in the buffer is stored in a buffer; and fourthly, whether the package of data needs to be resent to the second electric device is determined according to a response signal of the second electric device. The present invention can reduce the cost of a data transmission device and increase the efficiency of data transmission.

Description

Data transmission method and system
Technical field
The present invention is a kind of data transmission method and system, particularly a kind of data transmission method and system with retry pattern.
Background technology
In the general transfer of data, if being sent to the transfer of data of second electronic device, first electronic installation interrupts, or second electronic device is when confiscating complete data, first electronic installation must be sent to second electronic device with whole data again once more, this has not only wasted software and hardware resources, also loses time.In another known method, transfer of data is divided into bag or many data one by one, after second electronic device receives data, will transmit a back-signalling and give first electronic installation, after first electronic installation receives the response device, transmit the next record data again.Can guarantee the stable of transfer of data although it is so, could transmit the next record data, still waste many times, reduce whole efficient but each first electronic installation all must receive the back-signalling of second electronic device by the time.
Summary of the invention
A kind of data transmission method that the data that purpose of the present invention is occurred when being the solution transfer of data are lost.
The invention provides a kind of data transmission method, be applicable to the transfer of data between one first electronic installation and the second electronic device, comprising: bag data that receive this first electronic installation output; Should wrap data storing at one first buffer; The initial address that these bag data are positioned at this first buffer is stored in one second buffer; Respond packet generation one acknowledgment number according to one of this second electronic device output; Upgrade a second reading fetch pointer according to this acknowledgment number, represent all to be responded less than the pairing bag in the address of this second reading fetch pointer in this second buffer by this second electronic device; In this second buffer, export a return pointer according to this second reading fetch pointer; Reconnect signal according to one, judge whether to make first reading pointer of this first buffer to get back to the return pointer corresponding address; And, then make this first reading pointer equal this return pointer if this reconnects the signal activation; Wherein, making this first reading pointer equal this return pointer is to make this first reading pointer turn back to the initial address of the bag that the first stroke in this first buffer do not responded by this second electronic device, passes once again with the bag that all successfully is not sent to this second electronic device.
The present invention provides a kind of data transmission system in addition, comprises one first electronic installation, a data link and a second electronic device.This first electronic installation is in order to export bag data.This second electronic device is responded bag in order to this bag data output one that transmits according to this data link.This data link comprises: one first buffer, in order to storing this bag data, and export this bag data according to one first reading pointer; One second buffer in order to storing the initial address that these bag data are positioned at this first buffer, and is exported a return pointer according to a second reading fetch pointer; One response process unit is in order to reconnect signal according to this response packet generation one; And a pointer control module, reconnect signal according to this, judge whether to make first reading pointer of this first buffer to get back to the return pointer corresponding address, if this reconnects the signal activation, then make this first reading pointer equal this return pointer; Wherein bag output one acknowledgment number is also responded according to this that receives in this response process unit, and this pointer control module is upgraded the second reading fetch pointer of this second buffer according to this acknowledgment number, is all responded by this second electronic device less than the pairing bag in the address of this second reading fetch pointer in this second buffer representing; Wherein, making this first reading pointer equal this return pointer is to make this first reading pointer turn back to the initial address of the bag that the first stroke in this first buffer do not responded by this second electronic device, passes once again with the bag that all successfully is not sent to this second electronic device.
Data transmission method of the present invention and system can reduce the cost of data transmission device, improve the efficient of transfer of data.
Description of drawings
Fig. 1 is the block schematic diagram according to an embodiment of a data transmission system of the present invention.
Fig. 2 is the block schematic diagram according to another embodiment of a data transmission system of the present invention.
Fig. 3 unifies the detailed block schematic diagram of embodiment for data transmission system shown in Figure 2.
Fig. 4 is the block schematic diagram according to the another embodiment of a data transmission system of the present invention.
Fig. 5 is the flow chart according to an embodiment of a data transmission method of the present invention.
Fig. 6 is the flow chart according to another embodiment of data transmission method of the present invention.
Embodiment
Fig. 1 is the block schematic diagram according to an embodiment of a data transmission system of the present invention.In Fig. 1, first electronic installation 11 sees through a data link 12 data is sent in the second electronic device 13.In one embodiment, first electronic installation 11 may see through Ethernet (Ethernet), wireless network (Wireless Lan), bus (Bus) or connect cable (Cable), sends data to data link 12.In one embodiment, data link 12 is not limited to the electronic installation of an entity, and data link 12 can be a kind of host-host protocol of data.In the present embodiment, data link 12 has comprised first buffer 14 and second buffer 15.When data link 12 receives data (or bag), can store the data in second buffer 15, and the initial address that these data are arranged in this second buffer 15 is stored in first buffer 14.The data that data link 12 will be arranged in second buffer 15 subsequently are sent to second electronic device 13.Second electronic device 13 receives after the bag, can return one and respond bag to data link 12.In one embodiment, this response comprises an acknowledgment number.This acknowledgment number increases progressively in proper order according to the number of the bag that receives.Data link 12 can judge whether second electronic device 13 has successfully received bag by the acknowledgment number that receives.In present embodiment, acknowledgment number equals also to be sent at first in the bag of response (ack) send sequence number (the sequence number) of that bag of second electronic device 13.
For instance, tentation data conveyer 12 has transmitted 10 to send sequence number has been after 1 to 10 bag is given second electronic device 13, to detect first electronic installation 11 and second electronic device 13 broken strings (disconnect).After first electronic installation 11 rebulid line (reconnect) with second electronic device 13, the acknowledgment number that is comprised in the first stroke bag that data link 12 receives was 8.Thus, data link 12 can judge that to send sequence number be that 8~10 bag is not by the complete second electronic device 13 that is sent to.Data link 12 therefore can be with in second buffer 15, and the bag data that second electronic device 13 does not receive are sent to second electronic device 13 once more.
Fig. 2 is the block schematic diagram according to another embodiment of a data transmission system of the present invention.Data link 22 is ultrahigh speed transmission (HyperTransport) controller in the present embodiment, is sent to central processing unit 23 in order to the bag with data output device 21 outputs.In one embodiment, data output device 21 may be South Bridge chip or north bridge chips.
Data link 22 comprises Communication Layer (Transaction Layer) 24, Data Link Layer (Data LinkL ayer) 25 and physical layer (Physical Layer) 26.Wherein, Data Link Layer 25 comprises control unit 250, buffer unit 252 and response process unit 256.Control unit 250 is according to the information of the bag that receives, the acknowledgment number ack_number and the return pointer real_pop that reconnects signal retry_now and buffer unit 252 outputs of response process unit 256 outputs, that upgrades buffer unit 252 writes pointer tab_push, buf_push and reading pointer tab_pop, buf_pop.Response process unit 256 is coupled between physical layer 26 and the control unit 250, state in order to the detecting line, and the response bag of central processing unit 23 output handled, with output acknowledgment number ack_number with reconnect signal retry_now to control unit 250.In present embodiment, buffer unit 252 is made up of buffer 255 and buffer 254.Suppose buffer 255 be 64 * 9bit first-in first-out buffer (first in firstoutput, FIFO).Buffer 254 is the first-in first-out buffer of 384 * 32bit.
Under the normal transmission pattern, when the Communication Layer 24 of data transmission device 22 when data output device 21 receives a bag, can be transferred to Data Link Layer 25 and handle.Control unit 250 these pens of decoding of Data Link Layer 25 wrap, and calculate the crc value (cyclic redundancy check, CRC, cyclic redundancy check error check code) of this bag.Subsequently, control unit 250 deposits the crc value of this bag and bag in the buffer 254 continuously, and writes pointer buf_push according to the length renewal of this bag and the crc value of bag.Simultaneously, control unit 250 deposits the initial address that this wraps in the buffer 254 in the buffer 255 in, and makes and write pointer tab_push and add 1.In one embodiment, as long as buffer 254 is not empty, the data in the buffer 254 will be output.After bag was exported in buffer 254, control unit 250 was according to the reading pointer buf_pop of the length update buffer 254 of bag of exporting and CRC.On the other hand, when response process unit 256 receives a response bag, whether to judge the data that receive correct, if CRC check correctly then is updated to acknowledgment number ack_number the acknowledgment number ack_number that comprises in this response bag if can carry out CRC check.In present embodiment, if CRC check is " mistake ", acknowledgment number ack_number is remained unchanged, and the line of notification entity layer 26 turn-off data output device 21 and central processing unit 23.Control unit 250 is according to the reading pointer tab_pop of acknowledgment number ack_number update buffer 255, and with the data of reading pointer tab_pop correspondence by return pointer real_pop output.According to described before, be appreciated that return pointer real_pop in the present embodiment be exactly in the buffer 254 the first stroke do not wrapped in initial address in the buffer 254 by what central processing unit 23 was responded.
In ultrahigh speed transmission standard 3.0, defined the retry pattern in the data transmission procedure, promptly in the data transmission procedure of data output device 21 and central processing unit 23, if the CRC check mistake occurs, transmit and violate the agreement, transmit situations such as overtime, data output device 21 can be disconnected with the line of central processing unit 23.After a period of time, data output device 21 can be rebuild with the line of central processing unit 23, to attempt carrying out normal transfer of data.In present embodiment, Data Link Layer 25 is then responded bag output retry by response process unit 256 according to the first stroke that receives and is connected signal retry_now if detecting data output device 21 under the retry pattern rebuilds with the line of central processing unit 23.If detecting retry, control unit 250 connects signal retry_now, then according to the reading pointer buf_pop of the return pointer real_pop update buffer 254 of buffer 255 output, even the reading pointer buf_pop of buffer 254 turns back to return pointer real_pop corresponding address, resend once with the bag that will under the retry pattern, successfully be sent to central processing unit 23.
For instance, if the bag packet_n that buffer 254 will receive is stored between address D~E, then wrap the initial address of packect_n at buffer 254, promptly address D will be existed in the buffer 255.If under the retry pattern, the reading pointer buf_pop of buffer 254 has moved to address M, and the data of the reading pointer tab_pop correspondence of buffer 255 are address D.That is to say the return pointer real_pop=address D of buffer 255 outputs this moment.Thereby control unit 250 can make reading pointer buf_pop turn back to address D, transfers to central processing unit 23 again with the bag that will be stored in the buffer 254 between address D~M.
As seen from the above description, store each by buffer 255 in the present embodiment and wrap in initial address in the buffer 254, thereby can realize that under the retry pattern reading pointer of buffer 254 returns by simple relatively control circuit.In addition, compare with buffer 254, the memory space of buffer 255 is less relatively, thereby can reduce the cost of present embodiment data transmission device 25, improves the efficient of transfer of data.
Below with reference to Fig. 3 to Fig. 6 the how control data transmission of present embodiment data transmission system is described.
At first, see also Fig. 3, in present embodiment, package operation can be separated to the response bag that receives in response process unit 256, to obtain acknowledgment number ack_number.Response process unit 256 also needs to detect the state of line, and after the link of data output device 21 and central processing unit 23 rebulids, the first stroke that receives is responded the data of bag and carried out CRC check.If check results is " correctly ", then output reconnects signal retry_now to control unit 250, and the link between expression data output device 21 and the central processing unit 23 rebulids.If 256 pairs of response process unit rebulid the first stroke of receiving after the link and respond the result that bag carries out CRC check and be " mistake ", the line of notification entity layer 26 turn-off data output device 21 and central processing unit 23 then, and enter the retry pattern.
Control unit 250 comprises CRC generator 251, address calculation 257 and pointer control module 258.Wherein, pointer control module 258 upgrades writing pointer tab_push, buf_push and reading pointer tab_pop, buf_pop in order to according to the bag that reconnects signal retry_now, return pointer real_pop, acknowledgment number ack_number and receive.As is known to the person skilled in the art, each bag that Communication Layer 24 sends Data Link Layer 25 to includes: header and data, and header comprises information such as instruction and packet length.When control unit 250 received the bag that Communication Layer 24 sends, whether CRC generator 251 was according to the data computation crc value in the bag, correct for central processing unit 23 judgment data when receiving this bag.Then, the crc value of this bag and this bag is stored in the buffer 254 continuously.In one embodiment, the size of this crc value be fixed as a double word (double word, DW).
Address calculation 257 receives this pens and wraps, and according to the length of the header information and the crc value of this bag, calculates and writes down this bag and be stored in initial address in the buffer 254.Address calculation 257 is with in this initial address write buffer 255 subsequently.Specifically, address calculation 257 can be learnt the length of bag by the header information of bag, thereby can calculate when this bag and crc value deposit buffer 254 in to take how many memory spaces.On the other hand, before receiving first bag, the initial address that address calculation 257 can record buffer 254, and increase progressively the value of its initial address that writes down according to the length value of the length of the bag that receives and CRC.For instance, suppose that control unit 25 has received from Communication Layer 24 that to send sequence number be 10 bag packet_10, in the initial address write buffer 255 when then address calculation 257 need will be wrapped packet_10 and be stored in buffer 254 according to the first write signal tab_push.Suppose address calculation 257 when receiving bag packet_9, the initial address of record is 9 ' b010100101, and the length of bag packet_9 is 3DW.Hence one can see that, and bag packet_9 will take the memory space of 3DW in the buffer 254 (length of bag)+1DW (length of CRC)=4DW.Thereby address calculation 257 can calculate bag packet_9 and will be deposited in the address is the memory space of 9 ' b010100101~9 ' b010101000 in the buffer 254, and promptly wrapping packet_10 is 9 ' b010101001 in the initial address of buffer 254.When control unit 25 receives bag packet_10, initial address 9 ' the b010101001 that address calculation 257 will be wrapped packet_10 deposits in the buffer 255, and calculates the initial address of next record bag (for example packet_11) at buffer 254 according to the initial address of the packet length of wrapping packet_10, crc value length and bag packet_10.
In present embodiment, pointer control module 258 comprises returns unit 2580 and pointer updating block 2581.Return unit 2580 reconnecting signal retry_now decision and whether export return pointer real_pop in order to foundation response process unit 256 output to pointer updating block 2581.In the present embodiment, if return that unit 2580 receives high level reconnect signal retry_now, then export return pointer real_pop to pointer updating block 2581.
Pointer updating block 2581 in order to foundation return pointer real_pop, acknowledgment number ack_number and the bag that receives, upgrades writing pointer tab_push, buf_push and reading pointer tab_pop, buf_pop.Specifically, pointer updating block 2581 whenever receives a bag, will make to write pointer tab_push=tab_push+1, makes the length of the length+crc value that writes pointer buf_push=buf_push+ bag.In addition, pointer updating block 2581 upgrades reading pointer tab_pop according to acknowledgment number ack_number, and the value that is about to acknowledgment number ack_number is composed to reading pointer tab_pop.Owing to be sent to the sending sequence number of that bag of physical layer 26 in the bag that acknowledgment number ack_number equals also not to be responded by central processing unit 23 at first.Thereby the bag that the first stroke is not responded by central processing unit 23 in the corresponding buffer 255 of reading pointer tab_pop, and this wraps in initial address in the buffer 254 and exports to by return pointer real_pop and return unit 2580.At the normal transmission state, pointer updating block 2581 upgrades reading pointer buf_pop according to the length of the crc value of the bag of exporting and this bag.Yet under the retry pattern, pointer updating block 2581 can upgrade reading pointer buf_pop according to the return pointer real_pop that receives, even the value of reading pointer buf_pop equals return pointer real_pop.That is to say, make reading pointer buf_pop turn back to the initial address of the bag that the first stroke in the buffer 254 do not responded by central processing unit 23, pass once again with the bag that all successfully is not sent to central processing unit 23.
As shown in Figure 4, present embodiment can prevent that (overflow) from appearring overflowing in buffer shown in Figure 3 255 and buffer 254.When data output device 21 need be sent to data link 22 with bag, Communication Layer 24 can calculate the free memory of buffer 254,255, to judge whether that bag is sent to Data Link Layer 25.
As shown in Figure 4, the pointer control module 358 of Data Link Layer 25 comprises and returns a unit 3580 and a pointer updating block 3581.Returning unit 3580 is made up of the output unit 3582 and first record cell 3583.Output unit 3582 reconnects signal retry_now output return pointer real_pop to pointer updating block 3581 according to what receive.First record cell 3583 calculates and exports one and can discharge memory space buf_rel to Communication Layer 24 according to return pointer real_pop that receives and the return pointer real_pop that notes before.For instance, suppose first record cell, the 3583 last return pointer real_pop=X that receive and note, and the return pointer real_pop=Y that this receives, then first record cell 3583 can calculate and can discharge memory space buf_rel=Y-X.Because the value of return pointer real_pop is the initial address of the bag that the first stroke is not responded by central processing unit 23 in the buffer 254, therefore if the address in the buffer 254 less than real_pop, just represents that the bag of its correspondence is received by central processing unit 23 really.Thereby Communication Layer 24 can be released (release)/covering (overwrite) by the data how many memory spaces are arranged in the buffer 254 that are worth knowing that can discharge memory space buf_rel.
Pointer updating block 3581 comprises a updating block 3584 and one second record cell 3585.Updating block 3584 in order to foundation return pointer real_pop, acknowledgment number ack_number and the bag that receives, upgrades writing pointer tab_push, buf_push and reading pointer tab_pop, buf_pop.Second record cell 3585 receives the reading pointer tab_pop of updating block 3584 outputs, and according to the reading pointer tab_pop that notes before, calculating can discharge memory space tab_rel.For instance, suppose second record cell, the 3585 last reading pointer tab_pop=E that receive and note, and the reading pointer tab_pop=F that this receives, then second record cell 3585 can calculate and can discharge memory space tab_rel=F-E.Because the address of the reading pointer tab_pop bag that the first stroke is not responded by central processing unit 23 in the directed at buffer 255 all the time, thereby if the address in the buffer 255 less than reading pointer tab_pop, just represents that the bag of its correspondence was responded by central processing unit 23.Whereby, Communication Layer 24 can be released (release)/covering (overwrite) by the data how many memory spaces are arranged in the buffer 255 that are worth knowing that can discharge memory space tab_rel.
Please continue to consult Fig. 4, Communication Layer 24 has a blocking unit 240, in order to according to the bag that receives, can discharge memory space tab_rel and can discharge memory space buf_rel, judge whether to be sent to Data Link Layer 25 according to the bag that the request of transmitting will receive.Blocking unit 240 is made up of first computing unit 241 and second computing unit 242.Before carrying out the transmission of the first stroke bag, the initial memory size of first computing unit, 241 record buffer 254 is memory space buf_cnt.Subsequently, Communication Layer 24 one of every transmission wrap to Data Link Layer 25, the first computing units 242 with regard to updated stored space buf_cnt=buf_cnt-(length of bag+CRC length).Simultaneously, first computing unit 241 is also according to the discharged memory space buf_rel updated stored space buf_cnt that receives, i.e. buf_cnt=buf_cnt+buf_rel.Thereby Communication Layer 24 can be understood the size in the real surplus space of buffer 254 by memory space buf_cnt.Similar with it, before carrying out the transmission of the first stroke bag, the initial memory size of second computing unit, 242 record buffer 255 is memory space tab_cnt.Subsequently, Communication Layer 24 one of every transmission wrap to Data Link Layer 25, the second computing units 242 with regard to updated stored space tab_cnt=tab_cnt-1.Simultaneously, second computing unit 241 is also according to the discharged memory space tab_rel updated stored space tab_cnt that receives, i.e. tab_cnt=tab_cnt+tab_rel.Thus, Communication Layer 24 can obtain the size in the real surplus space of buffer 255 by memory space tab_cnt.In present embodiment, when if Communication Layer 24 receives data transmission requests, the value of memory space tab_cnt less than 1 or the value of memory space buf_cnt less than the length of this bag and CRC length and, then stop this bag to transfer to Data Link Layer 25, thereby avoid buffer 254,255 to occur overflowing.
Fig. 5 is the flow chart of data transmission device shown in Figure 4 according to an embodiment of a data transmission method of the present invention.In step S500, the bag that data link 22 receives data output device 21 outputs transmits request.At this moment, the blocking unit 240 of the Communication Layer 24 of data link 22 transmits request and memory space tab_cnt according to this, buf_cnt, do you judge whether buffer 255 (second buffer) has enough spaces to store this pen and wrap in initial address in the buffer 254 (first buffer), and buffer 254 has enough spaces to store the crc value of this bag and bag? (step S501).When if buffer 255 or buffer 254 do not have enough spaces, then wait for when first buffer 255 and buffer 254 have enough spaces and restoring.If buffer 254,255 is when all having enough spaces to store, execution in step S502 calculates the crc value of this bag.Subsequently, the crc value of trying to achieve is stored in the buffer 254 continuously with bag, and update buffer 254 write pointer buf_push (first writes pointer)=buf_push+ packet length+CRC length (step S503).In step S504, there is buffer 255 in the initial address that this bag is arranged in buffer 254, and update buffer 255 write pointer tab_push (second writes pointer)=tab_push+1.In one embodiment, this data link can be earlier should bag decoding, and the header information of this bag is learnt the size of this bag certainly.In step S505, according to the CRC of reading pointer buf_pop (first reading pointer) from a buffer bag of 254 outputs and this bag, and according to the length of this bag and the length renewal reading pointer buf_pop of CRC.In one embodiment, when buffer 254 is not empty, then the data in the buffer 254 will be output.In step S506, Data Link Layer 25 receives one and responds bag.Then, respond the reading pointer tab_pop (second reading fetch pointer) of the acknowledgment number ack_number update buffer 255 that comprises in the bag, simultaneously the data of reading pointer tab_pop correspondence are exported (step S507) as return pointer real_pop according to this.In step S508, control unit 250 judges whether reading pointer buf_pop is turned back to return pointer real_pop corresponding address according to reconnecting signal retry_now.In the present embodiment,, then make reading pointer buf_pop equal return pointer real_pop (step S509), and jump to step S505 if reconnecting signal retry_now is high potential.In step S508, if do not need to return reading pointer buf_pop, then execution in step S510, Data Link Layer 25 is according to the first reading pointer tab_push and return pointer real_pop, calculate the discharged memory space tab_rel of buffer 254,255, buf_rel.In step S511, the Communication Layer 24 of data transmission device 22 is according to the discharged memory space tab_rel of buffer 254,255, the real surplus space tab_cnt of buf_rel update buffer 254,255, buf_cnt.
Fig. 6 is the flow chart of the data transmission method of data transmission device shown in Figure 4 after entering the retry pattern.In step S60, when detecting data output device 21 with central processing unit 23 broken strings, jump to step S61 this moment, enters the retry pattern.In step S62, data transmission device 22 detects data output device 21 and rebuilds with the line of central processing unit 23.In step S63, data transmission device 22 receives line and rebuilds the first stroke response bag that back central processing unit 23 sends.Then in step S64, this responds Data Link Layer 25 decodings bag and also carries out CRC check, and whether the data of the response bag that receives with judgement are correct.If the CRC check result is " correctly ", then the reading pointer buf_pop of buffer 254 is turned back to the return pointer real_pop corresponding address (step S65) of buffer 255 outputs.If the CRC check result is " mistake ", then notification entity layer 26 disconnects connection and enters retry pattern (step S67).Execution in step S66 after step S65 transmits bag according to reading pointer buf_pop, and the bag that soon correctly is not sent to central processing unit 23 in the buffer 254 retransfers once.
The above only is preferred embodiment of the present invention; so it is not in order to limit scope of the present invention; any personnel that are familiar with this technology; without departing from the spirit and scope of the present invention; can do further improvement and variation on this basis, so the scope that claims were defined that protection scope of the present invention is worked as with the application is as the criterion.
Being simply described as follows of symbol in the accompanying drawing:
11: the first electronic installations
12: data link
13: second electronic device
14: the first buffers
15: the second buffers
21: data output device
22: data link
23: central processing unit
24: Communication Layer
240: blocking unit
241: the first computing units
242: the second computing units
25: Data Link Layer
250: control unit
The 251:CRC generator
252: buffer unit
254,255: buffer
256: the response process unit
257: address calculation
258,358: the pointer control module
2580,3580: return the unit
2581,3581: the pointer updating block
3582: output unit
3583: the first record cells
3584: updating block
3585: the second record cells
Tab_rel, buf_rel: can discharge memory space
Ack_number: acknowledgment number
Retry_now: reconnect signal
Real_pop: return pointer
Buf_push, tab_push: write pointer
Buf_pop, tab_pop: reading pointer
26: physical layer.

Claims (10)

1. a data transmission method is applicable to the transfer of data between one first electronic installation and the second electronic device, it is characterized in that, comprising:
Receive bag data of this first electronic installation output;
Should wrap data storing at one first buffer;
The initial address that these bag data are positioned at this first buffer is stored in one second buffer;
Respond packet generation one acknowledgment number according to one of this second electronic device output;
Upgrade a second reading fetch pointer according to this acknowledgment number, represent all to be responded less than the pairing bag in the address of this second reading fetch pointer in this second buffer by this second electronic device;
In this second buffer, export a return pointer according to this second reading fetch pointer;
Reconnect signal according to one, judge whether to make first reading pointer of this first buffer to get back to this return pointer corresponding address; And
If this reconnects the signal activation, then make this first reading pointer equal this return pointer;
Wherein, making this first reading pointer equal this return pointer is to make this first reading pointer turn back to the initial address of the bag that the first stroke in this first buffer do not responded by this second electronic device, passes once again with the bag that all successfully is not sent to this second electronic device.
2. data transmission method according to claim 1 is characterized in that, more comprises an error checking sign indicating number that calculates these bag data.
3. data transmission method according to claim 2 is characterized in that, this error checking sign indicating number is stored in this first buffer with these bag data.
4. data transmission method according to claim 1 is characterized in that, more comprises:
Detect the connection state of this first electronic installation and this second electronic device;
If the line of this first electronic installation and this second electronic device reconnects after disconnection, the first stroke that receives after then line being rebuild is responded bag and is carried out the error checking code check; And
If error checking code check result be correctly, then activation this reconnect signal.
5. data transmission method according to claim 4 is characterized in that, this error checking sign indicating number is that institute tried to achieve after this second electronic device received these bag data.
6. data transmission method according to claim 1 is characterized in that, more comprises:
According to this return pointer, calculate the discharged memory space of this first buffer; And
According to this second reading fetch pointer, calculate the discharged memory space of this second buffer.
7. data transmission method according to claim 6 is characterized in that, more comprises:
According to the discharged memory space of this first buffer and the residual memory space of this first buffer, the real surplus space of calculating this first buffer; And
According to the discharged memory space of this second buffer and the residual memory space of this second buffer, the real surplus space of calculating this second buffer.
8. data transmission method according to claim 7 is characterized in that, more comprises before the step of the bag that receives this first electronic installation output:
Detect the real surplus space of this first, second buffer; And
If the remaining space of this first buffer is enough to store this bag data, and the remaining space of this second buffer is enough to store the initial address of these bag data at this first buffer, then receives these bag data.
9. a data transmission system is characterized in that, comprising:
One first electronic installation is in order to export bag data;
One data link comprises:
One first buffer in order to storing this bag data, and is exported this bag data according to one first reading pointer;
One second buffer in order to storing the initial address that these bag data are positioned at this first buffer, and is exported a return pointer according to a second reading fetch pointer;
One response process unit reconnects signal in order to respond packet generation one according to one; And
One pointer control module reconnects signal according to this, judges whether to make first reading pointer of this first buffer to get back to this return pointer corresponding address, if this reconnects the signal activation, then makes this first reading pointer equal this return pointer;
One second electronic device is exported this response bag in order to these bag data that transmit according to this first buffer;
Wherein bag output one acknowledgment number is also responded according to this that receives in this response process unit, and this pointer control module is upgraded the second reading fetch pointer of this second buffer according to this acknowledgment number, is all responded by this second electronic device less than the pairing bag in the address of this second reading fetch pointer in this second buffer representing;
Wherein, making this first reading pointer equal this return pointer is to make this first reading pointer turn back to the initial address of the bag that the first stroke in this first buffer do not responded by this second electronic device, passes once again with the bag that all successfully is not sent to this second electronic device.
10. data transmission system according to claim 9, it is characterized in that, after this response process unit rebuilds the line of this first electronic installation and this second electronic device, the error checking sign indicating number that the first stroke of this second electronic device output is responded bag carries out verification, if check results be correctly, then activation this reconnect signal.
CN2007101455593A 2007-08-28 2007-08-28 Data transmission method and system Active CN101123484B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101455593A CN101123484B (en) 2007-08-28 2007-08-28 Data transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101455593A CN101123484B (en) 2007-08-28 2007-08-28 Data transmission method and system

Publications (2)

Publication Number Publication Date
CN101123484A CN101123484A (en) 2008-02-13
CN101123484B true CN101123484B (en) 2011-07-06

Family

ID=39085675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101455593A Active CN101123484B (en) 2007-08-28 2007-08-28 Data transmission method and system

Country Status (1)

Country Link
CN (1) CN101123484B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860160A (en) * 1996-12-18 1999-01-12 Cypress Semiconductor Corp. High speed FIFO mark and retransmit scheme using latches and precharge
US20040131074A1 (en) * 2003-01-07 2004-07-08 Kurth Hugh R. Method and device for managing transmit buffers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860160A (en) * 1996-12-18 1999-01-12 Cypress Semiconductor Corp. High speed FIFO mark and retransmit scheme using latches and precharge
US20040131074A1 (en) * 2003-01-07 2004-07-08 Kurth Hugh R. Method and device for managing transmit buffers

Also Published As

Publication number Publication date
CN101123484A (en) 2008-02-13

Similar Documents

Publication Publication Date Title
US7583600B1 (en) Schedule prediction for data link layer packets
US20100027559A1 (en) Transmission device and data extended transmission method
CN102576339A (en) Multi-protocol storage device bridge
CN101788972A (en) System and method for transmitting data
CN101702639B (en) Check value calculation method and device of cyclic redundancy check
CN105868136A (en) Electronic device for packing multiple command/command frames and command frame processing method
US8230137B2 (en) Network processor, reception controller and data reception processing method performing direct memory access transfer
US7539204B2 (en) Data and context memory sharing
US7822040B2 (en) Method for increasing network transmission efficiency by increasing a data updating rate of a memory
CN101123484B (en) Data transmission method and system
CN110048865B (en) Bus data transmission method and device, electronic equipment and storage medium
CN101534259B (en) An asynchronous communication controller and its control method
JP5729902B2 (en) Parallel serial communication method
US7043589B2 (en) Bus system and bus interface
CN101464844B (en) Control method and bus interface of RAM use right
CN100493018C (en) Communication method via bus interface of network and and system thereof
WO2023033887A1 (en) On-demand packetization for a chip-to-chip interface
TW202306365A (en) Method for data processing of frame receiving of an interconnection protocol and storage device
US20120166686A1 (en) Method, apparatus and system for aggregating interrupts of a data transfer
Hyun et al. Design and verification for PCI express controller
CN112135286A (en) Method and device for improving transmission efficiency based on Bluetooth firmware upgrading
CN109120628A (en) Print system kilomega network communication means, terminal and system
CN115543877B (en) PCIE data transmission method and related device
CN102637153B (en) Coupling device for e.g. data processing arrangement, has cache memory receiving and storing data received in serial data format via serial interface, and transmitting data stored in cache memory to parallel interface
CN106561017A (en) Novel data transmission system with capability of dynamic adaption

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