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

Отправлено Pashka 29 мая 2002 г. 15:16
В ответ на: Использование сдвигового регистра (+) отправлено paha 29 мая 2002 г. 15:00

library IEEE;
use IEEE.std_logic_1164.all;

entity HDB3Decoder is
port (
CLK: in std_logic;
Pos: in std_logic;
Neg: in std_logic;
Data: out std_logic
);
end HDB3Decoder;

architecture HDB3Decoder_arch of HDB3Decoder is
signal ShReg: std_logic_vector(3 downto 0);
signal Buf: std_logic;
begin

Buf<=Pos or Neg;

process (CLK)
begin
if CLK'event and CLK='1' then
if (ShReg(2 downto 0)="001") then ShReg<="0000";
else
ShReg<=ShReg(2 downto 0) & Buf;
end if;
else null; end if;
end process;

Data<=ShReg(0);

end HDB3Decoder_arch;

А где у схемы сброс? Я бы обязательно поставил.


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

Ответы


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

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

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

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

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


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

E-mail: info@telesys.ru