WO2020181473A1 - CIRCUIT STRUCTURE, SYSTEM ON CHIP (SoC), AND DATA PROCESSING METHOD - Google Patents

CIRCUIT STRUCTURE, SYSTEM ON CHIP (SoC), AND DATA PROCESSING METHOD Download PDF

Info

Publication number
WO2020181473A1
WO2020181473A1 PCT/CN2019/077722 CN2019077722W WO2020181473A1 WO 2020181473 A1 WO2020181473 A1 WO 2020181473A1 CN 2019077722 W CN2019077722 W CN 2019077722W WO 2020181473 A1 WO2020181473 A1 WO 2020181473A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
channel
channel controller
crc polynomial
circuit structure
Prior art date
Application number
PCT/CN2019/077722
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 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/077722 priority Critical patent/WO2020181473A1/en
Priority to CN201980005047.8A priority patent/CN111247516A/en
Publication of WO2020181473A1 publication Critical patent/WO2020181473A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum

Definitions

  • This application relates to the field of communications, and more specifically, to a circuit structure, a system-on-chip SoC, and a method for processing data.
  • SoC system-on-chip
  • CRC cyclic redundancy check
  • Checksum checksum
  • This application provides a circuit structure, a system-on-chip SoC, and a method for processing data, which can avoid consuming too much CPU computing resources and improve resource utilization and data throughput.
  • a circuit structure including: one or more memories, a plurality of channel controllers, a plurality of data to be verified are obtained from the one or more memories, and each channel controller corresponds to a kind of verification Algorithm; the multiple channel controllers process the multiple data to be verified through their respective corresponding verification algorithms, and write the processed data into the one or more memories.
  • a method for processing data including: receiving a plurality of data to be verified on multiple channels, each channel corresponding to a verification algorithm; The verification algorithm processes the multiple data to be verified.
  • a system-on-chip SoC including: a plurality of channel controllers, each channel controller corresponding to a check algorithm; the plurality of channel controllers use their respective check algorithms to perform verification on multiple The data to be verified is processed.
  • a channel controller is provided.
  • the channel controller is applied to the circuit structure of the above-mentioned first aspect, or the channel controller is applied to the system-on-chip SoC of the above-mentioned third aspect.
  • a device is provided, and the device is configured to execute the method in the second aspect.
  • a device in a sixth aspect, includes a memory and a processor, the memory is configured to store instructions, the processor is configured to execute instructions stored in the memory, and execute the instructions stored in the memory The processor is caused to execute the method of the second aspect.
  • a chip in a seventh aspect, includes a processing module and a communication interface, the processing module is configured to control the communication interface to communicate with the outside, and the processing module is also configured to implement the method of the second aspect.
  • a computer-readable storage medium on which instructions for executing the method in the second aspect are stored.
  • a computer program product containing instructions, including instructions for executing the method in the second aspect.
  • multiple channel controllers respectively correspond to a verification algorithm, and multiple channel controllers process data through their corresponding verification algorithms, so that not only the resource utilization rate can be improved, but also the data throughput rate can be improved.
  • FIG. 1 is a schematic diagram of a circuit structure provided by an embodiment of the application.
  • Fig. 2 is a schematic diagram of a channel controller suitable for an embodiment of the present application.
  • Fig. 3 is a schematic diagram of data processing by a channel controller applicable to an embodiment of the present application.
  • FIG. 4 is a schematic block diagram of a method for processing data provided by an embodiment of the application.
  • FIG. 5 is a schematic block diagram of an optimization device for processing data provided by an embodiment of the application.
  • FIG. 6 is a schematic structural diagram of an optimization device for processing data provided by an embodiment of the application.
  • Cyclic redundancy check It is the most commonly used error checking code in the field of data communication, and its feature is that the length of the information field and the check field can be arbitrarily selected. Cyclic Redundancy Check (CRC) is a data transmission error detection function, which performs polynomial calculation on data and attaches the obtained result to the back of the frame. The receiving device also executes similar algorithms to ensure the correctness and integrity of data transmission Sex.
  • the basic principle of CRC can be: after the K-bit information code and then splicing the R-bit check code, the entire code length is N bits, so this kind of code is also called (N, K) code.
  • N, K the entire code length
  • G(x) the check code of K-bit information can be generated, and G(x) is called the generator polynomial of this CRC code.
  • the specific generation process of the check code is: assuming that the information to be sent is represented by a polynomial C(X), shift C(x) to the left by R bits (which can be expressed as C(x)*2R), so that the right side of C(x) The R bit will be vacated, which is the location of the check code.
  • the remainder obtained by dividing C(x)*2R by the generator polynomial G(x) is the check code.
  • Checksum In the field of data processing and data communication, the sum of a set of data items used for verification purposes. These data items can be numbers or other character strings that are treated as numbers in the calculation of the check sum.
  • TCP Checksum may include transmission control protocol (transmission control protocol, TCP) checksum (TCP Checksum), user datagram protocol (user datagram protocol, UDP) checksum (UDP Checksum). Both TCPChecksum and TCPChecksum can be used to verify the data in the message.
  • This application proposes a circuit structure that does not need to consume so much CPU computing resources, which not only improves resource utilization, but also improves data throughput.
  • FIG. 1 is a circuit structure 10 provided by an embodiment of the present application.
  • the circuit structure 10 can be a chip, such as an SoC, or a device with a housing.
  • the circuit structure 10 may include multiple channel controllers. As shown in FIG. 1, the circuit structure 10 may include a first channel controller 11, a second channel controller 12, a third channel controller 13, and a fourth channel controller 14. The fifth channel controller 15, the sixth channel controller 16, the seventh channel controller 17, and the eighth channel controller 18.
  • the above channel controllers can be implemented in the form of circuits, for example.
  • FIG. 1 only lists eight channel controllers for ease of understanding, and the present application is not limited thereto.
  • the circuit structure 10 may include a greater number or a smaller number of channel controllers.
  • channel controller is only a naming and does not limit the protection scope of this application, and this application does not exclude the possibility of adopting other naming in the future.
  • the circuit structure 10 may include one or more memories, and the one or more memories can be used to store data to be verified, and can also be used to write processed data.
  • the circuit structure 10 may include a memory 21, a first channel controller 11, a second channel controller 12, a third channel controller 13, a fourth channel controller 14, a fifth channel controller 15, and a
  • the six-channel controller 16, the seventh-channel controller 17, and the eighth-channel controller 18 read the data to be processed from the memory 21 serially or in parallel, and different channel controllers correspond to different address ranges in the memory 21.
  • the memory and each channel controller can be integrated on a circuit, or can be realized by separate circuits, which is not limited.
  • the circuit structure 10 may also include multiple memories, for example, one channel controller corresponds to one memory, two channel controllers correspond to one memory, or three channel controllers correspond to one memory... etc. This is not limited.
  • the memory for storing the data to be verified and the memory for writing the processed data may be the same chip.
  • the channel controller may correspond to a memory that is used by the channel controller to obtain the data to be verified and used by the channel controller to write the processed data into the memory.
  • the seventh channel controller 17 and the eighth channel controller 18 read the data to be processed from the memory 21, and write the processed data into the memory 21 serially or in parallel
  • the memory for storing the data to be verified and the memory for writing the processed data may be different slices.
  • the circuit structure 10 may include two memories, one of which is used by the channel controller to obtain the data to be verified, and the other memory is used by the channel controller to write the processed data into the memory; for example, the circuit structure may also Including multiple memories, etc., this is not limited.
  • the type of the one or more memories may be the same or different.
  • the memory may be a double-rate synchronous dynamic random access memory (double data rate synchronous dynamic random access memory, DDR), or a static random-access memory (static random-access memory, SRAM), etc.
  • DDR double data rate synchronous dynamic random access memory
  • SRAM static random-access memory
  • the memory included in the circuit structure 10 has been exemplified above, and this application does not strictly limit the memory.
  • the channel controller included in the circuit structure 10 will be described in detail below.
  • Each channel controller corresponds to a verification algorithm, and the multiple channel controllers process multiple data through their corresponding verification algorithms.
  • each channel controller obtains data from the memory, processes the obtained data through a corresponding check algorithm, and writes the processed data into the memory.
  • the channel controller processes the data through their corresponding check algorithm, which does not need to consume so much CPU computing resources, improves resource utilization, and processes their own data through each channel controller to speed up processing The speed of data increases the data throughput rate.
  • each channel controller can correspond to a channel, for example, it is marked as channel 0, channel 1, channel 2, channel 3, channel 4, channel 5, channel 6, and channel 7.
  • the data can be processed on its corresponding channel.
  • each channel may correspond to one or more memories.
  • the first channel controller 11 corresponds to channel 0, that is, the first channel controller 11 processes data on channel 0, such as calculating 0, calculating i, and calculating 15.
  • the second channel controller 12 corresponds to channel 1, that is, the second channel controller 12 processes data on channel 1, such as calculating 0, calculating i, and calculating 15.
  • the third channel controller 13 corresponds to channel 2, that is, the third channel controller 13 processes data on channel 2, such as calculating 0, calculating i, and calculating 15.
  • the fourth channel controller 14 corresponds to channel 3, that is, the fourth channel controller 14 processes data on channel 3, such as calculating 0, calculating i, and calculating 15.
  • the fifth channel controller 15 corresponds to channel 4, that is, the fifth channel controller 15 processes data on channel 4, such as calculating 0, calculating i, and calculating 15.
  • the sixth channel controller 16 corresponds to channel 5, that is, the sixth channel controller 16 processes data on channel 5, such as calculating 0, calculating i, and calculating 15.
  • the seventh channel controller 17 corresponds to channel 6, that is, the seventh channel controller 17 processes data on channel 6, such as calculating 0, calculating i, and calculating 15.
  • the eighth channel controller 18 corresponds to channel 7, that is, the eighth channel controller 18 processes data on channel 7, such as calculating 0, calculating i, and calculating 15.
  • i 1, 2, 3,..., 14, calculate 0, calculate i, calculate 15, which means that multiple data blocks can be calculated through the check algorithm corresponding to each channel controller, and each channel controller processes
  • the data can be the same or different, for which there is no limitation.
  • each channel controller can process up to 16 different data blocks simultaneously. For example, calculate 0, calculate i, and calculate 15 shown in Figure 2.
  • the check algorithm or the check calculation method, or the type used to check the data, is used to indicate the method of checking the data, for example, CRC, Checksum, etc. based on different generating polynomials.
  • the types of check algorithms include at least: CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, TCP Checksum, UDP Checksum, etc.
  • the type of the check algorithm corresponding to each channel controller may be the same or different.
  • the type of check algorithm corresponding to each channel controller can be different.
  • the first channel controller 11 corresponds to the CRC polynomial 0x07
  • the second channel controller 12 corresponds to the CRC polynomial 0x31
  • the third channel controller 13 corresponds to the CRC polynomial 0x5e.
  • the circuit structure can be used as a general circuit structure, supporting multiple different types of verification algorithms, and improving hardware utilization.
  • the types of verification algorithms corresponding to each channel controller may be partially the same.
  • multiple channel controllers can be set to correspond to the CRC polynomial 0x07, such as the first channel controller 11, the second channel controller 12, and the third channel controller.
  • the channel controller 13 corresponds to the CRC polynomial 0x07.
  • the types of verification algorithms corresponding to some channel controllers in multiple channel controllers can be made the same according to some factors such as the size of the demand, which can meet user needs as much as possible and improve user experience.
  • the type of check algorithm corresponding to each channel controller can be dynamically configured.
  • the type of check algorithm supported by each channel can be dynamically configured.
  • the first channel controller 11 corresponds to the CRC polynomial 0x07
  • the first channel controller 11 corresponds to the CRC polynomial 0x31.
  • the first channel controller 11 corresponds to the CRC polynomial 0x07
  • the first channel controller 11 corresponds to the CRC polynomial 0x31.
  • the type of verification algorithm corresponding to the channel controller can be flexibly adjusted according to requirements, which can improve the utilization rate of the channel controller and save hardware resources.
  • each channel controller can process their corresponding data in parallel.
  • the eighth channel controller 18 processes respective data in parallel, such as performing calculation 0, calculation i, and calculation 15 in parallel.
  • the parallel processing of data through each channel controller can improve the efficiency of data processing and increase the data throughput rate.
  • the circuit structure 10 may also include multiple input modules and multiple output modules, and the multiple input modules correspond to multiple channel controllers one to one.
  • Each channel controller reads the configured CRC or Checksum calculation configuration information through its corresponding input module, automatically completes the CRC or Checksum calculation, and outputs the calculation result through the corresponding output module.
  • Each channel controller can have an independent input information descriptor.
  • the channel controller reads in data, that is, the channel controller reads the corresponding data input configuration information, and the channel controller can continuously read the input configuration information of up to 16 data blocks.
  • Each input configuration information can include configuration information related to the input data.
  • the input configuration information can include one or more of the following information: the starting address of the data to be calculated, the result output address, the initial value, the output XOR value, etc. .
  • each input configuration information can consist of 4 pieces of 32-bit data.
  • the start address of the data to be calculated that is, the first address of the data that needs to be CRC or Checksum operation (that is, the check algorithm corresponding to the channel controller).
  • the channel controller processes 16 data blocks, that is, the channel controller reads 16 input configuration information.
  • the starting address of the data to be calculated can be recorded as: the starting address of the data to be calculated 0, The starting address of the calculated data 1, the starting address of the data to be calculated 2,..., the starting address of the data to be calculated 15.
  • the result output address that is, after the channel controller completes the data calculation, the channel controller outputs the first address of the calculation result.
  • the channel controller processes 16 data blocks, that is, the channel controller corresponds to 16 result output addresses.
  • the result output addresses can be recorded as: result output address 0, result output address 1, result output address 2, ising, the result output address is 15.
  • the initial value for example, if it is a CRC operation, is the initial value of the CRC.
  • the channel controller processes 16 data blocks, that is, the channel controller corresponds to 16 initial values. Taking CRC calculation as an example, the initial values can be marked as: CRC initial value 0, CRC initial value 1, CRC Initial value 2, whil, CRC initial value 15.
  • the output XOR value can also be recorded as: CRC output XOR value 0, CRC output XOR value 1, CRC output XOR value 2, ..., CRC output XOR value 15.
  • the channel controller After the channel controller reads in the data, it processes the data.
  • the channel controller can process data based on its corresponding check algorithm. It should be understood that the specific calculation method and verification method of the channel controller may be the same as the prior art. For brevity, a detailed description of the specific process is omitted here.
  • the channel controller After the channel controller completes the corresponding operation (for example, CRC operation based on the generator polynomial or Checksum operation), it can output information related to the result, that is, it will write the result back to the output address specified in the input configuration information.
  • CRC for example, CRC operation based on the generator polynomial or Checksum operation
  • the channel controller can output information related to the result, that is, it will write the result back to the output address specified in the input configuration information.
  • CRC any one or more of the following information can be output: output CRC value, CRC initial value in input information, calculated data length, CRC configuration information.
  • each input configuration information can consist of 4 pieces of 32-bit data.
  • the output information can consist of 4 pieces of 32bit data.
  • the results can be recorded as Calculate Output CRC 0, Calculate Output CRC 1, Calculate Output CRC 2,..., Calculate Output CRC 15; You can also separate the calculated lengths Recorded as CRC calculation length 0, CRC calculation length 1, CRC calculation length 2,..., CRC calculation length 15; CRC configuration information can also be recorded as CRC configuration information 0, CRC configuration information 1, CRC configuration information 2,... ..., CRC configuration information 15.
  • FIG. 3 uses a channel controller as an example for description, and it should be understood that each channel controller can process data based on the foregoing manner.
  • circuit structure may be loaded on one SoC, or the “circuit structure" in the above embodiment may be replaced with "SoC”.
  • multiple channel controllers process data through their corresponding verification algorithms, so that it does not need to consume so much CPU computing resources, which improves resource utilization, and each channel controller processes their own data, which speeds up The speed of data processing improves the data throughput rate.
  • Fig. 4 is a schematic block diagram of a method 4 for processing data according to an embodiment of the present application. The method includes the following steps.
  • S410 Receive multiple data to be verified on multiple channels, and each channel corresponds to a verification algorithm
  • a circuit structure can be used, that is, multiple channels on the circuit structure process data through their corresponding check algorithms, so that there is no need to consume so much CPU computing resources, which improves the resources of the hardware circuit structure. Utilization rate, and each channel processes their own data, which speeds up data processing and improves data throughput.
  • the type of the check algorithm corresponding to each channel can be dynamically configured.
  • the type of check algorithm corresponding to each channel can be dynamically configured. Therefore, the type of check algorithm corresponding to the channel can be flexibly adjusted according to the demand, which can improve the utilization rate of the channel and save hardware resources.
  • the check algorithm corresponding to each channel is different.
  • the circuit structure can be used as a general circuit structure, supporting multiple different types of verification algorithms, and improving hardware utilization.
  • processing multiple data to be verified through respective corresponding verification algorithms including: processing multiple data to be verified in parallel through respective verification algorithms on multiple channels Test data.
  • each channel calculates its data independently and in parallel. Therefore, the efficiency of data processing can be improved, and the data throughput rate can be increased
  • the first input configuration information is read on the first channel, the first input configuration information includes: the start address of the first data, the first result output address, the initial value, the output XOR value; through the first channel
  • the corresponding verification algorithm calculates the first data to obtain the first result; output one or more of the following information to the first result output address: the first result, the initial value, the calculated data length, and the first input configuration information;
  • the first channel is any one of the multiple channels.
  • the type of the check algorithm includes at least: CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, TCPChecksum, UDPChecksum.
  • each channel can process up to 16 data blocks simultaneously.
  • Fig. 5 is a schematic block diagram of a data processing apparatus provided by an embodiment of the present application.
  • the device 500 includes the following units.
  • the transceiver unit 510 is configured to receive multiple data to be verified on multiple channels, and each channel corresponds to a verification algorithm
  • the processing unit 520 is configured to process multiple data to be verified on multiple channels through respective verification algorithms.
  • the type of the check algorithm corresponding to each channel can be dynamically configured.
  • the check algorithm corresponding to each channel is different.
  • the processing unit 520 is specifically configured to process multiple data to be verified in parallel through respective corresponding verification algorithms on multiple channels.
  • the transceiver unit 510 is configured to: read the first input configuration information on the first channel, the first input configuration information including: the start address of the first data, the first result output address, the initial value, and the output XOR
  • the processing unit 520 is configured to: calculate the first data through the check algorithm corresponding to the first channel to obtain the first result; the transceiver unit 510 is configured to: output one or more of the following information to the first result output address: The first result, the initial value, the calculated data length, and the first input configuration information; where the first channel is any one of the multiple channels.
  • the type of the check algorithm includes at least: CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, TCP Checksum, UDP Checksum.
  • each channel can process up to 16 data blocks simultaneously.
  • an embodiment of the present application also provides a schematic structural diagram of an apparatus 600 for processing data.
  • the apparatus 600 includes a processor 610 and a memory 620.
  • the memory 620 is used to store instructions, and the processor 610 is used to execute the memory.
  • the instructions stored in 620 and the execution of the instructions stored in the memory 620 enable the processor 610 to execute the data processing method in the above method embodiment.
  • the execution of the instructions stored in the memory 620 enables the processor 610 to execute the actions performed by the transceiver unit 510 and the processing unit 520 in the foregoing embodiment.
  • the apparatus 600 may further include a communication interface 630, which is used to exchange signals with external devices.
  • the processor 610 is configured to control the interface 630 to receive and/or send signals.
  • the embodiment of the present application also provides a computer storage medium on which a computer program is stored.
  • the computer program executes the method in the method embodiment shown in FIG. 4.
  • the embodiment of the present application also provides a computer program product containing instructions, which when executed by a computer causes the computer to execute the method in the method embodiment shown in FIG. 4.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

