Guest_imported
New member
- Jan 1, 1970
- 0
Okay, I'm new at this, and it might seem like a simple thing, but I cannot figure it out. When I do "check syntax" it gives me errors but it only says
" Error L23/C0 : #0 Error: C:/fndtn/active/projects/alu/alu.vhd line 23 Syntax error. (VSS-1081) "
It doesn't really tell me what's wrong
here is my code:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity ALU is
port (
A: in STD_LOGIC_VECTOR (3 DOWNTO 0);
B: in STD_LOGIC_VECTOR (3 DOWNTO 0);
OP: in STD_LOGIC_VECTOR (1 DOWNTO 0);
CLK: in STD_LOGIC;
C: out STD_LOGIC_VECTOR (3 DOWNTO 0)
);
end ALU;
architecture ALU_arch of ALU is
begin
process (CLK)
begin
A <= "0101"
B <= "0010"; -- *error here*
if (CLK = '1') then
case op(1 downto 0) is
when "00" => C <= A + B;
when "01" => C <= A + (not B);
when "10" => C <= A and B;
when "11" => C <= not A;
when others => C <= A;
end case;
end if;
end process;
end ALU_arch;
If I don't put the semicolon, it gives me 2 errors for that line and the next line.
If I put semicolons in the statement before that line, it also gives 2 errors.
I don't know what's wrong...someone please help!!!
Thanks!
" Error L23/C0 : #0 Error: C:/fndtn/active/projects/alu/alu.vhd line 23 Syntax error. (VSS-1081) "
It doesn't really tell me what's wrong
here is my code:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity ALU is
port (
A: in STD_LOGIC_VECTOR (3 DOWNTO 0);
B: in STD_LOGIC_VECTOR (3 DOWNTO 0);
OP: in STD_LOGIC_VECTOR (1 DOWNTO 0);
CLK: in STD_LOGIC;
C: out STD_LOGIC_VECTOR (3 DOWNTO 0)
);
end ALU;
architecture ALU_arch of ALU is
begin
process (CLK)
begin
A <= "0101"
B <= "0010"; -- *error here*
if (CLK = '1') then
case op(1 downto 0) is
when "00" => C <= A + B;
when "01" => C <= A + (not B);
when "10" => C <= A and B;
when "11" => C <= not A;
when others => C <= A;
end case;
end if;
end process;
end ALU_arch;
If I don't put the semicolon, it gives me 2 errors for that line and the next line.
If I put semicolons in the statement before that line, it also gives 2 errors.
I don't know what's wrong...someone please help!!!
Thanks!