Forum Discussion

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

digital design using vhdl

is any vhdl operators to calculate the power of numbers......

plz help me..

very urgent

3 Replies

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

    in VHDL you can use the ** operator to get x^y

    like this:

    a <= b ** c; where a, b and c are all integer.

    But if you want to synthesize it, one of either the B or C values needs to be a constant.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank u sir.

    One more doubt is any symblols to do logical operations like and or exor like C programming....

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

    a <= b xor c;

    but you cant do logic operations on integers, because they are not logic types. you have to do them on std_logic/vector/signed/unsigned.