Invention content
The problem of for meet demand is unable to for the mode of the line rate auto-negotiation of Serdes in the related technology, the present invention
A kind of Serdes speed matching methods and device are provided, at least to solve the above problems.
According to an aspect of the invention, there is provided a kind of Serdes speed matching methods, including:For Serdes configurations the
Change/unstring rate a string, and/rate of unstringing carries out string/unstrings with first stringization;Judge the output number of the Serdes
Whether matched according to synchronization parameter corresponding with the string of configuration/rate of unstringing;In the case where the judgment result is yes, described in determining
The stringization of configuration/rate of unstringing is identical as the input rate of the Serdes.
Preferably, the method further includes:In the case where judging result is no, for the second string of Serdes configurations
Change/unstring rate, and rejudge the Serdes output data and the string of the configuration/rate of unstringing it is corresponding synchronous
Whether parameter matches, wherein second stringization/rate of unstringing and first stringization/, and rate of unstringing is unequal.
Preferably, it is before the Serdes configures the second stringization/rate of unstringing, to further include:In preset rate set
Middle selection/rate in addition to rate of unstringing is as described second stringization/rate of unstringing except first stringization.
Preferably, judge the output data of the Serdes synchronous ginseng corresponding with the string of the configuration/rate of unstringing
Number whether match including:The output data of the Serdes is detected according to stringization/corresponding duration of rate of unstringing of the configuration
In sync mark;It is matched in the sync mark and the duration, determine the output data of the Serdes with
The string of the configuration/corresponding synchronization parameter of rate of unstringing matches;It is unmatched in the sync mark and the duration
In the case of, determine that the output data of Serdes synchronization parameter corresponding with the string of the configuration/rate of unstringing mismatches.
Preferably, the output data of the Serdes is detected according to the stringization of the configuration/corresponding duration of rate of unstringing
In sync mark include:When judging that the corresponding timer of the duration overflows, if detect preset sync mark, and/
Or whether cumulative error data are less than predetermined threshold value;In the case where the judgment result is yes, the sync mark and institute are determined
State duration matching;In the case where judging result is no, determine that the sync mark is mismatched with the duration.
Preferably, after determining that the sync mark is matched with the duration, further include:Again according to the configuration
Stringization/corresponding duration of rate of unstringing detects the sync mark in the output data of the Serdes.
Preferably, after the stringization for determining the configuration/rate of unstringing is identical as the input rate of the Serdes, also
Including:Local data processing is carried out according to string/rate of unstringing of the configuration.
According to another aspect of the present invention, a kind of Serdes rate matching apparatus is provided, including:Configuration module is used for
The first stringization/rate of unstringing is configured for Serdes, and/rate of unstringing carries out string/unstrings with first stringization;Judge mould
Block, for judging whether the corresponding synchronization parameter of string of the output data with configuration/rate of unstringing of the Serdes matches;Really
Cover half block, in the case where the judging result of the judgment module is to be, determine string/rate of unstringing of the configuration with
The input rate of the Serdes is identical.
Preferably, in the case where the judging result of the judgment module is no, described device further includes:Module is chosen,
For being chosen in preset rate set, except first stringization ,/rate in addition to rate of unstringing is as second stringization/unstrings
Rate;The configuration module is additionally operable to configure the second stringization/rate of unstringing for the Serdes;The judgment module is additionally operable to weight
Newly judge whether the output data of Serdes synchronization parameter corresponding with the string of the configuration/rate of unstringing matches,
In, rate of unstringing is unequal for second stringization/rate of unstringing and first stringization/.
Preferably, the judgment module includes:Detection unit is corresponded to for the string according to the configuration/rate of unstringing
Duration detect the sync mark in the output data of the Serdes;First determination unit, for the sync mark with
In the case of the duration is matched, determine that the output data of the Serdes is corresponding with the string of the configuration/rate of unstringing
Synchronization parameter matches;It is unmatched in the sync mark and the duration, determine the output number of the Serdes
It is mismatched according to synchronization parameter corresponding with the string of the configuration/rate of unstringing.
Preferably, the detection unit includes:Judging unit, when for judging that the corresponding timer of the duration overflows,
Whether detect whether preset sync mark and/or cumulative error data are less than predetermined threshold value;Second determination unit is used
In in the case where the judging result of the judging unit is to be, determine that the sync mark is matched with the duration;Described
In the case that the judging result of judging unit is no, determine that the sync mark is mismatched with the duration.
Preferably, described device further includes:Processing module carries out this for the string according to the configuration/rate of unstringing
Ground data processing.
Through the invention, Serdes configuration the first stringization/rates of unstringing are adopted as, and with first stringization/rate of unstringing
Carry out string/unstring;Judge the corresponding synchronization parameter of string of the output data with configuration/rate of unstringing of Serdes whether
Match;In the case where the judgment result is yes, stringization/rate of unstringing side identical with the input rate of Serdes of configuration is determined
Formula solves the problems, such as that the mode of the line rate auto-negotiation for Serdes in the related technology is unable to meet demand, can be quick
The requirement of Serdes rate auto-negotiations is completed, negotiation time is short, reliability is high, implementation complexity is low.
Specific implementation mode
Come that the present invention will be described in detail below with reference to attached drawing and in conjunction with the embodiments.It should be noted that not conflicting
In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
In view of in implementation process, the line rate of Serdes is typically unknown, and auto-negotiation mode is needed to be matched,
But the various rate frame formats transmitted on Serdes are commonly known.Therefore the present embodiment be Serdes line rate not
Know, but under the conditions of the various rate frame formats transmitted on Serdes are known, the method and device of the rate consulation of progress.The party
Method is not limited solely to the agreement of some standards, such as remote radio unit (RRU)(Remote Radio Unit, referred to as RRU)And base
It stands Base Band 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)Deng can also be user-defined frame format.Serdes can be rapidly completed in this method
Rate is consistent with high speed serialization rate, is properly received the function of data, has the time is short, reliability is high, implementation complexity is low etc.
Feature.
A kind of Serdes speed matching methods are provided in the present embodiment, and Fig. 1 is according to the ... of the embodiment of the present invention
The flow chart of Serdes speed matching methods, as shown in Figure 1, this method comprises the following steps:
Step S102 is configured the first stringization/rate of unstringing for Serdes, and is gone here and there with first stringization/rate of unstringing
Change/unstrings;
Whether step S104 judges the corresponding synchronization parameter of string of the output data with configuration/rate of unstringing of Serdes
Matching;
Step S106 determines the input of stringization/rate of unstringing and Serdes of configuration in the case where the judgment result is yes
Rate is identical.
The present embodiment through the above steps, by the output data of Serdes with configuration stringization/unstring corresponding to rate
Synchronization parameter is matched, due to only in the input rate of Serdes it is identical with the string of configuration/rate of unstringing,
The output data of Serdes could be same with the normal the output phase of stringization/rate of unstringing of above-mentioned configuration, in this case,
The output data of Serdes synchronization parameter corresponding with the string of configuration/rate of unstringing can match.Therefore, when Serdes's
In the case of stringization/synchronization parameter for unstringing corresponding to rate of output data and configuration is matched, then illustrate the input of Serdes
Rate is identical as the string of configuration/rate of unstringing, to obtain the input rate of Serdes.Which can be used in Serdes
Line rate it is unknown, but the various rate frame formats transmitted on Serdes it is known under the conditions of carry out rate consulation, solve phase
Serdes speed can be rapidly completed in the problem of being unable to meet demand for the mode of the line rate auto-negotiation of Serdes in the technology of pass
The requirement of rate auto-negotiation, implementation complexity are low.
Preferably, the judging result of step S104 be it is no in the case of, it was demonstrated that the string of configuration/rate of unstringing with
The input rate of Serdes simultaneously differs, at this point it is possible to configure the second stringization/rate of unstringing for Serdes, and rejudges
Whether the output data of Serdes synchronization parameter corresponding with the string of configuration/rate of unstringing matches, wherein and second stringization/
Rate of unstringing and the first stringization/rate of unstringing are unequal.In this way, can configuration string/rate of unstringing not just
In the case of really, the configuration of stringization/rate of unstringing is re-started, so as to get the input rate of correct Serdes,
Which reliability is high.It should be noted that above-mentioned " first " " second " is only used for facilitating description, it is not intended as to sequence successively
Or the restriction of specific meanings.
It preferably, can be by pre- in the case where the first stringization/rate of unstringing is incorrect is reconfigured
The rate set being first arranged chooses above-mentioned second stringization/rate of unstringing, second stringization/rate of unstringing and the first stringization/solution
String rate difference.In this way, rate range of choice when reconfiguring stringization/rate of unstringing is reduced, therefore
Shorten negotiation time.There are many kinds of the set-up modes of the rate set, for example, rate set can be user oneself definition
, can be the full rate set that Current protocol is supported, or can also be the rate set that starting equipment is supported.From rate set
It can be random that the mode of the second stringization/rate of unstringing is chosen in conjunction, can also be chosen according to user-defined sequence, such as
It can choose from low to high or from high to low.
Judge that string of the output data with configuration/rate of unstringing of Serdes is corresponding as a preferred implementation manner,
The whether matched mode of synchronization parameter can be carried out by the sync mark in output data.For example, can be according to configuration
Sync mark in the output data of the stringization/duration detection Serdes corresponding to rate that unstrings;In sync mark and duration
In the case of matching, then the corresponding synchronization parameter phase of string of the output data with configuration/rate of unstringing of Serdes can be determined
Match;It is unmatched with duration in sync mark, then can determine Serdes output data and configuration string/unstring
The corresponding synchronization parameter of rate mismatches.Judge whether output data matches with synchronization parameter in this way, it is easily operated,
Realizability is strong.
Preferably, it can detect whether sync mark matches with duration by way of timer.Specifically, it can be determined that
When the corresponding timer of above-mentioned duration overflows, if whether not to detect preset sync mark and/or cumulative error data
More than predetermined threshold value;In the case where the judgment result is yes, then it can determine that sync mark is matched with duration;It is in judging result
In the case of no, then it can determine that sync mark is mismatched with duration.
Preferably, after determining that sync mark is matched with duration, it was demonstrated that the input data of current Serdes and configuration
String/rate of unstringing it is identical, at this point it is possible to which the duration according to the stringization of configuration/unstring corresponding to rate detects again
Sync mark in the output data of Serdes, for example, the corresponding timer of above-mentioned duration can be reset.Pass through this side
Formula, can be rapid to carry out auto-negotiation next time when the input data of Serdes changes, compared to negotiating in the related technology
Normal data flow is just only sent after the completion, does not send the mode of certain code word, can complete Serdes rates more quickly
Auto-negotiation.
In addition, as a preferred implementation manner, in the input data of current Serdes and the string of configuration/speed of unstringing
In the case of rate is identical, directly the string configured/rate of unstringing can also be applied in subsequent local data processing module,
Such as in local parallel data processing module, so as to carry out local data processing according to the string of configuration/rate of unstringing.It is logical
This mode is crossed, the function of carrying out auto-negotiation with the output speed of Serdes, section are may dispense in local data processing module
Logical resource is saved.
Corresponding to the above method, the present embodiment additionally provides a kind of Serdes rate matching apparatus, the device for realizing
Above-described embodiment and preferred embodiment had carried out repeating no more for explanation.As used below, term " module " can
To realize the combination of the software and/or hardware of predetermined function.Although device described in following embodiment is preferably come with software
It realizes, but the realization of the combination of hardware or software and hardware is also that may and be contemplated.
Fig. 2 is the structure diagram of Serdes rate matching apparatus according to the ... of the embodiment of the present invention, as shown in Fig. 2, this method
Including:Configuration module 22, judgment module 24 and determining module 26, are below described in detail modules.
Configuration module 22, for configuring the first stringization/rate of unstringing for Serdes, and with first stringization/rate of unstringing
Carry out string/unstring;Judgment module 24 is connected with configuration module 22, output data and configuration module for judging Serdes
Whether string/corresponding synchronization parameter of rate of unstringing of 22 configurations matches;Determining module 26 is connected with judgment module 24, is used for
In the case where the judging result of judgment module 24 is to be, the string/rate of unstringing and Serdes that configuration module 22 configures are determined
Input rate it is identical.
Fig. 3 is the preferred structure block diagram one of Serdes rate matching apparatus according to the ... of the embodiment of the present invention, as shown in figure 3,
In the case where the judging result of judgment module 24 is no, which can also include:Module 32 is chosen, with 24 phase of judgment module
Even, for choosing except the first stringization/rate in addition to rate of unstringing is as second stringization/speed of unstringing in preset rate set
Rate;Configuration module 22 can be also used for configuring the second stringization/rate of unstringing for Serdes;Judgment module 24 can be also used for again
Judge whether the corresponding synchronization parameter of string of the output data with configuration/rate of unstringing of Serdes matches, wherein the second string
Changing/rate of unstringing and the first stringization/, rate of unstringing is unequal.
Fig. 4 is the preferred structure block diagram of judgment module 24 according to the ... of the embodiment of the present invention, as shown in figure 4, judgment module 24
May include:Detection unit 242 detects the output number of Serdes for the corresponding duration of the stringization according to configuration/rate of unstringing
Sync mark in;First determination unit 244, is connected with detection unit 242, in sync mark and the matched feelings of duration
Under condition, determine that the corresponding synchronization parameter of string of the output data with configuration/rate of unstringing of Serdes matches;In sync mark
With duration it is unmatched in the case of, determine the corresponding synchronization parameter of string of the output data with configuration/rate of unstringing of Serdes
It mismatches.
Fig. 5 is the preferred structure block diagram of detection unit 242 according to the ... of the embodiment of the present invention, as shown in figure 5, detection unit
242 may include:Judging unit 2422, when for judging that the corresponding timer of above-mentioned duration overflows, if detect preset
Whether sync mark and/or cumulative error data are less than predetermined threshold value;Second determination unit 2424, with judging unit 2422
It is connected, in the case where the judging result of judging unit 2422 is to be, determining that sync mark is matched with duration;Judging list
In the case that the judging result of member is no, determine that sync mark is mismatched with duration.
Fig. 6 is the preferred structure block diagram two of Serdes rate matching apparatus according to the ... of the embodiment of the present invention, as shown in fig. 6,
The device can also include:Processing module 62 is connected with configuration module 22, string/solution for being configured according to configuration module 22
Rate of going here and there carries out local data processing.
It is illustrated with reference to preferred embodiment, following embodiment combines above-described embodiment and its preferred implementation side
Formula.
In the preferred embodiment, it provides a kind of transceiver and uses Serdes(SERializer/
DESerializer)A kind of device and method of line rate auto-negotiation scheme when being communicated.
CPRI protocol rate auto-negotiations in the related art do not solve the problem of how Serdes rates negotiate, and
The rate consulation of Serdes is separately transmitted using synchronous with data, synchronization character is only transmitted when negotiating, after negotiation
Transmission data cannot solve the problems, such as the rate consulation with frame format.But both of these problems are in the line of this preferred embodiment
It can be effectively addressed in rate auto-negotiation scheme.
Fig. 7 is the structure diagram of the device of Serdes line rates auto-negotiation scheme according to the preferred embodiment of the invention, such as
Shown in Fig. 7, which includes 4 modules, and module 702 is high speed SerDes(Serdes), can generally be integrated in FPGA
Or in chip, can also be an independent chip.
Module 704 is a control module(Realize the function of configuration module 22 and determining module 26), work herein
With the rate of mainly configuration module 702(Stringization/rate of unstringing)And the synchronization parameter of module 706, the synchronization parameter can wrap
Include the specific character of fixed frame structure(Also known as sync mark), specific character interval.Module 704 configures a kind of speed to module 702
After rate, module 704 goes to check the sync mark that module 706 reports according to the timer timing of oneself, judges whether rate matches.
If it does not match, a kind of new rate can be configured to module 702, timer is reset, and is counted again.The rate of configuration is from speed
Rate set, rate set are defined by user oneself, can be the full rate set that agreement is supported, can also be that transceiver is supported
Rate set.Rate, which is chosen, also to be defined by user oneself, can from high to low, can also be from low to high.The timing of module 704
The minimum value principle that device is set is multiplied by the timer length of module 706 as the bit wide of parallel most small character.Here most small character is
Not decoded minimum bit assembled unit after unstringing, for example, when there are 8B10B encoding and decoding, the wide minimum word bit is just 10 ratios
It is special.
Module 706 is synchronous detection module, and output can be in a manner of the bit truncation of 702 deserializer of control module.Module
706 input has two-way, is data to be detected all the way, is the output of the speed parallel signals of module 702, can be that high speed is gone here and there
The signal for directly solving string signal, can also be further decoding exports after unstringing of row signal;Another way is the parameter configuration of detection, this
In can set the character of detection, the period of character, detection period i.e. timer, the error thresholds etc. of data, inside is
One state machine that can be configured, after each bit shift, state machine is executed according to the parameter of configuration.When timer overflows shape
State machine does not jump to the desired state of user or cumulative error data reach when setting thresholding, and it is nothing to report sync mark
Effect, is carried out at the same time bit-shifting operation, after shifting function, state machine jumps to minimum state.If timer overflows, state machine
In user's expectation state, then timer clearing, counts, bit does not shift, and reports sync mark again.The timer of module 706
Minimum setting principle is 3 times of character cycle to be detected.
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 include the reception synchronous state machine of module 708, thus in 708 modules just
The partial circuit can be saved.
This preferred embodiment by above-mentioned apparatus, ask by the Serdes rate auto-negotiations that can effectively solve fixed frame format
Topic, while saving the rate auto-negotiation again of module 708.The synchronous state machine of module 706 contains the synchronous regime of module 708
Machine, module 708 may dispense with reception synchronizing process, save logical resource.It is detected using character cycle, negotiation speed is fast.Than
As CPRI agreements at most only need 30 superframes under each rate configuration(2 milliseconds), so that it may to detect that rate configuration is
It is no correct, and in CPRI agreements, which is 0.9 to 1.1 seconds.
In another embodiment, a kind of software is additionally provided, the software is for executing above-described embodiment and preferred reality
Apply the technical solution described in example.
In another embodiment, a kind of storage medium is additionally provided, above-mentioned software is stored in the storage medium, it should
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 each module of the above invention or each step can be with general
Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
It is performed by computing device in the storage device, and in some cases, it can be with different from shown in sequence execution herein
The step of going out or describing, either they are fabricated to each integrated circuit modules or by them multiple modules or
Step is fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and softwares to combine.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, any made by repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.