Embodiment
In order to make those skilled in the art person understand the scheme of the embodiment of the invention better, the embodiment of the invention is described in further detail below in conjunction with drawings and embodiments.
As shown in Figure 1, be the structural representation of embodiment of the invention quick interconnect equipment of peripheral components.
This equipment comprises: detecting unit 101 and encapsulation unit 102.Wherein:
Detecting unit 101 is used to detect addressing space and the label bit wide that opposite equip. to be communicated by letter is supported;
Encapsulation unit 102 is used for the transport layer protocol bag of communicating by letter being encapsulated with the label bit wide according to the addressing space of the detected opposite equip. support of described detecting unit.
Embodiment of the invention quick interconnect equipment of peripheral components, can be applied in the system of a plurality of PCI-E equipment, addressing range and the label bit wide that can adjust oneself automatically according to the addressing space and the label bit wide of detected opposite equip., coupling or compatible different opposite equip.s, and can access optimum bandwidth performance.
In embodiments of the present invention, a kind of preferred structure of described detecting unit 101 comprises as shown in Figure 2:
Send subelement 201, be used for sending read request packet to opposite equip.;
Receive subelement 202, be used to receive the bag of finishing that opposite equip. returns;
Subelement 203 is surveyed in the address, is used to be configured to survey the read request packet of addressing space, sends the read request packet of constructing to described transmission subelement 201, and wraps the addressing space of determining that opposite equip. is supported according to finishing of described reception subelement 202 receptions;
Label is surveyed subelement 204, is used to be configured to survey the read request packet of label bit wide, sends the read request packet of constructing to described transmission subelement 201, and wraps the label bit wide of determining that opposite equip. is supported according to finishing of described reception subelement 202 receptions.
In this embodiment, can survey by advanced row address, after determining the addressing space that opposite equip. is supported, carry out label again and survey.In this case:
Subelement 203 is surveyed in described address, specifically be used for according to minimum tag number (such as 5 bit bit wides), successively according to addressing space descending (such as, be respectively 64 bits, 32 bits) the sequential configuration read request packet, send the read request packet of structure to described transmission subelement 201, up to receive at described reception subelement 202 corresponding described minimum tag number correctly finish bag the time, determine that addressing space that described opposite equip. supports is the addressing space when the read request packet of front construction;
Described label is surveyed subelement 204, specifically be used for after the addressing space of subelement 203 definite opposite equip.s supports is surveyed in described address, addressing space according to the opposite equip. support, successively according to tag number ascending (such as, be respectively 5 bit bit wides, 8 bit bit wides) sequential configuration read request packet, send the read request packet of structure to described transmission subelement 201, and receive unsuccessful at described reception subelement 202, do not support, tag number is incorrect or tag number is not corresponding finish bag after, the label bit wide of determining described opposite equip. support is the preceding once bit wide of the tag number correspondence of the read request packet of structure.
Such as, the read request TLP bag that it is 5 bit bit wides that address detection subelement 203 is at first constructed 64 bit addressing space, tag number sends to opposite equip. by sending subelement 201, surveys as address first.
If the correct bag of finishing that receives that subelement 202 received that opposite equip. returns, illustrate that then the address is surveyed successfully first, opposite equip. is supported 64 bit addressing, and this moment, the tag number (5 bit bit wide) that subelement 203 notified tag detection subelement 204 opposite equip.s are supported 64 bit addressing and current read request TLP bag correspondence was surveyed in the address.The read request TLP bag that it is 8 bit bit wides that label is surveyed subelement 204 structures one 64 bit addressing space, tag number sends to opposite equip. by sending subelement 201, surveys as label first.If what receive that subelement 202 receives this tag number 8 that opposite equip. returns correctly finishes bag, illustrate that then opposite equip. supports 8 bit label bit wides.At this moment, in order to make the PCI-E system obtain optimum bandwidth performance, label is surveyed subelement 204 needs to keep addressing space constant, but increase the bit wide of tag number, continue structure read request TLP bag, send to and send subelement 201 transmissions, receive one that opposite equip. returns and do not support up to receiving subelement 202, unsuccessful, tag number is incorrect or tag number is not corresponding finish bag after, illustrate that opposite equip. do not support current label bit wide, at this moment, the label bit wide that can determine the opposite equip. support is consistent with the preceding bit wide of once receiving of correctly finishing the corresponding tag number of bag.So far, whole detection process finishes.
If of receiving that subelement 202 receives that opposite equip. returns is unsuccessful or do not support to finish bag, perhaps do not receive the correct bag of finishing of 64 bits that opposite equip. returns in the given time, illustrate that then failure is surveyed in the address first, opposite equip. is not supported 64 bit addressing, this moment, subelement 203 continuation structure read request TLP bags were surveyed in the address, and the addressing space that read request TLP is wrapped changes 32 bits into, tag number is constant still to be 5 bit bit wides, the read request TLP bag of structure is sent to opposite equip. by sending subelement 201, up to receive subelement 202 receive correct finish bag after, the addressing space in determining addressing space that opposite equip. supports and the corresponding read request TLP that works as front construction wrapping is consistent.
In this embodiment, can also sign detection by advanced rower, after determining the label bit wide that opposite equip. is supported, carry out the address again and survey.In this case:
Described label is surveyed subelement 204, specifically be used for according to minimum addressing space (such as, 8 bits), successively according to tag number descending (such as, be respectively 8 bit bit wides, 5 bit bit wides) the sequential configuration read request packet, send the read request packet of structure to described transmission subelement 201, up to described reception subelement 202 receive corresponding described minimum addressing space correctly finish bag the time, determine that label bit wide that described opposite equip. supports is the bit wide when the tag number correspondence of the read request packet of front construction;
Subelement 203 is surveyed in described address, specifically be used for after described label is surveyed the label bit wide of subelement 204 definite opposite equip.s supports, the tag number of the label bit wide correspondence of supporting according to opposite equip., successively according to addressing space ascending (such as, be respectively 8 bits, 32 bits, 64 bits) sequential configuration read request packet, send the read request packet of structure to described transmission subelement 201, and receive unsuccessful or do not support to finish bag at described reception subelement 202, after perhaps not receiving the detection packet of addressing in the given time, the addressing space of determining described opposite equip. support is the preceding once addressing space of the read request packet of structure.
Such as, the read request TLP bag that it is 8 bit bit wides that label detection subelement 204 is at first constructed 8 bit addressing space, tag number sends to opposite equip. by sending subelement 201, surveys as label first.
If receiving subelement 202, to have received tag number that opposite equip. returns be 8 the correct bag of finishing, illustrate that then label is surveyed successfully first, opposite equip. is supported 8 bit label bit wides, and this moment, label was surveyed the information Notify Address detection subelement 203 that the addressing space (8 bit) of 8 bit label bit wides and current read request TLP bag correspondence supported opposite equip. by subelement 204.The read request TLP bag that it is 8 bit bit wides that subelement 203 structures one 32 bit addressing space, tag number are surveyed in the address sends to opposite equip. by sending subelement 201, surveys as address first.Finish bag if of receiving that subelement 202 receives that opposite equip. returns is correct, illustrate that then opposite equip. supports 32 bit addressing spaces.At this moment, in order to make the PCI-E system obtain optimum bandwidth performance, subelement 203 is surveyed in the address needs to keep tag number constant, but increase addressing space, continue structure read request TLP bag, send to and send subelement 201 transmissions, receive one that opposite equip. returns and do not support or the unsuccessful bag of finishing up to receiving subelement 202, perhaps do not receive in the given time finish bag after, illustrate that opposite equip. do not support current addressing space, at this moment, to finish the corresponding addressing space of bag consistent with preceding once receive correct for the addressing space that can determine the opposite equip. support.So far, whole detection process finishes.
If of receiving that subelement 202 receives that opposite equip. returns does not support or is unsuccessful, perhaps tag number is incorrect or not corresponding finishes bag, illustrate that then label is surveyed failure first, opposite equip. is not supported 8 bit label bit wides, this moment, label was surveyed subelement 204 continuation structure read request TLP bags, and the tag number that read request TLP is wrapped changes 5 bit bit wides into, addressing space is constant still to be 8 bits, the read request TLP bag of structure is sent to opposite equip. by sending subelement 201, up to receive that subelement 202 receives tag number in the corresponding read request TLP bag correct finish bag after, the bit wide of the tag number in determining label bit wide that opposite equip. supports and the corresponding read request TLP that works as front construction wrapping is consistent.
Certainly, described detecting unit 101 is not limited in structure shown in Figure 2, also other malformations can be arranged.Such as, address probe unit 203 and label probe unit 204 wherein can be integrated, the also arbitration functions of the addressing space that the probe unit 203 pairs of opposite equip.s in address can be supported, and the arbitration functions of the label bit wide of 204 pairs of opposite equip. supports of label probe unit is transplanted in the described reception subelement 202.For another example, can also independently finish respectively the addressing space of opposite equip. and the detecting function of label bit wide, promptly not need mutual between address probe unit 203 and the label probe unit 204 by address probe unit 203 and label probe unit 204.Certainly, other malformations can also be arranged, enumerate no longer one by one at this.
The quick interconnect equipment of peripheral components of the embodiment of the invention can be used as the endpoint device of PCI-E system, adaptively with different PCI-E root complexs or endpoint device is complementary or compatible.Described root complex is the assembly in the PCI-E system, refers to the equipment that connects CPU and storage subsystem PCI Express structure.
Described quick interconnect equipment of peripheral components can be by FPGA (Field-Programmable Gate Array, field programmable gate array) or ASIC (Application Specific Integrated Circuit, special IC) etc. form according to the logical design of setting.
Corresponding to quick interconnect equipment of peripheral components recited above, the embodiment of the invention also provides the method for a kind of quick interconnect equipment of peripheral components and different communication terminals coupling.
As shown in Figure 3, be the process flow diagram of this method, may further comprise the steps:
Step 301 when quick interconnect equipment of peripheral components starts, detects addressing space and label bit wide that opposite equip. to be communicated by letter is supported;
Step 302 encapsulates the transport layer protocol bag of communicating by letter with the label bit wide according to the addressing space of detected opposite equip. support.
The method of the embodiment of the invention, can be applied in the system of a plurality of PCI-E equipment, the addressing range and the label bit wide that make PCI-E equipment adjust oneself automatically according to the addressing space and the label bit wide of detected opposite equip., automatically mate or compatible different opposite equip.s, and can access optimum bandwidth performance.
In this embodiment, when detecting addressing space that opposite equip. to be communicated by letter supports and label bit wide, can survey by advanced row address, after determining the addressing space that opposite equip. is supported, carry out label again and survey; Also can sign detection by advanced rower, after determining the label bit wide that opposite equip. is supported, carry out the address again and survey.
As shown in Figure 4, be a kind of specific implementation process flow diagram of the method for embodiment of the invention quick interconnect equipment of peripheral components and different communication terminals coupling, may further comprise the steps:
Step 401 when quick interconnect equipment of peripheral components starts, sends the read request packet be used to survey addressing space to opposite equip., and receives the bag of finishing that opposite equip. returns, according to the addressing space that bag determines that opposite equip. is supported of finishing that receives.
Particularly, can be according to minimum tag number, successively according to the descending sequential configuration read request packet of addressing space, and the read request packet of structure sent to opposite equip.; If what receive corresponding described minimum tag number correctly finishes bag, determine that then addressing space that described opposite equip. supports is the addressing space when the read request packet of front construction.Detailed process can not repeat them here with reference to the front about the description among the embodiment of quick interconnect equipment of peripheral components.
Step 402, the addressing space according to the opposite equip. of determining is supported sends the read request packet that is used to survey the label bit wide to opposite equip., and receives the bag of finishing that opposite equip. returns, according to the label bit wide that bag determines that opposite equip. is supported of finishing that receives.
Particularly, can be according to the addressing space of the opposite equip. of determining, successively according to the ascending sequential configuration read request packet of tag number, and the read request packet of structure sent to opposite equip.; Receive unsuccessful, do not support, tag number is incorrect or tag number is not corresponding finish bag after, the label bit wide of determining described opposite equip. support is the preceding once bit wide of the tag number correspondence of the read request packet of structure.Detailed process can not repeat them here with reference to the front about the description among the embodiment of quick interconnect equipment of peripheral components.
Step 403 encapsulates the transport layer protocol bag of communicating by letter with the label bit wide according to the addressing space of detected opposite equip. support.
As shown in Figure 5, be the another kind of specific implementation process flow diagram of the method for embodiment of the invention quick interconnect equipment of peripheral components and different communication terminals coupling, may further comprise the steps:
Step 501 when quick interconnect equipment of peripheral components starts, sends the read request packet be used to survey the label bit wide to opposite equip., and receives the bag of finishing that opposite equip. returns, according to the label bit wide that bag determines that opposite equip. is supported of finishing that receives.
Particularly, can be according to minimum addressing space, successively according to the descending sequential configuration read request packet of tag number, and the read request packet of structure sent to opposite equip.; Receive corresponding described minimum addressing space correctly finish bag after, determine that label bit wide that described opposite equip. supports is the bit wide when the tag number correspondence of the read request packet of front construction.Detailed process can not repeat them here with reference to the front about the description among the embodiment of quick interconnect equipment of peripheral components.
Step 502, the label bit wide according to the opposite equip. of determining is supported sends the read request packet that is used to survey addressing space to opposite equip., and receives the bag of finishing that opposite equip. returns, according to the addressing space that bag determines that opposite equip. is supported of finishing that receives.
Particularly, the tag number of the label bit wide correspondence that can support according to the opposite equip. of determining successively according to the ascending sequential configuration read request packet of addressing space, and sends to opposite equip. with the read request packet of structure; After receiving unsuccessful or not supporting to finish bag or do not receive the detection packet of addressing in the given time, the addressing space of determining described opposite equip. support is the preceding once addressing space of the read request packet of structure.Detailed process can not repeat them here with reference to the front about the description among the embodiment of quick interconnect equipment of peripheral components.
Step 503 encapsulates the transport layer protocol bag of communicating by letter with the label bit wide according to the addressing space of detected opposite equip. support.
Certainly, the method for the embodiment of the invention is not limited in above-mentioned these two kinds of specific implementations, and other modes can also be arranged, and enumerates no longer one by one at this.
Utilize the quick interconnect equipment of peripheral components of the embodiment of the invention and the method for different communication terminals coupling, the endpoint device that can make the PCI-E system is adaptively with different PCI-E root complexs or endpoint device is complementary or compatible, and makes the PCI-E system obtain optimum bandwidth performance.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in the computer read/write memory medium, described storage medium, as: ROM/RAM, magnetic disc, CD etc.
More than the embodiment of the invention is described in detail, used embodiment herein the present invention set forth, the explanation of above embodiment just is used for help understanding method and apparatus of the present invention; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.