VHDL モジュールを作成しようとしていますが、if ステートメントに問題があります。おそらくそれはばかげた間違いですが、私は VHDL に非常に慣れていないため、問題を理解できませんでした。これが私のコードです:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity binary_add is
port( n1 : in std_logic_vector(3 downto 0);
n2 : in std_logic_vector(3 downto 0);
segments : out std_logic_vector(7 downto 0);
bool : out bit;
o : out std_logic_vector(3 downto 0);
DNout : out std_logic_vector(3 downto 0));
end binary_add;
architecture Behavioral of binary_add is
begin
process(n1, n2)
begin
o <= n1 + n2;
if( o = '1010') then
bool <= '1';
else
bool <= '0';
end if;
end process;
end Behavioral;
そして、if ステートメントの最初の行から次の答えが得られます。
ERROR:HDLParsers:## - "C:/Xilinx/12.3/ISE_DS/ISE/.../binary_add.vhd" Line ##. parse error, unexpected TICK
私は何を間違っていますか?