cnt3.vhd

来自「基于MAXPLUS II 的软件设计」· VHDL 代码 · 共 21 行

VHD
21
字号
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;

entity cnt3 is
 port(clk,nrst:in std_logic ;
             q:buffer std_logic_vector(2 downto 0));
 end cnt3;

architecture behav of cnt3 is
begin
process(clk,nrst)
begin
if(clk'event and clk='1') then
  if( nrst='0') then q<="000" ;
  else q<=q+'1' ;
end if;
end if;
end process;
end behav;

⌨️ 快捷键说明

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