Execution mode:
The present invention is applicable to control, exchange, clock is integrated in an application scenario on the veneer.In the communication equipment in the past, normally control, exchange and clock are placed on respectively on the different veneers, make special master control borad, power board, clock board etc., but at present along with the integrated level of chip is more and more higher, the port density of communication equipment is also increasing simultaneously, is feasible in realization with being partially integrated on the plate of control, exchange and the such core of clock, also can save the groove position simultaneously, thereby more professional groove position is provided, improves unit loaded service capacity.Each main modular is focused in the plate, and also can occur some new problems certainly needs to consider, at first is that the signal that is connected with backboard sharply increases; After each module focused on the plate, separately whether independent operating was switched alone, still did as a wholely, and this also needs to consider; Simultaneously, the characteristics of switching of each module are also not quite identical.Controlled function can temporarily stop when switching, neither be very high to the requirement of switching time, but the data of configuration will guarantee active and standby plate unanimity; And exchange and clock module are had relatively high expectations to switching time, if the time is longer, can cause the interruption of business, and this belongs to serious fault in communication equipment, and such as of short duration noise is arranged in the communication process, but number still can engage, and the user can accept so; If but conversation interruption suddenly needs dialing again, concerning the user, is exactly unacceptable.
The masterslave switchover of switching part of the present invention adopts the mode of dual transmitting and receiving, specifically, be exactly that business board sends the identical signal of two-way to active and standby power board, and active and standby power board respectively sends one road signal to business board, business board is according to the signal of active and standby index signal selective reception main board.Because the configuration of power board is identical, import identically, so the signal that business board is received also is identical, when masterslave switchover took place, it was just passable only to need change on business board a data source.
The switchover mode and the switching part of clock part are similar, and clock or external clock source that each business board extracts are delivered to master/backup clock simultaneously, and each business board selects to use main/stand-by clock.But standby clock is not to resemble to lock certain external clock the active clock, but directly lock active clock, and the clock chip of selecting for use will have active and standby interlock function, to guarantee that main/stand-by clock possesses fixing phase difference, otherwise phase difference at random can appear in the business datum of active and standby plate output, is unfavorable for smoothly switching.
The active and standby realization of control section needs to consider in addition, at first be the requirement height of the real-time requirement of control not as exchange and clock, this point is apparent in view in transmission equipment, and its business is changeless basically, temporary transient out of handly can normally not move by traffic affecting.The present invention does not adopt the mode of dual transmitting and receiving, but the mode that the single-shot list is received, standby plate directly and business board get in touch.During operate as normal, have only main board, comprise configuration service, inquire about each single board state etc., and standby plate can't be communicated by letter with each business board directly, must the information of collecting be transmitted to standby plate by main board carrying out normal operation.
The present invention adopts Ethernet interface to communicate, and in the CPU design that present most of communication equipments use, all provides Ethernet interface usually, be used for debugging, connect webmaster backstage etc., network interface is used for communicating by letter between eutergum, promptly do not need to increase in addition circuit, need not adopt special communication protocol yet.
The present invention adopts following steps to realize:
A, adopt the on the throne of the active and standby plate of Online signal indication;
B, adopt whether operate as normal of the active and standby plate of GOOD signal indication;
C, employing ACTIVE signal are indicated the activestandby state of active and standby plate;
D, standby clock locks clock in main use;
E, backed up between main backed up boards data.
The specific implementation method is as follows:
1, active and standby usefulness determines
When device power-up, active and standby two boards powers on simultaneously and starts working, and at this moment needs to determine active and standby usefulness by a fixing means, avoids occurring the active and standby competitive way of using.Here three signals have been used, online on the throne, veneer indication working properly good, active and standby indication active, main spareslots position indication main.Definite process of active and standby usefulness is as follows:
A), at first oneself is made as standby plate, promptly active is invalid, and sends signal online on the throne, read simultaneously own under the groove position;
B), the single plate hardware self check, normally then sends the GOOD signal, and enter next step, otherwise this plate is maintained stand-by state, and withdraw from the active and standby deterministic process of using;
C), read plate signal on the throne, if not on the throne, then this plate is made as main board to plate, send the active signal.
D) if on the throne to plate, read the signal to plate active, if be main to use state to plate, then this plate maintains the stand-by state state, withdraws from active and standby deterministic process;
E) if on the throne to plate, and also be standby, read good signal again to plate, if plate is not sent good, then this plate is sent the active signal, enters the main state of using;
F), then according to the groove position of being inserted,, then oneself is made as main usefulness, otherwise keeps stand-by state if oneself be in the major trough position if plate has been sent the good state.
The determining and to allocate in advance adopting on the backboard to draw of wherein main spareslots position with drop-down, can prevent under extreme case, when for example powering on simultaneously, might occur two simultaneously and lead usefulness or standby, or ceaselessly from main standby, again from the standby oscillatory occurences that forwards main usefulness to forwarding to.
The Good signal is used to here represent that the hardware of veneer is normal, and standby plate is reported its hardware state with the good signal to main board, if the CPU of two boards does not work, two boards still can carry out masterslave switchover by the good signal.
The advantage of said method comprises: determining and can being realized by hardware fully of active and standby usefulness do not need software to participate in the veneer of some; such as clock board, do not need software setting just can work, so; even systems soft ware work is undesired, also can protects normally and switch.In addition, active and standby usefulness definite fairly simple, each deterministic process is all very simple, does not need complicated processing procedure.Simultaneously, software also can be as required, such as order of webmaster etc., carries out Forced Switch.
2, switch protection
Switch reason and comprise 4 sources:
A), hardware check, such as the crystal oscillator on the veneer, inner low-tension supply etc., the failure rate of this part device is higher, can detect this part signal in circuit; The detection of power supply can directly detect it and have or not, and the part power supply chip also can provide alarm signal.The detection of crystal oscillator can be adopted the mode of counter, also can detect the approximate range of its frequency simultaneously.
B), the alarm signal that provides of business chip; Functional chip the time can detect signal flow in work, and such as CRC check, search synchronization character etc. when abnormal conditions occurring, generally can produce and interrupt output, with prompt alarm, and provides register to be convenient to CPU to inquire about concrete warning information;
C), the work of the CPU on the veneer is undesired, entered endless loop such as program, the mode of watchdog is generally adopted in the detection of this problem.Can on hardware, adopt a counter, regularly it be resetted by software, this counter if software can not in time reset, counter will overflow, and can think that CPU work is undesired this moment.
D), the software Forced Switch, comprise issuing and switch order by webmaster.Above-mentioned three kinds of modes can not detect all problems, and the mode by software inquiry can obtain more veneer job information, simultaneously by with to the communicating by letter of plate, also can detect the other side's working condition.In addition, provide the software switch function, also can be used for Operation and Maintenance personnel positioning problem, simultaneously, when veneer need be changed,, can adopt Manual Switch, business temporarily is switched on the standby plate, thereby do not influence the operate as normal of complete machine such as upgrading.
Above-mentioned switches in the reason, and switching that hardware check produces is the fastest, almost is one to go wrong for the detection of power supply, will cause at once switching, and several operations with CPU in back is relevant, relatively will be slowly, and the reaction time discreteness is also bigger.
3, reversed process
Reversed process needs three control signal: active, good, rst, enable, and the enable here is used to enable the output of control signal.
During operate as normal, main board regularly is sent to standby plate by network interface with information and the system configuration situation of collecting, and standby plate is kept at this information on the veneer, in order to using in the future.
Need to prove that for main board, breaking away from the master has two kinds of situations with state, the one, good and active lost efficacy, and showed that single plate hardware goes wrong; The 2nd, have only acitve to lose efficacy, and the good signal is effective, second kind of situation shows that hardware is normal, but software detection is undesired to abnormal conditions or software operation itself, and also need to switch this moment.
During operate as normal, main standby plate detects the other side's active and good signal, detect the good Signal Fail of standby plate when main board after, directly report the backstage by network interface.After main board detects hardware fault, then close good output, if detected is software fault, then do not close good output, but either way enter into switch status: main board hardware is the output of this plate control signal of positive closing at first, close the enable signal, it is invalid then active to be changed to;
The active that in a single day standby plate detects main board is invalid, also enter switch status, at first be that active with this plate is made as effectively, and generation by interrupting switching to the software notice, software is had no progeny in receiving, the control of taking over system according to former backed up data, and at first the mode of operation with the clock module of this plate makes into consistent with the pattern of former main board, enable the enable signal of this plate then, switch to the webmaster reporting system simultaneously.
The enable of main standby plate is interlocking, can not be simultaneously effectively, and the purpose of doing like this is that the control bus that prevents main standby plate clashes, and causes components from being damaged.
Here the process of the masterslave switchover detection of main board that do not place one's entire reliance upon to self, standby plate communicates by Ethernet interface and main board, when main board does not react, standby plate also will communicate with webmaster, if and network management communication is normal, and and the main board communication abnormality, show that then main board has gone wrong, otherwise the communication that shows standby plate itself has problem, need close the good signal of standby plate.It is undesired that standby plate detects main board, and main board itself does not initiate to switch, standby plate can reset to main board by the rst signal, this will cause main board to carry out initialization procedure again, in its initialization procedure, this plate is to be in stand-by state always, and it is invalid that at this moment former standby plate detects plate active, thereby enters reversed process automatically.