[go: up one dir, main page]

WO2019183849A1 - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
WO2019183849A1
WO2019183849A1 PCT/CN2018/080938 CN2018080938W WO2019183849A1 WO 2019183849 A1 WO2019183849 A1 WO 2019183849A1 CN 2018080938 W CN2018080938 W CN 2018080938W WO 2019183849 A1 WO2019183849 A1 WO 2019183849A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
data
read
write
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/080938
Other languages
French (fr)
Chinese (zh)
Inventor
从勇
刘列峰
周沫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SZ DJI Technology Co Ltd
Original Assignee
SZ DJI Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Priority to PCT/CN2018/080938 priority Critical patent/WO2019183849A1/en
Priority to CN201880012520.0A priority patent/CN110337637B/en
Publication of WO2019183849A1 publication Critical patent/WO2019183849A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/06Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor
    • G06F5/10Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor having a sequence of storage locations each being individually accessible for both enqueue and dequeue operations, e.g. using random access memory
    • G06F5/12Means for monitoring the fill level; Means for resolving contention, i.e. conflicts between simultaneous enqueue and dequeue operations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/30138Extension of register space, e.g. register cache

Definitions

  • the present application relates to the field of information technology and, more particularly, to a data processing method and apparatus.
  • a matrix is a data structure commonly used in computers.
  • the transpose operation of the matrix is often required.
  • the data needs to be stored in the register row or column, and read from the register in columns or rows, thereby implementing the transpose of the matrix.
  • the existing processing method is to set two registers, read a set of data that needs to be transposed into the first register in one direction, and then read out from the first register in the other direction, while reading data in the first register, Reading another set of data that needs to be transposed into the second register requires two registers to be used interchangeably.
  • the register resources play an important role. How to avoid register resources during matrix transposition. Waste is an urgent problem to be solved.
  • the embodiment of the present application provides a data processing method and device, which can avoid waste of register resources.
  • a data processing method comprising: writing data in a first matrix to a register; performing a plurality of read operations on data of the first matrix in the register, wherein each read The operation reads at least one data; after each read operation, writes at least one data of the second matrix at a target write position in the register, wherein the target write position is a read of each read operation Take the location.
  • a controller comprising: a write unit and a read unit; wherein the write unit is configured to: write data in the first matrix to a register; the read unit is configured to: target the register Data of the first matrix, performing a plurality of read operations, wherein each read operation reads at least one data; the write unit is further configured to: in each register after each read operation The target write location writes at least one data of the second matrix, wherein the target write location is a read location for each read operation.
  • a data processing device including a controller and a register; wherein the controller is configured to write data to the register and read data in the register; wherein the controller is specifically configured to: Data in the first matrix is written to the register; for the data of the first matrix in the register, a plurality of read operations are performed, wherein each read operation reads at least one data; after each read operation, At least one of the data of the second matrix is written at the target write position in the register, wherein the target write position is the read position of each read operation.
  • a computer storage medium storing code for: writing data in a first matrix to a register; performing multiple reads on data of the first matrix in the register Taking operation, wherein each read operation reads at least one data; after each read operation, at least one data of the second matrix is written at a target write position in the register, wherein the target write The position is the reading position for each read operation.
  • a computer program product comprising code for: writing data in a first matrix to a register; performing multiple reads on data of the first matrix in the register Taking operation, wherein each read operation reads at least one data; after each read operation, at least one data of the second matrix is written at a target write position in the register, wherein the target write The position is the reading position for each read operation.
  • multiple read operations may be performed on the data of the first matrix in the register, and after each read operation, the controller writes the read position in the register to the second matrix again. Data, so that the vacancy of the register after the read operation can be avoided, thereby avoiding waste of register resources
  • FIG. 1 is a schematic block diagram of a computer system in accordance with an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of data for writing and reading a matrix in a register in accordance with an embodiment of the present application.
  • FIG. 4 is a schematic diagram of data for writing and reading a matrix in a register in accordance with an embodiment of the present application.
  • FIG. 5 is a schematic block diagram of a controller in accordance with an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a data processing device according to an embodiment of the present application.
  • FIG. 1 is a schematic block diagram of a computer system 100 in accordance with an embodiment of the present application.
  • the system 100 includes a processor 110 and an external storage system 120 (which may be any accessible memory, including external cache and external random access memory (RAM), etc.).
  • an external storage system 120 which may be any accessible memory, including external cache and external random access memory (RAM), etc.
  • Register 112 is not limited to a particular type of memory circuit.
  • the registers of the embodiments of the present application can store and provide matrix data.
  • Computer system 100 of the present application may include one or more input/output (I/O) devices 130, including display devices such as monitors.
  • the I/O device may also include input devices such as a keyboard and a cursor controller such as a mouse, trackball or trackpad.
  • the I/O device may further include a network connector such that the computer system 100 becomes part of a local area network (LAN) or a wide area network (WAN), and the I/O device 130 is used for voice recording and/or Or a device for playback, such as an audio digitizer coupled to a microphone for recording voice input for speech recognition.
  • the I/O device 130 may also include a video digitizing device that can be used to capture video images, a hard copy device such as a printer, and a Compact Disc Read-Only Memory (CD-ROM) device.
  • CD-ROM Compact Disc Read-Only Memory
  • the external storage system 120 may include a computer readable medium for storing a computer program product on which a computer (or other electronic device) usable for programming (ie, defining its operation) may be stored.
  • An instruction to perform processing in accordance with the present application can include, but is not limited to, a floppy disk, an optical disk, a CD, a CD-ROM and a magneto-optical disk, a Read-Only Memory (ROM), a RAM, an erasable programmable read-only memory (erasable programmable read- Only memory, EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), magnetic or optical card, flash memory, and the like.
  • computer readable media includes any type of media/machine readable medium suitable for storing electronic instructions.
  • the present application can also be downloaded as a computer program product.
  • the program can also be transferred from a remote computer (eg, a server) to a requesting computer (eg, a client).
  • the program can be transmitted as a data signal contained in a carrier or other propagation medium over a communication link (e.g., modem, network connection, etc.).
  • Computer system 100 can be a general purpose computer with a processor of a suitable register structure, or can be configured for a specific purpose or embedded application.
  • the methods of embodiments of the present application can be included in machine executable instructions that are intended to control the operation of a computer system, particularly the operation of a processor and a register. These instructions can be used to cause a general purpose or special purpose processor programmed with instructions to perform the steps of the present application.
  • the steps of the present application can be performed by specific hardware components that comprise hardwired logic for performing the steps, or by a combination of programmed computer components and conventional hardware components.
  • FIG. 2 is a schematic flowchart of a data processing method 200 according to an embodiment of the present application. As shown in FIG. 2, the method 200 includes at least some of the following.
  • the controller writes data in the first matrix to the register for data in the first matrix.
  • each register is not limited, and a storage space storing one data element in a matrix may be referred to as a register, or a storage space storing a complete matrix may be referred to as a register or Register group, etc.
  • the number of rows of the first matrix may be equal to the number of columns of the first matrix, or the number of rows of the first matrix is not equal to the number of columns of the first matrix.
  • the controller performs a plurality of read operations for the data of the first matrix in the register, wherein each read operation reads at least one of the data.
  • the amount of data read by different reading operations may be the same or different.
  • the controller writes at least one data of the second matrix at a target write location in the register, wherein the target write location is a read of the each read operation Take the location.
  • the number of rows of the second matrix may be equal to the number of columns of the second matrix, or the number of rows of the second matrix is not equal to the number of columns of the second matrix.
  • the number of rows of the second matrix may be equal to the number of rows of the first matrix, and the number of columns of the second matrix may be equal to the number of columns of the first matrix.
  • the number of rows of the second matrix may be equal to the number of columns of the first matrix, and the number of columns of the second matrix may be equal to the number of rows of the first matrix.
  • the data of the first matrix may also be written step by step after each read operation for other matrices (non-first matrix and non-second matrix).
  • the writing mode of the second matrix and the utilization of the register after reading may also be as the first matrix.
  • a plurality of read operations are performed for data of the second matrix in the register, wherein each read operation reads at least one data of the second matrix; Thereafter, at least one data of the third matrix is written at a target write location in the register, wherein the target write location is a read location of the each read operation.
  • the previous matrix can be read in multiple times, and after each read operation, the latter matrix is written at the reading position of the previous matrix. data.
  • multiple read operations may be performed on the data of the first matrix in the register, and after each read operation, the controller writes the read position in the register to the second matrix again.
  • the data can avoid the vacancy of the register after the read operation, so that the waste of register resources can be avoided without losing the efficiency of data processing.
  • the write operation for writing data of the second matrix after one read operation may be performed in the next read operation (reading the first The data in a matrix is executed before.
  • At least one data of the second matrix is written in a target write position in the register in the same clock cycle after each read operation.
  • the read operation for the first matrix can be performed at a earlier time of one clock cycle, and the write operation for the data of the second matrix is performed at a later time of the same clock cycle.
  • writing data of another matrix at the read position during the same clock cycle of the read operation can further avoid waste of register resources and can improve data processing efficiency.
  • the controller writes data in the first matrix to the register according to the first data sequence for the data of the first matrix; for the data of the first matrix in the register, In the second data sequence, multiple read operations are performed.
  • the first data sequence may be an order of writing in a row of a matrix, or an order of writing in a column of a matrix.
  • the second data sequence may be an order of reading in a matrix of columns, or an order in which rows of the matrix are read.
  • the second data sequence may be different from the first data sequence.
  • the embodiments of the present application may be used for a transposition operation of a matrix.
  • the second data order is an order of reading in a matrix of the matrix.
  • data of one row may be written for each write operation of the first matrix, and data of one column of the matrix may be read for each read operation, so that transposition of the first matrix may be implemented.
  • the second data sequence is in the order of reading in rows of the matrix.
  • one column of data may be written for each write operation of the first matrix, and data of one row of the matrix may be read for each read operation, so that transposition of the first matrix may be implemented.
  • the first data sequence may also be other data sequences, which may be determined according to the processing required for the first matrix, which is not specifically limited in this embodiment of the present application.
  • the controller may write the data in the first matrix to the register according to the first storage space order; and the controller may follow the second storage space order for the register
  • the data of the first matrix performs a plurality of read operations.
  • the first storage space sequence is different from the second storage space sequence.
  • the first storage space sequence is an order of writing in a row of the register, or the first storage space order is an order of writing in a column of the register.
  • the second storage space order is an order of reading in a column of the register, or the second storage space order is an order of reading in a row of the register.
  • the second storage space order is an order of reading in a column of the register.
  • data of the first matrix is written in one row of the register, and a column of data of the register is read every read operation.
  • the second storage space order is an order of reading in a row of the register.
  • data of the first matrix is written in one column of the register, and one row of data of the register is read every read operation.
  • the amount of data that can be stored in one row of the register may be equal to the amount of data that can be stored in one column of the register.
  • one row of the register can be understood as a row of storage space
  • a column of the register can be understood as a column of storage space.
  • the data of the matrix is read and written according to the data sequence, and the data of the matrix is read and written in the order of the storage space of the register, and the two implementation manners can be used in combination.
  • the number of rows of the register may be equal to the number of rows of the matrix, and the number of columns of the register may be equal to the number of columns of the matrix.
  • each row of data of the matrix may be separately written to each row of the register, or Each column of data of the matrix can be written to each column of the register.
  • the number of rows of the previous matrix may be equal to the number of columns of the latter matrix and the number of columns of the previous matrix may be equal to the number of rows of the latter matrix.
  • the number of rows of the register can be equal to the number of rows of the previous matrix, and the number of columns of the register can be equal to the number of columns of the previous matrix.
  • each row of the previous matrix can be written to each row of the register, and then according to the column of the register. The data is read, so that the transposition of the previous matrix can be realized.
  • each row of the latter matrix can be written into each column of the register, and then the data is performed according to the row of the register. Read, so that the transpose of the latter matrix can be achieved.
  • the number of rows of the previous matrix may be equal to the number of columns of the latter matrix and the number of columns of the previous matrix may be equal to the number of rows of the latter matrix.
  • the number of rows of the register can be equal to the number of rows of the latter matrix, and the number of columns of the register can be equal to the number of columns of the latter matrix.
  • each row of the previous matrix can be written into each column of the register, and then by the register. The row reads the data, so that the transposition of the previous matrix can be realized.
  • each row of the latter matrix can be written into each row of the register, and then the data is performed according to the column of the register. The reading enables the transposition of the latter matrix.
  • the register may not be divided into columns and rows.
  • each storage space of the register can be numbered, and data of the matrix can be written and read according to the number of the storage space.
  • the registers can be divided into storage spaces 1 (which can also be referred to as registers) 1, 2, 3, 4, 5, 6, 7, 8, 9.
  • storage spaces 1 which can also be referred to as registers
  • the first row of the matrix data can be written to the storage space 1, 2, 3, and the second row of the matrix data is written to the storage space 4, 5, 6, and the third row of the matrix Data is written to the storage space 7, 8, 9, the first read operation can read the data in the storage space 1, 4, 7, and the second read operation can read the data in the storage space 2, 5, 8.
  • the third read operation can read the data in the storage spaces 3, 6, and 9, so that the transposition of the 3 ⁇ 3 matrix can be realized.
  • the matrix mentioned in the embodiments of the present application includes a plurality of numbers, which is a matrix in a mathematical sense, and the process of writing to the register and reading from the register may To achieve transposition of the matrix (or other forms of matrix transformation), the transposed matrix can be processed in conjunction with other numbers or matrices.
  • the plurality of numbers when writing to the register, may be stored in a matrix arrangement, or may be stored in other forms, and the plurality of numbers may be matrixed when stored before being written to the register. The arrangement is stored and can be stored in other forms.
  • the register can include register R0, register R1, register R2 and register R3, which need to be used for multiple matrices (including matrices). And matrix ) Transpose.
  • the initial value of the write address is 0.
  • the controller can write data A0, A1 to the register R0, R1 (first write operation), write the write address to 1, and then write the data A2, A3.
  • the write address becomes 2 after writing.
  • the controller can read the data in the next clock cycle after writing data A2 and A3, wherein the controller can be based on the next clock cycle.
  • Read judge whether the register is writable. If it is read, read the data A0, A2 (first read operation), and write the data B0, B1 in matrix 2 to the register group R0, R2 in the same clock cycle. (The third write operation), the write address becomes 3 after writing. And, in the next clock cycle, if read (read address 1), read A1, A3 (second read operation), and write the data of the second matrix B2, B3 to register group R1, R3 (fourth time) Write operation), the write address becomes 0 after writing.
  • read address 2 read B0, B2 (third read manipulation), and write the matrix data C0 and C1 to register group R0, R1 (fifth write operation), write address becomes 1, and, in the next clock cycle, if read (read address 3), read B1, B3 (fourth read operation), and write data of matrix 3 C2, C3 to register group R1, R3 (sixth Write operation), write address becomes 2 after writing, and so on.
  • the data A0 and A1 of the matrix A can be stored in the registers R0 and R1, and the data A2 and A3 of the matrix A (the second write operation) can be stored in the registers R2 and R3, and The data A4 and A5 of the matrix A are stored in the registers R4 and R5 (third write operation).
  • first read operation data A0 and A3 in registers R0 and R3 can be read, and data B0 and B1 of matrix B are written at this position (fourth write operation).
  • data A1 and A4 in R1 and R4 can be read, and data B2 and B3 of matrix B are stored in R1 and R4 (fifth write operation).
  • Data A2 and A5 can be read in registers R2 and R5 at the third read operation, and data B4 and B5 of matrix B are written at the positions of registers R2 and R5 (sixth write operation).
  • data B0 and B3 can be read in registers R0 and R4, as well as data C0 and C1 (seventh write operation) written in matrix C.
  • the data B1 and B4 can be read in the registers R3 and R2, and the data C2 and C3 in the matrix C (the eighth write operation) can be written in the fifth read operation.
  • Data B2 and B5 can be read in registers R1 and R5, as well as data C4 and C5 in matrix C (ninth write operation) at the sixth read operation.
  • data C0 and C3 can be read in registers R0 and R2, and data D0 and D1 (tenth write operation) written in matrix D can be written.
  • data C1 and C4 can be read in registers R4 and R1, and data D2 and D3 in matrix D are written in the register (eleventh write operation).
  • data C2 and C5 can be read in registers R3 and R5, as well as data D4 and D5 written in matrix D (twelfth write operation).
  • the data D0 and D3 can be read in the registers R0 and R1, and the data E0 and E1 (the thirteenth write operation) written in the matrix E can be written.
  • data D1 and D4 can be read in registers R2 and R3, and data E2 and E3 in the write matrix E (fourteenth write operation) can be read in the twelfth read.
  • the data D2 and D5 can be read in the registers R4 and R5, and the data E4 and E5 in the matrix E can be written (the fifteenth write operation).
  • the data E0 and E3 can be read in the registers R0 and R3, and the data F0 and F1 in the matrix F are written (the sixteenth write operation), and so on. .
  • the amount of data corresponding to each write operation shown in FIG. 4 is the same, but the amount of data corresponding to each write operation may also be different, for example, may be written in the first write operation.
  • the data written in the second write operation is A3, A4 and A5, and the data amount of other write operations can be 2 data or the like.
  • the read operation when performing a read operation on the first matrix, searching for an entry to determine a target read location based on the current number of read operations, the entry indicating at least one read operation Correspondence with at least one read position; the read operation is performed based on the target read position.
  • the entry may be an entry set based on the second data sequence.
  • the data of the first matrix may be read in the second data sequence.
  • the entry may be an entry based on the second storage space order.
  • the data of the first matrix may be read in the second storage space order.
  • the current number of read operations may be determined according to the count of the counter, wherein the counter may be cleared when the certain conditions are met, for example, the timer is cleared every time a new matrix of data is read. , or clear the counter when starting a read cycle.
  • the single read cycle can satisfy the following conditions: for different read cycles, the read positions corresponding to the same number of read operations are the same. And further, in the same reading cycle, the reading positions corresponding to different number of reading operations are different.
  • the read position corresponding to the first read operation is the registers R0 and R2, and the read positions corresponding to the second read operation are R1 and R3, and the third read is performed.
  • the read position corresponding to the fetch operation is R0 and R1
  • the read position corresponding to the fourth read operation is R2 and R3
  • the read position corresponding to the fifth read operation is the registers R0 and R1
  • the The one, two, three, and four read operations are referred to as one read cycle
  • the fifth, sixth, seventh, and eighth read operations are referred to as one read cycle.
  • the read positions corresponding to the first and thirteenth read operations are the registers R0 and R3, and the second and fourteenth read operations are corresponding.
  • the reading positions are R1 and R4, and the reading positions corresponding to the third and fifteenth reading operations are R2 and R5, etc., thereby showing that in the case of the transposition shown in FIG. 4, the single reading cycle
  • the corresponding read operation is 12 times, and in the 12 read operations, the read positions corresponding to the different read operations are different.
  • the read positions corresponding to the same number of read operations are the same, for example, the first read operation of the first read cycle and the first read of the second read cycle
  • the read position corresponding to the fetch operation is the same.
  • the corresponding relationship between the number of read operations and the read position in a single read cycle may be pre-stored, and may be stored in an entry manner, so that each read operation may be determined by means of a lookup table entry. Read location.
  • the reading position corresponding to each reading operation is determined based on the manner of the entry, so that the reading position of the data to be read can be quickly obtained.
  • storing the correspondence between the number of at least one read operation and the at least one read position in the single read cycle can reduce the storage amount of information.
  • the entry is searched based on the current number of write operations to determine a target write location for writing data of the second matrix, the entry indicating at least one write operation Correspondence with at least one write location.
  • the current number of writes may be determined according to a count, wherein the counter may be cleared when a certain condition is met, for example, the counter is cleared every time a new matrix is written, or a write is started. The counter is cleared when looping.
  • the single write cycle can satisfy the following conditions: for different write cycles, the write position corresponding to the same number of write operations is the same. And optionally, in the same write cycle, different write operations correspond to different write locations.
  • the write positions corresponding to the first write operation are the registers R0 and R1, and the write positions corresponding to the second write operation are R2 and R3, the third time.
  • the write position corresponding to the write operation is R0 and R2
  • the write position corresponding to the fourth write operation is R21 and R3
  • the write position corresponding to the fifth write operation is the registers R0 and R1
  • the first, second, third, and fourth write operations are referred to as a write cycle
  • the fifth, sixth, seventh, and eighth write operations are referred to as a write cycle.
  • the write positions corresponding to the first and thirteenth read write operations are the registers R0 and R1, the second and fourteenth write operations.
  • the corresponding write positions are R2 and R3, and the write positions corresponding to the third and fifteenth write operations are R4 and R5, etc., thereby showing that in the case of the transposition shown in FIG. 4, a single write
  • the write operation corresponding to the loop is 12 times, and in the 12 write operations, the write positions corresponding to the different write operations are different.
  • the write positions corresponding to the same number of write operations are the same, for example, the first write operation of the first write cycle and the first write of the second write cycle
  • the write location corresponding to the incoming operation is the same.
  • the write location corresponding to each write operation is determined based on the manner of the entry, and the target write location can be quickly obtained.
  • the correspondence between the number of at least one write operation and the at least one write position can reduce the amount of information stored.
  • a read position may be recorded; and the read position of the record is determined to be used for writing.
  • the data entering the second matrix is the target write location.
  • the read position can be recorded in real time, and the data of the other matrix is written in the recorded position in the same clock cycle.
  • the controller may determine that the data in the target write location has been read.
  • the controller may determine whether the next clock cycle register is readable to determine whether the register is writable.
  • the data to be read of the first matrix has been written according to the number of write operations that have been performed for the first matrix.
  • the first read operation it is determined that the data to be read of the first matrix has been written.
  • some matrices for example, a matrix having the same number of rows and columns, and writing data of one column or one row at a time, and reading data of one row or one column at a time
  • the data of the first read operation it means that all the data of the matrix is written, so the first matrix can be determined only before the first read operation.
  • the data to be read has been written, and it is not necessary to determine that the data to be read has been written before each read operation.
  • the embodiment of the present application is not limited thereto, and it may be determined that the current data to be read of the first matrix has been written before each read operation.
  • the external interface for reading and writing data can be encapsulated as a FIFO interface.
  • multiple read operations may be performed on the data of the first matrix in the register, and after each read operation, the controller writes the read position in the register to the second matrix again.
  • the data can avoid the vacancy of the register after the read operation, so that the waste of register resources can be avoided while reducing the data processing speed.
  • FIG. 5 is a schematic block diagram of a controller 300 in accordance with an embodiment of the present application.
  • the controller 300 includes a writing unit 310 and a reading unit 320;
  • the writing unit 310 is configured to: write data in the first matrix into the register;
  • the reading unit 320 is configured to: perform a plurality of read operations on the data of the first matrix in the register, wherein each read operation reads at least one data;
  • the writing unit 310 is further configured to: write at least one data of the second matrix at a target write position in the register after each read operation, wherein the target write position is each read operation The reading position.
  • the writing unit 310 is further configured to: write, in the first data order, data in the first matrix to the register for the data of the first matrix;
  • the reading unit 320 is further configured to:
  • the plurality of read operations are performed in the second data order for the data of the first matrix in the register.
  • the first data sequence is an order of writing in a matrix
  • the second data sequence is an order of reading in a matrix of columns.
  • the writing unit 310 in each write operation for the first matrix, writes one row of data of the first matrix; and/or,
  • the reading unit 320 reads a column of data of the first matrix during each reading operation.
  • the first data sequence is an order of writing in columns of a matrix
  • the second data sequence is an order of reading in rows of the matrix
  • the writing unit 310 in each write operation for the first matrix, writes a column of data of the first matrix; and/or,
  • the reading unit 320 reads a row of data of the first matrix during each read operation.
  • the writing unit 310 is further configured to:
  • the reading unit 320 is further configured to:
  • a plurality of read operations are performed for the data of the first matrix in the register in accordance with the second storage space order.
  • the first storage space sequence is an order of writing in a row of the register
  • the second storage space order is an order of reading in a column of the register.
  • the writing unit 310 in each write operation for the first matrix, writes data of the first matrix in one row of the register; and/or
  • the read unit 320 reads a column of data of the register during each read operation.
  • the first storage space sequence is an order of writing in a column of the register
  • the second storage space order is an order of reading in a row of the register
  • the writing unit 310 in each write operation for the first matrix, writes data of the first matrix in a column of the register; and/or,
  • the reading unit 320 reads one line of data of the register during each read operation.
  • the writing unit 310 is further configured to:
  • At least one of the data of the second matrix is written at the target write location in the register for the same clock cycle after the read operation.
  • the reading unit 320 is further configured to:
  • the writing unit 310 is further configured to determine the read position of the record as the target write position for writing data of the second matrix.
  • the writing unit 310 is further configured to:
  • the first entry indicates a correspondence between the number of at least one write operation and the at least one write location in a single write cycle
  • the write position corresponding to the same number of write operations is the same.
  • the write positions corresponding to different write operations are different.
  • the reading unit 320 is further configured to:
  • Each read operation is performed based on the target read position.
  • the second entry indicates a correspondence between the number of at least one read operation and the at least one read position in a single read cycle
  • the same read operation corresponds to the same read position.
  • the reading positions corresponding to different reading operations are different.
  • the writing unit 310 is further configured to:
  • the reading unit 320 is further configured to:
  • the reading unit 320 is further configured to:
  • the reading unit 320 is further configured to:
  • the number of rows of the first matrix is equal to the number of rows of the second matrix
  • the number of columns of the first matrix is equal to the number of columns of the second matrix
  • the reading unit 320 is further configured to:
  • each read operation reads at least one data of the second matrix
  • the writing unit 310 is further configured to: after each read operation, write at least one data of the third matrix at a target write position in the register, wherein the target write position is each read operation The reading position.
  • controller 300 can implement the corresponding operations of the controller in the foregoing method embodiments, and details are not described herein for brevity.
  • FIG. 6 is a schematic block diagram of a data processing device 400 in accordance with an embodiment of the present application. As shown in FIG. 6, the device 400 includes a controller 410 and a register 420;
  • the controller 410 is operative to write data to the register 420 and to read data in the register.
  • the data processing device is a central processing unit (CPU), or may be another type of processor, which is not specifically limited in this embodiment of the present application.
  • CPU central processing unit
  • the data processing device may be a central processing unit (CPU), or may be another type of processor, which is not specifically limited in this embodiment of the present application.
  • controller 410 can implement the corresponding operations of the controller in the foregoing method embodiments, and details are not described herein for brevity.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • 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, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • the technical solution of the present application which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)
  • Read Only Memory (AREA)

