[go: up one dir, main page]

CN113851103B - Audio noise reduction accelerator system and method based on RISC v custom instruction set expansion - Google Patents

Audio noise reduction accelerator system and method based on RISC v custom instruction set expansion Download PDF

Info

Publication number
CN113851103B
CN113851103B CN202111037629.XA CN202111037629A CN113851103B CN 113851103 B CN113851103 B CN 113851103B CN 202111037629 A CN202111037629 A CN 202111037629A CN 113851103 B CN113851103 B CN 113851103B
Authority
CN
China
Prior art keywords
instruction
core
data
noise reduction
audio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111037629.XA
Other languages
Chinese (zh)
Other versions
CN113851103A (en
Inventor
袁军
赵强
孟祥胜
李军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jusheng Technology Co ltd
Original Assignee
Shenzhen Jusheng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jusheng Technology Co ltd filed Critical Shenzhen Jusheng Technology Co ltd
Priority to CN202111037629.XA priority Critical patent/CN113851103B/en
Publication of CN113851103A publication Critical patent/CN113851103A/en
Application granted granted Critical
Publication of CN113851103B publication Critical patent/CN113851103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1787General system configurations
    • G10K11/17879General system configurations using both a reference signal and an error signal
    • G10K11/17881General system configurations using both a reference signal and an error signal the reference signal being an acoustic signal, e.g. recorded with a microphone
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1785Methods, e.g. algorithms; Devices
    • G10K11/17853Methods, e.g. algorithms; Devices of the filter

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Soundproofing, Sound Blocking, And Sound Damping (AREA)

Abstract

本发明请求保护一种基于RISC v自定义指令集拓展的音频降噪加速器系统、方法,属于集成电路技术领域,主要包括:E203_CORE、NICE_CORE、NICE_Interface、E203_SOC、音频编解码WM8731模块、音频降噪FxLMS算法。其中E203_CORE通过NICE_Interface与NICE_CORE相连接,E203_CORE、NICE_CORE与相关外设端口一同组成E203_SOC,E203_SOC与音频编解码WM8731模块相连接,音频降噪FxLMS算法通过软件编程下载到RISC v处理器核内运行。创新点在于相比较ARM指令集架构的处理器而言,采用RISC v自定义指令集的处理器能够对音频降噪FxLMS算法中特定的运算部分进行加速;本发明可以更加优化面积、功耗、颗粒度等问题,同时提高算法的灵活性和可行性。

The present invention claims protection for an audio noise reduction accelerator system and method based on the expansion of RISC v custom instruction set, which belongs to the field of integrated circuit technology, and mainly includes: E203_CORE, NICE_CORE, NICE_Interface, E203_SOC, audio codec WM8731 module, and audio noise reduction FxLMS algorithm. Among them, E203_CORE is connected to NICE_CORE through NICE_Interface, E203_CORE, NICE_CORE and related peripheral ports together form E203_SOC, E203_SOC is connected to the audio codec WM8731 module, and the audio noise reduction FxLMS algorithm is downloaded to the RISC v processor core through software programming for operation. The innovation point is that compared with the processor of ARM instruction set architecture, the processor using RISC v custom instruction set can accelerate the specific operation part of the audio noise reduction FxLMS algorithm; the present invention can further optimize the problems of area, power consumption, granularity, etc., while improving the flexibility and feasibility of the algorithm.

Description

Audio noise reduction accelerator system and method based on RISC v custom instruction set expansion
Technical Field
The invention belongs to the technical field of integrated circuits, and particularly relates to an audio noise reduction accelerator system and method based on RISC v custom instruction set expansion.
Background
Along with the development of economy and the continuous progress of technology, the application scenes of the audio noise reduction system are more and more, such as in-car noise reduction, in-gas station noise reduction, earphone noise reduction and the like. However, at present, a mode of passive noise reduction such as physical noise isolation is often adopted, a mode of active noise reduction and cancellation of superposition of sound source signals is often difficult to realize by hardware, and an improved excellent algorithm is difficult to realize by hardware by using an FPGA, so that an improved algorithm can be realized by adopting a software implementation mode, and the method is an important means for solving the problem that an audio noise reduction algorithm is difficult to realize.
Meanwhile, RISC v is an emerging instruction set architecture, and has the advantages of open source and late issue. Aiming at the embedded field, the soft core adopting the instruction set architecture can customize instructions, and aiming at the product accumulation structure and the convolution structure in the algorithm, a special accelerating unit circuit can be customized, so that the special design field of audio noise reduction is realized. With the fierce promotion of RISC v instruction set architecture in China, the design of the SOC chip in the special field can be greatly developed.
Then, with the rising of AIOT in China, aiming at the problems of running speed of a processor core and the like, a plurality of different types of accelerators, such as neural network accelerators aiming at images, are generated, wherein the conventional hardware FxLMS algorithm is not suitable for accelerating specific operation of the accelerators, and a multiplier and an adder make the hardware implementation of the FxLMS algorithm more challenging along with the complexity of the algorithm, so that the FPGA+MCU architecture is adopted for cooperation of software and hardware, the implementation of the algorithm is realized by software, the acceleration of the hardware aiming at specific operation is realized, and new directions and possibilities are presented in an audio noise reduction system.
The traditional noise reduction method is that, for example, amplitude value angle values of a plurality of noise audio signals are extracted, then training is carried out by using a neural network to determine a complex spectrum of a pure audio signal, then the obtained complex spectrum is subjected to inverse transformation, and finally audio noise reduction is carried out according to the inverse transformation. The mode does not have flexibility, retraining is needed for different noise sources, and meanwhile, the mode also does not have flexibility of adopting software and hardware cooperative processing, so that the audio noise reduction accelerator system expanded based on the RISC v custom instruction set provides a new method for audio noise reduction.
Disclosure of Invention
The present invention is directed to solving the above problems of the prior art. The invention provides an audio noise reduction accelerator system and a method based on RISC v user-defined instruction set expansion, which can realize flexible alterability of an algorithm, stability of transmission, rapidness of operation and strong specificity, and can be widely used in the noise reduction fields of sound sources such as automobile noise reduction, earphone noise reduction, high-speed railway plane noise reduction and the like, and the technical scheme of the invention is as follows:
An audio noise reduction accelerator system based on RISC v custom instruction set expansion comprises an E203_CORE (a buzzer E203 open source processor CORE), an NICE_CORE (a custom coprocessor), an NICE_interface (an Interface circuit between a main processor and a coprocessor), an E203_SOC (a system on a chip built by taking the E203 as a CORE), an audio codec WM8731 module and an audio noise reduction FxLMS algorithm, wherein,
The E203_CORE is connected with the NICE_CORE through the NICE_interface, the E203_CORE, the NICE_CORE and related peripheral ports form an E203_SOC, the E203_SOC is connected with an Audio encoding/decoding WM8731 module, and an Audio noise reduction FxLMS algorithm is downloaded into a RISC v processor CORE through software programming to run; after the system is started, the E203_CORE is initialized, then an IIC Interface circuit on a peripheral bus is accessed according to instruction sequence, an Audio codec module WM8731 is configured according to the instruction, then a sound source signal after superposition of a sound signal and target noise is acquired through a reference microphone, residual noise is acquired through an error microphone, the acquired sound source signal and residual noise pass through an Audio_data_rx of the WM8731 module, an analog signal is converted into a digital signal through an ADC conversion module built in the WM8731 module, then a digital filter module built in the WM8731 module is used for filtering processing, the filtered digital signal is transmitted to the peripheral bus through an IIS Interface circuit, then the filtered digital signal is acquired from the peripheral bus according to the instruction and is transmitted to a software implementation flow of an FxLMS algorithm for processing, a decoding part in the E230_CORE is detected as a self-defined instruction when the convolution product is processed and accumulated and calculated, a specific instruction is transmitted to the peripheral bus through an Interface filter module, then the filter module is used for transmitting the digital signal after the special instruction is processed, the channel is transmitted to the peripheral bus for the channel, the channel is processed after the channel is finished, and the channel is finished, and then the digital signals are transmitted to a WM8731 Audio encoding and decoding module through an IIS peripheral interface circuit to be converted into analog signals, the analog signals are transmitted to a secondary sound source through audio_data_tx to obtain inverted noise, and finally the obtained inverted noise is interfered with target noise to be cancelled, so that active noise reduction of Audio is carried out, and an Audio noise reduction system is realized.
Further, the e203_soc is composed of e203_core, nice_core, icb_apb, UART serial port, IIC Interface and IIS Interface; wherein, E203_CORE is a processor CORE for running instructions and executing the instructions in sequence, and controlling corresponding modules according to the instruction content to process data information, a general register Reg of an execution unit EXU in E203_CORE stores processed data returned by a coprocessor, a data tight coupler DTCM in a memory control unit LSU in E203_CORE provides data corresponding to a source register index to be transmitted to the coprocessor, so that a custom instruction can perform read-write access of the data, NICE_interface is used for communication transmission between E203_CORE and NICE_CORE, NICE_CORE is used for accelerating the data transmitted from the processor CORE, the custom instruction is acquired through NICE_interface, then the corresponding custom instruction is found through decoding Decode, namely Lbuf, sbuf, conv, mac, then data access storage or data processing and write-back are carried out according to the functions of the corresponding instructions, wherein the Lbuf instruction is a loading process of data, data acquisition is carried out from a DTCM in an LSU and the data are stored into a Buf, the Sbuf instruction is a data storage process, the data in the Buf are stored into the DTCM in the LSU, the Conv instruction is a convolution operation of acquiring a weight coefficient and an input signal from the Buf and writing the acquired operation result back to a Reg in the EXU, the Mac instruction is a multiplication and accumulation operation of acquiring the weight coefficient and an error component from the Buf and temporarily storing the operation result to the Buf, the whole result is written back to the Reg in the EXU after the operation is finished, the whole process is controlled by a finite state machine FSM for state transition, the ICB_APB is used for communication transmission between a processor CORE and each peripheral Interface, the UART serial port is used for transmitting ADCDATA and DACDATA to an upper computer for storage, so that MATLAB is convenient for analyzing data, the IIC interface is used for checking the configuration of registers by the audio codec WM8731 module by the processor, and the IIS interface is used for transmitting data between the processor core and the audio codec WM8731 module.
Further, the nice_core decodes the custom instruction and the signal including the source operand register address transmitted from the e203_core through nice_interface, decodes the custom instruction by comparing the specific format parts thereof to obtain a corresponding custom instruction, and then executes the corresponding custom instruction under the control of the state machine.
Further, an internal ADC, a DAC and a digital filter are disposed in the audio codec module WM8731, an external sound source to be processed is collected in an MIC transmission collection mode, an analog signal is converted from an analog signal to a digital signal through the internal ADC, the obtained digital signal is filtered by the internal digital filter to obtain output data ADCDATA, and the output data DACDATA after RISC v soft kernel processing is input to the DAC in the audio codec module to convert the digital signal to the analog signal, and the converted analog signal is output through the MIC.
Furthermore, the audio codec module WM8731 is internally provided with an IIC interface circuit, which can perform configuration in master-slave mode, ADC and DAC enable selection, and operations including volume size and whether to turn on digital filtering in MIC and LINE modes, and since the principle of the ANC audio noise reduction system is to use destructive interference of sound waves, the configuration WM8731 module is configured to be slave mode, MIC mode, ADC and DAC enable, and the register configuration information is configured by e203_core through the IIC interface bus.
Furthermore, the audio frequency noise reduction FxLMS algorithm is compiled by taking a C language as a description language and an inline assembly language as an auxiliary language, an executable file is downloaded into a RISC v soft core through compiling and assembling links by IDE software, and the FxLMS audio frequency noise reduction algorithm is realized in a software mode through executing instructions.
Further, in the software implementation of the audio noise reduction FxLMS algorithm, the digital signal obtained after the noise reduction processing of the digital signal to be processed is subjected to the noise reduction processing by adopting the following formula:
y(n)=y(n)+w(n)(k-2)x(n)
e(n)=d(n)-ys(n)
d(n)=p(n)*x(n)
ys(n)=s(n)*y(n)
Wherein y (n) is a secondary sound source, w (n) (k) is a weight coefficient, x (n) is a sound source signal, e (n) is an error signal, d (n) is a residual noise, y s (n) is a secondary sound source passing through the secondary path, p (n) is a reference signal from the sound source signal to the error microphone, s (n) is a signal generated from the secondary sound source to the error microphone secondary path, The estimated value of the sound source signal, wherein the constraint on the step factor is specifically:
wherein mu is the step size of FxLMS algorithm, and lambda max is the maximum value of the eigenvalue of the autocorrelation matrix.
An audio noise reduction method based on the system, comprising the steps of:
Firstly, storing an executable file generated after compiling and assembling links of a C language program through an off-chip Flash memory, after a system is started, initializing E203_CORE, then executing and accessing an IIC interface circuit on a peripheral bus according to an instruction sequence, and firstly configuring an audio encoding and decoding module WM8731 through the IIC interface circuit according to the instruction;
Secondly, a sound source signal after superposition of a sound signal and target noise is collected through a reference microphone, residual noise is collected through an error microphone, the collected sound source signal and the residual noise pass through an audio_data_rx of a WM8731 module, an analog signal is converted into a digital signal through an ADC conversion module built in the WM8731 module, then filtering processing is carried out through a digital filter module built in the WM8731 module, and the filtered digital signal is transmitted to a peripheral bus through an IIS interface circuit;
Then, obtaining a filtered digital signal from a peripheral bus according to an instruction, transmitting the filtered digital signal to an E203_CORE for processing according to a software implementation flow of FxLMS algorithm, wherein a decoded part in the E203_CORE is detected to be a custom instruction when a multiply-accumulate operation and a convolution operation are processed, the E203_CORE transmits the custom instruction and a source operand to the NICE_CORE through the NICE_interface for acceleration of a specific operation part, the multiply-accumulate operation calls a Mac instruction circuit, and the convolution operation calls a Conv instruction circuit;
then, the processed digital signals are transmitted back to the peripheral bus according to the instruction, the digital signals processed by the noise reduction FxLMS algorithm are output, and then are transmitted to the WM8731 audio encoding and decoding module through the IIS peripheral interface circuit to be subjected to DAC conversion, the processed digital signals are converted into analog signals, and the analog signals are transmitted to the secondary sound source through the audio data transmitting end to obtain anti-phase noise;
And finally, the interference of the anti-phase noise and the target noise is cancelled, so that the active noise reduction of the audio is carried out, and the audio noise reduction system is realized.
Further, a custom instruction set coding format is defined in the coprocessor, 4 custom instructions are involved in total, namely an LBUF instruction, an SBUF instruction, a CONV instruction and an MAC instruction, wherein the LBUF instruction and the SBUF instruction are respectively in a3 'b 010 format, the LBUF instruction and the SBUF instruction are respectively in a mode of being operated on BUF of the same address, so that difference is needed by an opcode field, namely 7' b0001011 and 7 'b 0101011, and the LBUF instruction are respectively determined by a custom0 field and a custom1 field, the SBUF instruction only needs to read and write data from a DTCM, and does not need to write data, so that only source operand 1, namely rs1, is needed, funct fields are defined as 3' b010 formats, representing only operating on source operand register 1, and rs2 are not used, as a length selection of data to be read or written is needed, funct fields are defined as initial addresses stored in the custom F, the CONV instruction only needs to return data to a target register, namely a target register is needed to be read and a target register, namely a virtual register is required to be read and a virtual register is required to be read, namely a virtual register is required to be read and a virtual register is required to be 2, namely a combination of the two-3, namely a virtual register is 3, a virtual register is 3 is defined by a virtual register is 3, namely a virtual register is 3, a virtual register is 3, and a virtual register is defined by a virtual register is 3, and a virtual register is required to be 3, and a virtual register is 3.
Furthermore, the data information to be processed can be loaded through the LBUF instruction, then the data information is stored in two pseudo dual-port SRAMs of XBUF and QBUF, and WBUF defines an empty pseudo dual-port SRAM in an initial value form. And then, reading data through a CONV instruction to XBUF and WBUF, wherein the instruction is a convolution operation unit circuit adopting an addition tree structure, the data length is determined by the order of a filter, namely, when the order of the filter is J, a signal X [ J-1:0] to be processed and a weight coefficient W [ J-1:0] are processed, the operation result is obtained and then stored in YBUF for FIFO storage, and the width and the depth are defined as the data width and the order length of the filter. And adding the product of QBUF and the error coefficient with the weight coefficient WBUF of the last column to obtain a new weight coefficient WBUF through the MAC instruction, writing the new weight coefficient into the new weight coefficient through the MAC instruction, and updating the weight, wherein the product of the error coefficient is obtained by subtracting data stored in the primary noise signal Dn and YBUF to obtain a product of the error coefficient and a step length factor, and repeating the steps until all the outputs fill the depth of the FIFO.
The invention has the advantages and beneficial effects as follows:
1. the invention adopts RISC v soft core SOC, has high configurability, can configure different peripheral interface circuits according to different requirements of functions, and simultaneously eliminates some interface peripherals which are not used in the circuits, thereby reducing the waste of resources.
2. The invention adopts RISC v instruction set architecture, which can define instructions according to the operation key steps in the algorithm, and then adopts the format of inline assembly to design a hardware acceleration unit so as to accelerate the specific operation key steps. The algorithm has faster operation speed, and can better reduce the instruction number and the execution cycle number.
3. The invention adopts the hardware IIS interface circuit, can stably transmit the audio signal, can meet the selection of different sampling rates and sampling byte numbers by configurable FIFO width and depth, clock units and the like, and has wider application range.
4. The invention adopts four custom instructions to accelerate operation, wherein the CONV instruction only uses a multiplier and an adder to form a convolution operation unit by adopting an addition tree structure, which can multiplex instruction circuits for convolution operation for a plurality of times in an algorithm, and the MAC instruction can multiplex a product accumulation part in the algorithm for a plurality of times, thereby reducing hardware resources consumed by the development of the whole coprocessor and reducing granularity thereof.
5. The invention adopts a software mode to realize FxLMS algorithm, utilizes a jacobian formula to calculate the maximum eigenvalue of the matrix, and then calculates the reciprocal to obtain the step factor. Compared with a pure hardware implementation mode, the software implementation is more feasible and difficult without hardware implementation, meanwhile, the software implementation has better flexibility, the hardware acceleration unit can be used for partially accelerating the RISC v instruction set system, and the advantages of hardware and software development are converged by adopting a processing mode of cooperation of software and hardware.
Drawings
FIG. 1 is a diagram of an audio noise reduction accelerator system architecture in accordance with a preferred embodiment of the present invention;
FIG. 2 is a schematic diagram of a NICE_interface circuit;
FIG. 3 is a diagram of custom instruction set encoding;
FIG. 4 is a block diagram of a convolution operation and multiply-accumulate operation circuit;
FIG. 5 is a block diagram of a hardware model of the FxLMS algorithm;
FIG. 6 is a flow chart of the C language implementation of the FxLMS algorithm;
FIG. 7 is a diagram of a joint simulation of the MAC custom instruction set VIVADO.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and specifically described below with reference to the drawings in the embodiments of the present invention. The described embodiments are only a few embodiments of the present invention.
The technical scheme for solving the technical problems is as follows:
The invention relates to an audio noise reduction accelerator system based on RISC v user-defined instruction set expansion, which is shown in a figure 1, and structurally comprises an E203_CORE, an NICE_CORE, an NICE_ INTERFACE, E203_SOC, an audio encoding and decoding WM8731 module and an audio noise reduction FxLMS algorithm, wherein:
The E203_SOC is composed of an E203_CORE, a NICE_CORE, an ICB_APB, a UART serial port, an IIC Interface and an IIS Interface; wherein, save the executable file produced after compiling and assembling the interlinkage through the off-chip Flash memory, after the system starts, at first E203_CORE is initialized, then according to the order execution of instructions to visit IIC Interface circuit on the peripheral bus, at first dispose the Audio codec module WM8731 through IIC Interface circuit according to the instruction, afterwards, collect the sound signal and the sound source signal after the target noise is superimposed through the reference microphone, collect the residual noise through the error microphone, pass the sound source signal and residual noise collected through the Audio_data_rx of WM8731 module, pass the ADC conversion module built-in by WM8731 module, convert the analog signal into the digital signal, then carry on the filter process through the digital filter module built-in by WM8731 module, transmit the digital signal after the filter to the peripheral bus through IIS Interface circuit, then obtain the digital signal after the filter according to the instruction from the peripheral bus and transmit to the E203_CORE in accordance with the software implementation flow of FxLMS algorithm, wherein, at the time of processing operation and convolution operation, because of adopting the custom instruction of the interior-connected instruction in C to define the Interface instruction, then the user-defined by the Interface instruction is transmitted to the peripheral bus, the instruction is processed, the user-defined by the user-defined instruction is carried out, the accumulating instruction is carried out, after the instruction is processed by the user-defined instruction, the digital signal after the user-defined instruction is accumulated instruction is processed by the Interface instruction, and the instruction is output by the Interface instruction, and the instruction is processed, and then the digital signals are transmitted to a WM8731 Audio encoding and decoding module through an IIS peripheral interface circuit to be converted into analog signals, the analog signals are transmitted to a secondary sound source through audio_data_tx to obtain inverted noise, and finally the obtained inverted noise is interfered with target noise to be cancelled, so that active noise reduction of Audio is carried out, and an Audio noise reduction system is realized.
In order to enable good time sequence stability between the NICE_CORE and the E203_CORE, an Interface circuit NICE_interface shown in figure 2 is adopted, when an EXU execution module detects that an instruction is a self-defined instruction, the instruction and source operand information are transmitted to the NICE_CORE through judging the encoding condition of the operation code and function 3 part of the instruction, the NICE_CORE carries out operation acceleration of a coprocessor part under the control of an internal FSM (state machine), particularly a convolution operation and multiply-accumulate operation part, when the processor needs to access data in a DTCM (data transfer control) in an LSU, the processor sends address read-write request, write data and other information to the LSU, and after the LSU returns a read result, the processor processes the data, judges whether the data needs to return to a target register according to a self-defined instruction encoding rule after the processing is finished, and returns the result to a general register in the EXU if the data needs to be processed.
The invention adopts the definition of the custom instruction set reserved by RISC v international authorities, as shown in figure 3, the opcode field, funct field and funct field determine the difference of the custom instruction set, and rd, rs1, rs2 and the like represent a written-back target register, a written-back source operand register 1 and a written-back source operand register 2 respectively. In the present invention, a total of 4 custom instructions, namely LBUF instruction, SBUF instruction, CONV instruction and MAC instruction, are respectively involved, wherein LBUF instruction and SBUF instruction are respectively determined by custom0 and custom1 because they operate BUF of the same address, namely 7 'b 0001011 and 7' b0101011, respectively, because SBUF and LBUF instructions only need to read and write data from DTCM and do not need to write back data, only need to use source operand 1, namely rs1, funct3 field is defined as 3 'b 010 format, representing that only source operand register rs1 is operated, because rd and rs2 are not used, this part can be defined as the length selection of the read or written data, the funct field is defined as the starting address of the load store in the BUF, wherein the CONV instruction only needs the target register to return data, so that the returned target register needs to be operated, that is, the rd, funct \ funct7\rs1\rs2 and other parts are combined, the data X [9:0] and the weight coefficient W [9:0] which are defined as the processing of the CONV instruction are read by the pseudo dual-port SRAM and transferred to the CONV circuit part for operation, the MAC instruction needs to call the target register and the source operand for operation, so that the funct field is defined as 3' b111 format, the funct field does not define requirements, the opcodes of the CONV and the MAC instruction are defined as four types of cure, and the invention uses cure 3 and cure 4, that is 7 'b 1011011 and 7' b1111011.
The operation part of the self-defined instruction in the invention is shown in fig. 4, the information of the data to be processed can be loaded through the LBUF instruction, then the information is stored in two pseudo dual-port SRAMs of XBUF and QBUF, and WBUF defines an empty pseudo dual-port SRAM in the form of initial value. And then, reading data through a CONV instruction to XBUF and WBUF, wherein the instruction is a convolution operation unit circuit adopting an addition tree structure, the data length is determined by the filter order, namely, when the filter order is J, the signal X [ J-1:0] to be processed and the weight coefficient W [ J-1:0] are stored in YBUF for FIFO storage after the operation result is obtained, and the width and the depth are defined as the data width and the order length of the filter. And adding the product of QBUF and the error coefficient with the weight coefficient WBUF of the last column to obtain a new weight coefficient WBUF through the MAC instruction, writing the new weight coefficient into the new weight coefficient through the MAC instruction, and updating the weight, wherein the product of the error coefficient is obtained by subtracting data stored in the primary noise signal Dn and YBUF to obtain a product of the error coefficient and a step length factor, and repeating the steps until the depths of all output FIFOs are filled.
The hardware model of the typical FxLMS algorithm is shown in the figure 5, the input sequence is multiplied by the weight coefficient after passing through the delayer, the output sequence is obtained by accumulation, the weight coefficient is updated and iterated after entering the LMS, the step is repeated for a plurality of times, the input sequence is updated for a plurality of times, the sequence after the noise reduction algorithm is obtained, and meanwhile, the following operation formula can be extracted through the hardware model of the FxLMS algorithm:
y(n)=y(n)+w(n)(k-2)x(n)
e(n)=d(n)-ys(n)
d(n)=p(n)*x(n)
ys(n)=s(n)*y(n)
and writing a C language program shown in figure 6 on the formula, adding a specific hardware acceleration unit circuit aiming at a specific operation part in the algorithm, adding a convolution operation unit aiming at a digital filter part, and adding a product accumulation circuit aiming at a part with updated weight coefficient to accelerate operation, so that the advantages of a RISC v instruction set architecture are reflected.
Finally, as shown in fig. 7, the result after carrying out VIVADO joint simulation by adopting the MAC custom instruction can be seen from the figure, and the specific instruction format, the information such as the data to be processed loaded and the data obtained by the last operation can be known to have complete hardware acceleration part of the whole system.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The above examples should be understood as illustrative only and not limiting the scope of the invention. Various changes and modifications to the present invention may be made by one skilled in the art after reading the teachings herein, and such equivalent changes and modifications are intended to fall within the scope of the invention as defined in the appended claims.

Claims (10)

1.一种基于RISC v自定义指令集拓展的音频降噪加速器系统,其特征在于,包括:E203_CORE、NICE_CORE、NICE_Interface、E203_SOC、音频编解码WM8731模块、音频降噪FxLMS算法,E203_CORE为蜂鸟E203开源处理器内核,NICE_CORE为自定义协处理器,NICE_Interface为主处理器与协处理器之间的接口电路,E203_SOC为以E203为内核搭建的片上系统,其中,所述E203_CORE通过NICE_Interface与NICE_CORE相连接,E203_CORE、NICE_CORE与相关外设端口一同组成E203_SOC,E203_SOC与音频编解码WM8731模块相连接,音频降噪FxLMS算法通过软件编程下载到RISC v处理器核内运行;通过片外Flash存储器保存可执行文件,系统启动之后,首先E203_CORE进行初始化,然后根据指令顺序执行访问外设总线上的IIC接口电路,首先通过IIC接口电路配置音频编解码模块WM8731,其后,通过参考麦克风采集声音信号和目标噪声叠加之后的声源信号,通过误差麦克风采集到残余噪声,将采集到的声源信号和残余噪声经过WM8731模块的Audio_data_rx,通过WM8731模块内置的ADC转换模块,将模拟信号转变成数字信号,之后通过WM8731模块内置的数字滤波器模块进行滤波处理,把滤波之后的数字信号通过IIS接口电路传输到外设总线上,然后根据指令从外设总线上获取滤波后的数字信号并传输至E203_CORE内按照FxLMS算法的软件实现流程进行处理,其中在处理乘积累加运算和卷积运算的时候,将被E230_CORE中的译码部分检测出为自定义指令,E203_CORE则通过NICE_Interface将自定义指令和源操作数传递给NICE_CORE进行特定运算部分的加速,其中乘积累加运算将会调用Mac指令电路,卷积运算则会调用Conv指令电路,之后又根据指令执行将处理之后的数字信号传输至外设总线,将经过FxLMS算法降噪处理之后的数字信号进行输出,再通过IIS外设接口电路传输至WM8731音频编解码模块中进行DAC转换,将处理之后的数字信号转变成模拟信号,通过Audio_data_tx传输至次级声源得到反相噪声,最后得到的反相噪声与目标噪声干涉相消,从而进行音频的主动降噪,实现音频降噪系统。1. An audio noise reduction accelerator system based on RISC v custom instruction set expansion, characterized in that it includes: E203_CORE, NICE_CORE, NICE_Interface, E203_SOC, audio codec WM8731 module, audio noise reduction FxLMS algorithm, E203_CORE is the hummingbird E203 open source processor core, NICE_CORE is a custom coprocessor, NICE_Interface is the interface circuit between the main processor and the coprocessor, E203_SOC is a system on chip built with E203 as the core, wherein the E203_CORE is connected to NICE_CORE through NICE_Interface, E203_CORE, NICE_CORE and related peripheral ports together form E203_SOC, E203_SOC is connected to the audio codec WM8731 module, and the audio noise reduction FxLMS algorithm is downloaded to RISC through software programming v runs in the processor core; the executable file is saved in the off-chip Flash memory. After the system starts, E203_CORE is initialized first, and then the IIC interface circuit on the peripheral bus is accessed according to the instruction sequence. First, the audio codec module WM8731 is configured through the IIC interface circuit. Then, the sound signal and the sound source signal after the superposition of the target noise are collected through the reference microphone, and the residual noise is collected through the error microphone. The collected sound source signal and residual noise are passed through the Audio_data_rx of the WM8731 module, and the analog signal is converted into a digital signal through the built-in ADC conversion module of the WM8731 module. After that, the digital filter module built in the WM8731 module is used for filtering, and the filtered digital signal is transmitted to the peripheral bus through the IIS interface circuit. Then, according to the instruction, the filtered digital signal is obtained from the peripheral bus and transmitted to the software in E203_CORE according to the FxLMS algorithm. The implementation process is processed, wherein when processing the multiplication and accumulation operation and the convolution operation, they will be detected as custom instructions by the decoding part in E230_CORE, and E203_CORE will pass the custom instructions and source operands to NICE_CORE through NICE_Interface to accelerate the specific operation part, wherein the multiplication and accumulation operation will call the Mac instruction circuit, and the convolution operation will call the Conv instruction circuit, and then according to the instruction execution, the processed digital signal will be transmitted to the peripheral bus, and the digital signal after the FxLMS algorithm noise reduction processing will be output, and then transmitted to the WM8731 audio codec module through the IIS peripheral interface circuit for DAC conversion, and the processed digital signal will be converted into an analog signal, and transmitted to the secondary sound source through Audio_data_tx to obtain the anti-phase noise, and finally the anti-phase noise obtained will interfere with the target noise, thereby performing active noise reduction of the audio and realizing the audio noise reduction system. 2.根据权利要求1所述的一种基于RISC v自定义指令集拓展的音频降噪加速器系统,其特征在于,所述E203_SOC由E203_CORE、NICE_CORE、ICB_APB、UART串口、IIC接口及IIS接口组成;其中,E203_CORE为处理器核用于运行指令并按照顺序执行指令,同时根据指令内容控制相应的模块对数据信息进行处理,在E203_CORE中的执行单元EXU的通用寄存器Reg则将协处理器传回的处理后的数据进行保存,在E203_CORE中的访存控制单元LSU中的数据紧耦合器DTCM则是提供源寄存器索引对应的数据传递给协处理器,使自定义指令能够进行数据的读写访问,NICE_Interface用于E203_CORE与NICE_CORE之间通信传输,NICE_CORE用于对处理器核中传来的数据进行加速处理,通过NICE_Interface获取到自定义指令,然后通过译码Decode寻找到对应的自定义指令,指令即Lbuf、Sbuf、Conv、Mac,然后根据相应指令的功能进行数据访问存储或者数据处理并进行写回,其中Lbuf指令则是进行数据的加载过程,从LSU中的DTCM中进行数据的获取并将其存储到Buf,Sbuf指令则是进行数据存储过程,将Buf中的数据存储回到LSU中的DTCM中,Conv指令则是从Buf中获取权值系数和输入信号进行卷积运算,并将得到的运算结果写回至EXU中的Reg,Mac指令则是从Buf获取权值系数和误差分量进行乘积累加运算,并将运算结果暂存至Buf,待运算结束之后将整个结果写回至EXU中的Reg,整个过程则是由一个有限状态机FSM进行状态转移的控制,ICB_APB则用于处理器核与各个外设接口之间的通信传输,UART串口用于把ADCDATA和DACDATA传输至上位机进行保存,便于用MATLAB对数据进行分析,IIC接口用于处理器核对音频编解码WM8731模块进行寄存器的配置,及IIS接口用于处理器核与音频编解码WM8731模块之间的数据传输。2. A RISC-based system according to claim 1. v An audio noise reduction accelerator system expanded by a custom instruction set, characterized in that the E203_SOC is composed of E203_CORE, NICE_CORE, ICB_APB, UART serial port, IIC interface and IIS interface; wherein E203_CORE is a processor core used to run instructions and execute instructions in sequence, and at the same time control the corresponding module to process data information according to the instruction content, the general register Reg of the execution unit EXU in E203_CORE saves the processed data returned by the coprocessor, and the data tight coupler DTCM in the memory access control unit LSU in E203_CORE provides data corresponding to the source register index to the coprocessor, so that the custom instruction can read and write data, NICE_Interface is used for communication and transmission between E203_CORE and NICE_CORE, NICE_CORE is used to accelerate the processing of data transmitted from the processor core, obtain the custom instruction through NICE_Interface, and then find the corresponding custom instruction through decoding Decode, the instruction is Lbuf, Sbuf, Conv, Mac, and then root According to the function of the corresponding instruction, data access storage or data processing and writing back are performed. Among them, the Lbuf instruction is the data loading process, which obtains data from the DTCM in the LSU and stores it in Buf. The Sbuf instruction is the data storage process, which returns the data in Buf to the DTCM in the LSU. The Conv instruction obtains the weight coefficient and the input signal from Buf for convolution operation, and writes the obtained operation result back to Reg in EXU. The Mac instruction obtains the weight coefficient and the error component from Buf for multiplication and accumulation operation, and temporarily stores the operation result in Buf. After the operation is completed, the entire result is written back to Reg in EXU. The whole process is controlled by a finite state machine FSM for state transfer. ICB_APB is used for communication transmission between the processor core and various peripheral interfaces. The UART serial port is used to transmit ADCDATA and DACDATA to the host computer for storage, which is convenient for analyzing data with MATLAB. The IIC interface is used by the processor core to configure the registers of the audio codec WM8731 module, and the IIS interface is used for data transmission between the processor core and the audio codec WM8731 module. 3.根据权利要求1或2所述的一种基于RISC v自定义指令集拓展的音频降噪加速器系统,其特征在于,所述NICE_CORE通过NICE_Interface将E203_CORE传递过来的自定义指令、源操作数寄存器地址在内的信号进行译码操作,通过对比其具体格式部分,译码得到相应的自定义指令,然后在状态机的调控下,进行相应自定义指令的执行。3. According to claim 1 or 2, an audio noise reduction accelerator system based on RISC v custom instruction set expansion is characterized in that the NICE_CORE decodes the signals including the custom instructions and source operand register addresses transmitted by E203_CORE through NICE_Interface, and decodes the corresponding custom instructions by comparing the specific format parts, and then executes the corresponding custom instructions under the regulation of the state machine. 4.根据权利要求1或2所述的一种基于RISC v自定义指令集拓展的音频降噪加速器系统,其特征在于,所述音频编解码模块WM8731的内部设置有一个内置的ADC和一个DAC以及一个数字滤波器,通过MIC传输采集模式,采集外部的待处理声源,经过其内置ADC进行模拟信号到数字信号的转变,然后将得到的数字信号经过内置数字滤波器进行滤波处理,得到输出数据ADCDATA,然后通过RISC v软核处理之后的数据DACDATA输入到音频编解码模块中的DAC,进行数字信号到模拟信号的转换,将转换之后的模拟信号通过MIC进行输出。4. According to claim 1 or 2, an audio noise reduction accelerator system based on RISC v custom instruction set expansion is characterized in that the audio codec module WM8731 is internally provided with a built-in ADC, a DAC and a digital filter. The MIC transmission acquisition mode is used to collect the external sound source to be processed, and the analog signal is converted to a digital signal through its built-in ADC, and then the obtained digital signal is filtered through the built-in digital filter to obtain output data ADCDATA, and then the data DACDATA after processing by the RISC v soft core is input into the DAC in the audio codec module to convert the digital signal to the analog signal, and the converted analog signal is output through the MIC. 5.根据权利要求4所述的一种基于RISC v自定义指令集拓展的音频降噪加速器系统,其特征在于,所述音频编解码模块WM8731内部设置IIC接口电路,可以进行主从模式的配置、ADC、DAC使能选择及MIC和LINE模式下音量大小和是否开启数字滤波在内的操作,由于ANC音频降噪系统的原理是利用声波的相消干涉,因此这里将配置WM8731模块为从机模式、MIC模式、ADC、DAC使能,寄存器配置信息将由E203_CORE通过IIC接口总线进行寄存器的配置。5. According to claim 4, an audio noise reduction accelerator system based on RISC v custom instruction set expansion is characterized in that an IIC interface circuit is set inside the audio codec module WM8731, which can perform operations including master-slave mode configuration, ADC, DAC enable selection, volume size in MIC and LINE modes, and whether to turn on digital filtering. Since the principle of the ANC audio noise reduction system is to use the destructive interference of sound waves, the WM8731 module will be configured as slave mode, MIC mode, ADC, DAC enable, and the register configuration information will be configured by E203_CORE through the IIC interface bus. 6.根据权利要求5所述的一种基于RISC v自定义指令集拓展的音频降噪加速器系统,其特征在于,所述音频降噪FxLMS算法,编写以C语言为描述语言,内联汇编语言为辅助语言的形式,通过IDE软件进行编译汇编链接下载可执行文件到RISC v软核中,通过指令的执行以软件方式实现FxLMS音频降噪算法。6. According to claim 5, an audio noise reduction accelerator system based on RISC v custom instruction set expansion is characterized in that the audio noise reduction FxLMS algorithm is written in C language as the description language and inline assembly language as the auxiliary language. It is compiled and assembled through IDE software to link and download the executable file to the RISC v soft core, and the FxLMS audio noise reduction algorithm is implemented in software through the execution of instructions. 7.根据权利要求6所述的一种基于RISC v自定义指令集拓展的音频降噪加速器系统,其特征在于,在音频降噪FxLMS算法的软件实现中,将待处理数字信号降噪处理后得到的数字信号,采用如下公式进行降噪处理:7. According to claim 6, an audio noise reduction accelerator system based on RISC v custom instruction set expansion is characterized in that, in the software implementation of the audio noise reduction FxLMS algorithm, the digital signal obtained after the noise reduction processing of the digital signal to be processed is subjected to noise reduction processing using the following formula: y(n)=y(n)+w(n)(k-2)x(n)y(n)=y(n)+w(n)(k-2)x(n) e(n)=d(n)-ys(n)e(n)=d(n) -ys (n) d(n)=p(n)*x(n)d(n)=p(n)*x(n) ys(n)=s(n)*y(n)y s (n) = s (n) * y (n) 其中y(n):次级声源、w(n)(k):权值系数、x(n):声源信号、e(n):误差信号、d(n):残余噪声、ys(n):通过次级路径的次级声源、p(n):声源信号到误差麦克风的参考信号、s(n):次级声源到误差麦克风次级路径产生的信号、声源信号的估计值,其中对步长因子的约束具体为:Where y(n): secondary sound source, w(n)(k): weight coefficient, x(n): sound source signal, e(n): error signal, d(n): residual noise, ys (n): secondary sound source through the secondary path, p(n): reference signal from the sound source signal to the error microphone, s(n): signal generated by the secondary path from the secondary sound source to the error microphone, The estimated value of the sound source signal, where the constraint on the step factor is: 其中μ:FxLMS算法的步长;λmax:自相关矩阵的特征值的最大值。Wherein μ: the step size of the FxLMS algorithm; λ max : the maximum value of the eigenvalue of the autocorrelation matrix. 8.一种基于权利要求1-7任一项所述系统的音频降噪方法,其特征在于,包括以下步骤:8. An audio noise reduction method based on the system according to any one of claims 1 to 7, characterized in that it comprises the following steps: 首先通过片外Flash存储器保存C语言程序编译汇编链接之后产生的可执行文件,系统启动之后,首先E203_CORE进行初始化,然后根据指令顺序执行访问外设总线上的IIC接口电路,根据指令首先通过IIC接口电路配置音频编解码模块WM8731;First, the executable file generated after the C language program is compiled, assembled and linked is saved in the off-chip Flash memory. After the system starts, E203_CORE is initialized first, and then the IIC interface circuit on the peripheral bus is accessed according to the instruction sequence. According to the instruction, the audio codec module WM8731 is first configured through the IIC interface circuit; 其次,通过参考麦克风采集声音信号和目标噪声叠加之后的声源信号,通过误差麦克风采集到残余噪声,将采集到的声源信号和残余噪声经过WM8731模块的Audio_data_rx,通过WM8731模块内置的ADC转换模块,将模拟信号转变成数字信号,之后通过WM8731模块内置的数字滤波器模块进行滤波处理,把滤波之后的数字信号通过IIS接口电路传输到外设总线上;Secondly, the reference microphone collects the sound source signal after the sound signal and the target noise are superimposed, and the error microphone collects the residual noise. The collected sound source signal and residual noise are passed through the Audio_data_rx of the WM8731 module, and the built-in ADC conversion module of the WM8731 module converts the analog signal into a digital signal. After that, the built-in digital filter module of the WM8731 module performs filtering processing, and the filtered digital signal is transmitted to the peripheral bus through the IIS interface circuit; 接着,根据指令从外设总线上获取滤波后的数字信号并传输至E203_CORE内按照FxLMS算法的软件实现流程进行处理,其中在处理乘积累加运算和卷积运算的时候,将被E203_CORE中的译码部分检测出为自定义指令,E203_CORE则通过NICE_Interface将自定义指令和源操作数传递给NICE_CORE进行特定运算部分的加速,其中乘积累加运算将会调用Mac指令电路,卷积运算则会调用Conv指令电路;Next, according to the instruction, the filtered digital signal is obtained from the peripheral bus and transmitted to E203_CORE for processing according to the software implementation process of the FxLMS algorithm. When processing the multiplication and accumulation operation and the convolution operation, the decoding part in E203_CORE will detect it as a custom instruction. E203_CORE will pass the custom instruction and source operand to NICE_CORE through NICE_Interface to accelerate the specific operation part. The multiplication and accumulation operation will call the Mac instruction circuit, and the convolution operation will call the Conv instruction circuit. 然后又根据指令执行将处理之后的数字信号传输回外设总线,将经过降噪FxLMS算法处理之后的数字信号进行输出,再通过IIS外设接口电路传输至WM8731音频编解码模块中进行DAC转换,将处理之后的数字信号转变成模拟信号,通过音频数据发送端传输至次级声源得到反相噪声;Then, according to the instruction execution, the processed digital signal is transmitted back to the peripheral bus, the digital signal processed by the noise reduction FxLMS algorithm is output, and then transmitted to the WM8731 audio codec module through the IIS peripheral interface circuit for DAC conversion, the processed digital signal is converted into an analog signal, and transmitted to the secondary sound source through the audio data sending end to obtain the anti-phase noise; 最后,反相噪声与目标噪声干涉相消,从而进行音频的主动降噪,实现音频降噪系统。Finally, the anti-phase noise and the target noise interfere with each other, thereby performing active audio noise reduction and realizing an audio noise reduction system. 9.根据权利要求8所述的音频降噪方法,其特征在于,一共涉及到4条自定义指令,分别是LBUF指令、SBUF指令、CONV指令、MAC指令,其中LBUF指令和SBUF指令由于对同一个地址的BUF进行操作,所以需要用其opcode字段做区别,分别由custom0、custom1所决定,即7`b0001011和7`b0101011,由于SBUF和LBUF指令只需要从DTCM进行读取和写入操作,并不需要进行数据的写回,因此只需要利用其源操作数1,即rs1,所以funct3字段定义为3`b 010格式,代表只对源操作数寄存器rs1进行操作,由于rd、rs2并未使用,因为可以将此部分定义为读取或者写入的数据的长度选择,funct7字段则是定义为BUF中加载存储的起始地址,其中CONV指令只需要目标寄存器进行数据的返回即可因此需要对其返回的目标寄存器进行操作,即rd,funct3\funct7\rs1\rs2等部分则组合定义为其处理的数据X[9:0]和权值系数W[9:0],均由伪双口SRAM进行读取传递给CONV电路部分进行运算,MAC指令则需要调用目标寄存器和源操作数进行其运算,所以其funct3字段定义为3`b111格式,funct7字段则没有定义要求,其中CONV和MAC指令的opcode定义为四种custom均可,本发明用的是custom3和custom4,即7`b1011011和7`b1111011。9. The audio noise reduction method according to claim 8 is characterized in that a total of 4 custom instructions are involved, namely, LBUF instruction, SBUF instruction, CONV instruction, and MAC instruction. Since the LBUF instruction and the SBUF instruction operate on the BUF of the same address, they need to be distinguished by their opcode fields, which are determined by custom0 and custom1, respectively, i.e., 7`b0001011 and 7`b0101011. Since the SBUF and LBUF instructions only need to read and write from DTCM and do not need to write back data, they only need to use their source operand 1, i.e., rs1, so the funct3 field is defined as 3`b 010 format, represents that only the source operand register rs1 is operated. Since rd and rs2 are not used, this part can be defined as the length selection of the data to be read or written. The funct7 field is defined as the starting address of the load storage in the BUF. The CONV instruction only needs the target register to return the data, so it is necessary to operate the target register returned, that is, rd. The funct3\funct7\rs1\rs2 and other parts are combined and defined as the data X[9:0] and weight coefficient W[9:0] processed by it, which are all read by the pseudo dual-port SRAM and passed to the CONV circuit part for calculation. The MAC instruction needs to call the target register and the source operand for its calculation, so its funct3 field is defined as 3`b111 format, and the funct7 field has no definition requirements. The opcodes of the CONV and MAC instructions are defined as any of the four custom ones. The present invention uses custom3 and custom4, that is, 7`b1011011 and 7`b1111011. 10.根据权利要求8所述的音频降噪方法,其特征在于,通过LBUF指令能够加载待处理数据信息,之后将其存储在XBUF、QBUF两个伪双口SRAM中,WBUF则以初值形式进行定义一个空的伪双口SRAM,之后通过CONV指令对XBUF、WBUF进行数据的读取,该指令是一个采用加法树结构的卷积运算单元电路,其数据长度由滤波器阶数所决定,即滤波器阶数为J时,其待处理信号X[J-1:0]和权值系数W[J-1:0],得到其运算结果后将其保存在YBUF进行FIFO存储,其宽度和深度定义为数据宽度和滤波器的阶数长度;之后,通过MAC指令进行QBUF与误差系数的乘积后与上一列的权值系数WBUF相加得到新的权值系数WBUF,通过MAC自定义指令对其进行写入新的权值系数,进行权值的更新,其中误差系数的乘积部分由初级噪声信号Dn与YBUF中存储的数据相减得到后乘上步长因子所得,然后一直重复上述步骤,直到将所有的输出将FIFO的深度填满即可。10. The audio noise reduction method according to claim 8 is characterized in that the data information to be processed can be loaded through the LBUF instruction, and then stored in the two pseudo dual-port SRAMs XBUF and QBUF, and WBUF is defined as an empty pseudo dual-port SRAM in the form of initial value, and then the data of XBUF and WBUF are read through the CONV instruction, which is a convolution operation unit circuit using an addition tree structure, and its data length is determined by the filter order, that is, when the filter order is J, its signal to be processed X[J-1:0] and weight coefficient W[J-1:0] are obtained. After the operation result is saved in YBUF for FIFO storage, its width and depth are defined as the data width and the order length of the filter; afterwards, the product of QBUF and the error coefficient is multiplied by the MAC instruction and then added to the weight coefficient WBUF in the previous column to obtain a new weight coefficient WBUF, and the new weight coefficient is written to it through the MAC custom instruction to update the weight, where the product part of the error coefficient is obtained by subtracting the primary noise signal Dn from the data stored in YBUF and then multiplying it by the step size factor, and then the above steps are repeated until all outputs fill the depth of the FIFO.
CN202111037629.XA 2021-09-06 2021-09-06 Audio noise reduction accelerator system and method based on RISC v custom instruction set expansion Active CN113851103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111037629.XA CN113851103B (en) 2021-09-06 2021-09-06 Audio noise reduction accelerator system and method based on RISC v custom instruction set expansion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111037629.XA CN113851103B (en) 2021-09-06 2021-09-06 Audio noise reduction accelerator system and method based on RISC v custom instruction set expansion

Publications (2)

Publication Number Publication Date
CN113851103A CN113851103A (en) 2021-12-28
CN113851103B true CN113851103B (en) 2025-02-07

Family

ID=78973385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111037629.XA Active CN113851103B (en) 2021-09-06 2021-09-06 Audio noise reduction accelerator system and method based on RISC v custom instruction set expansion

Country Status (1)

Country Link
CN (1) CN113851103B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115469909B (en) * 2022-11-14 2023-06-20 深圳鸿芯微纳技术有限公司 Instruction updating method, working method, device, equipment and medium of software platform
CN116431220B (en) * 2023-06-14 2023-08-18 青岛鑫晟汇科技有限公司 Multi-system architecture intercommunication system based on data distributed instruction set
CN117369707B (en) * 2023-12-04 2024-03-19 杭州米芯微电子有限公司 Digital signal monitoring circuit and chip
CN119298880B (en) * 2024-12-11 2025-03-28 上海灵动微电子股份有限公司 Filter and filtering processing method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107464552B (en) * 2017-08-24 2021-03-09 北京安声科技有限公司 Distributed vehicle-mounted active noise reduction system and method
US10474822B2 (en) * 2017-10-08 2019-11-12 Qsigma, Inc. Simultaneous multi-processor (SiMulPro) apparatus, simultaneous transmit and receive (STAR) apparatus, DRAM interface apparatus, and associated methods
CN110010116A (en) * 2018-11-23 2019-07-12 重庆邮电大学 A kind of active noise control system based on momentum FxLMS algorithm
EP3822837B1 (en) * 2019-11-15 2024-01-03 Shenzhen Goodix Technology Co., Ltd. Method for increasing security of embedded processors and apparatus performing the method
CN110971909A (en) * 2019-12-13 2020-04-07 湖南君瀚信息技术有限公司 Low-power-consumption low-delay SOC chip
CN111627415B (en) * 2020-04-28 2022-03-22 重庆邮电大学 An Active Noise Cancellation Device Based on Adaptive MFxLMS Algorithm and FPGA Implementation
CN113115194A (en) * 2021-03-25 2021-07-13 苏州华兴欧立通自动化科技有限公司 Audio detection device based on DSP and taking ARM as core

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
audio denoising coprocessor based on risc-v custom instruction set extension;jun yuan;《MDPI》;20220629;全文 *

Also Published As

Publication number Publication date
CN113851103A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
CN113851103B (en) Audio noise reduction accelerator system and method based on RISC v custom instruction set expansion
CN109032669B (en) Neural network processing device and method for executing vector minimum value instruction
US7437540B2 (en) Complex domain floating point VLIW DSP with data/program bus multiplexer and microprocessor interface
Guo et al. A compiler intermediate representation for reconfigurable fabrics
US20070168908A1 (en) Dual-processor complex domain floating-point dsp system on chip
JP5419419B2 (en) system
CN111027690B (en) Combined processing device, chip and method for performing deterministic inference
CN109032670A (en) Processing with Neural Network device and its method for executing vector duplicate instructions
JPH10232779A (en) Method and device for parallel instruction processing
Doboli et al. Introduction to mixed-signal, embedded design
US7613858B1 (en) Implementing signal processing cores as application specific processors
Bansal et al. Efficient integration of coprocessor in LEON3 processor pipeline for System-on-Chip design
Nielsen et al. A behavioral synthesis frontend to the haste/tide design flow
CN119416842A (en) Automatically configured deep neural network accelerator system and implementation method thereof
CN113613140B (en) Audio noise reduction system, method and medium based on RISC v soft core
CN101615113A (en) A Microprocessor Realization Method for One Instruction to Complete One Butterfly Operation
CN114138342B (en) ROCC coprocessor interface model and its automatic generation tools and implementation methods
CN118645081A (en) A heterogeneous design method for ANC system based on improved FxLMS algorithm
CN111461326B (en) Instruction addressing method based on equipment memory and computer readable storage medium
van der Wolf et al. Internet of Things
Zhili Real-time Audio Signal Processing for UAV Based Applications Using the Xilinx Zynq SoC
Varnagirytė et al. A practical approach to DSP code optimization using compiler/architecture
Oshana Hardware Design Considerations
Yu et al. Design of lightweight on-chip one-dimensional convolutional neural network accelerators for edge-end chips
Shahri On Mapping Alogrithms to DSP Architectures: Knowledge of both the algorithm and target architecture is crucial.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20241101

Address after: 1003, Building A, Zhiyun Industrial Park, No. 13 Huaxing Road, Henglang Community, Dalang Street, Longhua District, Shenzhen City, Guangdong Province, 518000

Applicant after: Shenzhen Wanzhida Technology Transfer Center Co.,Ltd.

Country or region after: China

Address before: 400065 Chongwen Road, Nanshan Street, Nanan District, Chongqing

Applicant before: CHONGQING University OF POSTS AND TELECOMMUNICATIONS

Country or region before: China

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20241224

Address after: No. 2092 Shenyan Road, Tiandong Community, Haishan Street, Yantian District, Shenzhen City, Guangdong Province, China 518000

Applicant after: Shenzhen Jusheng Technology Co.,Ltd.

Country or region after: China

Address before: 1003, Building A, Zhiyun Industrial Park, No. 13 Huaxing Road, Henglang Community, Dalang Street, Longhua District, Shenzhen City, Guangdong Province, 518000

Applicant before: Shenzhen Wanzhida Technology Transfer Center Co.,Ltd.

Country or region before: China

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant