Summary of the invention
Problem for not satisfying the demands for the mode of the wire rate auto-negotiation of Serdes in correlation technique, the invention provides a kind of Serdes speed matching method and device, at least to address the above problem.
According to an aspect of the present invention, provide a kind of Serdes speed matching method, having comprised: be Serdes configuration the first stringization/speed of unstringing, and with described the first stringization/speed of unstringing string/unstring; Judge whether the output data of the described Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing mates; Judgment result is that be in the situation that, determine that the string/speed of unstringing of described configuration is identical with the input rate of described Serdes.
Preferably, described method also comprises: in the situation that the determination result is NO, for described Serdes configuration the second stringization/speed of unstringing, and rejudge the output data of the described Serdes synchronization parameter corresponding with the string of the described configuration/speed of unstringing and whether mate, wherein, described the second stringization/speed of unstringing and described the first stringization/speed of unstringing are unequal.
Preferably, before described Serdes configuration the second stringization/speed of unstringing, also comprise: in default speed set, choose speed except described the first stringization/speed of unstringing as described the second stringization/speed of unstringing.
Preferably, judging whether the output data of the described Serdes synchronization parameter corresponding with the string of the described configuration/speed of unstringing mates comprises: according to duration corresponding to the string of the described configuration/speed of unstringing, detect the sync mark in the output data of described Serdes; In the situation that described sync mark is mated with described duration, determine that the output data of the described Serdes synchronization parameter corresponding with the string of the described configuration/speed of unstringing matches; In described sync mark and the unmatched situation of described duration, determine that the output data of the described Serdes synchronization parameter corresponding with the string of the described configuration/speed of unstringing do not mate.
Preferably, the sync mark detecting according to duration corresponding to the string of the described configuration/speed of unstringing in the output data of described Serdes comprises: judge when timer that described duration is corresponding overflows, default sync mark whether detected, and/or whether accumulative total misdata does not surpass predetermined threshold value; Judgment result is that be in the situation that, determining that described sync mark mates with described duration; In the situation that the determination result is NO, determine that described sync mark do not mate with described duration.
Preferably, after definite described sync mark is mated with described duration, also comprise: again according to duration corresponding to the string of the described configuration/speed of unstringing, detect the sync mark in the output data of described Serdes.
Preferably, after definite string/speed of unstringing of described configuration is identical with the input rate of described Serdes, also comprise: according to the string of the described configuration/speed of unstringing, carry out local data processing.
According to a further aspect in the invention, provide a kind of Serdes rate matching apparatus, having comprised: configuration module, be used to Serdes configuration the first stringization/speed of unstringing, and with described the first stringization/speed of unstringing string/unstring; Judge module, for judging whether the output data of the described Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing mates; Determination module, in the situation that judgment result is that of described judge module is to determine that the string/speed of unstringing of described configuration is identical with the input rate of described Serdes.
Preferably, in the situation that described judge module the determination result is NO, described device also comprises: choose module, for the speed set default, choose speed except described the first stringization/speed of unstringing as the second string/speed of unstringing; Described configuration module is also used to described Serdes configuration the second stringization/speed of unstringing; Whether described judge module also mates for rejudging the output data of the described Serdes synchronization parameter corresponding with the string of the described configuration/speed of unstringing, and wherein, described the second stringization/speed of unstringing and described the first stringization/speed of unstringing are unequal.
Preferably, described judge module comprises: detecting unit, for detect the sync mark of the output data of described Serdes according to duration corresponding to the string of the described configuration/speed of unstringing; The first determining unit, in the situation that described sync mark is mated with described duration, determines that the output data of the described Serdes synchronization parameter corresponding with the string of the described configuration/speed of unstringing matches; In described sync mark and the unmatched situation of described duration, determine that the output data of the described Serdes synchronization parameter corresponding with the string of the described configuration/speed of unstringing do not mate.
Preferably, described detecting unit comprises: judging unit, when judging that timer that described duration is corresponding overflows, default sync mark whether detected, and/or whether accumulative total misdata does not surpass predetermined threshold value; The second determining unit, in the situation that judgment result is that of described judging unit is to determine that described sync mark mates with described duration; In the situation that described judging unit the determination result is NO, determine that described sync mark do not mate with described duration.
Preferably, described device also comprises: processing module, and for carrying out local data processing according to the string of the described configuration/speed of unstringing.
By the present invention, be adopted as Serdes configuration the first stringization/speed of unstringing, and with this first stringization/speed of unstringing string/unstring; Judge whether the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing mates; Judgment result is that be in the situation that, determine the string/speed of the unstringing mode identical with the input rate of Serdes of configuration, solved in correlation technique the problem that the mode for the wire rate auto-negotiation of Serdes can not satisfy the demands, can complete fast the requirement of Serdes speed auto-negotiation, negotiation time is short, reliability is high, implementation complexity is low.
Embodiment
Hereinafter with reference to accompanying drawing, also describe the present invention in detail in conjunction with the embodiments.It should be noted that, in the situation that not conflicting, embodiment and the feature in embodiment in the application can combine mutually.
Consider in implementation process, the wire rate of Serdes is normally unknown, need auto-negotiation mode to mate, but the various rate frame forms of the upper transmission of Serdes is normally known.Therefore the present embodiment is unknown at the wire rate of Serdes, but under the condition that on Serdes, the various rate frame forms of transmission are known, the method for the rate consulation carrying out and device.The method is not confined to the agreement of some standards, such as remote radio unit (RRU) (Remote Radio Unit, referred to as RRU) and base station baseband unit (Baseband Unit, referred to as BBU) between interface (Interface between the RRU and the BBU, referred to as IR), CPRI, open base station architecture tissue (Open Base Station Standard Initiative, referred to as OBSAI) etc., can be also user-defined frame format.It is consistent with high speed serialization speed that the method can complete Serdes speed fast, correctly receives the function of data, has short, the feature such as reliability is high, implementation complexity is low of time.
A kind of Serdes speed matching method is provided in the present embodiment, and Fig. 1 is that as shown in Figure 1, the method comprises the steps: according to the flow chart of the Serdes speed matching method of the embodiment of the present invention
Step S102, is Serdes configuration the first stringization/speed of unstringing, and with this first stringization/speed of unstringing string/unstring;
Step S104, judges whether the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing mates;
Step S106, judgment result is that be in the situation that, determines that the string/speed of unstringing of configuration is identical with the input rate of Serdes.
The present embodiment passes through above-mentioned steps, the output data of Serdes are mated with the corresponding synchronization parameter of the string/speed of unstringing of configuration, due to only in the situation that the input rate of Serdes and the string of the configuration/speed of unstringing is identical, the output data of Serdes could be identical with the normal output of the string/speed of unstringing of above-mentioned configuration, in this case, synchronization parameter corresponding to the output data of Serdes and the string of the configuration/speed of unstringing just can mate.Therefore, in the situation that the output data of Serdes are mated with the corresponding synchronization parameter of the string of the configuration/speed of unstringing, illustrate that the input rate of Serdes is identical with the string of the configuration/speed of unstringing, thereby obtained the input rate of Serdes.Which can be used in wire rate the unknown of Serdes, but carry out rate consulation under the known condition of the various rate frame forms of the upper transmission of Serdes, solved in correlation technique the problem that the mode for the wire rate auto-negotiation of Serdes can not satisfy the demands, can complete fast the requirement of Serdes speed auto-negotiation, implementation complexity is low.
Preferably, in the situation that step S104 the determination result is NO, string/the speed of unstringing of proof configuration is not identical with the input rate of Serdes, now, can configure the second string/speed of unstringing for Serdes, and rejudge the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing and whether mate, wherein, this second stringization/speed of unstringing and the first stringization/speed of unstringing is unequal.In this way, can in the incorrect situation of the string/speed of unstringing of configuration, re-start the configuration of the stringization/speed of unstringing, thereby can get the input rate of correct Serdes, which reliability is high.It should be noted that, above-mentioned " first " " second " only described for convenient, not as the restriction to order priority or specific meanings.
Preferably, incorrect in the first string/speed of unstringing, in the situation that need to reconfigure, can be by the rate set setting in advance incompatible above-mentioned the second stringization/speed of unstringing of choosing, this second stringization/speed of unstringing is different from the first stringization/speed of unstringing.In this way, dwindle the speed range of choice while reconfiguring stringization/unstring speed, therefore shortened negotiation time.The set-up mode of this speed set has a variety of, and for example, speed set can be user oneself definition, can be the full rate set that current agreement is supported, or can be also the speed set that starting equipment is supported.The mode of choosing the second string/speed of unstringing from speed set can be random, also can choose according to user-defined order, for example, can choose from low to high or from high to low.
As a kind of preferred implementation, judge that the mode whether the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing mate can be undertaken by the sync mark in output data.For example, can be according to the sync mark in the output data of the corresponding duration detection of the string/speed of unstringing of configuration Serdes; In the situation that sync mark is mated with duration, can determine that the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing matches; In sync mark and the unmatched situation of duration, can determine that the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing do not mate.Whether judgement output data mate with synchronization parameter in this way, easy operating, and realizability is strong.
Whether preferably, can detect by the mode of timer sync mark mates with duration.Particularly, can judge when timer corresponding to above-mentioned duration overflows, default sync mark whether be detected, and/or whether accumulative total misdata does not surpass predetermined threshold value; Judgment result is that be in the situation that, can determine that sync mark mates with duration; In the situation that the determination result is NO, can determine that sync mark do not mate with duration.
Preferably, after definite sync mark is mated with duration, prove that the input data of current Serdes are identical with the string of the configuration/speed of unstringing, now, can be again according to the sync mark in the output data of the corresponding duration detection of the string/speed of unstringing of configuration Serdes, for example, can be by timer zero clearing corresponding to above-mentioned duration.In this way, in the time of can changing in the input data of Serdes, carry out rapidly auto-negotiation next time, compare in correlation technique and just only send normal data flow after having consulted, do not send the mode of certain code word, can complete more quickly the auto-negotiation of Serdes speed.
In addition, as a kind of preferred implementation, in the situation that the input data of current Serdes are identical with the string of the configuration/speed of unstringing, can also directly the string configuring/speed of unstringing be applied in to follow-up local data processing module, for example, in local parallel data processing module, thereby can carry out local data processing according to the string/speed of unstringing of configuration.In this way, in local data processing module, just can save the function of carrying out auto-negotiation with the output speed of Serdes, save logical resource.
Corresponding to said method, the present embodiment also provides a kind of Serdes rate matching apparatus, and this device is used for realizing above-described embodiment and preferred implementation, has carried out repeating no more of explanation.As used below, the combination of software and/or the hardware of predetermined function can be realized in term " module ".Although the described device of following examples is preferably realized with software, hardware, or the realization of the combination of software and hardware also may and be conceived.
Fig. 2 is that as shown in Figure 2, the method comprises according to the structured flowchart of the Serdes rate matching apparatus of the embodiment of the present invention: configuration module 22, judge module 24 and determination module 26, be elaborated to modules below.
Configuration module 22, is used to Serdes configuration the first stringization/speed of unstringing, and with this first stringization/speed of unstringing string/unstring; Judge module 24, is connected with configuration module 22, for judging whether the output data synchronization parameter corresponding with the string/speed of unstringing of configuration module 22 configurations of Serdes mates; Determination module 26, is connected with judge module 24, in the situation that judgment result is that of judge module 24 is to determine that the string/speed of unstringing of configuration module 22 configuration is identical with the input rate of Serdes.
Fig. 3 is according to the preferred structure block diagram one of the Serdes rate matching apparatus of the embodiment of the present invention, as shown in Figure 3, in the situation that judge module 24 the determination result is NO, this device can also comprise: choose module 32, be connected with judge module 24, for the speed set default, choose speed except the first stringization/speed of unstringing as the second string/speed of unstringing; Configuration module 22 can also be used to Serdes configuration the second stringization/speed of unstringing; Whether judge module 24 can also mate for rejudging the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing, and wherein, the second stringization/speed of unstringing and the first stringization/speed of unstringing is unequal.
Fig. 4 is according to the preferred structure block diagram of the judge module 24 of the embodiment of the present invention, as shown in Figure 4, judge module 24 can comprise: detecting unit 242, for detect the sync mark of the output data of Serdes according to duration corresponding to the string/speed of unstringing of configuration; The first determining unit 244, is connected with detecting unit 242, in the situation that sync mark is mated with duration, determines that the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing matches; In sync mark and the unmatched situation of duration, determine that the output data of the Serdes synchronization parameter corresponding with the string of the configuration/speed of unstringing do not mate.
Fig. 5 is according to the preferred structure block diagram of the detecting unit 242 of the embodiment of the present invention, as shown in Figure 5, detecting unit 242 can comprise: judging unit 2422, when judging that timer that above-mentioned duration is corresponding overflows, default sync mark whether detected, and/or whether accumulative total misdata does not surpass predetermined threshold value; The second determining unit 2424, is connected with judging unit 2422, in the situation that judgment result is that of judging unit 2422 is to determine that sync mark mates with duration; In the situation that judging unit the determination result is NO, determine that sync mark do not mate with duration.
Fig. 6 is according to the preferred structure block diagram two of the Serdes rate matching apparatus of the embodiment of the present invention, as shown in Figure 6, this device can also comprise: processing module 62, is connected with configuration module 22, for carrying out local data processing according to the string/speed of unstringing of configuration module 22 configurations.
Below in conjunction with preferred embodiment, describe, following examples combine above-described embodiment and preferred implementation thereof.
In this preferred embodiment, provide a kind of transceiver to adopt Serdes(SERializer/DESerializer) device and method of a kind of wire rate auto-negotiation scheme while communicating.
The problem how unresolved Serdes speed of CPRI agreement speed auto-negotiation in correlation technique consults, and the employing of the rate consulation of Serdes is synchronously to separate transmission with data, a transmitting synchronous word when consulting, after negotiation finishes, only transmit data, can not solve the rate consulation problem with frame format.But these two problems can be effectively addressed in the wire rate auto-negotiation scheme of this preferred embodiment.
Fig. 7 is the structured flowchart of the device of Serdes wire rate auto-negotiation scheme according to the preferred embodiment of the invention, as shown in Figure 7, this device comprises 4 modules, module 702 is high speed SerDes (Serdes), generally can be integrated in FPGA or in the middle of chip, can be also an independently chip.
Module 704 is a control module (having realized the function of configuration module 22 and determination module 26), the effect is here mainly the speed (string/speed of unstringing) of configuration module 702 and the synchronization parameter of module 706, and this synchronization parameter can comprise specific character (claiming again sync mark), the specific character interval of anchor-frame structure.Module 704 is given after a kind of speed of module 702 configuration, and the sync mark that module 704 regularly goes checking module 706 to report according to the timer of oneself, judges whether speed mates.If do not mated, can give module 702 configuration a kind of new speed, timer zero clearing, again counting.The speed of configuration is from speed set, and speed set, by user oneself definition, can be the full rate set that agreement is supported, can be also the speed set that transceiver is supported.Speed is chosen also the definition by user oneself, can be from high to low, and also can be from low to high.The minimum value principle that the timer of module 704 is set is multiplied by the timer length of module 706 for the bit wide of parallel small character.The small character is here the minimum bit assembled unit of decoding not after unstringing, and for example, when there are 8B10B encoding and decoding, this minimum word bit is wide is just 10 bits.
Module 706 is synchronous detection module, the bit interception way that its output can control module 702 deserializers.It is data to be detected that the input of module 706 has two-way ,Yi road, for the output of the low-speed parallel signal of module 702, can be the direct solution string signal of high-speed serial signals, can be also the signal of decoding output again after unstringing; The parameter configuration of another road for detecting, here can set the character of detection, the time period of the cycle of character, detection is timer, the error thresholds of data etc., inside is a state machine that can configure, after each bit displacement, state machine is carried out according to the parameter of configuration.When timer overflow status machine does not jump to the state that user expects, or totally misdata arrives while setting thresholding, and it is invalid reporting sync mark, carries out bit shifting function simultaneously, and after shifting function, state machine jumps to minimum state.If timer overflows, state machine is at user's expectation state, and timer zero clearing, counts again, and bit is not shifted, and reports sync mark.The setting principle of the timer minimum of module 706 is character cycle to be detected 3 times.
Module 708 is local parallel data processing module, can be IR, CPRI, OBSAI or user-defined group of solution frame module.
The synchronous state machine of module 706 can comprise the reception synchronous state machine of module 708, thereby just can save this partial circuit in 708 modules.
This preferred embodiment, by said apparatus, can effectively solve the Serdes speed auto-negotiation problem of anchor-frame form, saves the auto-negotiation of speed again of module 708 simultaneously.The synchronous state machine that the synchronous state machine of module 706 has comprised module 708, module 708 just can be saved reception synchronizing process, saves logical resource.Utilize character cycle to detect, negotiation speed is fast.Such as CPRI agreement, under every kind of rate configuration, at most only need 30 superframes (2 milliseconds), whether correctly just can detect rate configuration, and in CPRI agreement, this process is 0.9 to 1.1 second.
In another embodiment, also provide a kind of software, the technical scheme that this software is described for carrying out above-described embodiment and preferred embodiment.
In another embodiment, also provide a kind of storage medium, stored above-mentioned software in this storage medium, this storage medium includes but not limited to CD, floppy disk, hard disk, scratch pad memory etc.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in storage device and be carried out by calculation element, and in some cases, can carry out shown or described step with the order being different from herein, or they are made into respectively to each integrated circuit modules, or a plurality of modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.