Abstract

A data processing method and device. The method comprises: writing data in a first matrix into a register; carrying out a reading operation on the data of the first matrix in the register multiple times, wherein at least one piece of data is read every time; and writing at least one piece of data of a second matrix into a target write position in the register after the each reading operation, wherein the target write position is the reading position for each read operation. The method and device according to the embodiments of the present application may avoid the waste of register resources.

Description

数据处理方法和设备Data processing method and device

版权申明Copyright statement

本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The disclosure of this patent document contains material that is subject to copyright protection. This copyright is the property of the copyright holder. The copyright owner has no objection to the reproduction of the patent document or the patent disclosure in the official records and files of the Patent and Trademark Office.

技术领域Technical field

本申请涉及信息技术领域,并且更具体地,涉及一种数据处理方法和设备。The present application relates to the field of information technology and, more particularly, to a data processing method and apparatus.

背景技术Background technique

矩阵是计算机中常用的一种数据结构。在计算机应用中,例如在科学和工程计算、游戏、图像处理等领域中经常需要用到矩阵的转置运算。A matrix is a data structure commonly used in computers. In computer applications, for example, in the fields of science and engineering calculations, games, image processing, etc., the transpose operation of the matrix is often required.

在对矩阵进行转置时,需要将数据按行或按列存储到寄存器中,并从该寄存器中按列或按行读取,由此实现矩阵的转置。When the matrix is transposed, the data needs to be stored in the register row or column, and read from the register in columns or rows, thereby implementing the transpose of the matrix.

现有的处理方法是设置两个寄存器,将需要转置的一组数据沿一个方向读进第一寄存器,然后沿另一个方向从第一寄存器读出,在第一寄存器读出数据的同时,将另一个需要转置的一组数据读进第二寄存器,即需要两个寄存器交替使用,在计算机处理过程中,寄存器资源起到很重要的作用,如何在矩阵转置过程中,避免寄存器资源的浪费是一项亟待解决的问题。The existing processing method is to set two registers, read a set of data that needs to be transposed into the first register in one direction, and then read out from the first register in the other direction, while reading data in the first register, Reading another set of data that needs to be transposed into the second register requires two registers to be used interchangeably. In the process of computer processing, the register resources play an important role. How to avoid register resources during matrix transposition. Waste is an urgent problem to be solved.

