Summary of the invention
Technical problem to be solved by this invention provides a kind of automatic protection conversion device for synchronous digital system branch, to overcome the long shortcoming of switching time that factors such as size owing to handling the processing speed, interface rate and the power system capacity that are subject to CPU that prior art exists are brought.
The automatic protection conversion device for synchronous digital system branch that the present invention constructed comprises service aisle alarm module, protection channel alarm module, channel selecting module and data memory module;
Described service aisle alarm module upgrades the alarm coding and the count value of service aisle according to the service aisle warning information, its input signal has: service aisle SF alarm, service aisle SD alarm, the service aisle of reading from described data memory module is kept in count value, the temporary alarm coding of service aisle, and the parameter of external circuit arrangement: the return time setting and the setting of stalling for time; The output signal of service aisle alarm module is: service aisle upgrades the alarm coding and upgrades count value with service aisle, delivers to back one-level module together;
Described protection channel alarm module is according to the alarm coding and the count value of protection channel alarm information updating protection passage, its input signal has: protection passage SF alarm, protection passage SD alarm, the protection passage of reading from described data memory module is kept in count value, the temporary alarm coding of protection passage, and the parameter of external circuit arrangement: the setting of stalling for time; The output signal of protection channel alarm module is: the protection passage upgrades the alarm coding and upgrades count value with the protection passage, delivers to back one-level module together;
Described channel selecting module is determined new channel selecting, its input signal has: the service aisle alarm coding of branch road and protection channel alarm coding, the channel selecting of from data memory module, reading, and the Switch mode of external circuit arrangement, outside are switched order; Its output signal is: upgrade channel selecting, current state coding and switch the reason coding, deliver to back one-level module together;
Described data memory module is finished the various data accesses of switching of branch road, and its input signal has: current state coding, switch the reason coding, upgrade channel selecting, service aisle upgrades count value, service aisle upgrades the alarm coding, the protection passage upgrades count value, the protection passage upgrades the alarm coding; Will carry out switching operation to this branch road, data that these are temporary are read once more next time, the current state coding of wherein reading, switch the reason coding be used to report CPU; The channel selecting signal of reading is given cross over circuit simultaneously, carries out cross processing.
Described service aisle alarm module further comprises service aisle alarm Combination Control logic, service aisle alarm status register and service aisle counter register, described service aisle alarm Combination Control logical foundation input signal determines to give the content of described service aisle alarm status register and service aisle counter register assignment, give two groups of registers at the rising edge of clock, described service aisle alarm status register and service aisle counter register output services passage renewal alarm coding respectively upgrade count value to described data memory module and channel selecting module with service aisle.
Described protection channel alarm module further comprises protection channel alarm Combination Control logic; protection channel alarm status register and protection channel counts register; described protection channel alarm Combination Control logical foundation input signal determines to give the content of described protection channel alarm status register and protection channel counts register assignment; and give protection channel alarm status register and protection channel counts register at rising edge clock, described protection channel alarm status register and protection channel counts register output protection passage respectively upgrade the alarm coding and upgrade count value with the protection passage and give described data memory module and channel selecting module.
Described channel selecting module further comprises channel selecting Combination Control logic; the protection port select register; current state code registers and switch the reason code registers; described channel selecting Combination Control logical foundation input signal determines to give the protection port select register; current state code registers and the content of switching reason code registers assignment; and give the protection port select register at rising edge clock; current state code registers and the registers group of switching reason code registers formation, channel selecting is upgraded in registers group output; current state is encoded and is switched the reason code signal to described data memory module.
What the input signal of described data memory module also comprised memory reads address, write address, and CPU read the address.
Whole device adopts the form of time-sharing multiplex, and the shared same group of circuit of the hardware switching operation of each branch road of SDH (Synchronous Digital Hierarchy) comprises service aisle alarm module, protection channel alarm module, channel selecting module, data memory module.
The order that each branch road is switched is by the memory read write address generation module controls of described data memory module inside, is consistent with the order of outside branch road transposition circuit.
The device of the SDH branch road auto switching that the present invention constructed is finished the APS of the TU11/TU12/TU3 branch road of SDH in hardware circuit inside, do not need to realize reversed process by software management system.Hardware is automatic, the whole reversed process of parallel processing, and it is irrelevant to switch speed and cross-capacity, is not subjected to the processing speed of CPU and the restriction of interface rate, compare with existing software realization technology, improved the speed of switching, switching time obviously shortens, and can be controlled in the 4ms.The shared negater circuit structure of a plurality of branch roads of while, the small scale that circuit is realized is convenient to integrated.
Embodiment
Below in conjunction with embodiment device of the present invention is described further.
The F that is marked by frame of broken lines in the accompanying drawing 1 is the device of the present invention's design, is made of 4 sub-modules A, B, C, D.A is the service aisle alarm module, and B is a protection channel alarm module, and C is a channel selecting module, and D is a data memory module.
The service aisle alarm module upgrades the alarm coding and the count value of service aisle according to the service aisle warning information.The input signal of service aisle alarm module has: service aisle SF alarm, service aisle SD alarm, the service aisle of reading from data memory module is kept in count value, the temporary alarm coding of service aisle, and the parameter of external circuit arrangement: the return time setting and the setting of stalling for time.These input signals of service aisle alarm Combination Control logical foundation are determined the content to service aisle alarm status register and service aisle counter register assignment, give two groups of registers at the rising edge of clock.The output signal of service aisle alarm module is: service aisle upgrades the alarm coding and upgrades count value with service aisle, delivers to back one-level module together.
The structure of protection channel alarm module and service aisle alarm module is close, and protection channel alarm module is according to the alarm coding and the count value of protection channel alarm information updating protection passage.The input signal of protection channel alarm module has: protection passage SF alarm, protection passage SD alarm; the protection passage of reading from data memory module is kept in count value, the temporary alarm coding of protection passage, and the parameter of external circuit arrangement: the setting of stalling for time.Determining to the content of protecting channel alarm status register and protection channel counts register assignment of protection channel alarm Combination Control logic according to these input signals, and give registers group at rising edge clock.The output signal of protection channel alarm module is: the protection passage upgrades the alarm coding and upgrades count value with the protection passage, delivers to back one-level module together.
Channel selecting module is determined new channel selecting.The input signal of channel selecting module has: the service aisle of branch road alarm coding and protection channel alarm coding, and the channel selecting of from data memory module, reading, and the Switch mode of external circuit arrangement, outside are switched order.According to these input signals, channel selecting Combination Control logic determines to give the content of protecting port select register, current state code registers and switching reason code registers assignment, and gives registers group at rising edge clock.The output signal of channel selecting module is: upgrade channel selecting, current state coding and switch the reason coding, deliver to back one-level module together.
Data memory module is finished the various data accesses of switching of branch road, and the input signal of channel selecting module has: current state coding, switch the reason coding, upgrade channel selecting, service aisle upgrades count value, service aisle upgrades the alarm coding, the protection passage upgrades count value, the protection passage upgrades the alarm coding.These input signals all are that some branch roads are switched the data that need keep in when finishing, are stored in the position of this branch road correspondence in the memory.Will carry out switching operation to this branch road, data that these are temporary are read once more next time, the current state coding of wherein reading, switch the reason coding be used to report CPU.In addition, the channel selecting signal of reading is given cross over circuit simultaneously, carries out cross processing.What the input signal of data memory module also comprised memory reads address, write address, and CPU read the address.
Whole device adopts the form of time-sharing multiplex, and the shared same group of circuit of the hardware switching operation of each branch road of SDH comprises service aisle alarm module, protection channel alarm module, channel selecting module, data memory module.The order that each branch road is switched is by the memory read write address generation module controls of data memory module inside, be consistent with the order of outside branch road transposition circuit, She Ji advantage is that the channel selecting signal read from memory can directly be given the branch road transposition circuit and carries out the interconnection operation like this.
The device of the present invention's design need combine work with external circuit, and Fig. 1 has described the correlation of this device and other circuit.The outside input/output signal of this device has four classes: the first kind is the alarm input signal of passage; comprise: 1. service aisle SF alarms, 2. service aisle SD alarms, 3. protects passage SF alarm, 4. protects passage SD alarm, by the channel alarm testing circuit generation of outside.Second class is to switch the configuration parameter input signal, comprising: 5. Switch mode, 6. order, 7. return time setting, the 8. setting of stalling for time are switched in the outside, these parameters are to produce by switching the parameter configuration circuit.The 3rd class is the relevant input/output signal of CPU, wherein input signal: 9. CPU reads the address, output signal wherein: 1. the reason coding is encoded, 2. switched to current state.The 4th class is to give the signal of cross over circuit, i.e. output signal: 3. channel selecting signal.
A reversed process of device realization branch road of the present invention can divide for four steps, carried out in four clock cycle:
One, the first step
From data memory module, read next data of branch road to be processed constantly.This function is finished by data memory module.Data storage areas in the data memory module is made of the SRAM (static random access memory) of 1W/1R (having a read port and a write port), sees accompanying drawing 5.Memory read write address generation module in the data memory module produces the address of reading of SRAM; the service aisle of reading is kept in count value, the temporary alarm coding of service aisle is given the service aisle alarm module; the protection passage of reading is kept in count value, the temporary alarm coding of protection passage is given protection channel alarm module, and the channel selecting of reading is given channel selecting module.The current state of reading is encoded, is switched the reason coding and is used to report CPU.Two clock cycle of this process need, first count is read data from RAM, and second count is sent the alignment of data of reading.See that label in the accompanying drawing 6 is two clock cycle of 1,2.
Two, second step
The service aisle alarm module channel alarm of finishing the work is handled, and protection channel alarm module is finished the protection channel alarm and handled, and the service aisle alarm module carries out synchronously with protection channel alarm module, needs a clock cycle.See that label in the accompanying drawing 6 is 3 clock cycle.
1. the input signal of service aisle alarm module has: the service aisle SF alarm that the outside channel defect testing circuit of this device is sent here, service aisle SD alarm, install outside return time setting, the setting of stalling for time that the parameter configuration circuit is sent here of switching, the service aisle that data memory module is sent here is kept in count value, the temporary alarm coding of service aisle.These input signals of service aisle alarm Combination Control logical foundation in the service aisle alarm module, determine the service aisle alarm status register in the service aisle alarm module and the value of service aisle counter register, give this two registers group at the rising edge of clock.The value of 4 service aisle alarm status registers has five kinds of coding forms optional:
4 ' b0000-shows that service aisle with nowhere to turn to the police, is in normal condition,
4 ' b0001-shows that service aisle has the SD alarm, no SF alarm,
4 ' b0010-shows that service aisle has the SF alarm,
4 ' b0100-shows that service aisle is in the delay count status,
4 ' b1000-shows that service aisle is in and returns count status.
The content of definition during G.841 service aisle alarm Combination Control logic is followed to the assignment of service aisle alarm status register, concrete assignment procedure is as follows:
If
(1) as the temporary alarm of service aisle coding=4 ' b0000,
A. as long as service aisle SD alarm has one to be high level with service aisle SF alarm, assignment 4 ' b0100 then,
B. if not a situation, assignment 4 ' b0000 then,
Perhaps
(2) as the temporary alarm of service aisle coding=4 ' b0100,
If c. the temporary count value of service aisle is 0, and service aisle SD alarm all is low level with service aisle SF alarm, assignment 4 ' b0000 then,
If d. the temporary count value of service aisle is 0, and service aisle SF alarm is high level, assignment 4 ' b0010 then,
If e. the temporary count value of service aisle is 0, and service aisle SD alarm is high level, and service aisle SF alarm is low level, assignment 4 ' b0001 then,
F. if not c, d, e situation, assignment 4 ' b0100 then,
Perhaps
(3) as the temporary alarm of service aisle coding=4 ' b0010,
If g. service aisle SF alarm is low level, service aisle SD alarm is high level, assignment 4 ' b0001 then,
If h. service aisle SF alarm is low level, service aisle SD alarm is low level, assignment 4 ' b1000 then,
I. if not top g, h situation, assignment 4 ' b0010 then,
Perhaps
(4) as the temporary alarm of service aisle coding=4 ' b0001,
If j. service aisle SF alarm is high level, assignment 4 ' b0010 then,
If k. service aisle SF alarm is low level, service aisle SD alarm is low level, assignment 4 ' b1000 then,
L. if not top j, k situation, assignment 4 ' b0001 then,
Perhaps
(5) as the temporary alarm of service aisle coding=4 ' b1000,
If m. the temporary count value of service aisle is not 0, and service aisle SF alarm is high level, assignment 4 ' b0010 then,
If n. the temporary count value of service aisle is not 0, and service aisle SF alarm is low level, and service aisle SD alarm is high level, assignment 4 ' b0001 then,
If o. the temporary count value of service aisle is 0, and service aisle SF alarm is low level, and service aisle SD alarm is low level, then assignment 4 ' b0000.
P. if not top m, n, o situation, assignment 4 ' b1000 then.
The value excursion of 10 service aisle counter registers can be represented three kinds of implications between 0-1023, first kind of expression delays count value, and the value of corresponding service aisle alarm status register is 4 ' b0100; Count value is returned in second kind of expression, and the value of corresponding service aisle alarm status register is 4 ' b1000; The third represents non-above-mentioned two kinds of situations, and its value is 0, and the value of corresponding service aisle alarm status register is one of 4 ' b0000,4 ' b0001,4 ' b0010.
The value of the service aisle counter register of service aisle alarm module is upgraded the alarm coding as service aisle and is given channel selecting module and data memory module, and the value of the service aisle counter register of service aisle alarm module is upgraded count value as service aisle and given data memory module.
2. the processing procedure of protection channel alarm module is close with the service aisle alarm module.
The input signal of protection channel alarm module has: the protection passage SF alarm that the outside channel defect testing circuit of device is sent here, protection passage SD alarm; install the outside setting of stalling for time that the parameter configuration circuit is sent here of switching, the protection passage that data memory module is sent here is kept in count value, the temporary alarm of protection passage is encoded.These input signals of protection channel alarm Combination Control logical foundation in the protection channel alarm module; determine protection channel alarm status register and the value of protecting the channel counts register in the protection channel alarm module, give this two registers group at the rising edge of clock.The value of 4 protection channel alarm status registers have four kinds optional:
4 ' b0000-shows that the protection passage with nowhere to turn to the police, is in normal condition,
4 ' b0001-shows that the protection passage has the SD alarm, no SF alarm,
4 ' b0010-shows that the protection passage has the SF alarm,
4 ' b0100-shows that the protection passage is in the delay count status,
The content of definition during G.841 protection channel alarm Combination Control logic is followed to the assignment of protection channel alarm status register, concrete assignment procedure is as follows:
If
(1) the temporary alarm of protection passage coding=4 ' b0000,
A. to protect passage SD alarm and protection passage SF alarm to have one to be high level, assignment 4 ' b0100 then,
B. if not top a situation, assignment 4 ' b0000 then.
Perhaps
(2) the temporary alarm of protection passage coding=4 ' b0100,
If c. the temporary count value of protection passage is 0, and protection passage SD alarm all is low level with protection passage SF alarm, assignment 4 ' b0000 then,
If d. the temporary count value of protection passage is 0, and protection passage SF alarm is high level, assignment 4 ' b0010 then,
If e. the temporary count value of protection passage is 0, and protection passage SD alarm is high level, and protection passage SF alarm is low level, assignment 4 ' b0001 then,
Q. if not top c, d, e situation, assignment 4 ' b0100 then.
Perhaps
(3) the temporary alarm of protection passage coding=4 ' b0010,
If f. protection passage SF alarm is low level, protection passage SD alarm is high level, assignment 4 ' b0001 then,
If g. protection passage SF alarm is low level, protection passage SD alarm is low level, assignment 4 ' b0000 then,
R. if not top f, g situation, assignment 4 ' b0010 then.
Perhaps
(4) the temporary alarm of protection passage coding=4 ' b0001,
If h. protection passage SF alarm is high level, assignment 4 ' b0010 then,
If i. protection passage SF alarm is low level, protection passage SD alarm is low level, assignment 4 ' b0000 then,
S. if not top h, i situation, assignment 4 ' b0001 then.
The value excursion of 7 protection channel counts registers can be represented two kinds of implications between 0-127, first kind of expression delays count value, and the value of corresponding protection channel alarm status register is 4 ' b0100; Second kind of non-delay counting of expression, its value is 0, the value of corresponding protection channel alarm status register is one of 4 ' b0000,4 ' b0001,4 ' b0010.
The value of the protection channel counts register of protection channel alarm module is upgraded the alarm coding as the protection passage and is given channel selecting module and data memory module, and the value of the protection channel counts register of protection channel alarm module is upgraded count value as the protection passage and given data memory module.
Three, the 3rd step
Determine new channel selecting, finish this part function by module D.Need a clock cycle.See that label in the accompanying drawing 6 is 4 clock cycle.
The input signal of module D has: upgrade the alarm coding from the service aisle of modules A, upgrade the alarm coding from the protection passage of module B, from the selector channel of module D, and switch Switch mode that the parameter configuration circuit sends here and switch order from the outside.1 bit port mask register, 4 current state code registers, 4 assignment of switching the reason code registers are determined in the suggestion of channel selecting Combination Control logical foundation Tributary Protection Switch G.841, give this three registers group at the rising edge of clock.
The outside is switched order and is comprised as issuing orders:
(1.CLEAR removing): remove all external commands and recoverable wait return state of switching.Be encoded to 3 ' b111.
(2.LP lockout of protection): the protection locking prevents to select the protection passage by sending this request.Be encoded to 3 ' b110.
(3.FS-P forced switch to protection): Forced Switch forces to select the protection passage, unless the request of identical or higher priority is arranged to the protection passage.Be encoded to 3 ' b101.
(4.FS-W forced switch to working): Forced Switch is forced to select service aisle, unless the request of identical or higher priority is arranged to service aisle.Be encoded to 3 ' b100.
(5.MS-P manual switch to protection): Manual Switch is selected the protection passage, unless the request of identical or higher priority is arranged to the protection passage.Be encoded to 3 ' b011.
(6.MS-W manual switch to working): Manual Switch is selected service aisle, unless the request of identical or higher priority is arranged to service aisle.Be encoded to 3 ' b010.
Port select register represents that this branch road reversed process finishes the passage that the back is selected, and what be that 0 expression selects is service aisle, and what be that 1 expression selects is the protection passage.
The current state code registers is represented the state that branch road is current, is used to report CPU.Have 11 optional state values, the implication of expression is as follows:
4 ' h0: select service aisle, with nowhere to turn to the police, order is switched in no outside,
4 ' h1: select service aisle, external command is LP,
4 ' h2: select service aisle, the protection passage has the SF alarm, or service aisle has SF to alarm with the protection passage simultaneously
4 ' h3: select service aisle, the protection passage has the SD alarm, or service aisle has SD to alarm with the protection passage simultaneously
4 ' h4: select service aisle, external command is FS-W
4 ' h5: select service aisle, external command is MS-W
4 ' h6: select the protection passage, with nowhere to turn to the police, order is switched in no outside,
4 ' h7: select the protection passage, service aisle has the SF alarm, or protects passage and service aisle that the SF alarm is arranged simultaneously
4 ' h8: select the protection passage, service aisle has the SD alarm, or protects passage and service aisle that the SD alarm is arranged simultaneously
4 ' h9: select the protection passage, external command is FS-P
4 ' ha: select the protection passage, external command is MS-P
4 ' hb: select the protection passage,, be in WTR (wait to return Wait-to-Restore, recoverable switch exclusive) with nowhere to turn to the police
Switch the reason code registers and represent the line state of the channel selecting of branch road before changing; just the channel selecting of branch road switches to the reason of protecting passage or protection passage to switch to service aisle, the value of the same surface state code registers of its value from service aisle.Also be used to report CPU.
The value of port select register is encoded, is switched the value of reason code registers and gives data memory module together as switching the reason coding as current state as the value of upgrading channel selecting, current state code registers.
Four, the 4th step
Data after data memory module is handled front A, B, channel selecting module are temporary in RAM; comprise: the service aisle that the service aisle alarm module produces upgrades count value, service aisle upgrades the alarm coding; the protection passage that protection channel alarm module produces upgrades count value, protects passage to upgrade the alarm coding, and the current state that channel selecting module produces is encoded, switched the reason coding, upgrades channel selecting.
Clock cycle of action need.See in the accompanying drawing 6 that label is 5 or is designated as for 1 clock cycle.The processing procedure in this step and the operation of the sense data of the first step are carried out synchronously.Therefore the whole required altogether time of reversed process is 4 clock cycle.
The branch road transposition circuit that memory read write address generation module produces reads address and outside is relevant, must guarantee that the channel selecting signal of reading just in time can provide transposition circuit needed selection information.Memory write address ratio is read slow 4 clock cycle of address, just in time is that a branch road is finished and once switched the needed time of processing procedure.