WO2019165954A1 - Data bit width conversion method and device, and computer-readable storage medium - Google Patents

Data bit width conversion method and device, and computer-readable storage medium Download PDF

Info

Publication number
WO2019165954A1
WO2019165954A1 PCT/CN2019/076141 CN2019076141W WO2019165954A1 WO 2019165954 A1 WO2019165954 A1 WO 2019165954A1 CN 2019076141 W CN2019076141 W CN 2019076141W WO 2019165954 A1 WO2019165954 A1 WO 2019165954A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit width
data bit
conversion
parallel data
cross
Prior art date
Application number
PCT/CN2019/076141
Other languages
French (fr)
Chinese (zh)
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 深圳市中兴微电子技术有限公司
Publication of WO2019165954A1 publication Critical patent/WO2019165954A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M9/00Parallel/series conversion or vice versa
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0004Parallel ports, e.g. centronics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/38Universal adapter
    • G06F2213/3852Converter between protocols

Definitions

  • Embodiments of the present invention relate to, but are not limited to, the field of digital communication technologies, and in particular, to a method and apparatus for data bit width conversion, and a computer readable storage medium.
  • PCS Physical coding sublayer
  • the PCS encoding mode is different in different protocol application scenarios.
  • the specific PCS encoding mode can also be in various forms.
  • the JESD204B protocol uses 8B/10B encoding
  • the JESD204C includes 64B/66B and 64B/80B, such as 128B/130B encoding in the PCIE protocol.
  • the coding methods contained in the PCS are different under different transmission rates, for example, 100BASE-X uses 4B/5B encoding, 1GBASE-R uses 8bB/10B encoding, and 10GBASE-R uses 64B/66B encoding.
  • the PCS When the 50G rate or higher, the PCS needs to have a distribution function, and to support Forward Error Correction (FEC) or RS (Reed Solomon)-FEC, according to its specific FEC/RS-FEC
  • FEC Forward Error Correction
  • RS Random Solomon
  • the degree of parallelism of the implementation methods is different, and the bit width of the parallel data that causes the PCS to interact with Serdes is related to the degree of parallelism of the implementation method.
  • the parallel data bit width supported by Serdes does not exactly match the parallel bit width of the PCS encoded output. Therefore, a flexible and efficient cross-clock high-speed data bit width conversion solution is required without changing the data transfer rate. It became a key issue for parallel data docking between PCS and Serdes. For this problem, no effective solution has been proposed yet.
  • Embodiments of the present invention provide a data bit width conversion method and apparatus, and a computer readable storage medium, to implement parallel data bit width matching between PCS/FEC and Serdes of each interface protocol.
  • a method of data bit width conversion comprising:
  • Parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing are performed based on the control information.
  • the parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  • the method further includes: determining, according to the parallel data conversion information, whether data transmission rates before and after conversion are consistent;
  • the data conversion information, the step of generating control information for data bit width conversion includes: generating control information for data bit width conversion according to the parallel data conversion information when the data transmission rates before and after the conversion are the same.
  • the step of determining whether the data transmission rates before and after the conversion are consistent according to the parallel data conversion information includes: determining a product of a first parallel data bit width before conversion and a corresponding first clock frequency, and converting the second parallel data. Whether the product of the bit width and the second clock frequency is the same.
  • the step of generating control information for data bit width conversion according to the parallel data conversion information includes: generating an indication including the indication when the first parallel data bit width before the conversion is smaller than the converted second parallel data bit width Control information of a mode of routing information; when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width, generating control information including routing information indicating the second mode; wherein, the first In the mode, the parallel data bit width conversion is prior to the cross clock domain operation; in the second mode, the cross clock domain operation is prior to the parallel data bit width conversion mode.
  • the control information includes: routing information, the routing information is used to indicate a mode used for data bit width conversion, and the mode includes a first mode or a second mode, where the parallel mode is performed in the first mode.
  • the step of performing data bit width conversion, cross-clock domain operation, and cross-clock anti-shake processing based on the control information includes: performing data bit width conversion, cross-clock domain operation, and cross-clock prevention by using a mode indicated by the routing information Jitter processing.
  • the input data first completes the data bit width conversion of the first parallel data bit width to the second parallel data bit width at the first clock frequency, and then The data of the second parallel data bit width performs a cross-clock domain operation from the first clock frequency to the second clock frequency, and performs cross-clock anti-shake processing during the cross-clock operation.
  • the data of the first parallel data bit width first completes the cross-clock domain operation from the first clock frequency to the second clock frequency, and is in a cross-clock operation process. Performing cross-clock anti-shake processing, and then performing data bit width conversion of the first parallel data bit width to the second parallel data bit width at the second clock frequency.
  • the control information includes: buffer configuration information, where the buffer configuration information includes: capacity information of the buffer unit, and read and write configuration information;
  • the control information includes: storage configuration information, where the storage configuration information includes: capacity information of the storage unit, and read and write configuration information;
  • the control information includes: anti-jitter configuration information, where the anti-jitter configuration information includes: period information of anti-shake monitoring and a read-write recovery address;
  • the cross-clock anti-shake processing includes: monitoring the read/write address of the storage unit according to the period information of the anti-shake monitoring; if the relative offset of the read/write address is within the jitter range tolerance information, The read/write address is maintained; if the relative offset of the read/write address is not within the jitter range tolerance information, the read/write address is restored according to the read/write recovery address.
  • a data bit width conversion device includes: a controller and a data bit width conversion circuit
  • the controller includes: a storage unit configured to store a computer program, the processing unit configured to read the computer program to perform an operation of generating a data bit according to the parallel data conversion information Wide conversion control information;
  • the data bit width conversion circuit is configured to perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  • the parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  • the processing unit is configured to read the computer program to perform an operation of: determining, according to the parallel data conversion information, whether data transmission rates before and after conversion are consistent; when data transmission rates before and after conversion are consistent, according to parallel data
  • the conversion information generates control information for data bit width conversion.
  • processing unit is configured to read the computer program to perform the following operations:
  • LCM is the least common multiple of w i and w o
  • w i represents the first parallel data bit width before conversion
  • w o represents the converted second parallel data bit width
  • N i represents the data written at the first clock frequency. number of cycles
  • N o represents the number of read data at a second frequency clock cycle.
  • processing unit is configured to read the computer program to perform the following operations:
  • control information including routing information indicating the first mode when the first parallel data bit width before the conversion is less than the converted second parallel data bit width;
  • control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width;
  • the parallel data bit width conversion is prior to the cross-clock domain operation; in the second mode, the cross-clock domain operation is prior, and the parallel data bit width is converted. Rear.
  • the storage unit is further configured to store the control information
  • the data bit width conversion circuit is configured to read the control information from the storage unit, and perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  • the control information includes: routing information, where the routing information is used to indicate a first mode and a second mode of data bit width conversion, and in the first mode, the parallel data bit width is converted first, After the cross-clock domain operation, in the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion; the data bit width conversion circuit is configured to: use the routing information to indicate The mode performs data bit width conversion, cross clock domain operation, and cross clock anti-shake processing.
  • the data bit width conversion circuit includes: a data bit width conversion buffer module, a cross clock domain storage module, and a cross clock anti-jitter module; the data bit width conversion buffer module is configured to complete parallel data bit width conversion;
  • the cross-clock domain storage module is configured to perform cross-clock domain operation;
  • the cross-clock anti-jitter module is configured to complete cross-clock anti-shake processing; wherein the data bit width conversion buffer module and the cross-clock domain storage module
  • the inter-clock domain storage module is interoperable with the cross-clock anti-jitter module.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to perform the following operations:
  • control information for data bit width conversion is generated such that the data bit width conversion circuit performs parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  • the parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  • LCM is the least common multiple of w i and w o
  • w i represents the first parallel data bit width before conversion
  • w o represents the converted second parallel data bit width
  • N i represents the data written at the first clock frequency. number of cycles
  • N o represents the number of read data at a second frequency clock cycle.
  • control information including routing information indicating the first mode when the first parallel data bit width before the conversion is less than the converted second parallel data bit width;
  • control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width;
  • the parallel data bit width conversion is prior to the cross-clock domain operation; in the second mode, the cross-clock domain operation is prior, and the parallel data bit width is converted. Rear.
  • the control information includes one or more of the following:
  • the routing information is used to indicate a mode used by the data bit width conversion, where the mode is a first mode or a second mode, and in the first mode, the parallel data bit width conversion is prior to the cross clock domain operation After the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion;
  • the buffer configuration information used for the parallel data bit width conversion includes: capacity information of the buffer unit, and read and write configuration information;
  • Storage configuration information for the operation of the cross-clock domain including: capacity information of the storage unit, read and write configuration information;
  • the anti-jitter configuration information used for the cross-clock anti-shake processing includes: period information of anti-shake monitoring and a read/write recovery address.
  • the parallel data bit width matching between the PCS/FEC and the Serdes of each interface protocol can be realized, and the trans-clock high-speed data bit width conversion can be flexibly and efficiently realized without changing the data transmission rate, thereby reducing PCS and Serdes. Constraint in actual design.
  • the embodiment of the invention can be widely applied to various protocol scenarios such as CPRI, Ethernet, PCIE and JESD204 and different transmission rate requirements in the communication technology, and can support the conversion function of any parallel data bit width between the PCS and the Serdes of the high-speed serial port protocol. , with great versatility and compatibility.
  • FIG. 1 is a schematic flow chart of a data bit width conversion method according to Embodiment 1;
  • FIG. 2 is a schematic flow chart of a specific implementation manner of a data bit width conversion method
  • FIG. 3 is a schematic diagram of a trend of a data stream in a data conversion circuit in a first mode
  • FIG. 4 is a schematic diagram showing a trend of a data flow in a data conversion circuit in a second mode
  • FIG. 5 is a schematic structural diagram of a data bit width conversion device of Embodiment 2.
  • FIG. 6 is a block diagram showing an exemplary embodiment of a data bit width conversion device.
  • a method for data bit width conversion includes:
  • Step 101 Generate control information for data bit width conversion according to parallel data conversion information.
  • Step 102 Perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  • the parallel data conversion information may include: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  • the method may further include: determining, according to the parallel data conversion information, whether the data transmission rate before and after the conversion is consistent;
  • the generating control information for data bit width conversion according to the parallel data conversion information includes: generating control information for data bit width conversion according to the parallel data conversion information when the data transmission rates before and after the conversion are consistent.
  • determining whether the data transmission rate before and after the conversion is consistent according to the parallel data conversion information may include: determining a product of a first parallel data bit width before conversion and a corresponding first clock frequency, and converting the second parallel data. Whether the product of the bit width and the second clock frequency is the same. If they are the same, the data transmission rate before and after the conversion is the same. If they are not the same, the data transmission rate before and after the conversion is inconsistent.
  • the generating control information for data bit width conversion according to the parallel data conversion information may include: the first parallel data bit width before the conversion is smaller than the converted second parallel data bit Width-time, generating control information including routing information indicating the first mode; generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width
  • the parallel data bit width conversion is prior to the cross-clock domain operation
  • the cross-clock domain operation is prior to the parallel data bit The width is converted later.
  • control information may include: routing information, where the routing information is used to indicate a mode used for data bit width conversion, where the mode is a first mode or a second mode, where the first In the mode, the parallel data bit width conversion is preceded by the cross clock domain operation, and in the second mode, the cross clock domain operation is prior, and the parallel data bit width is converted later.
  • the performing data bit width conversion, the cross-clock domain operation, and the cross-clock anti-shake processing based on the control information may include: performing data bit width conversion, cross-clock domain operation, and cross-clock prevention by using the mode indicated by the routing information. Jitter processing.
  • the input data first performs data bit width conversion from the first parallel data bit width to the second parallel data bit width at the first clock frequency, and then The data of the second parallel data bit width performs a cross-clock domain operation from the first clock frequency to the second clock frequency, and performs cross-clock anti-shake processing during the cross-clock operation.
  • the data of the first parallel data bit width first completes the cross-clock domain operation from the first clock frequency to the second clock frequency, and operates across the clock.
  • the process performs cross-clock anti-shake processing, and then performs data bit width conversion of the first parallel data bit width to the second parallel data bit width at the second clock frequency.
  • control information may include: buffering configuration information, where the buffering configuration information includes: capacity information of the buffer unit, read and write configuration information, and generating a corresponding storage capacity according to the capacity information of the buffer unit. And buffering the unit, and completing the parallel data bit width conversion according to the read/write configuration information of the buffer unit.
  • control information may include: storage configuration information, where the storage configuration information includes: capacity information of the storage unit, read and write configuration information; and generating a corresponding storage capacity according to the capacity information of the storage unit.
  • the storage unit performs the cross-clock domain operation of the same data bit width according to the read and write configuration information of the storage unit.
  • control information may include: anti-jitter configuration information, where the anti-jitter configuration information includes: period information of anti-shake monitoring and a read/write recovery address.
  • the cross-clock anti-shake processing may include: monitoring a read/write address of the storage unit according to the period information of the anti-shake monitoring; if the relative offset of the read/write address is within the jitter range tolerance information, And maintaining the read/write address; if the relative offset of the read/write address is not within the jitter range tolerance information, recovering the read/write address according to the read/write recovery address.
  • the foregoing method in this embodiment can be implemented in a software and hardware cooperative manner, and supports conversion of an arbitrary data bit width.
  • the parallel data conversion information is first set to the software and is arbitrated by the software (ie, whether to perform data bit width conversion); the control information for data conversion is generated by software calculation; the hardware part According to the control information, the mode used for data bit width conversion is automatically matched; the hardware part performs corresponding data bit width conversion according to this mode, and the data bit width conversion includes: parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing. .
  • the software calculates the control information when generating the data conversion, which greatly reduces the hardware logic resources and greatly enriches the flexibility of the hardware design; the software controllable cross-clock anti-jitter also has universal applicability. Meet the anti-jitter requirements of different clock frequencies, so that the system has better stability.
  • the above method of the embodiment can be widely applied to various protocol scenarios such as CPRI, Ethernet, PCIE and JESD204 in communication technologies and different transmission rate requirements, and can support any parallel data bit width between PCS and Serdes of high-speed serial port protocols.
  • the conversion function has strong versatility and compatibility; the method of the embodiment can realize parallel data bit width matching of different PCS and Serdes, and reduces the constraint of PCS and Serdes in actual design.
  • the above data bit width conversion method of this embodiment may include the following steps:
  • Step 201 to step 203 setting parallel data conversion information to the software and arbitrating by software.
  • the parallel data conversion information is set, and the software arbitration parallel data conversion information is correct. If it is correct, the process proceeds to step 204. If not, the software prompts an input error and prompts to re-enter the correct parallel data conversion information.
  • the parallel data conversion information input to the software may include the parallel data bit width w i and the corresponding clock frequency f i before conversion and the converted parallel data bit width w o and the corresponding clock frequency f o , in order to ensure PCS and Serdes.
  • Step 204 to step 205 calculating and generating control information for data conversion.
  • the software calculates and generates data conversion control information, and stores the control information in the control information storage module.
  • the process of calculating the control information may include: the software generates routing information according to w i and w o , calculates buffer configuration information required for parallel data bit width conversion, storage configuration information required for operation across clock domains, and cross-clock anti-jitter Process the required anti-jitter configuration information and write these related control information to the control information storage module.
  • the software generates routing information according to w i and w o , calculates buffer configuration information required for parallel data bit width conversion, storage configuration information required for operation across clock domains, and cross-clock anti-jitter Process the required anti-jitter configuration information and write these related control information to the control information storage module.
  • the buffer storage capacity corresponding to the corresponding depth ie, the buffer unit below
  • the cross clock storage capacity ie, the following storage unit
  • LCM is the least common multiple of w i and w o
  • N i represents the number of cycles of writing data at clock frequency f i
  • N o represents the number of cycles of reading data at clock frequency f o .
  • the buffering configuration information includes: capacity information of the buffer unit, read and write configuration information, and the read/write configuration information of the buffer unit may include: read/write control information of the buffer unit and specific read/write position information.
  • the storage configuration information includes: storage unit capacity information and read/write configuration information, and the read/write configuration information of the storage unit may include read/write control information and read/write address information of the storage unit.
  • the anti-jitter configuration information includes: period information of anti-shake monitoring and a read/write recovery address.
  • Steps 206 to 212 the data bit width conversion circuit reads the control information and performs parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  • Step 206 Read control information from the control information storage module, and perform data bit width conversion according to the mode indicated by the routing information in the control information.
  • the data flow is processed according to the path shown in FIG. 3, and steps 207 to 209 are performed, and the input data first enters the data bit width conversion buffer module for parallel data bit width conversion, at the clock frequency.
  • the conversion of the data bit width from w i to w o is completed under f i , and then the converted data enters the cross-clock memory module for cross-clock domain operation, and the data of w o bit width is completed from the clock frequency f i to the clock frequency f o
  • cross-clock anti-shake processing is performed by the cross-clock anti-jitter module during the conversion of the cross-clock storage module.
  • the data bit width conversion buffer module first acquires the buffer information of the buffer unit from the control information storage module to generate the buffer unit of the corresponding storage capacity, that is, the data bit width conversion buffer module generates the minimum storage as w i *(N i -N o +1) bits (that is, buffer unit capacity information) buffer unit, buffer unit (according to read and write control information and read and write address information) continuously write w i bit width data, when writing (N i -N o) after the shot, the data read from the buffer unit bit width w o, N o and read continuously shot, and then stops reading (N i -N o) beat, and in accordance with the periodic law The read, completes the conversion of the data bit width in the same clock domain.
  • the cross-clock storage module acquires the capacity information of the storage unit from the control information storage module to generate a storage unit of the corresponding storage capacity, and performs the cross-clock domain operation on the data of the w o -bit width converted by the bit width through the storage unit, and writes the storage unit the same clock frequency f i, the read clock frequency f o, the write enable buffer unit periodicity and the read cycle, read enable enable enable delay by the write clock is generated after N o cross shot, which avoids the read-write delay Conflicts, and continue to be valid after generation, the depth of the memory cell is 2*N o +X, where X is the write enable enable maximum stable time data for read enable to complete the operation across the clock domain through the memory unit.
  • the data flow is processed according to the path shown in FIG. 4, and the steps 210 to 212 are performed.
  • the input data first enters the cross-clock storage module to perform the cross-clock domain operation, and the w i -bit width is completed.
  • the data is converted from the clock frequency f i to the clock frequency f o
  • the cross-clock anti-shake module is processed by the cross-clock anti-shake module during the conversion process of the cross-clock memory module, and then the data converted across the clock enters the data bit width.
  • the conversion buffer module performs parallel data bit width conversion, and completes the conversion of the data bit width from w i to w o at the clock frequency f o .
  • the cross-clock storage module acquires the storage unit capacity information from the control information storage module to generate a storage unit corresponding to the storage capacity, and the w i -bit wide data is first written into the storage unit to perform cross-clock domain operation.
  • the write clock frequency of the memory cell is f i and the read clock frequency is f o .
  • the depth of the memory cell is 2*N i +X, and the read enable is generated by the write enable delay N i after the clock.
  • the capacity information (w i *(N i -N o +1) bits) generates a buffer unit that is minimally stored as w i *(N i -N o +1) bits, and w i bits wide after the clock
  • the write buffer unit performs bit width conversion, and the minimum storage of the buffer unit is [w i +(w i -w o )*(N i -1) ], and the write enable of the buffer unit is the same as the read enable of the memory unit, both of which are consecutively written to N i beats, then stop writing (N o -N i ) beats, and periodically follow the rule, and Since w i >w
  • N anti-shake detection
  • the number of traversal cycles of the storage unit is calculated by the software based on the constraint relationship described above and configured in the control information storage module and read and executed by the cross-clock anti-jitter module.
  • the read/write addresses of the memory cells of the inter-clock memory module should be in a one-to-one correspondence, so the anti-shake processing detects the read/write address of the memory cell as a read/write address at a periodic monitoring point.
  • the address is restored, and the corresponding read/write address of the monitoring point is recorded in the control information storage module. If the deviation range of the detection address of the storage unit exceeds half of the depth of the storage unit, the read address of the storage unit is forcibly restored to the recorded Read and write recovery addresses to avoid read and write conflicts and complete cross-clock anti-shake processing.
  • a data bit width conversion device as shown in Figure 5, comprising: a controller 51 and a data bit width conversion circuit 52;
  • the controller 51 includes a storage unit and a processing unit (not shown) configured to store a computer program, the processing unit configured to read the computer program to perform an operation of: converting according to parallel data Information, generating control information for data bit width conversion;
  • the data bit width conversion circuit 52 is configurable to perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  • the parallel data conversion information may include: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  • the processing unit is configured to read the computer program to perform an operation of: determining, according to the parallel data conversion information, whether data transmission rates before and after conversion are consistent; when data transmission rates before and after conversion are consistent, Control information for data bit width conversion is generated based on the parallel data conversion information.
  • the processing unit is configured to read the computer program to perform an operation of: generating an indication including the first when the first parallel data bit width before the conversion is smaller than the converted second parallel data bit width Control information of the routing information of the mode; generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width; wherein the first mode
  • the parallel data bit width conversion is preceded by the cross clock domain operation; in the second mode, the cross clock domain operation is prior, and the parallel data bit width is converted later.
  • the storage unit is further configured to store the control information; the data bit width conversion circuit is configured to read the control information from the storage unit, and perform the control information based on the control information. Parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing.
  • the storage unit may include a control information storage module, and the control information storage module is configured to store the control information.
  • control information may include: routing information, where the routing information is used to indicate a first mode and a second mode of data bit width conversion, where the parallel data bit width is converted in the first mode First, the cross-clock domain operation is followed. In the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion; the data bit width conversion circuit 52 is configured to: adopt The mode indicated by the routing information performs data bit width conversion, cross clock domain operation, and cross clock anti-shake processing.
  • the data bit width conversion circuit 52 may include: a data bit width conversion buffer module 521, a cross clock domain storage module 522, and a cross clock anti-jitter module 523; wherein, the data bit width conversion buffer module is used.
  • the cross clock domain storage module 522 is used to complete the cross clock domain operation
  • the cross clock anti-jitter module 523 is used to complete the cross clock anti-shake processing.
  • the data bit width conversion buffer module 521 and the cross-clock domain storage module 522 are intercommunicated, and the cross-clock domain storage module 522 and the cross-clock anti-shake module 523 are intercommunicated.
  • the input data first enters the data bit width conversion buffer module 521, and the first parallel is completed at the first clock frequency.
  • Inter-clock anti-shake processing is performed by the cross-clock anti-shake module 523 during operation across the clock domain and during operation across the clock domain.
  • the data of the first parallel data bit width is input to the cross-clock domain storage module 522, and the first clock frequency is first completed. Converting to a cross-clock domain operation of the second clock frequency, and performing cross-clock anti-shake processing by the cross-clock anti-jitter module 523 during operation across the clock domain, and then entering the data bit width conversion buffer module 521, The data width-to-width conversion of the first parallel data bit width to the second parallel data bit width is completed at the second clock frequency.
  • control information may include: buffer configuration information, where the buffer configuration information includes: capacity information of the buffer unit, and read and write configuration information; and the data bit width conversion buffer module 521 is specifically configured to use the capacity of the buffer unit.
  • the information generates a buffer unit 5211 of the corresponding storage capacity, and completes the data bit width conversion according to the read/write configuration information of the buffer unit 5211.
  • control information may include: storage configuration information, where the storage configuration information includes: storage unit capacity information, read-write configuration information; the cross-clock domain storage module 522 is specifically configured to use the storage unit capacity information.
  • the storage unit 5222 of the corresponding storage capacity is generated, and the cross-clock domain operation of the same data bit width is completed according to the read and write configuration information of the storage unit 5222.
  • control information may include: anti-shake configuration information, where the anti-jitter configuration information includes: anti-jitter monitoring period information and a read-write recovery address; the cross-clock anti-jitter module 523 may be specifically used for And monitoring the read/write address of the storage unit 5222 according to the period information of the anti-shake monitoring; if the relative offset of the read/write address is within the jitter range tolerance information, maintaining the read/write address; If the relative offset of the write address is not within the jitter range tolerance information, the read/write address is restored according to the read/write recovery address.
  • anti-jitter configuration information includes: anti-jitter monitoring period information and a read-write recovery address
  • the cross-clock anti-jitter module 523 may be specifically used for And monitoring the read/write address of the storage unit 5222 according to the period information of the anti-shake monitoring; if the relative offset of the read/write address is within the jitter range tolerance information, maintaining the read/write address; If the relative offset of the write address is not within the jitter range tolerance
  • FIG. 6 is a schematic structural diagram of an exemplary embodiment of the foregoing apparatus according to the embodiment.
  • the data bit width conversion device is arranged between the PCS and the Serdes to realize the conversion of any parallel data bit width between the PCS and the Serdes of the high speed serial port protocol.
  • the input is the parallel data bit width w i before conversion and the corresponding clock frequency f i and the converted parallel data bit width w o and the corresponding clock frequency f o , according to these data controllers Automatically calculating control information required to generate an arbitrary bit width conversion, the control information including routing information, buffer unit capacity information, storage unit capacity information, buffer unit read and write configuration information, storage unit read and write configuration information, anti-shake
  • the controller may store the calculated control information in a hardware control information storage module for use by the data bit width conversion circuit.
  • the control information storage module is responsible for storing the control information required for each step of the data bit width conversion, and converting the control information into the data bit width buffer module, the cross clock storage module, and the cross clock prevention. Jitter module.
  • the controller if w i ⁇ w o , the controller generates routing information indicating the first mode, and if w i >w o , the controller generates routing information indicating the second mode.
  • the input data first enters the data bit width conversion buffer module, completes the conversion of the data bit width from w i to w o at the clock frequency f i , and then enters the converted data into the cross-clock storage module to complete w o
  • the bit width data is converted from the clock frequency f i to the clock frequency f o ; finally, the cross clock anti-jitter module is input for cross-clock anti-shake processing.
  • the input data first enters the cross-clock storage module, and the data of the w i -bit width is converted from the clock frequency f i to the clock frequency f o , and then the data after the cross-clock operation enters the cross-clock anti-jitter module for cross-
  • the clock anti-shake processing finally enters the data bit width conversion buffer module to complete the conversion of the data bit width from w i to w o at the clock frequency f o .
  • the data bit width conversion buffer module is responsible for obtaining the buffer unit of the corresponding storage capacity by acquiring the capacity information of the buffer unit from the control information storage module, and then completing the data bit width according to the buffer unit read/write control information and the specific read/write position information. Conversion.
  • the cross-clock storage module is responsible for acquiring the storage unit capacity information from the control information storage module to generate a storage unit corresponding to the storage capacity, and then completing the crossover of the same data bit width according to the read/write control information and the read-write address information of the storage unit. Clock domain function.
  • the cross-clock anti-jitter module is responsible for obtaining the period information of the anti-jitter monitoring from the control information storage module, and monitoring the read/write address of the cross-clock storage unit according to the period, if the relative offset of the read-write address is In the jitter range tolerance information, the corresponding read/write address is maintained. Otherwise, the read address recovery is completed according to the recovery information of the read address, and the cross-clock anti-shake function is implemented.
  • the above device in this embodiment performs arbitrary data bit width conversion by cooperative processing of software and hardware.
  • the device of the embodiment can realize the parallel data bit width matching of different PCS and Serdes, and reduces the constraint of the design of the PCS and the Serdes; the software calculates the control information required for the data conversion, thereby greatly reducing the hardware logic resources. And greatly enrich the flexibility of hardware design; software controllable cross-clock anti-jitter design also has universal applicability, meet the anti-jitter requirements of different clock frequencies, and enhance the stability of the system.
  • the above device of the present embodiment can be widely applied to various protocol scenarios such as CPRI, Ethernet, PCIE and JESD204 in communication technologies and different transmission rate requirements.
  • the method and device can support any parallel data between PCS and Serdes of high-speed serial port protocols.
  • the bit width conversion function is extremely versatile and compatible.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to perform an operation of: generating control information for data bit width conversion according to parallel data conversion information So that the data bit width conversion circuit performs parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  • the parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  • the computer program when executed by the processor, the following operations are performed: determining whether the data transmission rate before and after the conversion is consistent according to the parallel data conversion information; and converting the data according to the parallel data when the data transmission rates before and after the conversion are consistent Generate control information for data bit width conversion.
  • the computer program is executed by the processor to: determine a product of a first parallel data bit width before conversion and a corresponding first clock frequency, and a second parallel data bit width after conversion Whether the product of the second clock frequency is the same, and the same is used to generate control information for data bit width conversion based on the parallel data conversion information.
  • other methods can be used, and will not be described again.
  • the following operations are performed: when the first parallel data bit width before the conversion is smaller than the converted second parallel data bit width, generating routing information indicating the first mode is generated. Control information; when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width, generating control information including routing information indicating the second mode; wherein, in the first mode, the parallel The data bit width conversion is prior to the cross clock domain operation; in the second mode, the cross clock domain operation is prior, and the parallel data bit width is converted later.
  • control information includes one or more of the following:
  • the routing information is used to indicate a mode used by the data bit width conversion, where the mode is a first mode or a second mode, and in the first mode, the parallel data bit width conversion is prior to the cross clock domain operation After the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion;
  • the buffer configuration information used for the parallel data bit width conversion includes: capacity information of the buffer unit, and read and write configuration information;
  • Storage configuration information for the operation of the cross-clock domain including: capacity information of the storage unit, and read and write configuration information;
  • the anti-jitter configuration information used for the cross-clock anti-shake processing includes: period information of anti-shake monitoring and a read/write recovery address.
  • each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function.
  • This application is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

A data bit width conversion method and device, and a computer-readable storage medium. The method comprises: generating, according to parallel data conversion information, control information of data bit width conversion; and performing, based on the control information, parallel data bit width conversion, a cross-clock-domain operation and cross-clock anti-jitter processing. According to the embodiments of the present invention, the matching of a parallel data bit width between a PCS/FEC and Serdes of various interface protocols can be realized.

Description

一种数据位宽转换的方法及装置、计算机可读存储介质Method and device for data bit width conversion, computer readable storage medium 技术领域Technical field
本发明实施例涉及但不限于数字通信技术领域,尤其涉及一种数据位宽转换的方法及装置、计算机可读存储介质。Embodiments of the present invention relate to, but are not limited to, the field of digital communication technologies, and in particular, to a method and apparatus for data bit width conversion, and a computer readable storage medium.
背景技术Background technique
在数字通信领域中,常应用于芯片级联,背板互连等,并且广泛适用于通用公共无线电接口(CPRI,Common Public Radio Interface)、以太网、高速串行计算机扩展总线标准(PCIE,Peripheral Component Interconnect Express)、JESD204等协议场景中在高速串行接口技术中,作为关键技术之一的串并/并串转换器(Serdes)将不同协议场景的物理编码子层(PCS)与不同物理媒介相关层相连接,实现数据在电缆、光纤等不同媒介上的高速传输。In the field of digital communication, it is often used in chip cascading, backplane interconnection, etc., and is widely applicable to the Common Public Radio Interface (CPRI), Ethernet, and high-speed serial computer expansion bus standard (PCIE, Peripheral). In the high-speed serial interface technology, such as Component Interconnect Express) and JESD204, serial/parallel-serial converter (Serdes), one of the key technologies, uses the physical coding sublayer (PCS) of different protocol scenarios and different physical media. The related layers are connected to realize high-speed transmission of data on different media such as cables and optical fibers.
不同的协议应用场景中PCS编码方式不尽相同,在相同协议场景下具体的PCS编码方式也有多种形式。比如,JESD204B协议采用8B/10B编码,JESD204C则包含64B/66B和64B/80B,如PCIE协议中采用128B/130B编码。在IEEE 802.3协议标准中,不同的传输速率下PCS内部包含的编码方法也不同,例如100BASE-X采用4B/5B编码,1GBASE-R采用8bB/10B编码,而10GBASE-R采用64B/66B编码,在50G速率以上时PCS还需要具有分发功能,并且要支持前向纠错方式(FEC,Forward Error Correction)或者RS(reed solomon,里德所罗门)-FEC时,根据其具体的FEC/RS-FEC的实现方法的并行度不同,导致PCS与Serdes交互的并行数据的位宽与实现方法的并行度相关。往往Serdes支持的并行数据位宽与PCS编码输出后的并行位宽并不完全匹配,因此,在不改变数据传输速率的前提下需要一个灵活高效的跨时钟高速数据位宽转换的解决方案,这成了PCS与Serdes的并行数据对接的关键问题。而针对该问题,目前尚未提出有效的解决方案。The PCS encoding mode is different in different protocol application scenarios. In the same protocol scenario, the specific PCS encoding mode can also be in various forms. For example, the JESD204B protocol uses 8B/10B encoding, and the JESD204C includes 64B/66B and 64B/80B, such as 128B/130B encoding in the PCIE protocol. In the IEEE 802.3 protocol standard, the coding methods contained in the PCS are different under different transmission rates, for example, 100BASE-X uses 4B/5B encoding, 1GBASE-R uses 8bB/10B encoding, and 10GBASE-R uses 64B/66B encoding. When the 50G rate or higher, the PCS needs to have a distribution function, and to support Forward Error Correction (FEC) or RS (Reed Solomon)-FEC, according to its specific FEC/RS-FEC The degree of parallelism of the implementation methods is different, and the bit width of the parallel data that causes the PCS to interact with Serdes is related to the degree of parallelism of the implementation method. Often the parallel data bit width supported by Serdes does not exactly match the parallel bit width of the PCS encoded output. Therefore, a flexible and efficient cross-clock high-speed data bit width conversion solution is required without changing the data transfer rate. It became a key issue for parallel data docking between PCS and Serdes. For this problem, no effective solution has been proposed yet.
发明概述Summary of invention
本发明实施例提供了一种数据位宽转换的方法及装置、计算机可读存储介质,以实现各接口协议的PCS/FEC和Serdes之间并行数据位宽匹配。Embodiments of the present invention provide a data bit width conversion method and apparatus, and a computer readable storage medium, to implement parallel data bit width matching between PCS/FEC and Serdes of each interface protocol.
本申请提供了如下技术方案。The application provides the following technical solutions.
一种数据位宽转换的方法,包括:A method of data bit width conversion, comprising:
根据并行数据转换信息,生成用于数据位宽转换的控制信息;Generating control information for data bit width conversion according to parallel data conversion information;
基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。Parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing are performed based on the control information.
其中,所述并行数据转换信息包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。The parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
其中,所述根据并行数据转换信息,生成用于数据位宽转换的控制信息的步骤之前,该方法还包括:根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;所述根据并行数据转换信息,生成用于数据位宽转换的控制信息的步骤包括:在转换前后的数据传输速率一致时,根据并行数据转换信息生成用于数据位宽转换的控制信息。Before the step of generating control information for data bit width conversion according to the parallel data conversion information, the method further includes: determining, according to the parallel data conversion information, whether data transmission rates before and after conversion are consistent; The data conversion information, the step of generating control information for data bit width conversion includes: generating control information for data bit width conversion according to the parallel data conversion information when the data transmission rates before and after the conversion are the same.
其中,根据所述并行数据转换信息确定转换前后的数据传输速率是否一致的步骤包括:判断转换前的第一并行数据位宽与其对应的第一时钟频率的乘积、和转换后的第二并行数据位宽与第二时钟频率的乘积是否相同。The step of determining whether the data transmission rates before and after the conversion are consistent according to the parallel data conversion information includes: determining a product of a first parallel data bit width before conversion and a corresponding first clock frequency, and converting the second parallel data. Whether the product of the bit width and the second clock frequency is the same.
其中,所述根据所述并行数据转换信息确定转换前后的数据传输速率是否一致的步骤包括:根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息;其中,LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 The step of determining whether the data transmission rates before and after the conversion are consistent according to the parallel data conversion information includes: generating, according to the parallel data conversion information, based on w i *N i =w o *N o =LCM Control information; wherein LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, w o represents the converted second parallel data bit width, and N i represents the first clock frequency The number of cycles of writing data, N o represents the number of cycles of reading data at the second clock frequency.
其中,所述根据并行数据转换信息,生成用于数据位宽转换的控制信息的步骤包括:在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;其中,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数 据位宽转换在后的模式。The step of generating control information for data bit width conversion according to the parallel data conversion information includes: generating an indication including the indication when the first parallel data bit width before the conversion is smaller than the converted second parallel data bit width Control information of a mode of routing information; when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width, generating control information including routing information indicating the second mode; wherein, the first In the mode, the parallel data bit width conversion is prior to the cross clock domain operation; in the second mode, the cross clock domain operation is prior to the parallel data bit width conversion mode.
其中,所述控制信息包括:路由信息,所述路由信息用于指示数据位宽转换使用的模式,所述模式包括第一模式或第二模式,其中,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后;The control information includes: routing information, the routing information is used to indicate a mode used for data bit width conversion, and the mode includes a first mode or a second mode, where the parallel mode is performed in the first mode. Data bit width conversion first, the cross clock domain operation is followed, in the second mode, the cross clock domain operation is prior, and the parallel data bit width is converted after;
所述基于所述控制信息进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理的步骤包括:采用所述路由信息指示的模式进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The step of performing data bit width conversion, cross-clock domain operation, and cross-clock anti-shake processing based on the control information includes: performing data bit width conversion, cross-clock domain operation, and cross-clock prevention by using a mode indicated by the routing information Jitter processing.
其中,所述控制信息包含的路由信息指示为第一模式时,输入的数据首先在第一时钟频率下完成第一并行数据位宽到第二并行数据位宽的数据位宽转换,然后对所述第二并行数据位宽的数据执行从第一时钟频率转换到第二时钟频率的跨时钟域操作,并在跨时钟操作过程中进行跨时钟防抖动处理。Wherein, when the routing information included in the control information is indicated as the first mode, the input data first completes the data bit width conversion of the first parallel data bit width to the second parallel data bit width at the first clock frequency, and then The data of the second parallel data bit width performs a cross-clock domain operation from the first clock frequency to the second clock frequency, and performs cross-clock anti-shake processing during the cross-clock operation.
其中,所述控制信息包含的路由信息指示为第二模式时,第一并行数据位宽的数据首先完成从第一时钟频率转换到第二时钟频率的跨时钟域操作,并在跨时钟操作过程中进行跨时钟防抖动处理,然后在第二时钟频率下完成第一并行数据位宽到第二并行数据位宽的数据位宽转换。Wherein, when the routing information included in the control information is indicated as the second mode, the data of the first parallel data bit width first completes the cross-clock domain operation from the first clock frequency to the second clock frequency, and is in a cross-clock operation process. Performing cross-clock anti-shake processing, and then performing data bit width conversion of the first parallel data bit width to the second parallel data bit width at the second clock frequency.
其中,所述控制信息包括:缓冲配置信息,该缓冲配置信息包括:缓冲单元的容量信息、读写配置信息;The control information includes: buffer configuration information, where the buffer configuration information includes: capacity information of the buffer unit, and read and write configuration information;
根据所述缓冲单元的容量信息生成相应存储容量的缓冲单元,并根据所述缓冲单元的读写配置信息完成所述并行数据位宽转换。And generating a buffer unit corresponding to the storage capacity according to the capacity information of the buffer unit, and completing the parallel data bit width conversion according to the read/write configuration information of the buffer unit.
其中,所述控制信息包括:存储配置信息,该存储配置信息包括:存储单元的容量信息、读写配置信息;The control information includes: storage configuration information, where the storage configuration information includes: capacity information of the storage unit, and read and write configuration information;
根据所述存储单元的容量信息生成相应存储容量的存储单元,并根据所述存储单元的读写配置信息完成相同数据位宽的所述跨时钟域操作。Generating a storage unit of a corresponding storage capacity according to the capacity information of the storage unit, and completing the cross-clock domain operation of the same data bit width according to the read/write configuration information of the storage unit.
其中,所述控制信息包括:防抖动配置信息,该防抖动配置信息包括:防抖动监测的周期信息和读写恢复地址;The control information includes: anti-jitter configuration information, where the anti-jitter configuration information includes: period information of anti-shake monitoring and a read-write recovery address;
所述跨时钟防抖动处理包括:根据所述防抖动监测的周期信息对所述存储单元的读写地址进行监测;如果读写地址的相对偏移量在抖动范围容限信 息内,则维持所述读写地址;如果读写地址的相对偏移量不在抖动范围容限信息内,则根据所述读写恢复地址进行读写地址的恢复。The cross-clock anti-shake processing includes: monitoring the read/write address of the storage unit according to the period information of the anti-shake monitoring; if the relative offset of the read/write address is within the jitter range tolerance information, The read/write address is maintained; if the relative offset of the read/write address is not within the jitter range tolerance information, the read/write address is restored according to the read/write recovery address.
一种数据位宽转换装置,包括:控制器和数据位宽转换电路;A data bit width conversion device includes: a controller and a data bit width conversion circuit;
所述控制器,包括:存储部和处理部,所述存储部配置存储计算机程序,所述处理部配置为读取所述计算机程序以执行如下操作:根据并行数据转换信息,生成用于数据位宽转换的控制信息;The controller includes: a storage unit configured to store a computer program, the processing unit configured to read the computer program to perform an operation of generating a data bit according to the parallel data conversion information Wide conversion control information;
所述数据位宽转换电路,配置为基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The data bit width conversion circuit is configured to perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
其中,所述并行数据转换信息包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。The parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
其中,所述处理部是配置为读取所述计算机程序以执行如下操作:根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;在转换前后的数据传输速率一致时,根据并行数据转换信息生成用于数据位宽转换的控制信息。The processing unit is configured to read the computer program to perform an operation of: determining, according to the parallel data conversion information, whether data transmission rates before and after conversion are consistent; when data transmission rates before and after conversion are consistent, according to parallel data The conversion information generates control information for data bit width conversion.
其中,所述处理部是配置为读取所述计算机程序以执行如下操作:Wherein the processing unit is configured to read the computer program to perform the following operations:
根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息; Generating the control information according to the parallel data conversion information and based on w i *N i =w o *N o =LCM;
其中,LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 Where LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, w o represents the converted second parallel data bit width, and N i represents the data written at the first clock frequency. number of cycles, N o represents the number of read data at a second frequency clock cycle.
其中,所述处理部是配置为读取所述计算机程序以执行如下操作:Wherein the processing unit is configured to read the computer program to perform the following operations:
在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;Generating control information including routing information indicating the first mode when the first parallel data bit width before the conversion is less than the converted second parallel data bit width;
在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;Generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width;
所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。In the first mode, the parallel data bit width conversion is prior to the cross-clock domain operation; in the second mode, the cross-clock domain operation is prior, and the parallel data bit width is converted. Rear.
其中,所述存储部,还配置为存储所述控制信息;The storage unit is further configured to store the control information;
所述数据位宽转换电路,是配置为从所述存储部中读取所述控制信息,并基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The data bit width conversion circuit is configured to read the control information from the storage unit, and perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
其中,所述控制信息包括:路由信息,所述路由信息用于指示数据位宽转换的第一模式和第二模式,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后;所述数据位宽转换电路是配置为:采用所述路由信息指示的模式进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The control information includes: routing information, where the routing information is used to indicate a first mode and a second mode of data bit width conversion, and in the first mode, the parallel data bit width is converted first, After the cross-clock domain operation, in the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion; the data bit width conversion circuit is configured to: use the routing information to indicate The mode performs data bit width conversion, cross clock domain operation, and cross clock anti-shake processing.
其中,所述数据位宽转换电路包括:数据位宽转换缓冲模块、跨时钟域存储模块、以及跨时钟防抖动模块;所述数据位宽转换缓冲模块用于完成并行数据位宽转换;所述跨时钟域存储模块用于完成跨时钟域操作;所述跨时钟防抖动模块用于完成跨时钟防抖动处理;其中,所述数据位宽转换缓冲模块与所述跨时钟域存储模块之间互通,所述跨时钟域存储模块与所述跨时钟防抖动模块互通。The data bit width conversion circuit includes: a data bit width conversion buffer module, a cross clock domain storage module, and a cross clock anti-jitter module; the data bit width conversion buffer module is configured to complete parallel data bit width conversion; The cross-clock domain storage module is configured to perform cross-clock domain operation; the cross-clock anti-jitter module is configured to complete cross-clock anti-shake processing; wherein the data bit width conversion buffer module and the cross-clock domain storage module The inter-clock domain storage module is interoperable with the cross-clock anti-jitter module.
一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时执行如下操作:A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to perform the following operations:
根据并行数据转换信息,生成用于数据位宽转换的控制信息,以便数据位宽转换电路基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。Based on the parallel data conversion information, control information for data bit width conversion is generated such that the data bit width conversion circuit performs parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
其中,所述并行数据转换信息包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。The parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
其中,所述计算机程序被处理器执行时执行如下操作:Wherein, when the computer program is executed by the processor, the following operations are performed:
根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;在转换前后的数据传输速率一致时,根据并行数据转换信息生成用于数据位宽转换的控制信息。Determining whether the data transmission rates before and after the conversion are consistent according to the parallel data conversion information; and generating control information for data bit width conversion according to the parallel data conversion information when the data transmission rates before and after the conversion are consistent.
其中,所述计算机程序被处理器执行时执行如下操作:Wherein, when the computer program is executed by the processor, the following operations are performed:
判断转换前的第一并行数据位宽与其对应的第一时钟频率的乘积、和转 换后的第二并行数据位宽与第二时钟频率的乘积是否相同,相同时根据并行数据转换信息生成用于数据位宽转换的控制信息。Determining whether the product of the first parallel data bit width before conversion and its corresponding first clock frequency, and the product of the converted second parallel data bit width and the second clock frequency are the same, and generating the same according to the parallel data conversion information Control information for data bit width conversion.
其中,所述计算机程序被处理器执行时执行如下操作:Wherein, when the computer program is executed by the processor, the following operations are performed:
根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息; Generating the control information according to the parallel data conversion information and based on w i *N i =w o *N o =LCM;
其中,LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 Where LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, w o represents the converted second parallel data bit width, and N i represents the data written at the first clock frequency. number of cycles, N o represents the number of read data at a second frequency clock cycle.
其中,所述计算机程序被处理器执行时执行如下操作:Wherein, when the computer program is executed by the processor, the following operations are performed:
在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;Generating control information including routing information indicating the first mode when the first parallel data bit width before the conversion is less than the converted second parallel data bit width;
在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;Generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width;
所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。In the first mode, the parallel data bit width conversion is prior to the cross-clock domain operation; in the second mode, the cross-clock domain operation is prior, and the parallel data bit width is converted. Rear.
其中,所述控制信息包括如下之一或多项:The control information includes one or more of the following:
路由信息,用于指示数据位宽转换使用的模式,所述模式为第一模式或第二模式,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后;The routing information is used to indicate a mode used by the data bit width conversion, where the mode is a first mode or a second mode, and in the first mode, the parallel data bit width conversion is prior to the cross clock domain operation After the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion;
用于所述并行数据位宽转换的缓冲配置信息,包括:缓冲单元的容量信息、读写配置信息;The buffer configuration information used for the parallel data bit width conversion includes: capacity information of the buffer unit, and read and write configuration information;
用于所述跨时钟域操作的存储配置信息,包括:存储单元的容量信息、读写配置信息;Storage configuration information for the operation of the cross-clock domain, including: capacity information of the storage unit, read and write configuration information;
用于所述跨时钟防抖动处理的防抖动配置信息,包括:防抖动监测的周期信息和读写恢复地址。The anti-jitter configuration information used for the cross-clock anti-shake processing includes: period information of anti-shake monitoring and a read/write recovery address.
本发明实施例,可实现各接口协议的PCS/FEC与Serdes的并行数据位 宽匹配,能够在不改变数据传输速率的前提下灵活高效的实现跨时钟高速数据位宽转换,减少了PCS和Serdes在实际设计上的约束性。In the embodiment of the invention, the parallel data bit width matching between the PCS/FEC and the Serdes of each interface protocol can be realized, and the trans-clock high-speed data bit width conversion can be flexibly and efficiently realized without changing the data transmission rate, thereby reducing PCS and Serdes. Constraint in actual design.
本发明实施例,可广泛适用于通信技术中如CPRI、以太网,PCIE和JESD204等各种协议场景及不同传输速率需求,可支持高速串口各协议PCS与Serdes间任意并行数据位宽的转换功能,具有极强的通用性和兼容性。The embodiment of the invention can be widely applied to various protocol scenarios such as CPRI, Ethernet, PCIE and JESD204 and different transmission rate requirements in the communication technology, and can support the conversion function of any parallel data bit width between the PCS and the Serdes of the high-speed serial port protocol. , with great versatility and compatibility.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the invention will be set forth in the description which follows, The objectives and other advantages of the invention may be realized and obtained by means of the structure particularly pointed in the appended claims.
附图概述BRIEF abstract
附图用来提供对本发明技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本发明的技术方案,并不构成对本发明技术方案的限制。The drawings are used to provide a further understanding of the technical solutions of the present invention, and constitute a part of the specification, which together with the embodiments of the present application are used to explain the technical solutions of the present invention, and do not constitute a limitation of the technical solutions of the present invention.
图1为实施例一数据位宽转换方法的流程示意图;1 is a schematic flow chart of a data bit width conversion method according to Embodiment 1;
图2为数据位宽转换方法一种具体实现方式的流程示意图;2 is a schematic flow chart of a specific implementation manner of a data bit width conversion method;
图3为第一模式下数据流在数据转换电路中的走向示意图;3 is a schematic diagram of a trend of a data stream in a data conversion circuit in a first mode;
图4为第二模式下数据流在数据转换电路中的走向示意图;4 is a schematic diagram showing a trend of a data flow in a data conversion circuit in a second mode;
图5为实施例二数据位宽转换装置的结构示意图;5 is a schematic structural diagram of a data bit width conversion device of Embodiment 2;
图6为数据位宽转换装置示例性实施方式的架构示意图。6 is a block diagram showing an exemplary embodiment of a data bit width conversion device.
详述Detailed
以下是对本文详细描述的主题的概述,本概述并非为了限制权利要求的保护范围。The following is a summary of the subject matter described in detail herein, and is not intended to limit the scope of the claims.
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下, 可以以不同于此处的顺序执行所示出或描述的步骤。The steps illustrated in the flowchart of the figures may be executed in a computer system such as a set of computer executable instructions. Also, although the logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than the ones described herein.
针对相关技术中各接口协议的PCS/FEC和Serdes之间并行数据位宽不匹配的问题,本申请提供了如下的技术方案。For the problem that the parallel data bit width mismatch between the PCS/FEC and the Serdes of each interface protocol in the related art, the following technical solutions are provided.
下面对本申请技术方案的实现方式进行详细说明。The implementation manner of the technical solution of the present application is described in detail below.
实施例一Embodiment 1
如图1所示,本发明实施例的一种数据位宽转换的方法,包括:As shown in FIG. 1, a method for data bit width conversion according to an embodiment of the present invention includes:
步骤101,根据并行数据转换信息,生成用于数据位宽转换的控制信息;Step 101: Generate control information for data bit width conversion according to parallel data conversion information.
步骤102,基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。Step 102: Perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
本实施例中,所述并行数据转换信息可以包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。In this embodiment, the parallel data conversion information may include: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
本实施例中,所述根据并行数据转换信息,生成用于数据位宽转换的控制信息之前,还可以包括:根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;In this embodiment, before the generating the control information for the data bit width conversion according to the parallel data conversion information, the method may further include: determining, according to the parallel data conversion information, whether the data transmission rate before and after the conversion is consistent;
所述根据并行数据转换信息,生成用于数据位宽转换的控制信息,包括:在转换前后的数据传输速率一致时,根据并行数据转换信息生成用于数据位宽转换的控制信息。The generating control information for data bit width conversion according to the parallel data conversion information includes: generating control information for data bit width conversion according to the parallel data conversion information when the data transmission rates before and after the conversion are consistent.
这里,根据所述并行数据转换信息确定转换前后的数据传输速率是否一致,可以包括:判断转换前的第一并行数据位宽与其对应的第一时钟频率的乘积、和转换后的第二并行数据位宽与第二时钟频率的乘积是否相同。如果相同则说明转换前后的数据传输速率一致,如果不相同则说明转换前后的数据传输速率不一致。Here, determining whether the data transmission rate before and after the conversion is consistent according to the parallel data conversion information may include: determining a product of a first parallel data bit width before conversion and a corresponding first clock frequency, and converting the second parallel data. Whether the product of the bit width and the second clock frequency is the same. If they are the same, the data transmission rate before and after the conversion is the same. If they are not the same, the data transmission rate before and after the conversion is inconsistent.
一种示例性的实现方式中,所述根据并行数据转换信息,生成用于数据位宽转换的控制信息,可以包括:根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息;其中,LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 In an exemplary implementation, the generating control information for data bit width conversion according to the parallel data conversion information may include: converting information according to the parallel data and based on w i *N i =w o *N o = LCM, generating the control information; wherein LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, and w o represents the converted second parallel data bit width, N i represents the number of cycles of writing data at the first clock frequency, and N o represents the number of cycles of reading data at the second clock frequency.
一种示例性的实现方式中,所述根据并行数据转换信息,生成用于数据位宽转换的控制信息,可以包括:在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;其中,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。In an exemplary implementation, the generating control information for data bit width conversion according to the parallel data conversion information may include: the first parallel data bit width before the conversion is smaller than the converted second parallel data bit Width-time, generating control information including routing information indicating the first mode; generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width Wherein, in the first mode, the parallel data bit width conversion is prior to the cross-clock domain operation; and in the second mode, the cross-clock domain operation is prior to the parallel data bit The width is converted later.
一种示例性的实现方式中,所述控制信息可以包括:路由信息,所述路由信息用于指示数据位宽转换使用的模式,所述模式为第一模式或第二模式,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。所述基于所述控制信息进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理,可以包括:采用所述路由信息指示的模式进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。In an exemplary implementation, the control information may include: routing information, where the routing information is used to indicate a mode used for data bit width conversion, where the mode is a first mode or a second mode, where the first In the mode, the parallel data bit width conversion is preceded by the cross clock domain operation, and in the second mode, the cross clock domain operation is prior, and the parallel data bit width is converted later. The performing data bit width conversion, the cross-clock domain operation, and the cross-clock anti-shake processing based on the control information may include: performing data bit width conversion, cross-clock domain operation, and cross-clock prevention by using the mode indicated by the routing information. Jitter processing.
具体的,所述控制信息包含的路由信息指示为第一模式时,输入的数据首先在第一时钟频率下完成第一并行数据位宽到第二并行数据位宽的数据位宽转换,然后对所述第二并行数据位宽的数据执行从第一时钟频率转换到第二时钟频率的跨时钟域操作,并在跨时钟操作过程中进行跨时钟防抖动处理。Specifically, when the routing information included in the control information is indicated as the first mode, the input data first performs data bit width conversion from the first parallel data bit width to the second parallel data bit width at the first clock frequency, and then The data of the second parallel data bit width performs a cross-clock domain operation from the first clock frequency to the second clock frequency, and performs cross-clock anti-shake processing during the cross-clock operation.
具体的,所述控制信息包含的路由信息指示为第二模式时,第一并行数据位宽的数据首先完成从第一时钟频率转换到第二时钟频率的跨时钟域操作,并在跨时钟操作过程中进行跨时钟防抖动处理,然后在第二时钟频率下完成第一并行数据位宽到第二并行数据位宽的数据位宽转换。Specifically, when the routing information included in the control information is indicated as the second mode, the data of the first parallel data bit width first completes the cross-clock domain operation from the first clock frequency to the second clock frequency, and operates across the clock. The process performs cross-clock anti-shake processing, and then performs data bit width conversion of the first parallel data bit width to the second parallel data bit width at the second clock frequency.
一种示例性的实现方式中,所述控制信息可以包括:缓冲配置信息,该缓冲配置信息包括:缓冲单元的容量信息、读写配置信息;根据所述缓冲单元的容量信息生成相应存储容量的缓冲单元,并根据所述缓冲单元的读写配置信息完成所述并行数据位宽转换。In an exemplary implementation, the control information may include: buffering configuration information, where the buffering configuration information includes: capacity information of the buffer unit, read and write configuration information, and generating a corresponding storage capacity according to the capacity information of the buffer unit. And buffering the unit, and completing the parallel data bit width conversion according to the read/write configuration information of the buffer unit.
一种示例性的实现方式中,所述控制信息可以包括:存储配置信息,该存储配置信息包括:存储单元的容量信息、读写配置信息;根据所述存储单元的容量信息生成相应存储容量的存储单元,并根据所述存储单元的读写配 置信息完成相同数据位宽的所述跨时钟域操作。In an exemplary implementation, the control information may include: storage configuration information, where the storage configuration information includes: capacity information of the storage unit, read and write configuration information; and generating a corresponding storage capacity according to the capacity information of the storage unit. The storage unit performs the cross-clock domain operation of the same data bit width according to the read and write configuration information of the storage unit.
一种示例性的实现方式中,所述控制信息可以包括:防抖动配置信息,该防抖动配置信息包括:防抖动监测的周期信息和读写恢复地址。所述跨时钟防抖动处理可以包括:根据所述防抖动监测的周期信息对所述存储单元的读写地址进行监测;如果读写地址的相对偏移量在抖动范围容限信息内,则维持所述读写地址;如果读写地址的相对偏移量不在抖动范围容限信息内,则根据所述读写恢复地址进行读写地址的恢复。In an exemplary implementation, the control information may include: anti-jitter configuration information, where the anti-jitter configuration information includes: period information of anti-shake monitoring and a read/write recovery address. The cross-clock anti-shake processing may include: monitoring a read/write address of the storage unit according to the period information of the anti-shake monitoring; if the relative offset of the read/write address is within the jitter range tolerance information, And maintaining the read/write address; if the relative offset of the read/write address is not within the jitter range tolerance information, recovering the read/write address according to the read/write recovery address.
实际应用中,本实施例的上述方法可通过软硬件协同的方式实现,且支持任意数据位宽的转换。具体来讲,本实施例的上述方法中,先给软件设置并行数据转换信息并由软件仲裁(即决定是否要进行数据位宽转换);通过软件计算生成用于数据转换的控制信息;硬件部分根据控制信息自动匹配数据位宽转换使用的模式;硬件部分按照这个模式完成相应的数据位宽转换,该数据位宽转换包括:并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。这样,由软件计算生成数据转换时的控制信息,极大的减少了硬件逻辑资源,并极大的丰富了硬件设计的灵活性;软件可控的跨时钟防抖动也具有普遍的适用性,满足不同的时钟频率的防抖动要求,使系统具有更好的稳定性。In practical applications, the foregoing method in this embodiment can be implemented in a software and hardware cooperative manner, and supports conversion of an arbitrary data bit width. Specifically, in the above method of the embodiment, the parallel data conversion information is first set to the software and is arbitrated by the software (ie, whether to perform data bit width conversion); the control information for data conversion is generated by software calculation; the hardware part According to the control information, the mode used for data bit width conversion is automatically matched; the hardware part performs corresponding data bit width conversion according to this mode, and the data bit width conversion includes: parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing. . In this way, the software calculates the control information when generating the data conversion, which greatly reduces the hardware logic resources and greatly enriches the flexibility of the hardware design; the software controllable cross-clock anti-jitter also has universal applicability. Meet the anti-jitter requirements of different clock frequencies, so that the system has better stability.
本实施例的上述方法,可广泛适用于通信技术中如CPRI、以太网,PCIE和JESD204等各种协议场景及不同传输速率需求,可支持高速串口各协议PCS与Serdes间任意并行数据位宽的转换功能,具有极强的通用性和兼容性;本实施例的方法,可实现不同PCS与Serdes的并行数据位宽匹配,减少了PCS和Serdes在实际设计上的约束性。The above method of the embodiment can be widely applied to various protocol scenarios such as CPRI, Ethernet, PCIE and JESD204 in communication technologies and different transmission rate requirements, and can support any parallel data bit width between PCS and Serdes of high-speed serial port protocols. The conversion function has strong versatility and compatibility; the method of the embodiment can realize parallel data bit width matching of different PCS and Serdes, and reduces the constraint of PCS and Serdes in actual design.
下面对本申请的具体实现流程进行说明。The specific implementation process of the present application will be described below.
如图2所示,本实施例的上述数据位宽转换方法可以包括以下步骤:As shown in FIG. 2, the above data bit width conversion method of this embodiment may include the following steps:
步骤201至步骤203,给软件设置并行数据转换信息并由软件仲裁。Step 201 to step 203, setting parallel data conversion information to the software and arbitrating by software.
具体的,设置并行数据转换信息,软件仲裁并行数据转换信息是否正确,如果正确则进入步骤204,如果不正确则软件提示输入错误,并提示重新输入正确的并行数据转换信息。Specifically, the parallel data conversion information is set, and the software arbitration parallel data conversion information is correct. If it is correct, the process proceeds to step 204. If not, the software prompts an input error and prompts to re-enter the correct parallel data conversion information.
这里,向软件输入的并行数据转换信息可以包括转换前的并行数据位宽w i及对应时钟频率f i和转换后的并行数据位宽w o及对应时钟频率f o,为保证PCS与Serdes之间的数据传输速率相一致,软件判断输入信息是否满足条件w i*f i=w o*f o,如果不满足则说明信息不正确,需要重新输入并行转换信息;如果满足则说明信息正确。 Here, the parallel data conversion information input to the software may include the parallel data bit width w i and the corresponding clock frequency f i before conversion and the converted parallel data bit width w o and the corresponding clock frequency f o , in order to ensure PCS and Serdes. The data transmission rate is consistent, and the software determines whether the input information satisfies the condition w i *f i =w o *f o . If it is not satisfied, the information is incorrect, and the parallel conversion information needs to be re-entered; if it is satisfied, the information is correct.
步骤204~步骤205,计算生成用于数据转换的控制信息。Step 204 to step 205, calculating and generating control information for data conversion.
具体的,软件计算生成数据转换控制信息,将这些控制信息存储到控制信息存储模块。Specifically, the software calculates and generates data conversion control information, and stores the control information in the control information storage module.
这里,计算控制信息的过程可以包括:软件根据w i和w o生成路由信息,计算并行数据位宽转换所需的缓冲配置信息、跨时钟域操作所需的存储配置信息以及跨时钟防抖动处理所需的防抖动配置信息,并将这些相关控制信息写入控制信息存储模块。以便基于这些信息完成对数据位宽转换缓冲模块和跨时钟存储模块的读写控制并自动计算匹配生成对应深度的缓冲存储容量(即下文的缓冲单元)及跨时钟存储容量(即下文的存储单元)。 Here, the process of calculating the control information may include: the software generates routing information according to w i and w o , calculates buffer configuration information required for parallel data bit width conversion, storage configuration information required for operation across clock domains, and cross-clock anti-jitter Process the required anti-jitter configuration information and write these related control information to the control information storage module. In order to complete the read and write control of the data bit width conversion buffer module and the cross clock storage module based on the information and automatically calculate the buffer storage capacity corresponding to the corresponding depth (ie, the buffer unit below) and the cross clock storage capacity (ie, the following storage unit) ).
其中,可以根据式w i*N i=w o*N o=LCM计算出上述缓冲配置信息、存储配置信息以及防抖动配置信息。其中,LCM为w i和w o的最小公倍数,N i表示时钟频率f i下写数据的周期数,N o表示时钟频率f o下读数据的周期数。 The buffer configuration information, the storage configuration information, and the anti-jitter configuration information may be calculated according to the formula w i *N i =w o *N o =LCM. Where LCM is the least common multiple of w i and w o , N i represents the number of cycles of writing data at clock frequency f i , and N o represents the number of cycles of reading data at clock frequency f o .
其中,缓冲配置信息包括:缓冲单元的容量信息、读写配置信息,缓冲单元的读写配置信息可以包括:缓冲单元的读写控制信息及具体的读写位置信息。The buffering configuration information includes: capacity information of the buffer unit, read and write configuration information, and the read/write configuration information of the buffer unit may include: read/write control information of the buffer unit and specific read/write position information.
其中,存储配置信息包括:存储单元的容量信息、读写配置信息,该存储单元的读写配置信息可以包括存储单元的读写控制信息及读写地址信息。The storage configuration information includes: storage unit capacity information and read/write configuration information, and the read/write configuration information of the storage unit may include read/write control information and read/write address information of the storage unit.
其中,该防抖动配置信息包括:防抖动监测的周期信息和读写恢复地址。The anti-jitter configuration information includes: period information of anti-shake monitoring and a read/write recovery address.
其中,路由信息用于指示数据位宽转换使用的模式,所述模式为第一模式或第二模式,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。若w i<w o,则路由信息指示第一模式,若w i>w o,则路由信息指示第二模式。若w i=w o,不需要进行数据位宽转换,也就不需要生成路由信 息以及计算上述各类配置信息。 The routing information is used to indicate a mode used for data bit width conversion, where the mode is a first mode or a second mode, and in the first mode, the parallel data bit width conversion is prior to the cross clock domain operation Thereafter, in the second mode, the cross-clock domain operation is prior, and the parallel data bit width is converted later. If w i <w o , the routing information indicates the first mode, and if w i >w o , the routing information indicates the second mode. If w i =w o , no data bit width conversion is needed, and it is not necessary to generate routing information and calculate various types of configuration information.
步骤206~步骤212,数据位宽转换电路读取控制信息并基于该控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。 Steps 206 to 212, the data bit width conversion circuit reads the control information and performs parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
步骤206,从控制信息存储模块中读取控制信息,根据该控制信息中路由信息指示的模式执行数据位宽转换。Step 206: Read control information from the control information storage module, and perform data bit width conversion according to the mode indicated by the routing information in the control information.
若路由信息指示为第一模式,则数据流按照如图3所示的路径进行处理,执行步骤207~步骤209,输入数据首先进入数据位宽转换缓冲模块进行并行数据位宽转换,在时钟频率f i下完成数据位宽从w i到w o的转换,然后转换完成的数据进入跨时钟存储模块进行跨时钟域操作,完成w o位宽的数据从时钟频率f i到时钟频率f o的转换,在跨时钟存储模块的转换过程中通过跨时钟防抖动模块完成跨时钟防抖的处理。 If the routing information indicates the first mode, the data flow is processed according to the path shown in FIG. 3, and steps 207 to 209 are performed, and the input data first enters the data bit width conversion buffer module for parallel data bit width conversion, at the clock frequency. The conversion of the data bit width from w i to w o is completed under f i , and then the converted data enters the cross-clock memory module for cross-clock domain operation, and the data of w o bit width is completed from the clock frequency f i to the clock frequency f o Conversion, cross-clock anti-shake processing is performed by the cross-clock anti-jitter module during the conversion of the cross-clock storage module.
具体的,若w i<w o,数据位宽转换缓冲模块首先从控制信息存储模块中获取缓冲单元的容量信息生成相应存储容量的缓冲单元,即数据位宽转换缓冲模块生成最小存储为w i*(N i-N o+1)比特(即缓冲单元的容量信息)的缓冲单元,缓冲单元(根据读写控制信息和读写地址信息)连续写入w i位宽的数据,当写入(N i-N o)拍后,开始从缓冲单元读取w o位宽的数据,并持续读取N o拍,然后停止读取(N i-N o)拍,并且按照该规律周期性的读取,完成数据位宽在同时钟域下的转换。然后跨时钟存储模块从控制信息存储模块中获取存储单元的容量信息生成相应存储容量的存储单元,将位宽转换后的w o位宽的数据通过存储单元进行跨时钟域操作,存储单元的写时钟频率为f i,读时钟频率为f o,写使能的变化周期与缓冲单元的读周期相同,读使能由写使能延迟N o拍后跨时钟产生,该延时避免了读写冲突,并且自产生后持续有效,存储单元的深度取2*N o+X,其中X为写使能产生读使能的最大稳定时间数据经过存储单元完成跨时钟域的操作。 Specifically, if w i <w o , the data bit width conversion buffer module first acquires the buffer information of the buffer unit from the control information storage module to generate the buffer unit of the corresponding storage capacity, that is, the data bit width conversion buffer module generates the minimum storage as w i *(N i -N o +1) bits (that is, buffer unit capacity information) buffer unit, buffer unit (according to read and write control information and read and write address information) continuously write w i bit width data, when writing (N i -N o) after the shot, the data read from the buffer unit bit width w o, N o and read continuously shot, and then stops reading (N i -N o) beat, and in accordance with the periodic law The read, completes the conversion of the data bit width in the same clock domain. Then, the cross-clock storage module acquires the capacity information of the storage unit from the control information storage module to generate a storage unit of the corresponding storage capacity, and performs the cross-clock domain operation on the data of the w o -bit width converted by the bit width through the storage unit, and writes the storage unit the same clock frequency f i, the read clock frequency f o, the write enable buffer unit periodicity and the read cycle, read enable enable enable delay by the write clock is generated after N o cross shot, which avoids the read-write delay Conflicts, and continue to be valid after generation, the depth of the memory cell is 2*N o +X, where X is the write enable enable maximum stable time data for read enable to complete the operation across the clock domain through the memory unit.
若路由信息指示为第二模式,则数据流按照如图4所示的路径进行处理,执行步骤210~步骤212,输入数据首先进入跨时钟存储模块进行跨时钟域操作,完成w i位宽的数据从时钟频率f i到时钟频率f o的转换,并在跨时钟存储模块的转换过程中通过跨时钟防抖动模块完成跨时钟防抖的处理,然后跨时钟转换后的数据进入数据位宽转换缓冲模块进行并行数据位宽转换,在时 钟频率f o下完成数据位宽从w i到w o的转换。 If the routing information is in the second mode, the data flow is processed according to the path shown in FIG. 4, and the steps 210 to 212 are performed. The input data first enters the cross-clock storage module to perform the cross-clock domain operation, and the w i -bit width is completed. The data is converted from the clock frequency f i to the clock frequency f o , and the cross-clock anti-shake module is processed by the cross-clock anti-shake module during the conversion process of the cross-clock memory module, and then the data converted across the clock enters the data bit width. The conversion buffer module performs parallel data bit width conversion, and completes the conversion of the data bit width from w i to w o at the clock frequency f o .
具体的,若w i>w o,跨时钟存储模块从控制信息存储模块中获取存储单元的容量信息生成相应存储容量的存储单元,w i位宽的数据首先写入存储单元进行跨时钟域操作,存储单元的写时钟频率为f i,读时钟频率为f o,存储单元的写使能自数据有效后则一直有效,根据w i*N i=w o*N o=LCM这一关系,存储单元的深度取2*N i+X,读使能由写使能延时N i后跨时钟产生,该延时避免了读写冲突,读使能自有效起连续读取并持续读取N i拍,然后停止读取(N o-N i)拍,并且按照该规律周期性的读取,完成时钟域的转换;之后,数据位宽转换缓冲模块从控制信息存储模块中获取缓冲单元的容量信息(w i*(N i-N o+1)比特)生成最小存储为w i*(N i-N o+1)比特的缓冲单元,将跨时钟之后的w i位宽的数据写入缓冲单元完成位宽转换,缓冲单元的最小存储为[w i+(w i-w o)*(N i-1)],并且缓冲单元的写使能与存储单元的读使能相同,均为连续写入N i拍,然后停止写入(N o-N i)拍,并按照该规律周期性的进行,而由于w i>w o,缓冲单元在写入一拍w i后即可开始读取w o位宽的数据,并自数据有效后读使能一直保持有效,完成并行数据位宽转换。 Specifically, if w i >w o , the cross-clock storage module acquires the storage unit capacity information from the control information storage module to generate a storage unit corresponding to the storage capacity, and the w i -bit wide data is first written into the storage unit to perform cross-clock domain operation. The write clock frequency of the memory cell is f i and the read clock frequency is f o . The write enable of the memory cell is always valid after the data is valid. According to the relationship of w i *N i =w o *N o =LCM, The depth of the memory cell is 2*N i +X, and the read enable is generated by the write enable delay N i after the clock. This delay avoids read and write conflicts, and the read enable is continuously read and continuously read from the effective. N i beat, then stop reading (N o -N i ) beat, and periodically read according to the law, complete the conversion of the clock domain; after that, the data bit width conversion buffer module obtains the buffer unit from the control information storage module The capacity information (w i *(N i -N o +1) bits) generates a buffer unit that is minimally stored as w i *(N i -N o +1) bits, and w i bits wide after the clock The write buffer unit performs bit width conversion, and the minimum storage of the buffer unit is [w i +(w i -w o )*(N i -1) ], and the write enable of the buffer unit is the same as the read enable of the memory unit, both of which are consecutively written to N i beats, then stop writing (N o -N i ) beats, and periodically follow the rule, and Since w i >w o , the buffer unit can start reading the w o bit width data after writing a beat w i , and the read enable remains valid after the data is valid, and the parallel data bit width conversion is completed.
根据控制信息完成跨时钟防抖动处理时,跨时钟读写周期具有一定的约束关系w i*N i*N=w o*N o*N=LCM*N,其中,N为防抖动检测的存储单元的遍历周期数,由软件基于上述约束关系计算防抖动监测的周期信息并配置在控制信息存储模块并由跨时钟防抖动模块读取执行。在LCM*N的间隔时间下,跨时钟存储模块的存储单元的读写地址应该是一一对应关系的,所以防抖动处理是在周期性的监测点检测存储单元的读写地址作为读写恢复地址,并在控制信息存储模块中记录该监测点的对应读写地址,若存储单元的检测地址的偏差范围超过存储单元深度的一半时,则强制将存储单元的读地址恢复为所记录的读写恢复地址,从而避免读写冲突的产生,完成跨时钟防抖动的处理。 When the cross-clock anti-shake processing is completed according to the control information, the cross-clock read/write period has a certain constraint relationship w i *N i *N=w o *N o *N=LCM*N, where N is anti-shake detection The number of traversal cycles of the storage unit is calculated by the software based on the constraint relationship described above and configured in the control information storage module and read and executed by the cross-clock anti-jitter module. At the interval of LCM*N, the read/write addresses of the memory cells of the inter-clock memory module should be in a one-to-one correspondence, so the anti-shake processing detects the read/write address of the memory cell as a read/write address at a periodic monitoring point. The address is restored, and the corresponding read/write address of the monitoring point is recorded in the control information storage module. If the deviation range of the detection address of the storage unit exceeds half of the depth of the storage unit, the read address of the storage unit is forcibly restored to the recorded Read and write recovery addresses to avoid read and write conflicts and complete cross-clock anti-shake processing.
实施例二Embodiment 2
一种数据位宽转换装置,如图5所示,包括:控制器51和数据位宽转换电路52;A data bit width conversion device, as shown in Figure 5, comprising: a controller 51 and a data bit width conversion circuit 52;
所述控制器51,包括:存储部和处理部(图中未示),所述存储部配置 存储计算机程序,所述处理部配置为读取所述计算机程序以执行如下操作:根据并行数据转换信息,生成用于数据位宽转换的控制信息;The controller 51 includes a storage unit and a processing unit (not shown) configured to store a computer program, the processing unit configured to read the computer program to perform an operation of: converting according to parallel data Information, generating control information for data bit width conversion;
所述数据位宽转换电路52,可配置为基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The data bit width conversion circuit 52 is configurable to perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
本实施例中,所述并行数据转换信息可以包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。In this embodiment, the parallel data conversion information may include: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
本实施例中,所述处理部是配置为读取所述计算机程序以执行如下操作:根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;在转换前后的数据传输速率一致时,根据并行数据转换信息生成用于数据位宽转换的控制信息。In this embodiment, the processing unit is configured to read the computer program to perform an operation of: determining, according to the parallel data conversion information, whether data transmission rates before and after conversion are consistent; when data transmission rates before and after conversion are consistent, Control information for data bit width conversion is generated based on the parallel data conversion information.
本实施例中,所述处理部是配置为读取所述计算机程序以执行如下操作:根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息;其中,LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 In this embodiment, the processing unit is configured to read the computer program to perform an operation of: generating the control according to the parallel data conversion information and based on w i *N i =w o *N o =LCM Information; wherein LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, w o represents the converted second parallel data bit width, and N i represents the first clock frequency write The number of cycles of data, N o represents the number of cycles of reading data at the second clock frequency.
本实施例中,所述处理部是配置为读取所述计算机程序以执行如下操作:在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;其中,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。In this embodiment, the processing unit is configured to read the computer program to perform an operation of: generating an indication including the first when the first parallel data bit width before the conversion is smaller than the converted second parallel data bit width Control information of the routing information of the mode; generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width; wherein the first mode The parallel data bit width conversion is preceded by the cross clock domain operation; in the second mode, the cross clock domain operation is prior, and the parallel data bit width is converted later.
本实施例中,所述存储部,还配置为存储所述控制信息;所述数据位宽转换电路,是配置为从所述存储部中读取所述控制信息,并基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。一种实现方式中,该存储部可以包括控制信息存储模块,该控制信息存储模块用于存储所述控制信息。In this embodiment, the storage unit is further configured to store the control information; the data bit width conversion circuit is configured to read the control information from the storage unit, and perform the control information based on the control information. Parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing. In an implementation manner, the storage unit may include a control information storage module, and the control information storage module is configured to store the control information.
本实施例中,所述控制信息可以包括:路由信息,所述路由信息用于指示数据位宽转换的第一模式和第二模式,所述第一模式下,所述并行数据位 宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后;所述数据位宽转换电路52是配置为:采用所述路由信息指示的模式进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。In this embodiment, the control information may include: routing information, where the routing information is used to indicate a first mode and a second mode of data bit width conversion, where the parallel data bit width is converted in the first mode First, the cross-clock domain operation is followed. In the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion; the data bit width conversion circuit 52 is configured to: adopt The mode indicated by the routing information performs data bit width conversion, cross clock domain operation, and cross clock anti-shake processing.
如图5所示,所述数据位宽转换电路52可以包括:数据位宽转换缓冲模块521、跨时钟域存储模块522、以及跨时钟防抖动模块523;其中,数据位宽转换缓冲模块用于完成并行数据位宽转换,跨时钟域存储模块522用于完成跨时钟域操作,跨时钟防抖动模块523用于完成跨时钟防抖动处理。其中,数据位宽转换缓冲模块521与跨时钟域存储模块522互通,跨时钟域存储模块522与跨时钟防抖动模块523互通。As shown in FIG. 5, the data bit width conversion circuit 52 may include: a data bit width conversion buffer module 521, a cross clock domain storage module 522, and a cross clock anti-jitter module 523; wherein, the data bit width conversion buffer module is used. After the parallel data bit width conversion is completed, the cross clock domain storage module 522 is used to complete the cross clock domain operation, and the cross clock anti-jitter module 523 is used to complete the cross clock anti-shake processing. The data bit width conversion buffer module 521 and the cross-clock domain storage module 522 are intercommunicated, and the cross-clock domain storage module 522 and the cross-clock anti-shake module 523 are intercommunicated.
具体的,在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,输入的数据首先进入所述数据位宽转换缓冲模块521,在第一时钟频率下完成第一并行数据位宽到第二并行数据位宽的数据位宽转换,然后转换为第二并行数据位宽的数据进入所述跨时钟域存储模块522,执行从第一时钟频率转换到第二时钟频率的跨时钟域操作,并在跨时钟域操作的过程中通过跨时钟防抖动模块523进行跨时钟防抖动处理。Specifically, when the first parallel data bit width before the conversion is smaller than the converted second parallel data bit width, the input data first enters the data bit width conversion buffer module 521, and the first parallel is completed at the first clock frequency. Data bit width to data width bit width conversion of the second parallel data bit width, and then converted into data of the second parallel data bit width into the cross clock domain memory module 522, performing conversion from the first clock frequency to the second clock frequency Inter-clock anti-shake processing is performed by the cross-clock anti-shake module 523 during operation across the clock domain and during operation across the clock domain.
具体的,在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,第一并行数据位宽的数据输入所述跨时钟域存储模块522,首先完成从第一时钟频率转换到第二时钟频率的跨时钟域操作,并在跨时钟域操作的过程中通过跨时钟防抖动模块523进行跨时钟防抖动处理,然后进入所述数据位宽转换缓冲模块521,在第二时钟频率下完成第一并行数据位宽到第二并行数据位宽的数据位宽转换。Specifically, when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width, the data of the first parallel data bit width is input to the cross-clock domain storage module 522, and the first clock frequency is first completed. Converting to a cross-clock domain operation of the second clock frequency, and performing cross-clock anti-shake processing by the cross-clock anti-jitter module 523 during operation across the clock domain, and then entering the data bit width conversion buffer module 521, The data width-to-width conversion of the first parallel data bit width to the second parallel data bit width is completed at the second clock frequency.
本实施例中,所述控制信息可以包括:缓冲配置信息,该缓冲配置信息包括:缓冲单元的容量信息、读写配置信息;数据位宽转换缓冲模块521具体可用于根据所述缓冲单元的容量信息生成相应存储容量的缓冲单元5211,并根据所述缓冲单元5211的读写配置信息完成所述数据位宽转换。In this embodiment, the control information may include: buffer configuration information, where the buffer configuration information includes: capacity information of the buffer unit, and read and write configuration information; and the data bit width conversion buffer module 521 is specifically configured to use the capacity of the buffer unit. The information generates a buffer unit 5211 of the corresponding storage capacity, and completes the data bit width conversion according to the read/write configuration information of the buffer unit 5211.
本实施例中,所述控制信息可以包括:存储配置信息,该存储配置信息包括:存储单元的容量信息、读写配置信息;跨时钟域存储模块522具体可用于根据所述存储单元的容量信息生成相应存储容量的存储单元5222,并根 据所述存储单元5222的读写配置信息完成相同数据位宽的所述跨时钟域操作。In this embodiment, the control information may include: storage configuration information, where the storage configuration information includes: storage unit capacity information, read-write configuration information; the cross-clock domain storage module 522 is specifically configured to use the storage unit capacity information. The storage unit 5222 of the corresponding storage capacity is generated, and the cross-clock domain operation of the same data bit width is completed according to the read and write configuration information of the storage unit 5222.
本实施例中,所述控制信息可以包括:防抖动配置信息,该防抖动配置信息包括:防抖动监测的周期信息和读写恢复地址;跨时钟防抖动模块523,具体可用于根据所述防抖动监测的周期信息对所述存储单元5222的读写地址进行监测;如果读写地址的相对偏移量在抖动范围容限信息内,则维持所述读写地址;如果读写地址的相对偏移量不在抖动范围容限信息内,则根据所述读写恢复地址进行读写地址的恢复。In this embodiment, the control information may include: anti-shake configuration information, where the anti-jitter configuration information includes: anti-jitter monitoring period information and a read-write recovery address; the cross-clock anti-jitter module 523 may be specifically used for And monitoring the read/write address of the storage unit 5222 according to the period information of the anti-shake monitoring; if the relative offset of the read/write address is within the jitter range tolerance information, maintaining the read/write address; If the relative offset of the write address is not within the jitter range tolerance information, the read/write address is restored according to the read/write recovery address.
如图6所示,为本实施例上述装置示例性实施方式的架构示意图。其中,数据位宽转换装置设置在PCS与Serdes间,以实现高速串口各协议PCS与Serdes间任意并行数据位宽的转换。FIG. 6 is a schematic structural diagram of an exemplary embodiment of the foregoing apparatus according to the embodiment. The data bit width conversion device is arranged between the PCS and the Serdes to realize the conversion of any parallel data bit width between the PCS and the Serdes of the high speed serial port protocol.
图6中,对于控制器来说,输入为转换前的并行数据位宽w i及对应时钟频率f i和转换后的并行数据位宽w o及对应时钟频率f o,根据这些数据控制器可自动计算生成任意位宽转换所需的控制信息,该控制信息包括路由信息,缓冲单元的容量信息、存储单元的容量信息、缓冲单元的读写配置信息、存储单元的读写配置信息、防抖动监测的周期信息以及读写恢复地址等,控制器可以将所计算的上述控制信息存储到硬件的控制信息存储模块中,供数据位宽转换电路使用。这里,控制信息存储模块负责存储数据位宽转换各个步骤所需的控制信息,并将这些控制信息转换成为满足各个模块时序设计要求后分发给数据位宽缓冲模块、跨时钟存储模块、跨时钟防抖动模块。 In FIG. 6, for the controller, the input is the parallel data bit width w i before conversion and the corresponding clock frequency f i and the converted parallel data bit width w o and the corresponding clock frequency f o , according to these data controllers Automatically calculating control information required to generate an arbitrary bit width conversion, the control information including routing information, buffer unit capacity information, storage unit capacity information, buffer unit read and write configuration information, storage unit read and write configuration information, anti-shake The controller may store the calculated control information in a hardware control information storage module for use by the data bit width conversion circuit. Here, the control information storage module is responsible for storing the control information required for each step of the data bit width conversion, and converting the control information into the data bit width buffer module, the cross clock storage module, and the cross clock prevention. Jitter module.
图6中,若w i<w o,则控制器生成指示第一模式的路由信息,若w i>w o,则控制器生成指示第二模式的路由信息。第一模式下,输入数据首先进去数据位宽转换缓冲模块,在时钟频率f i下完成数据位宽从w i到w o的转换,然后将转换完成的数据进入跨时钟存储模块,完成w o位宽的数据从时钟频率f i到时钟频率f o的转换;最后进入跨时钟防抖动模块进行跨时钟防抖动处理。第二模式下,输入数据首先进入跨时钟存储模块,完成w i位宽的数据从时钟频率f i到时钟频率f o的转换,然后跨时钟操作之后的数据进入跨时钟防抖动模块进行跨时钟防抖动处理,最后进入数据位宽转换缓冲模块,在时钟频率f o下完成数据位宽从w i到w o的转换。 In FIG. 6, if w i <w o , the controller generates routing information indicating the first mode, and if w i >w o , the controller generates routing information indicating the second mode. In the first mode, the input data first enters the data bit width conversion buffer module, completes the conversion of the data bit width from w i to w o at the clock frequency f i , and then enters the converted data into the cross-clock storage module to complete w o The bit width data is converted from the clock frequency f i to the clock frequency f o ; finally, the cross clock anti-jitter module is input for cross-clock anti-shake processing. In the second mode, the input data first enters the cross-clock storage module, and the data of the w i -bit width is converted from the clock frequency f i to the clock frequency f o , and then the data after the cross-clock operation enters the cross-clock anti-jitter module for cross- The clock anti-shake processing finally enters the data bit width conversion buffer module to complete the conversion of the data bit width from w i to w o at the clock frequency f o .
图6中,数据位宽转换缓冲模块负责从控制信息存储模块中获取缓冲单元的容量信息生成相应存储容量的缓冲单元,然后根据缓冲单元读写控制信息及具体的读写位置信息完成数据位宽的转换。In FIG. 6, the data bit width conversion buffer module is responsible for obtaining the buffer unit of the corresponding storage capacity by acquiring the capacity information of the buffer unit from the control information storage module, and then completing the data bit width according to the buffer unit read/write control information and the specific read/write position information. Conversion.
图6中,跨时钟存储模块负责从控制信息存储模块中获取存储单元的容量信息生成相应存储容量的存储单元,然后根据存储单元的读写控制信息及读写地址信息完成相同数据位宽的跨时钟域功能。In FIG. 6, the cross-clock storage module is responsible for acquiring the storage unit capacity information from the control information storage module to generate a storage unit corresponding to the storage capacity, and then completing the crossover of the same data bit width according to the read/write control information and the read-write address information of the storage unit. Clock domain function.
图6中,跨时钟防抖动模块负责从控制信息存储模块中获取防抖动监测的周期信息,根据该周期对跨时钟存储单元的读写地址进行监测,若读写地址的相对偏移量在抖动范围容限信息内,则维持对应读写地址,否则根据读地址的恢复信息完成读地址恢复,实现跨时钟防抖动功能。In Figure 6, the cross-clock anti-jitter module is responsible for obtaining the period information of the anti-jitter monitoring from the control information storage module, and monitoring the read/write address of the cross-clock storage unit according to the period, if the relative offset of the read-write address is In the jitter range tolerance information, the corresponding read/write address is maintained. Otherwise, the read address recovery is completed according to the recovery information of the read address, and the cross-clock anti-shake function is implemented.
本实施例中的上述装置通过软硬件的协同处理完成任意数据位宽转换。本实施例的其他技术细节可参照实施例一。The above device in this embodiment performs arbitrary data bit width conversion by cooperative processing of software and hardware. For other technical details of this embodiment, refer to the first embodiment.
本实施例的装置,可实现不同PCS与Serdes的并行数据位宽匹配,减少了PCS和Serdes的设计的约束性;由软件计算生成数据转换所需的控制信息,极大的减少了硬件逻辑资源,并极大的丰富了硬件设计的灵活性;软件可控的跨时钟防抖动设计也具有普遍的适用性,满足不同的时钟频率的防抖动要求,增强了系统的稳定性。The device of the embodiment can realize the parallel data bit width matching of different PCS and Serdes, and reduces the constraint of the design of the PCS and the Serdes; the software calculates the control information required for the data conversion, thereby greatly reducing the hardware logic resources. And greatly enrich the flexibility of hardware design; software controllable cross-clock anti-jitter design also has universal applicability, meet the anti-jitter requirements of different clock frequencies, and enhance the stability of the system.
本实施例的上述装置能够广泛适用于通信技术中如CPRI,以太网,PCIE和JESD204等各种协议场景及不同传输速率需求,该方法和装置可以支持高速串口各协议PCS与Serdes间任意并行数据位宽的转换功能,具有极强的通用性和兼容性。The above device of the present embodiment can be widely applied to various protocol scenarios such as CPRI, Ethernet, PCIE and JESD204 in communication technologies and different transmission rate requirements. The method and device can support any parallel data between PCS and Serdes of high-speed serial port protocols. The bit width conversion function is extremely versatile and compatible.
实施例三Embodiment 3
一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时执行如下操作:根据并行数据转换信息,生成用于数据位宽转换的控制信息,以便数据位宽转换电路基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to perform an operation of: generating control information for data bit width conversion according to parallel data conversion information So that the data bit width conversion circuit performs parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
本实施例中,所述并行数据转换信息包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。In this embodiment, the parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
本实施例中,所述计算机程序被处理器执行时执行如下操作:根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;在转换前后的数据传输速率一致时,根据并行数据转换信息生成用于数据位宽转换的控制信息。一种实现方式中,所述计算机程序被处理器执行时执行如下操作:判断转换前的第一并行数据位宽与其对应的第一时钟频率的乘积、和转换后的第二并行数据位宽与第二时钟频率的乘积是否相同,相同时根据并行数据转换信息生成用于数据位宽转换的控制信息。除此之外,还可采用其他方式,不再赘述。In this embodiment, when the computer program is executed by the processor, the following operations are performed: determining whether the data transmission rate before and after the conversion is consistent according to the parallel data conversion information; and converting the data according to the parallel data when the data transmission rates before and after the conversion are consistent Generate control information for data bit width conversion. In one implementation, the computer program is executed by the processor to: determine a product of a first parallel data bit width before conversion and a corresponding first clock frequency, and a second parallel data bit width after conversion Whether the product of the second clock frequency is the same, and the same is used to generate control information for data bit width conversion based on the parallel data conversion information. In addition, other methods can be used, and will not be described again.
本实施例的一种实现方式中,所述计算机程序被处理器执行时执行如下操作:根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息;LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 In an implementation manner of this embodiment, when the computer program is executed by the processor, the following operations are performed: generating the control according to the parallel data conversion information and based on w i *N i =w o *N o =LCM Information; LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, w o represents the converted second parallel data bit width, and N i represents the data written at the first clock frequency. number of cycles, N o represents the number of read data at a second frequency clock cycle.
本实施例中,所述计算机程序被处理器执行时执行如下操作:在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;其中,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。In this embodiment, when the computer program is executed by the processor, the following operations are performed: when the first parallel data bit width before the conversion is smaller than the converted second parallel data bit width, generating routing information indicating the first mode is generated. Control information; when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width, generating control information including routing information indicating the second mode; wherein, in the first mode, the parallel The data bit width conversion is prior to the cross clock domain operation; in the second mode, the cross clock domain operation is prior, and the parallel data bit width is converted later.
本实施例中,所述控制信息包括如下之一或多项:In this embodiment, the control information includes one or more of the following:
路由信息,用于指示数据位宽转换使用的模式,所述模式为第一模式或第二模式,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后;The routing information is used to indicate a mode used by the data bit width conversion, where the mode is a first mode or a second mode, and in the first mode, the parallel data bit width conversion is prior to the cross clock domain operation After the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion;
用于所述并行数据位宽转换的缓冲配置信息,包括:缓冲单元的容量信息、和读写配置信息;The buffer configuration information used for the parallel data bit width conversion includes: capacity information of the buffer unit, and read and write configuration information;
用于所述跨时钟域操作的存储配置信息,包括:存储单元的容量信息、和读写配置信息;Storage configuration information for the operation of the cross-clock domain, including: capacity information of the storage unit, and read and write configuration information;
用于所述跨时钟防抖动处理的防抖动配置信息,包括:防抖动监测的周期信息和读写恢复地址。The anti-jitter configuration information used for the cross-clock anti-shake processing includes: period information of anti-shake monitoring and a read/write recovery address.
本实施例的其他技术细节可参照实施例一,在此不再赘述。Other technical details of this embodiment can be referred to the first embodiment, and details are not described herein again.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本申请不限制于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function. This application is not limited to any specific combination of hardware and software.
以上显示和描述了本申请的基本原理和主要特征和本申请的优点。本申请不受上述实施例的限制,上述实施例和说明书中描述的只是说明本申请的原理,在不脱离本申请精神和范围的前提下,本申请还会有各种变化和改进,这些变化和改进都落入要求保护的本申请范围内。The basic principles and main features of the present application and the advantages of the present application are shown and described above. The present application is not limited by the above-described embodiments, and the above-described embodiments and the description are only for explaining the principles of the present application, and various changes and modifications may be made to the present application without departing from the spirit and scope of the application. And improvements are within the scope of the claimed invention.

