WO2015100621A1 - 一种加扰方法及加扰装置 - Google Patents

一种加扰方法及加扰装置 Download PDF

Info

Publication number
WO2015100621A1
WO2015100621A1 PCT/CN2013/091126 CN2013091126W WO2015100621A1 WO 2015100621 A1 WO2015100621 A1 WO 2015100621A1 CN 2013091126 W CN2013091126 W CN 2013091126W WO 2015100621 A1 WO2015100621 A1 WO 2015100621A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
scrambling
data segment
circuit
ethernet frame
Prior art date
Application number
PCT/CN2013/091126
Other languages
English (en)
French (fr)
Inventor
陈志强
王童童
李长松
李志军
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201380003211.4A priority Critical patent/CN105009540B/zh
Priority to PCT/CN2013/091126 priority patent/WO2015100621A1/zh
Priority to EP13900689.4A priority patent/EP3079324B1/en
Publication of WO2015100621A1 publication Critical patent/WO2015100621A1/zh
Priority to US15/199,707 priority patent/US9716605B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L25/00Baseband systems
    • H04L25/02Details ; arrangements for supplying electrical power along data transmission lines
    • H04L25/03Shaping networks in transmitter or receiver, e.g. adaptive shaping networks
    • H04L25/03828Arrangements for spectral shaping; Arrangements for providing signals with specified spectral properties
    • H04L25/03866Arrangements for spectral shaping; Arrangements for providing signals with specified spectral properties using scrambling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0058Allocation criteria
    • H04L5/0064Rate requirement of the data, e.g. scalable bandwidth, data priority

