System and method for matrix multiplication

By designing peripheral devices on the microcontroller, including weight memory, input memory, multipliers, accumulators and output memories, and using DMA circuits and system buses for data transmission, the excessive processing burden caused by matrix multiplication operations in embedded systems is solved. It solves complex problems, implements efficient matrix multiplication operations, and avoids system errors.

CN118679451APending Publication Date: 2024-09-20MICROCHIP TECHNOLOGY INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380020798.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-01-18
Filing Date
2023-01-30
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In embedded systems, microcontrollers may overload processing when performing complex matrix multiplication operations, resulting in system errors, especially when real-time output is required, and existing technologies are difficult to perform efficiently with a small memory footprint. these operations.

Method used

A peripheral device is designed, including weight memory, input memory, multiplier, accumulator and output memory, which transmits data through DMA circuit and system bus, and uses sequencer and activation circuit to generate interrupt signal to realize matrix multiplication operation. The device efficiently performs complex matrix multiplication operations on a microcontroller, offloading it.

Benefits of technology

It achieves efficient execution of complex matrix multiplication operations with a small memory footprint, avoids system errors when the microcontroller performs matrix multiplication, and ensures good management of overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118679451A_ABST
    Figure CN118679451A_ABST
Patent Text Reader

Abstract

A peripheral device for matrix multiplication includes a weight memory, an input memory, a multiplier, an accumulator, an output memory, and a sequencer for generating a signal for driving the input memory and the output memory and generating an interrupt signal. The weight memory may be loaded with weights and offsets for the matrix multiplication operation, and the multiplier and accumulator may implement multiplication and accumulator operations for the matrix multiplication operation. Data may be exchanged between the input memory and the output memory to reduce the memory required for matrix multiplication.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Related patent applications

[0002] This application claims priority to commonly owned U.S. Patent Application No. 63 / 393,170 filed on July 28, 2022, the entire contents of which are hereby incorporated by reference for all purposes. Technical Field

[0003] The present disclosure relates to peripheral devices in a microcontroller or system on a chip, and in particular to matrix multiplication. Background Art

[0004] Complex algorithms and processing blocks are found in an increasing number of applications. Simple algorithms may utilize embedded controls that are programmed for specific responses to specific input conditions. More advanced algorithms may utilize predicted responses to non-specific input conditions. Implementing these predictive algorithms in software can be slow and repetitive.

[0005] Many of these high-level algorithms and processing blocks are implemented as matrix multiplication operations. In one example, an input pattern may be input to an artificial intelligence (AI) pattern recognition algorithm, which is executed as a series of matrix multiplication operations. In another example, an input stream of audio samples may be filtered by a finite impulse response (FIR) or infinite impulse response (IIR) filter that may be implemented as a matrix multiplication operation.

[0006] In embedded systems, microcontrollers can be used to control program flow, respond to interrupts, process and move data, and perform other operations to keep the overall system running well. Matrix multiplication operations running on a microcontroller can place a heavy processing burden on the microcontroller and, in extreme cases, can cause many system errors. In one case, if real-time output needs to be generated and the microcontroller is busy servicing other higher priority functions of the system, the matrix multiplication operation may fail.

[0007] There is a need in embedded systems for a device that can perform complex matrix multiplication operations with a small memory footprint while leaving the microcontroller free to manage overall system performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The accompanying drawings show examples of systems for matrix multiplication.

[0009] Figure 1 A three-input perceptron is shown.

[0010] Figure 2 One of various examples of multi-layer neural networks is shown.

[0011] Figure 3 One example among various examples of digital filters is shown.

[0012] Figure 4 One example of various examples of a peripheral matrix multiplication unit is shown. Summary of the invention

[0013] A peripheral device, comprising: a weight memory, for receiving data input from an external DMA circuit and a system bus, respectively, and receiving control input from a sequencer, the weight memory for providing a weight memory output; an input memory, for receiving data input from a system bus and receiving control input from a sequencer, the input memory for providing an input memory output; a multiplier, for receiving input from a weight memory output and an input memory output, respectively, the multiplier for generating a multiplier output; an accumulator, for receiving input from a multiplier output and an output memory output, respectively, the accumulator for generating an accumulator output; an output memory, for receiving data input from a weight memory output, an accumulator output, and a system bus, and receiving control input from a sequencer, the output memory for providing output to a system bus and an output memory output, respectively, and wherein the sequencer generates an output signal coupled to the input memory and the output memory, and generates an interrupt signal based on a programmable condition;