Claims (27)

  1. 一种数据位宽转换的方法,包括:A method of data bit width conversion, comprising:
    根据并行数据转换信息,生成用于数据位宽转换的控制信息;Generating control information for data bit width conversion according to parallel data conversion information;
    基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。Parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing are performed based on the control information.
  2. 根据权利要求1所述的数据位宽转换的方法,其中:The method of data bit width conversion according to claim 1, wherein:
    所述并行数据转换信息包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。The parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  3. 根据权利要求2所述的数据位宽转换的方法,其中,A method of data bit width conversion according to claim 2, wherein
    所述根据并行数据转换信息,生成用于数据位宽转换的控制信息的步骤之前,该方法还包括:根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;Before the step of generating the control information for the data bit width conversion according to the parallel data conversion information, the method further includes: determining, according to the parallel data conversion information, whether the data transmission rate before and after the conversion is consistent;
    所述根据并行数据转换信息,生成用于数据位宽转换的控制信息的步骤包括:在转换前后的数据传输速率一致时,根据所述并行数据转换信息生成用于数据位宽转换的控制信息。The step of generating control information for data bit width conversion according to the parallel data conversion information includes: generating control information for data bit width conversion according to the parallel data conversion information when the data transmission rates before and after the conversion are the same.
  4. 根据权利要求3所述的数据位宽转换的方法,其中,所述根据所述并行数据转换信息确定转换前后的数据传输速率是否一致的步骤包括:The data bit width conversion method according to claim 3, wherein the step of determining whether the data transmission rates before and after the conversion are consistent according to the parallel data conversion information comprises:
    判断转换前的第一并行数据位宽与其对应的第一时钟频率的乘积、和转换后的第二并行数据位宽及与其对应的第二时钟频率的乘积是否相同。It is judged whether the product of the first parallel data bit width before conversion and its corresponding first clock frequency, and the product of the converted second parallel data bit width and its corresponding second clock frequency are the same.
  5. 根据权利要求3所述的数据位宽转换的方法,其中,所述根据所述并行数据转换信息生成用于数据位宽转换的控制信息的步骤包括:The data bit width conversion method according to claim 3, wherein said step of generating control information for data bit width conversion based on said parallel data conversion information comprises:
    根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息; Generating the control information according to the parallel data conversion information and based on w i *N i =w o *N o =LCM;
    其中,LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 Where LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, w o represents the converted second parallel data bit width, and N i represents the data written at the first clock frequency. number of cycles, N o represents the number of read data at a second frequency clock cycle.
  6. 根据权利要求1所述的数据位宽转换的方法,其中,所述根据并行数 据转换信息,生成用于数据位宽转换的控制信息的步骤包括:The data bit width conversion method according to claim 1, wherein said step of generating control information for data bit width conversion based on the parallel data conversion information comprises:
    在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;Generating control information including routing information indicating the first mode when the first parallel data bit width before the conversion is less than the converted second parallel data bit width;
    在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;Generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width;
    其中,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。Wherein, in the first mode, the parallel data bit width conversion is prior to the cross-clock domain operation; in the second mode, the cross-clock domain operation is prior to the parallel data bit width The conversion is after.
  7. 根据权利要求1所述的数据位宽转换的方法,其中,A method of data bit width conversion according to claim 1, wherein
    所述控制信息包括:路由信息,所述路由信息用于指示数据位宽转换使用的模式,所述模式为第一模式或第二模式,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后;The control information includes: routing information, the routing information is used to indicate a mode used for data bit width conversion, the mode is a first mode or a second mode, and the parallel data bit width conversion is performed in the first mode. After the first and the cross-clock domain operations are performed, in the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion;
    所述基于所述控制信息进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理的步骤包括:采用所述路由信息指示的模式进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The step of performing data bit width conversion, cross-clock domain operation, and cross-clock anti-shake processing based on the control information includes: performing data bit width conversion, cross-clock domain operation, and cross-clock prevention by using a mode indicated by the routing information Jitter processing.
  8. 根据权利要求7所述的数据位宽转换的方法,其中:A method of data bit width conversion according to claim 7, wherein:
    所述控制信息包含的路由信息指示为第一模式时,输入的数据首先在第一时钟频率下完成第一并行数据位宽到第二并行数据位宽的数据位宽转换,然后对所述第二并行数据位宽的数据执行从第一时钟频率转换到第二时钟频率的跨时钟域操作,并在跨时钟操作过程中进行跨时钟防抖动处理。When the routing information included in the control information is indicated as the first mode, the input data first completes the data bit width conversion of the first parallel data bit width to the second parallel data bit width at the first clock frequency, and then The data of the two parallel data bit widths performs a cross-clock domain operation from the first clock frequency to the second clock frequency, and performs cross-clock anti-shake processing during the cross-clock operation.
  9. 根据权利要求7所述的数据位宽转换的方法,其中:A method of data bit width conversion according to claim 7, wherein:
    所述控制信息包含的路由信息指示为第二模式时,第一并行数据位宽的数据首先完成从第一时钟频率转换到第二时钟频率的跨时钟域操作,并在跨时钟操作过程中进行跨时钟防抖动处理,然后在第二时钟频率下完成第一并行数据位宽到第二并行数据位宽的数据位宽转换。When the routing information included in the control information is indicated as the second mode, the data of the first parallel data bit width first completes the cross-clock domain operation from the first clock frequency to the second clock frequency, and is performed during the cross-clock operation. Cross-clock anti-shake processing, and then completing the data bit width conversion of the first parallel data bit width to the second parallel data bit width at the second clock frequency.
  10. 根据权利要求1至9中任一项所述的数据位宽转换的方法,其中:A method of data bit width conversion according to any one of claims 1 to 9, wherein:
    所述控制信息包括:缓冲配置信息,该缓冲配置信息包括:缓冲单元的 容量信息、读写配置信息;The control information includes: buffer configuration information, where the buffer configuration information includes: capacity information of the buffer unit, and read and write configuration information;
    所述基于所述控制信息进行并行数据位宽转换的步骤包括:根据所述缓冲单元的容量信息生成相应存储容量的缓冲单元,并根据所述缓冲单元的读写配置信息完成所述并行数据位宽转换。The step of performing parallel data bit width conversion based on the control information includes: generating a buffer unit corresponding to the storage capacity according to the capacity information of the buffer unit, and completing the parallel data bit according to the read/write configuration information of the buffer unit Wide conversion.
  11. 根据权利要求1至9中任一项所述的数据位宽转换的方法,其中:A method of data bit width conversion according to any one of claims 1 to 9, wherein:
    所述控制信息包括:存储配置信息,该存储配置信息包括:存储单元的容量信息、读写配置信息;The control information includes: storage configuration information, where the storage configuration information includes: capacity information of the storage unit, and read and write configuration information;
    所述基于所述控制信息进行跨时钟域操作处理的步骤包括:根据所述存储单元的容量信息生成相应存储容量的存储单元,并根据所述存储单元的读写配置信息完成相同数据位宽的所述跨时钟域操作。The step of performing cross-clock domain operation processing based on the control information includes: generating a storage unit of a corresponding storage capacity according to the capacity information of the storage unit, and completing the same data bit width according to the read/write configuration information of the storage unit The cross-clock domain operates.
  12. 根据权利要求11所述的数据位宽转换的方法,其中:A method of data bit width conversion according to claim 11 wherein:
    所述控制信息包括:防抖动配置信息,该防抖动配置信息包括:防抖动监测的周期信息和读写恢复地址;The control information includes: anti-jitter configuration information, where the anti-jitter configuration information includes: period information of anti-shake monitoring and a read/write recovery address;
    所述基于所述控制信息进行跨时钟防抖动处理的步骤包括:根据所述防抖动监测的周期信息对所述存储单元的读写地址进行监测;如果读写地址的相对偏移量在抖动范围容限信息内,则维持所述读写地址;如果读写地址的相对偏移量不在抖动范围容限信息内,则根据所述读写恢复地址进行读写地址的恢复。The step of performing cross-clock anti-shake processing based on the control information includes: monitoring a read/write address of the storage unit according to the period information of the anti-shake monitoring; if the relative offset of the read/write address is Within the jitter range tolerance information, the read/write address is maintained; if the relative offset of the read/write address is not within the jitter range tolerance information, the read/write address is restored according to the read/write recovery address.
  13. 一种数据位宽转换装置,包括:控制器和数据位宽转换电路;A data bit width conversion device includes: a controller and a data bit width conversion circuit;
    所述控制器,包括:存储部和处理部,所述存储部配置存储计算机程序,所述处理部配置为读取所述计算机程序以执行如下操作:根据并行数据转换信息,生成用于数据位宽转换的控制信息;The controller includes: a storage unit configured to store a computer program, the processing unit configured to read the computer program to perform an operation of generating a data bit according to the parallel data conversion information Wide conversion control information;
    所述数据位宽转换电路,配置为基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The data bit width conversion circuit is configured to perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  14. 根据权利要求13所述的数据位宽转换装置,其中:The data bit width conversion device according to claim 13, wherein:
    所述并行数据转换信息包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。The parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  15. 根据权利要求14所述的数据位宽转换装置,其中,The data bit width conversion device according to claim 14, wherein
    所述处理部是配置为读取所述计算机程序以执行如下操作:根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;在转换前后的数据传输速率一致时,根据并行数据转换信息生成用于数据位宽转换的控制信息。The processing unit is configured to read the computer program to perform an operation of: determining whether data transmission rates before and after conversion are consistent according to the parallel data conversion information; and converting data according to parallel data when data transmission rates before and after conversion are consistent Generate control information for data bit width conversion.
  16. 根据权利要求13所述的数据位宽转换装置,其中,所述处理部是配置为读取所述计算机程序以执行如下操作:The data bit width conversion device according to claim 13, wherein said processing section is configured to read said computer program to perform the following operations:
    根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息; Generating the control information according to the parallel data conversion information and based on w i *N i =w o *N o =LCM;
    其中,LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 Where LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, w o represents the converted second parallel data bit width, and N i represents the data written at the first clock frequency. number of cycles, N o represents the number of read data at a second frequency clock cycle.
  17. 根据权利要求13所述的数据位宽转换装置,其中,所述处理部是配置为读取所述计算机程序以执行如下操作:The data bit width conversion device according to claim 13, wherein said processing section is configured to read said computer program to perform the following operations:
    在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;Generating control information including routing information indicating the first mode when the first parallel data bit width before the conversion is less than the converted second parallel data bit width;
    在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;Generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width;
    其中,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。Wherein, in the first mode, the parallel data bit width conversion is prior to the cross-clock domain operation; in the second mode, the cross-clock domain operation is prior to the parallel data bit width The conversion is after.
  18. 根据权利要求13所述的数据位宽转换装置,其中:The data bit width conversion device according to claim 13, wherein:
    所述存储部,还配置为存储所述控制信息;The storage unit is further configured to store the control information;
    所述数据位宽转换电路,是配置为从所述存储部中读取所述控制信息,并基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The data bit width conversion circuit is configured to read the control information from the storage unit, and perform parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  19. 根据权利要求13所述的数据位宽转换装置,其中,The data bit width conversion device according to claim 13, wherein
    所述控制信息包括:路由信息,所述路由信息用于指示数据位宽转换的 第一模式和第二模式,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后;The control information includes: routing information, where the routing information is used to indicate a first mode and a second mode of data bit width conversion, and in the first mode, the parallel data bit width is prioritized, the cross clock is After the domain operation is performed, in the second mode, the cross-clock domain operation is preceded, and the parallel data bit width is converted later;
    所述数据位宽转换电路是配置为:采用所述路由信息指示的模式进行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。The data bit width conversion circuit is configured to perform data bit width conversion, cross clock domain operation, and cross clock anti-shake processing by using the mode indicated by the routing information.
  20. 根据权利要求13所述的数据位宽转换装置,其中,The data bit width conversion device according to claim 13, wherein
    所述数据位宽转换电路包括:数据位宽转换缓冲模块、跨时钟域存储模块、以及跨时钟防抖动模块;The data bit width conversion circuit includes: a data bit width conversion buffer module, a cross clock domain storage module, and a cross clock anti-jitter module;
    所述数据位宽转换缓冲模块用于完成并行数据位宽转换;The data bit width conversion buffer module is configured to complete parallel data bit width conversion;
    所述跨时钟域存储模块用于完成跨时钟域操作;The cross-clock domain storage module is configured to perform cross-clock domain operations;
    所述跨时钟防抖动模块用于完成跨时钟防抖动处理;The cross-clock anti-jitter module is configured to complete cross-clock anti-shake processing;
    其中,所述数据位宽转换缓冲模块与所述跨时钟域存储模块之间互通,所述跨时钟域存储模块与所述跨时钟防抖动模块互通。The data bit width conversion buffer module and the cross-clock domain storage module communicate with each other, and the cross-clock domain storage module and the cross-clock anti-shake module communicate with each other.
  21. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时执行如下操作:A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to perform the following operations:
    根据并行数据转换信息,生成用于数据位宽转换的控制信息,以便数据位宽转换电路基于所述控制信息进行并行数据位宽转换、跨时钟域操作以及跨时钟防抖动处理。Based on the parallel data conversion information, control information for data bit width conversion is generated such that the data bit width conversion circuit performs parallel data bit width conversion, cross clock domain operation, and cross clock anti-shake processing based on the control information.
  22. 根据权利要求21所述的计算机可读存储介质,其中:The computer readable storage medium of claim 21 wherein:
    所述并行数据转换信息包括:转换前的第一并行数据位宽及第一时钟频率、以及转换后的第二并行数据位宽及第二时钟频率。The parallel data conversion information includes: a first parallel data bit width and a first clock frequency before conversion, and a converted second parallel data bit width and a second clock frequency.
  23. 根据权利要求21所述的计算机可读存储介质,其中,The computer readable storage medium according to claim 21, wherein
    所述计算机程序被处理器执行时执行如下操作:The computer program is executed by the processor to perform the following operations:
    根据所述并行数据转换信息确定转换前后的数据传输速率是否一致;在转换前后的数据传输速率一致时,根据并行数据转换信息生成用于数据位宽转换的控制信息。Determining whether the data transmission rates before and after the conversion are consistent according to the parallel data conversion information; and generating control information for data bit width conversion according to the parallel data conversion information when the data transmission rates before and after the conversion are consistent.
  24. 根据权利要求21所述的计算机可读存储介质,其中,所述计算机程 序被处理器执行时执行如下操作:A computer readable storage medium according to claim 21, wherein said computer program, when executed by the processor, performs the following operations:
    判断转换前的第一并行数据位宽与其对应的第一时钟频率的乘积、和转换后的第二并行数据位宽及与其对应的第二时钟频率的乘积是否相同,相同时根据并行数据转换信息生成用于数据位宽转换的控制信息。Determining whether the product of the first parallel data bit width before conversion and its corresponding first clock frequency, and the product of the converted second parallel data bit width and the corresponding second clock frequency are the same, and according to the parallel data conversion information Generate control information for data bit width conversion.
  25. 根据权利要求21所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时执行如下操作:A computer readable storage medium according to claim 21, wherein said computer program, when executed by a processor, performs the following operations:
    根据所述并行数据转换信息并基于w i*N i=w o*N o=LCM,生成所述控制信息; Generating the control information according to the parallel data conversion information and based on w i *N i =w o *N o =LCM;
    其中,LCM为w i和w o的最小公倍数,w i表示转换前的第一并行数据位宽,w o表示转换后的第二并行数据位宽,N i表示第一时钟频率下写数据的周期数,N o表示第二时钟频率下读数据的周期数。 Where LCM is the least common multiple of w i and w o , w i represents the first parallel data bit width before conversion, w o represents the converted second parallel data bit width, and N i represents the data written at the first clock frequency. number of cycles, N o represents the number of read data at a second frequency clock cycle.
  26. 根据权利要求21所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时执行如下操作:A computer readable storage medium according to claim 21, wherein said computer program, when executed by a processor, performs the following operations:
    在转换前的第一并行数据位宽小于转换后的第二并行数据位宽时,生成包含指示第一模式的路由信息的控制信息;Generating control information including routing information indicating the first mode when the first parallel data bit width before the conversion is less than the converted second parallel data bit width;
    在转换前的第一并行数据位宽大于转换后的第二并行数据位宽时,生成包含指示第二模式的路由信息的控制信息;Generating control information including routing information indicating the second mode when the first parallel data bit width before the conversion is greater than the converted second parallel data bit width;
    其中,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后;所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后。Wherein, in the first mode, the parallel data bit width conversion is prior to the cross-clock domain operation; in the second mode, the cross-clock domain operation is prior to the parallel data bit width The conversion is after.
  27. 根据权利要求21至26任一项所述的计算机可读存储介质,其中,所述控制信息包括如下之一或多项:The computer readable storage medium according to any one of claims 21 to 26, wherein the control information comprises one or more of the following:
    路由信息,用于指示数据位宽转换使用的模式,所述模式为第一模式或第二模式,所述第一模式下,所述并行数据位宽转换在先、所述跨时钟域操作在后,所述第二模式下,所述跨时钟域操作在先、所述并行数据位宽转换在后;The routing information is used to indicate a mode used by the data bit width conversion, where the mode is a first mode or a second mode, and in the first mode, the parallel data bit width conversion is prior to the cross clock domain operation After the second mode, the cross-clock domain operation is prior to the parallel data bit width conversion;
    用于所述并行数据位宽转换的缓冲配置信息,包括:缓冲单元的容量信息、和读写配置信息;The buffer configuration information used for the parallel data bit width conversion includes: capacity information of the buffer unit, and read and write configuration information;
    用于所述跨时钟域操作的存储配置信息,包括:存储单元的容量信息、和读写配置信息;Storage configuration information for the operation of the cross-clock domain, including: capacity information of the storage unit, and read and write configuration information;
    用于所述跨时钟防抖动处理的防抖动配置信息,包括:防抖动监测的周期信息和读写恢复地址。The anti-jitter configuration information used for the cross-clock anti-shake processing includes: period information of anti-shake monitoring and a read/write recovery address.
PCT/CN2019/076141 2018-03-01 2019-02-26 Data bit width conversion method and device, and computer-readable storage medium WO2019165954A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810171006.3A CN110221994B (en) 2018-03-01 2018-03-01 Method and device for data bit width conversion and computer readable storage medium
CN201810171006.3 2018-03-01

Publications (1)

Publication Number Publication Date
WO2019165954A1 true WO2019165954A1 (en) 2019-09-06

Family

ID=67805159

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/076141 WO2019165954A1 (en) 2018-03-01 2019-02-26 Data bit width conversion method and device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN110221994B (en)
WO (1) WO2019165954A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11663157B1 (en) * 2022-12-22 2023-05-30 IQ-Analog Corporation Joint electron devices engineering council (JESD)204-to-peripheral component interconnect express (PCIe) interface

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094309A (en) * 2019-12-23 2021-07-09 深圳市中兴微电子技术有限公司 Data bit width conversion method and device
CN111093042B (en) * 2019-12-27 2022-02-22 Tcl华星光电技术有限公司 White balance adjustment system and white balance adjustment method
US10903849B1 (en) * 2020-07-20 2021-01-26 Micron Technology, Inc. Bit string compression
CN114765628A (en) * 2020-12-31 2022-07-19 深圳市中兴微电子技术有限公司 Data conversion method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191884A1 (en) * 2002-04-02 2003-10-09 Nec Electronics Corporation Bus system and information processing system including bus system
CN1893388A (en) * 2005-07-01 2007-01-10 中兴通讯股份有限公司 Asynchronous FIFO realizing system and realizing method
CN101166151A (en) * 2007-09-20 2008-04-23 北大方正集团有限公司 Method and device for transmitting data with different bits cross the clock domain
CN102981801A (en) * 2012-11-07 2013-03-20 迈普通信技术股份有限公司 Conversion method and device of local bus data bit wide

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3235534B2 (en) * 1997-09-24 2001-12-04 日本電気株式会社 Parallel-parallel converter, parallel-serial converter using the same, and serial-parallel converter
CN106201945B (en) * 2016-06-28 2017-07-11 湖南恒茂高科股份有限公司 Bit width conversion device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191884A1 (en) * 2002-04-02 2003-10-09 Nec Electronics Corporation Bus system and information processing system including bus system
CN1893388A (en) * 2005-07-01 2007-01-10 中兴通讯股份有限公司 Asynchronous FIFO realizing system and realizing method
CN101166151A (en) * 2007-09-20 2008-04-23 北大方正集团有限公司 Method and device for transmitting data with different bits cross the clock domain
CN102981801A (en) * 2012-11-07 2013-03-20 迈普通信技术股份有限公司 Conversion method and device of local bus data bit wide

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11663157B1 (en) * 2022-12-22 2023-05-30 IQ-Analog Corporation Joint electron devices engineering council (JESD)204-to-peripheral component interconnect express (PCIe) interface

