--/******************************************************************************
--    Company      		: MICROSEMI

--    File Name    		: System_pack.vhd 
                   		
--    Description  		: This module is a package for user defined parameters for the system 

--    Targeted device 	: Family           Die          Package
--                   	  PolarFire     MPF300T_ES      MPF300T_ES

--    Author          	: India Solutions Team

--
-- SVN Revision Information:
-- SVN $Revision: 
-- SVN $Date:  $  
-- COPYRIGHT 2018 BY MICROSEMI 
-- THE INFORMATION CONTAINED IN THIS DOCUMENT IS SUBJECT TO LICENSING RESTRICTIONS 
-- FROM MICROSEMI CORP.  IF YOU ARE NOT IN POSSESSION OF WRITTEN AUTHORIZATION FROM 
-- MICROSEMI FOR USE OF THIS FILE, THEN THE FILE SHOULD BE IMMEDIATELY DESTROYED AND 
-- NO BACK-UP OF THE FILE SHOULD BE MADE. 
-- 

--******************************************************************************/
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;
use ieee.math_real.all;

package System_pack is
--  User Inputs
    constant g_CLKFREQ              : integer := 245760000; 		  -- Clock frequency in Hz 245.76MHz
    constant g_NUM_TX_ANTENNAS      : integer := 4;                   -- Num of Tx antennas supported 2/4/8
    constant g_NUM_RX_ANTENNAS      : integer := 4;                   -- Num of Rx antennas supported 2/4/8
    constant g_INST_BW              : integer := 40;                  -- Instaneous BW in MHz 
    constant g_NUM_CARRIERS         : integer := 2;                   -- Num of carriers per antenna 
    constant g_NUM_CARRIER_BW_RATE  : integer := 30720000;            -- DUC Carrier Input Sample Rate 
    constant g_DUC_OUTPUT_RATE      : integer := 245760000;           -- DUC Carrier Output Sample Rate 
    constant g_DDC_INPUT_RATE       : integer := 245760000;  		  -- DDC Carrier Input Sample Rate
    constant g_MIX_FREQ             : integer := 61440000;			  -- Mixer  Sample Rate
    constant g_DATAIN_WIDTH         : integer := 16;                  -- Data fixed point formats 
    constant g_DATAIN_FRACWIDTH     : integer := 15;
    constant g_DATAOUT_WIDTH        : integer := 16;
    constant g_DATAOUT_FRACWIDTH    : integer := 15;	                                            
	
-- Calculated Constants  
  constant g_CF_CHANNELS            : integer := integer(g_CLKFREQ/g_NUM_CARRIER_BW_RATE);
  constant g_CF_CHAN_WIDTH          : integer := integer(ceil(log2(real(g_CF_CHANNELS))));     
  constant g_NUM_Tx_DATAPATHS       : integer := g_NUM_TX_ANTENNAS/2;
  constant g_NUM_Rx_DATAPATHS       : integer := g_NUM_RX_ANTENNAS/2;

   type   T_Antenna_datain                is array (0 TO g_NUM_Tx_DATAPATHS-1)      of std_logic_vector ((g_DATAIN_WIDTH-1)   downto 0);
   type   T_Antenna_chanin                is array (0 TO g_NUM_Tx_DATAPATHS-1)      of std_logic_vector ((g_CF_CHAN_WIDTH-1)   downto 0);
   type   T_Antenna_Txvalid               is array (0 TO g_NUM_Tx_DATAPATHS-1)      of std_logic;
   type   T_Antenna_dataout               is array (0 TO g_NUM_Rx_DATAPATHS-1)      of std_logic_vector ((g_DATAIN_WIDTH-1)   downto 0);
   type   T_Antenna_chanout               is array (0 TO g_NUM_Rx_DATAPATHS-1)      of std_logic_vector ((g_CF_CHAN_WIDTH-1)   downto 0);
   type   T_Antenna_Rxvalid               is array (0 TO g_NUM_Rx_DATAPATHS-1)      of std_logic;

end System_pack;
package body System_pack is






end System_pack;

