Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and an apparatus for extracting parallel overheads in an optical synchronous digital transmission system, where the method and the apparatus greatly increase the overhead bytes usable by a user, so as to correspondingly increase OAM information carried by the overhead bytes, thereby achieving the purpose of providing a set of solution for extracting parallel overheads in the optical synchronous digital transmission system, which has a relatively simple circuit structure, high flexibility, less resource occupation, and high circuit utilization rate.
The invention provides a method for extracting parallel overhead in an optical synchronous digital transmission system, which comprises the following steps:
A. configuring an initial position of the extraction overhead;
B. performing line, column and interpolation counting according to the frame header of the STM-N data frame;
C. d, judging the position of the address generated by the row, column and interpolation counting according to the initial position of the extracted overhead, and entering the step D if the address belongs to the section overhead part; if the address belongs to the payload part, entering step E;
D. performing section overhead counting, reading overhead bytes from the STM-N data frame and storing the overhead bytes in a memory;
E. a payload count is performed and overhead bytes are extracted from memory.
The method comprises the following steps:
the overhead starting location is extracted by the processor configuration.
The method comprises the following steps:
segment overhead counting is performed at a first clock frequency, and each time an overhead byte is counted, an overhead byte is read from the STM-N data frame and saved to memory.
The method comprises the following steps:
the payload is counted at a second clock frequency, and one overhead byte is extracted from memory each time the count is made.
The method comprises the following steps that the first clock frequency and the second clock frequency meet the following formulas:
second clock frequency > first clock frequency x (number of overhead bytes read/number of payload bytes).
In the step E of the method, the step E,
the overhead bytes are extracted from memory through an overhead extraction interface.
The invention also provides a device for extracting the parallel overhead in the optical synchronous digital transmission system, which comprises:
the configuration module is used for configuring an initial position of the extraction overhead;
the line, column and interpolation counting module is used for counting lines, columns and interpolation according to the frame header of the STM-N data frame;
the judging module is used for judging the position of the address generated by the row, column and interpolation counting according to the initial position of the extracted overhead and determining that the address belongs to a section overhead part or a payload part;
the segment overhead reading and storing module is used for counting segment overhead, reading overhead bytes from the STM-N data frame and storing the overhead bytes into a memory;
a memory for storing overhead bytes read from the STM-N data frame;
and the section overhead extraction module is used for counting the payload and extracting overhead bytes from the memory.
The section overhead reading and storing module of the device counts section overhead at a first clock frequency, reads an overhead byte from an STM-N data frame and stores the overhead byte in a memory every time the section overhead reading and storing module counts section overhead at the first clock frequency.
The section overhead extraction module of the device counts payloads at a second clock frequency, and extracts an overhead byte from the memory every time the payload is counted.
The section overhead extraction module of the device extracts overhead bytes from a memory through an overhead extraction interface.
The method and the device for extracting the parallel overhead in the optical Synchronous digital transmission system of the invention carry out grouping on STM-N (Synchronous Transport Module-N) data streams in a cross chip, reading overhead bytes from the STM-N data frame and storing the overhead bytes into a memory according to the configured extraction overhead starting position and the row, column and interpolation counts, and the time generated by counting the bytes of the payload part in the data frame is used for extracting the overhead bytes in the overhead memory, thereby realizing the extraction configuration of the overhead bytes according to the needs of users, greatly increasing the usable overhead bytes of the users, accordingly, OAM information carried by overhead bytes is correspondingly increased, and the beneficial effect of providing a parallel overhead extraction solution in an optical synchronous digital transmission system with a relatively simple circuit structure, high flexibility, less resource occupation and high circuit utilization rate is achieved for users.
Detailed Description
The following describes a specific embodiment of the invention in detail by taking a 128-way STM-16 rate level cross chip as an example in combination with the attached drawings.
In this embodiment, 128 STM-16 rate level interleaved chips are divided into two groups, each group extracting the overhead bytes of 64 STM-16 data frames. The purpose of the grouping into two groups is to meet the timing requirement, i.e. the extraction of overhead bytes is done within the time the payload bytes are counted.
In addition, because the STM-16 data frame is transmitted by rows, the transmission of the payload byte is necessarily followed after the transmission of the overhead byte is finished. Overhead bytes from the STM-16 data frame are received at the overhead location and the received overhead bytes are sent to the overhead extraction interface at the payload location, so that only the extracted overhead bytes for each row need be stored.
Fig. 1 is a schematic diagram of the structure of an SDH frame in the present invention, where an STM-16 data frame is composed of 16 STM-1 data frames, and the structure of an STM-1 data frame is 9 rows × 270 columns, that is, each row occupies 270 bytes, and there are 2430 bytes. An STM-1 data frame comprising: segment overhead SOH, administrative Unit Pointer (AU PTR), and payload. The section overhead SOH and the management unit pointer AU PTR are located in an area formed by the 1 st to 9 th rows and the 1 st to 9 th columns of the frame structure, wherein the 1 st to 3 rd rows are an area where the reproduction section overhead RSOH is located, the 4 th row is an area where the management unit pointer AU PTR is located, and the 5 th to 9 th rows are an area where the multiplexing section overhead MSOH is located.
Thus, in one row of an STM-16 data frame, the segment overhead portion takes 9 × 16-144 bytes and the payload portion 261 × 16-4176 bytes. In the process of counting the payload part of each row, one overhead byte is extracted from the memory in which the overhead byte is stored every 4 clock cycles of 311MHz, that is, the operating frequency of extracting the overhead byte is 78MHz, so that 4176/4 MHz is total clock cycles of 78 MHz. For 64 paths of STM-16 data frames, because each path extracts 16 bytes per line, 64 × 16 is 1024 overhead bytes in total, and because the extraction of one overhead byte is completed every 78MHz clock cycle, there is a margin of 1044-1024, which is 20 clock cycles in the process of extracting the overhead bytes.
Fig. 2 is an interface timing diagram for parallel overhead extraction in the present invention, according to the division of the STM-16 data frame, the overhead bytes can be extracted from all the other rows except the 1 st and 4 th rows, for the STM-16 data frame, 16 bytes are extracted from each row, and the start positions of the extracted overhead bytes are set by the chip in a unified manner. And when the overhead bytes are extracted, the overhead bytes are output in parallel within the time of counting the payload bytes. The extracted overhead clock rtohclk is 78MHz, the extracted overhead frame header rtohfp and the extracted overhead byte rtoh [7:0] are output at the falling edge of the clock, and the output sequence 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 the above sequence, m represents the number of lanes of the STM-16 data frame, 64 lanes in total, and ranges from [0, 63], n represents the number of overhead bytes extracted from each lane of the data frame, 16 bytes in total, and ranges from [0, 15 ].
When the extraction overhead enable rtohen is in a high level, the extraction of overhead bytes is indicated, the frame header rtohfp is aligned with the first overhead byte extracted in the line 2, and the external FPGA carries out data sampling on the rising edge of the clock.
Fig. 3 is a structural diagram of a device for extracting parallel overhead in the present invention, which includes:
a configuration module 301, configured to configure an initial position of overhead extraction;
a line, column and interleave counting module 302, configured to perform line, column and interleave counting according to a frame header of the STM-N data frame;
the judging module 303 is configured to perform position judgment on the address generated by the row, column, and interleave count according to the initial position of the extracted overhead, and determine that the address belongs to a section overhead portion or a payload portion.
And the segment overhead reading and saving module 304 is used for counting the segment overhead at the 311MHz clock frequency, reading one overhead byte from the STM-N data frame every time the segment overhead is counted, and saving the overhead byte to the memory.
A memory 305 for storing overhead bytes read from an STM-N data frame;
a section overhead extraction module 306 for counting payloads at 78MHz clock frequency, extracting one overhead byte from memory each time the payload is counted.
The section overhead extraction module extracts overhead bytes from a memory through an overhead extraction interface.
Fig. 4 is a flowchart of a method for extracting parallel overheads in the present invention, which includes the following steps:
step 401, configuring and extracting an overhead starting position through a processor interface.
And step 402, performing line, column and interpolation counting according to the frame header of the STM-16 data frame.
Step 403, performing position judgment on the address generated by row, column and interleave counting according to the configured initial position of the overhead extraction, and entering step 304 if the address belongs to a segment overhead part; if the address belongs to a payload section, step 306 is entered.
At step 404, segment overhead counting is performed.
In this step, one overhead byte will be read from the STM-16 data frame for each count, counting until 5'd 16 holds.
Step 405, the read overhead bytes are saved to memory.
At step 406, payload counting is performed.
In this step, one overhead byte is fetched from memory every count, and the count is kept at 10'd 1024.
In step 407, the overhead byte in the memory is extracted through the overhead extraction interface.
FIG. 5 is a diagram of a sequential circuit for parallel overhead extraction according to the present invention, including:
row, column, interleave counter generator 501, overhead start position \ payload position generator 502, payload counter generator 503, segment overhead counter generator 504, overhead memory 505, overhead extractor 506. Wherein,
the line, column, and interleave counter generator 501 generates a line counter cnt _ row [3:0], a column counter cnt _ col [6:0], and an interleave counter cnt _ sts [5:0] according to the inputted frame header, and inputs the line counter cnt _ row [3:0], the column counter cnt _ col [6:0], and the interleave counter cnt _ sts [5:0] to the overhead start position/payload position generator 502 for counting. Wherein, the line counter cnt _ row [3:0], the column counter cnt _ col [6:0] and the interpolation counter cnt _ STS [5:0] respectively correspond to the line, column and STS _1 sub-frame of the STM-16 data frame. An STM-16 data frame includes 48 STS-1 subframes.
The overhead initial position/payload position generator 502 determines whether the addresses generated by the count of the row counter cnt _ row [3:0], the column counter cnt _ col [6:0], and the interpolation counter cnt _ sts [5:0] belong to the section overhead part or the payload part according to the configured overhead extraction initial position; if it belongs to the section overhead part, the start position indication of the overhead extraction is generated and sent to the section overhead counter generator 504; if it belongs to the payload section, a payload position indication is generated and sent to the payload counter generator 503.
Segment overhead counter generator 504 receives the start position indication of overhead extraction sent by overhead start position/payload position generator 502, generates segment overhead counter soh _ cnt [4:0], and segment overhead counter soh _ cnt [4:0] counts from the start position of overhead extraction, and reads an overhead byte from the STM-16 data frame and stores it in overhead memory 505 every time it counts until 5'd 16 is maintained.
Upon receipt of the payload position indication, the payload counter generator 503 generates a payload counter poh _ cnt [10:0] that counts from 10'd 0, and each time the count is made, the overhead extractor 506 extracts an overhead byte from the overhead memory 505 until the count reaches 10'd 1024.
The start position indication of the overhead fetch and segment overhead counter soh _ cnt [4:0] as well as the STM-16 data frame are input into overhead memory 505, starting from the start position of the overhead fetch and up to the segment overhead counter soh _ cnt [4:0] counting to 5'd 15, thereby reading and saving the 16 overhead bytes in each way of the STM-16 data frame into overhead memory 505.
The payload position indication and payload counter poh _ cnt [10:0] are input to the overhead extractor 506, the payload counter poh _ cnt [10:0] counts in the range 11'd 0-11'd 1023, and once every count, the overhead extractor extracts one overhead byte from the overhead memory 505, in turn extracting 1024 overhead bytes. Where bits 4 through 9 of the payload counter poh _ cnt, i.e., [9:4], represent 64-way STM-16 data frames and bits 0 through 3 of the payload counter poh _ cnt, i.e., [3:0], represent 16 overhead bytes in a 1-way STM-16 data frame. When 1024 overhead bytes are extracted, the extraction overhead enable rtohen is kept at a high level, and the extraction overhead enable rtohen is kept at a low level at the rest of time. The extracted overhead frame header rtohfp and the extracted overhead clock rtohclk can be generated according to the timing requirement, wherein the extracted overhead frame header rtohfp corresponds to the first byte, and the rising edge of the extracted overhead clock rtohclk corresponds to the middle of the extracted overhead frame header rtohfp, the extracted overhead enable rtohen and the overhead byte rtoh [7:0 ].
In summary, the invention realizes the parallel extraction of a row of overhead bytes in an STM-16 data frame by using 16 memory cells, and realizes the overhead extraction interface of 64 paths of STM-16 data by using 11 pins, so that the interface is greatly simplified, the circuit scale is greatly reduced, the working time sequence of a chip is easier to meet, and the power consumption and the chip cost are reduced.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.