[0014] A microcontroller includes a peripheral device, which includes: a weight memory, which is used to receive data input from a DMA circuit and a system bus respectively and to receive control input from a sequencer, and the weight memory is used to provide a weight memory output; an input memory, which is used to receive data input from the system bus and to receive control input from the sequencer, and the input memory is used to provide an input memory output; a multiplier, which is used to receive input from a weight memory output and an input memory output respectively, and the multiplier is used to generate a multiplier output; an accumulator, which is used to receive input from a multiplier output and an output memory output respectively, and the accumulator is used to generate an accumulator output; an output memory, which is used to receive data input from a weight memory output, an accumulator output, and a system bus and to receive control input from a sequencer, and the output memory is used to provide output to the system bus and an output memory output respectively, wherein the sequencer generates an output signal coupled to the input memory and the output memory, and generates an interrupt signal based on a programmable condition; and an activation circuit, which is used to calculate an activation function for a predetermined time based at least in part on a value stored in the output memory.

[0015] A method comprising: loading a weight value into a weight memory; loading an input value into an input memory; multiplying the value stored in the weight memory with the value stored in the input memory to generate a multiplier output; accumulating a plurality of consecutive multiplier outputs in an accumulator; storing a result of the accumulator in an output memory; triggering an interrupt signal in response to storing the result; and transferring a plurality of results of the accumulator from the output memory to the input memory after a predetermined number of accumulator results have been stored in the output memory. DETAILED DESCRIPTION

[0016] One example among various examples of matrix multiplication operations can be a calculation within a neural network. Figure 1One of the various examples of a single node of a neural network, generally referred to as a perceptron 100, is shown. A first input 110, a second input 120, and a third input 130 may be storage locations containing numerical values. The numerical values ​​may be provided to the first input 110, the second input 120, and the third input 130 by a sensor, a processor, a microcontroller, a memory, or other source capable of providing numerical values. The numerical values ​​provided to the first input 110, the second input 120, and the third input 130 may be provided by the same source, respectively, or may be provided from different sources. A first weight 111, a second weight 121, and a third weight 131 may be storage locations that may contain numerical values. The numerical values ​​may be provided to the first weight 111, the second weight 121, and the third weight 131 by a sensor, a processor, a controller, a memory, or other source capable of providing numerical values. The numerical values ​​provided to the first weight 111, the second weight 121, and the third weight 131 may be provided by the same source, respectively, or may be provided from different sources. In operation, the numerical value provided to the first input 110 may be multiplied at the multiplier 116 with the numerical value provided to the first weight 111. The first offset value 112 may be added to the output of the first multiplier 116 at the first adder 115 to generate the first intermediate output 113. The first offset value 112 may be a real value, including a value of 0. The value provided to the second input 120 may be multiplied by the value provided to the second weight 121 at the second multiplier 126. The second offset value 122 may be added to the output of the second multiplier 126 at the second adder 125 to generate the second intermediate output 123. The second offset value 122 may be a real value, including a value of 0. The value provided to the third input 130 may be multiplied by the value provided to the third weight 131 at the third multiplier 136. The third offset value 132 may be added to the output of the third multiplier 136 at the third adder 135 to generate the third intermediate output 133. The first intermediate output 113, the second intermediate output 123, and the third intermediate output 133 may be input to the output node 150. At the output node 150, the first intermediate output 113, the second intermediate output 123, and the third intermediate output 133 may be summed at the output adder 152, and the activation function 155 may be applied to the output of the output adder 152 to generate the output 170. The activation function may include, but is not limited to, a hyperbolic tangent (tanh) function, a sigmoid function, a linear function, a rectified linear unit (ReLU), or any other mathematical function capable of converting a set of data from a first value range to a second value range.

[0017] Multiple perceptrons can form a multi-layer network. Figure 2 An example of one of various examples of a network diagram of a multi-layer network 200 is shown. An input layer 210 may include one or more inputs, as represented by nodes in the network diagram. Figure 2 The example is shown as having four inputs, shown as input nodes 211, 212, 213, and 214. Other examples may include Figure 2 A greater number of inputs than those shown in Figure 2 A smaller number of inputs are shown in .

