[an error occurred while processing this directive]
Знатокам Direct Digital Synthesis, DSP и VHDL. Что за способ получения sin и cos в приведенном коде?
(«Телесистемы»: Конференция «Программируемые логические схемы и их применение»)

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

Отправлено Victor® 03 февраля 2005 г. 14:21



Untitled




library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity sine_cos is

port
(
clk : in std_logic;
reset : in std_logic;
en : in std_logic;
sine : buffer std_logic_vector(7 downto 0);
cos : buffer std_logic_vector(7 downto 0));

end sine_cos;
architecture behave_sine_cos of sine_cos is
signal
sine_r, cos_r : std_logic_vector(7 downto 0);
begin -- behave_sine_cos
sine <= sine_r + (cos_r(7) & cos_r(7) & cos_r(7) & cos_r(7 downto 3));
cos <= cos_r - (sine(7) & sine(7) & sine(7) & sine(7 downto 3));

registers: process (clk, reset)
begin -- process registers
if reset = '0' then -- asynchronous reset (active low)
sine_r <= "00000000";
cos_r <= "01111000";
elsif clk'event and clk = '1' then -- rising clock edge
if (en = '1') then
sine_r <= sine;
cos_r <= cos;
end if;
end if;
end process registers;
end behave_sine_cos;




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

Ответы


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

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

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

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

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


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

E-mail: info@telesys.ru