CN104702364B - Clock frequency method of adjustment and device - Google Patents

Clock frequency method of adjustment and device Download PDF

Info

Publication number
CN104702364B
CN104702364B CN201310671523.4A CN201310671523A CN104702364B CN 104702364 B CN104702364 B CN 104702364B CN 201310671523 A CN201310671523 A CN 201310671523A CN 104702364 B CN104702364 B CN 104702364B
Authority
CN
China
Prior art keywords
network equipment
port
clock frequency
current period
gpio
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
CN201310671523.4A
Other languages
Chinese (zh)
Other versions
CN104702364A (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.)
Shandong Rongzhixin Enterprise Consulting Service Co ltd
Suzhou Yudeshui Electric Technology Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310671523.4A priority Critical patent/CN104702364B/en
Publication of CN104702364A publication Critical patent/CN104702364A/en
Application granted granted Critical
Publication of CN104702364B publication Critical patent/CN104702364B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention discloses a kind of clock frequency method of adjustment and device.The clock frequency method of adjustment includes:The clock frequency of the network equipment is monitored, the processor of the network equipment includes M universal input and exports GPIO, and for being adjusted to the clock frequency of the network equipment, wherein M is the integer more than or equal to 1;If the clock frequency of the network equipment is in negative frequency deviation, the M GPIO is controlled to change the input voltage of the voltage controlled oscillator of the network equipment, to adjust the clock frequency of the network equipment.Clock frequency method of adjustment disclosed in this invention and device can reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.

Description

Clock frequency method of adjustment and device
Technical field
The present embodiments relate to the communication technology, more particularly to a kind of clock frequency method of adjustment and device.
Background technology
In ethernet environment, clock source of each network equipment generally use local clock as data acquisition and transmission.Mesh The local clock of the preceding network equipment is realized using crystal oscillator;Most of crystal oscillators are the inclined reference clock of zero-frequency.However, due to load The influence of electric capacity, crystal oscillator may show as negative frequency deviation.When the clock frequency between the network equipment of transmitting message is asynchronous, i.e., There is frequency difference in the crystal oscillator that each network equipment of transmitting message uses, for example, when the clock frequency of a network equipment is more than separately The clock frequency of one network equipment, the less network equipment of clock frequency are in negative frequency deviation, and can cause the phenomenon abandoned.It is existing Have in technology, typically require that clock frequency difference disclosure satisfy that 802.3 protocol requirements, i.e., clock difference on the frequency is within +/- 50PPM.
It is typically at present the crystal oscillator for customizing the positive frequency deviation 25PPM of compatible fixation, then manually fixes positive frequency deviation with this 25PPM crystal oscillator replaces the crystal oscillator of the network equipment in negative frequency deviation, so causes human cost and equipment cost increase.
The content of the invention
The present invention provides a kind of clock frequency method of adjustment and device, reducing because the network equipment is in negative frequency deviation Caused packet loss phenomenon.
The first aspect of the present invention provides a kind of clock frequency method of adjustment, it is characterised in that including:
The clock frequency of the network equipment is monitored, the processor of the network equipment includes M universal input and exports GPIO, uses It is adjusted in the clock frequency to the network equipment, wherein M is the integer more than or equal to 1;
If the clock frequency of the network equipment is in negative frequency deviation, controls the M GPIO to change the network and set The input voltage of standby voltage controlled oscillator, to adjust the clock frequency of the network equipment.
With reference in a first aspect, in the first possible implementation of first aspect, the M is the integer more than or equal to 2;
Correspondingly, the input voltage for the voltage controlled oscillator that the control M GPIO changes the network equipment includes:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of the port, and is less than the second buffer threshold, control The first GPIO in the M GPIO exports high level, and remaining GPIO is input state in the M GPIO, wherein, it is described The partial pressure pin of voltage controlled oscillator is connected between the first divider resistance and the second divider resistance, and the first GPIO passes through adjustment Resistance is in parallel with first divider resistance.
With reference to the possible implementation of the first of first aspect and first aspect, second in first aspect may be real In existing mode, the clock frequency of the monitoring network equipment includes:
The caching of the port of the network equipment is detected in real time;
If message be present in the caching of the port, the instantaneous delivery bandwidth of the port is obtained;
If the instantaneous delivery bandwidth of the port exceedes default port bandwidth threshold value, the network equipment is judged Clock frequency is in negative frequency deviation.
With reference to second of possible implementation of first aspect, in the third possible implementation of first aspect, obtain The instantaneous delivery bandwidth of the port is taken, including:
Obtain reception packet counting value of the port when current period starts and the reception at the end of current period Packet counting value;
According to the reception packet counting value when current period starts and the reception at the end of current period Packet counting value, obtain the message amount that the port receives in current period, the report received in the current period Literary quantity subtracts the reception when current period starts equal to described in the reception packet counting value at the end of current period Packet counting value;
According to the message amount received in current period, the instantaneous delivery bandwidth of the port is obtained, it is described The instantaneous delivery bandwidth of port is equal to the duration of the message amount received in current period divided by the current period The value of gained.
With reference to second of possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, go back Including:
If message is not present in the caching of described port, judge whether the clock frequency of the network equipment does overdeviation Adjustment;
If the clock frequency of the network equipment does overdeviation adjustment, the clock frequency of the network equipment is returned to Normal frequency.
Second aspect of the present invention provides a kind of clock frequency adjusting apparatus, including:
Monitoring module, for monitoring the clock frequency of the network equipment, the processor of the network equipment is general defeated including M Enter to export GPIO, for being adjusted the clock frequency of the network equipment, wherein M is the integer more than or equal to 1;
Adjusting module, if it is determined that the clock frequency for the network equipment is in negative frequency deviation, then control the M GPIO changes the input voltage of the voltage controlled oscillator of the network equipment, to adjust the clock frequency of the network equipment.
With reference to second aspect, in the first possible implementation of second aspect, the M is the integer more than or equal to 2;
The adjusting module is specifically used for:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of the port, and is less than the second buffer threshold, control The first GPIO in the M GPIO exports high level, and remaining GPIO is input state in the M GPIO, wherein, it is described The partial pressure pin of voltage controlled oscillator is connected between the first divider resistance and the second divider resistance, and the first GPIO passes through adjustment Resistance is in parallel with first divider resistance.
With reference to the possible implementation of the first of second aspect and second aspect, second in second aspect may be real In existing mode, the monitoring module is specifically used for:
The caching of the port of the network equipment is detected in real time;
If message be present in the caching of the port, the instantaneous delivery bandwidth of the port is obtained;
If the instantaneous delivery bandwidth of the port exceedes default port bandwidth threshold value, the network equipment is judged Clock frequency is in negative frequency deviation.
With reference to second of possible implementation of second aspect, in the third possible implementation of second aspect, institute Monitoring module is stated to be specifically used for:
Obtain reception packet counting value of the port when current period starts and the reception at the end of current period Packet counting value;
According to the reception packet counting value when current period starts and the reception at the end of current period Packet counting value, obtain the message amount that the port receives in current period, the report received in the current period Literary quantity subtracts the reception when current period starts equal to described in the reception packet counting value at the end of current period Packet counting value;
According to the message amount received in current period, the instantaneous delivery bandwidth of the port is obtained, it is described The instantaneous delivery bandwidth of port is equal to the duration of the message amount received in current period divided by the current period The value of gained.
With reference to second of possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, institute Monitoring module is stated to be additionally operable to:
If message is not present in the caching of the port, judge whether the clock frequency of the network equipment does overdeviation tune It is whole;
Correspondingly, if the clock frequency that the adjusting module is additionally operable to the network equipment does overdeviation adjustment, by institute The clock frequency for stating the network equipment returns to normal frequency.
It is of the invention to be to judge the clock frequency of the network equipment by the flow bandwidth for the port for monitoring the network equipment It is no negative frequency deviation to be present, when the clock frequency of the network equipment has negative frequency deviation, by changing the voltage-controlled of the network equipment The input voltage of oscillator, it is achieved thereby that dynamic adjusts the clock frequency of the network equipment, reduce due in relatively negative frequency The phenomenon of packet loss on the inclined network equipment.
Brief description of the drawings
Fig. 1 is clock frequency method of adjustment flow chart provided in an embodiment of the present invention;
Fig. 2 is the flow chart of monitoring clock frequency provided in an embodiment of the present invention;
Fig. 3 A are the GPIO of processor provided in an embodiment of the present invention and the connection diagram of voltage controlled oscillator;
Fig. 3 B are another clock frequency method of adjustment flow chart provided in an embodiment of the present invention;
Fig. 4 is clock frequency adjusting apparatus structural representation provided in an embodiment of the present invention;
Fig. 5 is the structural representation of the network equipment provided in an embodiment of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is clock frequency method of adjustment flow chart provided in an embodiment of the present invention, and the crystal oscillator suitable for the network equipment is Voltage controlled oscillator, method comprise the following steps:
Step 101, the clock frequency of the network equipment is monitored.
Wherein, the processor of the network equipment includes M GPIO(General Purpose Input Output, it is general defeated Enter output), for being adjusted to the clock frequency of the network equipment, wherein M is the integer more than or equal to 1.
Processor can be central processing unit(Central processing unit, abbreviation CPU).
Comparatively the so-called negative frequency deviation of the present embodiment is, for example, carry out two network equipments of message transmissions Between clock frequency it is asynchronous when, the clock frequency that can have network equipment is more than the clock frequency of another network equipment The situation of rate, now, the clock frequency of the less network equipment of clock frequency are in negative frequency deviation.
As shown in Fig. 2 the step 101 specifically may include steps of:
Step 201, the caching for detecting the port of the network equipment in real time whether there is message, if existing in the caching of port Message, step 202 is performed, otherwise, perform step 205.
In the present embodiment, detected in real time by timer the quantity of message in the caching of the port of the network equipment come Know and whether there is message in the caching of the port of the network equipment, when the quantity of message in the caching of the port of the network equipment is big When 1, message in the caching of the port of the network equipment be present, then step 202 is performed, when the port of the network equipment Caching in the quantity of message when being 0, message is not present in the caching of the port of the network equipment, then judges the network equipment Whether clock frequency does overdeviation adjustment, and when the clock frequency of the network equipment does overdeviation adjustment, clock frequency is recovered To normal frequency, when the clock frequency of the network equipment does not do overdeviation adjustment, clock frequency is not adjusted.
Step 202, the instantaneous delivery bandwidth of port is obtained.
In the present embodiment, detected after message being present in the caching of the port of the network equipment, obtained by step 201 The instantaneous delivery bandwidth of the port of the network equipment, calculated according to the message amount of the port of the network equipment The instantaneous delivery bandwidth of the port of the network equipment.
The step 202 specifically comprises the following steps:
Obtain reception packet counting value of the port when current period starts and the reception report at the end of current period Literary count value;
According to the reception packet counting value when current period starts and the reception packet counting at the end of current period Value, the message amount that the port receives within the current cycle is obtained, the message amount received in current period, which is equal to, to be worked as Reception packet counting value during preceding end cycle subtracts the reception packet counting value when current period starts;
According to the message amount received in current period, the instantaneous delivery bandwidth of port, the instantaneous stream of port are obtained Amount bandwidth is equal to the value obtained by the duration of the message amount received in current period divided by current period.
In this example, it is assumed that reception packet counting value of the port of the network equipment before current period starts is P1, the reception packet counting value at the end of current period is P2, report that the port of the network equipment receives in current period Literary quantity is P, then P=P2-P1, i.e. the message amount that the port of the network equipment receives in current period is equal to the current week Reception packet counting value at the end of phase subtract connect when the current period starts receive packet counting value.Assuming that between timer Be T every the time, i.e. current period when a length of T when, a width of B of instantaneous delivery band of the port of the network equipment, therefore, B= (P2-P1) T, i.e., the instantaneous delivery bandwidth of the port of the network equipment be equal in the current period message amount that receives divided by Value obtained by the duration of current period, so can be to be calculated the instantaneous delivery band of the port of the network equipment by message amount It is wide.
The technical scheme of the present embodiment, this is obtained by the message amount in the caching for the port for detecting the network equipment The instantaneous delivery bandwidth of the port of the network equipment.
Step 203, judge whether the instantaneous delivery bandwidth exceedes default port bandwidth thresholding, if so, step 204 is performed, Otherwise, step 205 is performed.
Generally, the thresholding of the default port bandwidth can be set by User Defined.In the present embodiment, by step The instantaneous delivery bandwidth B of the port of the network equipment is obtained in rapid 202, by the instantaneous delivery of the port of the network equipment The thresholding of bandwidth B and default port bandwidth is compared, and judges whether the instantaneous delivery bandwidth of the port exceedes default port band Wide thresholding, if exceeding, step 204 is performed, if being no more than, perform step 205.
Step 204, determine that the clock frequency of the network equipment is in negative frequency deviation.
Step 205, determine that the clock frequency of the network equipment is not at negative frequency deviation.
In the present embodiment, if judging that the instantaneous delivery bandwidth of the port of the network equipment exceedes in advance by step 203 If port bandwidth thresholding, it is determined that the clock frequency of the network equipment is in negative frequency deviation, if judging the network by step 203 The instantaneous delivery bandwidth of the port of equipment is not above default port bandwidth thresholding, it is determined that the clock frequency of the network equipment is not In negative frequency deviation.
Step 102, if the clock frequency of the network equipment is in negative frequency deviation, M GPIO of control changes the network and set The input voltage of standby voltage controlled oscillator, to adjust the clock frequency of the network equipment.
In the present embodiment, the crystal oscillator of the network equipment is voltage controlled oscillator, and the output frequency of voltage controlled oscillator and input are electric Certain relation between pressure be present, the output frequency of usual voltage controlled oscillator increases with the increase of input voltage.Therefore, when by When step 101 judges that the clock frequency of the network equipment is in negative frequency deviation, by the voltage controlled oscillator for changing the network equipment Input voltage, can reach adjust the network equipment clock frequency purpose.
The technical scheme of the present embodiment, the clock frequency of the network equipment can be monitored by timer whether in negative frequency Partially, the network equipment is adjusted by the input voltage for the voltage controlled oscillator for changing the network equipment when in negative frequency deviation when Clock frequency, reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.
Still optionally further, M is the integer more than or equal to 2;Correspondingly, described M GPIO of control changes the network equipment The input voltage of voltage controlled oscillator includes:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of port, and is less than the second buffer threshold, control M The first GPIO in GPIO exports high level, and remaining GPIO is input state in M GPIO, wherein, point of voltage controlled oscillator Pressure pipe pin is connected between the first divider resistance and the second divider resistance, and the first GPIO is by adjusting resistance and the first divider resistance It is in parallel.
In the embodiment of the present invention, the processor of the network equipment can include M GPIO(General Purpose Input Output, universal input output), for carrying out multistage adjustment to the clock frequency of the network equipment, wherein M is more than or equal to 1 Integer.
As M=1, that is, represent that processor has a GPIO, such as the first GPIO.Now, if the port of the network equipment is delayed Stored messages quantity is more than the first buffer threshold, and when being less than the second buffer threshold, it is high that the first GPIO can be arranged to output Level, if the caching message amount of the port of the network equipment is less than the first buffer threshold, the first GPIO is arranged to input State.
Fig. 3 A are the structural representation of partial network devices provided in an embodiment of the present invention, with the processor of the network equipment Exemplified by two GPIO.As shown in Figure 3A, two GPIO of processor are respectively GPIO1 and GPIO2, and VDD is VCO The power pin of device(English:pin), GND is ground pin;Output is clock frequency output pin, exports clock signal (CLOCK);VCON is that voltage controls pin, and supply voltage VCC is connected to by the first divider resistance R, passes through the second partial pressure electricity Hinder R ' ground connection, the first divider resistance R and the second divider resistance R ' series connection.With R=R '=4.7 ohm in the present embodiment(Ω), R1=R2= Illustrated exemplified by 10 Ω.Certain R and R ' resistance can not also wait, R1And R2Resistance can not also wait, specifically can basis It is actually needed and is set, is not limited in the present embodiment.
For example, when initial time, GPIO1 and GPIO2 are input state, i.e. GPIO1 and GPIO2 are high resistant shape During state, R1And R2Do not work, represent not change the input electricity of the voltage controlled oscillator of the network equipment by GPIO1 and GPIO2 Pressure, namely the clock frequency of the network equipment is not adjusted.Now voltage controls the pin VCON voltage to beIt is false If the output frequency of voltage controlled oscillator is 25MHz+/- 100PPM, wherein, 25MHz is the frequency of desired output, and +/- 100PPM is The error range of output frequency.
If the clock frequency for next monitoring the network equipment is in negative frequency deviation, GPIO1 or GPIO2 outputs are controlled High level, such as GPIO1 output high level, GPIO2 is still input state.Assuming that GPIO1 output voltage is VG, it is assumed that then Voltage control pin VCON voltage riseThat is voltage controls the pin VCON voltage to beDue to pressure The input voltage of controlled oscillator is bigger, and output frequency is bigger, therefore the output frequency of voltage controlled oscillator is with increased voltageIncrease, it is assumed that increase 25PPM, the output frequency of the voltage controlled oscillator after so adjusting are(25MHz+25PPM)+/- 100PPM。
If the clock frequency for next monitoring the network equipment is still within negative frequency deviation, GPIO1 and GPIO2 is controlled When all exporting high level, then voltage control pin VCON voltage raises againForCorrespondingly, it is voltage-controlled The output frequency of oscillator is further added by 25PPM, and now, the output frequency of voltage controlled oscillator is(25MHz+50PPM)+/- 100PPM。
On the basis of above-described embodiment, when the clock frequency of the network equipment is in negative frequency deviation, by controlling the net The GPIO of the processor of network equipment output level, change the input voltage of the voltage controlled oscillator of the network equipment, multistage adjustment The clock frequency of the network equipment.Specific steps include:Obtain the message amount in the caching of the port of the network equipment;If end Message amount is more than the first buffer threshold in the caching of mouth, and is less than the second buffer threshold, controls the first GPIO in M GPIO High level is exported, remaining GPIO is input state in M GPIO, wherein, the partial pressure pin of voltage controlled oscillator is connected to first Between divider resistance and the second divider resistance, the first GPIO is in parallel with the first divider resistance by adjusting resistance.In the present embodiment, It is poor that the clock frequency difference of the network equipment after multistage adjustment can meet predeterminated frequency, such as disclosure satisfy that 802.3 agreements will Ask, clock frequency difference is within +/- 50PPM.The clock frequency difference refers to the network equipment of multistage adjustment and an other network The difference of clock frequency between equipment.
Next, illustrate technical solution of the present invention with reference to Fig. 3 A by specific.It is provided in an embodiment of the present invention referring to Fig. 3 B Clock frequency method of adjustment flow chart, method include:
Step 301, the message amount in the caching of the port of the network equipment is identified.
The step is to identify the message amount that clock frequency is in the caching of the port of the network equipment of negative frequency deviation, message Quantum hypothesis is p.
Step 302, identify whether the quantity of message in the caching of the port of the network equipment is more than the first buffer threshold.
Buffer threshold is set, in the present embodiment by taking two-level cache thresholding as an example, it is assumed that the first buffer threshold is p1, second Buffer threshold is p2, wherein, p1<p2.Identification clock frequency is in the number of message in the caching of the port of the network equipment of negative frequency deviation Whether amount p is more than the first buffer threshold p1, when more than the first buffer threshold p1When, step 304 is performed, when no more than the first caching Thresholding p1When, perform step 303.
Step 303, GPIO is arranged to input state entirely;
It is pointed out that if GPIO is all set to input state in advance, then now step 303 is holding The all input states of GPIO.
When the quantity p of message in the caching of the port of the network equipment is not more than the first buffer threshold p1When, show the network The clock frequency of equipment is within a preset range, it is not necessary to enters line frequency adjustment, then connection voltage-controlled oscillator voltage is controlled pin VCON GPIO is all input state.
Step 304, identify whether message amount is more than the second buffer threshold in the caching of the port of the network equipment;
P when the caching message amount p of the port of the network equipment is more than the first buffer threshold is identified in step 3021, The step identifies whether the caching message amount p of the port of the network equipment is more than the second buffer threshold p again2, work as p>p2When, hold Row step 306, as p≤p2When, perform step 305.
Step 305,1 GPIO is arranged to export high level, remaining GPIO is arranged to input state;
When identifying p1<p≤p2, make and 1 GPIO in the GPIO that are connected of the voltage of voltage controlled oscillator control pin VCON High level is exported, remaining GPIO is input state.For example, in Fig. 3 A, GPIO1 is arranged to export high level, then GPIO2 is kept Input state.
Step 306,2 GPIO are arranged to export high level.
It will be understood by those skilled in the art that can according to actual use situation setting buffer threshold series and with pressure The GPIO of the voltage control pin parallel connection of controlled oscillator number, the present invention will not be repeated here.
The technical scheme of the present embodiment, pass through by least one GPIO and voltage controlled oscillator voltage control pin VCON On the basis of the hardware connection of resistor coupled in parallel, by setting the buffer threshold of message amount, identify the network equipment port it is slow The rank that the quantity of middle message is reached is deposited, makes in the GPIO connected to the voltage of voltage controlled oscillator control pin VCON corresponding Several GPIO output high level, remaining is input state, has reached the effect of multistage dynamic adjustment network equipment clock frequency, has entered One step can reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.
Fig. 4 is the structural representation of clock frequency adjusting apparatus provided in an embodiment of the present invention.As shown in figure 4, the dress Put including monitoring module 41 and adjusting module 42.
Wherein, monitoring module 41 is used for the clock frequency for monitoring the network equipment, and the processor of the network equipment includes M and led to With input and output GPIO, for being adjusted to the clock frequency of the network equipment, wherein M is the integer more than or equal to 1;Adjust mould If the clock frequency that block 42 is used for the network equipment is in negative frequency deviation, M GPIO is controlled, changes the voltage-controlled of the network equipment The input voltage of oscillator, to adjust the clock frequency of the network equipment.
Specifically, monitoring module 41 can trigger adjustment when the clock frequency for monitoring the network equipment is in negative frequency deviation Module 42, or frequency deviation monitoring module 41 send monitored results to adjusting module 42, so that adjusting module 42 is according to monitoring When as a result identifying that the clock frequency of the network equipment is in negative frequency deviation, change the input electricity of the voltage controlled oscillator of the network equipment Pressure, adjust the clock frequency of the network equipment.
Alternatively, M is the integer more than or equal to 2, and adjusting module 42 is specifically used for:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of port, and is less than the second buffer threshold, control M The first GPIO in GPIO exports high level, and remaining GPIO is input state in M GPIO, wherein, point of voltage controlled oscillator Pressure pipe pin is connected between the first divider resistance and the second divider resistance, and the first GPIO is by adjusting resistance and the first divider resistance It is in parallel.
Specifically, monitoring module 41 is used for:
The caching of the port of the detection network equipment in real time;
If message in the caching of port be present, the instantaneous delivery bandwidth of port is obtained;
If the instantaneous delivery bandwidth of port exceedes default port bandwidth threshold value, the clock frequency of the network equipment is judged In negative frequency deviation.
More specifically, monitoring module 41 is used for:
Obtain reception packet counting value of the port when current period starts and the reception message at the end of current period Count value;
According to the reception packet counting value when current period starts and the reception packet counting at the end of current period Value, obtains the message amount that port receives in current period, and the message amount received in current period is equal to current Reception packet counting value during end cycle subtracts the reception packet counting value when current period starts;
According to the message amount received in current period, the instantaneous delivery bandwidth of port, the instantaneous stream of port are obtained Amount bandwidth is equal to the value obtained by the duration of the message amount received in current period divided by current period.
Wherein, monitoring module 41 is additionally operable to:
If message is not present in the caching of port, judge whether the clock frequency of the network equipment does overdeviation adjustment;
Correspondingly, if the clock frequency that adjusting module is additionally operable to the network equipment does overdeviation adjustment, by the network equipment Clock frequency returns to normal frequency;If the clock frequency for keeping equipment does not do overdeviation adjustment, clock frequency is not adjusted Rate.
The technical scheme of the present embodiment, by whether there is message in the caching for the port for detecting the network equipment, when depositing In message, the instantaneous delivery bandwidth of the port of the network equipment is obtained, and preset according to whether the instantaneous delivery bandwidth exceedes Port bandwidth thresholding judges whether the clock frequency of the network equipment is in negative frequency deviation, so as to knowing that the network equipment whether may be used There can be the phenomenon of packet loss.
The technical scheme of the present embodiment, whether the clock frequency of the network equipment is monitored in negative frequency by monitoring module 41 Partially, then the input voltage that module 42 changes the voltage controlled oscillator of the network equipment in negative frequency deviation is adjusted, adjusts the network The clock frequency of equipment, reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.
On the basis of above-described embodiment, alternatively, the adjusting module 42 is by controlling the CPU of network equipment GPIO Output level, change the input voltage of the voltage controlled oscillator of the network equipment, multistage adjusts the clock frequency of the network equipment.
Present invention also offers a kind of network equipment, as shown in figure 5, including:At least one processor 601, and storage Device 602, in addition to voltage controlled oscillator 603;Memory 602, for depositing program.Specifically, program can include program code, Program code includes computer-managed instruction.The processor 601 can pass through bus or other modes with the memory 602 Connect, in Fig. 5 exemplified by being connected by bus.Connected mode between processor 601 and voltage controlled oscillator 603 can specifically join Fig. 3 A are examined, there can also be other connected modes certainly, not limited in the present embodiment.
Processor 601 performs the program stored in memory 602, realizes clock frequency adjustment provided in an embodiment of the present invention Method, including:
Monitor the clock frequency of the network equipment, the processor of the network equipment includes M universal input output GPIO, for pair The clock frequency of the network equipment is adjusted, and wherein M is the integer more than or equal to 1;
If the clock frequency of the network equipment is in negative frequency deviation, M GPIO is controlled, changes the VCO of the network equipment The input voltage of device 603, to adjust the clock frequency of the network equipment.
Alternatively, M is the integer more than or equal to 2, then M GPIO of the control, changes the voltage controlled oscillator of the network equipment 603 input voltage includes:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of port, and is less than the second buffer threshold, control M The first GPIO in GPIO exports high level, and remaining GPIO is input state in M GPIO, wherein, point of voltage controlled oscillator Pressure pipe pin is connected between the first divider resistance and the second divider resistance, and the first GPIO is by adjusting resistance and the first divider resistance It is in parallel.
Alternatively, the clock frequency of the monitoring network equipment, including:
The caching of the port of the detection network equipment in real time;
If message in the caching of the port of the network equipment be present, the instantaneous delivery bandwidth of port is obtained;
If the instantaneous delivery bandwidth of port exceedes default port bandwidth threshold value, the clock frequency of the network equipment is judged In negative frequency deviation.
Alternatively, the instantaneous delivery bandwidth for obtaining the port, including:
Obtain reception packet counting value of the port when current period starts and the reception message at the end of current period Count value;
According to the reception packet counting value when current period starts and the reception packet counting at the end of current period Value, obtains the message amount that port receives in current period, and the message amount received in current period is equal to current Reception packet counting value during end cycle subtracts the reception packet counting value when current period starts;
According to the message amount received in current period, the instantaneous delivery bandwidth of port, the instantaneous stream of port are obtained Amount bandwidth is equal to the value obtained by the duration of the message amount received in current period divided by current period.
Alternatively, the clock frequency method of adjustment also includes:
If message is not present in the caching of port, judge whether the clock frequency of the network equipment does overdeviation adjustment;
If the clock frequency of the network equipment does overdeviation adjustment, the clock frequency of the network equipment is returned into normal frequency Rate.
In the present embodiment, network equipment structure related to the present invention is only described, the network equipment can also include Other devices, this present invention is not limited.
Whether the network equipment of the embodiment of the present invention, the clock frequency by monitoring the network equipment are in negative frequency deviation, then The input voltage of the voltage controlled oscillator of the network equipment of negative frequency deviation is in by change, adjusts the clock frequency of the network equipment, Reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.
It should be noted that:For foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because According to the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know Know, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the invention It is necessary.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program Upon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic; And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technical scheme and scope.

Claims (8)

  1. A kind of 1. clock frequency method of adjustment, it is characterised in that including:
    Monitor the clock frequency of the network equipment, the processor of the network equipment includes M universal input output GPIO, for pair The clock frequency of the network equipment is adjusted;
    If the clock frequency of the network equipment is in negative frequency deviation, the M GPIO is controlled to change the network equipment The input voltage of voltage controlled oscillator, to adjust the clock frequency of the network equipment;
    The M is the integer more than or equal to 2;
    Correspondingly, the control M GPIO, changing the input voltage of the voltage controlled oscillator of the network equipment includes:
    Obtain the message amount in the caching of the port of the network equipment;
    If message amount is more than the first buffer threshold in the caching of the port, and is less than the second buffer threshold, the M is controlled The first GPIO in individual GPIO exports high level, and remaining GPIO is input state in the M GPIO, wherein, it is described voltage-controlled The partial pressure pin of oscillator is connected between the first divider resistance and the second divider resistance, and the first GPIO is by adjusting resistance It is in parallel with first divider resistance.
  2. 2. according to the method for claim 1, it is characterised in that the clock frequency of the monitoring network equipment includes:
    The caching of the port of the network equipment is detected in real time;
    If message be present in the caching of the port, the instantaneous delivery bandwidth of the port is obtained;
    If the instantaneous delivery bandwidth of the port exceedes default port bandwidth threshold value, the clock of the network equipment is judged Frequency is in negative frequency deviation.
  3. 3. according to the method for claim 2, it is characterised in that the instantaneous delivery bandwidth of the port is obtained, including:
    Obtain reception packet counting value of the port when current period starts and the reception message at the end of current period Count value;
    According to the reception packet counting value when current period starts and the reception message at the end of current period Count value, obtain the message amount that the port receives in current period, the message number received in the current period Amount subtracts the reception message when current period starts equal to described in the reception packet counting value at the end of current period Count value;
    According to the message amount received in current period, the instantaneous delivery bandwidth of the port, the port are obtained Instantaneous delivery bandwidth be equal to obtained by the duration of the message amount received in current period divided by the current period Value.
  4. 4. according to the method for claim 2, it is characterised in that also include:
    If message is not present in the caching of the port, judge whether the clock frequency of the network equipment does overdeviation adjustment;
    If the clock frequency of the network equipment does overdeviation adjustment, the clock frequency of the network equipment is returned to normally Frequency.
  5. A kind of 5. clock frequency adjusting apparatus, it is characterised in that including:
    Monitoring module, for monitoring the clock frequency of the network equipment, the processor of the network equipment is defeated including M universal input Go out GPIO, for being adjusted to the clock frequency of the network equipment;
    Adjusting module, if the clock frequency for the network equipment is in negative frequency deviation, the M GPIO is controlled to change institute The input voltage of the voltage controlled oscillator of the network equipment is stated, to adjust the clock frequency of the network equipment;
    The M is the integer more than or equal to 2;
    The adjusting module is specifically used for:
    Obtain the message amount in the caching of the port of the network equipment;
    If message amount is more than the first buffer threshold in the caching of the port, and is less than the second buffer threshold, the M is controlled The first GPIO in individual GPIO exports high level, and remaining GPIO is input state in the M GPIO, wherein, it is described voltage-controlled The partial pressure pin of oscillator is connected between the first divider resistance and the second divider resistance, and the first GPIO is by adjusting resistance It is in parallel with first divider resistance.
  6. 6. device according to claim 5, it is characterised in that the monitoring module is specifically used for:
    The caching of the port of the network equipment is detected in real time;
    If message be present in the caching of the port, the instantaneous delivery bandwidth of the port is obtained;
    If the instantaneous delivery bandwidth of the port exceedes default port bandwidth threshold value, the clock of the network equipment is judged Frequency is in negative frequency deviation.
  7. 7. device according to claim 6, it is characterised in that the monitoring module is specifically used for:
    Obtain reception packet counting value of the port when current period starts and the reception message at the end of current period Count value;
    According to the reception packet counting value when current period starts and the reception message at the end of current period Count value, obtain the message amount that the port receives in current period, the message number received in the current period Amount subtracts the reception message when current period starts equal to described in the reception packet counting value at the end of current period Count value;
    According to the message amount received in current period, the instantaneous delivery bandwidth of the port, the port are obtained Instantaneous delivery bandwidth be equal to obtained by the duration of the message amount received in current period divided by the current period Value.
  8. 8. device according to claim 6, it is characterised in that the monitoring module is additionally operable to:
    If message is not present in the caching of the port, judge whether the clock frequency of the network equipment does overdeviation adjustment;
    Correspondingly, if the clock frequency that the adjusting module is additionally operable to the network equipment does overdeviation adjustment, by the net The clock frequency of network equipment returns to normal frequency.
CN201310671523.4A 2013-12-10 2013-12-10 Clock frequency method of adjustment and device Active CN104702364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310671523.4A CN104702364B (en) 2013-12-10 2013-12-10 Clock frequency method of adjustment and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310671523.4A CN104702364B (en) 2013-12-10 2013-12-10 Clock frequency method of adjustment and device

Publications (2)

Publication Number Publication Date
CN104702364A CN104702364A (en) 2015-06-10
CN104702364B true CN104702364B (en) 2017-12-22

Family

ID=53349169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310671523.4A Active CN104702364B (en) 2013-12-10 2013-12-10 Clock frequency method of adjustment and device

Country Status (1)

Country Link
CN (1) CN104702364B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113132272B (en) * 2021-03-31 2023-02-14 中国人民解放军战略支援部队信息工程大学 Network switching frequency dynamic adjustment method and system based on flow perception and network switching chip structure
CN113946937B (en) * 2021-08-27 2023-01-10 芯华章科技股份有限公司 Synchronization method and simulator

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188430A (en) * 2006-11-15 2008-05-28 中兴通讯股份有限公司 A frequency deviation pre-compensation device and method for broadband code division multiple address user device
CN102412834A (en) * 2010-09-21 2012-04-11 瑞昱半导体股份有限公司 Voltage-controlled oscillator

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6646512B2 (en) * 2000-12-06 2003-11-11 Ati International, Srl Self-bias and differential structure based PLL with fast lockup circuit and current range calibration for process variation
JP4434906B2 (en) * 2004-10-01 2010-03-17 三洋電機株式会社 Oscillation frequency control circuit
CN101087178B (en) * 2007-07-09 2012-05-23 中国人民解放军国防科学技术大学 Frequency deviation detection method for multi-channel E1 signal transmission based on buffer
CN101465810B (en) * 2009-01-23 2013-04-17 华为技术有限公司 Method, device and system for controlling chip energy consumption

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188430A (en) * 2006-11-15 2008-05-28 中兴通讯股份有限公司 A frequency deviation pre-compensation device and method for broadband code division multiple address user device
CN102412834A (en) * 2010-09-21 2012-04-11 瑞昱半导体股份有限公司 Voltage-controlled oscillator