Provided are a circuit structure, a system on chip (SoC), and a data processing method. The circuit structure comprises one or more memories, and multiple channel controllers obtaining multiple pieces of data to be checked from the one or more memories, wherein each channel controller corresponds to one check algorithm; and the multiple channel controllers perform processing on said multiple data by means of the respective corresponding check algorithm, and writes the processed data into the one or more memories. The data is processed by the multiple channel controllers by means of the respective corresponding check algorithm, so that less CPU computing resources are consumed, and the resource utilization rate is improved; furthermore, respective data is processed by means of each channel controller, so that the speed of data processing is increased, and data throughput is improved.

Description

一种电路结构、系统级芯片SoC、处理数据的方法A circuit structure, system-level chip SoC, and data processing method
版权申明Copyright statement
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The content disclosed in this patent document contains copyrighted material. The copyright belongs to the copyright owner. The copyright owner does not object to anyone copying the patent document or the patent disclosure in the official records and archives of the Patent and Trademark Office.
技术领域Technical field
本申请涉及通信领域,并且更为具体地,涉及一种电路结构、系统级芯片SoC、处理数据的方法。This application relates to the field of communications, and more specifically, to a circuit structure, a system-on-chip SoC, and a method for processing data.
背景技术Background technique
在数据传输中,考虑到通信线路的不稳定、外界环境的干扰、仪器故障等原因,接收端收到的数据常常会有一定的错误,这些错误的信号如果被正常采用,用户体验很不好,有时甚至会产生很大的损失。因此,引入校验系统非常必要。In data transmission, taking into account the instability of the communication line, the interference of the external environment, instrument failure, etc., the data received by the receiving end often has certain errors. If these wrong signals are used normally, the user experience is very bad. , And sometimes even great losses. Therefore, it is necessary to introduce a verification system.
系统级芯片(system on chip,SoC)系统中常用的校验方式有很多,比如,循环冗余校验(cyclic redundancy check,CRC)、校验总和(Checksum)等。There are many common check methods in system-on-chip (system-on-chip, SoC) systems, such as cyclic redundancy check (CRC) and checksum (Checksum).
在SoC系统中,考虑到中央处理器(central processing unit,CPU)计算能力,一般仅提供一种类型的计算模块,例如提供一种类型的CRC的计算模块或者提供Checksum的计算模块。此外,对于大量数据的校验,比如大量数据的CRC计算和Checksum计算非常耗费宝贵的CPU计算力。In the SoC system, considering the computing power of the central processing unit (CPU), generally only one type of calculation module is provided, for example, one type of CRC calculation module or a Checksum calculation module is provided. In addition, the verification of large amounts of data, such as CRC calculation and Checksum calculation of large amounts of data, consumes valuable CPU computing power.
发明内容Summary of the invention
本申请提供一种电路结构、系统级芯片SoC、处理数据的方法,可以避免耗费过多的CPU计算资源,提高资源利用率和数据吞吐率。This application provides a circuit structure, a system-on-chip SoC, and a method for processing data, which can avoid consuming too much CPU computing resources and improve resource utilization and data throughput.
第一方面,提供一种电路结构,包括:一个或多个存储器,多个通道控制器,从所述一个或多个存储器获取多个待校验数据,每个通道控制器对应一种校验算法;所述多个通道控制器通过各自对应的校验算法,对所述多个待校验数据进行处理,并将处理后的数据写入所述一个或多个存储器。In a first aspect, a circuit structure is provided, including: one or more memories, a plurality of channel controllers, a plurality of data to be verified are obtained from the one or more memories, and each channel controller corresponds to a kind of verification Algorithm; the multiple channel controllers process the multiple data to be verified through their respective corresponding verification algorithms, and write the processed data into the one or more memories.
第二方面,提供一种处理数据的方法,包括:在多个通道上接收多个待校验数据,每个通道对应一种校验算法;在所述多个通道上,通过各自对应的校验算法,对所述多个待校验数据进行处理。In a second aspect, a method for processing data is provided, including: receiving a plurality of data to be verified on multiple channels, each channel corresponding to a verification algorithm; The verification algorithm processes the multiple data to be verified.
第三方面,提供一种系统级芯片SoC,包括:多个通道控制器,每个通道控制器对应一种校验算法;所述多个通道控制器通过各自对应的校验算法,对多个待校验数据进行处理。In a third aspect, a system-on-chip SoC is provided, including: a plurality of channel controllers, each channel controller corresponding to a check algorithm; the plurality of channel controllers use their respective check algorithms to perform verification on multiple The data to be verified is processed.
第四方面,提供一种通道控制器,所述通道控制器应用于上述第一方面中的电路结构中,或者,所述通道控制器应用于上述第三方面中的系统级芯片SoC中。In a fourth aspect, a channel controller is provided. The channel controller is applied to the circuit structure of the above-mentioned first aspect, or the channel controller is applied to the system-on-chip SoC of the above-mentioned third aspect.
第五方面,提供一种装置,所述装置用于执行上述第二方面中的方法。In a fifth aspect, a device is provided, and the device is configured to execute the method in the second aspect.
第六方面,提供一种装置,所述装置包括存储器和处理器,所述存储器用于存储指令,所述处理器用于执行所述存储器存储的指令,并且对所述存储器中存储的指令的执行使得所述处理器执行第二方面的方法。In a sixth aspect, a device is provided, the device includes a memory and a processor, the memory is configured to store instructions, the processor is configured to execute instructions stored in the memory, and execute the instructions stored in the memory The processor is caused to execute the method of the second aspect.
第七方面,提供一种芯片,所述芯片包括处理模块与通信接口,所述处理模块用于控制所述通信接口与外部进行通信,所述处理模块还用于实现第二方面的方法。In a seventh aspect, a chip is provided. The chip includes a processing module and a communication interface, the processing module is configured to control the communication interface to communicate with the outside, and the processing module is also configured to implement the method of the second aspect.
第八方面,提供一种计算机可读存储介质,其上存储有用于执行第二方面中的方法的指令。In an eighth aspect, a computer-readable storage medium is provided, on which instructions for executing the method in the second aspect are stored.
第九方面,提供一种包含指令的计算机程序产品,包含用于执行第二方面中的方法的指令。In a ninth aspect, a computer program product containing instructions is provided, including instructions for executing the method in the second aspect.
本申请提供的方案,通过多个通道控制器分别对应一种校验算法,且多个通道控制器通过各自对应的校验算法处理数据,使得不仅可以提高资源利用率,而且可以提高数据吞吐率。In the solution provided by this application, multiple channel controllers respectively correspond to a verification algorithm, and multiple channel controllers process data through their corresponding verification algorithms, so that not only the resource utilization rate can be improved, but also the data throughput rate can be improved. .
附图说明Description of the drawings
图1为本申请实施例提供的电路结构的示意图。FIG. 1 is a schematic diagram of a circuit structure provided by an embodiment of the application.
图2为适用于本申请实施例的通道控制器的示意图。Fig. 2 is a schematic diagram of a channel controller suitable for an embodiment of the present application.
图3为适用于本申请实施例的通道控制器处理数据的示意图。Fig. 3 is a schematic diagram of data processing by a channel controller applicable to an embodiment of the present application.
图4为本申请实施例提供的处理数据的方法的示意性框图。FIG. 4 is a schematic block diagram of a method for processing data provided by an embodiment of the application.
图5为本申请实施例提供的处理数据的优化装置的示意性框图。FIG. 5 is a schematic block diagram of an optimization device for processing data provided by an embodiment of the application.
图6为本申请实施例提供的处理数据的优化装置的示意性结构图。FIG. 6 is a schematic structural diagram of an optimization device for processing data provided by an embodiment of the application.
具体实施方式detailed description
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of this application. The terms used in the description of the application herein are only for the purpose of describing specific embodiments, and are not intended to limit the application.
为便于理解,首先介绍本申请实施例涉及的相关技术及概念。To facilitate understanding, first introduce the related technologies and concepts involved in the embodiments of the present application.
1、循环冗余校验(cyclic redundancy check,CRC):是数据通信领域中最常用的一种查错校验码,其特征是信息字段和校验字段的长度可以任意选定。循环冗余检查(CRC)是一种数据传输检错功能,对数据进行多项式计算,并将得到的结果附在帧的后面,接收设备也执行类似的算法,以保证数据传输的正确性和完整性。1. Cyclic redundancy check (CRC): It is the most commonly used error checking code in the field of data communication, and its feature is that the length of the information field and the check field can be arbitrarily selected. Cyclic Redundancy Check (CRC) is a data transmission error detection function, which performs polynomial calculation on data and attaches the obtained result to the back of the frame. The receiving device also executes similar algorithms to ensure the correctness and integrity of data transmission Sex.
CRC的基本原理可以是:在K位信息码后再拼接R位的校验码,整个编码长度为N位,因此,这种编码也叫(N,K)码。对于一个给定的(N,K)码,可以证明存在一个最高次幂为N-K=R的多项式G(x)。根据G(x)可以生成K位信息的校验码,而G(x)叫做这个CRC码的生成多项式。校验码的具体生成过程为:假设要发送的信息用多项式C(X)表示,将C(x)左移R位(可表示成C(x)*2R),这样C(x)的右边就会空出R位,这就是校验码的位置。用C(x)*2R除以生成多项式G(x)得到的余数就是校验码。The basic principle of CRC can be: after the K-bit information code and then splicing the R-bit check code, the entire code length is N bits, so this kind of code is also called (N, K) code. For a given (N, K) code, it can be proved that there is a polynomial G(x) with the highest power of N-K=R. According to G(x), the check code of K-bit information can be generated, and G(x) is called the generator polynomial of this CRC code. The specific generation process of the check code is: assuming that the information to be sent is represented by a polynomial C(X), shift C(x) to the left by R bits (which can be expressed as C(x)*2R), so that the right side of C(x) The R bit will be vacated, which is the location of the check code. The remainder obtained by dividing C(x)*2R by the generator polynomial G(x) is the check code.
应理解,上述仅是为便于理解简单介绍了一下CRC的一种可能的基本原理,其不对本申请的保护范围造成限定,CRC的具体计算方法和校验方法可以与现有技术相同。为了简洁,这里省略对其具体过程的详细说明。It should be understood that the above only briefly introduces a possible basic principle of CRC for ease of understanding, and does not limit the protection scope of this application. The specific calculation method and verification method of CRC may be the same as the prior art. For brevity, a detailed description of the specific process is omitted here.
2、校验和(Checksum):在数据处理和数据通信领域中,用于校验目的的一组数据项的和。这些数据项可以是数字或在计算检验总和过程中看作数字的其它字符串。2. Checksum: In the field of data processing and data communication, the sum of a set of data items used for verification purposes. These data items can be numbers or other character strings that are treated as numbers in the calculation of the check sum.
Checksum可以包括传输控制协议(transmission control protocol,TCP)校验和(TCPChecksum)、用户数据报协议(user datagram protocol,UDP)校验和(UDP Checksum)。TCPChecksum、TCPChecksum,均可以用于校验报文中的数据。Checksum may include transmission control protocol (transmission control protocol, TCP) checksum (TCP Checksum), user datagram protocol (user datagram protocol, UDP) checksum (UDP Checksum). Both TCPChecksum and TCPChecksum can be used to verify the data in the message.
应理解,Checksum的具体计算方法和校验方法可以与现有技术相同。为了简洁,这里省略对其具体过程的详细说明。It should be understood that the specific calculation method and verification method of Checksum may be the same as the prior art. For brevity, a detailed description of the specific process is omitted here.
应理解,上述仅示例性地介绍了用于校验数据的两种方式,CRC和Checksum,本申请并未限定于此,任何可以校验数据的方式都可以运用本申请的技术方案。It should be understood that the foregoing only exemplarily introduces two methods for verifying data, CRC and Checksum, and this application is not limited thereto. Any method that can verify data can use the technical solution of this application.
CRC与Checksum的计算在数据传输、安全验证等上广泛应用。当前,在系统级芯片(system on chip,SoC)的设计中,并不支持多种不同CRC和Checksum的并行计算,也就是说,一般仅会提供一种CRC的计算模块或者一种Checksum的计算模块。这样不仅硬件资源利用率较低,且大量数据的CRC和Checksum计算非常耗费宝贵的SoC中的CPU计算力。The calculation of CRC and Checksum is widely used in data transmission and security verification. At present, in the design of system-on-chip (SoC), it does not support multiple parallel calculations of different CRCs and Checksums, that is, generally only one CRC calculation module or one Checksum calculation is provided Module. In this way, not only the utilization of hardware resources is low, but the calculation of CRC and Checksum of large amounts of data consumes precious CPU computing power in SoC.
本申请提出一种电路结构,可以不需要耗费那么多的CPU计算资源,不仅可以提高资源利用率,而且可以提高数据吞吐率。This application proposes a circuit structure that does not need to consume so much CPU computing resources, which not only improves resource utilization, but also improves data throughput.
图1是本申请实施例提供的一种电路结构10。该电路结构10可以是芯片,如SoC,也可以是具有外壳的设备。FIG. 1 is a circuit structure 10 provided by an embodiment of the present application. The circuit structure 10 can be a chip, such as an SoC, or a device with a housing.
电路结构10可以包括多个通道控制器,如图1所示,电路结构10可以包括第一通道控制器11、第二通道控制器12、第三通道控制器13、第四通道控制器14、第五通道控制器15、第六通道控制器16、第七通道控制器17、第八通道控制器18。以上各通道控制器例如可以通过电路的形式实现。The circuit structure 10 may include multiple channel controllers. As shown in FIG. 1, the circuit structure 10 may include a first channel controller 11, a second channel controller 12, a third channel controller 13, and a fourth channel controller 14. The fifth channel controller 15, the sixth channel controller 16, the seventh channel controller 17, and the eighth channel controller 18. The above channel controllers can be implemented in the form of circuits, for example.
应理解,图1仅是为便于理解,列举了八个通道控制器,本申请并未限定于此,该电路结构10可以包括更多数量或更少数量的通道控制器。It should be understood that FIG. 1 only lists eight channel controllers for ease of understanding, and the present application is not limited thereto. The circuit structure 10 may include a greater number or a smaller number of channel controllers.
还应理解,通道控制器仅是一种命名,并不对本申请的保护范围造成限定,本申请并不排除以后采用其他命名的可能。It should also be understood that the channel controller is only a naming and does not limit the protection scope of this application, and this application does not exclude the possibility of adopting other naming in the future.
电路结构10可以包括一个或多个存储器,该一个或多个存储器可用于存储待校验数据,也可用于写入处理后的数据。如图1所示,电路结构10可以包括存储器21,第一通道控制器11、第二通道控制器12、第三通道控制器13、第四通道控制器14、第五通道控制器15、第六通道控制器16、第七通道控制器17、第八通道控制器18从存储器21中串行或者并行的读取待处理数据,不同的通道控制器对应存储器21中不同的地址范围。存储器和各通道控制器可以集成在一个电路上,也可以各自通过单独电路实现,对此不作限定。在其它实施例中,电路结构10也可以包括多个存储器,例如一个通道控制器对应一个存储器,也可以2个通道控制器对应一个存储器,或者3个通道控制器对应一个存储器……等等对此不作限定。The circuit structure 10 may include one or more memories, and the one or more memories can be used to store data to be verified, and can also be used to write processed data. As shown in Figure 1, the circuit structure 10 may include a memory 21, a first channel controller 11, a second channel controller 12, a third channel controller 13, a fourth channel controller 14, a fifth channel controller 15, and a The six-channel controller 16, the seventh-channel controller 17, and the eighth-channel controller 18 read the data to be processed from the memory 21 serially or in parallel, and different channel controllers correspond to different address ranges in the memory 21. The memory and each channel controller can be integrated on a circuit, or can be realized by separate circuits, which is not limited. In other embodiments, the circuit structure 10 may also include multiple memories, for example, one channel controller corresponds to one memory, two channel controllers correspond to one memory, or three channel controllers correspond to one memory... etc. This is not limited.
示例性地,存储待校验数据的存储器和写入处理后数据的存储器可以是 同一片。例如,通道控制器可以对应一个存储器,该一个存储器用于该通道控制器获取待校验数据,并用于该通道控制器将处理后的数据写入该存储器。例如,以图1为例,第一通道控制器11、第二通道控制器12、第三通道控制器13、第四通道控制器14、第五通道控制器15、第六通道控制器16、第七通道控制器17、第八通道控制器18从存储器21中读取待处理数据,并将处理后的数据串行或者并行地写入存储器21中Exemplarily, the memory for storing the data to be verified and the memory for writing the processed data may be the same chip. For example, the channel controller may correspond to a memory that is used by the channel controller to obtain the data to be verified and used by the channel controller to write the processed data into the memory. For example, taking Figure 1 as an example, the first channel controller 11, the second channel controller 12, the third channel controller 13, the fourth channel controller 14, the fifth channel controller 15, the sixth channel controller 16, The seventh channel controller 17 and the eighth channel controller 18 read the data to be processed from the memory 21, and write the processed data into the memory 21 serially or in parallel
示例性地,存储待校验数据的存储器和写入处理后数据的存储器可以是不同片。例如,电路结构10可以包括两个存储器,其中一个存储器用于通道控制器获取待校验数据,另一个存储器用于通道控制器将处理后的数据写入该存储器;又如,电路结构也可以包括多个存储器等,对此,不作限定。Exemplarily, the memory for storing the data to be verified and the memory for writing the processed data may be different slices. For example, the circuit structure 10 may include two memories, one of which is used by the channel controller to obtain the data to be verified, and the other memory is used by the channel controller to write the processed data into the memory; for example, the circuit structure may also Including multiple memories, etc., this is not limited.
示例性地,该一个或多个存储器的类型可以相同,也可以不同。Exemplarily, the type of the one or more memories may be the same or different.
示例性地,存储器可以是双倍速率同步动态随机存储器(double data rate synchronous dynamic random access memory,DDR),也可以是静态随机存取存储器(static random-access memory,SRAM)等,对此,本申请实施例不作限定。Exemplarily, the memory may be a double-rate synchronous dynamic random access memory (double data rate synchronous dynamic random access memory, DDR), or a static random-access memory (static random-access memory, SRAM), etc. The application examples are not limited.
以上对电路结构10所包括的存储器作了示例性说明,本申请对存储器不作严格限定。The memory included in the circuit structure 10 has been exemplified above, and this application does not strictly limit the memory.
下面对电路结构10所包括的通道控制器进行详细介绍。The channel controller included in the circuit structure 10 will be described in detail below.
每个通道控制器对应一种校验算法,该多个通道控制器通过各自对应的校验算法,对多个数据进行处理。Each channel controller corresponds to a verification algorithm, and the multiple channel controllers process multiple data through their corresponding verification algorithms.
例如,每个通道控制器从存储器中获取数据,并通过对应的校验算法,获取到的数据进行处理,并将处理后的数据写入存储器。For example, each channel controller obtains data from the memory, processes the obtained data through a corresponding check algorithm, and writes the processed data into the memory.
基于上述技术方案,由通道控制器通过各自对应的校验算法处理数据,从而不需要耗费那么多的CPU计算资源,提高了资源利用率,且通过各个通道控制器处理各自的数据,加快了处理数据的速度,提高了数据吞吐率。Based on the above technical solution, the channel controller processes the data through their corresponding check algorithm, which does not need to consume so much CPU computing resources, improves resource utilization, and processes their own data through each channel controller to speed up processing The speed of data increases the data throughput rate.
如图2所示,每个通道控制器可以对应一个通道,例如,记为通道0、通道1、通道2、通道3、通道4、通道5、通道6、通道7,每个通道控制器均可以在其对应的通道上处理数据。示例性地,每个通道可对应一个或多个存储器。As shown in Figure 2, each channel controller can correspond to a channel, for example, it is marked as channel 0, channel 1, channel 2, channel 3, channel 4, channel 5, channel 6, and channel 7. The data can be processed on its corresponding channel. Exemplarily, each channel may correspond to one or more memories.
假设第一通道控制器11对应通道0,也就是说,第一通道控制器11在通道0上处理数据,如计算0、计算i、计算15。假设第二通道控制器12对 应通道1,也就是说,第二通道控制器12在通道1上处理数据,如计算0、计算i、计算15。假设第三通道控制器13对应通道2,也就是说,第三通道控制器13在通道2上处理数据,如计算0、计算i、计算15。假设第四通道控制器14对应通道3,也就是说,第四通道控制器14在通道3上处理数据,如计算0、计算i、计算15。假设第五通道控制器15对应通道4,也就是说,第五通道控制器15在通道4上处理数据,如计算0、计算i、计算15。假设第六通道控制器16对应通道5,也就是说,第六通道控制器16在通道5上处理数据,如计算0、计算i、计算15。假设第七通道控制器17对应通道6,也就是说,第七通道控制器17在通道6上处理数据,如计算0、计算i、计算15。假设第八通道控制器18对应通道7,也就是说,第八通道控制器18在通道7上处理数据,如计算0、计算i、计算15。Assume that the first channel controller 11 corresponds to channel 0, that is, the first channel controller 11 processes data on channel 0, such as calculating 0, calculating i, and calculating 15. Assume that the second channel controller 12 corresponds to channel 1, that is, the second channel controller 12 processes data on channel 1, such as calculating 0, calculating i, and calculating 15. Assume that the third channel controller 13 corresponds to channel 2, that is, the third channel controller 13 processes data on channel 2, such as calculating 0, calculating i, and calculating 15. Assume that the fourth channel controller 14 corresponds to channel 3, that is, the fourth channel controller 14 processes data on channel 3, such as calculating 0, calculating i, and calculating 15. Assume that the fifth channel controller 15 corresponds to channel 4, that is, the fifth channel controller 15 processes data on channel 4, such as calculating 0, calculating i, and calculating 15. Assume that the sixth channel controller 16 corresponds to channel 5, that is, the sixth channel controller 16 processes data on channel 5, such as calculating 0, calculating i, and calculating 15. It is assumed that the seventh channel controller 17 corresponds to channel 6, that is, the seventh channel controller 17 processes data on channel 6, such as calculating 0, calculating i, and calculating 15. Assume that the eighth channel controller 18 corresponds to channel 7, that is, the eighth channel controller 18 processes data on channel 7, such as calculating 0, calculating i, and calculating 15.
其中,i=1、2、3、……、14,计算0、计算i、计算15,表示通过每个通道控制器对应的校验算法可以计算多个数据块,每个通道控制器处理的数据可以相同,也可以不同,对此,不作限定。Among them, i = 1, 2, 3,..., 14, calculate 0, calculate i, calculate 15, which means that multiple data blocks can be calculated through the check algorithm corresponding to each channel controller, and each channel controller processes The data can be the same or different, for which there is no limitation.
作为示例,每个通道控制器最多能够同时处理16个不同的数据块。例如图2所示的计算0、计算i、计算15。As an example, each channel controller can process up to 16 different data blocks simultaneously. For example, calculate 0, calculate i, and calculate 15 shown in Figure 2.
校验算法,或者称为校验计算方式,或者称为用于校验数据的类型,其是用于表示对数据进行校验的方式,例如,基于不同生成多项式的CRC、Checksum等。The check algorithm, or the check calculation method, or the type used to check the data, is used to indicate the method of checking the data, for example, CRC, Checksum, etc. based on different generating polynomials.
作为示例,校验算法的类型至少包括:CRC多项式0x07、CRC多项式0x31、CRC多项式0x5e、CRC多项式0x1021、CRC多项式0x8005、CRC多项式0x864CF8、CRC多项式0x04C11DB7、TCP Checksum、UDP Checksum等等。As an example, the types of check algorithms include at least: CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, TCP Checksum, UDP Checksum, etc.
作为示例,每个通道控制器对应的校验算法的类型可以相同,也可以不同。As an example, the type of the check algorithm corresponding to each channel controller may be the same or different.
一种可能的实现方式,每个通道控制器对应的校验算法的类型可以不同。In a possible implementation, the type of check algorithm corresponding to each channel controller can be different.
例如,第一通道控制器11对应CRC多项式0x07,第二通道控制器12对应CRC多项式0x31,第三通道控制器13对应CRC多项式0x5e。For example, the first channel controller 11 corresponds to the CRC polynomial 0x07, the second channel controller 12 corresponds to the CRC polynomial 0x31, and the third channel controller 13 corresponds to the CRC polynomial 0x5e.
基于上述技术方案,通过使得通道控制器对应的校验算法的类型不同,可以使得该电路结构作为一个通用电路结构,支持多种不同类型的校验算法,提高硬件利用率。Based on the above technical solution, by making the types of verification algorithms corresponding to the channel controllers different, the circuit structure can be used as a general circuit structure, supporting multiple different types of verification algorithms, and improving hardware utilization.
又一种可能的实现方式,各个通道控制器对应的校验算法的类型可以部分相同。In another possible implementation manner, the types of verification algorithms corresponding to each channel controller may be partially the same.
例如,假设对TCP Checksum这种类型的校验算法的需求较大,则可以设置多个通道控制器对应该CRC多项式0x07,如第一通道控制器11、第二通道控制器12、以及第三通道控制器13均对应CRC多项式0x07。For example, assuming that there is a large demand for a check algorithm of the type TCP Checksum, multiple channel controllers can be set to correspond to the CRC polynomial 0x07, such as the first channel controller 11, the second channel controller 12, and the third channel controller. The channel controller 13 corresponds to the CRC polynomial 0x07.
基于上述技术方案,可以根据需求量的大小等一些因素,来使得多个通道控制器中的部分通道控制器对应的校验算法的类型相同,可以尽可能地满足用户需求,提高用户体验。Based on the above technical solution, the types of verification algorithms corresponding to some channel controllers in multiple channel controllers can be made the same according to some factors such as the size of the demand, which can meet user needs as much as possible and improve user experience.
作为示例,每个通道控制器对应的校验算法的类型可动态配置。As an example, the type of check algorithm corresponding to each channel controller can be dynamically configured.
换句话说,每个通道支持的校验算法的类型可以动态配置。例如,在第一时刻,第一通道控制器11对应CRC多项式0x07,第二时刻,第一通道控制器11对应CRC多项式0x31。又如,在处理第一个数据块时,第一通道控制器11对应CRC多项式0x07,在处理第二个数据块时,第一通道控制器11对应CRC多项式0x31。In other words, the type of check algorithm supported by each channel can be dynamically configured. For example, at the first moment, the first channel controller 11 corresponds to the CRC polynomial 0x07, and at the second moment, the first channel controller 11 corresponds to the CRC polynomial 0x31. For another example, when processing the first data block, the first channel controller 11 corresponds to the CRC polynomial 0x07, and when processing the second data block, the first channel controller 11 corresponds to the CRC polynomial 0x31.
基于上述技术方案,可以根据需求灵活调整通道控制器对应的校验算法的类型,可以提高通道控制器的利用率,节省硬件资源。Based on the above technical solution, the type of verification algorithm corresponding to the channel controller can be flexibly adjusted according to requirements, which can improve the utilization rate of the channel controller and save hardware resources.
作为示例,各个通道控制器可以并行处理各自对应的数据。As an example, each channel controller can process their corresponding data in parallel.
例如,第一通道控制器11、第二通道控制器12、第三通道控制器13、第四通道控制器14、第五通道控制器15、第六通道控制器16、第七通道控制器17、第八通道控制器18并行处理各自的数据,如并行进行计算0、计算i、计算15。For example, the first channel controller 11, the second channel controller 12, the third channel controller 13, the fourth channel controller 14, the fifth channel controller 15, the sixth channel controller 16, the seventh channel controller 17 , The eighth channel controller 18 processes respective data in parallel, such as performing calculation 0, calculation i, and calculation 15 in parallel.
基于上述技术方案,通过各个通道控制器并行处理数据,可以提高处理数据的效率,提高数据吞吐率。Based on the above technical solution, the parallel processing of data through each channel controller can improve the efficiency of data processing and increase the data throughput rate.
下面结合图3详细描述通道控制器如何处理数据。The following describes in detail how the channel controller processes data in conjunction with Figure 3.
电路结构10还可以包括多个输入模块和多个输出模块,多个输入模块与多个通道控制器一一对应。每个通道控制器通过各自对应的输入模块,读取配置的CRC或Checksum计算的配置信息,自动完成CRC或Checksum的计算,并且通过对应的输出模块输出计算结果。每个通道控制器可以拥有独立的输入信息描述符。The circuit structure 10 may also include multiple input modules and multiple output modules, and the multiple input modules correspond to multiple channel controllers one to one. Each channel controller reads the configured CRC or Checksum calculation configuration information through its corresponding input module, automatically completes the CRC or Checksum calculation, and outputs the calculation result through the corresponding output module. Each channel controller can have an independent input information descriptor.
如图3所示,通道控制器读入数据,也就是说,通道控制器读取相应的数据输入配置信息,且通道控制器最多可以连续读取16个数据块的输入配 置信息。As shown in Figure 3, the channel controller reads in data, that is, the channel controller reads the corresponding data input configuration information, and the channel controller can continuously read the input configuration information of up to 16 data blocks.
每个输入配置信息可以包括与输入数据相关的配置信息,例如该输入配置信息可以包括以下一项或多项信息:待计算数据的起始地址、结果输出地址、初始值、输出异或值等。又如,每个输入配置信息可以由4个32bit数据构成。Each input configuration information can include configuration information related to the input data. For example, the input configuration information can include one or more of the following information: the starting address of the data to be calculated, the result output address, the initial value, the output XOR value, etc. . For another example, each input configuration information can consist of 4 pieces of 32-bit data.
其中,待计算数据的起始地址,也就是说,需要进行CRC或者Checksum运算(即该通道控制器对应的校验算法)的数据的首地址。例如,该通道控制器处理16个数据块,即该通道控制器读取16个输入配置信息,为区分,待计算数据的起始地址可以分别记为:待计算数据的起始地址0、待计算数据的起始地址1、待计算数据的起始地址2、……、待计算数据的起始地址15。Among them, the start address of the data to be calculated, that is, the first address of the data that needs to be CRC or Checksum operation (that is, the check algorithm corresponding to the channel controller). For example, the channel controller processes 16 data blocks, that is, the channel controller reads 16 input configuration information. For distinction, the starting address of the data to be calculated can be recorded as: the starting address of the data to be calculated 0, The starting address of the calculated data 1, the starting address of the data to be calculated 2,..., the starting address of the data to be calculated 15.
其中,结果输出地址,也就是说,通道控制器完成数据运算后,通道控制器输出计算结果的首地址。例如,该通道控制器处理16个数据块,即该通道控制器对应16个结果输出地址,为区分,结果输出地址可以分别记为:结果输出地址0、结果输出地址1、结果输出地址2、……、结果输出地址15。Among them, the result output address, that is, after the channel controller completes the data calculation, the channel controller outputs the first address of the calculation result. For example, the channel controller processes 16 data blocks, that is, the channel controller corresponds to 16 result output addresses. For distinction, the result output addresses can be recorded as: result output address 0, result output address 1, result output address 2, ……, the result output address is 15.
其中,初始值,例如如果是CRC运算的话,即CRC的初始值。例如,该通道控制器处理16个数据块,即该通道控制器对应16个初始值,以CRC运算为例,为区分,初始值可以分别记为:CRC初始值0、CRC初始值1、CRC初始值2、……、CRC初始值15。Among them, the initial value, for example, if it is a CRC operation, is the initial value of the CRC. For example, the channel controller processes 16 data blocks, that is, the channel controller corresponds to 16 initial values. Taking CRC calculation as an example, the initial values can be marked as: CRC initial value 0, CRC initial value 1, CRC Initial value 2,......, CRC initial value 15.
其中,输出异或值,为区分,也可以分别记为:CRC输出异或值0、CRC输出异或值1、CRC输出异或值2、……、CRC输出异或值15。Among them, the output XOR value, for distinction, can also be recorded as: CRC output XOR value 0, CRC output XOR value 1, CRC output XOR value 2, ..., CRC output XOR value 15.
通道控制器读入数据后,对数据进行处理。通道控制器可以基于其对应的校验算法处理数据。应理解,通道控制器的具体计算方法和校验方法可以与现有技术相同。为了简洁,这里省略对其具体过程的详细说明。After the channel controller reads in the data, it processes the data. The channel controller can process data based on its corresponding check algorithm. It should be understood that the specific calculation method and verification method of the channel controller may be the same as the prior art. For brevity, a detailed description of the specific process is omitted here.
通道控制器完成相应的运算(例如基于生成多项式的CRC运算或者Checksum运算)后,可以将与该结果相关的信息输出,也就是说,会将结果写回到输入配置信息中指定的输出地址。例如,以CRC为例,可以将以下任意一项或多项信息输出:输出的CRC值、输入信息中的CRC初始值、计算的数据长度、CRC配置信息。又如,每个输入配置信息可以由4个32bit数据构成。又如,输出的信息可以由4个32bit数据构成。After the channel controller completes the corresponding operation (for example, CRC operation based on the generator polynomial or Checksum operation), it can output information related to the result, that is, it will write the result back to the output address specified in the input configuration information. For example, taking CRC as an example, any one or more of the following information can be output: output CRC value, CRC initial value in input information, calculated data length, CRC configuration information. For another example, each input configuration information can consist of 4 pieces of 32-bit data. For another example, the output information can consist of 4 pieces of 32bit data.
当该通道控制器处理16个数据块时,为区分,可以将结果分别记为计算输出CRC 0、计算输出CRC 1、计算输出CRC 2、……、计算输出CRC 15;还可以将计算长度分别记为CRC计算长度0、CRC计算长度1、CRC计算长度2、……、CRC计算长度15;还可以将CRC配置信息分别记为CRC配置信息0、CRC配置信息1、CRC配置信息2、……、CRC配置信息15。When the channel controller processes 16 data blocks, in order to distinguish, the results can be recorded as Calculate Output CRC 0, Calculate Output CRC 1, Calculate Output CRC 2,..., Calculate Output CRC 15; You can also separate the calculated lengths Recorded as CRC calculation length 0, CRC calculation length 1, CRC calculation length 2,..., CRC calculation length 15; CRC configuration information can also be recorded as CRC configuration information 0, CRC configuration information 1, CRC configuration information 2,... …, CRC configuration information 15.
应理解,图3以一个通道控制器为例进行了说明,应理解,各个通道控制器均可以基于上述方式处理数据。It should be understood that FIG. 3 uses a channel controller as an example for description, and it should be understood that each channel controller can process data based on the foregoing manner.
还应理解,上述电路结构可加载于一个SoC上,或者,上述实施例中的“电路结构”可替换为“SoC”。It should also be understood that the above circuit structure may be loaded on one SoC, or the "circuit structure" in the above embodiment may be replaced with "SoC".
本申请实施例通过多个通道控制器通过各自对应的校验算法处理数据,从而不需要耗费那么多的CPU计算资源,提高了资源利用率,且通过各个通道控制器处理各自的数据,加快了处理数据的速度,提高了数据吞吐率。In the embodiment of the present application, multiple channel controllers process data through their corresponding verification algorithms, so that it does not need to consume so much CPU computing resources, which improves resource utilization, and each channel controller processes their own data, which speeds up The speed of data processing improves the data throughput rate.
上文结合图1至图3描述了本申请的装置实施例,下文将结合图4描述上文装置施例对应的方法实施例。应理解,该方法可由上述电路结构10来实现。方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的内容可以参见前面装置实施例,为了简洁,这里不再赘述。The device embodiments of the present application are described above with reference to FIGS. 1 to 3, and the method embodiments corresponding to the above device embodiments will be described below with reference to FIG. 4. It should be understood that this method can be implemented by the circuit structure 10 described above. The description of the method embodiment and the description of the device embodiment correspond to each other. Therefore, for the content that is not described in detail, please refer to the previous device embodiment. For the sake of brevity, it will not be repeated here.
图4是根据本申请实施例提供的处理数据的方法4的示意性框图。该方法包括如下步骤。Fig. 4 is a schematic block diagram of a method 4 for processing data according to an embodiment of the present application. The method includes the following steps.
S410,在多个通道上接收多个待校验数据,每个通道对应一种校验算法;S410: Receive multiple data to be verified on multiple channels, and each channel corresponds to a verification algorithm;
S420,在多个通道上,通过各自对应的校验算法,对多个待校验数据进行处理。S420: On multiple channels, process multiple data to be verified through respective corresponding verification algorithms.
在本申请实施例中,可以由一个电路结构,即该电路结构上的多个通道通过各自对应的校验算法处理数据,从而不需要耗费那么多的CPU计算资源,提高了硬件电路结构的资源利用率,且各个通道处理各自的数据,加快了处理数据的速度,提高了数据吞吐率。In the embodiment of the present application, a circuit structure can be used, that is, multiple channels on the circuit structure process data through their corresponding check algorithms, so that there is no need to consume so much CPU computing resources, which improves the resources of the hardware circuit structure. Utilization rate, and each channel processes their own data, which speeds up data processing and improves data throughput.
可选地,每个通道对应的校验算法的类型可动态配置。Optionally, the type of the check algorithm corresponding to each channel can be dynamically configured.
也就是说,可以动态地配置各个通道对应的校验算法的类型。因此,可以根据需求灵活调整通道对应的校验算法的类型,可以提高通道的利用率,节省硬件资源。In other words, the type of check algorithm corresponding to each channel can be dynamically configured. Therefore, the type of check algorithm corresponding to the channel can be flexibly adjusted according to the demand, which can improve the utilization rate of the channel and save hardware resources.
可选地,每个通道对应的校验算法不同。Optionally, the check algorithm corresponding to each channel is different.
因此,通过通道对应的校验算法的类型不同,可以使得该电路结构作为 一个通用电路结构,支持多种不同类型的校验算法,提高硬件利用率。Therefore, through the different types of verification algorithms corresponding to the channels, the circuit structure can be used as a general circuit structure, supporting multiple different types of verification algorithms, and improving hardware utilization.
可选地,在多个通道上,通过各自对应的校验算法,对多个待校验数据进行处理,包括:在多个通道上,通过各自对应的校验算法,并行处理多个待校验数据。Optionally, on multiple channels, processing multiple data to be verified through respective corresponding verification algorithms, including: processing multiple data to be verified in parallel through respective verification algorithms on multiple channels Test data.
也就是说,各个通道各自独立、并行计算各自的数据。因此,可以提高处理数据的效率,提高数据吞吐率In other words, each channel calculates its data independently and in parallel. Therefore, the efficiency of data processing can be improved, and the data throughput rate can be increased
可选地,在第一通道上读取第一输入配置信息,第一输入配置信息包括:第一数据的起始地址、第一结果输出地址、初始值、输出异或值;通过第一通道对应的校验算法,计算第一数据,得到第一结果;将以下一项或多项信息输出到第一结果输出地址:第一结果、初始值、计算的数据长度、第一输入配置信息;其中,第一通道为多个通道中的任意一个通道。Optionally, the first input configuration information is read on the first channel, the first input configuration information includes: the start address of the first data, the first result output address, the initial value, the output XOR value; through the first channel The corresponding verification algorithm calculates the first data to obtain the first result; output one or more of the following information to the first result output address: the first result, the initial value, the calculated data length, and the first input configuration information; Among them, the first channel is any one of the multiple channels.
可选地,校验算法的类型至少包括:CRC多项式0x07、CRC多项式0x31、CRC多项式0x5e、CRC多项式0x1021、CRC多项式0x8005、CRC多项式0x864CF8、CRC多项式0x04C11DB7、TCPChecksum、UDP Checksum。Optionally, the type of the check algorithm includes at least: CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, TCPChecksum, UDPChecksum.
可选地,每个通道最多能够同时处理16个数据块。Optionally, each channel can process up to 16 data blocks simultaneously.
上文结合图4,描述了本申请的方法实施例,下面结合图5和图6,描述本申请的装置实施例。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。The method embodiment of the present application is described above with reference to FIG. 4, and the device embodiment of the present application is described below with reference to FIG. 5 and FIG. 6. It should be understood that the description of the device embodiment and the description of the method embodiment correspond to each other, and therefore, the parts that are not described in detail may refer to the previous method embodiment.
图5是本申请实施例提供的处理数据的装置的示意性框图。该装置500包括如下单元。Fig. 5 is a schematic block diagram of a data processing apparatus provided by an embodiment of the present application. The device 500 includes the following units.
收发单元510,用于在多个通道上接收多个待校验数据,每个通道对应一种校验算法;The transceiver unit 510 is configured to receive multiple data to be verified on multiple channels, and each channel corresponds to a verification algorithm;
处理单元520,用于在多个通道上,通过各自对应的校验算法,对多个待校验数据进行处理。The processing unit 520 is configured to process multiple data to be verified on multiple channels through respective verification algorithms.
可选地,每个通道对应的校验算法的类型可动态配置。Optionally, the type of the check algorithm corresponding to each channel can be dynamically configured.
可选地,每个通道对应的校验算法不同。Optionally, the check algorithm corresponding to each channel is different.
可选地,处理单元520具体用于:在多个通道上,通过各自对应的校验算法,并行处理多个待校验数据。Optionally, the processing unit 520 is specifically configured to process multiple data to be verified in parallel through respective corresponding verification algorithms on multiple channels.
可选地,收发单元510用于:在第一通道上读取第一输入配置信息,第一输入配置信息包括:第一数据的起始地址、第一结果输出地址、初始值、输出异或值;处理单元520用于:通过第一通道对应的校验算法,计算第一 数据,得到第一结果;收发单元510用于:将以下一项或多项信息输出到第一结果输出地址:第一结果、初始值、计算的数据长度、第一输入配置信息;其中,第一通道为多个通道中的任意一个通道。Optionally, the transceiver unit 510 is configured to: read the first input configuration information on the first channel, the first input configuration information including: the start address of the first data, the first result output address, the initial value, and the output XOR The processing unit 520 is configured to: calculate the first data through the check algorithm corresponding to the first channel to obtain the first result; the transceiver unit 510 is configured to: output one or more of the following information to the first result output address: The first result, the initial value, the calculated data length, and the first input configuration information; where the first channel is any one of the multiple channels.
可选地,校验算法的类型至少包括:CRC多项式0x07、CRC多项式0x31、CRC多项式0x5e、CRC多项式0x1021、CRC多项式0x8005、CRC多项式0x864CF8、CRC多项式0x04C11DB7、TCP Checksum、UDP Checksum。Optionally, the type of the check algorithm includes at least: CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, TCP Checksum, UDP Checksum.
可选地,每个通道最多能够同时处理16个数据块。Optionally, each channel can process up to 16 data blocks simultaneously.
如图6所示,本申请实施例还提供一种处理数据的装置600的示意性结构图,该装置600包括处理器610与存储器620,存储器620用于存储指令,处理器610用于执行存储器620存储的指令,并且对存储器620中存储的指令的执行使得,处理器610用于执行上文方法实施例中的处理数据的方法。As shown in FIG. 6, an embodiment of the present application also provides a schematic structural diagram of an apparatus 600 for processing data. The apparatus 600 includes a processor 610 and a memory 620. The memory 620 is used to store instructions, and the processor 610 is used to execute the memory. The instructions stored in 620 and the execution of the instructions stored in the memory 620 enable the processor 610 to execute the data processing method in the above method embodiment.
对存储器620中存储的指令的执行使得处理器610用于执行上述实施例中收发单元510和处理单元520执行的动作。The execution of the instructions stored in the memory 620 enables the processor 610 to execute the actions performed by the transceiver unit 510 and the processing unit 520 in the foregoing embodiment.
可选地,如图6所示,该装置600还可以包括通信接口630,用于与外部设备交互信号。例如,处理器610用于控制接口630进行接收和/或发送信号。Optionally, as shown in FIG. 6, the apparatus 600 may further include a communication interface 630, which is used to exchange signals with external devices. For example, the processor 610 is configured to control the interface 630 to receive and/or send signals.
本申请实施例还提供一种计算机存储介质,其上存储有计算机程序,计算机程序被计算机执行时使得,计算机执行上文如图4所示方法实施例中的方法。The embodiment of the present application also provides a computer storage medium on which a computer program is stored. When the computer program is executed by the computer, the computer executes the method in the method embodiment shown in FIG. 4.
本申请实施例还提供一种包含指令的计算机程序产品,指令被计算机执行时使得计算机执行上文如图4所示方法实施例中的方法。The embodiment of the present application also provides a computer program product containing instructions, which when executed by a computer causes the computer to execute the method in the method embodiment shown in FIG. 4.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其他任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数 据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc. .
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (27)

  1. 一种电路结构,其特征在于,包括:A circuit structure, characterized in that it comprises:
    一个或多个存储器;One or more memories;
    多个通道控制器,从所述一个或多个存储器获取多个待校验数据,每个通道控制器对应一种校验算法;Multiple channel controllers, acquiring multiple data to be verified from the one or more memories, and each channel controller corresponds to a verification algorithm;
    所述多个通道控制器通过各自对应的校验算法,对所述多个待校验数据进行处理,并将处理后的数据写入所述一个或多个存储器。The multiple channel controllers process the multiple to-be-verified data through respective corresponding verification algorithms, and write the processed data into the one or more memories.
  2. 根据权利要求1所述的电路结构,其特征在于,The circuit structure according to claim 1, wherein:
    每个通道控制器对应的校验算法的类型可动态配置。The type of check algorithm corresponding to each channel controller can be dynamically configured.
  3. 根据权利要求1或2所述的电路结构,其特征在于,The circuit structure according to claim 1 or 2, characterized in that:
    每个通道控制器对应的校验算法不同。The check algorithm corresponding to each channel controller is different.
  4. 根据权利要求1至3中任一项所述的电路结构,其特征在于,The circuit structure according to any one of claims 1 to 3, wherein:
    所述多个通道控制器并行处理各自对应的待校验数据。The multiple channel controllers process the respective data to be verified in parallel.
  5. 根据权利要求1至4中任一项所述的电路结构,其特征在于,The circuit structure according to any one of claims 1 to 4, wherein:
    所述电路结构包括多个输入模块和多个输出模块,所述多个输入模块与所述多个通道控制器一一对应,The circuit structure includes multiple input modules and multiple output modules, and the multiple input modules correspond to the multiple channel controllers one-to-one,
    所述多个通道控制器通过各自对应的校验算法,对多个待校验数据进行处理,包括:The multiple channel controllers process multiple data to be verified through respective corresponding verification algorithms, including:
    第一通道控制器读取第一输入模块中的第一输入配置信息,所述第一输入配置信息包括:第一数据的起始地址、第一结果输出地址、初始值、输出异或值;The first channel controller reads the first input configuration information in the first input module, where the first input configuration information includes: the start address of the first data, the first result output address, the initial value, and the output XOR value;
    所述第一通道控制器通过对应的校验算法,计算所述第一数据,得到所述第一结果;The first channel controller calculates the first data through a corresponding check algorithm to obtain the first result;
    所述第一通道控制器将以下一项或多项信息输出到所述第一结果输出地址:所述第一结果、初始值、计算的数据长度、所述第一输入配置信息;The first channel controller outputs one or more of the following information to the first result output address: the first result, the initial value, the calculated data length, and the first input configuration information;
    其中,所述第一通道控制器为所述多个通道控制器中的任意一个通道控制器,所述第一通道控制器与所述第一输入模块对应。Wherein, the first channel controller is any one of the plurality of channel controllers, and the first channel controller corresponds to the first input module.
  6. 根据权利要求1至5中任一项所述的电路结构,其特征在于,校验算法的类型至少包括:The circuit structure according to any one of claims 1 to 5, wherein the type of the verification algorithm includes at least:
    循环冗余校验CRC多项式0x07、CRC多项式0x31、CRC多项式0x5e、CRC多项式0x1021、CRC多项式0x8005、CRC多项式0x864CF8、CRC多 项式0x04C11DB7、传输控制协议校验和TCPChecksum、用户数据报协议校验和UDP Checksum。Cyclic Redundancy Check CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, Transmission Control Protocol Checksum TCPChecksum, User Datagram Protocol Checksum and UDP Checksum .
  7. 根据权利要求1至6中任一项所述的电路结构,其特征在于,The circuit structure according to any one of claims 1 to 6, wherein:
    每个通道控制器最多能够同时处理16个数据块。Each channel controller can process up to 16 data blocks simultaneously.
  8. 一种处理数据的方法,其特征在于,包括:A method for processing data, characterized in that it comprises:
    在多个通道上接收多个待校验数据,每个通道对应一种校验算法;Receive multiple data to be verified on multiple channels, and each channel corresponds to a verification algorithm;
    在所述多个通道上,通过各自对应的校验算法,对所述多个待校验数据进行处理。On the multiple channels, the multiple to-be-verified data are processed through respective corresponding verification algorithms.
  9. 根据权利要求8所述的方法,其特征在于,The method according to claim 8, wherein:
    每个通道对应的校验算法的类型可动态配置。The type of check algorithm corresponding to each channel can be dynamically configured.
  10. 根据权利要求8或9所述的方法,其特征在于,The method according to claim 8 or 9, characterized in that:
    每个通道对应的校验算法不同。The check algorithm corresponding to each channel is different.
  11. 根据权利要求8至10中任一项所述的方法,其特征在于,The method according to any one of claims 8 to 10, wherein:
    所述在所述多个通道上,通过各自对应的校验算法,对所述多个待校验数据进行处理,包括:The processing of the plurality of data to be verified on the plurality of channels through respective corresponding verification algorithms includes:
    在所述多个通道上,通过各自对应的校验算法,并行处理所述多个待校验数据。On the multiple channels, the multiple data to be verified are processed in parallel through respective corresponding verification algorithms.
  12. 根据权利要求8至11中任一项所述的方法,其特征在于,The method according to any one of claims 8 to 11, wherein:
    在第一通道上读取第一输入配置信息,所述第一输入配置信息包括:第一数据的起始地址、第一结果输出地址、初始值、输出异或值;Read the first input configuration information on the first channel, where the first input configuration information includes: the start address of the first data, the first result output address, the initial value, and the output XOR value;
    通过所述第一通道对应的校验算法,计算所述第一数据,得到所述第一结果;Calculating the first data by using the check algorithm corresponding to the first channel to obtain the first result;
    将以下一项或多项信息输出到所述第一结果输出地址:所述第一结果、初始值、计算的数据长度、所述第一输入配置信息;Output one or more of the following information to the first result output address: the first result, the initial value, the calculated data length, and the first input configuration information;
    其中,所述第一通道为所述多个通道中的任意一个通道。Wherein, the first channel is any one of the multiple channels.
  13. 根据权利要求8至12中任一项所述的方法,其特征在于,校验算法的类型至少包括:The method according to any one of claims 8 to 12, wherein the type of the verification algorithm at least includes:
    循环冗余校验CRC多项式0x07、CRC多项式0x31、CRC多项式0x5e、CRC多项式0x1021、CRC多项式0x8005、CRC多项式0x864CF8、CRC多项式0x04C11DB7、传输控制协议校验和TCPChecksum、用户数据报协议校验和UDP Checksum。Cyclic Redundancy Check CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, Transmission Control Protocol Checksum TCPChecksum, User Datagram Protocol Checksum and UDP Checksum .
  14. 根据权利要求8至13中任一项所述的方法,其特征在于,The method according to any one of claims 8 to 13, wherein:
    每个通道最多能够同时处理16个数据块。Each channel can process up to 16 data blocks at the same time.
  15. 一种系统级芯片SoC,其特征在于,包括:A system-level chip SoC, which is characterized in that it includes:
    多个通道控制器,每个通道控制器对应一种校验算法;Multiple channel controllers, each channel controller corresponds to a check algorithm;
    所述多个通道控制器通过各自对应的校验算法,对多个待校验数据进行处理。The multiple channel controllers process multiple data to be verified through respective corresponding verification algorithms.
  16. 根据权利要求15所述的SoC,其特征在于,The SoC according to claim 15, wherein:
    每个通道控制器对应的校验算法的类型可动态配置。The type of check algorithm corresponding to each channel controller can be dynamically configured.
  17. 根据权利要求15或16所述的SoC,其特征在于,The SoC according to claim 15 or 16, characterized in that:
    每个通道控制器对应的校验算法不同。The check algorithm corresponding to each channel controller is different.
  18. 根据权利要求15至17中任一项所述的SoC,其特征在于,The SoC according to any one of claims 15 to 17, characterized in that:
    所述多个通道控制器并行处理各自对应的待校验数据。The multiple channel controllers process the respective data to be verified in parallel.
  19. 根据权利要求15至18中任一项所述的SoC,其特征在于,The SoC according to any one of claims 15 to 18, characterized in that:
    所述SoC包括多个输入模块和多个输出模块,所述多个输入模块与所述多个通道控制器一一对应,The SoC includes multiple input modules and multiple output modules, and the multiple input modules correspond to the multiple channel controllers one-to-one,
    所述多个通道控制器通过各自对应的校验算法,对多个待校验数据进行处理,包括:The multiple channel controllers process multiple data to be verified through respective corresponding verification algorithms, including:
    第一通道控制器读取第一输入模块中的第一输入配置信息,所述第一输入配置信息包括:第一数据的起始地址、第一结果输出地址、初始值、输出异或值;The first channel controller reads the first input configuration information in the first input module, where the first input configuration information includes: the start address of the first data, the first result output address, the initial value, and the output XOR value;
    所述第一通道控制器通过对应的校验算法,计算所述第一数据,得到所述第一结果;The first channel controller calculates the first data through a corresponding check algorithm to obtain the first result;
    所述第一通道控制器将以下一项或多项信息输出到所述第一结果输出地址:所述第一结果、初始值、计算的数据长度、所述第一输入配置信息;The first channel controller outputs one or more of the following information to the first result output address: the first result, the initial value, the calculated data length, and the first input configuration information;
    其中,所述第一通道控制器为所述多个通道控制器中的任意一个通道控制器,所述第一通道控制器与所述第一输入模块对应。Wherein, the first channel controller is any one of the plurality of channel controllers, and the first channel controller corresponds to the first input module.
  20. 根据权利要求15至19中任一项所述的SoC,其特征在于,校验算法的类型至少包括:The SoC according to any one of claims 15 to 19, wherein the type of the verification algorithm at least includes:
    循环冗余校验CRC多项式0x07、CRC多项式0x31、CRC多项式0x5e、CRC多项式0x1021、CRC多项式0x8005、CRC多项式0x864CF8、CRC多项式0x04C11DB7、传输控制协议校验和TCP Checksum、用户数据报协议校 验和UDP Checksum。Cyclic Redundancy Check CRC polynomial 0x07, CRC polynomial 0x31, CRC polynomial 0x5e, CRC polynomial 0x1021, CRC polynomial 0x8005, CRC polynomial 0x864CF8, CRC polynomial 0x04C11DB7, Transmission Control Protocol Checksum, TCP Checksum, User Datagram Protocol Checksum, and UDP Checksum.
  21. 根据权利要求15至20中任一项所述的SoC,其特征在于,The SoC according to any one of claims 15 to 20, wherein:
    每个通道控制器最多能够同时处理16个数据块。Each channel controller can process up to 16 data blocks simultaneously.
  22. 根据权利要求15至21中任一项所述的SoC,其特征在于,The SoC according to any one of claims 15 to 21, characterized in that:
    所述多个通道控制器从一个或多个存储器获取所述多个待校验数据,并将处理后的数据写入所述一个或多个存储器。The multiple channel controllers acquire the multiple data to be verified from one or more memories, and write the processed data into the one or more memories.
  23. 根据权利要求15至22中任一项所述的SoC,其特征在于,包括如权利要求1至7中任一项所述的电路结构。The SoC according to any one of claims 15 to 22, characterized by comprising the circuit structure according to any one of claims 1 to 7.
  24. 一种通道控制器,其特征在于,所述通道控制器应用于如权利要求1至7中任一项所述的电路结构中,或者,所述通道控制器应用于如权利要求15至22中任一项所述的系统级芯片SoC中。A channel controller, characterized in that the channel controller is applied to the circuit structure according to any one of claims 1 to 7, or the channel controller is applied to the circuit structure according to claims 15 to 22 In any of the system-on-chip SoCs.
  25. 一种处理数据的装置,其特征在于,包括:存储器与处理器,所述存储器用于存储指令,所述处理器用于执行所述存储器存储的指令,并且对所述存储器中存储的指令的执行使得,所述处理器用于执行如权利要求8至14中任一项所述的方法。A device for processing data, comprising: a memory and a processor, the memory is used to store instructions, the processor is used to execute the instructions stored in the memory, and execute the instructions stored in the memory So that the processor is used to execute the method according to any one of claims 8 to 14.
  26. 一种计算机存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被计算机执行时使得,所述计算机执行如权利要求8至14中任一项所述的方法。A computer storage medium, characterized in that a computer program is stored thereon, and when the computer program is executed by a computer, the computer executes the method according to any one of claims 8 to 14.
  27. 一种包含指令的计算机程序产品,其特征在于,所述指令被计算机执行时使得计算机执行如权利要求8至14中任一项所述的方法。A computer program product containing instructions, characterized in that when the instructions are executed by a computer, the computer executes the method according to any one of claims 8 to 14.
