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

📄 comcoun.vhd

📁 VHDL源代码下载
💻 VHD
字号:


--comcoun.vhd 7 segment com scan counter
library ieee ;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity comcoun is
port(
  clk : in std_logic;--synchronouse clock
  f1k_ena : in std_logic;--scan clock
  comclk : out std_logic_vector(1 downto 0));--output count
end comcoun;
architecture behavior of comcoun is 
  signal q : std_logic_vector(1 downto 0);--internal counted signal
begin 
  fscan:process(clk)
  begin
    if (clk'event and clk='1') then
      if (f1k_ena='1') then
        if q>=3 then
          q<="00";--initial counter
        else
          q<=q+1;--counting
        end if;
      end if;
    end if;
  end process fscan;
  comclk<=q;--output internal count
end behavior;

⌨️ 快捷键说明

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