Definitions

  • the present invention relates to the field of communications, and in particular, to a scrambling method and a scrambling device. Background technique
  • Ethernet frame stream is also referred to as a Media Access Control (MAC) stream.
  • MAC Media Access Control
  • the channel resource originally belonging to the fixed 400 Gigabit Ethernet (Gigabit ethernet, GE for short) interface can be used to carry 1 channel 400GE, 1 channel 300GE+1 channel 100GE, 2 channel 200GE, 4 channel 100GE, 8 channels. 50GE or 16 way 25GE traffic.
  • the bandwidth of the Ethernet interface of the receiver is fixed.
  • the bandwidth can also be referred to as the rate.
  • the rate of a 100GE interface is 100 gigabits per second (English: g i gab i t per second ).
  • the rate of the 40GE interface is 40 Gigabits per second.
  • Embodiments of the present invention provide a scrambling method and a scrambling device for performing data scrambling on a flexible Ethernet.
  • a method of scrambling including:
  • X data segments wherein the X data segments are data segments of the first Ethernet frame stream in the first clock cycle, and the number of bits in each of the X data segments is M, and M is greater than An integer of 1 , X is a positive integer;
  • Y data segments wherein the data segments are data segments of the second Ethernet frame stream of the first clock cycle, and the number of bits of each data segment in the one data segment is ⁇ , ⁇ is positive An integer;
  • a plurality of X input data are respectively distributed to the X scrambling circuits, wherein the X scrambling circuits correspond to the X input data;
  • the X scrambling circuits respectively calculate the scrambling results of the X data segments according to the X input data and according to the scrambling polynomial, the X data segments and the X scrambling circuits-
  • each scrambling circuit of the X scrambling circuits is configured to calculate a scrambling result of a binary sequence of bits ⁇ in parallel;
  • the one scrambling circuit respectively uses the one input data and calculates a scrambling result of the one data segment in parallel according to the scrambling polynomial, the one data segment and the one scrambling circuit -
  • each scrambling circuit of the one scrambling circuit is configured to calculate the scrambling result of the binary sequence of bits ⁇ in parallel.
  • the X data segments include a first data segment to an Xth data segment, where the X data segments are carried in the first Ethernet clock of the first clock cycle.
  • the order of the positions in the network frame stream is sequentially the first data segment to the X data segment;
  • distributing the X input data to the X scrambling circuits respectively comprising: distributing the first input data to the ith scrambling circuit, where a is a value from 1 to an integer in X;
  • the distributing the first input data to the ith scrambling circuit includes:
  • the first input data includes the first data and the second data
  • the a-th scramble circuit includes the first a calculation circuit, the second calculation circuit, and a third calculation circuit
  • the first data includes the first data segment to the a-th data segment
  • the second data includes a first Ethernet frame of a second clock cycle
  • the last N bits of the scrambling result of the stream, N is the order of the scrambling polynomial
  • the second clock cycle is the last clock cycle of the first clock cycle
  • the X scrambling circuits respectively calculate the scrambling results of the X data segments according to the X input data and according to the scrambling polynomial
  • the method includes: the a-th scrambling circuit uses the a-th input data Calculating a scrambling result of the a-th data segment in parallel according to the scrambling polynomial;
  • the a-th scrambling circuit calculates the scrambling result of the a-th data segment by using the first input data and calculating the scrambling polynomial in parallel according to the scrambling polynomial, including:
  • the first calculation circuit performs an exclusive OR calculation on all relevant bits of each bit of the a-th data segment in the first data to obtain a first result of each bit of the a-th data segment;
  • the second calculation circuit for performing an XOR calculation of all the bits of each bit of the second data of a data segment to obtain a second result for each bit of a second of said data segments;
  • the third calculation circuit performs an exclusive OR calculation on the first result and the second result of each bit of the a-th data segment to obtain a scrambled result for each bit of the a-th data segment.
  • the Y data segments include an X+1 data segment to an X+Y data segment, where And the Y data segments are sequentially carried in the second Ethernet frame stream of the first clock cycle in the order of the X+1 data segment to the X+Y data segment;
  • Distributing the Y input data to the Y scrambling circuits respectively includes: distributing the X+b input data to the X+b scrambling circuit, where b is a value from 1 to Y;
  • the distributing the X+b input data to the X+b scrambling circuit includes:
  • the fourth calculation circuit, the fifth calculation circuit, and the sixth calculation circuit respectively use the one input data and calculate the scrambling result of the one data segment in parallel according to the scrambling polynomial, including: the X+b scrambling circuit uses the The X+b input data calculates a scrambling result of the X+b data segment in parallel according to the scrambling polynomial;
  • the X+b scrambling circuit calculates the scrambling result of the X+b data segment in parallel according to the scrambling polynomial by using the X+b input data, and includes:
  • the fourth calculation circuit performs an exclusive OR calculation on all relevant bits of each bit of the X+b data segment in the third data to obtain a bit of each bit of the X+b data segment a result
  • the fifth calculating circuit performs an exclusive OR calculation on all relevant bits of each bit of the X+b data segment in the fourth data to obtain a bit of each bit of the X+b data segment Two results;
  • the sixth calculation circuit performs an exclusive OR calculation on the first result and the second result of each bit of the X+bth data segment to obtain a scrambled result for each bit of the X+bth data segment.
  • the third data includes a quantity of bits (X+b) ⁇ ⁇ , and a high bx of the third data
  • the M bit is equal to the first binary sequence
  • the first binary sequence includes b data segments
  • the b data segments are sequentially in the order of the first binary sequence
  • the data segment is to the X+b data segment.
  • the Y data segments respectively correspond to the Y slice information; the Y slice information is used. And indicating that the Y data segments belong to the second Ethernet frame stream, and are used to indicate a location of each of the Y data segments in the second Ethernet frame stream;
  • the distributing the third data to the fourth computing circuit specifically includes:
  • the X data segments respectively correspond to X slice information;
  • the X slice information is used to indicate that the X data segments belong to the first Ethernet frame stream, and is used to indicate that each of the X data segments is in the first Ethernet frame stream.
  • Positioning the first data to the first computing circuit including:
  • the first information to the Xth information in the X slice information respectively correspond to the first data segment to the X data segment
  • the Xth information is further used to indicate that the Xth data segment is the last data segment in the first Ethernet frame stream;
  • the method further includes:
  • a scrambling device including:
  • a receiving unit configured to receive an Ethernet frame stream of a first clock cycle
  • a first obtaining unit configured to obtain X data segments from the Ethernet frame stream of the first clock cycle received by the receiving unit, where the X data segments are the first Ethernet of the first clock cycle a data segment of the frame stream, the number of bits of each of the X data segments is M, M is an integer greater than 1, and X is a positive integer;
  • a second obtaining unit configured to obtain Y data segments from the Ethernet frame stream of the first clock cycle received by the receiving unit, where the Y data segments are the second Ethernet of the first clock cycle a data segment of the frame stream, wherein the number of bits of each of the Y data segments is M, and Y is a positive integer;
  • a first distribution unit configured to respectively distribute X input data to the X scrambling circuits, where the X scrambling circuits correspond to the X input data;
  • a second distribution unit configured to respectively distribute ⁇ input data to the ⁇ scrambling circuits, where the ⁇ scrambling circuits correspond to the Y input data;
  • the X scrambling circuits are configured to respectively calculate, by using the X input data distributed by the first distribution unit, a scrambling result of the X data segments according to a scrambling polynomial, the X data a segment corresponding to the X scrambling circuits, each scrambling circuit of the X scrambling circuits being configured to calculate a scrambling result of a binary sequence of bit numbers M in parallel;
  • the Y scrambling circuits are configured to respectively calculate the scrambling results of the ⁇ data segments according to the Y input data distributed by the second distribution unit and according to the scrambling polynomial,
  • the Y data segments correspond to the Y plus 4 circuits, and each of the Y plus 4 circuits is configured to calculate the scrambling results of the binary sequence of bits M in parallel.
  • the X data segments include a first data segment to an Xth data segment, where the X data segments are carried by the first Ethernet in the first clock cycle.
  • the order of the positions in the network frame stream is sequentially the first data segment to the X data segment;
  • the first distribution unit is configured to: distribute the first input data to the ith a scrambling circuit, where a is a value from 1 to an integer in X;
  • the first distribution unit is specifically configured to:
  • the first input data includes the first data and the second data
  • the a-th scramble circuit includes the first a calculation circuit, the second calculation circuit, and a third calculation circuit
  • the first data includes the first data segment to the a-th data segment
  • the second data includes a first Ethernet frame of a second clock cycle
  • the X scrambling circuits include the a-th scramble circuit, and the a-th scramble circuit is configured to calculate the scrambling of the a-th data segment in parallel according to the scrambling polynomial by using the first input data.
  • the first calculating circuit is configured to perform an exclusive OR calculation on all relevant bits of each bit of the a-th data segment in the first data to obtain a first result of each bit of the a-th data segment ; the second calculation circuit for performing a second exclusive oR calculation for all bits of each bit of the second data of a data segment to obtain each bit of a first data segment Resulting; the third calculating circuit is configured to perform an exclusive OR calculation on the first result and the second result of each bit of the a-th data segment to obtain a scrambled result of each bit of the a-th data segment.
  • the Y data segments include an X+1 data segment to an X+Y data segment, where And the Y data segments are sequentially carried in the second Ethernet frame stream of the first clock cycle in the order of the X+1 data segment to the X+Y data segment;
  • the second distribution unit is configured to: distribute the X+b input data to the X+b scrambling circuit, where b is a value from 1 to Y;
  • the second distribution unit is specifically configured to:
  • the Y scrambling circuits include the X+b scrambling circuit, and the X+b scrambling circuit is configured to calculate the number in parallel according to the scrambling polynomial by using the X+b input data.
  • the fourth calculation circuit is configured to perform an exclusive OR calculation on all relevant bits of each bit of the X+b data segment in the third data to obtain each bit of the X+b data segment First result;
  • the fifth calculating circuit is configured to perform an exclusive OR calculation on all relevant bits of each bit of the X+b data segment in the fourth data to obtain each bit of the X+b data segment Second result;
  • the sixth calculating circuit is configured to perform an exclusive OR calculation on the first result and the second result of each bit of the X+b data segment to obtain scrambling of each bit of the X+b data segment result.
  • the third data includes a quantity of bits (X+b) x M, and a high bx of the third data
  • the M bit is equal to the first binary sequence
  • the first binary sequence includes b data segments
  • the b data segments are sequentially in the order of the first binary sequence
  • the data segment is to the X+b data segment.
  • the Y data segments respectively correspond to Y slice information; And indicating that the Y data segments belong to the second Ethernet frame stream, and are used to indicate a location of each of the Y data segments in the second Ethernet frame stream;
  • the second distribution unit is specifically configured to:
  • the X data segments respectively correspond to X slice information;
  • the X slice information is used to indicate that the X data segments belong to the first Ethernet frame stream, and is used to indicate that each of the X data segments is in the first Ethernet frame stream.
  • the first distribution unit is specifically configured to:
  • the first Ethernet frame stream from the received Ethernet frame stream of the first clock cycle, where the first Ethernet frame stream includes the X data segments; Distributing the first Ethernet frame stream to the first computing circuit.
  • the first information to the Xth information in the X slice information respectively correspond to the first data segment to the X data segment
  • the Xth information is further used to indicate that the Xth data segment is the last data segment in the first Ethernet frame stream;
  • the scrambling device further includes:
  • a storage unit configured to store, according to the Xth information, a scrambling result of the first Ethernet frame stream of the first clock cycle.
  • an apparatus is provided, the apparatus being any one of the following:
  • the PHY can be implemented by an FPGA or an ASIC.
  • the PHY may be a component in a network interface card (NIC), and the NIC may be a line card or a physical interface card (PIC).
  • the PHY may include a Media-Independent Interface (Mi) for connecting to the MAC;
  • a PHY chip the PHY chip may include a plurality of PHYs.
  • the PHY chip can be implemented by an FPGA or an ASIC;
  • system chip may include a plurality of MACs and a plurality of PHYs; the system chip may be implemented by using an FPGA or an ASIC;
  • a multi-port Ethernet device which may be an Ethernet hub, an Ethernet router, or an Ethernet switch.
  • the multi-port Ethernet device includes a plurality of ports, each of which may include a system chip, which may include a MAC and a PHY.
  • the multi-port Ethernet device can also integrate multiple MACs into one MAC chip and integrate multiple ports into one chip.
  • the multi-port Ethernet device can also integrate multiple MACs and multiple PHYs into one system chip.
  • the apparatus is capable of performing the scrambling method provided by the first aspect or any one of the possible implementations of the first aspect.
  • the technical solution provided by the foregoing embodiment of the present invention is relatively easy to apply to a flexible Ethernet scenario.
  • the Ethernet interface of the receiver may need to receive two Ethernet frame streams sent by two Ethernet interfaces.
  • the technical solution of the embodiment of the present invention can add two Ethernet frame streams respectively.
  • the X scrambling circuits can respectively calculate the scrambling results of the X data segments, and the scrambling circuits can respectively calculate the scrambling results of the ⁇ data segments, and the bits of any one of the X data segments include the bits.
  • the number is equal to the number of bits ( ⁇ ) contained in any one of the data segments.
  • the adjusted bit width of each Ethernet frame stream is an integer multiple of ⁇ , and the bit width of the Ethernet frame stream is less than or equal to (X+Y) x M, then the X may be added
  • the scrambling circuit and the Y scrambling circuits are reconfigured to scramble each of the adjusted Ethernet frame streams.
  • FIG. 1 is a schematic diagram of a scrambling method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a scrambling architecture according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a scrambling circuit according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a distribution unit allocating input data for each /c-i circuit in an embodiment of the present invention
  • FIG. 5 is a schematic diagram of data distribution by a distribution unit according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a distribution unit assigning input data to each C/c-srg circuit in an embodiment of the present invention
  • FIG. 7 is a schematic diagram of updating a shift register in an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a scrambling apparatus according to an embodiment of the present invention.
  • 9A and 9B are schematic diagrams showing the structure of the scrambling circuit of Fig. 8. detailed description
  • the technical solution provided by the embodiment of the present invention is relatively easy to apply to a flexible Ethernet scenario.
  • the Ethernet interface of the receiver may need to receive two Ethernet frame streams sent by two Ethernet interfaces.
  • the technical solution provided by the embodiment of the present invention can separately add two Ethernet frame streams.
  • the embodiment of the present invention can be implemented in a Physical Coding Sublayer (PCS) in a physical layer in the Open System Interconnect Reference Model.
  • the physical layer may include an RS (Reconciliation Sublayer), a PC S sublayer, a PMA (Physical Medium Attachment) sublayer, and a PMD (Physical Media Dependent) sublayer.
  • RS Reconciliation Sublayer
  • PMA Physical Medium Attachment
  • PMD Physical Media Dependent
  • the encoded data of the coding module in the PCS sublayer is distributed by the MAC distribution module as a multi-port Ethernet frame stream (such as a sub-MAC stream), and each of the Ethernet channels is respectively at the convergence layer.
  • the network frame stream performs power interference.
  • FIG. 1 is a schematic diagram of a scrambling method according to an embodiment of the present invention.
  • the scrambling method is described by taking an example in which the Ethernet interface of the receiver receives two Ethernet frame streams in one clock cycle.
  • the executive body of the method may be a receiver of a network device.
  • the receiver can include an Ethernet interface.
  • the receiver can be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • the network device may be a router, a network switch, a firewall, a load balancer, a data center, a packet transport network (PTN) device, or a wavelength division multiplexing (WDM). ) device.
  • the scrambling method includes:
  • S101 Receive an Ethernet frame stream of the first clock cycle.
  • this embodiment is described by taking an example in which a receiver receives an Ethernet frame stream through an Ethernet interface.
  • Receiver receives 2 Ethernets in one clock cycle (herein referred to as the first clock cycle) Frame stream.
  • the two Ethernet frame streams are hereinafter referred to as a first Ethernet frame stream and a second Ethernet frame stream.
  • Ethernet interface can include 10 serial/deserializers (English: serdes).
  • SI 02 Obtain X data segments, where the X data segments are data segments of the first Ethernet frame stream of the first clock cycle, and the number of bits of each of the X data segments is M, M is an integer greater than 1, and X is a positive integer; obtaining Y data segments, the Y data segments being data segments of the second Ethernet frame stream of the first clock cycle, and each of the Y data segments The number of bits of the data segment is M, and Y is a positive integer.
  • the first Ethernet frame stream may be sent by the first transmitter through the first serdes to the seventh serdes in the Ethernet interface.
  • the second Ethernet frame stream may be sent by the first transmitter through the eighth serdes to the tenth serdes in the Ethernet interface.
  • the first transmitter may be a transmitter of the first router.
  • the second transmitter may be a transmitter of the second router.
  • the first transmitter and the second transmitter may be two transmitters of the same router.
  • the receiver may receive X data segments through the first serdes to the seventh serdes during the first clock cycle.
  • the receiver may receive Y data segments through the eighth serdes to the tenth serdes during the first clock cycle.
  • X is equal to 7
  • Y is equal to 3.
  • the first Ethernet frame stream includes X data segments
  • the second Ethernet frame stream includes Y data segments
  • the number of bits of each data segment is M.
  • the bit width of the Ethernet frame stream received by the receiver can be the same or different.
  • the bandwidth of the Ethernet interface corresponding to each Ethernet frame stream can be set according to service requirements. Therefore, when the MAC sublayer performs sub-MAC flow (ie, Ethernet frame stream) distribution, the bits of the distributed multiple sub-MAC streams are allocated.
  • the width may not be the same. Therefore, X and Y in this embodiment may be equal or not equal.
  • the bit width of the first Ethernet frame stream is equal to X multiplied by M.
  • the bit width of the second Ethernet frame stream is equal to Y multiplied by M.
  • the rate of the first Ethernet frame stream is equal to the bit width of the first Ethernet frame stream multiplied by the receiver's receive frequency.
  • the rate of the second Ethernet frame stream is equal to the bit width of the second Ethernet frame stream multiplied by the receiver's receiving frequency.
  • the number of bits per data segment can be related to the codec mode used by Flexible Ethernet. For example, when the 64b/66b codec mode is used, the 64-bit data block is the minimum granularity of data processing, so the number of bits per data segment can be specified as 64.
  • the number of data segments included in the first Ethernet frame stream and the second Ethernet frame stream are both positive integers.
  • the data segment is divided by the data segmentation module for the first Ethernet frame stream and the second Ethernet frame stream.
  • the data segmentation module can be a logic circuit.
  • S103 Distributing X input data to the X scrambling circuits respectively, where the X scrambling circuits correspond to the X input data, respectively, and distributing Y input data to the Y scrambling circuits, respectively, the Y The scrambling circuit corresponds to the Y input data.
  • the scrambling circuit corresponds to the data segment.
  • Each scrambling circuit can include three computing circuits.
  • the input data sent to each scrambling circuit may be related to the Ethernet frame stream to which the data segment corresponding to the scrambling circuit belongs and the location of the data segment in the Ethernet frame stream.
  • the S 103 may input corresponding input data to each scrambling circuit through the distribution unit.
  • the distribution unit can be a logic circuit.
  • each scrambling circuit of the X scrambling circuits is configured to calculate a scrambling result of a binary sequence of bit numbers M in parallel;
  • the Y scrambling circuits respectively utilize the Y input data And calculating a scrambling result of the Y data segments in parallel according to the scrambling polynomial, wherein the Y data segments correspond to the Y plus 4 special circuits, and each of the Y plus 4 special circuits
  • the add 4 circuit is configured to calculate the scrambling result of the binary sequence of bits M in parallel.
  • Each scrambling circuit uses the same scrambling polynomial to calculate the scrambling result of the corresponding data segment.
  • Embodiments of the present invention do not limit the scrambling polynomial used by the scrambling circuit.
  • the number of bits in the scrambling result output by each scrambling circuit is M, which is the scrambled result of each bit of the data segment corresponding to the scrambling circuit.
  • the scrambling result of each scrambling circuit output is a binary sequence of M bits.
  • Each scrambling circuit can calculate the scrambling result of the data segment corresponding to the scrambling circuit in parallel, so The scrambling result of each data segment can be obtained in one clock cycle, that is, the scrambling result of the first Ethernet frame stream and the scrambling result of the second Ethernet frame stream are obtained.
  • the receiving rate of the first Ethernet frame stream when receiving the Ethernet frame stream is divided by the receiving rate of the second Ethernet frame stream when the Ethernet frame stream is received is equal to X divided by Y.
  • the X data segments include a first data segment to an Xth data segment, and the X data segments are sequentially carried in the first Ethernet frame stream in the first clock cycle.
  • a data segment to the Xth data segment the data segment includes an X+1 data segment to a ⁇ + ⁇ data segment, and the one data segment carries a second Ethernet in the first clock cycle
  • the order of the positions in the frame stream is sequentially the X+1th data segment to the ⁇ + ⁇ data segment.
  • the a-th data segment is any one of the X data segments, and the scrambling circuit corresponding to the a-th data segment is the a-th scrambling circuit (ie, the value of a is all integers from 1 to X),
  • the a scrambling circuit includes a first calculation circuit, a second calculation circuit, and a third calculation circuit.
  • the b-th data segment is any one of the Y data segments (ie, the value of b is all integers from 1 to Y), and the scrambling circuit corresponding to the b-th data segment is the b-th scrambling
  • the circuit, the bth scrambling circuit includes a fourth calculation circuit, a fifth calculation circuit, and a sixth calculation circuit.
  • distributing the first input data to the ith scrambling circuit may include:
  • the first input data includes the first data and the second data
  • the a-th scramble circuit includes the a calculation circuit, the second calculation circuit, and a third calculation circuit
  • the first data includes the first data segment to the a-th data segment
  • the second data includes a first Ethernet frame of a second clock cycle
  • the a-th scramble circuit utilizes the a-th input data and according to the scrambling Calculating, in parallel, the scrambling result of the a-th data segment
  • the specific implementation process may include: the first calculating circuit, all the correlations of each bit of the a-th data segment in the first data The bit performs an exclusive OR calculation to obtain a first result of each bit of the a-th data segment; the second calculation circuit pairs all relevant bits of each bit of the a-th data segment in the second data Performing an exclusive OR calculation to obtain a second result of each bit of the a-th data segment; the third calculation circuit performing an exclusive-OR calculation on the first result and the second result of each bit of the a-th data segment Obtaining a scrambled result for each bit of the a-th data segment.
  • distributing the X+b input data to the X+b scrambling circuit may include: distributing third data and fourth data to the fourth calculation circuit and the fifth calculation circuit, respectively, the X+ b input data includes the third data and the fourth data, the X+b scrambling circuit includes the fourth calculation circuit, the fifth calculation circuit, and a sixth calculation circuit, the third data The X+1 data segment to the X+b data segment are included, and the fourth data includes a last N bits of a scrambling result of the second Ethernet frame stream of the second clock cycle.
  • the X+b scrambling circuit uses the X+b input data and calculates the scrambling result of the X+b data segment in parallel according to the scrambling polynomial, and the specific implementation process may be Includes:
  • the fourth calculation circuit performs an exclusive OR calculation on all relevant bits of each bit of the X+b data segment in the third data to obtain a bit of each bit of the X+b data segment a result; the fifth calculating circuit performs an exclusive OR calculation on all relevant bits of each bit of the X+b data segment in the fourth data to obtain each of the X+b data segments a second result of the bit; the sixth calculation circuit performing an exclusive OR calculation on the first result and the second result of each bit of the X+bth data segment to obtain each of the X+b data segments The scrambling result of the bit.
  • the third data includes a number of bits (X+b), the high b XM bits of the third data are equal to the first binary sequence, and the first binary sequence includes b data. And the b data segments are sequentially in the order of the first X+1 data segment to the X+b data segment.
  • the number of bits of the input data sent to each scrambling circuit is The Ethernet frame stream to which the data segment corresponding to the scrambling circuit belongs and the location of the data segment in the Ethernet frame stream are related.
  • a preferred implementation of distributing input data to each scrambling circuit is given below.
  • the X data segments respectively correspond to X slice information
  • the Y data segments respectively correspond to Y slice information.
  • the X slice information is used to indicate that the X data segments belong to the first Ethernet frame stream, and is used to indicate that each of the X data segments is in the first Ethernet frame stream.
  • the Y-slot information is used to indicate that the Y data segments belong to the second Ethernet frame stream, and is used to indicate that each of the Y data segments is in the second The location in the Ethernet frame stream.
  • the process of distributing the first data to the first computing circuit may include: obtaining the first Ethernet frame stream from the received Ethernet frame stream of the first clock cycle according to the indication of the X slice information, The first Ethernet frame stream includes the X data segments; and the first Ethernet frame stream is distributed to the first computing circuit.
  • the process of distributing the third data to the fourth computing circuit may include: obtaining the second Ethernet frame stream from the received Ethernet frame stream of the first clock cycle according to the indication of the Y slice information, The second Ethernet frame stream includes the Y data segments; and the second Ethernet frame stream is distributed to the fourth computing circuit.
  • the first information to the Xth information in the X slice information respectively correspond to the first data segment to the Xth data segment, and the Xth information is further used to indicate that the Xth data segment is The last data segment in the first Ethernet frame stream.
  • the process may further include: storing, according to the indication of the Xth information, a scrambling result of the first Ethernet frame stream of the first clock cycle.
  • the X scramblers can respectively calculate the scrambling results of the X data segments
  • the Y scramblers can respectively calculate the scrambling results of the Y data segments, and any one of the X data segments.
  • the number of bits included is equal to the number of bits (all M) contained in any one of the Y data segments. Therefore, if the adjusted bit width of each Ethernet frame stream is an integer multiple of M, and the bit width of the Ethernet frame stream is less than or equal to (X+Y) M, then the X numbers may be passed.
  • the scrambler and the Y scramblers are reconfigured to force interfere with each of the adjusted Ethernet frame streams.
  • MAC stream combination The scrambling process requires parallelization of any number and bandwidth of sub-MAC stream combinations.
  • the scrambling result from bit 0 to bit (n-1) can be obtained according to the formula derivation.
  • the derivation process is as follows:
  • ⁇ 62 b 62 ⁇ (b 23 ⁇ 5 5 A S 34 ) A (b 4 ⁇ 5*34 A 5 ⁇ )
  • (3 ⁇ 4), , ⁇ 2 ,''' ⁇ ) are the input bits of the current time, and may contain 1 to (n+1) related bits, " ⁇ 3 ⁇ 4. , , ⁇ 2 , '''anno) indicates the XOR result of the relevant input data at the current time;
  • FIG. 2 shows a scrambling architecture provided by an embodiment of the present invention.
  • Fig. 3 shows the structure of a scrambling circuit based on the architecture.
  • the total bandwidth of the data received by the receiver in one clock cycle is UnitxN bits, where Unit is the number of bits per data segment and N is the number of data segments (N data segments are represented in the figure)
  • N the number of data segments
  • the data segmentation module divides the sub-MAC stream input by one clock cycle into N data segments.
  • each scrambling circuit corresponds to the data segment.
  • each scrambling circuit may comprise a z/c-i circuit (corresponding to the aforementioned first computing circuit or fourth computing circuit, represented as Oz/c- Calc datl, Calc_dai N- ⁇ )), a Ga/c-srg circuit (corresponding to the aforementioned second or fifth calculation circuit, shown as C3 ⁇ 4/c-srgO, Calc srgl, ..., Calc _srg2) and an XOR circuit (corresponding to the aforementioned The third calculation circuit or the sixth calculation circuit, which is represented as XOR0, XOR1, XOR(Nl))
  • the Cede-dat circuit corresponding to each data segment is operated according to the derivation formula of the parallel scrambling principle described above and the data output from the distribution unit to the Oz/c-i circuit, and outputs the operation result; Calc_srg corresponding to each data segment
  • the circuit operates according to the derivation formula of the parallel scrambling principle described above and the data output from the distribution unit to the C / c - srg circuit, and outputs the operation result.
  • the XOR circuit corresponding to each data segment outputs the output of the Calc-dat circuit and the Calc-srg circuit corresponding to the data segment. The XOR operation is performed and the operation result is output.
  • the data output by the XOR circuit corresponding to each data segment constitutes the scrambled parallel data.
  • the shift register group contains M (MN, N is the number of data segments) shift registers, and the number of shift registers is determined by the actual number of sub-MAC streams, that is, the number of shift registers and the number of divided sub-MAC streams. the same.
  • a 58-bit shift register is allocated for each MAC stream according to the sub-MAC flow distribution of the MAC distribution module.
  • the above z/c-circuit, -srg circuit, XOR circuit may be implemented by a logic circuit, such as an exclusive OR logic circuit; a data segmentation module and a distribution unit, which may be implemented by a logic circuit; and a shift register update module may also be implemented by a logic circuit.
  • a logic circuit such as an exclusive OR logic circuit
  • a data segmentation module and a distribution unit which may be implemented by a logic circuit
  • a shift register update module may also be implemented by a logic circuit.
  • the flexible bandwidth Ethernet scrambling process provided by the embodiment of the present invention is described below with reference to FIG.
  • the process can include:
  • the data segmentation module segments the sub-MAC streams input in one clock cycle according to the granularity of Unit bits, and sets slice information for each data segment.
  • the data segmentation module may segment the fixed bandwidth data output by the coding module in the PCS sublayer according to the granularity of the unit bits, and combine the sub-MAC flow distribution of the sub-MAC flow distribution module in the PCS sublayer. As a result, slice information is set for each data segment.
  • the number of data segments included in the sub-MAC stream is determined by the packet configuration information.
  • the packet configuration information may be initially configured in the data segmentation module or may be generated by software and updated into the data segmentation module.
  • the slice information is used to identify the characteristics of the data segment, such as which sub-MAC flow it belongs to, which data segment in the sub-MAC flow, and whether it is the last data segment of the sub-MAC flow.
  • the slice information may include the following content:
  • Stream no identifier used to identify the sub-MAC stream to which the data segment belongs.
  • Scramble no identifier used to identify the data segment to which the data segment belongs in the sub-MAC stream, that is, which data segment belongs to the sub-MAC stream.
  • Flag identifier It is used to identify whether the data segment is the last data segment of the sub-MAC stream. For example, assuming that the maximum number of sub-MAC flows is 16, and the maximum number of data segments is 16, the slice information can be set to 9 bits. As shown in Table 1, bit 0 is used as the flag of the flag to identify whether the data segment is the last data segment of the sub-MAC flow to which the data segment belongs. Bits 1-4 are used as the Stream no identifier to identify that the data segment belongs to the sub-port. Which sub-MAC flows in the MAC flows 0 to 15 and bits 5-8 are used as Scramble no identifiers to identify which data segment of the data segment belongs to the 0-15 data segment in the sub-MAC stream. According to the segment identification information, it can be known that several sub-MAC streams are received in one clock cycle, and the start and end boundaries of each sub-MAC stream are known.
  • the distribution unit allocates input data for the scrambling circuit corresponding to each data segment based on the slice information of each data segment. According to the above principle, for each data segment, the distribution unit can perform the following operations:
  • Step a selecting all input data from the starting position (low bit) to the current segment position from the sub-MAC stream received in one clock cycle as a source of the selected allocation;
  • Step b According to the scramble no identifier in the slice information, selecting valid data from the high bit to the low bit in the source data selected in step a, the width of the selected valid data is the sub MAC to which the current data segment belongs. The start bit of the first data segment in the stream to the end bit of the current segment;
  • Step c By using the valid data selected in step b as the low bit position data and padding the high bit position data with 0, the generated bandwidth is compared with the source data bandwidth selected in step a. The same data, the generated data is output to the Cak-dat circuit of the scrambling circuit corresponding to the current data segment.
  • the current data segment is the sixth segment of the parallel data (starting from the low bit data, the data segment label starts from 1), and is the data segment 2 of the sub-MAC stream 2 (the data segment label in the sub-MAC stream starts from 0)
  • the scrambling circuit corresponding to the data segment is the scrambling circuit 6, and the Calc-dat circuit in the scrambling circuit 6 is Cak_ht6.
  • step a the distribution unit selects 6 data segments (width is Unit*6) as source data from the start position 0 bit; the current data segment is data segment 2 of the sub-MAC stream 2, The scrambling result of the data segment is only related to the data segment 0, the data segment 1 and the data segment 2 of the sub-MAC stream 2, that is, related to the 4th, 5th, and 6th data segments, so in the step b, the distribution unit In the source data selected in step a, the data of the Unit*3 width is selected as the valid data in the order from the high bit to the low bit; in step c, the distribution unit outputs the data of the width Unit*6 to the Oz/c.
  • step b where the output data starts from 0 bits to the (Unit*3-1) bit, which is the valid data selected in step b (the valid data follows the same high and low bit positions as the output of the low bit data segment), The remaining high bit positions are padded with 0s.
  • Figure 4 shows a schematic diagram of the source data selected by the distribution unit for each Oz/c-circuit. It can be seen that the distribution unit selects the data segment 0 as the source data (the width is Unit*l) for the Cede_dt corresponding to the data segment 0 (the first data segment), and selects the data segment 0 for the Calc_dtl corresponding to the data segment 1.
  • the distribution unit determines the sub-MAC flow to which the current data segment belongs according to the Scramble no identifier in the slice information of the current data segment, and uses the value of the 58-bit shift register corresponding to the sub-MAC flow as the current data.
  • the input data of the Calc_ ⁇ circuit corresponding to the segment is allocated to the Calc_srg circuit corresponding to the current data segment.
  • the distribution unit may also send the Scramble no identifier in the slice information of the current data segment to the corresponding Calc_srg circuit, and the Cede_srg circuit root According to the Scramble no flag, the value of the corresponding shift register is obtained from the shift register group.
  • FIG. 5 is a schematic diagram of the distribution unit assigning input data to the scrambling circuit.
  • the parallel data is divided into 8 data segments (data segment 0 to data segment 7) by the data segmentation module, and the sub-MAC stream 2 includes 3
  • the data segments (data segments 3 to 5) and the data allocated by the distribution unit for the Calc-dat circuit corresponding to the data segment 5 are as shown in the figure, wherein the oblique line filling portion is a calculation result that needs to be output.
  • each scrambling circuit performs scrambling processing based on the assigned input data, and outputs a scrambled result.
  • the Oz/c_i circuit in each scrambling circuit performs an operation according to the input data allocated by the distribution unit to obtain an operation result of each bit of the input data, which is identified by scramble no of the data segment.
  • the operation result of the corresponding data segment is selected from the operation result as the output of the Calc dat circuit.
  • the Calc-srg circuit calculates according to the 58 bits outputted by the distribution unit, and is identified by the Scramble no of the data segment, and selects the corresponding width data from the selection operation result as the output of the C /c_srg circuit. Both output data widths are the same as the segment width and are output to the XOR circuit.
  • Each Calc-dat circuit can be processed as follows:
  • the operation result of all the bits in the input data range is calculated according to the parallel scrambling principle described above. For example:
  • the Calc dat circuit computes the bit as i; for b 62 , the Calc dat circuit computes the bit as b 62 b 23 b 4 ⁇
  • the Calc-dat circuit for that bit
  • the result of the operation is b 63 A b 24 b 5 ⁇
  • the width of the above calculation result is the same as the width of the input data, but considering that only the calculation result of the corresponding data segment of the circuit is meaningful, only the corresponding Oz/c_i circuit is output. The calculation result of the data segment.
  • the scramble no to which each Oz/c-circuit belongs may be sent by the distribution unit to the C"/c-cto circuit, so that the C"/c-cto circuit can output the operation result. According to the identification of the data segment, only the operation result of the data segment is output.
  • Each Calc-srg circuit can be processed as follows:
  • the 58-bit register value of the shift register corresponding to the Scramble no flag is obtained from the shift register group, and then the operation is performed according to the parallel scrambling principle described above (if the Calc_sr g circuit is distributed from the distribution) If the unit directly obtains the shift register value, the aforementioned steps are omitted.
  • the result of the srg circuit output is the 39th bit value of the shift register; for, - the result of the srg circuit output is the 38th bit value of the shift register; for the 2 , C / c - ⁇ circuit output
  • the result is the XOR result of the following bit values of the shift register: 5* 15 ⁇ 5 ⁇ ⁇ 5*34 ⁇ 5 ⁇ ;
  • C / c - ⁇ ⁇ circuit output is the XOR result of the following bit values of the shift register: ⁇ S 14 AA ⁇ 33 A ⁇ 52;
  • the data width of the operation result of the Calc srg circuit is the same as the data width of the operation result of the Oz/c- circuit, and FIG. 6 shows that the distribution unit allocates input data for each C / c - srg circuit, and each C / c - srg circuit Schematic diagram of the data width of the result of the operation. It can be seen that the data width of the C / c - srgO operation result is Unit * l, the data width of the Calc srgl operation result is Unit * 2, the data width of the Calc srgO operation result is Unit * 3, and so on, C3 ⁇ 4 / c — The data width of the srg(Nl) operation result is Unit*N.
  • the C/c_srg circuit is outputting the operation.
  • the width of the output result of the C / c - srg circuit is the width of one data segment.
  • Each XOR circuit performs an exclusive OR operation on the operation result of the corresponding Calc_dat circuit and the Calc_srg circuit output, and outputs the operation result.
  • the operation result outputted by each XOR circuit is the scrambled data of the data segment corresponding to the XOR circuit, and the operation result output by all the operation processing circuit constitutes the scrambled sub-MAC stream received in one clock cycle. result.
  • the scrambling circuit needs to update the value of the 58-bit shift register. From the principle of parallel scrambling described above, the value of the 58-bit shift register is derived from the last 58 bits of the scrambling result of the previous clock cycle.
  • the shift register update module determines the sub-MAC flow to which the current data segment belongs according to the Flag identifier and the Stream no identifier in the slice information of the current data segment, and determines whether the current data segment belongs to The last data segment of the sub-MAC stream, if yes, updates the value of the shift register corresponding to the sub-MAC stream to which the current data segment belongs by using the value of the last 58 bits of the scrambling result of the sub-MAC stream to which the current data segment belongs.
  • FIG. 7 shows a schematic diagram of updating the shift register value.
  • each sub-MAC stream contains 2 data segments.
  • the last 58 bits of the XOR circuit corresponding to the second data segment in the sub-MAC stream are used to update the corresponding sub-MAC stream. Shift register value.
  • the parallel processing of the calculation process of the Calc srg circuit and the Cede-dat circuit enables the parallel scrambling calculation process of the embodiment of the present invention to achieve a higher running speed and meet the timing requirements of the logic design.
  • the scrambling scheme provided by the embodiment of the present invention segments the parallel data and implements flexible grouping and individual scrambling processing of the data segments with the segment identification information.
  • This solution effectively addresses the processing bandwidth and number of flexible bandwidth Ethernet interfaces for multiple different parallel width scramblers.
  • the embodiment of the present invention can solve the problem of large data volume calculation in which multiple scramblers of flexible grouping are parallelized.
  • the traditional method requires multiple parallelization schemes for different specifications of the scrambler, and the flexibility of the packet causes a large occupation of logic resources.
  • the resource occupation can be effectively reduced and the timing requirements can be met.
  • the embodiment of the invention also provides a scrambling device.
  • FIG. 8 it is provided by an embodiment of the present invention. Schematic diagram of the structure of the scrambling device.
  • the scrambling device can be used to perform the method shown in FIG.
  • the scrambling device can be a receiver of the network device.
  • the receiver can include an Ethernet interface.
  • the receiver can be implemented by an ASIC or an FPGA.
  • the network device can be a router, a network switch, a firewall, a load balancer, a data center, a PTN device, or a WDM device.
  • the scrambling device can include:
  • the receiving unit 801 is configured to receive an Ethernet frame stream of the first clock cycle.
  • a first obtaining unit 802 configured to obtain X data segments from the Ethernet frame stream of the first clock cycle received by the receiving unit 801, where the X data segments are the first Ethernet of the first clock cycle a data segment of the frame stream, the number of bits of each of the X data segments is M, M is an integer greater than 1, and X is a positive integer;
  • a second obtaining unit 803 configured to obtain Y data segments from the Ethernet frame stream of the first clock cycle received by the receiving unit 801, where the Y data segments are the second Ethernet of the first clock cycle a data segment of the frame stream, wherein the number of bits of each of the Y data segments is M, and Y is a positive integer;
  • a first distribution unit 804 configured to respectively distribute X input data to the X scrambling circuits 806, where the X scrambling circuits 806 correspond to the X input data.
  • the second distribution unit 805 is configured to respectively distribute Y input data to the Y scrambling circuits 806, where the Y plus 4 circuits 806 correspond to the Y input data.
  • the X scrambling circuits 806 are configured to respectively calculate the scrambling results of the X data segments according to the X input data distributed by the first distribution unit 804 according to the scrambling polynomial, the X data a segment corresponding to the X scrambling circuits 806, each scrambling circuit of the X scrambling circuits 806 being configured to calculate a scrambling result of a binary sequence of bit numbers M in parallel; a scrambling circuit 806, configured to respectively calculate, by using the Y input data distributed by the second distribution unit 805, a scrambling result of the Y data segments according to the scrambling polynomial, the Y data segments and The Y scrambling circuits 806 - correspondingly, each scrambling circuit of the Y scrambling circuits 806 is configured to calculate the scrambling results of a binary sequence of bit numbers M in parallel.
  • the X data segments include a first data segment to an Xth data segment, and the X data segments are sequentially carried in the first
  • the first distribution unit 804 is specifically configured to: distribute the first input data to the a-th scrambling circuit 806, where the value of a is all integers from 1 to X;
  • the first distribution unit 804 is specifically configured to:
  • First data and second data are respectively distributed to the first calculation circuit 8061 and the second calculation circuit 8062, the first input data including the first data and the second data, and the a-th scramble circuit 806 includes The first calculating circuit 8061, the second calculating circuit 8062, and the third calculating circuit 8063 (see FIG. 9A), the first data includes the first data segment to the a-th data segment, and the second data a last N bits of the scrambling result of the first Ethernet frame stream including the second clock cycle, N is an order of the scrambling polynomial, and the second clock cycle is a previous clock cycle of the first clock cycle ;
  • the X scrambling circuits 806 include the a-th scramble circuit, and the a-th scramble circuit 806 is configured to calculate the a-th data segment in parallel by using the a-th input data and according to the scrambling polynomial Scrambling result
  • the a-th scramble circuit 806 uses the first input data to calculate the scrambling result of the a-th data segment in parallel according to the scrambling polynomial, including:
  • the first calculating circuit 8061 is configured to perform an exclusive OR calculation on all relevant bits of each bit of the a-th data segment in the first data to obtain a first bit of each bit of the a-th data segment Result
  • the second calculating circuit 8062 is configured to perform an exclusive OR calculation on all relevant bits of each bit of the a-th data segment in the second data to obtain a second of each bit of the a-th data segment Result
  • the third calculating circuit 8063 is configured to perform an exclusive OR calculation on the first result and the second result of each bit of the a-th data segment to obtain a scrambled result of each bit of the a-th data segment.
  • the Y data segments include an X+1 data segment to an X+Y data segment, and the Y data segments The position of the position in the second Ethernet frame stream carried in the first clock cycle is sequentially the X+1 data segment to the X+Y data segment.
  • the second distribution unit 85 is configured to: distribute the X+b input data to the X+b scrambling circuit 806, where b is a value from 1 to Y;
  • the second distribution unit 85 is specifically configured to:
  • the disturbance circuit 806 includes the fourth calculation circuit 8064, the fifth calculation circuit 8065, and a sixth calculation circuit 8066 (see FIG. 9B), and the third data includes the X+1th data segment to the X+b a data segment, where the fourth data includes a last N bits of a scrambling result of the second Ethernet frame stream of the second clock cycle;
  • the Y scrambling circuit 806 includes the X+b scrambling circuit, and the X+b scrambling circuit 806 is configured to calculate the parallel calculation according to the scrambling polynomial by using the X+b input data.
  • the fourth calculating circuit 8064 is configured to perform an exclusive OR calculation on all relevant bits of each bit of the X+b data segment in the third data to obtain each of the X+b data segments The first result of the bit;
  • the fifth calculating circuit 8056 is configured to perform an exclusive OR calculation on all relevant bits of each bit of the X+b data segment in the fourth data to obtain each of the X+b data segments The second result of the bit;
  • the sixth calculating circuit 8066 is configured to perform an exclusive OR calculation on the first result and the second result of each bit of the X+b data segment to obtain each bit of the X+b data segment. Disturb the result.
  • the third data includes a number of bits (X+b ) ⁇ , a high b XM bit of the third data is equal to a first binary sequence, and the first binary sequence includes b data. And the b data segments are sequentially in the order of the first X+1 data segment to the X+b data segment.
  • the Y data segments respectively correspond to Y slice information; the Y slice information is used to indicate The Y data segments belong to the second Ethernet frame stream, and are used to indicate a location of each of the one of the data segments in the second Ethernet frame stream.
  • the second distribution unit 805 is specifically configured to: obtain the second Ethernet frame stream from the received Ethernet frame stream of the first clock cycle according to the slice information, where the second Ethernet frame stream includes The one data segment; distributing the second Ethernet frame stream to the fourth computing circuit.
  • the X data segments respectively correspond to X slice information; the X slice information is used to indicate that the X data segments belong to the first Ethernet frame stream, and is used to indicate the X data.
  • the first distribution unit 804 is specifically configured to: obtain, according to the X slice information, the first Ethernet frame stream from the received Ethernet frame stream of the first clock cycle, where the first Ethernet frame stream includes The X data segments; distributing the first Ethernet frame stream to the first computing circuit.
  • the first information to the Xth information in the X slice information respectively correspond to the first data segment to the X data segment, and the Xth information is further used to indicate that the Xth data segment is The last data segment in the first Ethernet frame stream.
  • the scrambling device may further include: a storage unit (not shown) for storing a scrambled result of the first Ethernet frame stream of the first clock cycle according to the Xth information.
  • the embodiment of the invention also provides a scrambling device.
  • the scrambling device can be used to perform the method shown in FIG.
  • the device may be one of the following:
  • the ⁇ can be implemented by an FPGA or an ASIC.
  • the PHY may be a component in a network interface card (NIC), and the NIC may be a line card or a physical interface card (PIC).
  • the PHY may include a Media-Independent Interface (Mi) for connecting to the MAC;
  • a PHY chip the PHY chip may include a plurality of PHYs.
  • the PHY chip can be implemented by an FPGA or an ASIC;
  • the system chip may include a plurality of MACs and a plurality of PHYs; the system chip may be implemented by using an FPGA or an ASIC;
  • a multi-port Ethernet device which may be an Ethernet hub, an Ethernet router, or an Ethernet switch.
  • the multi-port Ethernet device includes a plurality of ports, each of which may include a system chip, which may include a MAC and a PHY.
  • the multi-port Ethernet device can also integrate multiple MACs into one MAC chip and integrate multiple ports into one chip.
  • the multi-port Ethernet device can also integrate multiple MACs and multiple PHYs into one system chip.
  • the apparatus is capable of performing the scrambling method provided by the above embodiments of the present invention.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Power Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种加扰方法及加扰装置,可应用于灵活以太网。灵活以太网的场景中,可能需要对接收器的以太网接口接收到的以太网帧流的数量以及每个以太网帧流的位宽进行调整。本发明的技术方案中,针对以太网帧流中的每个数据段设置对应的加扰电路以对每个数据段分别进行加扰,每个数据段的比特数量均为M。其中,第一以太网帧流中X个数据段对应的X个加扰电路可以分别计算X个数据段的加扰结果。因此,如果调整后的每个以太网帧流的位宽是M的整数倍,则可以通过对相应数量的加扰电路进行重新配置以对调整后的每个以太网帧流进行加扰。

