Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

FIR Megafunction Signed (Fractional) Binary only?

I am using Quartus II 11.0. It looks like the FIR filter Megafunction supports only Signed Binary or Signed Fractional Binary.

As far as I understand, this means that the MSB is the sign bit, and the lower order bits are the magnitude. Is that correct? Why isn't there a twos-complement option? Does it make the FIR implementation easier?

http://i.imgur.com/VD6X8.png

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Why isn't there a twos-complement option?

    --- Quote End ---

    Both are 2's compliment. Signed fractional binary format results in the same hardware implementation as signed binary format, the binary point is conceptual only.

    Its quite possible the GUI displays things differently, or the coefficients can be passed in as fractional integers represented as what appear to be floating point values in a text file, but ultimately the hardware will look the same.

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Both are 2's compliment. Signed fractional binary format results in the same hardware implementation as signed binary format, the binary point is conceptual only.

    --- Quote End ---

    I buy that numerically it doesn't matter whether the integers are fractional or not (and I don't know why the GUI gives the option). But it seems that the signed binary representation is the same as sign-magnitude (http://en.wikipedia.org/wiki/signed_number_representations#sign-and-magnitude_method) representation, and not the same as two's-complement (http://en.wikipedia.org/wiki/two%27s_complement). The manual isn't very clear on this.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    But it seems that the signed binary representation is the same as sign-magnitude (http://en.wikipedia.org/wiki/signed_number_representations#sign-and-magnitude_method) representation, and not the same as two's-complement (http://en.wikipedia.org/wiki/two%27s_complement). The manual isn't very clear on this.

    --- Quote End ---

    The manuals are not very clear on a lot of things :)

    FIR compiler will be using 2's compliment.

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Sign-magnitude is a rather inpracticable numeric format and not used by any Altera IP, as far I'm aware of. It's only an option when displaying numeric vaues in SignalTap and other tools.