[an error occurred while processing this directive]
Попытка обучения №3
(«Телесистемы»: Конференция «Языки описания аппаратуры (VHDL и др.))

миниатюрный аудио-видеорекордер mAVR

Отправлено Интересно 14 июля 2004 г. 13:18

Имеется условный модуль синхронизации для условного TFT дисплея 80х60. Модуль вырабатывает строчные, кадровые синхроимпульсы, сигнал DE и адреса X, Y для сканирования озу. Вот что получилось. Выскажите плз свои замечания.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Cntr600 is
Port ( x : out std_logic_vector(6 downto 0);
y : out std_logic_vector(6 downto 0);
Clk : in std_logic;

de : out std_logic;
h_sync : out std_logic;
v_sync : out std_logic
);
end Cntr600;
architecture beh of Cntr600 is
signal xi:std_logic_vector(6 downto 0);
signal yi: std_logic_vector(6 downto 0);
signal tx: std_logic;
signal tx_d: std_logic;
signal h_de: std_logic;
signal v_de: std_logic;
signal r_h_de: std_logic;
signal r_v_de: std_logic;
signal de_i: std_logic;
signal h_synci: std_logic;
signal s_h_sync: std_logic;
signal r_h_sync: std_logic;
signal v_synci: std_logic;
signal s_v_sync: std_logic;
signal r_v_sync: std_logic;
signal ty: std_logic;
begin
process(clk)
begin
if clk='1' and clk'event then
if xi= 104 then tx<='1'; else tx<='0'; end if;
tx_d<=tx;
if xi= 77 then r_h_de<='1'; else r_h_de<='0'; end if;
if tx_d='1' then xi<=(others =>'0'); else xi<=xi+1;end if;
if tx='1' then h_de<='1'; end if;
if r_h_de='1' then h_de<='0'; end if;
if xi= 89 then r_h_sync<='1'; else r_h_sync<='0'; end if;
if xi= 94 then s_h_sync<='1'; else s_h_sync<='0'; end if;
if r_h_sync='1' then h_synci<='0'; end if;
if s_h_sync='1' then h_synci<='1'; end if;
end if;
h_sync<=h_synci;
x<=xi;
end process;
process(clk)
begin
if clk='1' and clk'event then
if tx='1' then
if yi= 67 then ty<='1'; else ty<='0'; end if;
if ty='1' then yi<=(others =>'0'); else yi<=yi+1; end if;
if yi= 58 then r_v_de<='1'; else r_v_de<='0'; end if;
if ty='1' then v_de<='1'; end if;
if r_v_de='1' then v_de<='0'; end if;
if yi=62 then r_v_sync<='1'; else r_v_sync<='0'; end if;
if yi=64 then s_v_sync<='1'; else s_v_sync<='0'; end if;
if r_v_sync='1' then v_synci<='0'; end if;
if s_v_sync='1' then v_synci<='1'; end if;
end if;
end if;
y<=yi;
v_sync<=v_synci;
end process;
process(clk)
begin
if clk='1'and clk'event then
if v_de='1' then de_i<=h_de; end if;
end if;
de<=de_i;
end process;

end;

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

Ответы


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

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

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

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

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


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

E-mail: info@telesys.ru