vhdl problem for iir filter

Discussion in 'VHDL' started by mackyang, Jan 5, 2008.

  1. mackyang

    mackyang

    Joined:
    Jan 5, 2008
    Messages:
    1
    hi: guys
    i have a problem makes me crazy.
    how to use vhdl codes to implement iir filter
    y(n)= 2cos(w)*y(n-1) - y(n-2)
    and the initial conditions is y(-1)=sin(w),y(-2)=sin(2w).
    which means i need output this filter every cycle calculation like following y(0),y(1)....
    y(0)=2cos(w)*y(-1)-y(-2);
    y(1)=2cos(w)*y(0)-y(-1);
    ...
    i use a mac and a rounding operation to do it.
    but its not work like i describe above.
    how should i do. Am i need plus some selfcycle computation on testbench or on original filter codes. And how to plus it into this codes.

    Thanks
     
    mackyang, Jan 5, 2008
    #1
    1. Advertising

  2. mackyang

    omara007

    Joined:
    Jun 30, 2008
    Messages:
    10
    what is the rounding precision you'r using for MAC ?
     
    omara007, Jul 4, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jam
    Replies:
    2
    Views:
    773
  2. MM
    Replies:
    1
    Views:
    2,994
    Mike Treseler
    Aug 15, 2006
  3. k4kami
    Replies:
    3
    Views:
    1,981
    sanila.san
    Feb 5, 2011
  4. wzab
    Replies:
    7
    Views:
    745
    Robert Kern
    May 9, 2009
  5. aniaccet88@gmail.com
    Replies:
    0
    Views:
    320
    aniaccet88@gmail.com
    Sep 10, 2013
Loading...

Share This Page