[0018] The first input 211, the second input 212, the third input 213, and the fourth input 214 may be storage locations containing numerical values. The numerical values ​​may be provided to the first input 211, the second input 212, the third input 213, and the fourth input 214 by a sensor, a processor, a controller, a memory, or other source capable of providing numerical values. The numerical values ​​provided to the first input 211, the second input 212, the third input 213, and the fourth input 214 may be provided by the same source, respectively, or may be provided from different sources.

[0019] Each of the input nodes 211, 212, 213, and 214 may be connected to at least one node of the first hidden layer 230. Figure 2 In the example of , the first hidden layer 230 may include nodes 231, 232, 233, 234, and 235. At each connection between a node of the input layer 210 and a node of the first hidden layer 230, Figure 1 In the manner described in the single perceptron case of FIG. 2 , the values ​​stored in the nodes of the input layer 210 may be multiplied by the weight values ​​and the bias values ​​may be added to the result of the multiplication. Figure 2 As shown in , the numerical value provided to the first input node 211 may be multiplied by the weight value 221 at the multiplier 226. The offset value 222 may be added to the output of the multiplier 226 at the adder 225. The offset value 222 may be a positive value, a negative value, or may be a zero value, wherein the offset value 222 may be set based on a predetermined algorithm. The node 231 of the first hidden layer 230 may add up all inputs to the node 231, and an activation function may be applied to the result of the addition. The output of the activation function may be stored in the node 231 of the first hidden layer 230. The nodes 232, 233, 234, and 235 of the first hidden layer 230 may similarly add up all inputs to the corresponding nodes and an activation function may be applied to the result of the addition, and the output of the activation function may be stored in the corresponding nodes of the first hidden layer 230.

[0020] exist Figure 2 In the example of FIG, only a single path between the input layer 210 and the first hidden layer 230 is shown for a multiplier and an adder, but additional multipliers and adders may be present in all paths between the corresponding nodes of the input layer 210 and the corresponding nodes of the first hidden layer 230 of the network 200. In order to improve the readability of the drawings, the additional multipliers, adders, and offset values ​​on each path are not shown. Similar multiplication by weight values ​​and addition of offset values ​​may occur at each arrow connecting the corresponding node of the input layer 210 to the corresponding node of the first hidden layer 230.

[0021] Figure 2 The example shows a first hidden layer 230 having 5 nodes, but other examples may include a first hidden layer 230 having more than Figure 2 More nodes than shown in Figure 2 A first hidden layer 230 with a small number of nodes is shown. Figure 2 The example of 210 shows that each node of the input layer 210 is connected to each node of the first hidden layer 230. Other examples may include different combinations of connections between the nodes of the input layer 210 and the nodes of the first hidden layer 230. The specific combination of connections between the nodes of the input layer 210 and the nodes of the first hidden layer 230 may be fixed in hardware, or may be programmable by a controller or by a software program. In one example of the various examples, the nodes of the input layer 210 may be connected to less than all nodes of the first hidden layer 230, and the nodes of the first hidden layer 230 may be connected to less than all nodes of the input layer 210.

[0022] Each of the nodes 231, 232, 233, 234, and 235 of the first hidden layer 230 may be connected to at least one node of the second hidden layer 250. Figure 2 In the example of , the second hidden layer 250 may include nodes 251, 252, 253, 254, 255, and 256. At each connection between a node of the first hidden layer 230 and a node of the second hidden layer 250, a value stored in the node of the first hidden layer 230 may be multiplied by a weight value, and an offset value may be added to the result of the multiplication. Figure 2 As shown in , the value stored in the first hidden layer 230 at the node 231 may be multiplied by the weight value 241 at the multiplier 246. The offset value 242 may be added to the output of the multiplier 246 at the adder 242. The offset value may be a positive value or a negative value selected based on a specific algorithm. Each node may have a unique offset value. Some nodes may have the same offset value. The node 251 of the second hidden layer 250 may add all inputs to the node 251, and an activation function may be applied to the result of the addition. The result of the activation function may be stored in the node 251 of the second hidden layer 250. The nodes 252, 253, 254, 255 and 256 of the second hidden layer 250 may similarly add all inputs to the corresponding nodes and an activation function may be applied to the result of the addition, and the output of the activation function may be stored in the corresponding nodes of the second hidden layer 250.

