⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tb_romnco.vhd

📁 基于NCO的数字控制振荡器。带测试程序
💻 VHD
字号:
-- Testbench for CodicNCO
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity tb_RomNCO is

end entity tb_RomNCO;

architecture rtl of tb_RomNCO is

component RomNCO is
  port(
    clk   : in std_logic;
    reset : in std_logic;
    en    : in std_logic;
    phi   : in signed(15 downto 0);
    f     : in signed(31 downto 0);
    out_i : out signed(11 downto 0);
    out_q : out signed(11 downto 0));
end component RomNCO;

signal clk   : std_logic;                    
signal reset : std_logic;               
signal en    : std_logic;                    
signal phi   : signed(15 downto 0);
signal f     : signed(31 downto 0);
signal out_i : signed(11 downto 0); 
signal out_q : signed(11 downto 0);

begin
  dut : RomNCO
  port map(
    clk   => clk,
    reset => reset, 
    en    => en,                     
    phi   => phi,                    
    f     => f,
    out_i => out_i,
    out_q => out_q);

process
  begin
    clk <= '0';
  wait for 10 ns;
    clk <= '1';
  wait for 10 ns;
end process;

process
  begin
    reset <= '1';
    en <= '0';
  wait for 30 ns;
    reset <= '0';
  wait for 20 ns;
    en <= '1';
  wait;
end process;

  phi <= X"4CCC";
  f   <= X"00012D00";

end architecture rtl;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -