[an error occurred while processing this directive]
Вся конструкция
(«Телесистемы»: Конференция «Программируемые логические схемы и их применение»)
[an error occurred while processing this directive]

Отправлено ДM 01 февраля 2001 г. 16:11
В ответ на: а какой элемент должен получиться ? отправлено дядя Федя aka yes 01 февраля 2001 г. 15:19

process (d(0),clk)
begin
control_d <= d;
case control_d(3 downto 1) is
when "000" =>
if d(0)'event and ( d(0) = '0' or d(0) = '1') then counter4 <= 0; end if;
if clk'event and clk = '0' then counter4 <= counter4 + 1; end if;
if d(0) = '0' then
if (counter4 < 520) and (counter4 > 0) then outrele(0) <= '1';
elsif counter4 > 519 and counter4 < 999 then outrele(0) <= '0';
end if;
end if;

if d(0) = '1' then
if (counter4 < 520) and (counter4 > 0) then outrele(1) <= '1';
elsif counter4 > 519 and counter4 < 999 then outrele(1) <= '0';
end if;
end if;

when "001" =>
if d(0)'event and ( d(0) = '0' or d(0) = '1') then counter5 <= 0; end if;
if clk'event and clk = '0' then counter5 <= counter5 + 1; end if;
if d(0) = '0' then
if (counter5 < 520) and (counter5 > 0) then outrele(2) <= '1';
elsif counter5 > 519 and counter5 < 999 then outrele(2) <= '0';
end if;
end if;

if d(0) = '1' then
if (counter5 < 520) and (counter5 > 0) then outrele(3) <= '1';
elsif counter5 > 519 and counter5 < 999 then outrele(3) <= '0';
end if;
end if;
when "010" =>
if d(0)'event and ( d(0) = '0' or d(0) = '1') then counter6 <= 0; end if;
if clk'event and clk = '0' then counter6 <= counter6 + 1; end if;
if d(0) = '0' then
if (counter6 < 520) and (counter6 > 0) then outrele(4) <= '1';
elsif counter6 > 519 and counter6 < 999 then outrele(4) <= '0';
end if;
end if;

if d(0) = '1' then
if (counter6 < 520) and (counter6 > 0) then outrele(5) <= '1';
elsif counter6 > 519 and counter6 < 999 then outrele(5) <= '0';
end if;
end if;


when others => null;
end case;
end process;

Составить ответ  |||  Конференция  |||  Архив

Ответы


Отправка ответа

Имя (обязательно): 
E-mail: 

Тема (обязательно):
Сообщение:

Ссылка на URL: 
Название ссылки: 

URL изображения: 


Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru