fre_100.vhd
来自「利用一块芯片完成除时钟源、按键、扬声器和显示器(数码管)之外的所有数字电路功能。」· VHDL 代码 · 共 23 行
VHD
23 行
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fre_100 is
port(clk:in std_logic;
q:buffer std_logic);
end;
architecture fre of fre_100 is
signal a:std_logic_vector(5 downto 0);
begin
process(clk)
begin
if clk'event and clk='1' then
if a>="110010" then
q<=not q;
a<="000000";
else a<=a+'1';
end if;
end if;
end process;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?