📄 b60add2.txt
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity b60add2 is
port(clk,clear:in std_logic;
--d:in std_logic_vector(5 downto 0);
co:out std_logic;
q:out std_logic_vector(5 downto 0));
end b60add2;
architecture add of b60add2 is
begin
process(clk,clear)
variable tmp:std_logic_vector(5 downto 0);
begin
if clear='1' then
tmp:="000000";
co<='0';
elsif clk'event and clk='1'then
if tmp="111011"then
tmp:="000000";
co<='1';
else
tmp:=tmp+1;
co<='0';
end if;
end if;
q<=tmp;
end process;
end add;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -