Purpose of the present invention promptly is to overcome above-mentioned defective in the prior art, and a kind of loading system of protocol processor software is provided, and this loading system can load different protocol processor softwares, to realize the versatility of protocol processor.
Another object of the present invention, be to provide a kind of loading method of protocol processor software, can pass through switchboard background, on a general protocol processor hardware, load different protocol processing softwares, general protocol processor hardware combines with different protocol processing softwares, thereby constitutes the protocol processor that can handle a certain specific protocol.
For this reason, the invention provides a kind of loading system of exchange protocol processor software, comprise the switchboard background computer, main frame, and protocol processor, described protocol processor comprises a two-way communications buffer, a microprocessor, an electricity erasable memorizer and a static memory, with a protocol processes interface circuit, also comprise a protocol processor software memory cell of storing described protocol processor software in the described switchboard background computer, described electricity erasable memorizer also comprises first memory cell of storing loading procedure, described static memory also comprises second memory cell that is used to store the copy of described loading procedure, described microprocessor can copy described loading procedure to described second memory cell from described first memory cell, and move loading procedure copy in described second memory cell, so that described protocol processor software is loaded into the described electricity erasable memorizer from described switchboard background computer.
The present invention also provides a kind of loading method of exchange protocol processor software, the equipment of finishing this method comprises switchboard background computer, main frame and protocol processor, described protocol processor comprises: a two-way communications buffer, a microprocessor, an electricity erasable memorizer and a static memory, and protocol processes interface circuit, it is characterized in that comprising following load step: (1) copies the loading procedure in the described electricity erasable memorizer in the described static memory under described microprocessor control; (2) the loading procedure copy in the described static memory of operation is loaded into described electricity erasable memorizer with described protocol processor software from described switchboard background computer.Described load step is divided into four kinds of states: initial state, guiding attitude, loading attitude and normal state, loading procedure is exactly the process of protocol processor from initial state-guiding attitude-loading attitude-normal state.
By the loading system and the method thereof of protocol processor software provided by the present invention, can solve above-mentioned deficiency of the prior art, the backstage by switch loads the protocol software easily on protocol processor; Be convenient to production, version management and software upgrading; Dissimilar protocol processors can adopt identical protocol processor hardware, has increased versatility, to having reduced exploitation and manufacturing cost; Make things convenient for the user freely to dispose the variety of protocol processor.Below in conjunction with drawings and Examples, further specify technical scheme of the present invention.
As shown in Figure 1, the part relevant with implementing the present invention comprises main frame 101, switching network 104, Protocol Processing Board 102 and interface board 103 and Communication Control plate 106 in the switch 100.Protocol Processing Board 102 promptly is a kind of of the alleged protocol processor of the present invention.Between main frame 101 and the Protocol Processing Board 102, between main frame 101 and the interface board 103, between interface board 103 and the switching network 104, all there is link to be connected between switching network 104 and the Protocol Processing Board 102.Main frame 101 is by Communication Control plate 106 control interface board 103, makes interface board will receive the signalling time slot and is connected to through switching network 104 and carries out signaling process on the Protocol Processing Board 102.Exchanger host 101 links to each other with switchboard background 105 by communication link (for example LAN, 2B+D, LAPD, RS232, RS422 etc.).Switchboard background 105 is generally one or several personal computers, stores the daemon software that is used to control, operate, test, safeguard switch.The detailed structure of Protocol Processing Board 102 as shown in Figure 2, comprise 201, one FLASH memories 203 of 202, one two-port RAMs of a microprocessor CPU, a static memory (being SRAM) 204 and the interface circuit 205 that carries out protocol processes, they are connected with each other by bus 206.Protocol Processing Board 102 links to each other with the main frame 101 of switch by the two-port RAM 201 on it, and communicates with exchanger host.Above-mentioned two-port RAM 201 also can be other two-way communications buffer, and the FLASH memory also can be other electricity erasable memorizer.
Storing loading procedure in the FLASH memory 203 in advance, during the operation loading procedure, just can download required protocol processing software (being also referred to as " being loaded program " the present invention, down together) from switchboard background 105, be loaded in the FLASH memory by main frame 101.When the protocol processing software in the operation FLASH memory, Protocol Processing Board 102 has promptly had the function that can handle specific protocol.
The loading of Protocol Processing Board software can be divided into two kinds of situations: a kind of for loading on the preceding Protocol Processing Board without any protocol processing software, be called " new plate ", a kind of other version for existing other protocol processing software or same protocol processing software on the Protocol Processing Board before loading is called " old plate ".Slightly different to " new plate " with the loading procedure of " old plate ".To the software loading process of Protocol Processing Board, be exactly under the control of CPU 202, the process of the loading procedure that sets in advance on the operation Protocol Processing Board.Therefore, for describing whole loading procedure, the detailed process step that only needs to describe this loading procedure gets final product.For convenience of description, whole loading procedure can be divided into one of four states: initial state, guiding attitude, loading attitude and normal state.
In FLASH memory 203 and static memory 204, also respectively be provided with one " program available flag ".When the program available flag all is " very " in FLASH memory 203 and the static memory 204, illustrate that this plate has been equipped with suitable protocol processor software, can normally use, need not to load; When the program available flag in FLASH memory 203 or the static memory 204 has at least one to be " vacation ", illustrate that this plate need load or reload.
Fig. 3~Fig. 6 is the treatment step of loading procedure when " new plate " goes up the loading protocol processing software.In step 301, on FLASH memory 203, move loading procedure, loading procedure itself is copied in the static memory 204.In step 302, indicate at static memory 204 mid-" duplicating ".Loading procedure enters the guiding attitude.Loading procedure will move in static memory SRAM later on.Why loading procedure is because working procedure can not be to the FLASH memory value of writing itself in the FLASH memory at static memory 204 but not move loading procedure in FLASH memory 203.In static memory SRAM204, in the operation loading procedure process, read " duplicating " sign, then no longer carry out reproduction process, and carry out following loading procedure.
In step 401, judge the true and false of program available flag in FLASH memory 203 and the static memory 204.If all be true, show to have loaded certain protocol processing software in the FLASH memory 203, and need not to load new protocol processing software that loading procedure enters normal state, loading is finished.Otherwise,, then send load request (step 402) to main frame 101 if the program available flag in FLASH memory 203 or the static memory 204 is false.In step 403, judge whether load request obtains confirming.If load request obtains confirming that then loading procedure enters the loading attitude, prepare to accept to be loaded program.If load request does not obtain confirming, then return the guiding attitude, restart the operation of step 401~403.Owing to show that the signal that load request is identified not is the load request that makes an immediate response, so just judge whether the signal that need have load request to be identified after the execution in step 402.If just directly do not return the guiding attitude, and do not wait until after this load request is identified and just return.Therefore, step 403 is relatively independent of other step, can also can carry out before step 402 before step 401, perhaps all carries out in several position.When step 403 carrying out before the step 401 and/or before step 402, be identified if judged result is a load request, then enter the loading attitude; If load request is not identified, then continue next step operation.
Figure 5 shows that the handling process when loading attitude.In step 501, the program that will be loaded is downloaded from switchboard background, be temporarily stored in the two-port RAM 201, and in step 502, the program that will be loaded writes in the FLASH memory 203.Whenever receive bag data, promptly once load affirmation (step 503), report main frame.In step 504,, then return the loading attitude, the operation of repeating step 501~504 if judging that the program that is loaded all loads finishes; If judging that the program that is loaded all loads finishes, then execution in step 505, send to load to main frame and finish confirmation signal, and in step 506, the program available flag of putting in FLASH memory 203 and the static memory 204 is " very ", enters the guiding attitude.In abovementioned steps 401, when the determining program available flag is " very ", promptly enter normal state, loading is finished, and protocol processor has entered normal operating condition.
It more than is software loading process to " new plate ".To the software loading of " old plate ", promptly change or upgrading at the software of former Protocol Processing Board, then at first carry out flow process shown in Figure 6.Send an order that resets by main frame to Protocol Processing Board, in step 601, loading procedure receives reset command, step 602, and the program available flag of putting the FLASH memory is " vacation ", enters initial state.With aforementioned identical reason, why to be because working procedure can not be to the FLASH memory value of writing itself in the FLASH memory in static memory 203 mid-program available flag.Ensuing treatment step is identical with the treatment step of the loading of " new plate ".When whole loadings were finished and entered normal state, former protocol processing software had been replaced by new protocol processing software; Former Protocol Processing Board has also become new Protocol Processing Board.