yes it is. All the resize function does is add/remove bits to a bus. This is essentially free in terms of logic. resize is really a code formality.
this is the vhdl code i have written in xilinx software
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_SIGNED.ALL;
use IEEE.numeric_std.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity project1 is
port(a:in STD_LOGIC_vector(23 downto 0);
b:in STD_LOGIC_vector(23 downto 0);
z
ut STD_LOGIC_vector(24 downto 0));
end project1;
architecture Behavioral of project1 is
begin
z<= (resize(a,25))+(resize(b,25));
end Behavioral;
the error i got is
ERROR:HDLParsers:808 - "D:/projects final/signextension/project1.vhd" Line 43. resize can not have such operands in this context.
ERROR:HDLParsers:808 - "D:/projects final/signextension/project1.vhd" Line 43. resize can not have such operands in this context.
Process "Check Syntax" failed
can you rectify the problem?