Если же заменить строчку i <= i + 1; на i <= X"5";, то на выходе при симуляции в Active-HDL всё правильно: на выходе 5, но почему-то оператор + не работает - на выходе значение X по всем выводам, хотя при компиляции не выдается ошибок или warning'ов...

Код
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.std_logic_unsigned.all;
entity gt is
port(
clk : in STD_LOGIC;
q : out STD_LOGIC_VECTOR(3 downto 0)
);
end gt;
architecture gt of gt is
signal i: STD_LOGIC_VECTOR(3 downto 0);
begin
process(clk)
begin
if CLK='1' and CLK'event then
i <= i + 1;
end if;
end process;
q <= i;
end gt;
use IEEE.STD_LOGIC_1164.all;
use IEEE.std_logic_unsigned.all;
entity gt is
port(
clk : in STD_LOGIC;
q : out STD_LOGIC_VECTOR(3 downto 0)
);
end gt;
architecture gt of gt is
signal i: STD_LOGIC_VECTOR(3 downto 0);
begin
process(clk)
begin
if CLK='1' and CLK'event then
i <= i + 1;
end if;
end process;
q <= i;
end gt;