CN102882627B - Methods and related devices for mapping and demapping service data - Google Patents

Methods and related devices for mapping and demapping service data Download PDF

Info

Publication number
CN102882627B
CN102882627B CN201210338397.6A CN201210338397A CN102882627B CN 102882627 B CN102882627 B CN 102882627B CN 201210338397 A CN201210338397 A CN 201210338397A CN 102882627 B CN102882627 B CN 102882627B
Authority
CN
China
Prior art keywords
business datum
time slot
input
output
byte
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210338397.6A
Other languages
Chinese (zh)
Other versions
CN102882627A (en
Inventor
廖锦秋
吴德亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210338397.6A priority Critical patent/CN102882627B/en
Publication of CN102882627A publication Critical patent/CN102882627A/en
Application granted granted Critical
Publication of CN102882627B publication Critical patent/CN102882627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Time-Division Multiplex Systems (AREA)

Abstract

The embodiment of the invention discloses a method for mapping service data, a method for demapping the service data, a related device for mapping the service data and a related device for demapping the service data. The method for mapping the service data comprises the following steps of: reading the service data; splitting the read service data into N data blocks, wherein N is equal to the number of timeslots occupied by the service data; writing the split data blocks into first in first out queues respectively, wherein one data block is written into each first in first out queue; and selecting the data blocks from the first in first out queues, and inserting the data blocks into timeslots corresponding to the first in first out queues, wherein one first in first out queue corresponds to each timeslot. According to the embodiment, the logical resources of the mapping and demapping methods can be optimized, and the utilization rates of the resources can be increased.

Description

A kind of mapping of business datum and de-mapping method and relevant apparatus
Technical field
The present invention relates to the communications field, particularly relate to a kind of mapping of business datum and de-mapping method and relevant apparatus.
Background technology
Along with improving constantly of Networks of Fiber Communications transmission rate, the path of the business datum of communication network is increased, the original sky of chip internal divides bus at resource area, module reuse, ease for use aspect becomes unacceptable, and new time-shared bus can transmit the business of multiple different rates under same bus, can interconnect resources be saved, make multiple business can share same passage and transmit.Can by empty point, the mapping converting Networks of Fiber Communications of time-division and demapping.
Wherein, in the mapping carrying out low order and high-order or demapping, need in the high-order frame structure that the low-order service data-mapping on time-shared bus is interleave to sky point byte, or divide the byte demapping interleave to go out the business datum of low order high-order frame structure hollow.Time-division and an empty point conversion can complete mapping or demapping, and can determine the logical complexity of mapping or demapping, cost power consumption etc.
Map time-division of demapping turns empty point or empty point turn in the conversion of time-division, relate to multichannel scheduling, data buffer storage and data selection.In prior art, be, by passage, buffer memory and selection are carried out to low-order service data mostly.It realizes principle as shown in Figure 1, BUF module subchannel buffer memory multichannel low-order service data, passage buffer memory business datum, and by the timesharing of TDM module, the business datum of this multiple passage is write buffer memory in multiple First Input First Output, wherein, a business datum writes in a First Input First Output.If a business datum takies n high-order time slot, then corresponding n the high-order time slot of each First Input First Output, wherein, the displacement output logic of MUX finishing service data and byte insert time slot, for reading the business datum in First Input First Output, export by byte shift, be inserted in n high-order time slot.
The present inventor finds in the research and practice process of prior art, in prior art, the business datum in a passage is write in a First Input First Output, a business datum takies n high-order time slot, then need in business datum write n the high-order time slot in each First Input First Output.In prior art, subchannel carries out buffer memory and the selection of business datum, each passage and each First Input First Output independent process business datum, storage resources and logical resource is not shared between each First Input First Output, logical resource is caused to take greatly, and when only having small number of service data to need process, most passage and First Input First Output leave unused, and resource utilization is low, cost is high, and power consumption is large.
Summary of the invention
Embodiments provide a kind of mapping of business datum and de-mapping method and relevant apparatus, for improving the utilance of resource.
A mapping method for business datum, can comprise: read business datum; Be N number of data block by the business datum cutting of reading, wherein, N equals the number of the time slot that business datum takies; The data block of cutting is write First Input First Output respectively, and wherein, a data block writes a First Input First Output; From First Input First Output, select data block, and insert in time slot corresponding to First Input First Output, wherein, a First Input First Output corresponds to a time slot.
Optionally, read business datum, specifically comprise: the business datum reading a passage from the business datum of multiple passage.
Optionally, from the business datum of multiple passage, read the business datum of a passage, be specially: the waterline size of the First Input First Output that the business datum of more multiple passage writes; If waterline size is unequal, then read the business datum of passage corresponding to the First Input First Output minimum with write waterline; If waterline equal and opposite in direction, then judge the amount of bandwidth of the business datum of multiple passage, and the business datum that preferential reading bandwidth is larger.
Optionally, read the business datum of a passage in the business datum of multiple passage, be specially: the waterline state of the First Input First Output that the business datum of the multiple passage of poll writes; When the waterline state being often polled to First Input First Output is in non-full state, read with write the business datum of passage corresponding to the First Input First Output that is in non-full state.
Optionally, be N number of data block by the business datum cutting of reading, specifically comprise: be N number of data block according to byte number by the business datum cutting of reading.The implementation possible according to the second, in same First Input First Output, takes out a byte at interval of N number of byte and inserts in the time slot corresponding with First Input First Output.
Optionally, if business datum increases P the time slot taken, then take out a byte at interval of N+P byte and insert in the time slot corresponding with First Input First Output; If business datum reduces by Q the time slot taken, then take out a byte at interval of N-Q byte and insert in the time slot corresponding with First Input First Output.
A de-mapping method for business datum, comprising: determine the N number of time slot belonging to business datum, business datum comprises N number of data block, and each data block is deposited in one time slot; Read block from N number of time slot respectively; The data block read from time slot write in N number of First Input First Output, wherein, a First Input First Output corresponds to a time slot; Read block from N number of First Input First Output, is combined into business datum.
Optionally, data block is deposited in a slot according to byte; In same time slot, data block has a byte to deposit in a slot at interval of N number of byte.
Optionally, distinguish the byte of read block from N number of time slot simultaneously, and the data block read from time slot is write in N number of First Input First Output simultaneously.
Optionally, if the time slot belonging to business datum increases P, then, in same time slot, data block has a byte to deposit in a slot at interval of N+P byte; If the time slot belonging to business datum reduces by Q time slot, then, in same time slot, data block has a byte to deposit in a slot at interval of N-Q byte.
A mapping device for business datum, comprising: read module, for reading business datum; Cutting module, the business datum cutting for being read by read module is N number of data block, and wherein, N equals the number of the time slot that business takies; Writing module, for the data block after the cutting of cutting module is write First Input First Output respectively, wherein, a data block writes a First Input First Output; Selecting insert module, for selecting data block from First Input First Output, and inserting in time slot corresponding to First Input First Output, wherein, a First Input First Output corresponds to a time slot.
Optionally, read module reads the business datum of a passage from the business datum of multiple passage.
Optionally, read module, the waterline size of the First Input First Output that the business datum specifically for more multiple passage writes; If waterline size is unequal, then reads the business datum of passage corresponding to the First Input First Output minimum with write waterline, if waterline equal and opposite in direction, then judge the amount of bandwidth of the business datum of multiple passage, and the business datum that preferential reading bandwidth is larger.
Optionally, read module, specifically for the waterline state of the first dequeue that the business datum of the multiple passage of poll writes, when the waterline state being often polled to First Input First Output is in non-full state, read with write the business datum of passage corresponding to the First Input First Output that is in non-full state.
Optionally, divide module, specifically for being N number of data block according to byte number by the business datum cutting of reading; Wherein, in same First Input First Output, take out a byte at interval of N number of byte and insert in the time slot corresponding with First Input First Output.
Optionally, select insert module, if increase P the time slot taken specifically for business datum, select insert module to take out a byte at interval of N+P byte and insert in the time slot corresponding with First Input First Output; If business datum reduces by Q the time slot taken, select insert module to take out a byte at interval of N-Q byte and insert in the time slot corresponding with First Input First Output.
A demapping device for business datum, comprising: determination module, and for determining the N number of time slot belonging to business datum, business datum comprises N number of data block, and each data block is deposited in one time slot; Read module, for read block from N number of time slot respectively; Writing module, the data block for being read from time slot by read module writes in N number of First Input First Output, and wherein, a First Input First Output corresponds to a time slot; Composite module, for read block from N number of First Input First Output, is combined into business datum.
Optionally, data block is deposited in a slot according to byte; In same time slot, data block has a byte to deposit in a slot at interval of N number of byte.
Optionally, writing module, if increase P specifically for the time slot belonging to business datum, then, in same time slot, data block has a byte to deposit in a slot at interval of N+P byte; If the time slot belonging to business datum reduces by Q time slot, then, in same time slot, data block has a byte to deposit in a slot at interval of N-Q byte.
A treatment system for business datum, comprising: the mapping device of any one business datum above-mentioned and the demapping device of business datum.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
A business datum can be N number of data block by the number of time slots cutting that it takies by the embodiment of the present invention, each data block is corresponding with a First Input First Output and a time slot, the time slot that the present embodiment can take by business datum carries out buffer memory and selection, and can a business datum be write in N number of time slot that this business datum takies simultaneously, the logical resource of business datum can be optimized, improve the utilance of resource, reduce power consumption.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those skilled in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a schematic diagram of the mapping method of business datum of the prior art;
Fig. 2 is a method flow diagram of the mapping method of business datum in the embodiment of the present invention;
Fig. 3 is another method flow diagram of the mapping method of business datum in the embodiment of the present invention;
Fig. 4 is the structure chart of the mapping device of business datum in the embodiment of the present invention;
Fig. 5 is the schematic diagram of an embody rule example of the mapping method of business datum in the embodiment of the present invention;
Fig. 6 is the method flow diagram of the de-mapping method of business datum in the embodiment of the present invention;
Fig. 7 is the schematic diagram of an embody rule example of the de-mapping method of business datum in the embodiment of the present invention;
Fig. 8 is the structure chart of the demapping device of business datum in the embodiment of the present invention;
Fig. 9 is the structure chart of the treatment system of business datum in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those skilled in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiments provide a kind of mapping and de-mapping method of business datum, for improving the utilance of resource.The embodiment of the present invention also provides relevant apparatus.Below describe in detail respectively.
Embodiment one
The invention provides a kind of mapping method of business datum, wherein, the angle of the mapping device with business datum is described in detail by the embodiment of the present invention, for convenience, below by the mapping device of this business datum referred to as mapping device.
A mapping method for business datum, comprising: read business datum; Be N number of data block by the business datum cutting of reading, wherein, N equals the number of the time slot that business datum takies; The data block of cutting is write First Input First Output respectively, and wherein, a data block writes a First Input First Output; From First Input First Output, select data block, and insert in time slot corresponding to First Input First Output, wherein, a First Input First Output corresponds to a time slot.
As shown in Figure 2, idiographic flow can be as follows:
101, business datum is read; Such as, specifically can be as follows:
First can be buffered in multiple passages of data buffer area by multiple business datum, wherein, can be buffered in a passage by a business datum, different business datums is assigned with the address field of regular length, independently carries out address administration.Wherein, for ensureing that business datum can not stop or overflow, each business datum is when normally working, and the business datum stored in data buffer area maintains non-NULL and non-full state.Should be understood that, this business datum can be low-order service data.
Concrete, in the present embodiment, mapping device can read the business datum of one of them passage in the business datum of multiple passage, in order to ensure that the business datum write in First Input First Output can not stop, needs to select first read which business datum.
Such as, the business datum of a passage specifically can be read in the following manner from the business datum of multiple passage:
Mode one, can the waterline size of First Input First Output that writes of the business datum of more multiple passage:
If the waterline size of the First Input First Output that the business datum of this multiple passage writes is unequal, then read the business datum of passage corresponding to the First Input First Output minimum with waterline; If the waterline equal and opposite in direction of the First Input First Output that the business datum of this multiple passage is corresponding, then judge the amount of bandwidth of the business datum of this multiple passage, and the business datum that preferential reading bandwidth is larger.
Mode two, can the waterline state of First Input First Output that writes of the business datum of the multiple passage of poll:
When the waterline state of the First Input First Output that the business datum being polled to these passages writes is in non-full state, read with write the business datum of passage corresponding to the First Input First Output that is in non-full state.
102, be N number of data block by the business datum cutting of reading, wherein, N equals the number of the time slot that business datum takies;
Optionally, can be N number of data block by the business datum cutting of reading according to byte number, wherein, N equals the number of the time slot that business datum takies.
103, the data block of cutting is write First Input First Output respectively, wherein, a data block writes a First Input First Output;
Optionally, the N number of data block after a business datum cutting can be write in N number of First Input First Output respectively simultaneously carry out buffer memory.Wherein, can by any N number of First Input First Output of business datum write, a data block writes in a First Input First Output respectively.Should be understood that, any N number of First Input First Output of this business datum write is mutually related.
104, from First Input First Output, select data block, and insert in time slot corresponding to this First Input First Output, wherein, a First Input First Output corresponds to a time slot.
The corresponding time slot of each First Input First Output, the data block in all write First Input First Outputs can write in the time slot corresponding with First Input First Output.Optionally, can will from First Input First Output, select data block to insert in time slot corresponding to this First Input First Output simultaneously.
Optionally, in same First Input First Output, specifically can in the following manner data block be inserted in a time slot:
The first, in normal write situation, take out a byte at interval of N number of byte and insert in the time slot corresponding with First Input First Output.
If the second business datum increases P the time slot taken, then take out a byte at interval of N+P byte and insert in time slot corresponding to First Input First Output;
If the 3rd business datum reduces by Q the time slot taken, then take out a byte at interval of N-Q byte and insert in time slot corresponding to First Input First Output.
As from the foregoing, the time slot cutting that first the present embodiment can take according to business datum is N number of data block, wherein, N equals the number of the time slot that business datum takies, then each data block of cutting is write a First Input First Output respectively, and each data block is inserted in a time slot corresponding with First Input First Output, the logical resource of business datum can be optimized, improve the utilance of resource, reduce power consumption.
Embodiment two
In order to better understand such scheme, technical solution of the present invention will be described in detail below.Wherein, for convenience, the present embodiment is 32 bytes with bus data bit wide, has at most 32 passages in data buffer area, can buffer memory 32 business datums be that example is described in detail at most.Wherein, the angle of the mapping device with business datum is described in detail by the embodiment of the present invention, and as shown in Figure 3, idiographic flow can be as follows:
201, from the business datum of multiple passage, read the business datum of a passage; Such as, specifically can be as follows:
Concrete, in the present embodiment, mapping device can read the business datum of one of them passage in the business datum of multiple passage, in order to ensure that the business datum write in First Input First Output can not stop, needs to select first read which business datum.
Such as, the business datum of a passage specifically can be read in the following manner from the business datum of multiple passage:
Mode one, can the waterline size of First Input First Output that writes of the business datum of more multiple passage:
Should be understood that, a business datum is had in the passage of each data buffer zone, the number of time slots that the business datum of each passage can take according to it writes in First Input First Output, wherein, the First Input First Output of the business datum write of each passage is different, wherein, the First Input First Output of the business datum write of same passage is mutually related.
The relatively waterline size of the First Input First Output that the business datum of multiple passages of input is corresponding: the waterline size of the First Input First Output that the business datum of this multiple passage writes is unequal, then read the business datum of passage corresponding to the First Input First Output minimum with waterline; If the waterline equal and opposite in direction of the First Input First Output that the business datum of this multiple passage is corresponding, then judge the amount of bandwidth of the business datum of this multiple passage, and the business datum that preferential reading bandwidth is larger.
Mode two, can the waterline state of First Input First Output corresponding to the business datum of multiple passages of poll input:
When the waterline state of the First Input First Output that the business datum being polled to these passages writes is in non-full state, read with write the business datum of passage corresponding to the First Input First Output that is in non-full state.
Concrete, in order to improve multiple passage business datum in read the reading efficiency of the business datum of a passage, the poll chance of business datum can be increased.Such as, can increase export in data buffer area, provide multiple outlet to allow buffer memory business datum in the channel export.Such as, A and B two outlet can be set in data buffer area.If there be k business datum in data buffer area, then A and B outlet respectively can a poll k/2 business datum, and the business datum of occupying n time slot occupies 2 ∧ (ceil (ln (n)/ln (2))) secondary chance in a polling procedure.Such as, a business datum accounts for 15 time slots, another business datum accounts for 17 time slots, the business datum of 15 time slots occupies 16 poll chances, the business datum of 17 time slots occupies 32 poll chances, these two business datums can be distributed in A and B two outlet, read the business datum of these two outlets respectively, write in First Input First Output after carrying out cutting.
202, be N number of data block according to byte number by the business datum cutting of reading, wherein, N equals the number of the time slot that business datum takies;
The present embodiment is that 32 bytes are described in detail for data bit width, and wherein, N can be the integer of 1 to 32.That is, a business datum in the present embodiment can take 1 to 32 time slots.It should be noted that, the concrete value of N is not construed as limiting, specifically can need according to user the value determining N.
In the present embodiment, the bit wide of a business datum is 32 bytes, and when a business datum takies 8 time slots, then can be 8 data blocks by this business datum cutting, what each data block can be average comprises 4 bytes.
203, the data block of cutting is write First Input First Output respectively, wherein, a data block writes a First Input First Output;
N number of data block after a business datum cutting can write in N number of First Input First Output respectively carries out buffer memory.Wherein, can by any N number of First Input First Output of business datum write, a data block writes in a First Input First Output respectively.Should be understood that, any N number of First Input First Output of this business datum write is mutually related, and such as, the waterline size of any N number of First Input First Output of this business datum write is identical.
204, from First Input First Output, select data block, and insert in time slot corresponding to this First Input First Output, wherein, a First Input First Output corresponds to a time slot.
The corresponding time slot of each First Input First Output, the business datum in all write First Input First Outputs can write in the time slot corresponding with First Input First Output.Optionally, can will from First Input First Output, select data block to insert in time slot corresponding to this First Input First Output simultaneously.
Such as, a business datum takies 8 time slots, can be then 8 data blocks by this business datum cutting, each data block be written in the time slot corresponding with First Input First Output, namely from 32 bytes, takes out a byte at interval of 8 bytes and inserts in a time slot.Wherein, when can not be average by 32 bytes write time slots time, in same First Input First Output, according to taking out the principle that a byte inserts in a time slot at interval of N number of byte, data block is inserted in time slot.Should be understood that, a First Input First Output corresponds to a time slot.
Optionally, the byte number write in adjacent time slot is adjacent.Such as, a data block inserts the 8th byte of a time slot, then another data block inserts the 9th byte of another time slot.
The present embodiment can the dynamic change of the number of time slot that takies of supporting business data, ensures that business datum can't harm.Optionally, in same First Input First Output, specifically can in the following manner each data block be inserted respectively in time slot corresponding to First Input First Output:
The first, in normal write situation, take out a byte at interval of N number of byte and insert in the time slot corresponding with First Input First Output:
Such as, a business datum accounts for a, b, c, d, e, f and g and has 7 time slots altogether, be then 7 data blocks by this business datum cutting, so, from 32 bytes, take out a byte at interval of 7 bytes insert a time slot, from a time slot get byte next byte take out a byte and insert b time slot, by that analogy.Specifically can consult table one, in table, thickened portion is the byte of this time slot of write:
Table one
As seen from the above table, the 1st of this data block the, 8,15,22 and 29 bytes are taken out and inserts in a time slot, 2,9,16,23 and 30 bytes are taken out and inserts in b time slot, the 3rd, 10,17,24 and 31 bytes are taken out and inserts in c time slot, by that analogy.
If the second business datum increases P the time slot taken, then take out a byte at interval of N+P byte and insert in time slot corresponding to First Input First Output:
Such as, a business datum accounts for a, b, c, d and e before the handover and has 5 time slots altogether, be then 5 data blocks by this business datum cutting, so, from 32 bytes, take out a byte at interval of 5 bytes insert a time slot, from a time slot get byte next byte take out a byte and insert b time slot, by that analogy.If but add d and e two time slots in the position of the 16th byte, the First Input First Output that now d and e two time slots are corresponding can write this business datum in any moment before time slot switches, ensure that each First Input First Output belonging to this business datum is identical when switching.After switching from the position of byte increasing time slot, take out a byte at interval of 5 bytes and become every 7 bytes and take out a byte.Specifically can consult table two, in table, thickened portion is the byte of this time slot of write:
Table two
As seen from the above table, the 1st of this data block, 6,11,16,23 and 30 bytes being taken out inserts in a time slot, 2,7,12,17,24 and 31 bytes being taken out inserts in b time slot, 3rd, 8,13,18,25 and 32 bytes being taken out inserts in c time slot, 19th and 26 bytes being taken out inserts in d time slot, 20th and 27 bytes being taken out inserts in e time slot, the 4th, 9,14,21 and 28 bytes is taken out and inserts in f time slot, the 5th, 10,15,22 and 29 bytes is taken out and inserts in g time slot.
If the 3rd business datum reduces by Q the time slot taken, then take out a byte at interval of N-Q byte and insert in time slot corresponding to First Input First Output:
Such as, a business datum accounts for a, b, c, d, e, f and g before the handover and has 7 time slots altogether, be then 7 data blocks by this business datum cutting, so, from 32 bytes, take out a byte at interval of 7 bytes insert a time slot, from a time slot get byte next byte take out a byte and insert b time slot, by that analogy.If but decrease d and e two time slots in the position of the 15th byte, the First Input First Output that now d and e two time slots are corresponding can stop this business datum of write in any moment after time slot switches, ensure that each First Input First Output belonging to this business datum is identical before the handover.After switching from the position of byte of reducing time slot, take out a byte at interval of 7 bytes and become every 5 bytes and take out a byte.Specifically can consult table three, in table, thickened portion is the byte of this time slot of write:
Table three
As seen from the above table, 1st, 8,15,20,25 and 30 bytes being taken out inserts in a time slot, 2,9,16,21,26 and 31 bytes being taken out inserts in b time slot, 3rd, 10,17,22,27 and 32 bytes being taken out inserts in c time slot, 4th and 11 bytes being taken out inserts in d time slot, 5th and 12 bytes being taken out inserts in e time slot, the 6th, 13,18,23 and 28 bytes is taken out and inserts in f time slot, the 7th, 14,19,24 and 29 bytes taken out and insert in g time slot.
As from the foregoing, the present invention adopts reading business datum; Be N number of data block by the business datum cutting of reading, wherein, N equals the number of the time slot that business datum takies; The data block of cutting is write First Input First Output respectively, and wherein, a data block writes a First Input First Output; From First Input First Output, select data block, and insert in time slot corresponding to First Input First Output, wherein, a First Input First Output corresponds to a time slot.The present embodiment due to the time slot cutting that first can take according to business datum be N number of data block, wherein, N equals the number of the time slot that business datum takies, then each data block of cutting is write a First Input First Output respectively, and each data block is inserted in a time slot corresponding with First Input First Output, can the dynamic change of the number of time slot that takies of supporting business data, guarantee business datum can't harm, can maximum using First Input First Output, reduce the burden of time slot, the logical resource of business datum can be optimized, improve the utilance of resource, non-controllable risk is low, and reduce power consumption.
Embodiment three
In order to better realize technique scheme, present invention also offers a kind of mapping device of business datum.Wherein, refer to Fig. 4, this device specifically can comprise: read module 301, cutting module 302, writing module 303 and selection insert module 304:
Read module 301, for reading business datum;
Cutting module 302, the business datum cutting for being read by read module 301 is N number of data block, and wherein, N equals the number of the time slot that business datum takies;
Writing module 303, for the data block after cutting module 302 cutting is write First Input First Output respectively, wherein, a data block writes a First Input First Output;
Select insert module 304, write First Input First Output respectively for data block, wherein, a data block writes a First Input First Output, and inserts in time slot corresponding to First Input First Output, and wherein, a First Input First Output corresponds to a time slot.
Optionally, read module 301 is for reading the business datum of a passage in the business datum from multiple passage.
Optionally, read module 301, the waterline size of the First Input First Output that the business datum specifically for more multiple passage writes; If waterline size is unequal, then read the business datum of passage corresponding to the First Input First Output minimum with write waterline, if waterline equal and opposite in direction, then judge the amount of bandwidth of the business datum of the multiple passages inputted, and the business datum that preferential reading bandwidth is larger.
Concrete, read module 301, the waterline state of the concrete first dequeue also write for the business datum of the multiple passage of poll, when the waterline state being often polled to First Input First Output is in non-full state, read with write the business datum of passage corresponding to the First Input First Output that is in non-full state.
Optionally, divide module 302, for being N number of data block according to byte number by the business datum cutting of reading;
Optionally, in same First Input First Output, select insert module 304, insert in the time slot corresponding with First Input First Output specifically for taking out a byte at interval of N number of byte; If this business datum increases P time slot, insert module 304 is selected to insert in time slot corresponding to First Input First Output specifically for the data block of each write First Input First Output is taken out a byte at interval of N+P byte; If this business datum reduces by Q time slot, insert module 304 is selected to insert in time slot corresponding to First Input First Output specifically for the data block of each write First Input First Output is taken out a byte at interval of N-Q byte.
It should be noted that, concrete, multichannel business datum in the present embodiment is buffered in the BUF of data buffer area, read module 301, cutting module 302 and writing module 303 are specifically as follows time division multiplexing (TDM, Time Division Multiplex), insert module 304 is selected to be specifically as follows multiplexer (MUX, MUltipleXer).
It should be noted that, concrete enforcement see above-described embodiment, can repeat no more herein.
As from the foregoing, the present invention adopts read module 301 to read business datum, be N number of data block by cutting module 302 by the business datum cutting of reading, wherein, N equals the time slot that business datum takies, then First Input First Output is write respectively by the data block of writing module 303 just cutting, wherein, a data block writes a First Input First Output, from First Input First Output, data block is selected again by selection insert module 304, and insert in time slot corresponding to First Input First Output, the present embodiment can maximum using First Input First Output, reduce the burden of time slot, the logical resource of business datum can be optimized, improve the utilance of resource, non-controllable risk is low, and reduce power consumption.
Embodiment four
Technical scheme for a better understanding of the present invention, be described in detail with a concrete application examples below, wherein, the present embodiment is 32 bytes with bus data bit wide, and there are 32 business datums at most in data buffer area is that example is described in detail.Refer to Fig. 1 to 5:
Wherein, refer to Fig. 5, multiple business datum inputted in the BUF of data buffer area by time-shared bus localbus, BUF presses passage buffer memory and multiple business datum, and a business datum is buffered in a BUF passage, is labeled as 0 to 31 passages respectively.Wherein, the business datum of a passage according in the number of time slots write First Input First Output FIFO taken, can be respectively #0 to #31FIFO, and wherein, a corresponding time slot of FIFO, is respectively TS0 to TS31.
Such as, 2 business datums are inputted by time-shared bus, business datum 1 and business datum 2 are buffered in passage 1 and 2 by BUF respectively, and time division multiplexing (TDM, Time Division Multiplex) is selected preferably to read business datum 1 or business datum 2 by pre-defined rule.
First, can determine that these two business datums take the First Input First Output of several time slot and write respectively, as business datum 1 takies 2 time slots, be respectively TS0 and TS1, business datum 2 takies 4 time slots, be respectively TS2, TS3, TS4 and TS5, then confirm that the First Input First Output that business datum 1 writes is #0FIFO and #1FIFO, the First Input First Output that business datum 2 writes is #2FIFO, #3FIFO, #4FIFO and #5FIFO.
Then the waterline size of any one is compared in #0FIFO and #1FIFO in any one waterline size and #2FIFO, #3FIFO, #4FIFO and #5FIFO, as can by comparing #1FIFO and #3FIFO, if the waterline of #1FIFO is greater than the waterline of #3FIFO, then preferably read business datum 1.
TDM reads this business datum 1, and be 2 data blocks by this business datum cutting of reading, by buffer memory in 2 data block write #0FIFO and #1FIFO of this after cutting, then the numeral of 1 is selected to select logic (MUX, MUltipleXer) read block by this data block by byte insertion time slot TS0 and TS1 from FIFO by 32.
Wherein, the data block in #0FIFO is taken out a byte at interval of 2 bytes and inserts in time slot TS0, the data block in #1FIFO is taken out a byte at interval of 2 bytes and inserts in time slot TS 1.Such as, by the 1st of business datum 1 the, 3,5......31 byte inserts TS0, by 2,4,6......32 byte inserts in TS1.
Wherein, TDM also will read the business datum 2 being buffered in 2 passages simultaneously according to above-mentioned principle.
As from the foregoing, the present embodiment can maximum using First Input First Output, and reduce the burden of time slot, can optimize the logical resource of business datum, improve the utilance of resource, non-controllable risk is low, and reduces power consumption.
Embodiment five
The invention provides a kind of de-mapping method of business datum, wherein, the angle of the demapping device with business datum is described in detail by the embodiment of the present invention, for convenience, below by the demapping device of this business datum referred to as demapping device.
A de-mapping method for business datum, comprising: determine the N number of time slot belonging to business datum, business datum comprises N number of data block, and each data block is deposited in one time slot; Read block from N number of time slot respectively; The data block read from time slot write in N number of First Input First Output, wherein, a First Input First Output corresponds to a time slot; Read block from N number of First Input First Output, is combined into business datum.
As shown in Figure 6, idiographic flow can be as follows:
501, determine the N number of time slot belonging to business datum, business datum comprises N number of data block, and each data block is deposited in one time slot; Such as, specifically can be as follows:
In the mapping process of business datum, a business datum is inserted in N number of time slot, then to business datum demapping, first determine N number of time slot that this business datum is inserted.Wherein, each business datum is split as N number of data block according to the number of time slots inserted, and each data block is stored in one time slot.
Such as, determine that a business datum takies 4 time slots, be respectively TS0, TS1, TS2 and TS3, in these 4 time slots, have a data block respectively.
Optionally, data block is deposited in a slot according to byte.Wherein, in same time slot, data block has a byte to deposit at interval of N number of byte specifically can to consult above-described embodiment in a slot, repeat no more herein.
502, read block from N number of time slot respectively;
N can be the integer of 1 to 32.Should be understood that, a business datum can take 1 to 32 time slots, is not construed as limiting the concrete value of N, specifically can need according to user the value determining N.
Such as, a business datum takies 4 time slots, then can read block from these 4 time slots that business datum takies respectively.
Optionally, the byte of read block from N number of time slot simultaneously can be distinguished.
503, write in N number of First Input First Output by the data block read from time slot, wherein, a First Input First Output corresponds to a time slot; Such as, specifically can be as follows:
Optionally, can the data block read from time slot be write in N number of First Input First Output simultaneously.
Such as, a business datum takies 4 time slots, is respectively TS0, TS1, TS2 and TS3, then 4 data blocks that this business datum comprises write in these 4 time slots respectively, can simultaneously read block from these 4 time slots, and insert in the First Input First Output corresponding with time slot with these 4.
Optionally, if the time slot belonging to business datum increases P, then, in same time slot, data block has a byte to deposit in a slot at interval of N+P byte; If the time slot belonging to business datum reduces by Q time slot, then, in same time slot, data block has a byte to deposit in a slot at interval of N-Q byte
Wherein, the enforcement of the mapping method of concrete enforcement and business datum in like manner, specifically can be consulted above-described embodiment, repeat no more herein.
504, read block from N number of First Input First Output, is combined into business datum.
Such as, 4 data blocks can be read respectively from 4 First Input First Outputs simultaneously, then these 4 data blocks are combined into a business datum, and stored in a passage of data buffer area, the demapping of finishing service data.
Wherein, Fig. 7 can be consulted, Fig. 7 is in an embody rule of the demapping of business datum in the present embodiment, it should be noted that, the treatment system of business datum specifically implement with the embodiment of the mapping method of business datum in like manner, specifically see the embodiment of the mapping method of business datum, can repeat no more herein.
As from the foregoing, the present invention adopts the N number of time slot determined belonging to business datum, business datum comprises N number of data block, each data block is deposited in one time slot, respectively read block from N number of time slot, the data block read is write in N number of First Input First Output from time slot, wherein, a First Input First Output corresponds to a time slot, and read block from N number of First Input First Output, is combined into business datum.The embodiment of the present invention can maximum using First Input First Output, and reduce the burden of time slot, can optimize the mapping logic resource of business datum, improve the utilance of resource, non-controllable risk is low.
Embodiment six
In order to better realize technique scheme, present invention also offers a kind of mapping device of business datum.Wherein, refer to Fig. 8, this device specifically can comprise: determination module 601, read module 602, writing module 603 and composite module 604:
Determination module 601, for determining the N number of time slot belonging to business datum, business datum comprises N number of data block, and each data block is deposited in one time slot;
Read module 602, for read block from N number of time slot respectively;
Writing module 603, the data block for being read from time slot by read module writes in N number of First Input First Output, and wherein, a First Input First Output corresponds to a time slot;
Composite module 604, for read block from N number of First Input First Output, is combined into business datum.
Optionally, data block is deposited in a slot according to byte.
Optionally, in same time slot, writing module 603, specifically for having a byte to deposit in a slot at interval of N number of byte data block; If the time slot belonging to business datum increases P, then, in same time slot, data block has a byte to deposit in a slot at interval of N+P byte; If the time slot belonging to business datum reduces by Q time slot, then, in same time slot, data block has a byte to deposit in a slot at interval of N-Q byte.
It should be noted that, concrete, read module 602 in the present embodiment, writing module 603 are specifically as follows multiplexer (MUX, MUltipleXer), composite module 604 is specifically as follows time division multiplexing (TDM, Time Division Multiplex), the business datum after combination can be buffered in the passage of data buffer area BUF.
It should be noted that, concrete enforcement see above-described embodiment, can repeat no more herein.
As from the foregoing, N number of time slot that the present invention adopts determination module 601 to determine belonging to business datum, business datum comprises N number of data block, and each data block is deposited in one time slot; Read module 602 is read block from N number of time slot respectively; The data block that read module reads by writing module 603 from time slot writes in N number of First Input First Output, and wherein, a First Input First Output corresponds to a time slot; Composite module 604 is read block from N number of First Input First Output, is combined into business datum.The present embodiment can maximum using First Input First Output, and reduce the burden of time slot, can optimize the mapping logic resource of business datum, improve the utilance of resource, non-controllable risk is low.
Embodiment seven,
The present embodiment additionally provides a kind for the treatment of system of business datum, refers to Fig. 9, and the present embodiment specifically can comprise: mapping device 702 conciliate by mapping device 701.
Mapping device 701, for reading business datum; Be N number of data block by the business datum cutting of reading, wherein, N equals the number of the time slot that business datum takies; The data block of cutting is write First Input First Output respectively, and wherein, a data block writes a First Input First Output; From First Input First Output, select data block, and insert in time slot corresponding to First Input First Output, wherein, a First Input First Output corresponds to a time slot.
Demapping device 702, for determining the N number of time slot belonging to business datum, business datum comprises N number of data block, and each data block is deposited in one time slot; Read block from N number of time slot respectively; The data block read from time slot write in N number of First Input First Output, wherein, a First Input First Output corresponds to a time slot; Read block from N number of First Input First Output, is combined into business datum.
It should be noted that, concrete enforcement see above-described embodiment, can repeat no more herein.
Above the mapping of a kind of business datum provided by the present invention and de-mapping method and relevant apparatus are described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for those skilled in the art, according to the thought of the embodiment of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (21)

1. a mapping method for business datum, is characterized in that, comprising:
Read business datum;
Be N number of data block by the business datum cutting of described reading, wherein, described N equals the number of the time slot that described business datum takies;
N number of data block of cutting is write N number of First Input First Output respectively, and wherein, a data block writes a First Input First Output;
From described First Input First Output, select data block, and insert in time slot corresponding to described First Input First Output, wherein, a described First Input First Output corresponds to a time slot.
2. method according to claim 1, is characterized in that, described reading business datum, specifically comprises:
The business datum of a passage is read from the business datum of multiple passage.
3. method according to claim 2, is characterized in that, the described business datum reading a passage from the business datum of multiple passage, is specially:
The waterline size of the First Input First Output that the business datum of more described multiple passage writes;
If described waterline size is unequal, then read the business datum of passage corresponding to the First Input First Output minimum with write waterline;
If described waterline equal and opposite in direction, then judge the amount of bandwidth of the business datum of described multiple passage, and the business datum that preferential reading bandwidth is larger.
4. method according to claim 2, is characterized in that, reads the business datum of a passage, be specially in the business datum of described multiple passage:
The waterline state of the First Input First Output that described in poll, the business datum of multiple passage writes;
When the waterline state being often polled to described First Input First Output is in non-full state, read with write the business datum of passage corresponding to the First Input First Output that is in non-full state.
5. method according to any one of claim 1 to 4, is characterized in that, the described business datum cutting by described reading is N number of data block, specifically comprises:
Be N number of data block according to byte number by the business datum cutting of described reading.
6. method according to claim 5, is characterized in that,
In same First Input First Output, take out a byte at interval of N number of byte and insert in the time slot corresponding with described First Input First Output.
7. method according to claim 6, is characterized in that,
If described business datum increases P the time slot taken, then take out a byte at interval of N+P byte and insert in the time slot corresponding with described First Input First Output;
If described business datum reduces by Q the time slot taken, then take out a byte at interval of N-Q byte and insert in the time slot corresponding with described First Input First Output.
8. a de-mapping method for business datum, is characterized in that, comprising:
Determine the N number of time slot belonging to business datum, described business datum comprises N number of data block, and each data block is deposited in one time slot;
Read block from described N number of time slot respectively;
Write in N number of First Input First Output by the N number of data block read from time slot, wherein, a First Input First Output corresponds to a time slot;
Read block from described N number of First Input First Output, is combined into business datum.
9. method according to claim 8, is characterized in that,
Described data block leaves in described time slot according to byte;
In same time slot, described data block has a byte to leave in described time slot at interval of N number of byte.
10. method according to claim 9, is characterized in that,
From described N number of time slot, read the byte of described data block respectively simultaneously, and the data block read from time slot is write in N number of First Input First Output simultaneously.
11. methods according to claim 9 or 10, is characterized in that,
If the time slot belonging to described business datum increases P, then, in same time slot, described data block has a byte to leave in described time slot at interval of N+P byte;
If the time slot belonging to described business datum reduces by Q time slot, then, in same time slot, described data block has a byte to leave in described time slot at interval of N-Q byte.
The mapping device of 12. 1 kinds of business datums, is characterized in that, comprising:
Read module, for reading business datum;
Cutting module, the business datum cutting for being read by described read module is N number of data block, and wherein, described N equals the number of the time slot that described business takies;
Writing module, for the N number of data block after the cutting of described cutting module is write N number of First Input First Output respectively, wherein, a data block writes a First Input First Output;
Selecting insert module, for selecting data block from First Input First Output, and inserting in time slot corresponding to described First Input First Output, wherein, a described First Input First Output corresponds to a time slot.
13. devices according to claim 12, is characterized in that,
Described read module reads the business datum of a passage from the business datum of multiple passage.
14. devices according to claim 13, is characterized in that,
Described read module, the waterline size of the First Input First Output that the business datum specifically for more described multiple passage writes;
If described waterline size is unequal, then read the business datum of passage corresponding to the First Input First Output minimum with write waterline, if described waterline equal and opposite in direction, then judge the amount of bandwidth of the business datum of described multiple passage, and the business datum that preferential reading bandwidth is larger.
15. devices according to claim 13, is characterized in that,
Described read module, specifically for the waterline state of the first dequeue that the business datum of passage multiple described in poll writes, when the waterline state being often polled to described First Input First Output is in non-full state, read with write the business datum of passage corresponding to the First Input First Output that is in non-full state.
16. devices according to claim 12, is characterized in that,
Described cutting module, specifically for being N number of data block according to byte number by the business datum cutting of described reading;
Wherein, in same First Input First Output, take out a byte at interval of N number of byte and insert in the time slot corresponding with described First Input First Output.
17. devices according to claim 16, is characterized in that,
Described selection insert module, if increase P the time slot taken specifically for described business datum, described selection insert module is taken out a byte at interval of N+P byte and is inserted in the time slot corresponding with described First Input First Output; If described business datum reduces by Q the time slot taken, described selection insert module is taken out a byte at interval of N-Q byte and is inserted in the time slot corresponding with described First Input First Output.
The demapping device of 18. 1 kinds of business datums, is characterized in that, comprising:
Determination module, for determining the N number of time slot belonging to business datum, described business datum comprises N number of data block, and each data block is deposited in one time slot;
Read module, for read block from described N number of time slot respectively;
Writing module, the N number of data block for being read from time slot by described read module writes in N number of First Input First Output, and wherein, a First Input First Output corresponds to a time slot;
Composite module, for read block from described N number of First Input First Output, is combined into business datum.
19. devices according to claim 18, is characterized in that,
Described data block leaves in described time slot according to byte;
In same time slot, described data block has a byte to leave in described time slot at interval of N number of byte.
20. devices according to claim 19, is characterized in that,
Said write module, if increase P specifically for the time slot belonging to described business datum, then, in same time slot, described data block has a byte to leave in described time slot at interval of N+P byte;
If the time slot belonging to described business datum reduces by Q time slot, then, in same time slot, described data block has a byte to leave in described time slot at interval of N-Q byte.
The treatment system of 21. 1 kinds of business datums, is characterized in that, comprising:
The demapping device of the mapping device of the business datum according to any one of claim 12 to 17 and the business datum according to any one of claim 18 to 20.
CN201210338397.6A 2012-09-13 2012-09-13 Methods and related devices for mapping and demapping service data Active CN102882627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210338397.6A CN102882627B (en) 2012-09-13 2012-09-13 Methods and related devices for mapping and demapping service data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210338397.6A CN102882627B (en) 2012-09-13 2012-09-13 Methods and related devices for mapping and demapping service data

Publications (2)

Publication Number Publication Date
CN102882627A CN102882627A (en) 2013-01-16
CN102882627B true CN102882627B (en) 2015-05-13

Family

ID=47483796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210338397.6A Active CN102882627B (en) 2012-09-13 2012-09-13 Methods and related devices for mapping and demapping service data

Country Status (1)

Country Link
CN (1) CN102882627B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931833A (en) * 2009-06-25 2010-12-29 中兴通讯股份有限公司 Device and method for realizing demapping of optical channel data unit
CN101938454A (en) * 2009-06-30 2011-01-05 中兴通讯股份有限公司 Mapping device and method for optical transport data units
CN102316391A (en) * 2011-09-08 2012-01-11 中兴通讯股份有限公司 Data mapping method, data de-mapping method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931833A (en) * 2009-06-25 2010-12-29 中兴通讯股份有限公司 Device and method for realizing demapping of optical channel data unit
CN101938454A (en) * 2009-06-30 2011-01-05 中兴通讯股份有限公司 Mapping device and method for optical transport data units
CN102316391A (en) * 2011-09-08 2012-01-11 中兴通讯股份有限公司 Data mapping method, data de-mapping method and system

Also Published As

Publication number Publication date
CN102882627A (en) 2013-01-16

Similar Documents

Publication Publication Date Title
KR102030787B1 (en) Method and apparatus for providing flexible Ethernet service over optical transport network
CN100589365C (en) Method for time slot partition and overhead processing of optical payload unit in light transmission network
CN101317353B (en) Clock recovery device and method
WO2021207919A1 (en) Controller, storage device access system, electronic device and data transmission method
EP2908251B1 (en) Method and device for processing data
CN105451102A (en) Method for processing signals, network device, and system
CN101610430B (en) Method and device for realizing cross scheduling of ODUk
CN110649986B (en) Service transmission method, device, equipment and storage medium using flexible optical network
CN103530245A (en) SRIO interconnection exchanging device based on field programmable gate array (FPGA)
CN105656807A (en) Network chip multi-channel data transmission method and transmission device
CN103718515A (en) Transmission device, connecting mechanism and method
US20070089030A1 (en) Configurable bandwidth allocation for data channels accessing a memory interface
CN101719869B (en) Method and device for dynamically allocating bandwidth by adopting associated token bucket algorithm
CN103117962B (en) A kind of spaceborne Shared memory switch device
CN101094176A (en) Method and device for processing multichannel data
CN102223721B (en) Channel assignment method and device for downlink temporary block stream
CN102882627B (en) Methods and related devices for mapping and demapping service data
CN102257834B (en) Bit width conversion method from time division to space division of otn optical transport network backplane and backplane
EP2775638A2 (en) Sub-rate mapping for lowest-order optical data unit
CN104468156A (en) Method for saving resource overhead through time slot arbitration, and device
CN103561359B (en) The multiplexing method of a kind of Optical Channel Data Unit-k and device
CN102118304B (en) Cell switching method and cell switching device
CN101426153A (en) Switching circuit and switching method
CN105930286B (en) A kind of use is in the time-dividing storage circuit structure of OTN packet switch capable chip interiors
CN103368832A (en) Hybrid switching network time slot assignment method based on sliding windows

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant