Guest
Hi,
I hv tried to run the following 2bit multiplier vhdl code in xilinx...
and getting following error...
HDLParsers:164 - "C:/Projects/knm/2bit.vhd" Line 11. parse error,
unexpected INTEGER_LITERAL, expecting IDENTIFIER
I am just a beginner any1 kindly help....
thnx
John
here is the code...
**********************************************************
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity 2bit is
Port ( A0 : in std_logic_vector(1 downto 0);
A1 : in std_logic_vector(1 downto 0);
B0 : in std_logic_vector(1 downto 0);
B1 : in std_logic_vector(1 downto 0);
B2 : in std_logic_vector(3 downto 0);
C0 : out std_logic_vector(3 downto 0);
C1 : out std_logic_vector(3 downto 0);
C2 : out std_logic_vector(3 downto 0);
C3 : out std_logic_vector(3 downto 0));
end 2bit;
architecture Behavioral of 2bit is
begin
C0 <= A0 and B0;
C1 <= (A0 and not A1 and B1) or
(A0 and not B0 and B1) or
(not A0 and A1 and B0) or
(A1 and B0 and not B1);
C2 <= (A1 and B1 and not B0) or
(A1 and not A0 and B1);
C3 <= A1 and A0 and B1 and B0;
end Behavioral;
**********************************************************
I hv tried to run the following 2bit multiplier vhdl code in xilinx...
and getting following error...
HDLParsers:164 - "C:/Projects/knm/2bit.vhd" Line 11. parse error,
unexpected INTEGER_LITERAL, expecting IDENTIFIER
I am just a beginner any1 kindly help....
thnx
John
here is the code...
**********************************************************
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity 2bit is
Port ( A0 : in std_logic_vector(1 downto 0);
A1 : in std_logic_vector(1 downto 0);
B0 : in std_logic_vector(1 downto 0);
B1 : in std_logic_vector(1 downto 0);
B2 : in std_logic_vector(3 downto 0);
C0 : out std_logic_vector(3 downto 0);
C1 : out std_logic_vector(3 downto 0);
C2 : out std_logic_vector(3 downto 0);
C3 : out std_logic_vector(3 downto 0));
end 2bit;
architecture Behavioral of 2bit is
begin
C0 <= A0 and B0;
C1 <= (A0 and not A1 and B1) or
(A0 and not B0 and B1) or
(not A0 and A1 and B0) or
(A1 and B0 and not B1);
C2 <= (A1 and B1 and not B0) or
(A1 and not A0 and B1);
C3 <= A1 and A0 and B1 and B0;
end Behavioral;
**********************************************************