イニングカウンターは単純に10進数のカウンターです。
-- INING Counter
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity INING_COUNTER is
port(
CLK : in std_logic;
RESET : in std_logic;
COUNT : out std_logic_vector(3 downto 0)
);
end INING_COUNTER;
architecture RTL of INING_COUNTER is
signal COUNT_TMP : std_logic_vector(3 downto 0);
begin
process (CLK,RESET)
begin
if (RESET = '0') then
COUNT_TMP <= "0001";
elsif (CLK'event and CLK = '0') then
COUNT_TMP <= COUNT_TMP + 1;
end if;
end process;
COUNT <= COUNT_TMP;
end RTL;