| In recent years,with the deepening of the research of brain neuroscience,the application of deep learning represented by neural network has attracted extensive attention in academia and industry.Generally speaking,neural networks include two types:artificial neural networks and spiking neural networks.Artificial neural network is good at recognition because of its powerful computing power.Spiking neural network is good at cognitive ability and decision-making ability.Both kinds of neural networks contain a large number of parallel operations,but the traditional general processing platform is difficult to fully capture the parallelism.Therefore,in recent years,neural network accelerator has developed explosively.At present,the mainstream neural network accelerators generally have two problems:1.Support specific types of neural networks only,and lack common support for the two types of neural networks.However,in reality,it is a common scene to use spiking neural network to reduce computing power consumption and use artificial neural network to improve accuracy.On the one hand,heterogeneous neural network accelerator can meet the needs of real scenes,on the other hand,it can promote the cross field research of two kinds of neural networks.2.Pay too much attention to the functional integrity that can be realized,and there is less optimization of neural network at the software level.The optimization of the algorithm can greatly reduce the amount of computation at a small cost,which is obviously more conducive to the improvement of the performance of the hardware accelerator.In order to solve the above problems,this paper discusses the design scheme of heterogeneous neural network accelerator by means of software and hardware codesign.The main contributions of this paper are as follows:1.At the software level,the artificial neural network and spiking neural network are abstracted uniformly,and the minimum hardware set of heterogeneous neural network is clarified.2.An approximate calculation method for spiking neural network is proposed,which can greatly reduce the calculation amount of spiking neural network under the condition of slight loss of model accuracy.3.A heterogeneous neural network accelerator core is designed,which can support two kinds of neural networks and the approximate calculation process of spiking neural networks.At the same time,a design scheme of expanding accelerator core into multicore is given.4.A heterogeneous neural network accelerator GNU is instantiated based on zcu 102 FPGA platform,and three network applications are running on it.The results show that compared with some previous accelerator work,GNU can achieve higher throughput in the same task. |