| In recent years,with the wide application of MCU in automotive electronics,consumer electronics,and the Internet of Things,MCU have entered our daily lives.MCU usually integrates various IP and peripheral interfaces.Audio signal is a very important carrier for the communication between humans and the outside world.Therefore,it is very important to integrate an audio interface for audio signal transmission in MCU.With the development of audio transmission technology,a variety of audio interface specifications have been produced.Based on the requirements of an MCU project,this paper designs a serial audio interface module compatible with multiple audio protocols and the configuration of it is very flexible and convenient.This paper designs a serial audio interface SAI module based on the AMBA APB bus specification,supporting I2 S,PCM,TDM,AC97 audio transmission protocols and SPDIF audio output.First of all,combined with the needs of the MCU project,studied the AMBA APB bus specification and various audio protocol specifications have in depth,to make the SAI audio frame can be configured that the audio frame in the data size,the number of slots(channels),the frame length and the position of the audio data in the slot can be configured,it is to achieve the purpose of supporting various audio protocols.Secondly,according to the requirements and structure of SAI module,the SAI module is designed to divide into three main parts include register module and two audio sub-modules.Then,the audio sub-module is designed to divide into four parts include clock generator,asynchronous FIFO,state machine and data processing module,input and output module,and these sub-modules are designed in detail.Finally,in addition to the basic audio data transmission,extended functions such as silent mode,compressing and expanding mode,mono mode and DMA request function have been added and designed.After completing the design of the SAI module,a basic verification environment is set up for functional verification by connecting two SAI modules together as master-slave devices.Then,test cases are written to simulate the function of the registers,the clock generators,the state machines,the audio protocols and the expand function in the SAI module.The verification results show that the design meets the design requirements.Finally,basic logic synthesis and optimization are performed on the SAI module.The synthesis result shows that the design meets the timing requirements and the area synthesis result is given.In this paper,a serial audio interface SAI module used to transmit audio data in MCU is designed.Different from a single audio interface,the SAI module supports I2 S,PCM,TDM,AC97 and other audio protocols.It also supports the SPDIF output of optical fiber transmission protocol.It is compatible with various audio protocols by using configurable audio frame,The verification results show that the design of Sai module basically meets the design requirements and can be integrated into MCU. |