Description

一种加扰方法及加扰装置
技术领域
本发明涉及通信领域, 尤其涉及一种加扰方法及加扰装置。 背景技术
随着以太网技术的演进, 目前面临对接口带宽、 流数量灵活可配的需求。 灵活带宽以太网可以在一定接口总带宽下, 实现以太网帧流的数量和带 宽的灵活可配。 所述以太网帧流也称为子介质访问控制 (英文: Media Access Control, 简称 MAC )流。 例如, 原本属于固定 400千兆以太网(英文: gigabit ethernet,简称: GE )接口的通道资源可以用于承载 1路 400GE、 1路 300GE+1 路 100GE、 2路 200GE、 4路 100GE、 8路 50GE或 16路 25GE的流量。
现有技术中, 接收器的以太网接口的带宽是固定的。 所述带宽也可以称 为速率。 例如 100GE的接口的速率是 100千兆比特每秒 (英文: g i gab i t per second )。 40GE的接口的速率是 40千兆比特每秒。 接收器的以太网接口接收到 数据流后, 通过加扰器对数据流进行加扰。 加扰器每个时钟周期能够加扰的 数据流的比特的数量是固定值。 上述技术方案难以应用到灵活以太网的场景 中。 发明内容
本发明实施例提供了一种加扰方法及加扰装置, 用以针对灵活以太网实 现数据加扰。
第一方面, 提供一种加扰方法, 包括:
接收第一时钟周期的以太网帧流;
获得 X个数据段, 所述 X个数据段是所述第一时钟周期的第一以太网帧 流的数据段, 所述 X个数据段中每个数据段的比特数量为 M , M为大于 1 的整数, X为正整数; 获得 Y个数据段, 所述 Υ个数据段是所述第一时钟周期的第二以太网帧 流的数据段, 所述 Υ个数据段中每个数据段的比特数量为 Μ, Υ为正整数; 分别向 X个加扰电路分发 X个输入数据 ,所述 X个加扰电路与所述 X个 输入数据——对应;
分别向 Υ个加扰电路分发 Υ个输入数据 ,所述 Υ个加扰电路与所述 Υ个 输入数据——对应;
所述 X个加扰电路分别利用所述 X个输入数据并根据加扰多项式并行地 计算所述 X个数据段的加扰结果,所述 X个数据段与所述 X个加扰电路—— 对应, 所述 X个加扰电路的每个加扰电路被配置以并行地计算比特数量为 Μ 的二进制序列的加扰结果;
所述 Υ个加扰电路分别利用所述 Υ个输入数据并根据所述加扰多项式并 行地计算所述 Υ个数据段的加扰结果,所述 Υ个数据段与所述 Υ个加扰电路 ——对应, 所述 Υ个加扰电路的每个加扰电路被配置以并行地计算比特数量 为 Μ的二进制序列的加扰结果。
结合第一方面, 在第一种可能的实现方式中, 所述 X个数据段包括第 1 数据段至第 X数据段, 所述 X个数据段承载在所述第一时钟周期的第一以太 网帧流中的位置的前后顺序依次为所述第 1数据段至所述第 X数据段;
所述分别向所述 X个加扰电路分发 X个输入数据, 包括: 向第 a加扰电 路分发第 a输入数据, a的取值为 1至 X中的所有整数;
其中, 所述向第 a加扰电路分发第 a输入数据包括:
分别向第一计算电路和第二计算电路分发第一数据和第二数 据, 所述第 a输入数据包括所述第一数据和所述第二数据, 所述第 a 加扰电路包括所述第一计算电路、 所述第二计算电路以及第三计算 电路, 所述第一数据包括所述第 1数据段至第 a数据段, 所述第二 数据包括第二时钟周期的第一以太网帧流的加扰结果的最后 N 比 特, N 为所述加扰多项式的阶数, 所述第二时钟周期是所述第一时 钟周期的上一个时钟周期; 所述 X个加扰电路分别利用所述 X个输入数据并根据加扰多项式并行地 计算所述 X个数据段的加扰结果, 包括: 所述第 a加扰电路利用所述第 a输 入数据根据所述加扰多项式并行地计算所述第 a数据段的加扰结果;
其中,所述第 a加扰电路利用所述第 a输入数据并根据所述加扰多项式并 行地计算所述第 a数据段的加扰结果, 包括:
所述第一计算电路对所述第一数据中的所述第 a数据段的每个 比特的所有相关比特执行异或计算以获得所述第 a数据段的每个比 特的第一结果;
所述第二计算电路对所述第二数据中的所述第 a数据段的每个 比特的所有相关比特执行异或计算以获得所述第 a数据段的每个比 特的第二结果;
所述第三计算电路对所述第 a数据段的每个比特的第一结果和 第二结果执行异或计算以获得所述第 a数据段的每个比特的加扰结 果。
结合第一方面或者第一方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述 Y个数据段包括第 X+1数据段至第 X+Y数据段, 所述 Y 个数据段承载在所述第一时钟周期的第二以太网帧流中的位置的前后顺序依 次为所述第 X+1数据段至所述第 X+Y数据段;
所述分别向所述 Y个加扰电路分发 Y个输入数据, 包括: 向第 X+b加扰 电路分发第 X+b输入数据, b的取值为 1至 Y中的所有整数;
其中, 所述向第 X+b加扰电路分发第 X+b输入数据包括:
分别向第四计算电路和第五计算电路分发第三数据和第四数 据, 所述第 X+b输入数据包括所述第三数据和所述第四数据, 所述 第 X+b加扰电路包括所述第四计算电路、 所述第五计算电路以及第 六计算电路,所述第三数据包括所述第 X+1数据段至第 X+b数据段, 所述第四数据包括所述第二时钟周期的第二以太网帧流的加扰结果 的最后 N比特; 所述 Y个加扰电路分别利用所述 Υ个输入数据并根据所述加扰多项式并 行地计算所述 Υ个数据段的加扰结果, 包括: 所述第 X+b加扰电路利用所述 第 X+b输入数据根据所述加扰多项式并行地计算所述第 X+b数据段的加扰结 果;
其中, 所述第 X+b加扰电路利用所述第 X+b输入数据根据所述加扰多项 式并行地计算所述第 X+b数据段的加扰结果, 包括:
所述第四计算电路对所述第三数据中的所述第 X+b数据段的每 个比特的所有相关比特执行异或计算以获得所述第 X+b数据段的每 个比特的第一结果;
所述第五计算电路对所述第四数据中的所述第 X+b数据段的每 个比特的所有相关比特执行异或计算以获得所述第 X+b数据段的每 个比特的第二结果;
所述第六计算电路对所述第 X+b数据段的每个比特的第一结果 和第二结果执行异或计算以获得所述第 X+b数据段的每个比特的加 扰结果。
结合第一方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述第三数据包含的比特的数量是(X+b ) χ Μ, 所述第三数据的高 b x M比 特等于第一二进制序列, 所述第一二进制序列包括 b个数据段, 所述 b个数 据段在所述第一二进制序列的前后顺序依次为所述第 X+1 数据段至所述第 X+b数据段。
结合第一方面的第二种可能的实现方式或者第三种可能的实现方式, 在 第四种可能的实现方式中, 所述 Y个数据段分别对应 Y片信息; 所述 Y片信 息被用于指示所述 Y个数据段属于所述第二以太网帧流, 以及被用于指示所 述 Y个数据段中每个数据段在所述第二以太网帧流中的位置;
所述向第四计算电路分发第三数据具体包括:
才艮据所述 Y 片信息从接收到的所述第一时钟周期的以太网帧流 中获得所述第二以太网帧流, 所述第二以太网帧流包括所述 Y个数 据段;
向所述第四计算电路分发所述第二以太网帧流。
结合第一方面的第一种至第四种可能的实现方式中的任意一种可能的实 现方式, 在第五种可能的实现方式中, 所述 X个数据段分别对应 X片信息; 所述 X片信息被用于指示所述 X个数据段属于所述第一以太网帧流, 以及被 用于指示所述 X个数据段中每个数据段在所述第一以太网帧流中的位置; 所述向第一计算电路分发第一数据, 包括:
才艮据所述 X 片信息从接收到的所述第一时钟周期的以太网帧流 中获得所述第一以太网帧流, 所述第一以太网帧流包括所述 X个数 据段;
向所述第一计算电路分发所述第一以太网帧流。
结合第一方面的第五种可能的实现方式, 在第六种可能的实现方式中, 所述 X片信息中的第一信息至第 X信息分别对应所述第一数据段至第 X数据 段, 所述第 X信息还被用于指示所述第 X数据段是所述第一以太网帧流中的 最后一个数据段;
所述方法还包括:
根据所述第 X信息存储所述第一时钟周期的所述第一以太网帧流的加扰 结果。
第二方面, 提供一种加扰装置, 包括:
接收单元, 用于接收第一时钟周期的以太网帧流;
第一获得单元, 用于从所述接收单元接收的所述第一时钟周期的以太网 帧流中获得 X个数据段, 所述 X个数据段是所述第一时钟周期的第一以太网 帧流的数据段, 所述 X个数据段中每个数据段的比特数量为 M , M为大于 1 的整数, X为正整数;
第二获得单元, 用于从所述接收单元接收的所述第一时钟周期的以太网 帧流中获得 Y个数据段, 所述 Y个数据段是所述第一时钟周期的第二以太网 帧流的数据段, 所述 Y个数据段中每个数据段的比特数量为 M, Y为正整数; 第一分发单元, 用于分别向 X个加扰电路分发 X个输入数据, 所述 X个 加扰电路与所述 X个输入数据——对应;
第二分发单元, 用于分别向 γ个加扰电路分发 γ个输入数据, 所述 γ个 加扰电路与所述 Y个输入数据——对应;
所述 X个加扰电路, 用于分别利用所述第一分发单元分发的所述 X个输 入数据并根据加扰多项式并行地计算所述 X个数据段的加扰结果, 所述 X个 数据段与所述 X个加扰电路——对应, 所述 X个加扰电路的每个加扰电路被 配置以并行地计算比特数量为 M的二进制序列的加扰结果;
所述 Y个加扰电路, 用于分别利用所述第二分发单元分发的所述 Y个输 入数据并根据所述加扰多项式并行地计算所述 γ个数据段的加扰结果, 所述
Y个数据段与所述 Y个加 4尤电路——对应, 所述 Y个加 4尤电路的每个加 4尤电 路被配置以并行地计算比特数量为 M的二进制序列的加扰结果。
结合第二方面, 在第一种可能的实现方式中, 所述 X个数据段包括第 1 数据段至第 X数据段, 所述 X个数据段承载在所述第一时钟周期的第一以太 网帧流中的位置的前后顺序依次为所述第 1数据段至所述第 X数据段;
所述第一分发单元用于: 向第 a加扰电路分发第 a输入数据, a的取值为 1至 X中的所有整数;
所述第一分发单元具体用于:
分别向第一计算电路和第二计算电路分发第一数据和第二数据, 所述第 a 输入数据包括所述第一数据和所述第二数据, 所述第 a加扰电路包括所述第 一计算电路、 所述第二计算电路以及第三计算电路, 所述第一数据包括所述 第 1数据段至第 a数据段, 所述第二数据包括第二时钟周期的第一以太网帧 流的加扰结果的最后 N比特, N为所述加扰多项式的阶数, 所述第二时钟周 期是所述第一时钟周期的上一个时钟周期;
所述 X个加扰电路包括所述第 a加扰电路, 所述第 a加扰电路用于利用 所述第 a输入数据根据所述加扰多项式并行地计算所述第 a数据段的加扰结 果; 所述第一计算电路用于对所述第一数据中的所述第 a数据段的每个比特 的所有相关比特执行异或计算以获得所述第 a数据段的每个比特的第一结果; 所述第二计算电路用于对所述第二数据中的所述第 a数据段的每个比特 的所有相关比特执行异或计算以获得所述第 a数据段的每个比特的第二结果; 所述第三计算电路用于对所述第 a数据段的每个比特的第一结果和第二 结果执行异或计算以获得所述第 a数据段的每个比特的加扰结果。
结合第二方面或者第二方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述 Y个数据段包括第 X+1数据段至第 X+Y数据段, 所述 Y 个数据段承载在所述第一时钟周期的第二以太网帧流中的位置的前后顺序依 次为所述第 X+1数据段至所述第 X+Y数据段;
所述第二分发单元用于: 向第 X+b加扰电路分发第 X+b输入数据, b的 取值为 1至 Y中的所有整数;
所述第二分发单元具体用于:
分别向第四计算电路和第五计算电路分发第三数据和第四数据, 所述第 X+b输入数据包括所述第三数据和所述第四数据, 所述第 X+b加扰电路包括 所述第四计算电路、 所述第五计算电路以及第六计算电路, 所述第三数据包 括所述第 X+1数据段至第 X+b数据段, 所述第四数据包括所述第二时钟周期 的第二以太网帧流的加扰结果的最后 N比特;
所述 Y个加扰电路包括所述第 X+b加扰电路,所述第 X+b加扰电路用于 利用所述第 X+b输入数据根据所述加扰多项式并行地计算所述第 X+b数据段 的加扰结果;
所述第四计算电路用于对所述第三数据中的所述第 X+b数据段的每个比 特的所有相关比特执行异或计算以获得所述第 X+b数据段的每个比特的第一 结果;
所述第五计算电路用于对所述第四数据中的所述第 X+b数据段的每个比 特的所有相关比特执行异或计算以获得所述第 X+b数据段的每个比特的第二 结果; 所述第六计算电路用于对所述第 X+b数据段的每个比特的第一结果和第 二结果执行异或计算以获得所述第 X+b数据段的每个比特的加扰结果。
结合第二方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述第三数据包含的比特的数量是(X+b ) x M, 所述第三数据的高 b x M比 特等于第一二进制序列, 所述第一二进制序列包括 b个数据段, 所述 b个数 据段在所述第一二进制序列的前后顺序依次为所述第 X+1 数据段至所述第 X+b数据段。
结合第二方面的第二种可能的实现方式或者第三种可能的实现方式, 在 第四种可能的实现方式中, 所述 Y个数据段分别对应 Y片信息; 所述 Y片信 息被用于指示所述 Y个数据段属于所述第二以太网帧流, 以及被用于指示所 述 Y个数据段中每个数据段在所述第二以太网帧流中的位置;
所述第二分发单元具体用于:
才艮据所述 Y 片信息从接收到的所述第一时钟周期的以太网帧流中获 得所述第二以太网帧流, 所述第二以太网帧流包括所述 Y个数据段; 向所述 第四计算电路分发所述第二以太网帧流。
结合第二方面的第一种至第四种可能的实现方式中的任意一种可能的实 现方式, 在第五种可能的实现方式中, 所述 X个数据段分别对应 X片信息; 所述 X片信息被用于指示所述 X个数据段属于所述第一以太网帧流, 以及被 用于指示所述 X个数据段中每个数据段在所述第一以太网帧流中的位置; 所述第一分发单元具体用于:
才艮据所述 X片信息从接收到的所述第一时钟周期的以太网帧流中获得所 述第一以太网帧流, 所述第一以太网帧流包括所述 X个数据段; 向所述第一 计算电路分发所述第一以太网帧流。
结合第二方面的第五种可能的实现方式, 在第六种可能的实现方式中, 所述 X片信息中的第一信息至第 X信息分别对应所述第一数据段至第 X数据 段, 所述第 X信息还被用于指示所述第 X数据段是所述第一以太网帧流中的 最后一个数据段; 所述加扰装置还包括:
存储单元, 用于根据所述第 X信息存储所述第一时钟周期的所述第一以 太网帧流的加扰结果。
第三方面, 提供一种装置, 所述装置为以下装置中的任意一种:
PHY, 所述 PHY可以通过 FPGA或者 ASIC实现。所述 PHY可以是网絡 接口卡( Network Interface Card, NIC )中的部件, 所述 NIC可以是线卡( Line Card )或者 PIC ( Physical Interface Card, 物理接口卡)。 所述 PHY可以包含 用于连接到 ( for interfacing to ) MAC的 Media-Independent Interface (媒体无 关接口, Mil );
PHY芯片 ( PHY chip ), 所述 PHY芯片可以包括多个 PHY。 所述 PHY 芯片可以通过 FPGA或者 ASIC实现;
系统芯片( system chip ),所述系统芯片可以包括多个 MAC以及多个 PHY; 所述系统芯片可以通过 FPGA或者 ASIC实现;
多端口以太网设备 ( multi-port Ethernet device ) , 所述多端口以太网设备 可以是以太网集线器、 以太网路由器或者以太网交换机。 所述多端口以太网 设备包括多个端口,每个端口可以包括系统芯片,所述系统芯片可以包括 MAC 和 PHY。 所述多端口以太网设备还可以将多个 MAC整合到一个 MAC芯片 ( MAC chip ) , 以及将多个 ΡΗΥ整合到一个 ΡΗΥ芯片。 所述多端口以太网设 备也可以将多个 MAC以及多个 PHY整合到一个系统芯片中。
该装置能够执行第一方面或者第一方面中的任意一种可能的实现方式所 提供的加扰方法。
本发明上述实施例提供的技术方案比较容易应用到灵活以太网的场景。 具体来说, 灵活以太网的场景中, 接收器的以太网接口可能需要接收 2个以 太网接口分别发送的 2个以太网帧流。 本发明实施例的技术方案可以对 2个 以太网帧流分别进行加 4尤。
灵活以太网的场景中, 可能需要对接收器的以太网接口接收到的以太网 帧流的数量以及每个以太网帧流的位宽进行调整。 本发明实施例的技术方案 中, X个加扰电路可以分别计算 X个数据段的加扰结果, Υ个加扰电路可以分 别计算 γ个数据段的加扰结果, 并且 X个数据段中任意一个数据段包含的比 特的数量等于 Υ个数据段中任意一个数据段包含的比特的数量(Μ )。 因此, 如果调整后的每个以太网帧流的位宽是 Μ的整数倍, 并且所述以太网帧流的 位宽小于等于 (X+Y ) x M, 则可以通过对所述 X个加扰电路以及所述 Y个加 扰电路进行重新配置以对调整后的每个以太网帧流进行加扰。 附图说明
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中 所需要使用的附图作简要介绍, 显而易见地, 下面描述中的附图仅仅是本发 明的一些实施例, 对于本领域的普通技术人员来讲, 在不付出创造性劳动性 的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例提供的加扰方法的示意图;
图 2为本发明实施例提供的加扰架构示意图;
图 3为本发明实施例提供的加扰电路的结构示意图;
图 4为本发明实施例中分发单元为各 /c— i 电路分配输入数据的示意 图;
图 5为本发明实施例中分发单元进行数据分配的示意图;
图 6为本发明实施例中分发单元为各 C /c— srg电路分配输入数据的示意 图;
图 7为本发明实施例中更新移位寄存器的示意图;
图 8为本发明实施例提供的加扰装置的结构示意图;
图 9A、 图 9B为图 8中的加扰电路的结构示意图。 具体实施方式
为了使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本 发明作进一步地详细描述, 显然, 所描述的实施例仅仅是本发明一部份实施 例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在 没有做出创造性劳动前提下所获得的所有其它实施例, 都属于本发明保护的 范围。
本发明实施例提供的技术方案比较容易应用到灵活以太网的场景。 具体 来说, 灵活以太网的场景中, 接收器的以太网接口可能需要接收 2个以太网 接口分别发送的 2个以太网帧流。 本发明实施例提供的技术方案可以对 2个 以太网帧流分别进行加 4尤。
本发明实施例可在开放式系统互联参考模型 (英文: Open System Interconnect Reference Model )中的物理层 ( Physical )中的 PCS( Physical Coding Sublayer, 物理编码子层) 实现。 物理层可包括 RS ( Reconciliation Sublayer, 协调子层)、 PC S子层、 PMA ( Physical Medium Attachment , 物理介质连接) 子层以及 PMD ( Physical Media Dependent, 物理介质相关)子层。 在一种灵 活带宽以太网应用场景中, PCS子层中的编码模块编码后的数据经 MAC分发 模块分发为多路以太网帧流(如子 MAC流)后, 分别在汇聚层对每路以太网 帧流进行力口扰。
参见图 1 , 为本发明实施例提供的加扰方法的示意图。 该加扰方法以接收 器的以太网接口在一个时钟周期内分别接收到 2个以太网帧流为例进行描述。 所述方法的执行主体可以是网絡装置的接收器。 所述接收器可以包括以太网 接口。所述接收器可以通过专用集成电路 (英文: application-specific integrated circuit, 简称: ASIC )或者现场可编程门阵列 (英文: field programmable gate array, 简称: FPGA ) 实现。 所述网絡装置可以是路由器、 网絡交换机、 防火 墙、 负载均衡器、 数据中心、 分组传送网 (英文: packet transport network, 简称: PTN )装置或者波分复用 (英文: wavelength division multiplexing, 简 称: WDM )装置。 如图所示, 该加扰方法包括:
S101 : 接收第一时钟周期的以太网帧流。
举例来说, 本实施例以接收器通过以太网接口接收以太网帧流为例进行 描述。 在一个时钟周期(这里称为第一时钟周期), 接收器接收到 2个以太网 帧流。 为描述方便起见, 以下将这 2个以太网帧流称为第一以太网帧流和第 二以太网帧流。
举例来说, 所述以太网接口可以包括 10个串行 /解串器(英文: serdes )。
10个 serdes分另 ll是第一 serdes至第十 serdes„
SI 02: 获得 X个数据段, 所述 X个数据段是所述第一时钟周期的第一以 太网帧流的数据段, 所述 X个数据段中每个数据段的比特数量为 M , M为 大于 1的整数, X为正整数; 获得 Y个数据段, 所述 Y个数据段是所述第一 时钟周期的第二以太网帧流的数据段, 所述 Y个数据段中每个数据段的比特 的数量为 M, Y为正整数。
举例来说, 所述第一以太网帧流可以是第一发送器通过以太网接口中的 第一 serdes至第七 serdes发送的。 所述第二以太网帧流可以是第一发送器通 过以太网接口中的第八 serdes至第十 serdes发送的。 所述第一发送器可以是 第一路由器的发送器。 所述第二发送器可以是第二路由器的发送器。 可替换 地, 所述第一发送器和所述第二发送器可以是同一个路由器的两个发送器。
举例来说, 所述接收器可以在所述第一时钟周期内通过第一 serdes至第 七 serdes接收 X个数据段。 所述接收器可以在所述第一时钟周期内通过第八 serdes至第十 serdes接收 Y个数据段。 X等于 7, Y等于 3。
本实施例中, 第一以太网帧流包含 X个数据段, 第二以太网帧流包含 Y 个数据段, 每个数据段的比特数量均为 M。
对于灵活以太网, 接收器接收到的以太网帧流的位宽可以相同也可以不 同。 比如, 每个以太网帧流对应的以太网接口的带宽可根据业务需求来设置, 因此在 MAC子层进行子 MAC流(即以太网帧流)分发时, 分发后的多个子 MAC流的位宽可能不相同。 因此, 本实施例中的 X和 Y可以相等, 也可以 不相等。 所述第一以太网帧流的位宽等于 X乘以 M。 所述第二以太网帧流的 位宽等于 Y乘以 M。 所述第一以太网帧流的速率等于所述第一以太网帧流的 位宽乘以接收器的接收频率。 所述第二以太网帧流的速率等于所述第二以太 网帧流的位宽乘以接收器的接收频率。 每个数据段的比特数量可以与灵活以太网所釆用的编解码方式有关。 比 如, 釆用 64b/66b编解码方式时, 64比特的数据块是数据处理的最小粒度, 因此每个数据段的比特数量可规定为 64。 第一以太网帧流和第二以太网帧流 所包含的数据段的数量均为正整数。
可选地, S102中, 可以通过数据分段模块对第一以太网帧流和第二以太 网帧流进行数据段的划分。 该数据分段模块可为逻辑电路。
S103 : 分别向 X个加扰电路分发 X个输入数据, 所述 X个加扰电路与所 述 X个输入数据——对应; 分别向 Y个加扰电路分发 Y个输入数据, 所述 Y 个加扰电路与所述 Y个输入数据——对应。
加扰电路与数据段——对应。 每个加扰电路可包括三个计算电路。 向每 个加扰电路发送的所述输入数据可以与加扰电路所对应的数据段所属的以太 网帧流以及数据段在该以太网帧流中的位置有关。
可选的, S 103 可以通过分发单元向每个加扰电路输入对应的输入数据。 该分发单元可为逻辑电路。
S104: 所述 X个加扰电路分别利用所述 X个输入数据并根据加扰多项式 并行地计算所述 X个数据段的加扰结果,所述 X个数据段与所述 X个加扰电 路——对应, 所述 X个加扰电路的每个加扰电路被配置以并行地计算比特数 量为 M的二进制序列的加扰结果;所述 Y个加扰电路分别利用所述 Y个输入 数据并根据所述加扰多项式并行地计算所述 Y个数据段的加扰结果, 所述 Y 个数据段与所述 Y个加 4尤电路——对应, 所述 Y个加 4尤电路的每个加 4尤电路 被配置以并行地计算比特数量为 M的二进制序列的加扰结果。
每个加扰电路釆用相同的加扰多项式计算对应的数据段的加扰结果。 本 发明实施例对加扰电路所釆用的加扰多项式不进行限制。
每个加扰电路输出的加扰结果中的比特的数量为 M, 即为该加扰电路对 应的数据段的每个比特的加扰结果。 每个加扰电路输出的加扰结果是 M比特 的二进制序列。
每个加扰电路可并行地计算该加扰电路对应的数据段的加扰结果, 因此 在一个时钟周期内可以得到每个数据段的加扰结果, 也即得到第一以太网帧 流的加扰结果和第二以太网帧流的加扰结果。
可选地, 接收所述以太网帧流时所述第一以太网帧流的接收速率除以接 收所述以太网帧流时所述第二以太网帧流的接收速率等于 X除以 Y。
为了更清楚地进行说明, 下面做如下约定:
所述 X个数据段包括第 1数据段至第 X数据段,所述 X个数据段承载在 所述第一时钟周期的第一以太网帧流中的位置的前后顺序依次为所述第 1 数 据段至所述第 X数据段, 所述 Υ个数据段包括第 X+1数据段至第 Χ+Υ数据 段, 所述 Υ个数据段承载在所述第一时钟周期的第二以太网帧流中的位置的 前后顺序依次为所述第 X+1数据段至所述第 Χ+Υ数据段。
第 a数据段为所述 X个数据段中的任意一个数据段, 第 a数据段对应的 加扰电路为第 a加扰电路(即 a的取值为 1至 X中的所有整数), 第 a加扰电 路包括第一计算电路、 第二计算电路和第三计算电路。 同理, 第 b数据段为 所述 Y个数据段中的任意一个数据段(即 b的取值为 1至 Y中的所有整数 ), 第 b数据段对应的加扰电路为第 b加扰电路, 第 b加扰电路包括第四计算电 路、 第五计算电路和第六计算电路。
下面按照上述约定, 以向第 a加扰电路分发第 a输入数据为例, 以及以向 第 b加扰电路分发第 b输入数据为例, 对 S 103和 S104的优选实现方式进行 描述。
在 S103中, 向第 a加扰电路分发第 a输入数据可包括:
分别向第一计算电路和第二计算电路分发第一数据和第二数据,所述第 a 输入数据包括所述第一数据和所述第二数据, 所述第 a加扰电路包括所述第 一计算电路、 所述第二计算电路以及第三计算电路, 所述第一数据包括所述 第 1数据段至第 a数据段, 所述第二数据包括第二时钟周期的第一以太网帧 流的加扰结果的最后 N比特, N为所述加扰多项式的阶数, 所述第二时钟周 期是所述第一时钟周期的上一个时钟周期。
在 S104中, 所述第 a加扰电路利用所述第 a输入数据并根据所述加扰多 项式并行地计算所述第 a数据段的加扰结果, 其具体实现过程可包括: 所述第一计算电路对所述第一数据中的所述第 a数据段的每个比特的所 有相关比特执行异或计算以获得所述第 a数据段的每个比特的第一结果; 所 述第二计算电路对所述第二数据中的所述第 a数据段的每个比特的所有相关 比特执行异或计算以获得所述第 a数据段的每个比特的第二结果; 所述第三 计算电路对所述第 a数据段的每个比特的第一结果和第二结果执行异或计算 以获得所述第 a数据段的每个比特的加扰结果。
同理, 在 S103中, 向第 X+b加扰电路分发第 X+b输入数据可包括: 分别向第四计算电路和第五计算电路分发第三数据和第四数据, 所述第 X+b输入数据包括所述第三数据和所述第四数据, 所述第 X+b加扰电路包括 所述第四计算电路、 所述第五计算电路以及第六计算电路, 所述第三数据包 括所述第 X+1数据段至第 X+b数据段, 所述第四数据包括所述第二时钟周期 的第二以太网帧流的加扰结果的最后 N比特。
在 S104中, 所述第 X+b加扰电路利用所述第 X+b输入数据并根据所述 加扰多项式并行地计算所述第 X+b数据段的加扰结果, 其具体实现过程可包 括:
所述第四计算电路对所述第三数据中的所述第 X+b数据段的每个比特的 所有相关比特执行异或计算以获得所述第 X+b 数据段的每个比特的第一结 果; 所述第五计算电路对所述第四数据中的所述第 X+b数据段的每个比特的 所有相关比特执行异或计算以获得所述第 X+b 数据段的每个比特的第二结 果; 所述第六计算电路对所述第 X+b数据段的每个比特的第一结果和第二结 果执行异或计算以获得所述第 X+b数据段的每个比特的加扰结果。
其中, 所述第三数据包含的比特的数量是(X+b ) Μ, 所述第三数据的 高 b X M比特等于第一二进制序列,所述第一二进制序列包括 b个数据段,所 述 b个数据段在所述第一二进制序列的前后顺序依次为所述第 X+1数据段至 所述第 X+b数据段。
上述流程的 S103中, 向每个加扰电路发送的所述输入数据的比特数量与 加扰电路所对应的数据段所属的以太网帧流以及数据段在该以太网帧流中的 位置有关。 下面给出一种向每个加扰电路分发输入数据的优选实现方式。
在该优选方式中, 所述 X个数据段分别对应 X片信息, 所述 Y个数据段 分别对应 Y片信息。所述 X片信息被用于指示所述 X个数据段属于所述第一 以太网帧流, 以及被用于指示所述 X个数据段中每个数据段在所述第一以太 网帧流中的位置; 所述 Y片信息被用于指示所述 Y个数据段属于所述第二以 太网帧流, 以及被用于指示所述 Y个数据段中每个数据段在所述第二以太网 帧流中的位置。
所述向第一计算电路分发第一数据的过程可包括: 根据所述 X片信息的 指示从接收到的所述第一时钟周期的以太网帧流中获得所述第一以太网帧 流, 所述第一以太网帧流包括所述 X个数据段; 向所述第一计算电路分发所 述第一以太网帧流。
所述向第四计算电路分发第三数据的过程可包括: 根据所述 Y片信息的 指示从接收到的所述第一时钟周期的以太网帧流中获得所述第二以太网帧 流, 所述第二以太网帧流包括所述 Y个数据段; 向所述第四计算电路分发所 述第二以太网帧流。
可选地, 所述 X片信息中的第一信息至第 X信息分别对应所述第一数据 段至第 X数据段,所述第 X信息还被用于指示所述第 X数据段是所述第一以 太网帧流中的最后一个数据段。 相应的, 该流程还可包括: 根据所述第 X信 息的指示, 存储所述第一时钟周期的所述第一以太网帧流的加扰结果。
通过以上描述可以看出, 在灵活以太网的场景中, 可能需要对接收器的 以太网接口接收到的以太网帧流的数量以及每个以太网帧流的位宽进行调 整。 本发明实施例中, X个加扰器可以分别计算 X个数据段的加扰结果, Y 个加扰器可以分别计算 Y个数据段的加扰结果, 并且 X个数据段中任意一个 数据段包含的比特的数量等于 Y个数据段中任意一个数据段包含的比特的数 量(都是 M )。 因此, 如果调整后的每个以太网帧流的位宽是 M的整数倍, 并且所述以太网帧流的位宽小于等于 (X+Y ) M, 则可以通过对所述 X个 加扰器以及所述 Y个加扰器进行重新配置以对调整后的每个以太网帧流进行 力口扰。
为了便于理解上述实施例, 下面以一种灵活带宽以太网架构为例描述上 述实施例的具体实现过程。
在该灵活带宽以太网中, 以一定速率 U的子 MAC流为基本单位, 在固 定的接口总带宽 T下进行灵活分组, 产生 n ( l n N, N=T/U)倍 U速率的 多子 MAC流组合。 加扰过程需要对任意数量和带宽的子 MAC流组合统一进 行并行化处理。
下面首先以下述加扰多项式为例, 说明本发明实施例的并行加扰原理: s(x) = l + x39 +x58
假设并行加扰数据有 n比特,根据公式推导可以得到从比特 0到比特 (n-1) 的加扰结果, 推导过程如下:
So =b0 A S38 + S57
i A S31 + S56
^62 = b62 Λ (b23 Λ 55 A S34)A (b4 Λ 5*34 A 5^)
^63 = ¾3 A (b24 A Su A S33)A (b5 A A » 52)
S = XOR{bs0 , bsl , bs2, · · -bsn XOR(Ss0 , Ssl ,Ss2 - -Ss57 )
其中:
是第 n 个 比特 的加扰结 果 , 是 ( ( k s Y2 b 和 XOR{Ss0 , Ssl ,Ss2--- Ss57 )的异或结果;
(¾), ,^2,'''^)是当前时刻的输入比特, 可能包含 1 到 (n+1 )个相关 比特, 《^¾。, ,^2,''' „)表示当前时刻相关输入数据的异或结果;
(&。 ,&15&257)是 58位的移位寄存器的比特值, 即前一时刻加扰结果 的末 58位比特, 可能包含 1到 58个相关比特, ORCS^^H )表示 58位的移位寄存器当前相关比特值的异或结果。
以下为描述方便, 将上述 DR ^A ^…^)表示为 C /c— 将上 述;ORCS^& &f^?)表示为 — srg, 即, C /c— i 是与加扰结果 有关的所有输入比特的异或计算公式, Cak _ srg与加扰结果 有关的所有移 位寄存器数值的异或计算公式。
由上述推导的公式可知并行化的每比特加扰结果由分别计算的 Calc _ dat和 Calc _ srg结果进行异或得到。
图 2示出了本发明实施例提供的加扰架构。 图 3示出了基于该架构的一 种加扰电路的结构。
参见图 2、 图 3, —个时钟周期内接收器接收到的数据总带宽为 UnitxN 比特, 其中 Unit为每个数据段的比特数量, N为数据段的数量(N个数据段 在图中表示为 SegO, Segl, …, Seg(N-l) ), 一个时钟周期内接收到的子 MAC 流可以有多个,每个子 MAC流包含的数据段的数量可以相同也可以不同。数 据分段模块将一个时钟周期输入的子 MAC流划分为 N个数据段。
加扰电路与数据段——对应。 其中, 每个加扰电路可包括一个 z/c— i 电路(对应于前述的第一计算电路或第四计算电路, 图中表示为 Oz/c— Calc datl , Calc _dai N-\) ), 一个 Ga/c— srg电路(对应于前述的第 二或第五计算电路, 图中表示为 C¾/c— srgO, Calc srgl , ..., Calc _srg2 ) 和一个 XOR电路(对应于前述的第三计算电路或第六计算电路, 图中表示为 XOR0, XOR1, XOR(N-l) )„
每个数据段对应的 Cede— dat电路根据上述并行加扰原理的推导公式以 及分发单元输出到该 Oz/c— i 电路的数据进行运算, 并输出运算结果; 每个 数据段对应的 Calc— srg电路根据上述并行加扰原理的推导公式以及分发单 元输出到该 C /c— srg电路的数据进行运算, 并输出运算结果。 每个数据段对 应的 XOR 电路将本数据段对应的 Calc— dat电路和 Calc— srg电路的输出结 果进行异或运算, 并输出运算结果。 这样, 各数据段对应的 XOR电路所输出 的数据构成了加扰后的并行数据。
移位寄存器组中包含 M ( M N, N为数据段的数量)个移位寄存器, 移 位寄存器数量由实际子 MAC流个数决定, 即,移位寄存器的数量与划分得到 的子 MAC流数量相同。 根据 MAC分发模块的子 MAC流分发情况, 为每路 子 MAC流分配一个 58比特的移位寄存器。
上述 z/c— 电路、 — srg电路、 XOR电路, 可由逻辑电路实现, 比如异或逻辑电路; 数据分段模块和分发单元, 可由逻辑电路实现; 移位寄 存器更新模块也可由逻辑电路实现。
下面结合图 3 ,描述本发明实施例提供的灵活带宽以太网加扰过程。 该流 程可包括:
在 S101〜S102中, 数据分段模块按照 Unit个比特的粒度, 对一个时钟周 期内输入的子 MAC流进行分段, 并为各数据段设置片信息。
其中, 数据分段模块可按照 Unit个比特的粒度, 对 PCS子层中的编码模 块编码后输出的固定带宽数据进行分段, 并结合 PCS子层中的子 MAC流分 发模块的子 MAC流分发结果, 为各数据段设置片信息。
子 MAC流包含的数据段数量由分组配置信息决定。该分组配置信息可以 是该数据分段模块中初始配置的, 也可以是由软件生成并更新到该数据分段 模块中的。
所述片信息用于标识数据段的特性, 比如它属于哪路子 MAC流,属于子 MAC流中的哪个数据段, 以及是否是子 MAC流的最后一个数据段。具体的, 所述片信息可以包括以下内容:
Stream no标识: 用来标识数据段所属的子 MAC流;
Scramble no标识: 用来标识数据段在所属子 MAC流中的所属的数据段, 即, 属于所属子 MAC流的哪个数据段;
Flag标识: 用来标识数据段是否是所属子 MAC流的最后一个数据段。 比如, 假定最大子 MAC流数量为 16, 最大数据段数量为 16, 则可设置 片信息为 9比特。 其中, 如表 1所示, 比特 0作为 Flag标识, 用来标识数据 段是否是该数据段所属子 MAC流的最后一个数据段,比特 1-4作为 Stream no 标识, 用来标识数据段属于子 MAC流 0〜15中的哪路子 MAC流, 比特 5-8 作为 Scramble no标识,用来标识数据段在所属子 MAC流中属于 0〜15数据段 中的哪个数据段。根据段标识信息,可以获知一个时钟周期接收到几路子 MAC 流, 以及各路子 MAC流的起止边界。
表 1、 灵活带宽以太网并行数据的段标识信息
Figure imgf000022_0001
表 1中, Stream no=0010, 表示数据段属于子 MAC流 2 (子 MAC流从 0 开始编号); Scramble no =0010, 表示数据段属于子 MAC流 2的第三个数据 段 (数据段从 0开始编号); Flag=l, 表示数据段是子 MAC流 2的最后一个 数据段。
在 S103中, 分发单元根据各数据段的片信息, 为各数据段对应的加扰电 路分配输入数据。 根据上述原理, 针对每个数据段, 分发单元可执行以下操 作:
步骤 a:从一个时钟周期接收到的子 MAC流中选取从起始位置(低比特 ) 到当前段位置的所有输入数据, 作为选择分配的来源;
步骤 b: 根据片信息中的 scramble no标识, 从步骤 a选取出的来源数据 中, 按照从高比特到低比特的顺序选取有效数据, 所选取的有效数据的宽度 为当前数据段所属的子 MAC 流中的第一个数据段的起始比特到当前段的结 束比特;
步骤 c: 通过将步骤 b中选取出的有效数据作为低比特位置数据, 并用 0 对高比特位置数据进行填充, 生成带宽与步骤 a 中选取出的来源数据带宽相 同的数据, 将生成的数据输出到当前数据段对应的加扰电路的 Cak— dat电 路。
比如, 当前数据段为并行数据的第 6段(从低比特数据开始, 数据段标 号从 1起始), 为子 MAC流 2的数据段 2 (子 MAC流中的数据段标号从 0 起始), 该数据段对应的加扰电路为加扰电路 6,加扰电路 6中的 Calc— dat电 路为 Cak— ht6。 此种场景下, 在步骤 a中, 分发单元从起始位置 0比特开 始选取 6个数据段(宽度为 Unit*6 )作为来源数据; 该当前数据段为子 MAC 流 2的数据段 2 , 说明该数据段的加扰结果仅与子 MAC流 2的数据段 0、 数 据段 1和数据段 2相关, 即与第 4、第 5和第 6数据段相关, 因此在步骤 b中, 分发单元从步骤 a选取出的来源数据中, 按照从高比特到低比特的顺序, 选 取 Unit*3宽度的数据作为有效数据; 在步骤 c中, 分发单元将宽度为 Unit*6 的数据输出到 Oz/c— 其中, 该输出数据从 0比特开始到第 (Unit*3-1 ) 比特, 为步骤 b 中选取出的有效数据(该有效数据按照相同的高低比特位置 作为输出结果的低比特数据段), 其余的高比特位置由 0填充。
图 4示出了分发单元为各 Oz/c— 电路选取的来源数据的示意图。 可以 看出, 分发单元为数据段 0 (第一个数据段 )对应的 Cede _ dat 选择数据段 0 作为来源数据 (宽度为 Unit*l ), 为数据段 1对应的 Calc— datl选择数据段 0 和数据段 1作为来源数据(宽度为 Unit*2 ), 为数据段 2对应的 Calc— dat2 i 择数据段 0、 数据段 1和数据段 2作为来源数据 (宽度为 Unit*3 ), 以此类推, 为数据段 N对应的 C /c— cfaW选择分配数据段 0至数据段 N作为来源数据(宽 度为 Unit*N )。
针对每个数据段, 分发单元根据当前数据段的片信息中的 Scramble no标 识确定出该当前数据段所属的子 MAC流, 将该子 MAC流对应的 58比特移 位寄存器的数值作为该当前数据段对应的 Calc— ^^电路的输入数据分配给 该当前数据段对应的 Calc— srg电路。 分发单元也可以将当前数据段的片信息 中的 Scramble no标识发送给对应的 Calc— srg电路, λ尺而使 Cede— srg电路根 据该 Scramble no标识, 从移位寄存器组中获得对应的移位寄存器的值。
图 5 为分发单元为加扰电路分配输入数据的示意图, 如图所示, 并行数 据被数据分段模块划分为 8个数据段 (数据段 0〜数据段 7 ), 子 MAC流 2中 包含 3个数据段(数据段 3〜5 ),分发单元为数据段 5对应的 Calc— dat电路分 配的数据如图所示, 其中, 斜线填充部分为需要输出的计算结果。
在 S104中, 每个加扰电路根据分配到的输入数据进行加扰处理, 并输出 加扰结果。 该过程中, 每个加扰电路中的 Oz/c— i 电路根据分发单元分配的 输入数据进行运算得出所述输入数据的每个比特位的运算结果, 由该数据段 的 scramble no 标识, 从运算结果中选择对应数据段的运算结果作为该 Calc dat电路的输出。 Calc— srg电路根据分发单元输出的 58比特进行计算, 由该数据段的 Scramble no标识, 从选择运算结果中选择相应宽度的数据作为 该 C /c— srg电路的输出。 两者的输出数据宽度均与段宽度相同, 并均输出到 XOR电路。
每个 Calc— dat电路可按照以下方式进行处理:
从分发单元得到该 Calc _ dat电路的输入数据后, 依据前述的并行加扰原 理, 计算该输入数据范围内的所有比特的运算结果。 比如:
对于 bQ , Calc dat电路对该比特位的运算结果为 b0
对于 t , Calc dat电路对该比特位的运算结果为 i; 对于 b62 , Calc dat电路对该比特位的运算结果为 b62 b23 b4■ 对于 3 , Calc— dat电路对该比特位的运算结果为 b63 A b24 b5■ 上述的计算结果宽度与输入数据宽度相同, 但考虑到其中只有本电路对 应数据段的计算结果才有意义, 因此仅输出该 Oz/c— i 电路对应数据段的计 算结果。 具体实施时, 可由分发单元将各 Oz/c— 电路所属的 scramble no 发送给 C"/c— cto电路, 这样, C"/c— cto电路在输出运算结果时, 就可以根 据该数据段的标识仅输出该数据段的运算结果。
每个 Calc— srg电路可按照以下方式进行处理:
从分发单元得到 Scramble no标识后, 从移位寄存器组中获得该 Scramble no标识对应的移位寄存器的 58比特寄存器值,然后依据前述的并行加扰原理 进行运算 (若 Calc— srg电路从分发单元直接获得移位寄存器值, 则省略前述 步骤)。 比如:
对于 bQ, — srg电路输出的结果为移位寄存器的第 39比特数值; 对于 , — srg电路输出的结果为移位寄存器的第 38比特数值; 对于 2 , C /c— ^^电路输出的结果为移位寄存器的以下比特值的异或 结果: 5*15 Λ 5^ Λ 5*34 Λ 5^;
对于 3 , C /c— ^^电路输出的结果为移位寄存器的以下比特值的异或 结果: 》S14 A A ^33 A ^52;
Calc srg电路的运算结果的数据宽度与 Oz/c— 电路的运算结果的数 据宽度相同, 图 6示出了分发单元为各 C /c— srg电路分配输入数据, 以及各 C /c— srg电路的运算结果的数据宽度的示意图。可以看出, C /c— srgO运算 结果的数据宽度为 Unit*l, Calc srgl 运算结果的数据宽度为 Unit*2, Calc srgO运算结果的数据宽度为 Unit*3, 以此类推, C¾/c— srg(N-l)运算 结果的数据宽度为 Unit*N。 同 Gfc 电路, 虽然上述的运算结果的数据宽 度与 Calc— dat电路的输入数据宽度相同, 但考虑到其中只有本电路对应数据 段的运算结果才有意义, 因此 C /c— srg电路在输出运算结果时, 可以根据该 数据段的 Scramble no仅输出该数据段的运算结果, 即, C /c— srg电路输出 结果的宽度为一个数据段的宽度。
Calc— dat电路和各 C /c— 电路的处理过程可并行进行。 各 XOR 电路将对应的 Calc _ dat电路和 Calc _ srg电路输出的运算结果 进行异或运算,并输出运算结果。每个 XOR电路输出的运算结果即为该 XOR 电路对应的数据段的加扰后的数据, 所有运算处理处理电路输出的运算结果 即构成了一个时钟周期收到的子 MAC流的加扰后的结果。
进一步的, 加扰电路除了输出加扰结果外, 还需要更新 58比特移位寄存 器的数值。 由前述并行加扰的原理可知, 58 比特移位寄存器的数值来自上一 时钟周期的加扰结果的末 58比特。 根据该原理, 针对每个数据段, 移位寄存 器更新模块根据当前数据段的片信息中的 Flag标识和 Stream no标识,确定出 当前数据段所属的子 MAC流, 并判断当前数据段是否是所属子 MAC流的最 后一个数据段, 若是, 则用该当前数据段所属的子 MAC 流的加扰结果的末 58比特的值, 更新该当前数据段所属子 MAC流对应的移位寄存器的数值。
图 7示出了更新移位寄存器值的示意图。如图中所示,每路子 MAC流包 含 2个数据段, 对于每路子 MAC流, 子 MAC流中的第二个数据段对应的 XOR电路输出的末 58比特, 用来更新该子 MAC流对应的移位寄存器值。
Calc srg电路和 Cede— dat电路的计算过程的并行处理, 使得本发明实 施例的并行加扰计算过程能够达到较高的运行速度, 满足逻辑设计的时序要 求。
通过以上描述可以看出, 本发明实施例提供的加扰方案, 将并行数据分 段, 配合段标识信息实现数据段的灵活分组和单独加扰处理。 该方案有效解 决了灵活带宽以太网的接口带宽和数量多样性对多个不同并行宽度加扰器的 处理要求。
综上所述, 釆用本发明实施例, 可以解决灵活分组的多个加扰器并行化 的大数据量计算问题。 传统方式需要针对不同规格加扰器设计多个并行化方 案, 加上分组的灵活性造成逻辑资源的大量占用, 而釆用本发明实施例, 可 以有效降低资源的占用且能满足时序的要求。
本发明实施例还提供了一种加扰装置。 参见图 8 , 为本发明实施例提供的 加扰装置的结构示意图。 所述加扰装置可以用于执行图 1 所示的方法。 所述 加扰装置可以是网絡装置的接收器。 所述接收器可以包括以太网接口。 所述 接收器可以通过 ASIC或者 FPGA实现。所述网絡装置可以是路由器、 网絡交 换机、 防火墙、 负载均衡器、 数据中心、 PTN装置或者 WDM装置。 如图所 示, 该加扰装置可包括:
接收单元 801 , 用于接收第一时钟周期的以太网帧流;
第一获得单元 802,用于从接收单元 801接收的所述第一时钟周期的以太 网帧流中获得 X个数据段, 所述 X个数据段是所述第一时钟周期的第一以太 网帧流的数据段, 所述 X个数据段中每个数据段的比特数量为 M , M为大 于 1的整数, X为正整数;
第二获得单元 803 ,用于从接收单元 801接收的所述第一时钟周期的以太 网帧流中获得 Y个数据段, 所述 Y个数据段是所述第一时钟周期的第二以太 网帧流的数据段, 所述 Y个数据段中每个数据段的比特数量为 M, Y为正整 数;
第一分发单元 804, 用于分别向 X个加扰电路 806分发 X个输入数据, 所述 X个加扰电路 806与所述 X个输入数据——对应;
第二分发单元 805 , 用于分别向 Y个加扰电路 806分发 Y个输入数据, 所述 Y个加 4尤电路 806与所述 Y个输入数据——对应;
所述 X个加扰电路 806, 用于分别利用第一分发单元 804分发的所述 X 个输入数据并根据加扰多项式并行地计算所述 X个数据段的加扰结果, 所述 X个数据段与所述 X个加扰电路 806——对应, 所述 X个加扰电路 806的每 个加扰电路被配置以并行地计算比特数量为 M的二进制序列的加扰结果; 所述 Y个加扰电路 806, 用于分别利用第二分发单元 805分发的所述 Y 个输入数据并根据所述加扰多项式并行地计算所述 Y个数据段的加扰结果, 所述 Y个数据段与所述 Y个加扰电路 806——对应, 所述 Y个加扰电路 806 的每个加扰电路被配置以并行地计算比特数量为 M 的二进制序列的加扰结 果。 所述 X个数据段包括第 1数据段至第 X数据段,所述 X个数据段承载在 所述第一时钟周期的第一以太网帧流中的位置的前后顺序依次为所述第 1 数 据段至所述第 X数据段;
第一分发单元 804具体用于: 向第 a加扰电路 806分发第 a输入数据, a 的取值为 1至 X中的所有整数;
所述第一分发单元 804具体用于:
分别向第一计算电路 8061和第二计算电路 8062分发第一数据和第二数 据,所述第 a输入数据包括所述第一数据和所述第二数据,所述第 a加扰电路 806包括所述第一计算电路 8061、 所述第二计算电路 8062以及第三计算电路 8063 (参见图 9A ), 所述第一数据包括所述第 1数据段至第 a数据段, 所述 第二数据包括第二时钟周期的第一以太网帧流的加扰结果的最后 N 比特, N 为所述加扰多项式的阶数, 所述第二时钟周期是所述第一时钟周期的上一个 时钟周期;
所述 X个加扰电路 806包括所述第 a加扰电路, 所述第 a加扰电路 806 用于利用所述第 a输入数据并根据所述加扰多项式并行地计算所述第 a数据段 的加扰结果;
所述第 a加扰电路 806利用所述第 a输入数据根据所述加扰多项式并行地 计算所述第 a数据段的加扰结果, 包括:
所述第一计算电路 8061用于对所述第一数据中的所述第 a数据段的每个 比特的所有相关比特执行异或计算以获得所述第 a数据段的每个比特的第一 结果;
所述第二计算电路 8062用于对所述第二数据中的所述第 a数据段的每个 比特的所有相关比特执行异或计算以获得所述第 a数据段的每个比特的第二 结果;
所述第三计算电路 8063用于对所述第 a数据段的每个比特的第一结果和 第二结果执行异或计算以获得所述第 a数据段的每个比特的加扰结果。
所述 Y个数据段包括第 X+1数据段至第 X+Y数据段, 所述 Y个数据段 承载在所述第一时钟周期的第二以太网帧流中的位置的前后顺序依次为所述 第 X+1数据段至所述第 X+Y数据段。
第二分发单元 85用于: 向第 X+b加扰电路 806分发第 X+b输入数据, b 的取值为 1至 Y中的所有整数;
所述第二分发单元 85具体用于:
分别向第四计算电路 8064和第五计算电路 8065分发第三数据和第四数 据, 所述第 X+b输入数据包括所述第三数据和所述第四数据, 所述第 X+b加 扰电路 806包括所述第四计算电路 8064、所述第五计算电路 8065以及第六计 算电路 8066 (参见图 9B ) , 所述第三数据包括所述第 X+1数据段至第 X+b数 据段, 所述第四数据包括所述第二时钟周期的第二以太网帧流的加扰结果的 最后 N比特;
所述 Y个加扰电路 806包括所述第 X+b加扰电路,所述第 X+b加扰电路 806 用于利用所述第 X+b 输入数据根据所述加扰多项式并行地计算所述第 X+b数据段的加扰结果;
所述第四计算电路 8064用于对所述第三数据中的所述第 X+b数据段的每 个比特的所有相关比特执行异或计算以获得所述第 X+b数据段的每个比特的 第一结果;
所述第五计算电路 8065用于对所述第四数据中的所述第 X+b数据段的每 个比特的所有相关比特执行异或计算以获得所述第 X+b数据段的每个比特的 第二结果;
所述第六计算电路 8066用于对所述第 X+b数据段的每个比特的第一结果 和第二结果执行异或计算以获得所述第 X+b数据段的每个比特的加扰结果。
其中, 所述第三数据包含的比特的数量是(X+b ) Μ , 所述第三数据的 高 b X M比特等于第一二进制序列,所述第一二进制序列包括 b个数据段,所 述 b个数据段在所述第一二进制序列的前后顺序依次为所述第 X+1数据段至 所述第 X+b数据段。
优选地, 所述 Y个数据段分别对应 Y片信息; 所述 Y片信息被用于指示 所述 Y个数据段属于所述第二以太网帧流, 以及被用于指示所述 Υ个数据段 中每个数据段在所述第二以太网帧流中的位置。 第二分发单元 805具体用于: 根据所述 Υ片信息从接收到的所述第一时钟周期的以太网帧流中获得所述第 二以太网帧流, 所述第二以太网帧流包括所述 Υ个数据段; 向所述第四计算 电路分发所述第二以太网帧流。
优选的, 所述 X个数据段分别对应 X片信息; 所述 X片信息被用于指示 所述 X个数据段属于所述第一以太网帧流, 以及被用于指示所述 X个数据段 中每个数据段在所述第一以太网帧流中的位置。 第一分发单元 804具体用于: 根据所述 X片信息从接收到的所述第一时钟周期的以太网帧流中获得所述第 一以太网帧流, 所述第一以太网帧流包括所述 X个数据段; 向所述第一计算 电路分发所述第一以太网帧流。
可选的, 所述 X片信息中的第一信息至第 X信息分别对应所述第一数据 段至第 X数据段,所述第 X信息还被用于指示所述第 X数据段是所述第一以 太网帧流中的最后一个数据段。 所述加扰装置还可包括: 存储单元(未在图 中示出),用于根据所述第 X信息存储所述第一时钟周期的所述第一以太网帧 流的加扰结果。
本发明实施例还提供了一种加扰装置。 所述加扰装置可以用于执行图 1 所示的方法。 所述装置可以是以下装置中的一种:
ΡΗΥ, 所述 ΡΗΥ可以通过 FPGA或者 ASIC实现。所述 PHY可以是网絡 接口卡( Network Interface Card, NIC )中的部件, 所述 NIC可以是线卡( Line Card )或者 PIC ( Physical Interface Card, 物理接口卡)。 所述 PHY可以包含 用于连接到 ( for interfacing to ) MAC的 Media-Independent Interface (媒体无 关接口, Mil );
PHY芯片 ( PHY chip ), 所述 PHY芯片可以包括多个 PHY。 所述 PHY 芯片可以通过 FPGA或者 ASIC实现;
系统芯片( system chip ),所述系统芯片可以包括多个 MAC以及多个 PHY; 所述系统芯片可以通过 FPGA或者 ASIC实现; 多端口以太网设备 ( multi-port Ethernet device ) , 所述多端口以太网设备 可以是以太网集线器、 以太网路由器或者以太网交换机。 所述多端口以太网 设备包括多个端口,每个端口可以包括系统芯片,所述系统芯片可以包括 MAC 和 PHY。 所述多端口以太网设备还可以将多个 MAC整合到一个 MAC芯片 ( MAC chip ) , 以及将多个 ΡΗΥ整合到一个 ΡΗΥ芯片。 所述多端口以太网设 备也可以将多个 MAC以及多个 PHY整合到一个系统芯片中。
该装置能够执行本发明上述实施例提供的加扰方法。
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序产 品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图 和 /或方框图中的每一流程和 /或方框、 以及流程图和 /或方框图中的流程 和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器, 使得通 过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流 程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的 装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设 备以特定方式工作的计算机可读存储器中, 使得存储在该计算机可读存储器 中的指令产生包括指令装置的制造品, 该指令装置实现在流程图一个流程或 多个流程和 /或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的 处理, 从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图 一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的步 骤。
尽管已描述了本发明的优选实施例, 但本领域内的技术人员一旦得知了 基本创造性概念, 则可对这些实施例作出另外的变更和修改。 所以, 所附权 利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。 发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权利要 求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。

