darshkamal
Junior Member level 1
- Joined
- Nov 7, 2011
- Messages
- 18
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,443
Hello,
What's wrong with this code:
Error given by modelsim compiler is:
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): No feasible entries for infix operator "&".
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): No feasible entries for infix operator "&".
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): Bad expression in left operand of infix expression "+".
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): Bad expression in right operand of infix expression "+".
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): Type error resolving infix expression "+" as type ieee.NUMERIC_STD.SIGNED.
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(12): VHDL Compiler exiting
Thank you in advance
- - - Updated - - -
Does the concatenation operator not work with signed vectors?
What's wrong with this code:
Code:
library ieee;
use ieee.numeric_std.all;
entity adder is
port(a,b: in signed(3 downto 0);
c: out signed(4 downto 0));
end entity adder;
architecture adder1 of adder is
begin
c <= ('0'&a) + ('0'&b);
end architecture adder1;
Error given by modelsim compiler is:
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): No feasible entries for infix operator "&".
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): No feasible entries for infix operator "&".
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): Bad expression in left operand of infix expression "+".
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): Bad expression in right operand of infix expression "+".
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(11): Type error resolving infix expression "+" as type ieee.NUMERIC_STD.SIGNED.
** Error: C:/Modeltech_pe_edu_10.2a/examples/adder/test.vhd(12): VHDL Compiler exiting
Thank you in advance
- - - Updated - - -
Does the concatenation operator not work with signed vectors?