Mutual connection control circuit

The interconnection control circuit addresses the scalability and processing time issues of neural networks by using a SWAP circuit to rearrange error information efficiently, achieving high-speed and versatile processing with minimal circuit changes.

JP2024158857AActive Publication Date: 2024-11-08MAVIS DESIGN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023074432
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-11-08
Estimated Expiration
2043-04-28

AI Technical Summary

Technical Problem

Existing neural network implementations in hardware face challenges with large parameter storage space requirements, leading to increased circuit scale, longer processing times, and reduced versatility due to the need for multiple registers and RAM, which are exacerbated by the number of neurons in the network.

Method used

An interconnection control circuit that utilizes a SWAP circuit with first and second holding circuits and a transfer circuit to rearrange error information between layers, allowing simultaneous reading and writing across memory regions, reducing the need for additional circuit changes and minimizing processing time.

Benefits of technology

The solution enables high-speed processing with a small-scale and versatile device configuration, reducing processing time and circuit scale while maintaining flexibility for varying matrix sizes without altering the hardware configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024158857000001_ABST
    Figure 2024158857000001_ABST
Patent Text Reader

Abstract

To provide a small-scale and versatile device configuration that can increase the speed of processing.SOLUTION: Provided is a mutual connection control circuit 1 that transfers error information from neurons of a post-stage layer to neurons of a pre-stage layer, including: a first holding circuit 51 having memories for the number of the neurons of the pre-stage layer and configured to store the error information received from the neurons of the post-stage layer in association with a first address indicating a read address of the memories for the number of the neurons of the pre-stage layer; a second holding circuit 54 having memories for the number of the neurons of the post-stage layer and configured to store the error information to be output to the neurons of the pre-stage layer in association with a second address indicating a write address of the memories for the number of the neurons of the post-stage layer; and a transfer circuit 50 that, per predetermined control cycle, shifts the first address to read the error information from each of the memories of the first holding circuit and shifts the second address to relocate the read error information and write the error information into each of the memories of the second holding circuit.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an interconnection control circuit that stores parameters in a memory and constructs a neural network. [Background technology]

[0002] Machine learning is generally considered a type of artificial intelligence (AI) that is a computer algorithm that automatically improves by learning from experience. By training using data called "training data," the algorithm can automatically learn parameters that are difficult to specify in a program, and use the learning results to perform a desired task.

[0003] Machine learning requires a huge amount of training data, and it requires a lot of effort to collect it. Therefore, training using cloud-based AI has become mainstream. With cloud-based AI, data collected by edge devices is first sent to the cloud, where AI processing is performed, and the data is then sent back to the edge devices.

[0004] Machine learning algorithms using neural networks are used as a method to realize edge AI. Neural networks are algorithms created with the aim of imitating the structure and function of neural networks, and are made by connecting mathematically modeled nerve cells (neurons) to a network structure.

[0005] When implementing a typical interconnected neural network in hardware, there is a problem in that each neuron has multiple parameters, and as the number of neurons increases, the parameter storage area relative to the circuit size becomes enormous.

[0006] Therefore, when implementing neural networks in hardware, the scale was too large and it was not suitable for building large-scale neural networks.

[0007] Therefore, it is possible to store the parameters in memory and build a neural network. In this case, it is necessary to read out the error information of the neurons in the subsequent layer from the memory, so it is necessary to read out the error information as many times as there are neurons in the subsequent layer. If there are five neurons in the subsequent layer, five cycles are required.

[0008] Patent Document 1 discloses a technique for speeding up the cycle of reading out error information of a neuron, in which a SWAP circuit is used to rearrange data, thereby speeding up the readout process. [Prior art documents] [Patent documents]

[0009] [Patent Document 1] Special Publication No. 2018-534666 Summary of the Invention [Problem to be solved by the invention]

[0010] However, in the technology described in Patent Document 1, for example, as shown in FIG. 10C of Patent Document 1, replacement circuit 1001 includes registers 1002, 1004, 1006, and 1008, where register 1002 has input lines coupled to receive bytes b0, b4, b8, and b12 of the cache line, register 1004 has input lines coupled to receive bytes b1, b5, b9, and b13 of the cache line, register 1006 has input lines coupled to receive bytes b2, b6, b10, and b14 of the cache line, and register 1008 has input lines coupled to receive bytes b3, b7, b11, and b15 of the cache line.

[0011] In the technique described in Patent Document 1, a 4x4 matrix is ​​transposed, but in this case, a total of eight cycles are required: four cycles for writing and four cycles for reading.

[0012] In this way, the number of registers and RAMs must be increased according to the size of the matrix, and the associated signal lines also increase, so the circuit scale increases in proportion to the size of the matrix, resulting in an increase in manufacturing costs. In addition, since the process involves writing all the data to be rearranged to the registers and RAMs and then reading them out, a large number of cycles are required, resulting in a problem of increased processing time in proportion to the size of the matrix. In addition, the number of registers and RAMs must be increased according to the size of the matrix, and the circuit configuration must be changed, resulting in a problem of lack of versatility.

[0013] SUMMARY OF THE PRESENT EMBODIMENT The present invention has been made in consideration of the above problems, and has an object to provide an interconnection control circuit that has a small-scale and versatile device configuration and enables high-speed processing. [Means for solving the problem]

[0014] In order to achieve the above object, a first feature of the interconnection control circuit according to the present invention is: an interconnection control circuit for transferring error information from the neurons in the subsequent layer to the neurons in the previous layer, a first holding circuit having memories corresponding to the number of neurons in the previous layer, the first holding circuit storing error information input from the neurons in the next layer in correspondence with a first address indicating a read address of the memories corresponding to the number of neurons in the previous layer; a second holding circuit having memories corresponding to the number of neurons in the latter layer, the second holding circuit storing error information to be output to the neurons in the former layer in correspondence with a second address indicating a write address of the memories corresponding to the number of neurons in the latter layer; a transfer circuit which reads the error information from each memory of the first holding circuit by shifting the first address at each specified control period, and which rearranges the read error information and writes it to each memory of the second holding circuit by shifting the second address.

[0015] A second feature of the interconnection control circuit according to the present invention is The memory of the first holding circuit is divided into areas so as to be able to store data corresponding to the number of neurons in the subsequent layer, the memory of the second holding circuit is divided into areas so as to be able to store data corresponding to the number of neurons in the previous layer, The transfer circuit rearranges the read error information so that data stored in the same area of ​​each memory of the first holding circuit is stored in the same memory of the second holding circuit.

[0016] A third feature of the interconnection control circuit according to the present invention is When the data stored in the areas at the same location in each memory of the second holding circuit are all collected by writing using the transfer circuit, the data stored in the areas at the same location written by the previous layer is read out.

[0017] A fourth feature of the interconnection control circuit according to the present invention is When the data stored in the areas at the same location in each memory of the second holding circuit is completed by writing by the transfer circuit, and when a preset threshold time has elapsed, the data stored in the areas at the same location written by the previous layer is read out.

[0018] A fifth feature of the interconnection control circuit according to the present invention is a connection information storage unit that stores a connection state between the previous layer and the subsequent layer as connection information; The transfer circuit includes: At each predetermined control period, the error information is read from each memory of the first holding circuit by shifting the first address based on the connection information, and the read error information is rearranged and written to each memory of the second holding circuit by shifting the second address based on the connection information. Effect of the Invention

[0019] The interconnection control circuit according to the present invention can achieve high-speed processing with a small-scale, versatile device configuration. [Brief description of the drawings]

[0020] [Figure 1] FIG. 2 is a configuration diagram of an interconnection control circuit according to the first embodiment of the present invention. [Diagram 2] FIG. 4 is an explanatory diagram for explaining a schematic rearrangement of error information in the interconnection control circuit according to the first embodiment of the present invention. [Diagram 3] FIG. 4 is an explanatory diagram for explaining a data flow when rearranging error information in the interconnection control circuit according to the first embodiment of the present invention; [Figure 4] 4 is a timing chart showing an operation of the first holding circuit of the interconnection control circuit according to the first embodiment of the present invention. [Diagram 5] 5 is a timing chart showing an operation of the second holding circuit of the interconnection control circuit according to the first embodiment of the present invention. [Figure 6] FIG. 2 is a configuration diagram of an interconnection control circuit according to the first embodiment of the present invention. [Figure 7] 5. (a) is a timing chart showing, for comparison, the operation of the second holding circuit of the interconnection control circuit according to Example 1 of the present invention, similar to FIG. 5, and (b) is a timing chart showing the operation of the second holding circuit of the interconnection control circuit according to Example 2 of the present invention. [Figure 8] FIG. 11 is a configuration diagram of an interconnection control circuit according to a third embodiment of the present invention. [Figure 9] 1A is a diagram illustrating a schematic diagram of the data flow when rearranging error information in an interconnection control circuit according to a first embodiment of the present invention, and FIG. 1B is a diagram illustrating a schematic diagram of the data flow when rearranging error information in an interconnection control circuit according to a third embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0021] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The same or equivalent parts and components are designated by the same or equivalent reference numerals throughout the drawings. However, it should be noted that the drawings are schematic and may differ from the actual product. In addition, the drawings may include parts with different dimensional relationships and ratios.

[0022] The embodiments described below are merely examples of devices for embodying the technical idea of ​​the present invention, and the technical idea of ​​the present invention does not limit the arrangement of each component to that described below. Various modifications can be made to the technical idea of ​​the present invention within the scope of the claims.

[0023] <Example 1> FIG. 1 is a configuration diagram of an interconnection control circuit according to a first embodiment of the present invention. As shown in Fig. 1, an interconnection control circuit 1 according to a first embodiment of the present invention has an architecture using a spiking neural network that stores parameters in a memory to construct a neural network. The interconnection control circuit 1 includes a control unit 3, an output layer 4, a swap circuit 5, an intermediate layer 6, and an input layer 7, and the control unit 3, the output layer 4, the intermediate layer 6, and the input layer 7 are connected to a bus via a bus interface 2.

[0024] The input layer 7, where information is input, the output layer 4, where information is transmitted, and the intermediate layer 6 between them each contain multiple neurons that are mathematical models of the nerve cells in the human brain, and are each connected to neurons in the adjacent layers.