[0023] exist Figure 2 In the example of FIG. 1 , a multiplier and an adder are shown only for a single path between the first hidden layer 230 and the second hidden layer 250, but additional multipliers and adders may exist in all paths between the first hidden layer 230 and the second hidden layer 250. To improve the readability of the drawing, additional multipliers, adders, and offset values ​​on each path are not shown.

[0024] Figure 2 The example shows a second hidden layer 250 having 6 nodes, but other examples may include having more than Figure 2 More nodes than shown in Figure 2 A second hidden layer 250 with a small number of nodes is shown. Figure 2 The example of shows that each node of the first hidden layer 230 is connected to each node of the second hidden layer 250. Other examples may include different combinations of connections between the first hidden layer 230 and the second hidden layer 250. The specific combination of connections between the first hidden layer 230 and the second hidden layer 250 may be fixed in hardware, or may be programmable by a controller or software program. In one example of various examples, the nodes of the first hidden layer 230 may be connected to less than all nodes of the second hidden layer 250, and the nodes of the second hidden layer 250 may be connected to less than all nodes of the first hidden layer 230.

[0025] Each node 251, 252, 253, 254 and 255, 256 of the second hidden layer 250 may be connected to at least one node of the output layer 270. Figure 2 In the example of , the output layer 270 may include nodes 271, 272, and 273. At each connection between a node of the second hidden layer 250 and a node of the output layer 270, a value stored in the node of the second hidden layer 250 may be multiplied by a corresponding weight value, and a corresponding offset value may be added to the result of the multiplication. Figure 2 As shown in , the value stored in the second hidden layer 250 at the node 251 may be multiplied by the weight value 261 at the multiplier 266. The offset value 262 may be added to the output of the multiplier 266 at the adder 265. The offset value may be a positive or negative value selected based on a specific algorithm. Each node may have a unique offset value. Some nodes may have the same offset value. The node 271 of the output layer 270 may add up all inputs to the node 271, and an activation function may be applied to the result of the addition. The result of the activation function may be stored in the node 271 of the output layer 270. The nodes 272 and 273 of the output layer 270 may similarly add up all inputs to the corresponding nodes and an activation function may be applied to the result of the addition, and the output of the activation function may be stored in the corresponding nodes of the output layer 270.

[0026] exist Figure 2 In the example of FIG. 2 , the multipliers and adders are shown only for a single path between the second hidden layer 250 and the output layer 270, but these multipliers and adders may exist in all paths between the second hidden layer 250 and the output layer 270. In order to improve the readability of the drawings, the additional multipliers, adders, and offset values ​​on each path are not shown.

[0027] Figure 2The example shows an output layer 270 having 3 nodes, but other examples may include an output layer 270 having more than Figure 2 More nodes than shown in Figure 2 2. The output layer 270 is shown with a small number of nodes. In one of the various examples, the output layer 270 may include a single output node. Figure 2 The example of shows each node of the second hidden layer 250 connected to each node of the output layer 270. Other examples may include different combinations of connections between the second hidden layer 250 and the output layer 270. The specific combination of connections between the second hidden layer 250 and the output layer 270 may be fixed in hardware, or may be programmable by a controller or software program. In one example of various examples, the nodes of the second hidden layer 250 may be connected to less than all nodes of the output layer 270, and the nodes of the second hidden layer 250 may be connected to less than all nodes of the output layer 270.

[0028] Figure 1 and Figure 2 The example can be used to implement neural networks for machine learning, image classification, and many other applications. In one example of various examples, other applications besides neural networks can be constructed as Figure 1 and Figure 2 The combination of the input nodes shown in , multiplied by the weights, added with the bias value, and summed. Figure 3 1 shows one example among various examples of digital filter 300. The signal flow graph of digital filter 300 may be defined as similar to Figure 1 and Figure 2314, 315, 316, and 317. The input signal 301 may be input to the input node 310. The input nodes 311, 312, 313, 314, 315, 316, and 317 may be connected in a shift register configuration, where the node 311 receives input from the output of the input node 310, the input node 312 receives input from the output of the input node 311, and continues to the end of the shift register, i.e., to the node 317. The input nodes 311, 312, 313, 314, 315, 316, and 317 may be flip-flop storage devices, random access memory (RAM) storage devices, or other volatile or non-volatile memory components capable of storing the value of the input signal 301. Samples of the input signal 301 may be shifted in sequence and may be stored in the nodes 311, 312, 313, 314, 315, 316, and 317. The input signal 301 may be an audio signal, a video or image signal, or any other sampled data signal. The outputs of the input nodes 310, 311, 312, 313, 314, 315, 316, and 317 may be input to multipliers 320, 321, 322, 323, 324, 325, 326, and 327, respectively. Each of the multipliers 320, 321, 322, 323, 324, 325, 326, and 327 may multiply its corresponding input by a weight value. The outputs of the multipliers 320, 321, 322, 323, 324, 325, 326, and 327 may be input to an adder 330, such as Figure 3 As shown. The output of adder 330 can generate output 350. In this way, the FIR filter can be implemented as a matrix multiplication operation. In this example, the offset values ​​can all be set to 0. For simplicity, Figure 3 The offset values ​​and associated adders are not shown.

