[an error occurred while processing this directive]
|
Подскажите плз, что необходимо добавить, чтобы сигналы c и t защелкивались триггерами и в кристале сигнал t поступал на синхронный сброс триггеров счетчика?
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Cntr600 is
Port ( Value : out std_logic_vector(9 downto 0);
Sig : out std_logic;
Clk : in std_logic;
Ce : in std_logic;
term : out std_logic
);
end Cntr600;
architecture beh of Cntr600 is
signal Vl:std_logic_vector(9 downto 0);
signal t: std_logic;
signal c: std_logic;
begin
process(clk)
begin
if clk='1' and clk'event then
if ce='1' then
if t='1' then Vl<=(others =>'0');
else Vl<=Vl+1;
end if;
end if;
end if;
sig<=c;
term<=t;
if vl= 399 then c<='1'; else c<='0'; end if;
if vl= 598 then t<='1'; else t<='0'; end if;
value<=vl;
end process;
end;
E-mail: info@telesys.ru