dds.vhd
来自「dds的vhdl实现,主要包括正弦波、三角波和锯齿波的产生」· VHDL 代码 · 共 17 行
VHD
17 行
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity DDS is
generic(ACCWidth : Integer := 16); --相位累加器的长度2^N (2^ACCWidth)
port (
CLK: in std_logic; --系统时钟 FClk
STEP: in std_logic_vector(ACCWidth-1 downto 0); --步进,即相位累加器的累加增量,控制输出频率 2^M 频率控制字
CHOICE: in std_logic_vector(1 downto 0); --波形选择信号 "00":正弦; "01":三角波; "10":方波; "11":不输出(恒为低电平)
-- DAOUT : out std_logic_vector(7 downto 0); --8位DA输出模拟信号,直通方式,如需时钟控制则要修改
DAOUTX: out std_logic_vector(7 downto 0);
DAOUTY: out std_logic_vector(7 downto 0)
);
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?