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

📄 counter2.vhd.bak

📁 汽车四轮定位CCD驱动CPLD源代码
💻 BAK
字号:
library ieee;
use ieee.std_logic_1164.all;  --引用库
                              --二分频器
entity counter2 is
    port(clk:in std_logic;    --输入:原始频率
         reset:in std_logic;  --复位
         Gout:out std_logic); --输出:分频后输出
    signal tempGout : std_logic;--保存上次状态
end;
 
architecture behavioral of counter2 is
begin
     process(clk)

     begin
     if reset='1' then          --复位
        tempGout<='0';
     elsif clk'event and clk='1' then   --clk上升沿引发输出跳变
	tempGout<=not tempGout;      --输出跳变  
     end if;

     Gout<=tempGout;                 --输出

     end process;

end behavioral;

⌨️ 快捷键说明

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