Also Published As

Publication number Publication date
CN104702364A (en) 2015-06-10

Similar Documents

Publication Publication Date Title
US11630499B2 (en) Power over Ethernet (PoE) power management
JP6379162B2 (en) PoE-based power supply method and PSE
CN106068596B (en) Fast charge method, power supply adaptor and mobile terminal
CN108632156A (en) Load balance system, device and method
US8477831B2 (en) Multi-protocol multiple-data-rate auto-speed negotiation architecture for a device
CN106030962B (en) Fast charge method, power supply adaptor and mobile terminal
CN103929366A (en) Flow control method and device and equipment
CN108604219B (en) Serial communication link with optimal transmission latency
CN109167664B (en) Reconfigurable ring oscillator PUF circuit based on exclusive-OR gate
CN104702364B (en) Clock frequency method of adjustment and device
CN105991294A (en) PoE (Power over Ethernet) power compensation method and PSE (Power Sourcing equipment)
CN109862123A (en) Data processing method, Internet of Things module and equipment
CN104052698A (en) Apparatus For Improved Communication And Associated Methods
CN103457748A (en) Data transmission method, system and device
CN105956322A (en) Process corner detection device and method of digital circuit
CN107579558B (en) Charge control method, charger, charging system and computer readable storage medium
CN102447621B (en) Optimal link selecting method and equipment
CN109412999A (en) A kind of molding mapping method of probability and device
CN108848506A (en) The method of smart machine ID is obtained on a kind of line
CN109462522A (en) A kind of state monitoring method of external terminal device, terminal and its system
CN102739531B (en) Flow shaping method and traffic shaping device
US20140301199A1 (en) Methods, systems, and computer program products for processing a packet
WO2016091003A1 (en) Method for implementing service collaborative scheduling, computing board, and storage medium
CN103135703B (en) A kind of method for being used to quickly read Field Replaceable Unit information
CN107710168A (en) Information processor and information processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20221221

Address after: 215010 room 704, building 5, No. 556, Changjiang Road, high tech Zone, Suzhou, Jiangsu

Patentee after: SUZHOU YUDESHUI ELECTRICAL TECHNOLOGY Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

Effective date of registration: 20221221

Address after: No. 155, Chemical Road, Boxing Economic Development Zone, Boxing County, Binzhou City, Shandong Province, 256599

Patentee after: Shandong rongzhixin Enterprise Consulting Service Co.,Ltd.

Address before: 215010 room 704, building 5, No. 556, Changjiang Road, high tech Zone, Suzhou, Jiangsu

Patentee before: SUZHOU YUDESHUI ELECTRICAL TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right