------------------------------------------------------------------------------
--                        Raman Research Institute                            
--                            C V Raman Avenue                                 
--                             Sadashivanagar                                  
--                            Bangalore 560080                                 
------------------------------------------------------------------------------
-- Project  : 12 metre backend                                                                	
------------------------------------------------------------------------------
-- Designer : BSG and SV                                                                
-- Date     : June 1st 2003                                                                
------------------------------------------------------------------------------
--                          Modification History                             	
--                         ~~~~~~~~~~~~~~~~~~~~~~                            	
-- Versions : 1.1                                                                
--                                                                           	
--                                                                           	
--                                                                           	
--                                                                           	
------------------------------------------------------------------------------
-- Module   : ip_comm.vhd                                                                
------------------------------------------------------------------------------
-- Module Description :                                                       

-- This module is a commutator based on 1024 outputs of a ring counter
------------------------------------------------------------------------------                                                                             
                                                                     

library IEEE;
  use IEEE.std_logic_1164.all;
  use IEEE.std_logic_arith.all;
  use IEEE.std_logic_unsigned.all;
  

-- Ports Description  :                                                        
-----------------------------------------------------------------------------                                                                       

entity ip_comm is
generic (com_width : integer := 1024);

 Port (
     CLK  : In  std_logic;
	  reset :In  std_logic;
	  FIR_EN: Out std_logic_vector( com_width-1 downto 0)        
     );
end ip_comm;


-----------------------------------------------------------------------------                                                                       
-- Architecture Description  :                                                        

architecture ring_cnt of ip_comm is

-----------------------------------------------------------------------------                                                                       
-- signal and variables Description  :                                                        
signal EN: std_logic_vector( com_width-1 downto 0); 
-----------------------------------------------------------------------------                                                                       

begin 
	rng_cnt : process(CLK,reset) 
	begin 
    if( reset = '0') then
        EN(com_width-1 downto 1) <= (others => '0');
        EN(0) <= '1'; 
	 ELSIF(CLK'event and CLK = '1')then
        EN(com_width-1 downto 0) <=  EN(com_width-2 downto 0) &  EN(com_width-1)  ;
    end if;
    end  process rng_cnt;
	
	FIR_EN( com_width-1 DOWNTO 0) <= EN(com_width-1 DOWNTO 0);

end ring_cnt;

--end of  Architecture Description  
-----------------------------------------------------------------------------                                                                                                                               






