fenpin.vhd

来自「分频器」· VHDL 代码 · 共 24 行

VHD
24
字号
library ieee;
use ieee.std_logic_1164.all;

entity fenpin is
port(clk_in:  in   std_logic;
     clk_out: out  std_logic);
end fenpin;
architecture first of fenpin is
constant fpb: integer:=10;
signal   aqi: integer range 0 to fpb;
begin
process(clk_in)
begin
if rising_edge(clk_in) then
   if aqi<fpb then
      aqi<=aqi+1;
      clk_out<='0';
   else
      aqi<=0;
      clk_out<='1';
   end if;
end if;
end process;
end first;

⌨️ 快捷键说明

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