发明内容Summary of the invention

本申请实施例提供一种数据处理方法和设备,可以避免寄存器资源的浪费。The embodiment of the present application provides a data processing method and device, which can avoid waste of register resources.

第一方面,提供了一种数据处理方法,包括:将第一矩阵中的数据写入寄存器;针对该寄存器中的该第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据;在每次读取操作之后,在该寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,该目标写入位置为每次读取操作的读取位置。In a first aspect, a data processing method is provided, comprising: writing data in a first matrix to a register; performing a plurality of read operations on data of the first matrix in the register, wherein each read The operation reads at least one data; after each read operation, writes at least one data of the second matrix at a target write position in the register, wherein the target write position is a read of each read operation Take the location.

第二方面,提供了一种控制器,包括写入单元和读取单元;其中,该写入单元用于:将第一矩阵中的数据写入寄存器;该读取单元用于:针对该寄 存器中的该第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据;该写入单元进一步用于:在每次读取操作之后,在该寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,该目标写入位置为每次读取操作的读取位置。In a second aspect, a controller is provided, comprising: a write unit and a read unit; wherein the write unit is configured to: write data in the first matrix to a register; the read unit is configured to: target the register Data of the first matrix, performing a plurality of read operations, wherein each read operation reads at least one data; the write unit is further configured to: in each register after each read operation The target write location writes at least one data of the second matrix, wherein the target write location is a read location for each read operation.

第三方面,提供了一种数据处理设备,包括控制器以及寄存器;其中,该控制器用于向该寄存器中写入数据以及读取该寄存器中的数据;其中,该控制器具体用于:将第一矩阵中的数据写入寄存器;针对该寄存器中的该第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据;在每次读取操作之后,在该寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,该目标写入位置为每次读取操作的读取位置。In a third aspect, a data processing device is provided, including a controller and a register; wherein the controller is configured to write data to the register and read data in the register; wherein the controller is specifically configured to: Data in the first matrix is written to the register; for the data of the first matrix in the register, a plurality of read operations are performed, wherein each read operation reads at least one data; after each read operation, At least one of the data of the second matrix is written at the target write position in the register, wherein the target write position is the read position of each read operation.

第四方面,提供了一种计算机存储介质,该介质中存储代码,该代码用于:将第一矩阵中的数据写入寄存器;针对该寄存器中的该第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据;在每次读取操作之后,在该寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,该目标写入位置为每次读取操作的读取位置。In a fourth aspect, a computer storage medium is provided, the medium storing code for: writing data in a first matrix to a register; performing multiple reads on data of the first matrix in the register Taking operation, wherein each read operation reads at least one data; after each read operation, at least one data of the second matrix is written at a target write position in the register, wherein the target write The position is the reading position for each read operation.

第五方面,提供了一种计算机程序产品,该程序产品包括代码,该代码用于:将第一矩阵中的数据写入寄存器;针对该寄存器中的该第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据;在每次读取操作之后,在该寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,该目标写入位置为每次读取操作的读取位置。In a fifth aspect, a computer program product is provided, the program product comprising code for: writing data in a first matrix to a register; performing multiple reads on data of the first matrix in the register Taking operation, wherein each read operation reads at least one data; after each read operation, at least one data of the second matrix is written at a target write position in the register, wherein the target write The position is the reading position for each read operation.

因此,在本申请实施例中,可以针对寄存器中的第一矩阵的数据执行多次读取操作,在每次读取操作之后,控制器在寄存器中的读取位置再写入第二矩阵的数据,从而可以避免读取操作之后的寄存器的空置,从而可以避免寄存器资源的浪费Therefore, in the embodiment of the present application, multiple read operations may be performed on the data of the first matrix in the register, and after each read operation, the controller writes the read position in the register to the second matrix again. Data, so that the vacancy of the register after the read operation can be avoided, thereby avoiding waste of register resources

附图说明DRAWINGS

为了更清楚地说明本申请实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only some of the present application. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.

图1是根据本申请实施例的计算机系统的示意性框图。1 is a schematic block diagram of a computer system in accordance with an embodiment of the present application.

图2是根据本申请实施例的数据处理方法的示意性流程图。FIG. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application.

图3是根据本申请实施例的在寄存器中写入和读取矩阵的数据的示意性图。3 is a schematic diagram of data for writing and reading a matrix in a register in accordance with an embodiment of the present application.

图4是根据本申请实施例的在寄存器中写入和读取矩阵的数据的示意性图。4 is a schematic diagram of data for writing and reading a matrix in a register in accordance with an embodiment of the present application.

图5是根据本申请实施例的控制器的示意性框图。FIG. 5 is a schematic block diagram of a controller in accordance with an embodiment of the present application.

图6是根据本申请实施例的数据处理设备的示意性框图。FIG. 6 is a schematic block diagram of a data processing device according to an embodiment of the present application.

具体实施方式detailed description

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are described in conjunction with the accompanying drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.

除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。Unless otherwise indicated, all technical and scientific terms used in the embodiments of the present application have the same meaning The terminology used in the present application is for the purpose of describing particular embodiments and is not intended to limit the scope of the application.

图1是根据本申请实施例的计算机系统100的示意性框图。FIG. 1 is a schematic block diagram of a computer system 100 in accordance with an embodiment of the present application.

如图1所示,该系统100包括处理器110和外部存储系统120(可以为任意的可访问存储器,包括外部高速缓冲存储器和外部随机存取存储器(Random-Access Memory,RAM)等)。As shown in FIG. 1, the system 100 includes a processor 110 and an external storage system 120 (which may be any accessible memory, including external cache and external random access memory (RAM), etc.).

计算机系统100的处理器110可以包括寄存器112。寄存器112并不限于特定类型的存储器电路。本申请实施例的寄存器可以存储并提供矩阵数据。Processor 110 of computer system 100 can include registers 112. Register 112 is not limited to a particular type of memory circuit. The registers of the embodiments of the present application can store and provide matrix data.

本申请的计算机系统100可以包括一个或多个输入/输出(Input/Output,I/O)装置130,包括像监视器这样的显示装置。I/O装置还可以包括输入装置,诸如键盘和像鼠标、轨迹球或轨迹板这样的光标控制器。此外,I/O装置还可以包括网络连接器使得计算机系统100成为局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)的一部分,I/O装置130,即用于声音记录和/或回放的装置,诸如与用于语音识别的录制话音输入的麦克风耦合的音频数字化器。I/O装置130还可以包括可用于捕获视频图像 的视频数字化装置、像打印机这样的硬拷贝装置和只读光盘(Compact Disc Read-Only Memory,CD-ROM)装置。Computer system 100 of the present application may include one or more input/output (I/O) devices 130, including display devices such as monitors. The I/O device may also include input devices such as a keyboard and a cursor controller such as a mouse, trackball or trackpad. In addition, the I/O device may further include a network connector such that the computer system 100 becomes part of a local area network (LAN) or a wide area network (WAN), and the I/O device 130 is used for voice recording and/or Or a device for playback, such as an audio digitizer coupled to a microphone for recording voice input for speech recognition. The I/O device 130 may also include a video digitizing device that can be used to capture video images, a hard copy device such as a printer, and a Compact Disc Read-Only Memory (CD-ROM) device.

可选地,在本申请实施例中,外部存储系统120可以包括用于存储计算机程序产品的计算机可读介质,在该介质上可以存储可用于编程(即定义其操作)计算机(或其他电子设备)的指令,以便根据本申请执行处理。该计算机可读介质可以包括但不限于软盘、光盘、CD、CD-ROM和磁光盘、只读存储器(Read-Only Memory,ROM)、RAM、可擦除可编程只读存储器(erasable programmable read-only memory,EPROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable read only memory,EEPROM)、磁或光卡、快闪存储器,等等。Optionally, in the embodiment of the present application, the external storage system 120 may include a computer readable medium for storing a computer program product on which a computer (or other electronic device) usable for programming (ie, defining its operation) may be stored. An instruction to perform processing in accordance with the present application. The computer readable medium can include, but is not limited to, a floppy disk, an optical disk, a CD, a CD-ROM and a magneto-optical disk, a Read-Only Memory (ROM), a RAM, an erasable programmable read-only memory (erasable programmable read- Only memory, EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), magnetic or optical card, flash memory, and the like.

因此,计算机可读介质包括适于存储电子指令的任一类型的介质/机器可读介质。此外,还可以将本申请作为计算机程序产品下载。就这点而论,还可以将该程序从远程计算机(例如,服务器)传送到请求计算机(例如,客户端)。可以通过通信链路(例如,调制解调器、网络连接等等)将该程序作为包含在载波或其他传播介质中的数据信号传送。Accordingly, computer readable media includes any type of media/machine readable medium suitable for storing electronic instructions. In addition, the present application can also be downloaded as a computer program product. As such, the program can also be transferred from a remote computer (eg, a server) to a requesting computer (eg, a client). The program can be transmitted as a data signal contained in a carrier or other propagation medium over a communication link (e.g., modem, network connection, etc.).

计算机系统100可以是具有适当寄存器结构的处理器的通用计算机,或可以被配置用于特定目的或嵌入式应用。本申请实施例的方法可包含在目的在于控制计算机系统的操作(尤其是处理器和寄存器的操作)的机器可执行指令中。这些指令可用于使被用指令编程的通用或专用处理器执行本申请的步骤。或者,可由包含执行步骤的硬连线逻辑的特定硬件元件执行本申请的步骤,或者由已编程计算机元件和常规的硬件元件的组合来执行本申请的步骤。Computer system 100 can be a general purpose computer with a processor of a suitable register structure, or can be configured for a specific purpose or embedded application. The methods of embodiments of the present application can be included in machine executable instructions that are intended to control the operation of a computer system, particularly the operation of a processor and a register. These instructions can be used to cause a general purpose or special purpose processor programmed with instructions to perform the steps of the present application. Alternatively, the steps of the present application can be performed by specific hardware components that comprise hardwired logic for performing the steps, or by a combination of programmed computer components and conventional hardware components.

图2是根据本申请实施例的数据处理方法200的示意性流程图。如图2所示,该方法200包括以下内容中的至少部分内容。FIG. 2 is a schematic flowchart of a data processing method 200 according to an embodiment of the present application. As shown in FIG. 2, the method 200 includes at least some of the following.

在210中,控制器针对第一矩阵中的数据,将该第一矩阵中的数据写入寄存器。At 210, the controller writes data in the first matrix to the register for data in the first matrix.

应理解,本申请实施例不对每个寄存器的存储大小进行限定,可以将存储一个矩阵中的一个数据元素的存储空间称为一个寄存器,也可以将存储一个完整矩阵的存储空间称为一个寄存器或寄存器组等。It should be understood that, in this embodiment of the present application, the storage size of each register is not limited, and a storage space storing one data element in a matrix may be referred to as a register, or a storage space storing a complete matrix may be referred to as a register or Register group, etc.

可选地,在本申请实施例中,第一矩阵的行数可以等于第一矩阵的列数, 或者,第一矩阵的行数不等于第一矩阵的列数。Optionally, in the embodiment of the present application, the number of rows of the first matrix may be equal to the number of columns of the first matrix, or the number of rows of the first matrix is not equal to the number of columns of the first matrix.

在220中,控制器针对该寄存器中的该第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据。At 220, the controller performs a plurality of read operations for the data of the first matrix in the register, wherein each read operation reads at least one of the data.

可选地,在本申请实施例中,不同次读取操作读取的数据量可以相同,也可以不同。Optionally, in the embodiment of the present application, the amount of data read by different reading operations may be the same or different.

在230中,在每次读取操作之后,控制器在该寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,该目标写入位置为该每次读取操作的读取位置。At 230, after each read operation, the controller writes at least one data of the second matrix at a target write location in the register, wherein the target write location is a read of the each read operation Take the location.

可选地,在本申请实施例中,第二矩阵的行数可以等于第二矩阵的列数,或者,第二矩阵的行数不等于第二矩阵的列数。Optionally, in the embodiment of the present application, the number of rows of the second matrix may be equal to the number of columns of the second matrix, or the number of rows of the second matrix is not equal to the number of columns of the second matrix.

可选地,在本申请实施例中,第二矩阵的行数可以等于第一矩阵的行数,以及第二矩阵的列数可以等于该第一矩阵的列数。Optionally, in the embodiment of the present application, the number of rows of the second matrix may be equal to the number of rows of the first matrix, and the number of columns of the second matrix may be equal to the number of columns of the first matrix.

或者,在本申请实施例中,第二矩阵的行数可以等于第一矩阵的列数,以及第二矩阵的列数可以等于第一矩阵的行数。Alternatively, in the embodiment of the present application, the number of rows of the second matrix may be equal to the number of columns of the first matrix, and the number of columns of the second matrix may be equal to the number of rows of the first matrix.

可选地,在本申请实施例中,第一矩阵的数据也可以是在针对其他的矩阵(非第一矩阵和非第二矩阵)的每次读取操作之后逐步写入的。以及第二矩阵的写入方式以及读取之后的寄存器的利用也可以如第一矩阵。Optionally, in the embodiment of the present application, the data of the first matrix may also be written step by step after each read operation for other matrices (non-first matrix and non-second matrix). And the writing mode of the second matrix and the utilization of the register after reading may also be as the first matrix.

具体地,针对所述寄存器中的所述第二矩阵的数据,执行多次读取操作,其中,每次读取操作读取所述第二矩阵至少一个数据;在所述每次读取操作之后,在所述寄存器中的目标写入位置,写入第三矩阵的至少一个数据,其中,所述目标写入位置为所述每次读取操作的读取位置。Specifically, a plurality of read operations are performed for data of the second matrix in the register, wherein each read operation reads at least one data of the second matrix; Thereafter, at least one data of the third matrix is written at a target write location in the register, wherein the target write location is a read location of the each read operation.

换句话说,在本申请实施例的对矩阵的处理过程中,前一矩阵可以分多次读取,在每次读取操作之后,在前一矩阵的读取位置处写入后一矩阵的数据。In other words, in the processing of the matrix in the embodiment of the present application, the previous matrix can be read in multiple times, and after each read operation, the latter matrix is written at the reading position of the previous matrix. data.

因此,在本申请实施例中,可以针对寄存器中的第一矩阵的数据执行多次读取操作,在每次读取操作之后,控制器在寄存器中的读取位置再写入第二矩阵的数据,从而可以避免读取操作之后的寄存器的空置,从而可以在不损失数据处理效率的情况下,避免寄存器资源的浪费。Therefore, in the embodiment of the present application, multiple read operations may be performed on the data of the first matrix in the register, and after each read operation, the controller writes the read position in the register to the second matrix again. The data can avoid the vacancy of the register after the read operation, so that the waste of register resources can be avoided without losing the efficiency of data processing.

可选地,在本申请实施例中,一次读取操作(读取第一矩阵中的数据)之后的用于写入第二矩阵的数据的写入操作可以在下次读取操作(读取第一矩阵中的数据)之前执行。Optionally, in the embodiment of the present application, the write operation for writing data of the second matrix after one read operation (reading data in the first matrix) may be performed in the next read operation (reading the first The data in a matrix is executed before.

可选地,在本申请实施例中,在每次读取操作之后的同一时钟周期,在该寄存器中的目标写入位置,写入该第二矩阵的至少一个数据。Optionally, in the embodiment of the present application, at least one data of the second matrix is written in a target write position in the register in the same clock cycle after each read operation.

具体地,可以在一个时钟周期的较前的时间执行针对第一矩阵的读取操作,在该同一个时钟周期的靠后的时间执行针对第二矩阵的数据的写入操作。Specifically, the read operation for the first matrix can be performed at a earlier time of one clock cycle, and the write operation for the data of the second matrix is performed at a later time of the same clock cycle.

由此,在读取操作的同一时钟周期,在读取位置写入另一矩阵的数据,可以进一步避免寄存器资源的浪费,并且可以提升数据处理效率。Thus, writing data of another matrix at the read position during the same clock cycle of the read operation can further avoid waste of register resources and can improve data processing efficiency.

可选地,在本申请实施例中,控制器针对第一矩阵的数据,按照第一数据顺序,将该第一矩阵中的数据写入寄存器;针对该寄存器中的该第一矩阵的数据,按照第二数据顺序,执行多次读取操作。Optionally, in the embodiment of the present application, the controller writes data in the first matrix to the register according to the first data sequence for the data of the first matrix; for the data of the first matrix in the register, In the second data sequence, multiple read operations are performed.

可选地,在本申请实施例中,该第一数据顺序可以是按矩阵的行进行写入的顺序,或者是按矩阵的列进行写入的顺序。Optionally, in the embodiment of the present application, the first data sequence may be an order of writing in a row of a matrix, or an order of writing in a column of a matrix.

可选地,在本申请实施例中,该第二数据顺序可以是按矩阵的列进行读取的顺序,或者是矩阵的行进行读取的顺序。Optionally, in the embodiment of the present application, the second data sequence may be an order of reading in a matrix of columns, or an order in which rows of the matrix are read.

可选地,在本申请实施例中,该第二数据顺序可以不同于第一数据顺序。Optionally, in the embodiment of the present application, the second data sequence may be different from the first data sequence.

可选地,本申请实施例可以用于矩阵的转置操作。Optionally, the embodiments of the present application may be used for a transposition operation of a matrix.

具体地,在该第一数据顺序是按矩阵的行进行写入的顺序时,该第二数据顺序是按照矩阵的列进行读取的顺序。此时可选地,针对第一矩阵的每次写入操作可以写入一行的数据,以及每次读取操作可以读取该矩阵的一列的数据,从而可以实现第一矩阵的转置。Specifically, when the first data order is an order of writing in a row of a matrix, the second data order is an order of reading in a matrix of the matrix. At this time, optionally, data of one row may be written for each write operation of the first matrix, and data of one column of the matrix may be read for each read operation, so that transposition of the first matrix may be implemented.

或者,在该第一数据顺序可以是按矩阵的列进行写入的顺序时,该第二数据顺序是按照矩阵的行进行读取的顺序。此时可选地,针对第一矩阵的每次写入操作可以写入一列的数据,以及每次读取操作可以读取该矩阵的一行的数据,从而可以实现第一矩阵的转置。Alternatively, when the first data sequence may be in the order of writing in a matrix of columns, the second data sequence is in the order of reading in rows of the matrix. At this time, optionally, one column of data may be written for each write operation of the first matrix, and data of one row of the matrix may be read for each read operation, so that transposition of the first matrix may be implemented.

当然,该第一数据顺序也可以是其他的数据顺序,具体可以根据需要针对第一矩阵所需的处理而定,本申请实施例对此不做具体限定。Certainly, the first data sequence may also be other data sequences, which may be determined according to the processing required for the first matrix, which is not specifically limited in this embodiment of the present application.

可选地,在本申请实施例中,控制器可以按照第一存储空间顺序,将该第一矩阵中的数据写入该寄存器;以及控制器可以按照第二存储空间顺序,针对该寄存器中的该第一矩阵的数据,执行多次读取操作。Optionally, in the embodiment of the present application, the controller may write the data in the first matrix to the register according to the first storage space order; and the controller may follow the second storage space order for the register The data of the first matrix performs a plurality of read operations.

可选地,在本申请实施例中,该第一存储空间顺序不同于该第二存储空间顺序。Optionally, in the embodiment of the present application, the first storage space sequence is different from the second storage space sequence.

可选地,在本申请实施例中,该第一存储空间顺序为按该寄存器的行进行写入的顺序,或者,该第一存储空间顺序为按该寄存器的列进行写入的顺序。Optionally, in the embodiment of the present application, the first storage space sequence is an order of writing in a row of the register, or the first storage space order is an order of writing in a column of the register.

可选地,在本申请实施例中,该第二存储空间顺序是按该寄存器的列进行读取的顺序,或者,该第二存储空间顺序是按该寄存器的行进行读取的顺序。Optionally, in the embodiment of the present application, the second storage space order is an order of reading in a column of the register, or the second storage space order is an order of reading in a row of the register.

可选地,在本申请实施例中,在该第一存储空间顺序为按该寄存器的行进行写入的顺序时,该第二存储空间顺序是按该寄存器的列进行读取的顺序。此时可选地,在针对该第一矩阵的每次写入操作中,在该寄存器的一行写入该第一矩阵的数据,以及每次读取操作读取该寄存器的一列数据。Optionally, in the embodiment of the present application, when the first storage space sequence is an order of writing in a row of the register, the second storage space order is an order of reading in a column of the register. At this time, optionally, in each write operation for the first matrix, data of the first matrix is written in one row of the register, and a column of data of the register is read every read operation.

可选地,在本申请实施例中,在该第一存储空间顺序为按该寄存器的列进行写入的顺序,该第二存储空间顺序是按该寄存器的行进行读取的顺序。此时可选地,在针对该第一矩阵的每次写入操作中,在该寄存器的一列写入该第一矩阵的数据,以及每次读取操作读取该寄存器的一行数据。Optionally, in the embodiment of the present application, in the order in which the first storage space is written in a column of the register, the second storage space order is an order of reading in a row of the register. At this time, optionally, in each write operation for the first matrix, data of the first matrix is written in one column of the register, and one row of data of the register is read every read operation.

可选地,在本申请实施例中,寄存器的一行可存储的数据量可以等于寄存器的一列可存储的数据量。Optionally, in the embodiment of the present application, the amount of data that can be stored in one row of the register may be equal to the amount of data that can be stored in one column of the register.

可选地,在本申请实施例中,寄存器的一行可以理解为一行存储空间,以及,寄存器的一列可以理解为一列存储空间。Optionally, in the embodiment of the present application, one row of the register can be understood as a row of storage space, and a column of the register can be understood as a column of storage space.

应理解,在本申请实施例中,按照数据顺序读写矩阵的数据以及按照寄存器的存储空间顺序读写矩阵的数据,这两种实现方式是可以结合使用的。It should be understood that, in the embodiment of the present application, the data of the matrix is read and written according to the data sequence, and the data of the matrix is read and written in the order of the storage space of the register, and the two implementation manners can be used in combination.

例如,在本申请实施例中,寄存器的行数可以等于矩阵的行数,寄存器的列数可以等于矩阵的列数,此时,可以将矩阵的各行数据分别写入到寄存器的各行,或者,可以将矩阵的各列数据分别写入到寄存器的各列。For example, in the embodiment of the present application, the number of rows of the register may be equal to the number of rows of the matrix, and the number of columns of the register may be equal to the number of columns of the matrix. In this case, each row of data of the matrix may be separately written to each row of the register, or Each column of data of the matrix can be written to each column of the register.

例如,在对多个矩阵的数据进行处理时,前一矩阵的行数可以等于后一矩阵的列数以及前一矩阵的列数可以等于后一矩阵的行数。同时,寄存器的行数可以等于前一矩阵的行数,寄存器的列数可以等于前一矩阵的列数,此时,将前一矩阵的各行可以写入到寄存器的各行,然后按寄存器的列进行数据的读取,从而可以实现前一矩阵的转置,在写入后一矩阵时,可以将后一矩阵的各行,写入到寄存器的各列中,然后,按寄存器的行进行数据的读取,从而可以实现后一矩阵的转置。For example, when processing data of a plurality of matrices, the number of rows of the previous matrix may be equal to the number of columns of the latter matrix and the number of columns of the previous matrix may be equal to the number of rows of the latter matrix. At the same time, the number of rows of the register can be equal to the number of rows of the previous matrix, and the number of columns of the register can be equal to the number of columns of the previous matrix. In this case, each row of the previous matrix can be written to each row of the register, and then according to the column of the register. The data is read, so that the transposition of the previous matrix can be realized. When writing the latter matrix, each row of the latter matrix can be written into each column of the register, and then the data is performed according to the row of the register. Read, so that the transpose of the latter matrix can be achieved.

例如,在对多个矩阵的数据进行处理时,前一矩阵的行数可以等于后一 矩阵的列数以及前一矩阵的列数可以等于后一矩阵的行数。同时,寄存器的行数可以等于后一矩阵的行数,寄存器的列数可以等于后一矩阵的列数,此时,将前一矩阵的各行可以写入到寄存器的各列中,然后按寄存器的行进行数据的读取,从而可以实现前一矩阵的转置,在写入后一矩阵时,可以将后一矩阵的各行,写入到寄存器的各行中,然后,按寄存器的列进行数据的读取,从而可以实现后一矩阵的转置。For example, when processing data of a plurality of matrices, the number of rows of the previous matrix may be equal to the number of columns of the latter matrix and the number of columns of the previous matrix may be equal to the number of rows of the latter matrix. At the same time, the number of rows of the register can be equal to the number of rows of the latter matrix, and the number of columns of the register can be equal to the number of columns of the latter matrix. At this time, each row of the previous matrix can be written into each column of the register, and then by the register. The row reads the data, so that the transposition of the previous matrix can be realized. When writing the latter matrix, each row of the latter matrix can be written into each row of the register, and then the data is performed according to the column of the register. The reading enables the transposition of the latter matrix.

应理解,在本申请实施例中,寄存器也可以不进行列和行的划分。例如,可以对寄存器的各个存储空间进行编号,按照存储空间的编号,进行矩阵的数据的写入和读取。It should be understood that, in the embodiment of the present application, the register may not be divided into columns and rows. For example, each storage space of the register can be numbered, and data of the matrix can be written and read according to the number of the storage space.

例如,寄存器可以分为存储空间1(也可以称为寄存器)1,2,3,4,5,6,7,8,9。对于3×3的矩阵而言,可以将矩阵的第一行数据写入存储空间1,2,3,将矩阵的第二行数据写入存储空间4,5,6,将矩阵的第三行数据写入存储空间7,8,9,第一次读取操作可以读取存储空间1,4,7中的数据,第二次读取操作可以读取存储空间2,5,8中的数据,第三次读取操作可以读取存储空间3,6,9中的数据,从而可以实现该3×3的矩阵的转置。For example, the registers can be divided into storage spaces 1 (which can also be referred to as registers) 1, 2, 3, 4, 5, 6, 7, 8, 9. For a 3×3 matrix, the first row of the matrix data can be written to the storage space 1, 2, 3, and the second row of the matrix data is written to the storage space 4, 5, 6, and the third row of the matrix Data is written to the storage space 7, 8, 9, the first read operation can read the data in the storage space 1, 4, 7, and the second read operation can read the data in the storage space 2, 5, 8. The third read operation can read the data in the storage spaces 3, 6, and 9, so that the transposition of the 3 × 3 matrix can be realized.

应理解,本申请实施例提到的矩阵(例如,第一矩阵,第二矩阵和第三矩阵)包括多个数字,是数学意义上的矩阵,写入寄存器并从寄存器读取的过程,可以实现矩阵的转置(或者,其他形式的矩阵变换),转置后的矩阵可以被结合其他数字或矩阵进行处理。但是在写入到寄存器时,可以对该多个数字以矩阵的排布形式进行存储,也可以其他的形式进行存储,以及,在写入到寄存器之前存储时,可以对该多个数字以矩阵的排布形式进行存储,也可以其他形式进行存储。It should be understood that the matrix mentioned in the embodiments of the present application (for example, the first matrix, the second matrix, and the third matrix) includes a plurality of numbers, which is a matrix in a mathematical sense, and the process of writing to the register and reading from the register may To achieve transposition of the matrix (or other forms of matrix transformation), the transposed matrix can be processed in conjunction with other numbers or matrices. However, when writing to the register, the plurality of numbers may be stored in a matrix arrangement, or may be stored in other forms, and the plurality of numbers may be matrixed when stored before being written to the register. The arrangement is stored and can be stored in other forms.

为了更加清楚地理解本申请,以下将结合图3,以及以对多个2×2的矩阵进行转置为例进行详细说明。In order to more clearly understand the present application, a detailed description will be made below with reference to FIG. 3 and a transposition of a plurality of 2×2 matrices.

如图3所示,寄存器可以包括寄存器R0,寄存器R1,寄存器R2和寄存器R3,需要对多个矩阵(包括矩阵

Figure PCTCN2018080938-appb-000001
以及矩阵
Figure PCTCN2018080938-appb-000002
)进行转置。 As shown in Figure 3, the register can include register R0, register R1, register R2 and register R3, which need to be used for multiple matrices (including matrices).
Figure PCTCN2018080938-appb-000001
And matrix
Figure PCTCN2018080938-appb-000002
) Transpose.

首先,写地址初始值为0,控制器可以将数据A0,A1写入寄存器R0,R1(第一次写入操作),写入后写地址变为1,然后,可以将数据A2,A3写入寄存器R2,R3(第二次写入操作),写入后写地址变为2。First, the initial value of the write address is 0. The controller can write data A0, A1 to the register R0, R1 (first write operation), write the write address to 1, and then write the data A2, A3. In the register R2, R3 (second write operation), the write address becomes 2 after writing.

此时,读的使能(enable)打开,按照最快速的情况,控制器可以在写入数据A2和A3之后的下一个时钟周期将数据读走,其中,控制器可以根据下一时钟周期是否读,判断寄存器是否可写,如果读,则,读走数据A0,A2(第一次读取操作),并该同一时钟周期,将矩阵2中的数据B0,B1写入寄存组R0,R2(第三次写入操作),写入后写地址变为3。以及,在下一时钟周期,如果读(读地址1),读走A1,A3(第二次读取操作),并将第二矩阵的数据B2,B3写入寄存器组R1,R3(第四次写入操作),写入后写地址变为0。然后读地址2,读走B0,B2(第三次读取操纵),并将矩阵的数据C0和C1写入寄存器组R0,R1(第五次写入操作),写入后写地址变为1,以及,在下一时钟周期,如果读(读地址3),读走B1,B3(第四次读取操作),并将矩阵3的数据C2,C3写入寄存器组R1,R3(第六次写入操作),写入后写地址变为2,并以此类推。At this point, the read enable is turned on. According to the fastest case, the controller can read the data in the next clock cycle after writing data A2 and A3, wherein the controller can be based on the next clock cycle. Read, judge whether the register is writable. If it is read, read the data A0, A2 (first read operation), and write the data B0, B1 in matrix 2 to the register group R0, R2 in the same clock cycle. (The third write operation), the write address becomes 3 after writing. And, in the next clock cycle, if read (read address 1), read A1, A3 (second read operation), and write the data of the second matrix B2, B3 to register group R1, R3 (fourth time) Write operation), the write address becomes 0 after writing. Then read address 2, read B0, B2 (third read manipulation), and write the matrix data C0 and C1 to register group R0, R1 (fifth write operation), write address becomes 1, and, in the next clock cycle, if read (read address 3), read B1, B3 (fourth read operation), and write data of matrix 3 C2, C3 to register group R1, R3 (sixth Write operation), write address becomes 2 after writing, and so on.

再例如,如图4所示,假设需要对多个2行3列的矩阵(包括矩阵

Figure PCTCN2018080938-appb-000003
Figure PCTCN2018080938-appb-000004
矩阵
Figure PCTCN2018080938-appb-000005
矩阵
Figure PCTCN2018080938-appb-000006
矩阵
Figure PCTCN2018080938-appb-000007
Figure PCTCN2018080938-appb-000008
矩阵
Figure PCTCN2018080938-appb-000009
以及矩阵
Figure PCTCN2018080938-appb-000010
等)进行转置操作,以及寄存器的地址分别为R0,R1,R2,R3,R4和R5。 For another example, as shown in FIG. 4, it is assumed that a matrix of a plurality of 2 rows and 3 columns (including a matrix) is required.
Figure PCTCN2018080938-appb-000003
Figure PCTCN2018080938-appb-000004
matrix
Figure PCTCN2018080938-appb-000005
matrix
Figure PCTCN2018080938-appb-000006
matrix
Figure PCTCN2018080938-appb-000007
Figure PCTCN2018080938-appb-000008
matrix
Figure PCTCN2018080938-appb-000009
And matrix
Figure PCTCN2018080938-appb-000010
Etc.) The transpose operation, and the address of the register are R0, R1, R2, R3, R4 and R5, respectively.

则可以在寄存器R0和R1中存储矩阵A的数据A0和A1(第一次写入操作),以及在寄存器R2和R3中存储矩阵A的数据A2和A3(第二次写入操作),以及在寄存器R4和R5中存储矩阵A的数据A4和A5(第三次写入操作)。在第一次读取操作时,可以读取寄存器R0和R3中的数据A0和A3,并在该位置写入矩阵B的数据B0和B1(第四次写入操作)。在第二次读取操作时,可以读取R1和R4中的数据A1和A4,并且在R1和R4中存入矩阵B的数据B2和B3(第五次写入操作)。在第三次读取操作时可以在寄存器R2和R5中读取数据A2和A5,并且在寄存器R2和R5的位置写入矩阵B的数据B4和B5(第六次写入操作)。在第四次读取操作时,可以在寄存器R0和R4中读取数据B0和B3,以及写入矩阵C中的数据C0和C1(第七次写入操作)。在第五次读取操作时可以在寄存器R3和R2中读取数据B1和B4,以及写入矩阵C中的数据C2和C3(第八次写入操作)。在第六次读取操作时可以在寄存器R1和R5中读取数据B2和B5,以及写入矩阵C中的数据C4和C5(第九次写入操作)。在第七次读取操作时可以在寄存器R0 和R2中读取数据C0和C3,以及写入矩阵D中的数据D0和D1(第十次写入操作)。在第八次读取操作时,可以在寄存器R4和R1中读取数据C1和C4,以及在寄存器中写入矩阵D中的数据D2和D3(第十一次写入操作)。在第九次读取操作时,可以在寄存器R3和R5中读取数据C2和C5,以及写入矩阵D中的数据D4和D5(第十二次写入操作)。在第十次读取操作时,可以在寄存器R0和R1中读取数据D0和D3,以及写入矩阵E中的数据E0和E1(第十三次写入操作)。在第十一次读取操作时,可以在寄存器R2和R3中读取数据D1和D4以及写入矩阵E中的数据E2和E3(第十四次写入操作),在第十二次读取操作时,可以在寄存器R4和R5中读取数据D2和D5,以及写入矩阵E中的数据E4和E5(第十五次写入操作)。以及,在第十三次读取操作中,可以在寄存器R0和R3中读取数据E0和E3,以及写入矩阵F中的数据F0和F1(第十六次写入操作),以此类推。The data A0 and A1 of the matrix A (the first write operation) can be stored in the registers R0 and R1, and the data A2 and A3 of the matrix A (the second write operation) can be stored in the registers R2 and R3, and The data A4 and A5 of the matrix A are stored in the registers R4 and R5 (third write operation). At the first read operation, data A0 and A3 in registers R0 and R3 can be read, and data B0 and B1 of matrix B are written at this position (fourth write operation). At the second read operation, data A1 and A4 in R1 and R4 can be read, and data B2 and B3 of matrix B are stored in R1 and R4 (fifth write operation). Data A2 and A5 can be read in registers R2 and R5 at the third read operation, and data B4 and B5 of matrix B are written at the positions of registers R2 and R5 (sixth write operation). At the fourth read operation, data B0 and B3 can be read in registers R0 and R4, as well as data C0 and C1 (seventh write operation) written in matrix C. The data B1 and B4 can be read in the registers R3 and R2, and the data C2 and C3 in the matrix C (the eighth write operation) can be written in the fifth read operation. Data B2 and B5 can be read in registers R1 and R5, as well as data C4 and C5 in matrix C (ninth write operation) at the sixth read operation. At the seventh read operation, data C0 and C3 can be read in registers R0 and R2, and data D0 and D1 (tenth write operation) written in matrix D can be written. At the eighth read operation, data C1 and C4 can be read in registers R4 and R1, and data D2 and D3 in matrix D are written in the register (eleventh write operation). At the ninth read operation, data C2 and C5 can be read in registers R3 and R5, as well as data D4 and D5 written in matrix D (twelfth write operation). At the tenth read operation, the data D0 and D3 can be read in the registers R0 and R1, and the data E0 and E1 (the thirteenth write operation) written in the matrix E can be written. At the eleventh read operation, data D1 and D4 can be read in registers R2 and R3, and data E2 and E3 in the write matrix E (fourteenth write operation) can be read in the twelfth read. At the time of the fetch operation, the data D2 and D5 can be read in the registers R4 and R5, and the data E4 and E5 in the matrix E can be written (the fifteenth write operation). And, in the thirteenth read operation, the data E0 and E3 can be read in the registers R0 and R3, and the data F0 and F1 in the matrix F are written (the sixteenth write operation), and so on. .

应理解,图4所示的每次写入操作对应的数据量是相同的,但是每次写入操作对应的数据量也可以是不相同的,例如,可以在第一次写入操作中写入数据A0,A1和A2,第二次写入操作中写入的数据是A3,A4和A5,其他次写入操作的数据量可以是2个数据等。It should be understood that the amount of data corresponding to each write operation shown in FIG. 4 is the same, but the amount of data corresponding to each write operation may also be different, for example, may be written in the first write operation. Into the data A0, A1 and A2, the data written in the second write operation is A3, A4 and A5, and the data amount of other write operations can be 2 data or the like.

可选地,在本申请实施例中,在针对第一矩阵执行读取操作时,基于当前读取操作次数,查找表项,以确定目标读取位置,该表项指示至少一个读取操作次数与至少一个读取位置的对应关系;基于该目标读取位置,执行该每次读取操作。Optionally, in the embodiment of the present application, when performing a read operation on the first matrix, searching for an entry to determine a target read location based on the current number of read operations, the entry indicating at least one read operation Correspondence with at least one read position; the read operation is performed based on the target read position.

可选地,该表项可以是基于第二数据顺序设置的表项,此时,可以按照第二数据顺序进行第一矩阵的数据的读取。Optionally, the entry may be an entry set based on the second data sequence. In this case, the data of the first matrix may be read in the second data sequence.

或者,该表项可以是基于第二存储空间顺序设置的表项,此时,可以按照第二存储空间顺序进行第一矩阵的数据的读取。Alternatively, the entry may be an entry based on the second storage space order. In this case, the data of the first matrix may be read in the second storage space order.

其中,该当前读取操作次数可以是依据计数器的计数而定,其中,计数器可以在满足一定情况下清零,例如,每次读取一个新的矩阵的数据时开始对该计时器进行清零,或者在开始一个读取循环时对计数器进行清零。The current number of read operations may be determined according to the count of the counter, wherein the counter may be cleared when the certain conditions are met, for example, the timer is cleared every time a new matrix of data is read. , or clear the counter when starting a read cycle.

其中,单次读取循环可以满足以下条件:对于不同次读取循环,同一读取操作次数对应的读取位置相同。以及进一步地,在同次读取循环中,不同的读取操作次数对应的读取位置不同。The single read cycle can satisfy the following conditions: for different read cycles, the read positions corresponding to the same number of read operations are the same. And further, in the same reading cycle, the reading positions corresponding to different number of reading operations are different.

例如,如图3所示的转置情况下,第一次读取操作对应的读取位置为寄 存器R0和R2,第二次读取操作对应的读取位置为R1和R3,第三次读取操作对应的读取位置为R0和R1,第四次读取操作对应的读取位置为R2和R3,以及第五次读取操作对应的读取位置为寄存器R0和R1,则可以将第一,二,三和四次读取操作称为一次读取循环,以及将第五,六,七和八次读取操作称为一次读取循环。For example, in the case of the transposition shown in FIG. 3, the read position corresponding to the first read operation is the registers R0 and R2, and the read positions corresponding to the second read operation are R1 and R3, and the third read is performed. The read position corresponding to the fetch operation is R0 and R1, the read position corresponding to the fourth read operation is R2 and R3, and the read position corresponding to the fifth read operation is the registers R0 and R1, then the The one, two, three, and four read operations are referred to as one read cycle, and the fifth, sixth, seventh, and eighth read operations are referred to as one read cycle.

例如,在如图4所示的转置情况下,在第一次和第十三次读取操作对应的读取位置为寄存器R0和R3,第二次和第十四次读取操作对应的读取位置为R1和R4,第三次和第十五次读取操作对应的读取位置为R2和R5等,由此可见,在图4所示的转置情况下,单次读取循环对应的读取操作为12次,在该12次的读取操作中,不同次的读取操作对应的读取位置是不同的。以及在不同次读取循环中,相同读取操作次数对应的读取位置是相同的,例如,第一次读取循环的第一次读取操作与第二次读取循环的第一次读取操作对应的读取位置是相同的。For example, in the case of the transposition as shown in FIG. 4, the read positions corresponding to the first and thirteenth read operations are the registers R0 and R3, and the second and fourteenth read operations are corresponding. The reading positions are R1 and R4, and the reading positions corresponding to the third and fifteenth reading operations are R2 and R5, etc., thereby showing that in the case of the transposition shown in FIG. 4, the single reading cycle The corresponding read operation is 12 times, and in the 12 read operations, the read positions corresponding to the different read operations are different. And in different read cycles, the read positions corresponding to the same number of read operations are the same, for example, the first read operation of the first read cycle and the first read of the second read cycle The read position corresponding to the fetch operation is the same.

其中,可以预存单次读取循环中读取操作次数与读取位置的对应关系,具体地,可以以表项的方式存储,从而可以通过查找表项的方式来确定每次读取操作对应的读取位置。The corresponding relationship between the number of read operations and the read position in a single read cycle may be pre-stored, and may be stored in an entry manner, so that each read operation may be determined by means of a lookup table entry. Read location.

因此,在本申请实施例中,基于表项的方式确定每次读取操作对应的读取位置,可以实现快速获取待读取数据的读取位置。Therefore, in the embodiment of the present application, the reading position corresponding to each reading operation is determined based on the manner of the entry, so that the reading position of the data to be read can be quickly obtained.

并且,进一步地,存储单次读取循环中,至少一个读取操作次数与至少一个读取位置的对应关系,可以减少信息的存储量。Moreover, further, storing the correspondence between the number of at least one read operation and the at least one read position in the single read cycle can reduce the storage amount of information.

可选地,在本申请实施例中,基于当前写入操作次数,查找表项,以确定用于写入该第二矩阵的数据的目标写入位置,该表项指示至少一个写入操作次数与至少一个写入位置的对应关系。Optionally, in the embodiment of the present application, the entry is searched based on the current number of write operations to determine a target write location for writing data of the second matrix, the entry indicating at least one write operation Correspondence with at least one write location.

其中,该当前写入次数可以是依据计数而定,其中,计数器可以在满足一定情况下清零,例如,每次写入一个新的矩阵时开始对该计数器清零,或者在开始一个写入循环时对计数器进行清零。The current number of writes may be determined according to a count, wherein the counter may be cleared when a certain condition is met, for example, the counter is cleared every time a new matrix is written, or a write is started. The counter is cleared when looping.

其中,单次写入循环可以满足以下条件:对于不同次写入循环,同一写入操作次数对应的写入位置相同。以及可选地,在同次写入循环中,不同的写入操作次数对应的写入位置不同。The single write cycle can satisfy the following conditions: for different write cycles, the write position corresponding to the same number of write operations is the same. And optionally, in the same write cycle, different write operations correspond to different write locations.

例如,如图3所示的转置情况下,在第一次写入操作对应的写入位置为寄存器R0和R1,第二次写入操作对应的写入位置为R2和R3,第三次写入 操作对应的写入位置为R0和R2,第四次写入操作对应的写入位置为R21和R3,以及第五次写入操作对应的写入位置为寄存器R0和R1,则可以将第一,二,三和四次写入操作称为一次写入循环,以及将第五,六,七和八次写入操作称为一次写入循环。For example, in the case of the transposition shown in FIG. 3, the write positions corresponding to the first write operation are the registers R0 and R1, and the write positions corresponding to the second write operation are R2 and R3, the third time. The write position corresponding to the write operation is R0 and R2, the write position corresponding to the fourth write operation is R21 and R3, and the write position corresponding to the fifth write operation is the registers R0 and R1, then The first, second, third, and fourth write operations are referred to as a write cycle, and the fifth, sixth, seventh, and eighth write operations are referred to as a write cycle.

例如,在如图4所示的转置情况下,在第一次和第十三次读取写入操作对应的写入位置为寄存器R0和R1,第二次和第十四次写入操作对应的写入位置为R2和R3,第三次和第十五次写入操作对应的写入位置为R4和R5等,由此可见,在图4所示的转置情况下,单次写入循环对应的写入操作为12次,在该12次的写入操作中,不同次的写入操作对应的写入位置是不同的。以及在不同次写入循环中,相同写入操作次数对应的写入位置是相同的,例如,第一次写入循环的第一次写入操作与第二次写入循环的第一次写入操作对应的写入位置是相同的。For example, in the case of the transposition as shown in FIG. 4, the write positions corresponding to the first and thirteenth read write operations are the registers R0 and R1, the second and fourteenth write operations. The corresponding write positions are R2 and R3, and the write positions corresponding to the third and fifteenth write operations are R4 and R5, etc., thereby showing that in the case of the transposition shown in FIG. 4, a single write The write operation corresponding to the loop is 12 times, and in the 12 write operations, the write positions corresponding to the different write operations are different. And in different write cycles, the write positions corresponding to the same number of write operations are the same, for example, the first write operation of the first write cycle and the first write of the second write cycle The write location corresponding to the incoming operation is the same.

因此,在本申请实施例中,基于表项的方式确定每次写入操作对应的写入位置,可以实现快速获取目标写入位置。Therefore, in the embodiment of the present application, the write location corresponding to each write operation is determined based on the manner of the entry, and the target write location can be quickly obtained.

并且,进一步地,存储单次写入循环中,至少一个写入操作次数与至少一个写入位置的对应关系,可以减少信息的存储量。Moreover, further, in the single write cycle, the correspondence between the number of at least one write operation and the at least one write position can reduce the amount of information stored.

应理解,本申请实施例并不限于以上的描述,例如,可以在针对该第一矩阵的数据执行读取操作时,可以记录读取位置;将记录的该读取位置,确定为用于写入该第二矩阵的数据该目标写入位置。It should be understood that the embodiment of the present application is not limited to the above description. For example, when a read operation is performed on data of the first matrix, a read position may be recorded; and the read position of the record is determined to be used for writing. The data entering the second matrix is the target write location.

也就是说,在每次读取寄存器中的数据时,可以实时记录该读取位置,并在同一时钟周期,在记录的该位置内写入其他矩阵的数据。That is to say, each time the data in the register is read, the read position can be recorded in real time, and the data of the other matrix is written in the recorded position in the same clock cycle.

可选地,在本申请实施例中,在上述确定的目标写入位置,写入该第二矩阵的数据之前,控制器可以确定该目标写入位置中的数据已经被读取。Optionally, in the embodiment of the present application, before writing the data of the second matrix in the determined target write position, the controller may determine that the data in the target write location has been read.

可选地,在本申请实施例中,控制器可以确定下一时钟周期寄存器是否可读,来判断该寄存器是否可写。Optionally, in the embodiment of the present application, the controller may determine whether the next clock cycle register is readable to determine whether the register is writable.

可选地,在本申请实施例中,确定该第一矩阵的待读取的数据已经被写入。Optionally, in the embodiment of the present application, it is determined that the data to be read of the first matrix has been written.

具体地,可以根据针对该第一矩阵已执行的写入操作次数,确定该第一矩阵的待读取的数据已经被写入。Specifically, it may be determined that the data to be read of the first matrix has been written according to the number of write operations that have been performed for the first matrix.

例如,如图3所示的情况下,在针对矩阵(矩阵1或矩阵2)已执行两次写入操作时,则认为该第一矩阵的待读取的数据已经被写入。以及在如图 4所示的情况下,在针对矩阵(矩阵A,B,C和D等)已执行三次写入操作时,则认为该第一矩阵的待读取的数据已经被写入。For example, in the case shown in FIG. 3, when two write operations have been performed for the matrix (matrix 1 or matrix 2), the data to be read of the first matrix is considered to have been written. And in the case shown in Fig. 4, when three write operations have been performed for the matrix (matrix A, B, C, D, etc.), the data of the first matrix to be read has been considered to have been written.

可选地,在第一次读取操作之前,确定该第一矩阵的待读取的数据已经被写入。Optionally, before the first read operation, it is determined that the data to be read of the first matrix has been written.

具体地,在本申请实施例中,在用于对一些矩阵(例如,行数和列数相同的矩阵,且每次写入一列或一行的数据,以及每次读取一行或一列的数据)进行转置的情况下,如果第一次读取操作的数据被写入,此时意味着该矩阵的全部数据被写入,因此可以仅在第一次读取操作之前,确定该第一矩阵的待读取的数据已经被写入,可以不用在每次读取操作之前,均确定待读取的数据已经被写入。Specifically, in the embodiment of the present application, it is used for some matrices (for example, a matrix having the same number of rows and columns, and writing data of one column or one row at a time, and reading data of one row or one column at a time) In the case of transposition, if the data of the first read operation is written, it means that all the data of the matrix is written, so the first matrix can be determined only before the first read operation. The data to be read has been written, and it is not necessary to determine that the data to be read has been written before each read operation.

但应理解,本申请实施例并不限于此,可以在每次读取操作之前,确定该第一矩阵的当前待读取的数据已经被写入。However, it should be understood that the embodiment of the present application is not limited thereto, and it may be determined that the current data to be read of the first matrix has been written before each read operation.

可选地,在本申请实施例中,可以将数据读写的外部接口封装为FIFO接口。Optionally, in the embodiment of the present application, the external interface for reading and writing data can be encapsulated as a FIFO interface.

因此,在本申请实施例中,可以针对寄存器中的第一矩阵的数据执行多次读取操作,在每次读取操作之后,控制器在寄存器中的读取位置再写入第二矩阵的数据,从而可以避免读取操作之后的寄存器的空置,从而可以在降低数据处理速度的情况下,避免寄存器资源的浪费。Therefore, in the embodiment of the present application, multiple read operations may be performed on the data of the first matrix in the register, and after each read operation, the controller writes the read position in the register to the second matrix again. The data can avoid the vacancy of the register after the read operation, so that the waste of register resources can be avoided while reducing the data processing speed.

图5是根据本申请实施例的控制器300的示意性框图。该控制器300包括写入单元310和读取单元320;其中,FIG. 5 is a schematic block diagram of a controller 300 in accordance with an embodiment of the present application. The controller 300 includes a writing unit 310 and a reading unit 320;

该写入单元310用于:将第一矩阵中的数据写入寄存器;The writing unit 310 is configured to: write data in the first matrix into the register;

该读取单元320用于:针对该寄存器中的该第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据;The reading unit 320 is configured to: perform a plurality of read operations on the data of the first matrix in the register, wherein each read operation reads at least one data;

该写入单元310进一步用于:在每次读取操作之后,在该寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,该目标写入位置为每次读取操作的读取位置。The writing unit 310 is further configured to: write at least one data of the second matrix at a target write position in the register after each read operation, wherein the target write position is each read operation The reading position.

可选地,在本申请实施例中,该写入单元310进一步用于:针对该第一矩阵的数据,按照第一数据顺序,将该第一矩阵中的数据写入该寄存器;Optionally, in the embodiment of the present application, the writing unit 310 is further configured to: write, in the first data order, data in the first matrix to the register for the data of the first matrix;

该读取单元320进一步用于:The reading unit 320 is further configured to:

针对该寄存器中的该第一矩阵的数据,按照第二数据顺序,执行该多次读取操作。The plurality of read operations are performed in the second data order for the data of the first matrix in the register.

可选地,在本申请实施例中,该第一数据顺序为按矩阵的行进行写入的顺序,该第二数据顺序是按矩阵的列进行读取的顺序。Optionally, in the embodiment of the present application, the first data sequence is an order of writing in a matrix, and the second data sequence is an order of reading in a matrix of columns.

可选地,在本申请实施例中,在针对该第一矩阵的每次写入操作中,该写入单元310写入该第一矩阵的一行数据;和/或,Optionally, in the embodiment of the present application, in each write operation for the first matrix, the writing unit 310 writes one row of data of the first matrix; and/or,

该读取单元320在每次读取操作过程中,读取该第一矩阵的一列数据。The reading unit 320 reads a column of data of the first matrix during each reading operation.

可选地,在本申请实施例中,该第一数据顺序为按矩阵的列进行写入的顺序,该第二数据顺序是按矩阵的行进行读取的顺序。Optionally, in the embodiment of the present application, the first data sequence is an order of writing in columns of a matrix, and the second data sequence is an order of reading in rows of the matrix.

可选地,在本申请实施例中,在针对该第一矩阵的每次写入操作中,该写入单元310写入该第一矩阵的一列数据;和/或,Optionally, in the embodiment of the present application, in each write operation for the first matrix, the writing unit 310 writes a column of data of the first matrix; and/or,

该读取单元320在每次读取操作的过程中,读取该第一矩阵的一行数据。The reading unit 320 reads a row of data of the first matrix during each read operation.

可选地,在本申请实施例中,该写入单元310进一步用于:Optionally, in the embodiment of the present application, the writing unit 310 is further configured to:

按照第一存储空间顺序,将该第一矩阵中的数据写入该寄存器;Writing the data in the first matrix to the register according to the first storage space order;

该读取单元320进一步用于:The reading unit 320 is further configured to:

按照第二存储空间顺序,针对该寄存器中的该第一矩阵的数据,执行多次读取操作。A plurality of read operations are performed for the data of the first matrix in the register in accordance with the second storage space order.

可选地,在本申请实施例中,该第一存储空间顺序为按该寄存器的行进行写入的顺序,该第二存储空间顺序是按该寄存器的列进行读取的顺序。Optionally, in the embodiment of the present application, the first storage space sequence is an order of writing in a row of the register, and the second storage space order is an order of reading in a column of the register.

可选地,在本申请实施例中,在针对该第一矩阵的每次写入操作中,该写入单元310在该寄存器的一行写入该第一矩阵的数据;和/或Optionally, in the embodiment of the present application, in each write operation for the first matrix, the writing unit 310 writes data of the first matrix in one row of the register; and/or

该读取单元320在每次读取操作的过程中,读取该寄存器的一列数据。The read unit 320 reads a column of data of the register during each read operation.

可选地,在本申请实施例中,该第一存储空间顺序为按该寄存器的列进行写入的顺序,该第二存储空间顺序是按该寄存器的行进行读取的顺序。Optionally, in the embodiment of the present application, the first storage space sequence is an order of writing in a column of the register, and the second storage space order is an order of reading in a row of the register.

可选地,在本申请实施例中,在针对该第一矩阵的每次写入操作中,该写入单元310在该寄存器的一列写入该第一矩阵的数据;和/或,Optionally, in the embodiment of the present application, in each write operation for the first matrix, the writing unit 310 writes data of the first matrix in a column of the register; and/or,

该读取单元320在每次读取操作的过程中,读取该寄存器的一行数据。The reading unit 320 reads one line of data of the register during each read operation.

可选地,在本申请实施例中,该写入单元310进一步用于:Optionally, in the embodiment of the present application, the writing unit 310 is further configured to:

在该读取操作之后的同一时钟周期,在该寄存器中的该目标写入位置,写入该第二矩阵的至少一个数据。At least one of the data of the second matrix is written at the target write location in the register for the same clock cycle after the read operation.

可选地,在本申请实施例中,该读取单元320进一步用于:Optionally, in the embodiment of the present application, the reading unit 320 is further configured to:

在针对该第一矩阵的数据执行每次读取操作时,记录读取位置;Recording a read position when performing a read operation for data of the first matrix;

该写入单元310进一步用于:将记录的该读取位置,确定为用于写入该 第二矩阵的数据的该目标写入位置。The writing unit 310 is further configured to determine the read position of the record as the target write position for writing data of the second matrix.

可选地,在本申请实施例中,该写入单元310进一步用于:Optionally, in the embodiment of the present application, the writing unit 310 is further configured to:

基于当前写入操作次数,查找第一表项,以确定用于写入该第二矩阵的数据的该目标写入位置,该第一表项指示至少一个写入操作次数与至少一个写入位置的对应关系。Finding a first entry to determine a target write location for writing data of the second matrix based on a current number of write operations, the first entry indicating at least one write operation and at least one write location Correspondence.

可选地,在本申请实施例中,该第一表项指示单次写入循环中,至少一个写入操作次数与至少一个写入位置的对应关系;其中,Optionally, in the embodiment of the present application, the first entry indicates a correspondence between the number of at least one write operation and the at least one write location in a single write cycle;

对于不同次写入循环,同一写入操作次数对应的写入位置相同。For different write cycles, the write position corresponding to the same number of write operations is the same.

可选地,在本申请实施例中,在同次写入循环中,不同的写入操作次数对应的写入位置不同。Optionally, in the embodiment of the present application, in the same write cycle, the write positions corresponding to different write operations are different.

可选地,在本申请实施例中,该读取单元320进一步用于:Optionally, in the embodiment of the present application, the reading unit 320 is further configured to:

在针对该第一矩阵执行每次读取操作时,基于当前读取操作次数,查找第二表项,以确定目标读取位置,该第二表项指示至少一个读取操作次数与至少一个读取位置的对应关系;When performing each read operation for the first matrix, searching for a second entry to determine a target read location based on the current number of read operations, the second entry indicating at least one read operation and at least one read Take the corresponding relationship of the location;

基于该目标读取位置,执行每次读取操作。Each read operation is performed based on the target read position.

可选地,在本申请实施例中,该第二表项指示单次读取循环中,至少一个读取操作次数与至少一个读取位置的对应关系;其中,Optionally, in the embodiment of the present application, the second entry indicates a correspondence between the number of at least one read operation and the at least one read position in a single read cycle;

对于不同次读取循环,同一读取操作次数对应的读取位置相同。For different read cycles, the same read operation corresponds to the same read position.

