A kind of upstream bandwidth dynamic allocation method that is applied to the EPON system
Technical field
The present invention relates to fiber optic communication field, particularly EPON field specifically is meant a kind of dynamic allocation method of upstream bandwidth.
Background technology
Based on the EPON of Ethernet, being called for short EPON is the single fiber bi-directional Optical Access Network that multiple spot (P2MP) structure is put in a kind of employing.The EPON system is made up of the optical line terminal of office's side, the optical network unit that is called for short OLT, user side, abbreviation ONU and Optical Distribution Network, abbreviation ODN, is the single fiber bi-directional system.The EPON system has obtained using widely as a kind of main FTTH solution at present, and the signal of EPON system as shown in Figure 1.
In the EPON system, time-multiplexed mode (TDMA) is adopted in uplink (ONU-OLT).Distribute the time slot of each ONU uplink unitedly by OLT.Each ONU adopts the mode of burst transfer to finish transfer of data in one's own time slot; The algorithm of time slot allocation and implementation are not made concrete regulation in the IEEE802.3ah standard, mainly contain static bandwidth allocation (SBA) and two kinds of methods of Dynamic Bandwidth Allocation (DBA) at present.The main thought of static bandwidth allocation is, according to the band width configuration situation of system manager to each ONU, the allocated bandwidth of fixing is not considered the business load situation of ONU; The difference of Dynamic Bandwidth Allocation and static bandwidth allocation is, in the assigning process of bandwidth, needs to consider the concrete business load situation of ONU; The business load situation of ONU is reported the data volume that need upload by MPCP Report frame.
Summary of the invention
The objective of the invention is to overcome the deficiency that prior art exists, and provide a kind of algorithm of Dynamic Bandwidth Allocation, can realize accurate control based on this algorithm to a plurality of ONU upstream bandwidths, has bandwidth control precision height, the band width configuration granularity is little, the bandwidth availability ratio height, the upstream bandwidth dynamic allocation method of the EPON system that is applied to that is easy to realize.
The objective of the invention is to finish by following technical solution, described method comprises: 1, find part automatically, find automatically to finish the application of automatic discovery time slot, thereby make unregistered ONU can dynamically add the EPON system; 2, band width configuration part: this portions of bandwidth is mainly used in the band width configuration part that communicates with CPU, to obtain the band width configuration parameter of each online ONU, time slot allocation cycle, the automatic periodic quantity of finding, the maximum ONU quantity of supporting; 3, bandwidth calculation part: bandwidth calculation is finished the automatic discovery time slot allocation to the time slot allocation of each online ONU and off-line ONU.
The present invention also comprises in above-mentioned automatic discovery part: a, find that timer, timer meter initiate once to find the time slot application automatically to bandwidth calculation module to finding all after dates automatically, simultaneously with the timer zero clearing, begin new one and take turns timing course; B, find the cycle adjuster automatically, the initial period of finding obtains from CPU automatically, and along with the increase of ONU quantity, the cycle of finding can dynamically be adjusted automatically, after the quantity of online ONU reaches the maximum ONU number that system can support, will stop automatic discovery.
In the above-mentioned band width configuration part of the present invention, also comprise: a, APB_SLAVE, mutual with CPU finished the dynamic-configuration to each parameter.The cpu bus that the present invention selects for use is the AMBA bus, and band width configuration partly hangs on the APB Bus.But the present invention not limiting bandwidth configuration section only can hang on the APB Bus; B, configuration parameter registers are finished the storage to each parameter.Major parameter comprises: the FIR of each ONU, and CIR, PIR finds the initial value in cycle automatically; automatically find the Configuration Values of slot length, the Configuration Values of registration response slot length, time slot allocation cycle; support the number of maximum ONU, time slot boundary belt Configuration Values is supported RTT Configuration Values farthest.
The present invention also comprises in above-mentioned bandwidth calculation part: a, find that time slot calculates automatically, and the time started of finishing automatic discovery time slot, the calculating of concluding time, this time slot window is used for ONU and sends registration request frame; B, find that time slot calculates automatically, the time started of finishing automatic discovery time slot, the calculating of concluding time, this time slot window is used for ONU and sends registration request frame; B, registration response time slot calculate, and finish the time slot window calculation of the ONU in the MPCP discovery procedure just, and this time slot window is used for ONU and sends registration response frame; C, transmission window calculate, and finish the time slot window calculation to the ONU that finishes the MPCP discovery;
Based on above-mentioned part of the present invention, when realizing Dynamic Bandwidth Allocation, mainly comprise two processes: find the time slot application automatically, dynamic bandwidth calculates.
Described automatic discovery time slot application process comprises two states: the one, under the S0 state, find the normal timing of timer automatically, and adjusted automatic discovery enters the S1 state during cycle when timer arrives dynamically; The 2nd, under the S1 state, will find automatically that timer is clear 0, send the application of automatic discovery time slot, return the S0 state;
Described dynamic bandwidth calculating section comprises following six states:
The one, under the S0 state, wait for the application of allocated bandwidth, and obtain the situation that reports of each ONU.If automatic discovery application is arranged, enters the S1 state; If the application of registration response time slot is arranged, enters the S2 state; If the time slot allocation cycle timer is overtime, enter the S3 state;
The 2nd, at the S1 state, finish the distribution of automatic discovery time slot, return the S0 state;
Gate_start_time (zero hour of time slot)=T
Scheduled(moment that time slot has assigned)+T
Guard(time slot boundary belt Configuration Values); Gate_length (length of time slot) is a Configuration Values of finding slot length automatically;
The 3rd, at the S2 state, finish the distribution of registration response time slot, return the S0 state;
Gate_start_time (zero hour of time slot)=T
Scheduled+ T
Guard– RTT (the RTT measured value of ONU);
Gate_length (length of time slot) is the Configuration Values of registration response slot length;
The 4th, at the S3 state, finish the assurance bandwidth time slot allocation of the ONU that finishes MPCP registration, if after guaranteeing that allocated bandwidth finishes, the assignable remaining time slots of epicycle be 0 or all ONU values of reporting all be met, then walk flow process P1 and enter the S5 state; If after guaranteeing that allocated bandwidth finishes, also having the remaining time slots that the value of reporting does not satisfy fully and epicycle is distributed of ONU is not 0, then walks flow process P2 and enters the S4 state;
For the following several situations of being assigned of assurance bandwidth of the present invention:
When the Report of ONU value during smaller or equal to FIR, ONU obtains the time slot window of FIR size;
When the Report of ONU value during greater than FIR and smaller or equal to CIR, ONU obtains the time slot window of Report size;
When the Report of ONU value during greater than CIR, ONU obtains the time slot window of CIR size, participate in the doing one's best distribution of bandwidth of the value of Report-CIR.
The 5th, at the S4 state, to finish in the S3 state, the value of reporting does not obtain the distribution of the bandwidth of doing one's best of satisfied fully ONU, and enters the S5 state;
If the residue window of epicycle can't satisfy the do one's best demand of ONU of allocated bandwidth of all participations, adopt the method for Round-Robin to select the ONU that serves.For the following 2 kinds of situations of being assigned of the bandwidth of doing one's best:
When the Report-CIR of ONU was less than or equal to PIR-CIR, ONU obtained the time slot window of Report-CIR size;
As the Report-CIR of ONU during greater than PIR-CIR, ONU obtains the time slot window of PIR-CIR size;
The 6th, at the S5 state, each ONU is merged at the time slot window that S3 state and S4 state obtain, and being arranged in of order authorize on the time shaft, write down the zero hour that next round mandate time slot allocation is calculated simultaneously, return the S0 state.
How determine on the next round mandate time slot allocation problem constantly, the present invention has introduced a kind of dislocation mechanism here, avoided in the current mechanism, after need obtaining the reporting information of last round of all ONU, just can initiate new one takes turns time slot allocation and calculates, thereby cause in time slot allocation computational process, do not have ONU to send the situation of upstream data, avoided bandwidth waste.When the Report frame of first ONU in the epicycle mandate arrives OLT, promptly begin to carry out new one and take turns time slot and calculate, the Report value that participates in calculating is last round of Report value and the Report value combination of first ONU of epicycle.
The present invention can realize the accurate control to a plurality of ONU upstream bandwidths, and the upstream bandwidth of single ONU can reach 960Mbps, and bandwidth accuracy is more than 95%, and I is worn the wide 512Kbps that is, granularity is 256Kbps; It has bandwidth control precision height, and the band width configuration granularity is little, and the bandwidth availability ratio height is easy to characteristics such as realization.
Description of drawings
Fig. 1 is the structured flowchart of EPON of the present invention system.
Fig. 2 is a Dynamic Bandwidth Allocation schematic block diagram of the present invention.
Fig. 3 is the state transition schematic block diagram of automatic discovery time slot application process of the present invention.
Fig. 4 is the state transition schematic block diagram that dynamic bandwidth of the present invention calculates.
Embodiment
Below in conjunction with accompanying drawing the present invention is done detailed introduction: involved in the present invention to technical term be presented in the subordinate list 1, and with its content as present embodiment.
Subordinate list 1
English abbreviation |
The English description |
Chinese is described |
PON |
Passive Optical?Network |
EPON |
EPON |
Ethernet Passive?Optical?Network |
EPON based on the Ethernet mode |
OLT |
Optical Line?Terminal |
Optical line terminal |
ONU |
Optical Network?Unit |
Optical network unit |
ODN |
Optical Distribution?Network |
Optical distributed network |
SBA |
Static Bandwidth?Allocation |
Static bandwidth allocation |
DBA |
Dynamic Bandwidth?Allocation |
Dynamic Bandwidth Allocation |
MPCP |
Multi-point control?protocol |
Multi-point Control Protocol |
OAM |
Operation, Administration?&?Maintenance |
Operations, Administration and Maintenance |
P2MP |
Point?to Multipoint |
Point is to multiple spot |
QoS |
Quality?of Service |
Service quality |
TDMA |
Time Division?Multiple?Access |
Time division multiple access inserts |
TQ |
Time Quantum |
Time quantum |
RTT |
Round?Trip Time |
Two-way time |
FIR |
Fixed Information?Rate |
Fixed bit rate |
CIR |
Committed Information?Rate |
Guarantee bit rate |
PIR |
Peak Information?Rate |
Peak bit rate |
Method of the present invention comprises following three parts:
1, finds part automatically: find automatically to finish the application of automatic discovery time slot, thereby make unregistered ONU can dynamically add the EPON system;
2, band width configuration part: band width configuration is mainly used in CPU and communicates, and obtains the band width configuration parameter of each online ONU, time slot allocation cycle, the automatic periodic quantity of finding, the maximum ONU quantity of supporting etc.;
3, bandwidth calculation part: bandwidth calculation is finished the automatic discovery time slot allocation to the time slot allocation of each online ONU and off-line ONU;
The present invention also comprises in above-mentioned described automatic discovery part: a, find that timer, timer meter initiate once to find the time slot application automatically to bandwidth calculation module to finding all after dates automatically, simultaneously with the timer zero clearing, begin new one and take turns timing course; B, find the cycle adjuster automatically, the initial period of finding obtains from CPU automatically, and along with the increase of ONU quantity, the cycle of finding can dynamically be adjusted automatically, after the quantity of online ONU reaches the maximum ONU number that system can support, will stop automatic discovery;
In the band width configuration of the present invention part, also comprise: a, APB_SLAVE, mutual with CPU finished the dynamic-configuration to each parameter.The cpu bus that the present invention selects for use is the AMBA bus, and band width configuration partly hangs on the APB Bus; But the present invention not limiting bandwidth configuration section only can hang on the APB Bus; B, configuration parameter registers are finished the storage to each parameter.Major parameter comprises: the FIR of each ONU, and CIR, PIR finds the initial value in cycle automatically; automatically find the Configuration Values of slot length, the Configuration Values of registration response slot length, time slot allocation cycle; support the number of maximum ONU, time slot boundary belt Configuration Values is supported RTT Configuration Values farthest.
The present invention also comprises in described bandwidth calculation part: a, find that time slot calculates automatically, and the time started of finishing automatic discovery time slot, the calculating of concluding time, this time slot window is used for ONU and sends registration request frame; B, registration response time slot calculate, and finish the time slot window calculation of the ONU in the MPCP discovery procedure just, and this time slot window is used for ONU and sends registration response frame; C, transmission window calculate, and finish the time slot window calculation to the ONU that finishes the MPCP discovery;
Based on above-mentioned part of the present invention, when realizing Dynamic Bandwidth Allocation, mainly comprise two processes: find the time slot application automatically, dynamic bandwidth calculates;
Automatically find that the time slot application process comprises 2 states, the state transition process as shown in Figure 3: a, under the S0 state, find the normal timing of timer automatically, adjusted automatic discovery enters the S1 state during cycle when timer arrives dynamically; B, under the S1 state, will find automatically that timer is clear 0, send the application of automatic discovery time slot, return the S0 state;
The dynamic bandwidth calculating section comprises 6 states, the state transition process as shown in Figure 4: a, under the S0 state, wait for the application of allocated bandwidth, and obtain the situation that reports of each ONU.If automatic discovery application is arranged, enters the S1 state; If the application of registration response time slot is arranged, enters the S2 state; If the time slot allocation cycle timer is overtime, enter the S3 state; B, at the S1 state, finish the distribution of automatic discovery time slot, return the S0 state;
Gate_start_time (zero hour of time slot)=T
Scheduled(moment that time slot has assigned)+T
Guard(time slot boundary belt Configuration Values);
Gate_length (length of time slot) is a Configuration Values of finding slot length automatically;
C, at the S2 state, finish the distribution of registration response time slot, return the S0 state;
Gate_start_time (zero hour of time slot)=T
Scheduled+ T
Guard– RTT (the RTT measured value of ONU);
Gate_length (length of time slot) is the Configuration Values of registration response slot length;
D, at the S3 state, finish the assurance bandwidth time slot allocation of the ONU that finishes MPCP registration, if after guaranteeing that allocated bandwidth finishes, the assignable remaining time slots of epicycle be 0 or all ONU values of reporting all be met, then walk flow process P1 and enter the S5 state; If after guaranteeing that allocated bandwidth finishes, also having the remaining time slots that the value of reporting does not satisfy fully and epicycle is distributed of ONU is not 0, then walks flow process P2 and enters the S4 state;
The following several situation that is assigned for the assurance bandwidth:
When the Report of ONU value during smaller or equal to FIR, ONU obtains the time slot window of FIR size;
When the Report of ONU value during greater than FIR and smaller or equal to CIR, ONU obtains the time slot window of Report size;
When the Report of ONU value during greater than CIR, ONU obtains the time slot window of CIR size, participate in the doing one's best distribution of bandwidth of the value of Report-CIR;
E, at the S4 state, finish in the S3 state, the value of reporting does not obtain fully the distribution of the bandwidth of doing one's best of the ONU that satisfies, and enters the S5 state;
If the residue window of epicycle can't satisfy the do one's best demand of ONU of allocated bandwidth of all participations, adopt the method for Round-Robin to select the ONU that serves.For the following 2 kinds of situations of being assigned of the bandwidth of doing one's best:
When the Report-CIR of ONU was less than or equal to PIR-CIR, ONU obtained the time slot window of Report-CIR size;
As the Report-CIR of ONU during greater than PIR-CIR, ONU obtains the time slot window of PIR-CIR size;
F, at the S5 state, each ONU is merged at the time slot window that S3 state and S4 state obtain, and being arranged in of order authorize on the time shaft, write down the zero hour that next round mandate time slot allocation is calculated simultaneously, return the S0 state.
How determine on the next round mandate time slot allocation problem constantly, the present invention has introduced a kind of dislocation mechanism here, avoided in the current mechanism, after need obtaining the reporting information of last round of all ONU, just can initiate new one takes turns time slot allocation and calculates, thereby cause in time slot allocation computational process, do not have ONU to send the situation of upstream data, avoided bandwidth waste.When the Report frame of first ONU in the epicycle mandate arrives OLT, promptly begin to carry out new one and take turns time slot and calculate, the Report value that participates in calculating is last round of Report value and the Report value combination of first ONU of epicycle.