----------------------------------------------------------------------------------
-- Company: 
-- Engineer: 
-- 
-- Create Date:    14:41:39 04/24/2012 
-- Design Name: 
-- Module Name:    DDS_Tune_DEMUX - Behavioral 
-- Project Name: 
-- Target Devices: 
-- Tool versions: 
-- Description: 
--
-- Dependencies: 
--
-- Revision: 
-- Revision 0.01 - File Created
-- Additional Comments: 
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity DDS_Tune_TX is
    Port ( clk : in  STD_LOGIC;
           SSB_Tune : in  STD_LOGIC_VECTOR (21 downto 0);
           FM_Tune : in  STD_LOGIC_VECTOR (21 downto 0);
           Tune_Data : out  STD_LOGIC_VECTOR (21 downto 0);
           Address : in  STD_LOGIC_VECTOR (2 downto 0));
end DDS_Tune_TX;

architecture Behavioral of DDS_Tune_TX is

signal tune_reg: STD_LOGIC_VECTOR (21 downto 0) := (OTHERS => '0');

begin

process (clk) begin
	IF rising_edge(clk) THEN
			CASE Address IS
				WHEN "000" => 	tune_reg <= (OTHERS => '0');								
				WHEN "001" => 	tune_reg <= FM_Tune;			
				WHEN "010" =>  tune_reg <= (OTHERS => '0');
				WHEN OTHERS => tune_reg <= SSB_Tune;
			END CASE;
	END IF;
end process;

Tune_Data <= tune_reg;


end Behavioral;

