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

📄 cnt32.vhd

📁 《CPLD_FPGA设计及应用》课件与实例
💻 VHD
字号:
library  ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity cnt32 is
  port(clk,en:in std_logic;
       co:out std_logic);
end cnt32;

architecture behvcnt of cnt32 is
  signal countx:std_logic_vector(4 downto 0);
begin 
  process(clk,en)
  begin
    if  (en='1')  then
       countx<="00000";
       co<='0';
    elsif (clk'event and clk='1')  then
      if (en='0') then
          if (countx="11111") then
             countx<="00000";
             co<='1';
          else
             countx<=countx+'1';
             co<='0';
          end if;
       end if;
      end if;
  end process;
end behvcnt;

⌨️ 快捷键说明

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