可选地,在本申请实施例中,在同次读取循环中,不同的读取操作次数对应的读取位置不同。Optionally, in the embodiment of the present application, in the same reading cycle, the reading positions corresponding to different reading operations are different.

可选地,在本申请实施例中,该写入单元310进一步用于:Optionally, in the embodiment of the present application, the writing unit 310 is further configured to:

在该目标写入位置,写入该第二矩阵的数据之前,确定该目标写入位置中的数据已经被读取。At the target write position, before the data of the second matrix is written, it is determined that the data in the target write position has been read.

可选地,在本申请实施例中,该读取单元320进一步用于:Optionally, in the embodiment of the present application, the reading unit 320 is further configured to:

在第一次读取操作之前,确定该第一矩阵的第一次待读取的数据已经被写入。Before the first read operation, it is determined that the first data to be read of the first matrix has been written.

可选地,在本申请实施例中,该读取单元320进一步用于:Optionally, in the embodiment of the present application, the reading unit 320 is further configured to:

在第一次读取操作之后的每次读取操作之前,确定当前次待读取的数据已经被写入。Before each read operation after the first read operation, it is determined that the data to be read currently has been written.

可选地,在本申请实施例中,该读取单元320进一步用于:Optionally, in the embodiment of the present application, the reading unit 320 is further configured to:

根据针对该第一矩阵已执行的写入操作次数,确定该第一矩阵的待读取 的数据已经被写入。Based on the number of write operations that have been performed for the first matrix, it is determined that the data to be read of the first matrix has been written.

可选地,在本申请实施例中,该第一矩阵的行数等于该第二矩阵的行数,该第一矩阵的列数等于该第二矩阵的列数。Optionally, in the embodiment of the present application, the number of rows of the first matrix is equal to the number of rows of the second matrix, and the number of columns of the first matrix is equal to the number of columns of the second matrix.

可选地,在本申请实施例中,该读取单元320进一步用于:Optionally, in the embodiment of the present application, the reading unit 320 is further configured to:

针对该寄存器中的该第二矩阵的数据,执行多次读取操作,其中,每次读取操作读取该第二矩阵至少一个数据;Performing a plurality of read operations on the data of the second matrix in the register, wherein each read operation reads at least one data of the second matrix;

该写入单元310进一步用于:在每次读取操作之后,在该寄存器中的目标写入位置,写入第三矩阵的至少一个数据,其中,该目标写入位置为每次读取操作的读取位置。The writing unit 310 is further configured to: after each read operation, write at least one data of the third matrix at a target write position in the register, wherein the target write position is each read operation The reading position.

应理解,控制器300可以实现上述方法实施例中的控制器的相应操作,为了简洁,在此不再赘述。It should be understood that the controller 300 can implement the corresponding operations of the controller in the foregoing method embodiments, and details are not described herein for brevity.

图6是根据本申请实施例的数据处理设备400的示意性框图。如图6所示,该设备400包括控制器410以及寄存器420;其中,FIG. 6 is a schematic block diagram of a data processing device 400 in accordance with an embodiment of the present application. As shown in FIG. 6, the device 400 includes a controller 410 and a register 420;

该控制器410用于向该寄存器420中写入数据以及读取该寄存器中的数据。The controller 410 is operative to write data to the register 420 and to read data in the register.

可选地,该数据处理设备为中央处理单元(Center Processing Unit,CPU),或者也可以是其它类型的处理器,本申请实施例对此不作具体限定。Optionally, the data processing device is a central processing unit (CPU), or may be another type of processor, which is not specifically limited in this embodiment of the present application.

应理解,控制器410可以实现上述方法实施例中的控制器的相应操作,为了简洁,在此不再赘述。It should be understood that the controller 410 can implement the corresponding operations of the controller in the foregoing method embodiments, and details are not described herein for brevity.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个 系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。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, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,)ROM、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application. It should be covered by the scope of protection of this application. Therefore, the scope of protection of the present application should be determined by the scope of the claims.

Claims (52)

