

Audio Filtering with decimated sample rate on FPGA The coefficients for a 2-pole butterworth never exceed +/-2. The matlab code which writes the Verilog filter definition and converts to 2:16 fixed point format is also at the end of the top-level file. The test filter was a 2-pole Butterworth, bandpass filter at 3000 to 6600 Hz, with a normalized freq 0.125 to 0.275, and Peak at 0.2 which is 4800 Hz. Changing the codec bit-width requires an edit (in Qsys) to both the AV_config dialog box, then open the Audio Subsystem and edit that dialog box. The audio codec settings were changed in Qsys to enable 16-bit, 2's complement signals, to match the filters which had already been written for the DE2.

The DDS and loopback connections are separate from the generic bus read/write. A slightly reorgnized design separates the audio waveform generation and connections from the audio interface bus-master state machine. You have to press reset (button zero) after you load the design to start the state machine. This project just loops the audio input to the audio output, except that if you turn switch zero on, a tone is generated on the left channel with a frequency proportional to all the switch settings. Generate the Qsys design, and recompile the project. In the dialog box, set up: (1) Audio in Path: Line In to ADC (2) Check Audio Out-Enable DAC Output (3) Uncheck Audio Out-Microphone Bypass (4) Uncheck Audio Out-Line In Bypass Double-click the module name in Qsys to open a dialog box. The Audio Configuration module needs to be modified in Qsys for proper operation. Properly configured, a read to the data register gives data from the audio ADC, while the write to the data register outputs to the audio DAC. The lef/right data registers are read/write. There is a control word, four 8-bit FIFO fields (in/out, left/right), and left/right data registers. The Bus Master page explains the basic connections. The University Audio Core supports audio input and output at various rates and resolutions, and exposes the data on the Avalon bus. Each one can be used in a number of ways.