[0025] The interconnection control circuit 1 reuses one neuron circuit by storing the parameters of each neuron in memory. To achieve this, it is necessary to read the error information of the neurons in the subsequent layer and write it to the previous layer. When backpropagating the error information from the output layer 4 to the intermediate layer 6 during learning, it is necessary to rearrange the data so that the necessary data can be read simultaneously during pipeline processing of the intermediate layer 6.

[0026] Therefore, the interconnection control circuit 1 has a SWAP circuit 5 in order to appropriately read out the error information of the neurons in the subsequent layer, rearrange the data, and write it appropriately to the previous layer. Here, the previous layer is described as the middle layer 6, and the subsequent layer is described as the output layer 4, but this is not limiting, and it is also possible to apply the previous and subsequent layers as the middle layer 6, or to apply the previous layer as the input layer 7 and the subsequent layer as the middle layer 6.

[0027] The SWAP circuit 5 includes a first holding circuit 51, a first shift register 52, a first counter 53, a second holding circuit 54, a second shift register 55, and a second counter 56. Among these, the first shift register 52, the first counter 53, the second shift register 55, and the second counter 56 are referred to as a transfer circuit 50.

[0028] The first holding circuit 51 has memory for the number of neurons in the intermediate layer 6, which is the previous layer, and stores error information input from neurons in the output layer 4, which is the subsequent layer, in correspondence with a first address indicating the read address of memory for the number of neurons in the intermediate layer 6.

[0029] The first shift register 52 shifts the first address counted by the first counter 53 to cause the error information data to be read out from the memory of the first holding circuit 51 .

[0030] The first counter 53 counts the first address which is a read address to the first holding circuit 51 .

[0031] The second holding circuit 54 has memory for the number of neurons in the output layer 4, which is the subsequent layer, and stores error information data to be output to neurons in the intermediate layer 6, which is the previous layer, in correspondence with a second address indicating the write address of memory for the number of neurons in the output layer 4.

[0032] The second shift register 55 can write error information into the memory of the second holding circuit 54 by shifting the second address counted by the second counter 56 .

[0033] The second counter 56 counts the second address which is the write address to the second holding circuit 54 .

[0034] The transfer circuit 50 has a first shift register 52, a first counter 53, a second shift register 55, and a second counter 56, and can read error information from each memory of the first holding circuit 51 by shifting the first address at each predetermined control period, and can rearrange the read error information and write it to each memory of the second holding circuit 54 by shifting the second address.

[0035] Fig. 2 is an explanatory diagram for explaining a schematic diagram of rearrangement of error information in the interconnection control circuit 1 according to the first embodiment of the present invention. In Fig. 2, the previous layer is the middle layer 6, the next layer is the output layer 4, and an example will be explained in which error information from the output layer 4 is transferred to the middle layer 6. Here, it is assumed that the middle layer 6 has eight neurons, and the output layer 4 has five neurons.

[0036] Since the hidden layer 6 has eight neurons, as shown in FIG. 2, the first holding circuit 51 has eight memories 511-518, which is the number of neurons in the hidden layer 6. The memories 511-518 are RAMs (Random Access Memory) and have readable and writable (accessible) storage areas. The memory 511 is divided into five areas 511a-511e so that each area can store data equal to the number of neurons in the output layer 4 (five in this case). The memories 512-518 are also divided into five areas, like the memory 511, so that each area can store data equal to the number of neurons in the output layer 4 (five in this case).

[0037] The first holding circuit 51 stores the error information input from the neurons in the output layer 4 in association with a first address indicating a read address of a memory for the number of neurons in the intermediate layer 6 (8 in this example).

[0038] 2, the second holding circuit 54 has five memories 541-545, which is the number of neurons in the output layer 4. The memories 541-545 are RAMs (Random Access Memory) and have readable and writable (accessible) storage areas. The memory 541 is divided into eight areas 541a-541h so that each area can store data for the number of neurons in the intermediate layer 6 (8 in this case). The memories 542-515 are also divided into eight areas, like the memory 541, so that each area can store data for the number of neurons in the intermediate layer 6 (8 in this case).

[0039] The second holding circuit 54 stores the error information to be output to the neurons in the hidden layer 6 in association with second addresses indicating write addresses of memories corresponding to the number of neurons in the output layer 4.

[0040] Fig. 3 is an explanatory diagram that illustrates a data flow in rearrangement of error information in the interconnection control circuit 1 according to the first embodiment of the present invention. From the left in Fig. 3, writing and reading of data at time t0 to time t7, which is a control period, is explained. The upper part of Fig. 3 shows the state of the first holding circuit 51, and the lower part shows the state of the second holding circuit 54, with the upper and lower parts showing the same point in time.

[0041] At time t0, the first holding circuit 51 stores error information for eight pieces of data from the output layer 4 in areas 511a to 518a.

[0042] At time t1, the first holding circuit 51 stores error information for eight data items from the output layer 4 in areas 511b to 518b (reference numerals 512b to 517b are omitted in FIG. 3, but the areas 512b to 517b are provided between the areas 511b and 518b). The transfer circuit 50 reads the data stored in the area 511a of the first holding circuit 51 based on the first address. The transfer circuit 50 then stores the read data in the area 541a of the second holding circuit 54 in association with the second address.

