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

📄 cnt.vhd

📁 一个简单的交通灯程序(包括验证,主程序,和译码程序),在ALTER DE2板上实现
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt is
port(clk: in std_logic;
    cout: out std_logic);
end cnt;
architecture behav of cnt is
begin 
process(clk)
variable q: std_logic_vector(25 downto 0);
     begin
       if clk'event and clk='1' then
            q:=q+1;
end if;
if q="1100110111111110011000000" then cout<='1';
else cout<='0';
end if;
end process;
end behav;

⌨️ 快捷键说明

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