Summary of the invention
In view of this, the object of the present invention is to provide method and device that in a kind of optical synchronization digital transmission system, parallel overhead extracts, the method and device increase the spendable overhead byte of user greatly, thereby the OAM information that corresponding increase overhead byte carries, is reached for the object that user provides parallel overhead extraction solution in the optical synchronization digital transmission system that circuit kit structure is relatively simple, flexibility ratio is high, resource occupation is few, percentage of circuit utilization is high.
The invention provides a kind of method that in optical synchronization digital transmission system, parallel overhead extracts, comprising:
A. configuration extraction expense original position;
B. according to the frame head of STM-N Frame, carry out row, column, interleave counting;
C. according to extract expense original position to row, column, interleave the address that counting generates and carry out position judgment, if this address belongs to section overhead part, enter step D; If this address belongs to payload part, enter step e;
D. carry out section overhead counting, from STM-N Frame, read overhead byte and be saved in memory;
E. carry out payload counting, from memory, extract overhead byte.
Described in the method, steps A is:
By processor configuration extraction expense original position.
Described in the method, step D is:
With the first clock frequency, carry out section overhead counting, every counting once, reads an overhead byte and is saved in memory from STM-N Frame.
Described in the method, step e is:
With second clock frequency, carry out payload counting, every counting once, extracts an overhead byte from memory.
Described in the method, the first clock frequency, second clock frequency meet following formula:
Second clock frequency > the first clock frequency * (the overhead byte number/payload word joint number reading).
Described in the method in step e,
By overhead extraction interface, from memory, extract overhead byte.
The present invention also provides the device that in a kind of optical synchronization digital transmission system, parallel overhead extracts, and comprising:
Configuration module, for configuration extraction expense original position;
Row, column, interleave counting module, for carrying out row, column according to the frame head of STM-N Frame, interleaving counting;
Judge module, for according to extract expense original position to row, column, interleave the address that counting generates and carry out position judgment, determine that this address belongs to section overhead part or payload part;
Section overhead reading and saving module for carrying out section overhead counting, reads overhead byte and is saved in memory from STM-N Frame;
Memory, for storing the overhead byte reading from STM-N Frame;
Section overhead extraction module for carrying out payload counting, extracts overhead byte from memory.
This installs described section overhead reading and saving module and carries out section overhead counting with the first clock frequency, and every counting once, reads an overhead byte and is saved in memory from STM-N Frame.
This installs described section overhead extraction module and carries out payload counting with second clock frequency, and every counting once, extracts an overhead byte from memory.
This installs described section overhead extraction module and from memory, extracts overhead byte by overhead extraction interface.
Method and device that in optical synchronization digital transmission system of the present invention, parallel overhead extracts, by STM-N in cross chips (Synchronous Transport Module-N) data flow is divided into groups, according to extraction expense original position and the row of configuration, row, interleave counting, from STM-N Frame, read overhead byte and be saved in memory, and utilize the time that the counting of payload part byte in Frame is produced to complete the extraction to the overhead byte in expense memory, realization is according to user's needs, carry out the extraction configuration of overhead byte, greatly increased the spendable overhead byte of user, thereby correspondingly increased the OAM information that overhead byte carries, being reached for user provides circuit kit structure relatively simple, flexibility ratio is high, resource occupation is few, in the high optical synchronization digital transmission system of percentage of circuit utilization, parallel overhead extracts the beneficial effect of solution.
Embodiment
Below in conjunction with accompanying drawing Yi128 road STM-16 speed grade cross chips, be example, describe specific embodiments of the invention in detail.
In the present embodiment, Jiang128 road STM-16 speed grade cross chips is divided into two groups, every group of overhead byte that extracts 64 road STM-16 Frames.The object that is divided into two groups is in order to meet sequential requirement, complete the extraction of overhead byte within the time that bytes of payload is counted.
In addition, because STM-16 Frame transmits by row, therefore, after overhead byte end of transmission, inevitable followed by transmission bytes of payload.In expense position, receive and come from the overhead byte in STM-16 Frame, in payload position, the overhead byte receiving is sent to overhead extraction interface, thereby only need to stores the overhead byte that every a line is extracted.
Fig. 1 is the structural representation of SDH frame in the present invention, and STM-16 Frame is comprised of 16 STM-1 Frames, and the structure of a STM-1 Frame is 9 row * 270 row, and every row accounts for 270 bytes, totally 2430 bytes.A STM-1 Frame comprises: section overhead SOH, Administrative Unit Pointer (AU PTR, Administration Unit Pointer) and payload.Section overhead SOH and Administrative Unit Pointer AU PTR are positioned at the 1st to 9 row of frame structure and the region that the 1st to 9 row form, wherein, the 1st to 3 behavior RSOH RSOH regions, the 4th behavior management unit pointer AU PTR region, the 5th to 9 behavior MSOH MSOH regions.
Therefore, in a line of a STM-16 Frame, section overhead partly accounts for 9 * 16=144 byte, and payload part accounts for 261 * 16=4176 byte.The payload part of every row is being carried out in counting process, every 4 311MHz clock cycle are extracted an overhead byte in having the memory of overhead byte, the operating frequency of extracting overhead byte is 78MHz, like this, and total 4176/4=1044 the 78MHz clock cycle.For 64 road STM-16 Frames, because the every row in every road extracts 16 bytes, therefore, altogether will extract 64 * 16=1024 overhead byte, because each 78MHz clock cycle completes the extraction of an overhead byte, therefore in carrying out the leaching process of overhead byte, the surplus of 1044-1024=20 clock cycle will be had.
Fig. 2 is the interface sequence figure that in the present invention, parallel overhead extracts, according to the division of STM-16 Frame, except the 1st, 4 row, overhead byte can be extracted in other provisional capital, for STM-16 Frame, be often about to extract 16 bytes, the original position of extracting overhead byte arranges by chip is unified.When extracting overhead byte, within the time that bytes of payload is counted, parallel output overhead byte.Wherein, extracting expense clock rtohclk is 78MHz, extracts expense frame head rtohfp, overhead byte rtoh[7:0] in the trailing edge output of clock, output order is as follows:
0/0,0/1,0/2,...,0/15,1/0,1/1,1/2,...,m/n,...,63/0,63/1,63/2,...,63/15
In above-mentioned sequence, m represents the way of STM-16 Frame, Gong64 road, and scope is [0,63], n represents the overhead byte number that every circuit-switched data frame extracts, totally 16 bytes, scope is [0,15].
Extract expense and enable rtohen while being high level, represent to carry out the extraction of overhead byte, frame head rtohfp will align with first overhead byte that the 2nd row extracts, and outside FPGA carries out data sampling at rising edge clock.
Fig. 3 is the structure drawing of device that in the present invention, parallel overhead extracts, and comprising:
Configuration module 301, for configuration extraction expense original position;
Row, column, interleave counting module 302, for carrying out row, column according to the frame head of STM-N Frame, interleaving counting;
Judge module 303, for according to extract expense original position to row, column, interleave the address that counting generates and carry out position judgment, determine that this address belongs to section overhead part or payload part.
Section overhead reading and saving module 304, for carrying out section overhead counting with 311MHz clock frequency, every counting once, reads an overhead byte and is saved in memory from STM-N Frame.
Memory 305, for storing the overhead byte reading from STM-N Frame;
Section overhead extraction module 306, for carrying out payload counting with 78MHz clock frequency, every counting once, extracts an overhead byte from memory.
Wherein, section overhead extraction module extracts overhead byte by overhead extraction interface from memory.
Fig. 4 is the method flow diagram that in the present invention, parallel overhead extracts, and concrete steps are as follows:
Step 401, by processor interface configuration extraction expense original position.
Step 402, carries out row, column, interleaves counting according to the frame head of STM-16 Frame.
Step 403, according to the extraction expense original position of configuration to row, column, interleave the address that counting generates and carry out position judgment, if this address belongs to section overhead part, enter step 304; If this address belongs to payload part, enter step 306.
Step 404, carries out section overhead counting.
In this step, every counting once, will read an overhead byte from STM-16 Frame, count down to 5 ' d16 always and keep.
Step 405, is saved in the overhead byte reading in memory.
Step 406, carries out payload counting.
In this step, every counting once, will extract an overhead byte from memory, count down to 10 ' d1024 always and keep.
Step 407, completes the extraction to the overhead byte in memory by overhead extraction interface.
Fig. 5 is the sequence circuit structure chart that in the present invention, parallel overhead extracts, and comprising:
Row, column, interleave counter generator 501, expense original position payload position generator 502, payload counter generator 503, section overhead counter generator 504, expense memory 505, overhead extraction device 506.Wherein,
Row, column, interleave counter generator 501 and produce linage-counter cnt_row[3:0 according to the frame head of input], column counter cnt_col[6:0], interleave counter cnt_sts[5:0], and by this linage-counter cnt_row[3:0], column counter cnt_col[6:0], interleave counter cnt_sts[5:0] be input to expense original position payload position generator 502 count.Wherein, linage-counter cnt_row[3:0], column counter cnt_col[6:0], interleave counter cnt_sts[5:0] respectively row, column and the STS_1 subframe of corresponding STM-16 Frame.A STM-16 Frame comprises 48 STS-1 subframes.
Expense original position payload position generator 502 according to the overhead extraction original position judgement linage-counter cnt_row[3:0 of configuration], column counter cnt_col[6:0], interleave counter cnt_sts[5:0] address that produces of counting belongs to section overhead part, still belongs to payload part; If belong to section overhead part, the original position indication that produces overhead extraction sends to section overhead counter generator 504; If belong to payload part, produce payload position indication and send to payload counter generator 503.
Section overhead counter generator 504 receive expense original position after the original position indication of the overhead extraction that sends of payload position generator 502, produce section overhead counter soh_cnt[4:0], section overhead counter soh_cnt[4:0] from the original position of overhead extraction, start to count, every counting once, to from STM-16 Frame, read an overhead byte and deposit expense memory 505 in, and counting down to 5 ' d16 always and keep.
Payload counter generator 503 is received after payload position indication, produce payload counter poh_cnt[10:0], since 10 ' d0, to count, every counting is once, overhead extraction device 506 will extract an overhead byte from expense memory 505, count down to 10 ' d1024 always and keep.
The original position indication of overhead extraction and section overhead counter soh_cnt[4:0] and STM-16 Frame be input to expense memory 505, from the original position of overhead extraction, until section overhead counter soh_cnt[4:0] count down to 5 ' d15, thus 16 overhead bytes in the STM-16 Frame of Jiang Mei road read and are saved in expense memory 505.
Payload position indication and payload counter poh_cnt[10:0] be input to overhead extraction device 506, payload counter poh_cnt[10:0] in 11 ' d0-11 ' d1023 scope inside counting, every counting once, overhead extraction device just extracts an overhead byte from expense memory 505, extracts successively 1024 overhead bytes.Wherein the 4th of payload counter poh_cnt the to the 9th is [9:4], represents 64 road STM-16 Frames, and the 0th to the 3rd of payload counter poh_cnt is [3:0], represents 16 overhead bytes in 1 road STM-16 Frame.When extracting 1024 overhead bytes, to extract expense and enable rtohen and keep high level, all the other extract expense constantly, and to enable rtohen be low level.Extract expense frame head rtohfp and extract expense clock rtohclk and can require producing according to sequential, wherein, extract corresponding first byte of expense frame head rtohfp, the rising edge that extracts expense clock rtohclk is corresponding extracts expense frame head rtohfp, extract expense enables rtohen and overhead byte rtoh[7:0] centre.
In sum, the present invention only uses 16 memory cell just to realize the parallel extraction to a line overhead byte in STM-16 Frame, only use 11 pins just to realize the overhead extraction interface of Liao64 road STM-16 data, interface is greatly simplified, greatly reduced circuit scale, thereby chip operation sequential is more easily met, reduced power consumption and chip cost simultaneously.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.