一种数据处理方法,其特征在于,包括:A data processing method, comprising: 将第一矩阵中的数据写入寄存器;Writing data in the first matrix to the register; 针对所述寄存器中的所述第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据;Performing a plurality of read operations on data of the first matrix in the register, wherein each read operation reads at least one data; 在所述每次读取操作之后,在所述寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,所述目标写入位置为所述每次读取操作的读取位置。Writing at least one data of the second matrix at the target write position in the register after the each read operation, wherein the target write position is the read of the read operation position. 根据权利要求1所述的方法,其特征在于,所述将第一矩阵中的数据写入寄存器,包括:针对所述第一矩阵的数据,按照第一数据顺序,将所述第一矩阵中的数据写入所述寄存器;The method according to claim 1, wherein said writing data in said first matrix to said register comprises: for said data of said first matrix, said first matrix in accordance with said first data order Data is written to the register; 所述针对所述寄存器中的所述第一矩阵的数据,执行多次读取操作,包括:Performing a plurality of read operations on the data of the first matrix in the register, including: 针对所述寄存器中的所述第一矩阵的数据,按照第二数据顺序,执行所述多次读取操作。The plurality of read operations are performed in accordance with the second data order for the data of the first matrix in the register. 根据权利要求2所述的方法,其特征在于,所述第一数据顺序为按矩阵的行进行写入的顺序,所述第二数据顺序是按矩阵的列进行读取的顺序。The method according to claim 2, wherein the first data order is an order of writing in a matrix of rows, and the second data order is an order of reading in a matrix of columns. 根据权利要求3所述的方法,其特征在于,在针对所述第一矩阵的每次写入操作中,写入所述第一矩阵的一行数据;和/或,The method according to claim 3, wherein in each write operation for said first matrix, one row of data of said first matrix is written; and/or, 所述每次读取操作读取所述第一矩阵的一列数据。The read operation reads a column of data of the first matrix. 根据权利要求2所述的方法,其特征在于,所述第一数据顺序为按矩阵的列进行写入的顺序,所述第二数据顺序是按矩阵的行进行读取的顺序。The method according to claim 2, wherein said first data order is an order of writing in columns of a matrix, and said second data order is an order of reading in rows of a matrix. 根据权利要求5所述的方法,其特征在于,在针对所述第一矩阵的每次写入操作中,写入所述第一矩阵的一列数据;和/或,The method according to claim 5, wherein in each write operation for said first matrix, a column of data of said first matrix is written; and/or, 所述每次读取操作读取所述第一矩阵的一行数据。The read operation reads a row of data of the first matrix. 根据权利要求1所述的方法,其特征在于,所述将第一矩阵中的数据写入寄存器,包括:The method of claim 1 wherein said writing data in said first matrix to said register comprises: 按照第一存储空间顺序,将所述第一矩阵中的数据写入所述寄存器;Writing data in the first matrix to the register in a first storage space order; 所述针对所述寄存器中的所述第一矩阵的数据,执行多次读取操作,包 括:Performing a plurality of read operations on the data of the first matrix in the register, including: 按照第二存储空间顺序,针对所述寄存器中的所述第一矩阵的数据,执行多次读取操作。A plurality of read operations are performed for the data of the first matrix in the register in accordance with the second storage space order. 根据权利要求7所述的方法,其特征在于,所述第一存储空间顺序为按所述寄存器的行进行写入的顺序,所述第二存储空间顺序是按所述寄存器的列进行读取的顺序。The method according to claim 7, wherein said first storage space order is an order of writing in a row of said register, said second storage space order being read in a column of said register order of. 根据权利要求8所述的方法,其特征在于,在针对所述第一矩阵的每次写入操作中,在所述寄存器的一行写入所述第一矩阵的数据;和/或The method of claim 8 wherein, in each write operation for said first matrix, data of said first matrix is written in a row of said register; and/or 所述每次读取操作读取所述寄存器的一列数据。The read operation reads a column of data of the register. 根据权利要求7所述的方法,其特征在于,所述第一存储空间顺序为按所述寄存器的列进行写入的顺序,所述第二存储空间顺序是按所述寄存器的行进行读取的顺序。The method according to claim 7, wherein said first storage space order is an order of writing in a column of said register, said second storage space order being read in a row of said register order of. 根据权利要求10所述的方法,其特征在于,在针对所述第一矩阵的每次写入操作中,在所述寄存器的一列写入所述第一矩阵的数据;和/或,所述每次读取操作读取所述寄存器的一行数据。The method according to claim 10, wherein in each write operation for said first matrix, data of said first matrix is written in a column of said register; and/or said Each row of data reads a row of the register. 根据权利要求1至11中任一项所述的方法,其特征在于,在所述每次读取操作之后,在所述寄存器中的目标写入位置,写入第二矩阵的至少一个数据,包括:The method according to any one of claims 1 to 11, wherein at least one data of the second matrix is written at a target write position in the register after the each read operation, include: 在所述读取操作之后的同一时钟周期,在所述寄存器中的所述目标写入位置,写入所述第二矩阵的至少一个数据。At least one of the data of the second matrix is written at the target write location in the register for the same clock cycle after the read operation. 根据权利要求1至12中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 12, further comprising: 在针对所述第一矩阵的数据执行所述每次读取操作时,记录读取位置;Recording the read position when performing the each read operation on the data of the first matrix; 将记录的所述读取位置,确定为用于写入所述第二矩阵的数据的所述目标写入位置。The read position of the record is determined as the target write position of data for writing to the second matrix. 根据权利要求1至13中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 13, wherein the method further comprises: 基于当前写入操作次数,查找第一表项,以确定用于写入所述第二矩阵的数据的所述目标写入位置,所述第一表项指示至少一个写入操作次数与至少一个写入位置的对应关系。Finding the first entry to determine the target write location for writing data of the second matrix based on a current number of write operations, the first entry indicating at least one write operation and at least one The correspondence of the write locations. 根据权利要求14所述的方法,其特征在于,所述第一表项指示单 次写入循环中,至少一个写入操作次数与至少一个写入位置的对应关系;其中,The method according to claim 14, wherein the first entry indicates a correspondence between the number of at least one write operation and at least one write position in a single write cycle; 对于不同次写入循环,同一写入操作次数对应的写入位置相同。For different write cycles, the write position corresponding to the same number of write operations is the same. 根据权利要求15所述的方法,其特征在于,在同次写入循环中,不同的写入操作次数对应的写入位置不同。The method according to claim 15, wherein in the same write cycle, the write positions corresponding to different number of write operations are different. 根据权利要求1至16中任一项所述的方法,其特征在于,针对所述寄存器中的所述第一矩阵的数据,按执行多次读取操作,包括:The method according to any one of claims 1 to 16, wherein performing a plurality of read operations for the data of the first matrix in the register comprises: 在针对所述第一矩阵执行所述每次读取操作时,基于当前读取操作次数,查找第二表项,以确定目标读取位置,所述第二表项指示至少一个读取操作次数与至少一个读取位置的对应关系;When performing the each read operation for the first matrix, searching for a second entry to determine a target read location based on the current number of read operations, the second entry indicating at least one read operation Correspondence with at least one reading position; 基于所述目标读取位置,执行所述每次读取操作。The each read operation is performed based on the target read position. 根据权利要求17所述的方法,其特征在于,所述第二表项指示单次读取循环中,至少一个读取操作次数与至少一个读取位置的对应关系;其中,The method according to claim 17, wherein the second entry indicates a correspondence between the number of at least one read operation and the at least one read position in a single read cycle; 对于不同次读取循环,同一读取操作次数对应的读取位置相同。For different read cycles, the same read operation corresponds to the same read position. 根据权利要求17所述的方法,其特征在于,在同次读取循环中,不同的读取操作次数对应的读取位置不同。The method according to claim 17, wherein in the same reading cycle, the reading positions corresponding to the different number of reading operations are different. 根据权利要求1至19中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 19, further comprising: 在所述目标写入位置,写入所述第二矩阵的数据之前,确定所述目标写入位置中的数据已经被读取。At the target write position, before writing the data of the second matrix, it is determined that the data in the target write location has been read. 根据权利要求1至20中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 20, wherein the method further comprises: 在第一次读取操作之前,确定所述第一矩阵的第一次待读取的数据已经被写入。Before the first read operation, it is determined that the first data to be read of the first matrix has been written. 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method of claim 21, wherein the method further comprises: 在第一次读取操作之后的每次读取操作之前,确定当前次待读取的数据已经被写入。Before each read operation after the first read operation, it is determined that the data to be read currently has been written. 根据权利要求21或22所述的方法,其特征在于,所述确定所述第一矩阵的待读取的数据已经被写入,包括:The method according to claim 21 or 22, wherein the determining that the data to be read of the first matrix has been written comprises: 根据针对所述第一矩阵已执行的写入操作次数,确定所述第一矩阵的待 读取的数据已经被写入。It is determined that the data to be read of the first matrix has been written according to the number of write operations that have been performed for the first matrix. 根据权利要求1至23中任一项所述的方法,其特征在于,所述第一矩阵的行数等于所述第二矩阵的行数,所述第一矩阵的列数等于所述第二矩阵的列数。The method according to any one of claims 1 to 23, wherein the number of rows of the first matrix is equal to the number of rows of the second matrix, and the number of columns of the first matrix is equal to the second The number of columns in the matrix. 根据权利要求1至24中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 24, wherein the method further comprises: 针对所述寄存器中的所述第二矩阵的数据,执行多次读取操作,其中,每次读取操作读取所述第二矩阵至少一个数据;Performing a plurality of read operations on data of the second matrix in the register, wherein each read operation reads at least one data of the second matrix; 在所述每次读取操作之后,在所述寄存器中的目标写入位置,写入第三矩阵的至少一个数据,其中,所述目标写入位置为所述每次读取操作的读取位置。Writing at least one data of the third matrix at the target write position in the register after the each read operation, wherein the target write position is the read of the read operation position. 一种控制器,其特征在于,包括写入单元和读取单元;其中,A controller, comprising: a writing unit and a reading unit; wherein 所述写入单元用于:将第一矩阵中的数据写入寄存器;The writing unit is configured to: write data in the first matrix into a register; 所述读取单元用于:针对所述寄存器中的所述第一矩阵的数据,执行多次读取操作,其中,每次读取操作读取至少一个数据;The reading unit is configured to: perform a plurality of read operations on data of the first matrix in the register, wherein each read operation reads at least one data; 所述写入单元进一步用于:在所述每次读取操作之后,在所述寄存器中的目标写入位置,写入第二矩阵的至少一个数据,其中,所述目标写入位置为所述每次读取操作的读取位置。The writing unit is further configured to: after the each read operation, write at least one data of the second matrix at a target write position in the register, wherein the target write location is The reading position of each read operation. 根据权利要求26所述的控制器,其特征在于,所述写入单元进一步用于:针对所述第一矩阵的数据,按照第一数据顺序,将所述第一矩阵中的数据写入所述寄存器;The controller according to claim 26, wherein the writing unit is further configured to: write data in the first matrix according to a first data order for data of the first matrix Register 所述读取单元进一步用于:The reading unit is further configured to: 针对所述寄存器中的所述第一矩阵的数据,按照第二数据顺序,执行所述多次读取操作。The plurality of read operations are performed in accordance with the second data order for the data of the first matrix in the register. 根据权利要求27所述的控制器,其特征在于,所述第一数据顺序为按矩阵的行进行写入的顺序,所述第二数据顺序是按矩阵的列进行读取的顺序。The controller according to claim 27, wherein said first data order is an order of writing in rows of a matrix, and said second data order is an order of reading in columns of a matrix. 根据权利要求28所述的控制器,其特征在于,在针对所述第一矩阵的每次写入操作中,所述写入单元写入所述第一矩阵的一行数据;和/或,所述读取单元在所述每次读取操作过程中,读取所述第一矩阵的一列数据。The controller according to claim 28, wherein in each write operation for said first matrix, said write unit writes one row of data of said first matrix; and/or The reading unit reads a column of data of the first matrix during the each reading operation. 根据权利要求27所述的控制器,其特征在于,所述第一数据顺序为按矩阵的列进行写入的顺序,所述第二数据顺序是按矩阵的行进行读取的顺序。The controller according to claim 27, wherein said first data order is an order of writing in a matrix of columns, and said second data order is an order of reading in a row of a matrix. 根据权利要求30所述的控制器,其特征在于,在针对所述第一矩阵的每次写入操作中,所述写入单元写入所述第一矩阵的一列数据;和/或,所述读取单元在所述每次读取操作的过程中,读取所述第一矩阵的一行数据。The controller according to claim 30, wherein in each write operation for said first matrix, said write unit writes a column of data of said first matrix; and/or The reading unit reads a row of data of the first matrix during the each reading operation. 根据权利要求26所述的控制器,其特征在于,所述写入单元进一步用于:The controller according to claim 26, wherein said writing unit is further configured to: 按照第一存储空间顺序,将所述第一矩阵中的数据写入所述寄存器;Writing data in the first matrix to the register in a first storage space order; 所述读取单元进一步用于:The reading unit is further configured to: 按照第二存储空间顺序,针对所述寄存器中的所述第一矩阵的数据,执行多次读取操作。A plurality of read operations are performed for the data of the first matrix in the register in accordance with the second storage space order. 根据权利要求32所述的控制器,其特征在于,所述第一存储空间顺序为按所述寄存器的行进行写入的顺序,所述第二存储空间顺序是按所述寄存器的列进行读取的顺序。The controller according to claim 32, wherein said first storage space order is an order of writing in a row of said register, said second storage space order being read in a column of said register The order of taking. 根据权利要求33所述的控制器,其特征在于,在针对所述第一矩阵的每次写入操作中,所述写入单元在所述寄存器的一行写入所述第一矩阵的数据;和/或The controller according to claim 33, wherein in each write operation for said first matrix, said writing unit writes data of said first matrix in one row of said register; and / or 所述读取单元在所述每次读取操作的过程中,读取所述寄存器的一列数据。The reading unit reads a column of data of the register during the each read operation. 根据权利要求32所述的控制器,其特征在于,所述第一存储空间顺序为按所述寄存器的列进行写入的顺序,所述第二存储空间顺序是按所述寄存器的行进行读取的顺序。The controller according to claim 32, wherein said first storage space order is an order of writing in a column of said register, said second storage space order being read in a row of said register The order of taking. 根据权利要求35所述的控制器,其特征在于,在针对所述第一矩阵的每次写入操作中,所述写入单元在所述寄存器的一列写入所述第一矩阵的数据;和/或,The controller according to claim 35, wherein in each write operation for said first matrix, said write unit writes data of said first matrix in a column of said register; and / or, 所述读取单元在所述每次读取操作的过程中,读取所述寄存器的一行数据。The reading unit reads a row of data of the register during the each read operation. 根据权利要求26至36中任一项所述的控制器,其特征在于,所述写入单元进一步用于:The controller according to any one of claims 26 to 36, wherein the writing unit is further configured to: 在所述读取操作之后的同一时钟周期,在所述寄存器中的所述目标写入位置,写入所述第二矩阵的至少一个数据。At least one of the data of the second matrix is written at the target write location in the register for the same clock cycle after the read operation. 根据权利要求26至37中任一项所述的控制器,其特征在于,所述读取单元进一步用于:The controller according to any one of claims 26 to 37, wherein the reading unit is further configured to: 在针对所述第一矩阵的数据执行所述每次读取操作时,记录读取位置;Recording the read position when performing the each read operation on the data of the first matrix; 所述写入单元进一步用于:将记录的所述读取位置,确定为用于写入所述第二矩阵的数据的所述目标写入位置。The writing unit is further configured to: determine the read position of the record as the target write position for writing data of the second matrix. 根据权利要求26至38中任一项所述的控制器,其特征在于,所述写入单元进一步用于:The controller according to any one of claims 26 to 38, wherein the writing unit is further configured to: 基于当前写入操作次数,查找第一表项,以确定用于写入所述第二矩阵的数据的所述目标写入位置,所述第一表项指示至少一个写入操作次数与至少一个写入位置的对应关系。Finding the first entry to determine the target write location for writing data of the second matrix based on a current number of write operations, the first entry indicating at least one write operation and at least one The correspondence of the write locations. 根据权利要求39所述的控制器,其特征在于,所述第一表项指示单次写入循环中,至少一个写入操作次数与至少一个写入位置的对应关系;其中,The controller according to claim 39, wherein the first entry indicates a correspondence between the number of at least one write operation and the at least one write position in a single write cycle; 对于不同次写入循环,同一写入操作次数对应的写入位置相同。For different write cycles, the write position corresponding to the same number of write operations is the same. 根据权利要求40所述的控制器,其特征在于,在同次写入循环中,不同的写入操作次数对应的写入位置不同。The controller according to claim 40, wherein in the same write cycle, the write positions corresponding to the different number of write operations are different. 根据权利要求26至41中任一项所述的控制器,其特征在于,所述读取单元进一步用于:The controller according to any one of claims 26 to 41, wherein the reading unit is further configured to: 在针对所述第一矩阵执行所述每次读取操作时,基于当前读取操作次数,查找第二表项,以确定目标读取位置,所述第二表项指示至少一个读取操作次数与至少一个读取位置的对应关系;When performing the each read operation for the first matrix, searching for a second entry to determine a target read location based on the current number of read operations, the second entry indicating at least one read operation Correspondence with at least one reading position; 基于所述目标读取位置,执行所述每次读取操作。The each read operation is performed based on the target read position. 根据权利要求42所述的控制器,其特征在于,所述第二表项指示单次读取循环中,至少一个读取操作次数与至少一个读取位置的对应关系;其中,The controller according to claim 42, wherein the second entry indicates a correspondence between the number of at least one read operation and the at least one read position in a single read cycle; 对于不同次读取循环,同一读取操作次数对应的读取位置相同。For different read cycles, the same read operation corresponds to the same read position. 根据权利要求42所述的控制器,其特征在于,在同次读取循环中,不同的读取操作次数对应的读取位置不同。The controller according to claim 42, wherein in the same reading cycle, the reading positions corresponding to the different number of reading operations are different. 根据权利要求26至44中任一项所述的控制器,其特征在于,所述 写入单元进一步用于:The controller according to any one of claims 26 to 44, wherein the writing unit is further configured to: 在所述目标写入位置,写入所述第二矩阵的数据之前,确定所述目标写入位置中的数据已经被读取。At the target write position, before writing the data of the second matrix, it is determined that the data in the target write location has been read. 根据权利要求26至45中任一项所述的控制器,其特征在于,所述读取单元进一步用于:The controller according to any one of claims 26 to 45, wherein the reading unit is further configured to: 在第一次读取操作之前,确定所述第一矩阵的第一次待读取的数据已经被写入。Before the first read operation, it is determined that the first data to be read of the first matrix has been written. 根据权利要求46所述的控制器,其特征在于,所述读取单元进一步用于:The controller according to claim 46, wherein said reading unit is further configured to: 在第一次读取操作之后的每次读取操作之前,确定当前次待读取的数据已经被写入。Before each read operation after the first read operation, it is determined that the data to be read currently has been written. 根据权利要求46或47所述的控制器,其特征在于,所述读取单元进一步用于:The controller according to claim 46 or 47, wherein the reading unit is further configured to: 根据针对所述第一矩阵已执行的写入操作次数,确定所述第一矩阵的待读取的数据已经被写入。It is determined that the data to be read of the first matrix has been written according to the number of write operations that have been performed for the first matrix. 根据权利要求26至48中任一项所述的控制器,其特征在于,所述第一矩阵的行数等于所述第二矩阵的行数,所述第一矩阵的列数等于所述第二矩阵的列数。The controller according to any one of claims 26 to 48, wherein the number of rows of the first matrix is equal to the number of rows of the second matrix, and the number of columns of the first matrix is equal to the number of The number of columns in the two matrix. 根据权利要求26至49中任一项所述的控制器,其特征在于,所述读取单元进一步用于:The controller according to any one of claims 26 to 49, wherein the reading unit is further configured to: 针对所述寄存器中的所述第二矩阵的数据,执行多次读取操作,其中,每次读取操作读取所述第二矩阵至少一个数据;Performing a plurality of read operations on data of the second matrix in the register, wherein each read operation reads at least one data of the second matrix; 所述写入单元进一步用于:在所述每次读取操作之后,在所述寄存器中的目标写入位置,写入第三矩阵的至少一个数据,其中,所述目标写入位置为所述每次读取操作的读取位置。The writing unit is further configured to: after the each read operation, write at least one data of the third matrix at a target write position in the register, wherein the target write location is The reading position of each read operation. 一种数据处理设备,其特征在于,包括如权利要求26至50中任一项所述的控制器以及寄存器;其中,A data processing device, comprising: the controller and the register according to any one of claims 26 to 50; wherein 所述控制器用于向所述寄存器中写入数据以及读取所述寄存器中的数据。The controller is operative to write data to the register and to read data in the register. 根据权利要求51所述的设备,其特征在于,所述数据处理设备为中央处理单元CPU。The device according to claim 51, characterized in that the data processing device is a central processing unit CPU.
PCT/CN2018/080938 2018-03-28 2018-03-28 Data processing method and device Ceased WO2019183849A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/080938 WO2019183849A1 (en) 2018-03-28 2018-03-28 Data processing method and device
CN201880012520.0A CN110337637B (en) 2018-03-28 2018-03-28 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/080938 WO2019183849A1 (en) 2018-03-28 2018-03-28 Data processing method and device

Publications (1)

Publication Number Publication Date
WO2019183849A1 true WO2019183849A1 (en) 2019-10-03

Family

ID=68062516

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/080938 Ceased WO2019183849A1 (en) 2018-03-28 2018-03-28 Data processing method and device

Country Status (2)

Country Link
CN (1) CN110337637B (en)
WO (1) WO2019183849A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986200A (en) * 2021-10-29 2022-01-28 上海阵量智能科技有限公司 Matrix transposition circuit, artificial intelligence chip and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882061A (en) * 2009-05-08 2010-11-10 富士通株式会社 Memory control method and memory control device
CN103413569A (en) * 2013-07-22 2013-11-27 华为技术有限公司 1 read and 1 write static random access memory
CN104484128A (en) * 2014-11-27 2015-04-01 盛科网络(苏州)有限公司 Read-once and write-once storage based read-more and write more storage and implementation method thereof
CN105447810A (en) * 2015-11-17 2016-03-30 上海兆芯集成电路有限公司 Relevance checking method of data unit and device using the method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4097852B2 (en) * 1999-08-26 2008-06-11 株式会社フィリップスエレクトロニクスジャパン Data writing / reading method, deinterleaving method, data processing method, memory, and memory driving device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882061A (en) * 2009-05-08 2010-11-10 富士通株式会社 Memory control method and memory control device
CN103413569A (en) * 2013-07-22 2013-11-27 华为技术有限公司 1 read and 1 write static random access memory
CN104484128A (en) * 2014-11-27 2015-04-01 盛科网络(苏州)有限公司 Read-once and write-once storage based read-more and write more storage and implementation method thereof
CN105447810A (en) * 2015-11-17 2016-03-30 上海兆芯集成电路有限公司 Relevance checking method of data unit and device using the method

Also Published As

Publication number Publication date
CN110337637B (en) 2021-07-30
CN110337637A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
TWI644208B (en) Backward compatibility by restriction of hardware resources
TWI808869B (en) Hardware processor and processor
CN103890856B (en) Support the removable bit memory of store data inside structure
US6665747B1 (en) Method and apparatus for interfacing with a secondary storage system
TW201347409A (en) Boolean logic in a state machine lattice
CN111796759B (en) Computer-readable storage medium and method for reading fragment data on multiple planes
JP2016515262A (en) Elimination of redundant synchronization barrier in instruction processing circuit and associated processor system, method and computer readable medium
CN110286856B (en) Volume cloning method, volume cloning device, electronic equipment and machine-readable storage medium
CN111208933A (en) Data access method, apparatus, device and storage medium
US20160048455A1 (en) Memory Data Transfer Method and System
US11698871B2 (en) Method for PRP/SGL handling for out-of-order NVME controllers
WO2021143049A1 (en) Read-write method and apparatus, electronic device, and readable storage medium
CN113646744A (en) Widen memory accesses to aligned addresses for unaligned memory operations
WO2019183849A1 (en) Data processing method and device
CN105447043B (en) Database and its data access method
WO2024113838A1 (en) Processor setting method and apparatus, electronic device, and storage medium
JP2000029690A (en) Method and device for data processing
CN111984554B (en) Data processing method and device
US20240281255A1 (en) Super-thread processor
JP4494950B2 (en) Table switching program and computer system
JP2004021896A (en) Cache fill control method and cpu
TW202509787A (en) Memory device and operating method thereof and non-transitory computer-readable storage medium
JP2536651B2 (en) Exception address buffer management method
CN116627876A (en) Address remapping method, device, equipment and storage medium
CN103294736A (en) Graphics processing unit and graphics data access method thereof

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

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

Country of ref document: EP

Kind code of ref document: A1