Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21613 Discussions

VHDL multiplication operator

Altera_Forum
Honored Contributor II
3,846 Views

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!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
2,694 Views

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);
0 Kudos
Reply