A
ashu
Guest
on comipiling the follwoing prgram i am getting syntax error
a1 := to_stdlogicvector(a);
^
**Error: /pe_users/guest6/vhdl/adder.vhd line 23
Syntax error. (VSS-1081)
am i using to_stdlogicvector function incorrectly ?
_____________________________________________________________________
library ieee ;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_unsigned.all;
entity adder is
port (
a : in bit_vector( 7 downto 0) ;
b : in bit_vector( 7 downto 0) ;
sum : out bit_vector(8 downto 0));
end adder;
architecture arch of adder is
variable a1: std_logic_vector(7 downto 0);
variable b1: std_logic_vector(7 downto 0);
variable sum1: std_logic_vector(8 downto 0);
begin -- arch
a1 := to_stdlogicvector(a);
b1: = to_stdlogicvector(b);
sum1:= To_StdLogicVector(a1 + b1);
sum <= sum1;
end arch;
library ieee ;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_unsigned.all;
entity adder is
port (
a : in bit_vector( 7 downto 0) ;
b : in bit_vector( 7 downto 0) ;
sum : out bit_vector(8 downto 0));
end adder;
architecture arch of adder is
variable a1: std_logic_vector(7 downto 0);
variable b1: std_logic_vector(7 downto 0);
variable sum1: std_logic_vector(8 downto 0);
begin -- arch
a1 := to_stdlogicvector(a);
b1: = to_stdlogicvector(b);
sum1:= To_StdLogicVector(a1 + b1);
sum <= sum1;
end arch;
a1 := to_stdlogicvector(a);
^
**Error: /pe_users/guest6/vhdl/adder.vhd line 23
Syntax error. (VSS-1081)
am i using to_stdlogicvector function incorrectly ?
_____________________________________________________________________
library ieee ;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_unsigned.all;
entity adder is
port (
a : in bit_vector( 7 downto 0) ;
b : in bit_vector( 7 downto 0) ;
sum : out bit_vector(8 downto 0));
end adder;
architecture arch of adder is
variable a1: std_logic_vector(7 downto 0);
variable b1: std_logic_vector(7 downto 0);
variable sum1: std_logic_vector(8 downto 0);
begin -- arch
a1 := to_stdlogicvector(a);
b1: = to_stdlogicvector(b);
sum1:= To_StdLogicVector(a1 + b1);
sum <= sum1;
end arch;
library ieee ;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_unsigned.all;
entity adder is
port (
a : in bit_vector( 7 downto 0) ;
b : in bit_vector( 7 downto 0) ;
sum : out bit_vector(8 downto 0));
end adder;
architecture arch of adder is
variable a1: std_logic_vector(7 downto 0);
variable b1: std_logic_vector(7 downto 0);
variable sum1: std_logic_vector(8 downto 0);
begin -- arch
a1 := to_stdlogicvector(a);
b1: = to_stdlogicvector(b);
sum1:= To_StdLogicVector(a1 + b1);
sum <= sum1;
end arch;