Digital audio interface based on RISC-V chip
By designing a digital audio interface based on RISC-V chip, using PWM-DAC conversion module and sound amplifier module, the problem of high audio processing cost of RISC-V architecture chip is solved, and the design is simplified and cost is reduced. It is suitable for the sound quality requirements. High application scenarios.
Patent Information
- Application Number
- CN202411003839.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-12
AI Technical Summary
RISC-V architecture chips require external or integrated audio codecs in audio processing, resulting in high design costs and lack of existing audio interface design.
A digital audio interface based on RISC-V chip is designed, including an audio entry and exit unit and an audio output unit. The PWM-DAC conversion module is used to convert the digital signal into an analog signal, and it is amplified and outputted through the audio amplifier module, supporting FM radio and Direct access to the microphone uses a first-order RC filter to filter signals, simplifying circuit design.
It realizes simplified design, reduces hardware costs, is suitable for scenarios with low sound quality requirements, and meets different customer needs. The RISC-V chip only needs to process digital signals, solving the problem of high IP price of audio codecs.
Smart Images

Figure CN118945563A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital audio technology, and in particular to a digital audio interface based on a RISC-V chip. Background Art
[0002] The field of chip design is getting hotter and hotter. ASIC (Application Specific Integrated Circuit) has the advantages of high density, high speed and low cost. RISC (Reduced Instruction Set Computer) is a reduced instruction set architecture, characterized by open source instruction set, while ARM (Advanced RISC Machine) is not open source, so chip design based on RISC-V (Reduced Instruction Set Computing Version 5, an open instruction set architecture based on the principle of reduced instruction set RISC) architecture is getting more and more attention.
[0003] RISC-V architecture chips, like FPGA (Field Programmable Gate Array) chips, are good at processing digital signals. In chip designs based on RISC-V architecture, most peripherals are digital interfaces, while audio interfaces are generally analog. Audio codecs are generally used to process audio. The controller communicates with the audio codec through the I2S (Inter-IC Sound), PCM (Pulse Code Modulation) or PDM (Pulse Density Modulation) interface, and the audio codec controls the microphone or speaker externally.
[0004] RISC-V architecture chips are good at processing digital signals, and generally require an external audio codec for audio processing. However, due to the high price of audio codecs, the design cost is increased; another solution is to purchase the IP of the audio codec and integrate the audio codec into the main chip, but the price of the audio codec IP is also relatively expensive.
[0005] In view of the lack of audio interface design solutions in RISC-V architecture chip design, the present invention proposes a digital audio interface based on RISC-V chip. Summary of the invention
[0006] In order to overcome the defects of the prior art, the present invention provides a simple and efficient digital audio interface based on RISC-V chip.
[0007] The present invention is achieved through the following technical solutions:
[0008] A digital audio interface based on a RISC-V chip, characterized by comprising an audio input and output unit and an audio output unit;
[0009] The audio input and output unit includes a microphone and an FM radio, and the audio output unit includes an audio amplifier module and a speaker module;
[0010] The FM radio and microphone are respectively connected to the RISC-V chip, and the RISC-V chip outputs the audio information to the PWM-DAC conversion module in the form of a pulse width modulation signal PWM through a digital interface; after being converted into a corresponding analog conversion signal DAC by the PWM-DAC conversion module, it is connected to the inverting input end of the sound effect amplifier module, and after amplifying the signal, the audio output is realized through the speaker module;
[0011] The RISC-V chip is also connected to an FM button, which is used to send a control signal to the RISC-V chip to turn on or off the FM radio and set the frequency and volume.
[0012] The FM radio two-wire serial bus IIC is connected to the RISC-V chip, and the output left and right channel analog quantities are directly connected to the inverting input end of the sound effect amplifier module. After the signal is amplified by the sound effect amplifier module, the sound of the FM radio is output through the speaker module.
[0013] The FM radio uses Quitic's QN8035 chip, supports full-band tuning from 60MHz to 108MHz, and the output analog signal is directly input into the inverting input terminal of the audio amplifier module.
[0014] The audio power amplifier module adopts the LM4871 audio power amplifier.
[0015] The microphone adopts a digital microphone and outputs a pulse density modulation signal PDM to the RISC-V chip.
[0016] The digital microphone adopts the MSM261D digital microphone head, the power supply voltage is 1.8V or 3.3V, and the output interface is a two-wire pulse density modulation signal PDM.
[0017] The PWM-DAC conversion module adopts a first-order RC circuit structure, and the filter cutoff frequency fc is 1 / 2*πRC; wherein R and C are the resistance impedance and capacitance value in the first-order RC circuit structure respectively.
[0018] The conversion frequency of the PWM-DAC conversion module is the repetition frequency of the pulse, that is, one cycle;
[0019] The resolution of the PWM-DAC conversion module is the accuracy of the pulse width relative to the entire period, and the period of the pulse width modulation signal PWM is 256 times the time of a minimum pulse ON.
[0020] The pulse repetition frequency to be filtered out is 50-100 times the cut-off frequency of the filter to ensure that the filter can filter out the AC part and shorten the settling time.
[0021] Among them, the design parameters of the filter satisfy: R+C>>Rin, C< <RL;
[0022] Among them, R and C are the resistance impedance and capacitance value in the first-order RC circuit structure respectively, Rin is the output impedance of the previous stage, and RL is the input impedance of the next stage.
[0023] The beneficial effects of the present invention are as follows: the digital audio interface based on the RISC-V chip has a simple circuit design and is convenient for transplantation. The main chip only needs to process digital signals, which solves the problem that the internal integrated audio codec IP is expensive and the hardware design cost of the external audio codec is rising. It is applied to scenarios where the sound quality requirements are not high and can meet the needs of different customers. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Attached Figure 1 This is a schematic diagram of the digital audio interface based on the RISC-V chip of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] The digital audio interface based on the RISC-V chip includes an audio input and output unit and an audio output unit;
[0028] The audio input and output unit includes a microphone and an FM radio, and the audio output unit includes an audio amplifier module and a speaker module;
[0029] The FM radio and microphone are respectively connected to the RISC-V chip, and the RISC-V chip outputs the audio information to the PWM-DAC conversion module in the form of a pulse width modulation signal PWM through a digital interface; after being converted into a corresponding analog conversion signal DAC by the PWM-DAC conversion module, it is connected to the inverting input end of the sound effect amplifier module, and after amplifying the signal, the audio output is realized through the speaker module;
[0030] The RISC-V chip is also connected to an FM button, which is used to send a control signal to the RISC-V chip to turn on or off the FM radio and set the frequency and volume.
[0031] The FM radio two-wire serial bus IIC is connected to the RISC-V chip, and the output left and right channel analog quantities are directly connected to the inverting input end of the sound effect amplifier module. After the signal is amplified by the sound effect amplifier module, the sound of the FM radio is output through the speaker module.
[0032] The audio power amplifier module adopts the LM4871 audio power amplifier.
[0033] The sound or other audio signals accompanying the video inside the chip are transmitted through different duty cycles of the pulse width modulation signal PWM. The pulse width modulation signal PWM is converted into the corresponding analog quantity through the PWM-DAC conversion module, and the analog quantity is connected to the inverting input end of the sound amplifier module LM4871 to achieve audio signal amplification and output. The FM radio enters the RISC-V main chip through the FM button signal, and chooses to turn on the radio and the FM setting.
[0034] The FM radio uses Quitic's QN8035 chip, supports full-band tuning from 60MHz to 108MHz, and the output analog signal is directly input to the inverting input terminal of the audio amplifier module LM4871.
[0035] The microphone adopts a digital microphone and outputs a pulse density modulation signal PDM to the RISC-V chip.
[0036] The digital microphone adopts the MSM261D digital microphone head, the power supply voltage is 1.8V or 3.3V, and the output interface is a two-wire pulse density modulation signal PDM.
[0037] The PWM-DAC conversion module adopts a first-order RC circuit structure, and the filter cutoff frequency fc is 1 / 2*πRC; wherein R and C are the resistance impedance and capacitance value in the first-order RC circuit structure respectively.
[0038] In addition, from the pulse spectrum of the pulse width modulation signal PWM signal after Fourier transformation, it can be known that the AC part of the pulse width modulation signal PWM with different duty cycles is exactly the same, only the DC part is different, that is to say, the DC part is useful for carrying information, and the AC part needs to be filtered out.
[0039] The conversion frequency of the PWM-DAC conversion module is equivalent to the repetition frequency of the pulse, that is, one cycle. The resolution of the PWM-DAC conversion module is equivalent to the accuracy of the pulse width relative to the entire cycle. If the minimum pulse ON time is 1ns, the cycle of the pulse width modulation signal PWM is 1ns x 256 = 256ns, then this PWM-DAC conversion module is equivalent to an 8-bit analog conversion signal DAC.
[0040] In addition, the pulse repetition frequency and cutoff frequency parameter design is very important. If the filter selects a lower cutoff frequency, the output analog signal ripple is smaller, but the settling time is longer. If the filter selects a higher cutoff frequency, the output analog signal settling time can be shortened, but the ripple is larger.
[0041] Therefore, the gap between the filter cutoff frequency and the pulse repetition frequency to be filtered out is widened, and the gap between the two is maintained at 50-100 times (the pulse repetition frequency to be filtered out is 50-100 times the cutoff frequency of the filter). For example, if the pulse repetition frequency is 10MHz, the filter cutoff frequency can be set to 100KHz, which can filter out the AC part and shorten the settling time.
[0042] The design parameters of the filter meet the following requirements: R+C>>Rin, C< <RL;
[0043] Among them, R and C are the resistance impedance and capacitance value in the first-order RC circuit structure respectively, Rin is the output impedance of the previous stage, and RL is the input impedance of the next stage.
[0044] RISC-V chips not only have the characteristics of simple architecture and full open source, but also can easily port Linux and Unix systems to the RISC-V platform, allowing users to flexibly choose different module combinations to meet the needs of customized equipment. Therefore, it has strong scalability and can expand and customize the instruction set according to different application scenario requirements, greatly improving flexibility.
[0045] The digital audio interface based on the RISC-V chip has a simple circuit design and is easy to port. As the main chip, the RISC-V chip only needs to process digital signals, which solves the problem of expensive internal integrated audio codec IP and rising hardware design costs for external audio codecs. It can be used in scenarios where sound quality requirements are not high and can meet the needs of different customers.
[0046] The embodiment described above is only one specific implementation of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.
Claims
1. A digital audio interface based on RISC-V chip, characterized by: It includes an audio input and output unit and an audio output unit; the audio input and output unit includes a microphone and an FM radio, and the audio output unit includes an audio amplifier module and a speaker module; The FM radio and the microphone are respectively connected to a RISC-V chip, and the RISC-V chip outputs the audio information to the PWM-DAC conversion module in the form of a pulse width modulation signal PWM through a digital interface; After being converted into the corresponding analog conversion signal DAC by the PWM-DAC conversion module, it is connected to the inverting input terminal of the sound effect amplifier module. After the signal is amplified, the audio output is realized through the speaker module; The RISC-V chip is also connected to an FM button, which is used to send a control signal to the RISC-V chip to turn on or off the FM radio and set the frequency and volume.
2. The digital audio interface based on RISC-V chip according to claim 1, characterized in that: The FM radio two-wire serial bus IIC is connected to the RISC-V chip, and the output left and right channel analog quantities are directly connected to the inverting input end of the sound effect amplifier module. After the signal is amplified by the sound effect amplifier module, the sound of the FM radio is output through the speaker module.
3. The digital audio interface based on RISC-V chip according to claim 2, characterized in that: The FM radio uses Quitic's QN8035 chip, supports full-band tuning from 60MHz to 108MHz, and the output analog signal is directly input into the inverting input terminal of the audio amplifier module.
4. The digital audio interface based on RISC-V chip according to claim 1, characterized in that: The audio power amplifier module adopts the LM4871 audio power amplifier.
5. The digital audio interface based on RISC-V chip according to claim 1, characterized in that: The microphone adopts a digital microphone and outputs a pulse density modulation signal PDM to the RISC-V chip.
6. The digital audio interface based on RISC-V chip according to claim 5, characterized in that: The digital microphone adopts the MSM261D digital microphone head, the power supply voltage is 1.8V or 3.3V, and the output interface is a two-wire pulse density modulation signal PDM.
7. The digital audio interface based on RISC-V chip according to claim 1, characterized in that: The PWM-DAC conversion module adopts a first-order RC circuit structure, and the filter cutoff frequency fc is 1 / 2*πRC; wherein R and C are the resistance impedance and capacitance value in the first-order RC circuit structure respectively.
8. The digital audio interface based on RISC-V chip according to claim 6, characterized in that: The conversion frequency of the PWM-DAC conversion module is the repetition frequency of the pulse, that is, one cycle; The resolution of the PWM-DAC conversion module is the accuracy of the pulse width relative to the entire period, and the period of the pulse width modulation signal PWM is 256 times the time of a minimum pulse ON.
9. The digital audio interface based on RISC-V chip according to claim 6, characterized in that: The pulse repetition frequency to be filtered is 50-100 times the cutoff frequency of the filter to ensure that the filter can filter the AC part and shorten the settling time; At the same time, the design parameters of the filter meet the following requirements: R+C>>Rin, C< <RL; Among them, R and C are the resistance impedance and capacitance value in the first-order RC circuit structure respectively, Rin is the output impedance of the previous stage, and RL is the input impedance of the next stage.
