hi all,
i am trying to do a simple code using vhdl but the problem presists...i am trying to add a std_logic_vector type elements and i wrote the following
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity test is
port (
NBC :in std_logic_vector(3 downto 0);
op
ut std_logic_vector(2 downto 0)
);
end test;
architecture arch of test is
signal sum :unsigned (2 downto 0);
begin
sum <=unsigned(std_logic_vector("00"&NBC(0)))+unsigned(std_logic_vector("00"&NBC(1)))+unsigned(std_logic_vector("00"&NBC(2)))+unsigned(std_logic_vector("00"&NBC(3)));
op <=std_logic_vector(sum);
end arch;
plz i wanna know where is the problem ........thanks for help
i am trying to do a simple code using vhdl but the problem presists...i am trying to add a std_logic_vector type elements and i wrote the following
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity test is
port (
NBC :in std_logic_vector(3 downto 0);
op
);
end test;
architecture arch of test is
signal sum :unsigned (2 downto 0);
begin
sum <=unsigned(std_logic_vector("00"&NBC(0)))+unsigned(std_logic_vector("00"&NBC(1)))+unsigned(std_logic_vector("00"&NBC(2)))+unsigned(std_logic_vector("00"&NBC(3)));
op <=std_logic_vector(sum);
end arch;
plz i wanna know where is the problem ........thanks for help