[an error occurred while processing this directive]
|
Не подскажет ли в чём дело. Если моделировать этот код в симуляторе (режим Timing) то выдаётся ошибка, что присутствует комбинационная "петля"? Пробовал в WebPack'e и Foundation.
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity Two_count is
port (
clk: in STD_LOGIC;
rnd_en: in STD_LOGIC;
clr_bit: in STD_LOGIC;
eq7: in STD_LOGIC;
eq3: out STD_LOGIC;
out_sigma: out STD_LOGIC_VECTOR (7 downto 0);
clr: in STD_LOGIC;
rd: in STD_LOGIC
);
end Two_count;
architecture Two_count_arch of Two_count is
signal b: STD_LOGIC_VECTOR (1 downto 0);
signal c: STD_LOGIC_VECTOR (7 downto 0);
begin
CT_BIT:process (clk,clr,rnd_en,clr_bit)
begin
if (clr='1' or clr_bit='1') then b<="00";
elsif (clk'event and clk='1') then
if (rnd_en='1') then b<=b+"01";
end if;
end if;
end process CT_BIT;
COMP_BIT:process(b)
begin
if(b="11") then eq3<='1';
else eq3<='0';
end if;
end process COMP_BIT;
CT_ALL:process (clk,clr,eq7,clr_bit)
begin
if (clr='1') then c<="00000000";
elsif (clk'event and clk='1') then
if (clr_bit='1') then c<=c+"00000001";
end if;
end if;
end process CT_ALL;
out_sigma<=c when (rd='1') else "ZZZZZZZZ";
end Two_count_arch;
E-mail: info@telesys.ru