Commit 130a7e31 authored by Ben Wojtowicz's avatar Ben Wojtowicz

Version 0.6.3: Added SIB2 and interactive configuration to file_gen app and...

Version 0.6.3: Added SIB2 and interactive configuration to file_gen app and multiple eNB decoding to file_scan app
parent e165c15b
......@@ -37,3 +37,5 @@ v00.06.01 Added RRC support for packing/unpacking SIB2, SIB3, SIB4, and SIB8
Updated the file scan and file generator to use the latest library.
v00.06.02 Added soft bit turbo decoding, random access and paging PDCCH decoding,
and more RRC support.
v00.06.03 Added SIB2 support and interactive configuration to file_gen app.
Added multiple eNB decode support to libraries and file_scan app.
......@@ -26,6 +26,8 @@
---------- ------------- --------------------------------------------
06/15/2012 Ben Wojtowicz Created file.
08/19/2012 Ben Wojtowicz Using the latest liblte library.
11/10/2012 Ben Wojtowicz Added SIB2 support and changed the parameter
input method to be "interactive"
*******************************************************************************/
#ifndef __LTE_FDD_DL_FG_SAMP_BUF_H__
......@@ -46,6 +48,20 @@
#define LTE_FDD_DL_FG_SAMP_BUF_SIZE (307200)
// Configurable Parameters
#define BANDWIDTH_PARAM "bandwidth"
#define FREQ_BAND_PARAM "freq_band"
#define N_FRAMES_PARAM "n_frames"
#define N_ANT_PARAM "n_ant"
#define N_ID_CELL_PARAM "n_id_cell"
#define MCC_PARAM "mcc"
#define MNC_PARAM "mnc"
#define CELL_ID_PARAM "cell_id"
#define TRACKING_AREA_CODE_PARAM "tracking_area_code"
#define Q_RX_LEV_MIN_PARAM "q_rx_lev_min"
#define P0_NOMINAL_PUSCH_PARAM "p0_nominal_pusch"
#define P0_NOMINAL_PUCCH_PARAM "p0_nominal_pucch"
/*******************************************************************************
FORWARD DECLARATIONS
*******************************************************************************/
......@@ -62,12 +78,7 @@ typedef boost::shared_ptr<LTE_fdd_dl_fg_samp_buf> LTE_fdd_dl_fg_samp_buf_sptr;
CLASS DECLARATIONS
*******************************************************************************/
LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf(uint32 _N_frames,
uint32 _N_ant,
uint32 _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf();
class LTE_fdd_dl_fg_samp_buf : public gr_sync_block
{
public:
......@@ -78,19 +89,9 @@ public:
gr_vector_void_star &output_items);
private:
friend LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf(uint32 _N_frames,
uint32 _N_ant,
uint32 _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
LTE_fdd_dl_fg_samp_buf(uint32 _N_frames,
uint32 _N_ant,
uint32 _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
friend LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf();
LTE_fdd_dl_fg_samp_buf();
// LTE library
LIBLTE_PHY_STRUCT *phy_struct;
......@@ -106,6 +107,7 @@ private:
LIBLTE_RRC_MIB_STRUCT mib;
LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT bcch_dlsch_msg;
LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT sib1;
LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT sib2;
LIBLTE_PHY_PCFICH_STRUCT pcfich;
LIBLTE_PHY_PHICH_STRUCT phich;
LIBLTE_PHY_PDCCH_STRUCT pdcch;
......@@ -118,7 +120,27 @@ private:
uint32 N_id_2;
uint32 N_rb_dl;
uint32 FFT_pad_size;
uint32 si_periodicity_T;
uint32 si_win_len;
uint8 N_ant;
// Configuration
void print_config(void);
void change_config(char *line);
bool set_bandwidth(char *char_value);
bool set_n_ant(char *char_value);
bool set_n_id_cell(char *char_value);
bool set_mcc(char *char_value);
bool set_mnc(char *char_value);
bool set_param(uint32 *param, char *char_value, uint32 llimit, uint32 ulimit);
bool set_param(uint16 *param, char *char_value, uint16 llimit, uint16 ulimit);
bool set_param(uint8 *param, char *char_value, uint8 llimit, uint8 ulimit);
bool set_param(int32 *param, char *char_value, int32 llimit, int32 ulimit);
bool set_param(int16 *param, char *char_value, int16 llimit, int16 ulimit);
bool set_param(int8 *param, char *char_value, int8 llimit, int8 ulimit);
bool char_to_uint32(char *char_value, uint32 *uint32_value);
bool char_to_int32(char *char_value, int32 *int32_value);
bool need_config;
};
#endif /* __LTE_FDD_DL_FG_SAMP_BUF_H__ */
......@@ -11,24 +11,18 @@ class LTE_fdd_dl_file_gen (gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
usage = "usage: %prog [options] file N_frames N_ant N_id_cell bandwidth mcc mnc"
usage = "usage: %prog [options] file"
parser=OptionParser(option_class=eng_option, usage=usage)
# Add options here
(options, args) = parser.parse_args()
if len(args) != 7:
if len(args) != 1:
parser.print_help()
sys.exit(1)
output_filename = args[0]
N_frames = args[1]
N_ant = args[2]
N_id_cell = args[3]
bandwidth = args[4]
mcc = args[5]
mnc = args[6]
# Build flow graph
self.samp_buf = LTE_fdd_dl_fg.samp_buf(int(N_frames), int(N_ant), int(N_id_cell), float(bandwidth), mcc, mnc)
self.samp_buf = LTE_fdd_dl_fg.samp_buf()
self.fsink = gr.file_sink(gr.sizeof_char, output_filename)
self.connect(self.samp_buf, self.fsink)
......
......@@ -17,20 +17,10 @@
*/
GR_SWIG_BLOCK_MAGIC(LTE_fdd_dl_fg,samp_buf);
LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf(unsigned int _N_frames,
unsigned int _N_ant,
unsigned int _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
LTE_fdd_dl_fg_samp_buf_sptr LTE_fdd_dl_fg_make_samp_buf();
class LTE_fdd_dl_fg_samp_buf : public gr_block
{
private:
LTE_fdd_dl_fg_samp_buf(uint32 _N_frames,
uint32 _N_ant,
uint32 _N_id_cell,
float _bandwidth,
char *_mcc,
char *_mnc);
LTE_fdd_dl_fg_samp_buf();
};
......@@ -27,6 +27,8 @@
03/23/2012 Ben Wojtowicz Created file.
08/19/2012 Ben Wojtowicz Added states and state memory and added
decoding of all SIBs.
11/10/2012 Ben Wojtowicz Using the latest libraries to decode more
than 1 eNB
*******************************************************************************/
#ifndef __LTE_FDD_DL_FS_SAMP_BUF_H__
......@@ -89,6 +91,7 @@ private:
// LTE library
LIBLTE_PHY_STRUCT *phy_struct;
LIBLTE_PHY_COARSE_TIMING_STRUCT timing_struct;
LIBLTE_RRC_MSG_STRUCT rrc_msg;
LIBLTE_RRC_MIB_STRUCT mib;
LIBLTE_RRC_BCCH_DLSCH_MSG_STRUCT bcch_dlsch_msg;
......@@ -111,6 +114,7 @@ private:
uint32 N_id_cell;
uint32 N_id_1;
uint32 N_id_2;
uint32 corr_peak_idx;
uint8 N_ant;
uint8 prev_si_value_tag;
bool prev_si_value_tag_valid;
......@@ -118,10 +122,14 @@ private:
bool sib1_printed;
bool sib2_printed;
bool sib3_printed;
bool sib3_expected;
bool sib4_printed;
bool sib4_expected;
bool sib8_printed;
bool sib8_expected;
// Helpers
void init(void);
void copy_input_to_samp_buf(const int8 *in, int32 ninput_items);
void freq_shift(uint32 start_idx, uint32 num_samps, float freq_offset);
void print_mib(LIBLTE_RRC_MIB_STRUCT *mib);
......
......@@ -31,6 +31,8 @@
08/19/2012 Ben Wojtowicz Added states and state memory and added
decoding of all SIBs.
10/06/2012 Ben Wojtowicz Updated to use the latest LTE library.
11/10/2012 Ben Wojtowicz Using the latest libraries to decode more
than 1 eNB
*******************************************************************************/
......@@ -84,6 +86,8 @@ LTE_fdd_dl_fs_samp_buf::LTE_fdd_dl_fs_samp_buf()
gr_make_io_signature(MIN_IN, MAX_IN, sizeof(int8)),
gr_make_io_signature(MIN_OUT, MAX_OUT, sizeof(int8)))
{
uint32 i;
// Initialize the LTE library
liblte_phy_init(&phy_struct);
......@@ -95,25 +99,12 @@ LTE_fdd_dl_fs_samp_buf::LTE_fdd_dl_fs_samp_buf()
last_samp_was_i = false;
// Variables
state = LTE_FDD_DL_FS_SAMP_BUF_STATE_COARSE_TIMING_SEARCH;
freq_offset = 0;
phich_res = 0;
N_rb_dl = LIBLTE_PHY_N_RB_DL_1_4MHZ;
FFT_pad_size = LIBLTE_PHY_FFT_PAD_SIZE_1_4MHZ;
sfn = 0;
N_sfr = 0;
N_ant = 0;
N_id_cell = 0;
N_id_1 = 0;
N_id_2 = 0;
prev_si_value_tag = 0;
prev_si_value_tag_valid = false;
mib_printed = false;
sib1_printed = false;
sib2_printed = false;
sib3_printed = false;
sib4_printed = false;
sib8_printed = false;
init();
corr_peak_idx = 0;
for(i=0; i<LIBLTE_PHY_N_MAX_ROUGH_CORR_SEARCH_PEAKS; i++)
{
timing_struct.freq_offset[i] = 0;
}
}
LTE_fdd_dl_fs_samp_buf::~LTE_fdd_dl_fs_samp_buf()
{
......@@ -136,7 +127,6 @@ int32 LTE_fdd_dl_fs_samp_buf::work(int32 ninput_items,
const int8 *in = (const int8 *)input_items[0];
float pss_thresh;
uint32 i;
uint32 symb_starts[7];
uint32 pss_symb;
uint32 frame_start_idx;
uint32 num_samps_needed = COARSE_TIMING_SEARCH_NUM_SAMPS;
......@@ -166,7 +156,7 @@ int32 LTE_fdd_dl_fs_samp_buf::work(int32 ninput_items,
if(LTE_FDD_DL_FS_SAMP_BUF_STATE_COARSE_TIMING_SEARCH != state)
{
// Correct frequency error
freq_shift(0, LTE_FDD_DL_FS_SAMP_BUF_SIZE, freq_offset);
freq_shift(0, LTE_FDD_DL_FS_SAMP_BUF_SIZE, timing_struct.freq_offset[corr_peak_idx]);
}
// Get number of samples needed for each state
......@@ -194,17 +184,28 @@ int32 LTE_fdd_dl_fs_samp_buf::work(int32 ninput_items,
while(samp_buf_r_idx < (samp_buf_w_idx - num_samps_needed))
{
if(mib_printed == true &&
sib1_printed == true &&
sib2_printed == true &&
sib3_printed == sib3_expected &&
sib4_printed == sib4_expected &&
sib8_printed == sib8_expected)
{
corr_peak_idx++;
init();
}
switch(state)
{
case LTE_FDD_DL_FS_SAMP_BUF_STATE_COARSE_TIMING_SEARCH:
if(LIBLTE_SUCCESS == liblte_phy_find_coarse_timing_and_freq_offset(phy_struct,
i_buf,
q_buf,
symb_starts,
&freq_offset))
&timing_struct) &&
corr_peak_idx < timing_struct.n_corr_peaks)
{
// Correct frequency error
freq_shift(0, LTE_FDD_DL_FS_SAMP_BUF_SIZE, freq_offset);
freq_shift(0, LTE_FDD_DL_FS_SAMP_BUF_SIZE, timing_struct.freq_offset[corr_peak_idx]);
// Search for PSS and fine timing
state = LTE_FDD_DL_FS_SAMP_BUF_STATE_PSS_AND_FINE_TIMING_SEARCH;
......@@ -219,7 +220,7 @@ int32 LTE_fdd_dl_fs_samp_buf::work(int32 ninput_items,
if(LIBLTE_SUCCESS == liblte_phy_find_pss_and_fine_timing(phy_struct,
i_buf,
q_buf,
symb_starts,
timing_struct.symb_starts[corr_peak_idx],
&N_id_2,
&pss_symb,
&pss_thresh))
......@@ -239,7 +240,7 @@ int32 LTE_fdd_dl_fs_samp_buf::work(int32 ninput_items,
i_buf,
q_buf,
N_id_2,
symb_starts,
timing_struct.symb_starts[corr_peak_idx],
pss_thresh,
&N_id_1,
&frame_start_idx))
......@@ -473,7 +474,7 @@ int32 LTE_fdd_dl_fs_samp_buf::work(int32 ninput_items,
samp_buf_r_idx -= 100;
samps_to_copy = samp_buf_w_idx - samp_buf_r_idx;
samp_buf_w_idx = 0;
freq_shift(samp_buf_r_idx, samps_to_copy, -freq_offset);
freq_shift(samp_buf_r_idx, samps_to_copy, -timing_struct.freq_offset[corr_peak_idx]);
for(i=0; i<samps_to_copy; i++)
{
i_buf[samp_buf_w_idx] = i_buf[samp_buf_r_idx];
......@@ -494,6 +495,31 @@ int32 LTE_fdd_dl_fs_samp_buf::work(int32 ninput_items,
return(0);
}
void LTE_fdd_dl_fs_samp_buf::init(void)
{
state = LTE_FDD_DL_FS_SAMP_BUF_STATE_COARSE_TIMING_SEARCH;
phich_res = 0;
N_rb_dl = LIBLTE_PHY_N_RB_DL_1_4MHZ;
FFT_pad_size = LIBLTE_PHY_FFT_PAD_SIZE_1_4MHZ;
sfn = 0;
N_sfr = 0;
N_ant = 0;
N_id_cell = 0;
N_id_1 = 0;
N_id_2 = 0;
prev_si_value_tag = 0;
prev_si_value_tag_valid = false;
mib_printed = false;
sib1_printed = false;
sib2_printed = false;
sib3_printed = false;
sib3_expected = false;
sib4_printed = false;
sib4_expected = false;
sib8_printed = false;
sib8_expected = false;
}
void LTE_fdd_dl_fs_samp_buf::copy_input_to_samp_buf(const int8 *in, int32 ninput_items)
{
uint32 i;
......@@ -545,9 +571,9 @@ void LTE_fdd_dl_fs_samp_buf::print_mib(LIBLTE_RRC_MIB_STRUCT *mib)
{
if(false == mib_printed)
{
printf("DL LTE Channel found:\n");
printf("DL LTE Channel found [%u]:\n", corr_peak_idx);
printf("\tMIB Decoded:\n");
printf("\t\t%-40s=%20.2f\n", "Frequency Offset", freq_offset);
printf("\t\t%-40s=%20.2f\n", "Frequency Offset", timing_struct.freq_offset[corr_peak_idx]);
printf("\t\t%-40s=%20u\n", "System Frame Number", sfn);
printf("\t\t%-40s=%20u\n", "Physical Cell ID", N_id_cell);
printf("\t\t%-40s=%20u\n", "Number of TX Antennas", N_ant);
......@@ -749,9 +775,11 @@ void LTE_fdd_dl_fs_samp_buf::print_sib1(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT
{
case LIBLTE_RRC_SIB_TYPE_3:
printf("\t\t\t\t%s = %s\n", "SIB Type", "3");
sib3_expected = true;
break;
case LIBLTE_RRC_SIB_TYPE_4:
printf("\t\t\t\t%s = %s\n", "SIB Type", "4");
sib4_expected = true;
break;
case LIBLTE_RRC_SIB_TYPE_5:
printf("\t\t\t\t%s = %s\n", "SIB Type", "5");
......@@ -764,6 +792,7 @@ void LTE_fdd_dl_fs_samp_buf::print_sib1(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT
break;
case LIBLTE_RRC_SIB_TYPE_8:
printf("\t\t\t\t%s = %s\n", "SIB Type", "8");
sib8_expected = true;
break;
case LIBLTE_RRC_SIB_TYPE_9:
printf("\t\t\t\t%s = %s\n", "SIB Type", "9");
......@@ -1664,7 +1693,7 @@ void LTE_fdd_dl_fs_samp_buf::print_sib2(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT
printf("\t\t%-40s=%20s\n", "Delta F PUCCH Format 2B", "2dB");
break;
}
printf("\t\t%-40s=%18udB\n", "Delta Preamble Message 3", sib2->rr_config_common_sib.ul_pwr_ctrl.delta_preamble_msg3);
printf("\t\t%-40s=%18ddB\n", "Delta Preamble Message 3", sib2->rr_config_common_sib.ul_pwr_ctrl.delta_preamble_msg3);
switch(sib2->rr_config_common_sib.ul_cp_length)
{
case LIBLTE_RRC_UL_CP_LENGTH_1:
......
......@@ -20,7 +20,7 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
dnl Boston, MA 02110-1301, USA.
dnl
AC_INIT(openlte,0.6.2)
AC_INIT(openlte,0.6.3)
AC_PREREQ(2.57)
AC_CONFIG_AUX_DIR([.])
......
......@@ -34,6 +34,10 @@
10/06/2012 Ben Wojtowicz Added random access and paging PDCCH
decoding, soft turbo decoding, and PDSCH
decoding per allocation.
11/10/2012 Ben Wojtowicz Added TBS, MCS, and N_prb calculations for
SI PDSCH messages, added more sample defines,
and re-factored the coarse timing and freq
search to find more than 1 eNB.
*******************************************************************************/
......@@ -52,25 +56,45 @@
DEFINES
*******************************************************************************/
// FFT Padding
#define LIBLTE_PHY_FFT_PAD_SIZE_1_4MHZ 988
#define LIBLTE_PHY_FFT_PAD_SIZE_3MHZ 934
#define LIBLTE_PHY_FFT_PAD_SIZE_5MHZ 874
#define LIBLTE_PHY_FFT_PAD_SIZE_10MHZ 724
#define LIBLTE_PHY_FFT_PAD_SIZE_15MHZ 574
#define LIBLTE_PHY_FFT_PAD_SIZE_20MHZ 424
#define LIBLTE_PHY_N_RB_DL_1_4MHZ 6
#define LIBLTE_PHY_N_RB_DL_3MHZ 15
#define LIBLTE_PHY_N_RB_DL_5MHZ 25
#define LIBLTE_PHY_N_RB_DL_10MHZ 50
#define LIBLTE_PHY_N_RB_DL_15MHZ 75
#define LIBLTE_PHY_N_RB_DL_20MHZ 100
#define LIBLTE_PHY_N_RB_DL_MAX 110
#define LIBLTE_PHY_N_SC_RB_NORMAL_CP 12
#define LIBLTE_PHY_RA_RNTI_START 0x0001
#define LIBLTE_PHY_RA_RNTI_END 0x003C
#define LIBLTE_PHY_P_RNTI 0xFFFE
#define LIBLTE_PHY_SI_RNTI 0xFFFF
#define LIBLTE_PHY_N_ANT_MAX 4
// N_rb_dl
#define LIBLTE_PHY_N_RB_DL_1_4MHZ 6
#define LIBLTE_PHY_N_RB_DL_3MHZ 15
#define LIBLTE_PHY_N_RB_DL_5MHZ 25
#define LIBLTE_PHY_N_RB_DL_10MHZ 50
#define LIBLTE_PHY_N_RB_DL_15MHZ 75
#define LIBLTE_PHY_N_RB_DL_20MHZ 100
#define LIBLTE_PHY_N_RB_DL_MAX 110
// N_sc_rb
#define LIBLTE_PHY_N_SC_RB_NORMAL_CP 12
// FIXME: Add Extended CP
// RNTI
#define LIBLTE_PHY_RA_RNTI_START 0x0001
#define LIBLTE_PHY_RA_RNTI_END 0x003C
#define LIBLTE_PHY_P_RNTI 0xFFFE
#define LIBLTE_PHY_SI_RNTI 0xFFFF
// N_ant
#define LIBLTE_PHY_N_ANT_MAX 4
// Symbol, CP, Slot, Subframe, and Frame timing
#define LIBLTE_PHY_N_SAMPS_PER_SYMB 2048
#define LIBLTE_PHY_N_SAMPS_CP_L_0 160
#define LIBLTE_PHY_N_SAMPS_CP_L_ELSE 144
#define LIBLTE_PHY_N_SAMPS_PER_SLOT 15360
#define LIBLTE_PHY_N_SLOTS_PER_SUBFR 2
#define LIBLTE_PHY_N_SAMPS_PER_SUBFR (LIBLTE_PHY_N_SAMPS_PER_SLOT*LIBLTE_PHY_N_SLOTS_PER_SUBFR)
#define LIBLTE_PHY_N_SUBFR_PER_FRAME 10
#define LIBLTE_PHY_N_SAMPS_PER_FRAME (LIBLTE_PHY_N_SAMPS_PER_SUBFR*LIBLTE_PHY_N_SUBFR_PER_FRAME)
/*******************************************************************************
TYPEDEFS
......@@ -238,8 +262,7 @@ typedef struct{
int8 sss_z1_m1[31];
// Timing
float timing_corr_freq_err[15360];
float timing_abs_corr[15360];
float timing_abs_corr[LIBLTE_PHY_N_SAMPS_PER_SLOT*2];
// Samples to Symbols & Symbols to Samples
fftw_complex *s2s_in;
......@@ -625,14 +648,19 @@ LIBLTE_ERROR_ENUM liblte_phy_find_sss(LIBLTE_PHY_STRUCT *phy_struct,
Document Reference: 3GPP TS 36.211 v10.1.0
*********************************************************************/
// Defines
#define LIBLTE_PHY_N_MAX_ROUGH_CORR_SEARCH_PEAKS 5
// Enums
// Structs
typedef struct{
float freq_offset[LIBLTE_PHY_N_MAX_ROUGH_CORR_SEARCH_PEAKS];
uint32 symb_starts[LIBLTE_PHY_N_MAX_ROUGH_CORR_SEARCH_PEAKS][7];
uint32 n_corr_peaks;
}LIBLTE_PHY_COARSE_TIMING_STRUCT;
// Functions
LIBLTE_ERROR_ENUM liblte_phy_find_coarse_timing_and_freq_offset(LIBLTE_PHY_STRUCT *phy_struct,
float *i_samps,
float *q_samps,
uint32 *symb_starts,
float *freq_offset);
LIBLTE_ERROR_ENUM liblte_phy_find_coarse_timing_and_freq_offset(LIBLTE_PHY_STRUCT *phy_struct,
float *i_samps,
float *q_samps,
LIBLTE_PHY_COARSE_TIMING_STRUCT *timing_struct);
/*********************************************************************
Name: liblte_phy_create_subframe
......@@ -676,4 +704,23 @@ LIBLTE_ERROR_ENUM liblte_phy_get_subframe_and_ce(LIBLTE_PHY_STRUCT *phy
uint8 N_ant,
LIBLTE_PHY_SUBFRAME_STRUCT *subframe);
/*********************************************************************
Name: liblte_phy_get_tbs_mcs_and_n_prb_for_si
Description: Determines the transport block size, modulation and
coding scheme, and the number of PRBs needed to send
a certain number of bits for SI
Document Reference: 3GPP TS 36.213 v10.3.0 section 7.1.7
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_get_tbs_mcs_and_n_prb_for_si(uint32 N_bits,
uint32 N_rb_dl,
uint32 *tbs,
uint8 *mcs,
uint32 *N_prb);
#endif /* __LIBLTE_PHY_H__ */
This diff is collapsed.
......@@ -31,6 +31,7 @@
08/19/2012 Ben Wojtowicz Added functionality to support SIB2, SIB3,
SIB4, and SIB8 packing and unpacking
10/06/2012 Ben Wojtowicz Added more decoding/encoding.
11/10/2012 Ben Wojtowicz Filled in the N_bits for SI messages
*******************************************************************************/
......@@ -5560,6 +5561,9 @@ LIBLTE_ERROR_ENUM liblte_rrc_pack_sys_info_msg(LIBLTE_RRC_SYS_INFO_MSG_STRUCT *s
break;
}
}
// Fill in the number of bits used
msg->N_bits = msg_ptr - msg->msg;
}
return(err);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment