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

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

Отправлено lutik 20 апреля 2004 г. 19:48
В ответ на: подскажите как сделать на VHDL отправлено maxmudruk 20 апреля 2004 г. 14:53

library IEEE;
use IEEE.STD_LOGIC_1164.all;

entity shifter is
port(
--************* Host interface ************%
clk :in std_logic
;res :in std_logic
;data :in std_logic_vector(15 downto 0)-- Internal buffer register
;write :in std_logic -- Wr buffer
--************ device interface *************%
;SH_SDATA :out std_logic
;SH_CLK :out std_logic
;
);
end shifter;

architecture Arc of shifter is
signal Dbuf : std_logic_vector(15 downto 0);
--**********************************************
begin
SH_CLK<=clk;

LD_buf: process(clk) begin -- data buffer
if clk='1' and clk'event then
if res='1' then
Dbuf<=(others=>'0');
elsif write='1' then
Dbuf<=data;
end if;
end if;
end process;
LBitsCnt: process(AMP_CLK)
subtype TBitsCnt is integer range 0 to 16;
variable BitsCnt : TBitsCnt; --counter of sending bits
begin
if clk='0' and clk'event then
if res='1' then
BitsCnt:= 0;
elsif write='1' then
BitsCnt:=TBitsCnt'high;
elsif BitsCnt > 0 then
BitsCnt:=BitsCnt-1;
SH_SDATA<=Dbuf(BitsCnt);
elsif BitsCnt = 0 then
SH_SDATA<=Dbuf(BitsCnt);
end if;
end if;
end process;

end shifter;

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

Ответы


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

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

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

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

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


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

E-mail: info@telesys.ru