PCT/CN2019/077722 2019-03-11 2019-03-11 CIRCUIT STRUCTURE, SYSTEM ON CHIP (SoC), AND DATA PROCESSING METHOD WO2020181473A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/077722 WO2020181473A1 (en) 2019-03-11 2019-03-11 CIRCUIT STRUCTURE, SYSTEM ON CHIP (SoC), AND DATA PROCESSING METHOD
CN201980005047.8A CN111247516A (en) 2019-03-11 2019-03-11 Circuit structure, system-on-chip (SoC) and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/077722 WO2020181473A1 (en) 2019-03-11 2019-03-11 CIRCUIT STRUCTURE, SYSTEM ON CHIP (SoC), AND DATA PROCESSING METHOD

Publications (1)

Publication Number Publication Date
WO2020181473A1 true WO2020181473A1 (en) 2020-09-17

Family

ID=70866501

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077722 WO2020181473A1 (en) 2019-03-11 2019-03-11 CIRCUIT STRUCTURE, SYSTEM ON CHIP (SoC), AND DATA PROCESSING METHOD

Country Status (2)

Country Link
CN (1) CN111247516A (en)
WO (1) WO2020181473A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115549854B (en) * 2021-06-30 2024-07-12 上海寒武纪信息科技有限公司 Cyclic redundancy check method and device, storage medium and electronic equipment
CN116861493B (en) * 2023-08-31 2024-03-29 上海芯联芯智能科技有限公司 Verification code generation method, processor and electronic equipment
CN117149510B (en) * 2023-08-31 2024-06-04 上海先楫半导体科技有限公司 Processing system and processing method for cyclic redundancy check

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103427846A (en) * 2013-07-16 2013-12-04 首都师范大学 Method for controlling faults in dynamically reconfigurable high-speed serial bus
CN107656833A (en) * 2017-11-06 2018-02-02 郑州云海信息技术有限公司 A kind of CRC computing devices and computational methods
CN108337069A (en) * 2018-01-19 2018-07-27 国网辽宁省电力有限公司 It is a kind of it is improved reduce the bit error rate end be grouped CRC check system parallel

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5517615A (en) * 1994-08-15 1996-05-14 Unisys Corporation Multi-channel integrity checking data transfer system for controlling different size data block transfers with on-the-fly checkout of each word and data block transferred
US10055282B1 (en) * 2015-10-19 2018-08-21 Marvell International Ltd. Method and apparatus of feeding a seed value to a processing unit to initialize cyclic redundancy checking
CN108108263B (en) * 2017-12-14 2020-11-20 联想(北京)有限公司 Data processing method and device for solid state disk

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103427846A (en) * 2013-07-16 2013-12-04 首都师范大学 Method for controlling faults in dynamically reconfigurable high-speed serial bus
CN107656833A (en) * 2017-11-06 2018-02-02 郑州云海信息技术有限公司 A kind of CRC computing devices and computational methods
CN108337069A (en) * 2018-01-19 2018-07-27 国网辽宁省电力有限公司 It is a kind of it is improved reduce the bit error rate end be grouped CRC check system parallel