[0043] At time t2, the first holding circuit 51 stores error information for 8 data from the output layer 4 in areas 511c to 518c (reference numerals for 512c to 517c are omitted in FIG. 3, but the areas 512c to 517c are provided between the areas 511c and 518c). The transfer circuit 50 reads the data stored in the areas 512a and 511b of the first holding circuit 51 based on the first address by shifting the first address. The transfer circuit 50 stores the data stored in the area 512a of the first holding circuit 51 in the area 541b of the second holding circuit 54 by shifting the second address, and stores the data stored in the area 511b of the first holding circuit 51 in the area 542a of the second holding circuit 54 by shifting the second address.

[0044] At time t3, the first holding circuit 51 stores error information for eight data items from the output layer 4 in areas 511d to 518d (in FIG. 3, the reference symbols 512d to 517d are omitted, but the areas 512d to 517d are provided between the areas 511d and 518d). The transfer circuit 50 shifts the first address to read the data stored in the area 513a of the first holding circuit 51, the data stored in the area 512b of the first holding circuit 51, and the data stored in the area 511c of the first holding circuit 51, based on the first address. Then, the transfer circuit 50 stores the data stored in area 513a of the first holding circuit 51 in area 541c of the second holding circuit 54 by shifting the second address, stores the data stored in area 512b of the first holding circuit 51 in area 542b of the second holding circuit 54 by shifting the second address, and stores the data stored in area 511c of the first holding circuit 51 in area 543a of the second holding circuit 54 by shifting the second address.

[0045] At time t4, the first holding circuit 51 stores error information for 8 data from the output layer 4 in areas 511e to 518e (reference numerals for 512e to 517e are omitted in FIG. 3, but the areas 512e to 517e are provided between the areas 511e and 518e). The transfer circuit 50 shifts the first address to read the data stored in the area 514a of the first holding circuit 51, the data stored in the area 513b of the first holding circuit 51, the data stored in the area 512c of the first holding circuit 51, and the data stored in the area 511d of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 stores the data stored in region 514a of the first holding circuit 51 in region 541d of the second holding circuit 54 by shifting the second address, stores the data stored in region 513b of the first holding circuit 51 in region 542c of the second holding circuit 54 by shifting the second address, stores the data stored in region 512c of the first holding circuit 51 in region 543b of the second holding circuit 54 by shifting the second address, and stores the data stored in region 511d of the first holding circuit 51 in region 544a of the second holding circuit 54 by shifting the second address.

[0046] At time t5, the transfer circuit 50 shifts the first address to read the data stored in area 515a of the first holding circuit 51, the data stored in area 514b of the first holding circuit 51, the data stored in area 513c of the first holding circuit 51, the data stored in area 512d of the first holding circuit 51, and the data stored in area 511e of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 stores the data stored in region 515a of the first holding circuit 51 in region 541e of the second holding circuit 54 by shifting the second address, stores the data stored in region 514b of the first holding circuit 51 in region 542d of the second holding circuit 54 by shifting the second address, stores the data stored in region 513c of the first holding circuit 51 in region 543c of the second holding circuit 54 by shifting the second address, stores the data stored in region 512d of the first holding circuit 51 in region 544b of the second holding circuit 54 by shifting the second address, and stores the data stored in region 511e of the first holding circuit 51 in region 545a of the second holding circuit 54 by shifting the second address.

[0047] At time t6, the transfer circuit 50 shifts the first address to read the data stored in area 516a of the first holding circuit 51, the data stored in area 515b of the first holding circuit 51, the data stored in area 514c of the first holding circuit 51, the data stored in area 513d of the first holding circuit 51, and the data stored in area 512e of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 stores the data stored in region 516a of the first holding circuit 51 in region 542e of the second holding circuit 54 by shifting the second address, stores the data stored in region 515b of the first holding circuit 51 in region 543d of the second holding circuit 54 by shifting the second address, stores the data stored in region 514c of the first holding circuit 51 in region 544c of the second holding circuit 54 by shifting the second address, stores the data stored in region 513d of the first holding circuit 51 in region 545b of the second holding circuit 54 by shifting the second address, and stores the data stored in region 512e of the first holding circuit 51 in region 546a of the second holding circuit 54 by shifting the second address.

[0048] Furthermore, at time t6, the areas 541a to 545a of the second holding circuit 54 are memory areas of the same address (same position), and when all the data in the areas 541a to 545a are collected, it is determined that all the data stored in the areas of the memory of the second holding circuit 54 at the same address (same position) is collected, and the data in the areas 541a to 545a is read out and sent to the previous intermediate layer 6.

[0049] Thereafter, from time t7 onwards, at each predetermined control period, the first address is shifted to read error information from each memory of the first holding circuit 51, and the second address is shifted to rearrange the read error information and write it to each memory of the second holding circuit 54.

[0050] FIG. 4 is a timing chart showing the operation of the first holding circuit 51 of the interconnection control circuit 1 according to the first embodiment of the present invention.

[0051] As shown in FIG. 4, at time tp, "w_start", which is the start flag for the transfer of error information from the output layer 4 to the first holding circuit 51, is on.

[0052] After that, at time t0, the first holding circuit 51 starts storing error information for eight data items from the output layer 4, as shown in "we_WRAM".

[0053] At time t1, as shown in "dpra\WRAM[7:0] (read address)", the transfer circuit 50 reads the data stored in the area 511a of the first holding circuit 51 based on the first address. After that, the data is sequentially read based on the first address.

