FIR II IP Intel® FPGA IP: User Guide

ID 683208
Date 9/17/2024
Public
Document Table of Contents

4.6. FIR II IP Coefficient Reloading

You access the internal data coefficients via a memory-mapped interface that consists of the input address, write data, write enable, read data, and read valid signals. The Avalon Memory-Mapped interfaces operate as read and write interfaces on the host and agent components in a memory-mapped system. The memory-mapped system components include microprocessors, memories, UARTs, timers, and a system interconnect fabric that connects the host and agent interfaces. The Avalon memory-mapped interfaces describe a wide variety of components, from an SRAM that supports simple, fixed-cycle read and write transfers to a complex, pipelined interface capable of burst transfers. In Read mode, the IP reads the memory-mapped coefficients over a specified address range. In Write mode, the IP writes the coefficients over a specified address range. In Read/Write mode, you can read or write the coefficients over a specified address range. You can use a separate bus clock for this interface. When you do not enable the coefficient reloading option, the processor cannot access the specified address range, and the IP does not read or write the coefficient data.

Coefficient reloading starts anytime during the filter run time. However, you must reload the coefficients only after you obtain all the desired output data to avoid unpredictable results. If you use multiple coefficient banks, you can reload coefficient banks that are not used and switch over to the new coefficient set when coefficient reloading is complete. You must toggle the coeff_in_areset signal before reloading the coefficient with new data. The new coefficient data is read out after coefficient reloading to verify whether the coefficient reloading process is successful. When the coefficient reloading ends by deasserting the coeff_in_we, the input data is inserted immediately to the filter that is reloaded with the new coefficients.

The symmetrical or antisymmetrical filters have fewer unique coefficients, use fewer registers, and require fewer writes to reload the coefficients. For example, you should only write the first 19 addresses for a 37-tap symmetrical filter. When you write to all 37 addresses, the IP ignores the last 18 addresses because they are not part of the address space of the filter. Similarly, the IP ignores reading coefficient data from the last 18 addresses.

When the FIR uses multiple coefficient banks, it arranges the addresses of all the coefficients in consecutive order according to the bank number.The following example shows a 37-tap symmetrical/anti-symmetrical filter with four coefficient banks:

  • Address 0–18: Bank 0
  • Address 19–37: Bank 1
  • Address 38–56: Bank 2
  • Address 57–75: Bank 3

The following example shows a 37-tap non-symmetrical/anti-symmetrical filter with 2 coefficient banks:

  • Address 0–36: Bank 0
  • Address 37–73: Bank 1

If the coefficient bit width parameter is equal to or less than 16 bits, the width of the write data is fixed at 16 bits. If the coefficient bit width parameter is more than 16 bits, the width of the write data is fixed at 32 bits.

Figure 35. Timing Diagram of Coefficient Reloading in Read/Write modeWith nine coefficients.

The IP performs a write cycle of 9 clock cycles to reload the whole coefficient data set. To complete the write cycle, assert the coeff_in_we signal, and provide the address (from base address to the max address) together with the new coefficient data. Then, load the new coefficient data into the memory corresponding to the address of the coefficient. The IP reads new coefficient data during the write cycle when you deassert the coeff_in_we signal. When the coeff_out_valid signal is high, the read data is available on coeff_out_data.

Figure 36. Timing Diagram of Coefficient Reloading in Write ModeIn this mode, the IP loads one coefficient data. The new coefficient data (123) loads into a single address (7)
Figure 37. Timing Diagram of Coefficient Reloading in Read ModeWhen the coeff_in_address is 3 and coeff_in_read is asserted the IP reads coefficient data at the location, the coefficient data 80 is available on coeff_out_data when the coeff_out_valid signal is high.
Figure 38. Timing Diagram of Multiple Coefficient Banks The figure shows a symmetrical, 13-tap filter. The IP reloads coefficients data of bank 1 (address 7-13) while the filter is running on bank 0. When the coefficient reloading completes, bank 1 produces an impulse response of the filter. You can observe the new coefficient data (-58,18,106…) from bank 1 on the filter output.