library ieee;
use ieee.std_logic_1164.all;

use work.ball_game_pkg.all;
use work.nes_controller_pkg.all;

package ssd_controller_pkg is
	component ssd_controller is
		generic (
			BLINK_INTERVAL : integer := 125 * 1e5;
			BLINK_COUNT : integer := 3;
			ANIM_CYCLES : integer := 5e7
		);
		port (
			-- global clock signal
			clk : in std_logic;
			-- global reset signal (low active, not internally synchronized)
			res_n : in std_logic; 

			-- current game state 
			game_state : in ball_game_state_t;
			-- NES controller input
			controller : in nes_buttons_t;
			-- current player points
			player_points : in std_logic_vector(15 downto 0);

			-- 1st (right-most) seven segment display (unused)
			hex0 : out std_logic_vector(6 downto 0);
			-- 2nd seven segment display (unused)
			hex1 : out std_logic_vector(6 downto 0);
			-- 3rd seven segment display (unused)
			hex2 : out std_logic_vector(6 downto 0);
			-- 4th seven segment display (unused)
			hex3 : out std_logic_vector(6 downto 0);
			-- 5th seven segment display (current direction)
			hex4 : out std_logic_vector(6 downto 0);
			-- 6th seven segment display (current direction)
			hex5 : out std_logic_vector(6 downto 0);
			-- 7th seven segment display (game state)
			hex6 : out std_logic_vector(6 downto 0);
			-- 8th (left-most) seven segment display (game state)
			hex7 : out std_logic_vector(6 downto 0)
		);
	end component;
end package;