[0029] In operation, the matrix multiplication can be implemented in software, or can be implemented by dedicated hardware. In a software implementation, higher-level system functions can take precedence over the matrix multiplication operation, which can lead to errors in real-time systems.

[0030] Figure 4 4 shows one example of various examples of peripheral device 400. Peripheral device 400 illustrates one example of various examples of specific implementations of a matrix multiplication unit. Peripheral device 400 may be a device that can implement Figure 1 , Figure 2 and Figure 3 A network diagram and a signal flow diagram of a part of a microcontroller. The microcontroller may include Figure 4 Other elements not shown include, but are not limited to, a CPU, an oscillator, input and output ports, and a bus interface.

[0031] External direct memory access (DMA) circuit 410 can load weight values ​​and offset values ​​into peripheral device 400 for matrix multiplication operation. External DMA circuit 410 can load weight values ​​from DMA input 405 into weight memory 420 via DMA output 415 of external DMA circuit 410. DMA input 405 can be provided by analog-to-digital converter (ADC) or other peripheral device capable of providing data input to external DMA circuit 410. System bus 470 can load weight values ​​directly into weight memory 420. System bus 470 can load input values ​​into RAM A 460. RAMA 460 can also be referred to as input memory. Multiplier 430 can multiply values ​​from weight memory 420 (via weight memory output 425) and from RAM A 460 (via RAMA output 465), respectively. RAM A output 465 can also be referred to as input memory output. Multiplier 430 can generate multiplier output 435. The accumulator 440 may add a predetermined number of outputs from the multiplier output 435 to corresponding values ​​from the RAM B output 455 and accumulate the results of the predetermined number of outputs from the multiplier output 435. The accumulator output 445 may be input to the RAM B 450. The RAM B 450 may also be referred to as an output memory. The RAM B output 455 may also be referred to as an output memory output.

[0032] In operation, the sequencer 480 may control the operation of the peripheral device 400 and the movement of data between various blocks in the peripheral device 400. As one example of various examples, the sequencer 480 may instruct the external DMA circuit 410 to load multiple weights and offset values ​​into the weight memory 420 for a layer of a multi-layer network. The external DMA circuit 410 may load all weights and offsets for the entire layer in one operation, or may load weights and offsets in multiple steps while the peripheral device 400 is in operation. As one example of various examples, when the peripheral device 400 is accessing data from RAM B 450 via the system bus 470, the external DMA circuit 410 may be loading weight values ​​into the weight memory 420. The sequencer 480 may additionally load input values ​​from the system bus 470 into the RAM A 460. The output signal from the sequencer 480 may issue a memory transaction to the RAM A 460 to load the input values ​​from the system bus 470 into the RAM A 460. Multiplier 430 may multiply successive weights from weight memory 420 with successive input values ​​from RAMA 460 provided via RAM A output 465 to generate an intermediate output at multiplier output 435, as previously described with reference to Figure 1As described. The accumulator 440 may add the continuous intermediate outputs at the multiplier output 435 to generate the output of a node of a layer of the network at the accumulator output 445. The output of a node of the network may be written to RAM B 450. In one example of various examples, once the multiplication and accumulation operation is completed, the activation circuit 480 may take the value of the output node from RAM B 450 and apply the activation function and rewrite the result to RAM B 450. The activation circuit may not require interaction from the CPU, processor, or controller. The activation circuit may implement the activation function to include but is not limited to a tanh function, a sigmoid function, a linear function, a rectified linear unit (ReLU), or may implement any other mathematical function capable of converting a set of data from a first range to a second range. In one example of various examples, once the multiplication and accumulation operation is completed for a given node, an interrupt 490 may be asserted by the sequencer 480. The interrupt 490 may be programmed to be triggered based on one of various conditions, including but not limited to the completion of the calculation of a layer of the network. An interrupt service routine in the peripheral device 400 may issue instructions to fetch output node values ​​from RAM B 450, apply an activation function, and write the results of the activation function back to RAM B 450. In this way, the interrupt enables the peripheral device 400 to use different activation functions for different nodes in the network. A similar sequence of operations may continue for each node of a particular layer of the network. Once an entire layer of calculations is completed, the sequencer 480 may load the weights and offsets for the next layer into the weight memory 420. The sequencer 480 may move data for all output nodes from RAM B 450 to RAMA 460 via the system bus 470. Output signals from the sequencer 480 may issue memory transactions to RAM A 460 and RAM B 450 to move data from RAM B 450 to RAM A 460 via the system bus 470. After a predetermined number of operations are completed, the data may be transferred from RAM A 460 to RAM B 450. As described with respect to Figure 2 As illustrated and disclosed, the output nodes of one layer can be the input nodes of the next layer. By moving data from the output storage location (RAM B 450) to the input storage location (RAM A 460) via the system bus 470, the same hardware can be used for consecutive layers, thereby saving memory. When the last layer of calculations is completed, an interrupt 490 can be asserted to signal the completion of the calculation to the external system.

