///////////////////////////////////////////////////////////////////////////////////////////////////
// Company: MICROSEMI
//
// File: IQ_unpacker.v
//
// Description: This file rearrage the AXC data format to DUC/DDC data format with 
//              option to swap IQ
//
// Targeted device: Family         Die             Package
//                  PolarFire      MPF300TS_ES     FCG1152 
//
// 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. 
//
/////////////////////////////////////////////////////////////////////////////////////////////////// 

//`timescale <time_units> / <precision>
module IQ_unpacker( 
input  [31:0] iq_data_in,   //Input IQ Data signal
input         iq_swap,      //Input IQswap enable signal
output [15:0] I_data_o,     //Output I Data signal
output [15:0] Q_data_o      //Output Q Data signal
);

assign I_data_o = (iq_swap)? {iq_data_in[31:16], 1'b0} : {iq_data_in[14: 0], 1'b0};
assign Q_data_o = (iq_swap)? {iq_data_in[14: 0], 1'b0} : {iq_data_in[31:16], 1'b0};

//<statements>

endmodule