Also Published As

Publication number Publication date
CN110221994B (en) 2022-04-08
CN110221994A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
WO2019165954A1 (en) Data bit width conversion method and device, and computer-readable storage medium
WO2021129689A1 (en) Data bit width conversion method and device
JP5805643B2 (en) Adjustment of memory write timing based on error detection technology
JPH02501245A (en) Method and apparatus for interconnecting buses in a multibus computer system
US20090150706A1 (en) Wrapper circuit for globally asynchronous locally synchronous system and method for operating the same
CN112463700B (en) Method and device for controlling AXI bus bandwidth
US9106458B2 (en) Method for detecting phase and phase detecting system
WO2014114146A1 (en) Self-correcting system for clock-generating circuit and correcting method thereof
US20180089114A1 (en) Cut-through buffer with variable frequencies
US10223310B2 (en) Multi-source flow management using elastic FIFO structures
JP2008509463A (en) Method for storing messages in message memory and message memory
US20110320855A1 (en) Error detection and recovery in a shared pipeline
US20110004817A1 (en) Crc management method performed in sata interface and data storage device using crc management method
TW200415477A (en) Method and apparatus for optimizing timing for a multi-drop bus
CN110572164A (en) LDPC decoding method, apparatus, computer device and storage medium
US20230239256A1 (en) Wide Elastic Buffer
US6546451B1 (en) Method and apparatus for decoupling processor speed from memory subsystem speed in a node controller
WO2022037638A1 (en) Integrated circuit reset method and integrated circuit
JP2003158512A (en) Digital signal processing system and data processing apparatus
US8392621B2 (en) Managing dataflow in a temporary memory
US7899955B2 (en) Asynchronous data buffer
CN111198837A (en) SDIO interface system based on FPGA and controller bridging method
JP7337021B2 (en) A master device that controls a slave device connected to an industrial network and a communication module provided in the master device
TWI250416B (en) Interference and system for transporting real-time data
TWI749384B (en) Data processing device and method

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: 19760518

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19760518

Country of ref document: EP

Kind code of ref document: A1