Forum Discussion

mitsvoid's avatar
mitsvoid
Icon for New Contributor rankNew Contributor
1 year ago
Solved

How to test the FIR II filter

Dear All,
I hope this message finds you well. I am currently working on a project involving an Altera DE2-115 board, where I aim to pass stored 32-bit ADC data through a FIR filter. Specifically, I am capturing voice data from a microphone with an 8 kHz sampling rate at 32 bits. I designed a Low Pass filter using MATLAB with the following specifications:
  • Filter Type: Low Pass
  • Window: Hamming
  • Order: 100
  • Sampling Frequency (Fs): 8000 Hz
  • Cutoff Frequency (Fc): 300 Hz
After designing the filter, I exported the coefficients and implemented them in the FIR II IP core. However, I encountered an issue where the output is 55 bits instead of the desired 32 bits. I attempted to handle this by truncating the 23 least significant bits, but this resulted in significant noise.
I am seeking advice on how to approach the truncation process effectively. Is there a method that can assist in determining which bits to remove?
Can i use the NCO IP core to generate a signal and to pass through the FIR filter in order to observe it with simualtion ?
Thank you.
  • Hi,


    You can use the NCO IP core to generate a signal and to pass through the FIR filter in order to observe it with simulation or on Signal Tap.


    Thank you,

    Kshitij Goel


6 Replies

  • Kshitij_Intel's avatar
    Kshitij_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,


    You can use the NCO IP core to generate a signal and to pass through the FIR filter in order to observe it with simulation or on Signal Tap.


    Thank you,

    Kshitij Goel


  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    Hi,
    you don't need NCO to test filter in simulation, just use sin() function in your testbench.

    Another point, voice spectrum is about 300 Hz - to 3.4 kHz, applying a 300 Hz low pass leaves about nothing of speech signal. Do you mean high pass?

  • mitsvoid's avatar
    mitsvoid
    Icon for New Contributor rankNew Contributor

    Hi,

    I didn't know about the sin() function, I will try it.

    Yes, I was wrong about the cutoff frequency of the FIR filter.


    Thank you.

  • mitsvoid's avatar
    mitsvoid
    Icon for New Contributor rankNew Contributor

    I would like to ask one more question. Can you let me know if it is possible to add, for example, the FIP II IP core inside to my custom IP core, which is based on the Avalon-MM interface?

  • Kshitij_Intel's avatar
    Kshitij_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,


    I think you mean to add in platform designer/QSYS. If Yes, you can.


    Thank you,

    Kshitij Goel


  • Kshitij_Intel's avatar
    Kshitij_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,


    As we do not receive any response from you on the previous answer that we have provided. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.

    Thank you,

    Kshitij Goel