I am developing a code on VHDL and I need to make subtraction operation on std_logic_vector
. I tried to define and use the following libraries:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
then I defined signals like:
signal r0,r1,r2,r3,r4,r5,r6,r7: STD_LOGIC_VECTOR (19 DOWNTO 0);
then I wanted to do the following subtraction:
r0 <= r0(16 downto 8) - r0(7 downto 0);
But it gives me error on the -
operator. The error says:
Error (10327): VHDL error at euclidian_vhd_hls.vhd(84): can't determine definition of operator ""-"" -- found 0 possible definitions
Please help me to solve this issue.
Thanks a lot.