[0054] FIG. 5 is a timing chart showing the operation of the second holding circuit 54 of the interconnection control circuit 1 according to the first embodiment of the present invention.

[0055] As shown in FIG. 5, at time t1, the transfer circuit 50 starts storing the read data in the second holding circuit 54 in association with the second address, as indicated by "we\RRAM[0]&we_RRAM_word_sol."

[0056] At time t5, as shown in "r_start(L2LERN_start\3p)", a read flag is raised, and at time t6, the data from "we\RRAM[0]&we_RRAM_word_sol" to "we\RRAM[4]&we_RRAM_word_sol" is complete, so it is determined that the data stored in the area of ​​the same address (same position) of the memory of the second holding circuit 54 has been completed, and as shown in "r_RRAM", reading of the data begins and is sent to the previous intermediate layer 6.

[0057] In this manner, the interconnection control circuit 1 according to the first embodiment of the present invention comprises a first holding circuit 51 having a memory equal to the number of neurons in the previous layer and storing error information input from neurons in the subsequent layer in correspondence with a first address indicating a read address of the memory equal to the number of neurons in the previous layer, a second holding circuit 54 having a memory equal to the number of neurons in the subsequent layer and storing error information to be output to neurons in the previous layer in correspondence with a second address indicating a write address of the memory equal to the number of neurons in the subsequent layer, and a transfer circuit 50 which reads error information from each of the memories of the first holding circuit by shifting the first address at each predetermined control period and rearranges the read error information and writes it to each of the memories of the second holding circuit by shifting the second address.

[0058] As a result, unlike devices that transfer data such as error information using a single memory (RAM) as in conventional technology, data is simultaneously read from and written to the memory of the first holding circuit 51 in the memory of the second holding circuit 54, thereby reducing the time required to read and write data and suppressing degradation of processing time. In addition, even if the size of the matrix for data transfer, which is determined by the number of neurons in the previous layer and the number of neurons in the subsequent layer, is changed, only the memory configuration needs to be changed and there is no need to change other circuits. Therefore, the circuit configuration can be used for transposing (transferring data) a variety of matrices without changing, resulting in low dependency on hardware configuration and high versatility. Furthermore, even if the size of the matrix for data transfer, which is determined by the number of neurons in the previous layer and the number of neurons in the subsequent layer, is changed, only the memory size increases and other circuits remain unchanged, so the increase in circuit scale can be suppressed. As described above, the interconnection control circuit 1 according to the first embodiment of the present invention can achieve high-speed processing with a small-scale and versatile device configuration.

[0059] <Example 2> In the interconnection control circuit 1 according to the first embodiment of the present invention, when the data written by the transfer circuit 50 is stored in the same area of ​​the memory of the second holding circuit 54, the data stored in the same area written by the previous layer is read out, but this is not limited to the above.

[0060] In the second embodiment of the present invention, an interconnection control circuit 1 is taken as an example to explain a case where data stored in an area at the same location in the memory of the second holding circuit 54 is completed by writing data by the transfer circuit 50, and when a preset threshold time has elapsed, the data stored in the area at the same location written by the previous layer is read out.

[0061] FIG. 6 is a configuration diagram of an interconnection control circuit according to a second embodiment of the present invention. 6, the interconnection control circuit 1 according to the second embodiment of the present invention includes a control unit 3, an output layer 4, a SWAP circuit 5A, an intermediate layer 6, and an input layer 7, and the control unit 3, the output layer 4, the intermediate layer 6, and the input layer 7 are connected to a bus via a bus interface 2. In the second embodiment, only the SWAP circuit 5A is different from the above components, so the SWAP circuit 5A will be described.

[0062] The SWAP circuit 5A includes a first holding circuit 51, a second holding circuit 54, a transfer circuit 50A, and a threshold storage unit 57. Of these, the first holding circuit 51 and the second holding circuit 54 have the same configuration as the SWAP circuit 5 of the interconnection control circuit 1 of the first embodiment, and therefore a description thereof will be omitted.

[0063] The threshold value storage unit 57 stores a threshold value. This threshold value is a value set in order to adjust the timing at which data is sent to the intermediate layer 6, which is the previous layer.

[0064] Then, when the data stored in the areas at the same positions in each memory of the second holding circuit 54 are all filled up by the writing by the transfer circuit 50 and a preset threshold time has elapsed, the data stored in the areas at the same positions written by the intermediate layer 6, which is the previous layer, is read out. In other words, by setting a threshold, it is possible to adjust the timing, such as delaying the timing at which the data is read out by the intermediate layer 6.

[0065] The first holding circuit 51 and the second holding circuit 54 may have different characteristics depending on the semiconductor process used, such as a circuit that operates at high speed and a circuit that is small in area but operates only at low speed. If you want to reduce the chip area at all costs, there is an advantage in that costs can be reduced by delaying the timing of reading and using a small-area, low-speed memory (RAM).

[0066] For comparison, Figure 7(a) is a timing chart showing the operation of the second holding circuit 54 of the interconnection control circuit 1 according to Example 1 of the present invention, similar to Figure 5, and Figure 7(b) is a timing chart showing the operation of the second holding circuit 54 of the interconnection control circuit 1 according to Example 2 of the present invention.

