Disclosed is a processing unit (PU) having an arithmetic unit (AU) for performing an operation on first, second, and third inputs to generate a result to be stored in an accumulator having an output provided to the first input. A weight input is received by the second input of the AU. A multiplexed register has first, second, third, and fourth data inputs, and an output received by the third input of the AU. A first memory provides N weight words to N weight inputs. A second memory provides N data words to first data inputs of the multiplexed register. In addition, an output of the multiplexed register is received by the second, third, and fourth data inputs of the multiplexed register away by one, 2^J, and 2^K PUs, respectively. N multiplexed registers collectively operate as an N-word rotator for rotating by one, 2^J, or 2^K words when a control input specifies the second, third, or fourth data input, respectively. According to one embodiment of the present invention, a neural network unit (NNU) has an advantage of flexibility and efficiency over a number of connection inputs to neurons of the NNU, and provides a remarkably high performance.
- NEURAL NETWORK UNIT WITH NEURAL MEMORY AND ARRAY OF NEURAL PROCESSING UNITS THAT COLLECTIVELY PERFORM MULTI-WORD DISTANCE ROTATES OF ROW OF DATA RECEIVED FROM NEURAL MEMORY