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

📄 cntm10.vhd

📁 用VHDL实现的DDS
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cntm10 is
 port(
    clear : in std_logic;
    ci :in std_logic;
    clk :in std_logic;
    co :out std_logic;
    qout : buffer std_logic_vector(3 downto 0)
);
end cntm10;
architecture behave of cntm10 is
  begin 
    co<='1'when(qout="1001"and ci='1') else '0';
  
  process(clk,clear)
    begin
      if(clear='1')then
              qout<="0000";
        elsif(clk'event and clk='1')then
         if(ci='1')then
            if(qout="1001") then 
                qout<="0000";

         else qout<=qout+1;
      end if;
    end if;
  end if;
   end process;
end behave;

⌨️ 快捷键说明

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