Claims

1. A peripheral device, comprising: A weight memory, for receiving data inputs from an external DMA circuit and a system bus, respectively, and receiving control inputs from a sequencer, the weight memory being used to provide a weight memory output; an input memory for receiving data input from the system bus and control input from the sequencer, the input memory for providing an input memory output; a multiplier, configured to receive inputs from the weight memory output and the input memory output, respectively, and configured to generate a multiplier output; an accumulator, configured to receive inputs from the multiplier output and the output memory output, respectively, the accumulator being configured to generate an accumulator output; an output memory for receiving data input from the weight memory output, the accumulator output and the system bus, and receiving control input from the sequencer, the output memory for providing output to the system bus and the output memory output, respectively, and The sequencer is configured to generate an output signal coupled to the input memory and the output memory, and to generate an interrupt signal based on a programmable condition.

2. The peripheral device according to claim 1, the sequencer is used to generate an output signal to transmit a memory transaction to the output memory and the input memory, the memory transaction is used to control data transfer from the output memory to the input memory at a predetermined time.

3. The peripheral device of any one of claims 1 to 2, the input memory comprising a dual port random access memory.

4. The peripheral device of any one of claims 1 to 3, the output memory comprising a dual port random access memory.

5. The peripheral device according to any one of claims 1 to 4, the weight memory content comprising weight values ​​in matrix multiplication operations.

6. The peripheral device of any one of claims 1 to 5, comprising an activation circuit coupled to the system bus, the activation circuit being configured to calculate an activation function for a predetermined time based at least in part on a value stored in the output memory.

7. A microcontroller comprising a peripheral device according to any one of claims 1 to 6.

8. The microcontroller of claim 7, wherein the accumulator is used to accumulate values ​​in a matrix multiplication operation.

9. The microcontroller of claim 7, the activation function comprising a function that generates an output between 0 and 1, inclusive.

10. A method comprising: Load weight values ​​into weight memory; Load input values ​​into input memory; multiplying a value stored in the weight memory and a value stored in the input memory to generate a multiplier output; Accumulating a plurality of consecutive multiplier outputs in an accumulator; storing the result of the accumulator in an output memory; triggering an interrupt signal in response to storing the result; as well as, A plurality of results of the accumulator are transferred from the output memory to the input memory after a predetermined number of accumulator results have been stored in the output memory.

11. The method of claim 10, comprising applying an activation function based at least in part on the accumulator result stored in the output memory.

12. The method of any one of claims 10 to 11, wherein the activation function comprises a function that generates an output between 0 and 1, inclusive.

13. The method according to any one of claims 10 to 12, comprising applying the activation function based at least on the triggering of the interrupt signal.

14. The method according to any one of claims 10 to 13, wherein transferring the plurality of results comprises transmitting memory transactions to the output memory and the input memory respectively, the memory transactions being used to control the transfer of data words from the output memory to the input memory at predetermined times.