Forum Discussion

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

VHDL multiplication operator

Hi all,

I am new to coding in VHDL and using FPGAs. I keep getting this error when I go to complie my code. Error (10327): VHDL error : can't determine definiton of operator "*"--found 0 possible defintions. The error is on this line in my architecture:

Synchro_36(13 DOWNTO 0) <= Gear_calc(13 DOWNTO 0) * "00100100";

I am trying to multiply a standard logic vector and a constant but with different data types. I added these libraries to rule out the possible data type issue:

USE IEEE.std_logic_1164.ALL;

USE IEEE.std_logic_arith.ALL;

USE IEEE.std_logic_unsigned.ALL;

Is there something simple I am missing here?

Thanks for the help!

1 Reply

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

    you need to multiply by signed (or unsigned). You can just add a cast to std_logic i.e.

    result <= std_logic_vector(signed(input)*constant);