[0067] In FIG. 7(a), as described above, at time t5, the read flag is raised as shown by "r_start(L2LERN_start\3p)", and at time t6, the data from "we\RRAM[0]&we_RRAM_word_sol" to "we\RRAM[4]&we_RRAM_word_sol" is complete, so it is determined that the data stored in the area of ​​the same address (same position) in the memory of the second holding circuit 54 has been completed, and reading of the data is started as shown by "r_RRAM", and it is sent to the previous intermediate layer 6.

[0068] On the other hand, in FIG. 7(b), at time t6, the data from “we\RRAM[0]&we_RRAM_word_sol” to “we\RRAM[4]&we_RRAM_word_sol” is available, but the set threshold time has not yet elapsed.

[0069] Then, at time t15, a read flag is raised, as shown in "r_start(L2LERN_start\3p)", and at time t16, it is determined that the set threshold time has elapsed, and data reading begins, as shown in "r_RRAM", and the data is sent to the previous intermediate layer 6.

[0070] In this way, in the second embodiment, the data stored in the same area of ​​each memory of the second holding circuit 54 is aligned by writing by the transfer circuit 50, and when a preset threshold time has elapsed, the data stored in the same area written by the intermediate layer 6, which is the previous layer, is read out, so that timing adjustments can be made, such as delaying the timing at which the data is read out by the intermediate layer 6.

[0071] <Example 3> The interconnection control circuit 1 according to the first embodiment of the present invention has been described with an example having an input layer 7, an output layer 4, and an intermediate layer 6, each connected to neurons in an adjacent layer, but is not limited to this.

[0072] In the third embodiment of the present invention, an interconnection control circuit 1 having an input layer 7, an output layer 4, and an intermediate layer 6, in which some neurons in adjacent layers are not connected, will be described as an example.

[0073] FIG. 8 is a configuration diagram of an interconnection control circuit according to a third embodiment of the present invention. 8, the interconnection control circuit 1 according to the third embodiment of the present invention includes a control unit 3, an output layer 4, a SWAP circuit 5B, an intermediate layer 6, and an input layer 7. Although not shown, similarly to the first embodiment, the control unit 3, the output layer 4, the intermediate layer 6, and the input layer 7 are connected to a bus via a bus interface 2. In the third embodiment, only the SWAP circuit 5B is different from the above components, and therefore the SWAP circuit 5B will be described.

[0074] The SWAP circuit 5B includes a first holding circuit 51, a second holding circuit 54, a transfer circuit 50B, and connection information storage units 58a and 58b. Of these, the first holding circuit 51 and the second holding circuit 54 have the same configuration as the SWAP circuit 5 of the interconnection control circuit 1 of the first embodiment, so a description thereof will be omitted.

[0075] The connection information storage units 58a and 58b store, as connection information, the connection state between the intermediate layer 6, which is the previous layer, and the output layer 4, which is the next layer. The connection information stored in the connection information storage units 58a and 58b is the same information. Here, the connection information storage units 58a and 58b exist as different storage units, but may be the same storage unit.

[0076] The output layer 4 has two neurons, 41 and 42, and the hidden layer 6 has five neurons, 61 to 65.

[0077] Neuron 41 is connected to all five neurons 61-65 in the hidden layer 6. On the other hand, neuron 42 is connected only to neurons 62 and 64 among the five neurons 61-65 in the hidden layer 6. In this way, the connection information indicates the connection state of each neuron between the hidden layer 6, which is the previous layer, and the output layer 4, which is the subsequent layer.

[0078] The transfer circuit 50B shifts the first address based on the connection information stored in the connection information storage unit 58a at each predetermined control period to read error information from each memory of the first holding circuit 51. Specifically, when the neuron is not connected, i.e., when there is no synapse, the transfer circuit 50B shifts the first address so as to skip an address to read error information from each memory of the first holding circuit 51.

[0079] Then, the transfer circuit 50B shifts the second address based on the connection information stored in the connection information storage unit 58b, thereby rearranging the read error information and writing it to each memory of the second holding circuit 54. Specifically, when the neuron is not connected, that is, when there is no synapse, the transfer circuit 50B shifts the second address so as to skip an address, rearranging the read error information and writing it to each memory of the second holding circuit 54.

[0080] FIG. 9(a) is an explanatory diagram that typically explains the data flow in the rearrangement of error information in the interconnection control circuit 1 according to the first embodiment of the present invention, and FIG. 9(b) is an explanatory diagram that typically explains the data flow in the rearrangement of error information in the interconnection control circuit 1 according to the third embodiment of the present invention. In FIG. 9(a) and (b), the writing and reading of data at the control period from time t20 to time t27 are explained in order from the left. In each of FIG. 9(a) and (b), the upper part shows the state of the first holding circuit 51, and the lower part shows the state of the second holding circuit 54, and the upper and lower parts show the same time. Here, the previous layer is the middle layer 6, the latter layer is the output layer 4, and an example in which error information from the output layer 4 is transferred to the middle layer 6 will be explained. Here, it is assumed that the middle layer 6 has five neurons, and the output layer 4 has two neurons.

[0081] As shown in FIG. 9(a), at time t20, the first holding circuit 51 stores error information for five pieces of data from the neuron 41 of the output layer 4 in areas 511a to 515a.

[0082] At time t21, the first holding circuit 51 stores two pieces of error information data from the neuron 42 of the output layer 4 in areas 512b and 514b. The transfer circuit 50 reads the data stored in the area 511a of the first holding circuit 51 based on the first address. The transfer circuit 50 then stores the read data in the area 541a of the second holding circuit 54 in association with the second address.

[0083] At time t22, the transfer circuit 50 shifts the first address to read the data stored in the area 512a of the first holding circuit 51 and the data stored in the area 511b of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 shifts the second address to store the data stored in the area 512a of the first holding circuit 51 in the area 541b of the second holding circuit 54, and shifts the second address to store the data stored in the area 511b of the first holding circuit 51 in the area 542a of the second holding circuit 54.

[0084] At time t23, the transfer circuit 50 shifts the first address to read the data stored in the area 513a of the first holding circuit 51 and the data stored in the area 512b of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 stores the data stored in the area 513a of the first holding circuit 51 in the area 541c of the second holding circuit 54 by shifting the second address, and stores the data stored in the area 512b of the first holding circuit 51 in the area 542b of the second holding circuit 54 by shifting the second address.

[0085] Also, at time t23, when all the data in the areas 541a to 542a, which are the memory areas at the same address (same position) of the second holding circuit 54, are collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 are collected, and the data in the areas 541a to 542a is read out and sent to the previous intermediate layer 6.

[0086] At time t24, the transfer circuit 50 shifts the first address to read the data stored in the area 514a of the first holding circuit 51 and the data stored in the area 513b of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 stores the data stored in the area 514a of the first holding circuit 51 in the area 541d of the second holding circuit 54 by shifting the second address, and stores the data stored in the area 513b of the first holding circuit 51 in the area 542c of the second holding circuit 54 by shifting the second address.

[0087] Furthermore, at time t24, when all the data in the areas 541b to 542b, which are the memory areas at the same address (same position) of the second holding circuit 54, are collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 are collected, and the data in the areas 541b to 542b is read out and sent to the previous intermediate layer 6.

[0088] At time t25, the transfer circuit 50 shifts the first address to read the data stored in the area 515a of the first holding circuit 51 and the data stored in the area 514b of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 stores the data stored in the area 515a of the first holding circuit 51 in the area 541e of the second holding circuit 54 by shifting the second address, and stores the data stored in the area 514b of the first holding circuit 51 in the area 542d of the second holding circuit 54 by shifting the second address.

[0089] Furthermore, at time t25, when all the data in the memory areas 541c to 542c at the same address (same position) of the second holding circuit 54 is collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 is collected, and the data in the areas 541c to 542c is read out and sent to the previous intermediate layer 6.

[0090] At time t26, the transfer circuit 50 shifts the first address to read the data stored in the area 515b of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 stores the data stored in the area 515b of the first holding circuit 51 in the area 542e of the second holding circuit 54 by shifting the second address.

[0091] Furthermore, at time t26, when all the data in the areas 541d to 542d, which are the memory areas at the same address (same position) of the second holding circuit 54, are collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 are collected, and the data in the areas 541d to 542d is read out and sent to the previous intermediate layer 6.

[0092] At time t27, when all the data in the areas 541e to 542e, which are the memory areas at the same address (same position) of the second holding circuit 54, are collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 are collected, and the data in the areas 541e to 542e is read out and sent to the previous intermediate layer 6.

[0093] As shown in FIG. 9(b), at time t20, the first holding circuit 51 stores error information for five pieces of data from the neuron 41 of the output layer 4 in areas 511a to 515a.

[0094] At time t21, the first holding circuit 51 stores two pieces of error information data from the neuron 42 of the output layer 4 in areas 512b and 514b. The transfer circuit 50 reads the data stored in the area 511a of the first holding circuit 51 based on the first address. The transfer circuit 50 then stores the read data in the area 541a of the second holding circuit 54 in association with the second address.

[0095] At time t22, the transfer circuit 50 shifts the first address to read the data stored in the area 512a of the first holding circuit 51 based on the first address. Since no data is stored in the area 511b, the transfer circuit 50 further shifts the first address based on the connection information stored in the connection information storage unit 58a, and reads the data stored in the area 512b based on the first address without reading the area 511b by shifting the first address. Then, the transfer circuit 50 shifts the second address to store the data stored in the area 512a of the first holding circuit 51 in the area 541b of the second holding circuit 54, and shifts the second address to store the data stored in the area 512b of the first holding circuit 51 in the area 542b of the second holding circuit 54.

[0096] Furthermore, at time t22, when all the data in the areas 541a to 542a, which are the memory areas at the same address (same position) of the second holding circuit 54, are collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 are collected, and the data in the areas 541a to 542a is read out and sent to the previous intermediate layer 6.

[0097] At time t23, the transfer circuit 50 shifts the first address to read the data stored in the area 513a of the first holding circuit 51 based on the first address. Since no data is stored in the area 513b, the transfer circuit 50 further shifts the first address based on the connection information stored in the connection information storage unit 58a, and reads the data stored in the area 514b based on the first address without reading the area 513b by shifting the first address. Then, the transfer circuit 50 shifts the second address to store the data stored in the area 513a of the first holding circuit 51 in the area 541c of the second holding circuit 54, and shifts the second address to store the data stored in the area 514b of the first holding circuit 51 in the area 542d of the second holding circuit 54.

[0098] Also, at time t23, when all the data in the areas 541b to 542b, which are the memory areas at the same address (same position) of the second holding circuit 54, are collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 are collected, and the data in the areas 541b to 542b is read out and sent to the previous intermediate layer 6.

[0099] At time t24, the transfer circuit 50 shifts the first address to read the data stored in the area 514a of the first hold circuit 51 based on the first address. It is assumed that no data is stored in the area 515b, and the data in the areas 511b to 515b has been read. Then, the transfer circuit 50 shifts the second address to store the data stored in the area 514a of the first hold circuit 51 in the area 541d of the second hold circuit 54.

[0100] Furthermore, at time t24, when all the data in the memory areas 541c to 542c at the same address (same position) of the second holding circuit 54 is collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 is collected, and the data in the areas 541c to 542c is read out and sent to the previous intermediate layer 6.

[0101] At time t25, the transfer circuit 50 shifts the first address to read the data stored in the area 515a of the first holding circuit 51 based on the first address. Then, the transfer circuit 50 shifts the second address to store the data stored in the area 515a of the first holding circuit 51 in the area 541e of the second holding circuit 54.

[0102] Furthermore, at time t25, when all the data in the areas 541d to 542d, which are the memory areas at the same address (same position) of the second holding circuit 54, are collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 are collected, and the data in the areas 541d to 542d is read out and sent to the previous intermediate layer 6.

[0103] At time t26, when all the data in the areas 541e to 542e, which are the memory areas at the same address (same position) of the second holding circuit 54, are collected, it is determined that all the data stored in the areas at the same address (same position) of the memory of the second holding circuit 54 are collected, and the data in the areas 541e to 542e is read out and sent to the previous intermediate layer 6.

[0104] As described above, in the first embodiment of the present invention, data reading is performed for all areas regardless of the connection state, so that, as shown in FIG. 9(a), it takes seven cycles from time t20 to time t27 to send all the data to the intermediate layer 6.

[0105] On the other hand, in the third embodiment of the present invention, the transfer circuit 50B reads error information from each memory of the first holding circuit 51 by shifting the first address based on the connection information stored in the connection information storage unit 58a at each predetermined control period, and rearranges the read error information and writes it to each memory of the second holding circuit 54 by shifting the second address based on the connection information stored in the connection information storage unit 58b.

[0106] Therefore, as shown in Figure 9(b), for data of unconnected neurons, addresses are skipped, so that it takes only six cycles from time t20 to time t26 to send all data to the hidden layer 6, thereby shortening the data transfer time. [Explanation of symbols]

[0107] 1 Interconnection control circuit 2 Bus Interface 3. Control Unit 4. Output layer 5,5A,5B SWAP circuit 6. Middle Tier 7 Input Layer 50, 50A, 50B Transfer circuit 51 1st holding circuit 52 1st shift register 53 First Counter 54 Second holding circuit 55 Second shift register 56 Second Counter 57 Threshold memory unit 58a, 58b Connection information storage unit

Claims

1. an interconnection control circuit for transferring error information from the neurons in the subsequent layer to the neurons in the previous layer, a first holding circuit having memories corresponding to the number of neurons in the previous layer, the first holding circuit storing error information input from the neurons in the next layer in association with a first address indicating a read address of the memories corresponding to the number of neurons in the previous layer; a second holding circuit having memories corresponding to the number of neurons in the latter layer, the second holding circuit storing error information to be output to the neurons in the former layer in correspondence with a second address indicating a write address of the memories corresponding to the number of neurons in the latter layer; a transfer circuit which reads the error information from each of the memories of the first holding circuits by shifting the first address at each predetermined control period, and which rearranges the read error information and writes it into each of the memories of the second holding circuits by shifting the second address; An interconnection control circuit comprising:

2. the memory of the first holding circuit is divided into areas so as to be able to store data corresponding to the number of neurons in the subsequent layer, the memory of the second holding circuit is divided into areas so as to be able to store data corresponding to the number of neurons in the previous layer, The transfer circuit rearranges the read error information so that data stored in the same area of ​​each memory of the first holding circuit is stored in the same memory of the second holding circuit.

2. The interconnection control circuit of claim 1.

3. When the data stored in the areas at the same positions of the memories of the second holding circuit are all written by the transfer circuit, the data stored in the areas at the same positions written by the previous layer is read out.

3. The interconnection control circuit according to claim 2.

4. When data stored in the same location of each memory of the second holding circuit is completed by the writing by the transfer circuit and a preset threshold time has elapsed, the data stored in the same location of the memory written by the previous layer is read out.

3. The interconnection control circuit according to claim 2.

5. a connection information storage unit that stores a connection state between the previous layer and the subsequent layer as connection information; The transfer circuit includes: At each predetermined control period, the error information is read from each memory of the first holding circuit by shifting the first address based on the connection information, and the read error information is rearranged and written to each memory of the second holding circuit by shifting the second address based on the connection information.

2. The interconnection control circuit of claim 1.

Citation Information

Patent Citations

  • Information processor

    JP2000322400A

  • Computing device with in-memory processing and narrow data port

    JP2018534666A