PPT ½½¶óÀ̵å
Counter ±¸¹®(1)
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt8 is
port (
rst : in std_logic;
clk : in std_logic;
q : out std_logic_vector(7 downto 0)
);
end cnt8 ;
architecture Behave of cnt8 is
signal tq : std_logic_vector(7 downto 0);
begin
process (clk,rst)
begin
if rst = ¡®1¡¯ then
tq <= (others =>¡®0¡¯) ;
elsif ( clk¡¯event and clk = ¡®1¡¯ ) then
tq <= tq + 1;
end if ;
q <= tq;
end process;
end Behave;
Clk
Rst
Q
8
Cnt8
9
ÀÌÀü ½½¶óÀ̵å
´ÙÀ½ ½½¶óÀ̵å
ù ½½¶óÀ̵å·Î À̵¿
±×·¡ÇÈ ¹öÀü º¸±â