Claims

权 利 要 求
1、 一种加扰方法, 其特征在于, 包括:
接收第一时钟周期的以太网帧流;
获得 X个数据段, 所述 X个数据段是所述第一时钟周期的第一以太网帧 流的数据段, 所述 X个数据段中每个数据段的比特数量为 M , M为大于 1 的整数, X为正整数;
获得 Y个数据段, 所述 Y个数据段是所述第一时钟周期的第二以太网帧 流的数据段, 所述 Y个数据段中每个数据段的比特数量为 M, Y为正整数; 分别向 X个加扰电路分发 X个输入数据 ,所述 X个加扰电路与所述 X个 输入数据——对应;
分别向 Y个加扰电路分发 Y个输入数据 ,所述 Y个加扰电路与所述 Y个 输入数据——对应;
所述 X个加扰电路分别利用所述 X个输入数据并根据加扰多项式并行地 计算所述 X个数据段的加扰结果,所述 X个数据段与所述 X个加扰电路—— 对应, 所述 X个加扰电路的每个加扰电路被配置以并行地计算比特数量为 M 的二进制序列的加扰结果;
所述 Y个加扰电路分别利用所述 Y个输入数据并根据所述加扰多项式并 行地计算所述 Y个数据段的加扰结果,所述 Y个数据段与所述 Y个加扰电路 ——对应, 所述 Y个加扰电路的每个加扰电路被配置以并行地计算比特数量 为 M的二进制序列的加扰结果。
2、 如权利要求 1所述的加扰方法, 其特征在于, 所述 X个数据段包括第 1数据段至第 X数据段, 所述 X个数据段承载在所述第一时钟周期的第一以 太网帧流中的位置的前后顺序依次为所述第 1数据段至所述第 X数据段; 所述分别向所述 X个加扰电路分发 X个输入数据, 包括: 向第 a加扰电 路分发第 a输入数据, a的取值为 1至 X中的所有整数; 其中, 所述向第 a加扰电路分发第 a输入数据包括:
分别向第一计算电路和第二计算电路分发第一数据和第二数 据, 所述第 a输入数据包括所述第一数据和所述第二数据, 所述第 a 加扰电路包括所述第一计算电路、 所述第二计算电路以及第三计算 电路, 所述第一数据包括所述第 1数据段至第 a数据段, 所述第二 数据包括第二时钟周期的第一以太网帧流的加扰结果的最后 N 比 特, N 为所述加扰多项式的阶数, 所述第二时钟周期是所述第一时 钟周期的上一个时钟周期;
所述 X个加扰电路分别利用所述 X个输入数据并根据加扰多项式并行地 计算所述 X个数据段的加扰结果, 包括: 所述第 a加扰电路利用所述第 a输 入数据根据所述加扰多项式并行地计算所述第 a数据段的加扰结果;
其中,所述第 a加扰电路利用所述第 a输入数据并根据所述加扰多项式并 行地计算所述第 a数据段的加扰结果, 包括:
所述第一计算电路对所述第一数据中的所述第 a数据段的每个 比特的所有相关比特执行异或计算以获得所述第 a数据段的每个比 特的第一结果;
所述第二计算电路对所述第二数据中的所述第 a数据段的每个 比特的所有相关比特执行异或计算以获得所述第 a数据段的每个比 特的第二结果;
所述第三计算电路对所述第 a数据段的每个比特的第一结果和 第二结果执行异或计算以获得所述第 a数据段的每个比特的加扰结 果。
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述 Y个数据段包括第 X+1数据段至第 X+Y数据段,所述 Y个数据段承载在所述第一时钟周期的第 二以太网帧流中的位置的前后顺序依次为所述第 X+1数据段至所述第 X+Y数 据段; 所述分别向所述 Y个加扰电路分发 Y个输入数据, 包括: 向第 X+b加扰 电路分发第 X+b输入数据, b的取值为 1至 Y中的所有整数;
其中, 所述向第 X+b加扰电路分发第 X+b输入数据包括:
分别向第四计算电路和第五计算电路分发第三数据和第四数 据, 所述第 X+b输入数据包括所述第三数据和所述第四数据, 所述 第 X+b加扰电路包括所述第四计算电路、 所述第五计算电路以及第 六计算电路,所述第三数据包括所述第 X+1数据段至第 X+b数据段, 所述第四数据包括所述第二时钟周期的第二以太网帧流的加扰结果 的最后 N比特;
所述 Y个加扰电路分别利用所述 Y个输入数据并根据所述加扰多项式并 行地计算所述 Y个数据段的加扰结果, 包括: 所述第 X+b加扰电路利用所述 第 X+b输入数据根据所述加扰多项式并行地计算所述第 X+b数据段的加扰结 果;
其中, 所述第 X+b加扰电路利用所述第 X+b输入数据根据所述加扰多项 式并行地计算所述第 X+b数据段的加扰结果, 包括:
所述第四计算电路对所述第三数据中的所述第 X+b数据段的每 个比特的所有相关比特执行异或计算以获得所述第 X+b数据段的每 个比特的第一结果;
所述第五计算电路对所述第四数据中的所述第 X+b数据段的每 个比特的所有相关比特执行异或计算以获得所述第 X+b数据段的每 个比特的第二结果;
所述第六计算电路对所述第 X+b数据段的每个比特的第一结果 和第二结果执行异或计算以获得所述第 X+b数据段的每个比特的加 扰结果。
4、 如权利要求 3所述的加扰方法, 其特征在于,
所述第三数据包含的比特的数量是(X+b ) Μ , 所述第三数据的高 b x M比特等于第一二进制序列, 所述第一二进制序列包括 b个数据段, 所述 b 个数据段在所述第一二进制序列的前后顺序依次为所述第 X+1数据段至所述 第 X+b数据段。
5、 如权利要求 3或 4所述的加扰方法, 其特征在于, 所述 Y个数据段分 别对应 Y片信息; 所述 Y片信息被用于指示所述 Y个数据段属于所述第二以 太网帧流, 以及被用于指示所述 Y个数据段中每个数据段在所述第二以太网 帧流中的位置;
所述向第四计算电路分发第三数据具体包括:
才艮据所述 Y 片信息从接收到的所述第一时钟周期的以太网帧流 中获得所述第二以太网帧流, 所述第二以太网帧流包括所述 Y个数 据段;
向所述第四计算电路分发所述第二以太网帧流。
6、 如权利要求 2-5中任一项所述的加扰方法, 其特征在于, 所述 X个数 据段分别对应 X片信息; 所述 X片信息被用于指示所述 X个数据段属于所述 第一以太网帧流, 以及被用于指示所述 X个数据段中每个数据段在所述第一 以太网帧流中的位置;
所述向第一计算电路分发第一数据, 包括:
才艮据所述 X 片信息从接收到的所述第一时钟周期的以太网帧流 中获得所述第一以太网帧流, 所述第一以太网帧流包括所述 X个数 据段;
向所述第一计算电路分发所述第一以太网帧流。
7、 如权利要求 6所述的加扰方法, 其特征在于, 所述 X片信息中的第一 信息至第 X信息分别对应所述第一数据段至第 X数据段,所述第 X信息还被 用于指示所述第 X数据段是所述第一以太网帧流中的最后一个数据段; 所述方法还包括:
根据所述第 X信息存储所述第一时钟周期的所述第一以太网帧流的加扰 结果。
8、 一种加扰装置, 其特征在于, 包括:
接收单元, 用于接收第一时钟周期的以太网帧流;
第一获得单元, 用于从所述接收单元接收的所述第一时钟周期的以太网 帧流中获得 X个数据段, 所述 X个数据段是所述第一时钟周期的第一以太网 帧流的数据段, 所述 X个数据段中每个数据段的比特数量为 M , M为大于 1 的整数, X为正整数;
第二获得单元, 用于从所述接收单元接收的所述第一时钟周期的以太网 帧流中获得 Y个数据段, 所述 Y个数据段是所述第一时钟周期的第二以太网 帧流的数据段, 所述 Y个数据段中每个数据段的比特数量为 M, Y为正整数; 第一分发单元, 用于分别向 X个加扰电路分发 X个输入数据, 所述 X个 加扰电路与所述 X个输入数据——对应;
第二分发单元, 用于分别向 Y个加扰电路分发 Y个输入数据, 所述 Y个 加扰电路与所述 Y个输入数据——对应;
所述 X个加扰电路, 用于分别利用所述第一分发单元分发的所述 X个输 入数据并根据加扰多项式并行地计算所述 X个数据段的加扰结果, 所述 X个 数据段与所述 X个加扰电路——对应, 所述 X个加扰电路的每个加扰电路被 配置以并行地计算比特数量为 M的二进制序列的加扰结果;
所述 Y个加扰电路, 用于分别利用所述第二分发单元分发的所述 Y个输 入数据并根据所述加扰多项式并行地计算所述 γ个数据段的加扰结果, 所述
Y个数据段与所述 Y个加 4尤电路——对应, 所述 Y个加 4尤电路的每个加 4尤电 路被配置以并行地计算比特数量为 M的二进制序列的加扰结果。
9、 如权利要求 8所述的加扰装置, 其特征在于, 所述 X个数据段包括第 1数据段至第 X数据段, 所述 X个数据段承载在所述第一时钟周期的第一以 太网帧流中的位置的前后顺序依次为所述第 1数据段至所述第 X数据段; 所述第一分发单元用于: 向第 a加扰电路分发第 a输入数据, a的取值为 1至 X中的所有整数;
所述第一分发单元具体用于:
分别向第一计算电路和第二计算电路分发第一数据和第二数据, 所述第 a 输入数据包括所述第一数据和所述第二数据, 所述第 a加扰电路包括所述第 一计算电路、 所述第二计算电路以及第三计算电路, 所述第一数据包括所述 第 1数据段至第 a数据段, 所述第二数据包括第二时钟周期的第一以太网帧 流的加扰结果的最后 N比特, N为所述加扰多项式的阶数, 所述第二时钟周 期是所述第一时钟周期的上一个时钟周期;
所述 X个加扰电路包括所述第 a加扰电路, 所述第 a加扰电路用于利用 所述第 a输入数据根据所述加扰多项式并行地计算所述第 a数据段的加扰结 果;
所述第一计算电路用于对所述第一数据中的所述第 a数据段的每个比特 的所有相关比特执行异或计算以获得所述第 a数据段的每个比特的第一结果; 所述第二计算电路用于对所述第二数据中的所述第 a数据段的每个比特 的所有相关比特执行异或计算以获得所述第 a数据段的每个比特的第二结果; 所述第三计算电路用于对所述第 a数据段的每个比特的第一结果和第二 结果执行异或计算以获得所述第 a数据段的每个比特的加扰结果。
10、 如权利要求 8或 9所述的加扰装置, 其特征在于, 所述 Y个数据段 包括第 X+1数据段至第 X+Y数据段, 所述 Y个数据段承载在所述第一时钟 周期的第二以太网帧流中的位置的前后顺序依次为所述第 X+1数据段至所述 第 X+Y数据段;
所述第二分发单元用于: 向第 X+b加扰电路分发第 X+b输入数据, b的 取值为 1至 Y中的所有整数; 所述第二分发单元具体用于:
分别向第四计算电路和第五计算电路分发第三数据和第四数据, 所述第
X+b输入数据包括所述第三数据和所述第四数据, 所述第 X+b加扰电路包括 所述第四计算电路、 所述第五计算电路以及第六计算电路, 所述第三数据包 括所述第 X+1数据段至第 X+b数据段, 所述第四数据包括所述第二时钟周期 的第二以太网帧流的加扰结果的最后 N比特;
所述 Y个加扰电路包括所述第 X+b加扰电路,所述第 X+b加扰电路用于 利用所述第 X+b输入数据根据所述加扰多项式并行地计算所述第 X+b数据段 的加扰结果;
所述第四计算电路用于对所述第三数据中的所述第 X+b数据段的每个比 特的所有相关比特执行异或计算以获得所述第 X+b数据段的每个比特的第一 结果;
所述第五计算电路用于对所述第四数据中的所述第 X+b数据段的每个比 特的所有相关比特执行异或计算以获得所述第 X+b数据段的每个比特的第二 结果;
所述第六计算电路用于对所述第 X+b数据段的每个比特的第一结果和第 二结果执行异或计算以获得所述第 X+b数据段的每个比特的加扰结果。
11、 如权利要求 10所述的加扰装置, 其特征在于,
所述第三数据包含的比特的数量是(X+b ) Μ, 所述第三数据的高 b x M比特等于第一二进制序列, 所述第一二进制序列包括 b个数据段, 所述 b 个数据段在所述第一二进制序列的前后顺序依次为所述第 X+1数据段至所述 第 X+b数据段。
12、 如权利要求 10或 11所述的加扰装置, 其特征在于, 所述 Y个数据 段分别对应 Y片信息;所述 Y片信息被用于指示所述 Y个数据段属于所述第 二以太网帧流, 以及被用于指示所述 Y个数据段中每个数据段在所述第二以 太网帧流中的位置;
所述第二分发单元具体用于:
才艮据所述 Y片信息从接收到的所述第一时钟周期的以太网帧流中获得所 述第二以太网帧流, 所述第二以太网帧流包括所述 Y个数据段; 向所述第四 计算电路分发所述第二以太网帧流。
13、 如权利要求 9-12中任一项所述的加扰装置, 其特征在于, 所述 X个 数据段分别对应 X片信息; 所述 X片信息被用于指示所述 X个数据段属于所 述第一以太网帧流, 以及被用于指示所述 X个数据段中每个数据段在所述第 一以太网帧流中的位置;
所述第一分发单元具体用于:
才艮据所述 X片信息从接收到的所述第一时钟周期的以太网帧流中获得所 述第一以太网帧流, 所述第一以太网帧流包括所述 X个数据段; 向所述第一 计算电路分发所述第一以太网帧流。
14、 如权利要求 12所述的加扰装置, 其特征在于, 所述 X片信息中的第 一信息至第 X信息分别对应所述第一数据段至第 X数据段,所述第 X信息还 被用于指示所述第 X数据段是所述第一以太网帧流中的最后一个数据段; 所述加扰装置还包括:
存储单元, 用于根据所述第 X信息存储所述第一时钟周期的所述第一以 太网帧流的加扰结果。
PCT/CN2013/091126 2013-12-31 2013-12-31 一种加扰方法及加扰装置 WO2015100621A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201380003211.4A CN105009540B (zh) 2013-12-31 2013-12-31 一种加扰方法及加扰装置
PCT/CN2013/091126 WO2015100621A1 (zh) 2013-12-31 2013-12-31 一种加扰方法及加扰装置
EP13900689.4A EP3079324B1 (en) 2013-12-31 2013-12-31 Scrambling method and scrambling apparatus
US15/199,707 US9716605B2 (en) 2013-12-31 2016-06-30 Scrambling method and scrambling apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/091126 WO2015100621A1 (zh) 2013-12-31 2013-12-31 一种加扰方法及加扰装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/199,707 Continuation US9716605B2 (en) 2013-12-31 2016-06-30 Scrambling method and scrambling apparatus

Publications (1)

Publication Number Publication Date
WO2015100621A1 true WO2015100621A1 (zh) 2015-07-09

Family

ID=53492972

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/091126 WO2015100621A1 (zh) 2013-12-31 2013-12-31 一种加扰方法及加扰装置

Country Status (4)

Country Link
US (1) US9716605B2 (zh)
EP (1) EP3079324B1 (zh)
CN (1) CN105009540B (zh)
WO (1) WO2015100621A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107431672A (zh) * 2015-11-30 2017-12-01 华为技术有限公司 一种数据加扰方法和加扰装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107615839B (zh) * 2015-05-15 2020-03-31 华为技术有限公司 处理子信令段的方法、处理装置、接入点和站点
US11277217B2 (en) 2015-06-30 2022-03-15 Ciena Corporation Flexible Ethernet switching systems and methods
US9800361B2 (en) 2015-06-30 2017-10-24 Ciena Corporation Flexible ethernet switching systems and methods
CN111884900B (zh) 2016-07-06 2023-07-18 华为技术有限公司 发送数据的方法和转发设备
CN112039779A (zh) * 2016-07-06 2020-12-04 华为技术有限公司 生成转发表的方法和转发设备
CN107888345B (zh) * 2016-09-29 2022-02-18 中兴通讯股份有限公司 一种信息传输的方法和设备
CN107979438B (zh) * 2016-10-21 2020-04-24 深圳市中兴微电子技术有限公司 一种phy交织方法及装置
CN113489658B (zh) * 2017-10-31 2022-10-28 华为技术有限公司 一种处理灵活以太网的数据的方法及相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040062397A1 (en) * 2002-09-18 2004-04-01 Icefyre Semiconductor Corporation Parallel scrambler/descrambler
US7269778B1 (en) * 2002-10-15 2007-09-11 Marvell International Ltd. Data coding for enforcing constraints on ones and zeros in a communications channel
CN101098299A (zh) * 2006-06-27 2008-01-02 中兴通讯股份有限公司 一种比特加扰的并行方法及装置
CN102932100A (zh) * 2012-10-16 2013-02-13 四川电力科学研究院 一种并行加扰的方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3403650A1 (de) 1984-02-02 1985-08-08 Siemens AG, 1000 Berlin und 8000 München Selbstsynchronisierender verwuerfler (scrambler)
DE3420801A1 (de) 1984-06-04 1985-12-05 Siemens AG, 1000 Berlin und 8000 München Selbstsynchronisierender verwuerfler
US20030044005A1 (en) * 2001-08-15 2003-03-06 Lee Eugene W. Data scrambler
CA2366397A1 (en) * 2001-12-31 2003-06-30 Tropic Networks Inc. An interface for data transfer between integrated circuits
WO2007132165A1 (en) * 2006-05-04 2007-11-22 Nds Limited Scrambled digital data item
US8553785B2 (en) * 2008-12-31 2013-10-08 Stmicroelectronics, Inc. Apparatus and method for transmitting and recovering encoded data streams across physical medium attachments
CN102694709B (zh) * 2012-05-18 2014-06-25 天津大学 基于dmt的高速1553b通信总线发送方法与装置
CN104426631B (zh) * 2013-09-06 2018-03-06 华为技术有限公司 对数据进行处理的方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040062397A1 (en) * 2002-09-18 2004-04-01 Icefyre Semiconductor Corporation Parallel scrambler/descrambler
US7269778B1 (en) * 2002-10-15 2007-09-11 Marvell International Ltd. Data coding for enforcing constraints on ones and zeros in a communications channel
CN101098299A (zh) * 2006-06-27 2008-01-02 中兴通讯股份有限公司 一种比特加扰的并行方法及装置
CN102932100A (zh) * 2012-10-16 2013-02-13 四川电力科学研究院 一种并行加扰的方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107431672A (zh) * 2015-11-30 2017-12-01 华为技术有限公司 一种数据加扰方法和加扰装置
EP3376725A4 (en) * 2015-11-30 2018-12-05 Huawei Technologies Co., Ltd. Data scrambling method and scrambling apparatus
CN107431672B (zh) * 2015-11-30 2020-02-14 华为技术有限公司 一种数据加扰方法和加扰装置
US10715360B2 (en) 2015-11-30 2020-07-14 Huawei Technologies Co., Ltd. Data scrambling method and scrambling apparatus

Also Published As

Publication number Publication date
US9716605B2 (en) 2017-07-25
EP3079324A1 (en) 2016-10-12
US20160315793A1 (en) 2016-10-27
CN105009540B (zh) 2018-06-19
CN105009540A (zh) 2015-10-28
EP3079324B1 (en) 2020-02-05
EP3079324A4 (en) 2016-12-07

Similar Documents

Publication Publication Date Title
WO2015100621A1 (zh) 一种加扰方法及加扰装置
JP7498749B2 (ja) コードブロックの分割を実現する方法及び装置
ES2760514T3 (es) Método de transmisión de señal de servicio y un dispositivo de comunicaciones que utiliza un canal de Ethernet
US10211852B2 (en) CRC calculation method, and apparatus
CN109792637B (zh) 通过切分前传接口的用户平面数据的传输
EP3043497B1 (en) Data processing method and device
US7697529B2 (en) Fabric channel control apparatus and method
CN109417533B (zh) 发送数据的方法和转发设备
US8804763B2 (en) Transmission of data over parallel links
CN105103454A (zh) 模块化且可扩展的循环冗余校验计算电路
US20200280371A1 (en) Method, device, and system for transmitting data
CN109845217B (zh) 灵活以太网中传输数据的方法和设备
TW201246842A (en) Network transceiver and bandwidth management method thereof
JP2017510155A (ja) 制御コードのためのポインタの生成を含む、受信されたシンボルを集約およびエンコーディングするための方法および装置
US8442070B1 (en) Fractional threshold encoding and aggregation
CN110752878A (zh) 一种数据处理方法及装置
EP3661070B1 (en) Transmission device and transmission method
US9871733B2 (en) Policer architecture
EP2720398B1 (en) Mechanism for packet FEC bandwidth optimization
WO2014017036A1 (ja) データ伝送装置、データ分割装置及びデータ分割方法
US10708246B1 (en) Extending cryptographic-key lifespan in network encryption protocols
KR102117758B1 (ko) 전력 플랫폼 서버 환경상에서의 경량 암호 고속화 연산 처리 방법
KR102382626B1 (ko) 프레임 전송 방법 및 이를 수행하는 무선 통신 장치
KR102475874B1 (ko) 근접 통신을 위한 무선 통신 방법 및 장치
CN113726737A (zh) 一种通信方法、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13900689

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2013900689

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013900689

Country of ref document: EP