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

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

Отправлено Postoroniy_v 13 января 2005 г. 10:11
В ответ на: Проблемы с оператором CASE, точнее, что после синтеза отправлено Nick Kovalyov 12 января 2005 г. 16:22

entity xxx is
port(
clk: in std_logic;
reset: in std_logic;--async reset active '1'
tx : in std_logic;--synchronous load data and start transfer
data:in std_logic_vector(7 downto 0);
sino : out std_logic
);

end xxx;

architecture xxx of xxx is
signal rgt:STD_LOGIC_VECTOR(7 downto 0);
signal o0,o1,odd:std_logic;
signal data_tx:STD_LOGIC_VECTOR(11 downto 0);
signal start_bit,stop_bit1,stop_bit2:std_logic;
signal line_idle:std_logic;
signal load:std_logic;
begin

start_bit<='0';
stop_bit1<='1';
stop_bit2<='1';
line_idle<='1';

o0<=data(0)xor data(1)xor data(2) xor data(3);
o1<=data(4)xor data(5)xor data(6) xor data(7);

x:process(clk,reset)
begin
if reset='1' then
load<='0';
elsif clk'event and clk='1' then
if tx='1' then
odd<=o0 xor o1;
rgt<=data;
end if;
load<=tx;
end if;
end process;

data_tx<=start_bit & rgt & odd & stop_bit1 & stop_bit2;

shift485: lpm_shiftreg
GENERIC MAP (
lpm_width => 12,
lpm_avalue => "4095",
lpm_direction=>"LEFT")
PORT MAP (
clock => clk,
aset =>reset,
load => load,
data => data_tx,
shiftin =>line_idle,
shiftout => sino);


end xxx;

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

Ответы


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

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

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

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

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


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

E-mail: info@telesys.ru