Also Published As

Publication number Publication date
CN111247516A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
US11461017B2 (en) Systems and methods for improving efficiencies of a memory system
KR101730306B1 (en) Error correction in memory
US8595428B2 (en) Memory controller functionalities to support data swizzling
WO2020181473A1 (en) CIRCUIT STRUCTURE, SYSTEM ON CHIP (SoC), AND DATA PROCESSING METHOD
US9921914B2 (en) Redundant array of independent disks (RAID) write hole solutions
US20140115420A1 (en) High performance interconnect link layer
US20120079346A1 (en) Simulated error causing apparatus
EP4009184A1 (en) Network-on-chip data processing method and device
KR20100104454A (en) Error correcting device, method for error correction thereof and memory device and data processing system including of the same
US11003606B2 (en) DMA-scatter and gather operations for non-contiguous memory
US9577671B2 (en) Parity check circuit and memory device including the same
CN114328316A (en) DMA controller, SOC system and data carrying method based on DMA controller
JP2008090419A (en) Integrated circuit device
CN113900966B (en) Access method and device based on Cache
CN112486848A (en) Test data generation method and device, chip and storage medium
JP4839364B2 (en) Combined command and data code
EP2194458A2 (en) Request processing device, request processing system, and access testing method
US11467760B1 (en) Selective erasure decoding for memory devices
US11275683B2 (en) Method, apparatus, device and computer-readable storage medium for storage management
US11061834B2 (en) Method and system for facilitating an improved storage system by decoupling the controller from the storage medium
US7114116B2 (en) Accelerated Galois data integrity crosscheck system and method
US20170140840A1 (en) Memory device and a memory device test system
US9455746B2 (en) Variable speed Chien search architecture
US20240053904A1 (en) Efficient security metadata encoding in error correcting code (ecc) memory without dedicated ecc bits
US9513990B2 (en) Memory controller with read unit length module

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

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

Country of ref document: EP

Kind code of ref document: A1