| Machine learning are gaining popularity in broad fields.As scenarios become more complex and the volume of data being processed continues to grow,these powerful machine learning algorithms require more efficient hardware platforms to support and run.Traditional CPUs and GPUs have disadvantages,such as insufficient computing power and high power consumption in implementing these algorithms.To overcome these drawbacks,the industry has tried to design specialized neural network chips with greater computing power.Architectures need to be explored and evaluated as chip design complexity increases.The SystemC language is a software/hardware co-design language which can do this very well.Currently,there is limited work using SystemC for Neural Network chip design.Therefore,a Convolutional Neural Network Processing Unit is designed and modeled by using SystemC language in this paper.At same time,a test platform is proposed and built to test the model and realize early architectural exploration and performance evaluation.The main contributions of this paper are as follows:(1)By thoroughly studying and investigating the feature of the SystemC language,the custom port that use event-driven transmission is designed,a general data structure for protocol conversion inside the model is implemented,the packet model is completed,the module tools with multiple functional functions is built,a delay method for cross-clock domain communication is developed.These components and tools are designed with function calls in combination with SystemC feature.They can greatly improve the speed of design and simulation.(2)Based on the SystemC language,the convolution engine for convolution calculation,the vector engine for layer fusion,activation and pooling,the on-chip memory unit for data storage and a control unit for direct memory access are designed.No C’s routing nodes are implemented through the switch.The efficiency of model design is improved by modularizing the complex system model.Each module is instantiated at the top level after modules are completed.The configurable system level model of CNN Processing Unit is finally realized.(3)A test platform for the model is designed through analyzing the design solutions of multiple verification platforms and combining the verification concept of SystemC.The test platform includes various functional modules,such as a parsing module for importing external data,a configuration module for configuring model parameters,a host module for generating excitation,a monitor module for comparing output and expected results.The platform can also output the performance report and waveform file after testing.The platform can efficiently realize the model verification.(4)Finally,the CNN’s parameters are input into the test platform.The test platform verifies the functional correctness of the model and outputs the performance data.At the same time,the same benchmark data is input into the RTL to realize the collaborative design and verification.The results show that the simulation speed of SystemC model is 9 times faster than the RTL,but the error is less than 8%.The CNN Processing Unit proposed in this paper has high computational power in processing large data and small bandwidth CNN algorithm in this paper.It will have significant competitiveness for applications such as high-performance Artificial Intelligence(AI)and big data processing in the future. |