[an error occurred while processing this directive]
|
Все бы хорошо.
Вот только немного раздражает, что несмотря на то, что я в Aldec'е поставил галочку "Force GSR Usage" после компиляции в EDIF (с пом. Synplify 7.3.4) такая конструкция не симулируется как надо.
Правда после имплементации в кристалл - все проходит.
Собственно поэтому я и попрсил кинуть пример. Есть возможность, чтобы после компиляции (создания EDIF) при симуляции все триггеры действительно в начале вставали в '0'.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity self_reset is Port (
Clk : in std_logic;
Rst : out std_logic
);
end self_reset;
architecture Behavioral of self_reset is
signal count : integer range 0 to 4;
begin
process(clk)
begin
if clk'event and clk='1' then
if count = 4 then
count <= 4;
else
count <= count +1;
end if;
end if;
end process;
process(clk,count)
begin
if clk'event and clk='1' then
if (count=3) then
Rst <='1';
else
Rst <='0';
end if;
end if;
end process;
end Behavioral;
E-mail: info@telesys.ru