Forum Discussion

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

Addition fixed point

sir, I want to perform addtion arithmetic with fixed point in verilog. what should i do ? for example, 3.12 + 1.75

Thanks.

2 Replies

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

    c <= a+b;

    As long as "a" and "b" are in the same fixed point format.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    c <= a+b;

    As long as "a" and "b" are in the same fixed point format.

    --- Quote End ---

    Can I see your example code with addition arithmetic in VERILOG