📄 m10.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity m10 is
port(
clk,reset:in std_logic;
cout:out std_logic_vector(3 downto 0);
co:out std_logic
);
end m10;
architecture behavior of m10 is
signal cot:std_logic;
signal temp:std_logic_vector(3 downto 0);
begin
process(clk,reset)
begin
if reset='1' then
cot<='0';
temp<="0000";
elsif (clk'event and clk='1')then
if temp="1001" then
temp<="0000";
cot<='1';
else temp<=temp+1;
cot<='0';
end if;
end if;
end process;
co<=cot;
cout<=temp;
end behavior;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -