Commit b27ed63f authored by Raymond Knopp's avatar Raymond Knopp

lte-softmodem compiles, many memory faults during configuration ...

parent 2aae8723
...@@ -100,9 +100,7 @@ typedef struct RadioResourceConfig_s { ...@@ -100,9 +100,7 @@ typedef struct RadioResourceConfig_s {
long pucch_delta_shift; long pucch_delta_shift;
long pucch_nRB_CQI; long pucch_nRB_CQI;
long pucch_nCS_AN; long pucch_nCS_AN;
#if !defined(Rel10) && !defined(Rel14)
long pucch_n1_AN; long pucch_n1_AN;
#endif
long pdsch_referenceSignalPower; long pdsch_referenceSignalPower;
long pdsch_p_b; long pdsch_p_b;
long pusch_n_SB; long pusch_n_SB;
...@@ -151,6 +149,7 @@ typedef struct RadioResourceConfig_s { ...@@ -151,6 +149,7 @@ typedef struct RadioResourceConfig_s {
long ue_TimersAndConstants_n310; long ue_TimersAndConstants_n310;
long ue_TimersAndConstants_n311; long ue_TimersAndConstants_n311;
long ue_TransmissionMode; long ue_TransmissionMode;
long ue_multiple_max;
#ifdef Rel14 #ifdef Rel14
//SIB2 BR Options //SIB2 BR Options
long* preambleTransMax_CE_r13; long* preambleTransMax_CE_r13;
...@@ -188,7 +187,8 @@ typedef struct RrcConfigurationReq_s { ...@@ -188,7 +187,8 @@ typedef struct RrcConfigurationReq_s {
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
int nb_antenna_ports[MAX_NUM_CCs]; int nb_antenna_ports[MAX_NUM_CCs];
int eMTC_configured;
int SL_configured;
RadioResourceConfig radioresourceconfig[MAX_NUM_CCs]; RadioResourceConfig radioresourceconfig[MAX_NUM_CCs];
RadioResourceConfig radioresourceconfig_BR[MAX_NUM_CCs]; RadioResourceConfig radioresourceconfig_BR[MAX_NUM_CCs];
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#define ENB_CONFIG_STRING_ENB_LIST "eNBs" #define ENB_CONFIG_STRING_ENB_LIST "eNBs"
/* component carriers configuration section name */ /* component carriers configuration section name */
#define ENB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers" #define ENB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers"
#define ENB_CONFIG_STRING_COMPONENT_BR_PARAMETERS "br_parameters"
#define ENB_CONFIG_STRING_FRAME_TYPE "frame_type" #define ENB_CONFIG_STRING_FRAME_TYPE "frame_type"
#define ENB_CONFIG_STRING_PBCH_REPETITION "pbch_repetition" #define ENB_CONFIG_STRING_PBCH_REPETITION "pbch_repetition"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
...@@ -670,13 +670,13 @@ uint8_t flexran_get_special_subframe_assignment(mid_t mod_id, uint8_t cc_id) ...@@ -670,13 +670,13 @@ uint8_t flexran_get_special_subframe_assignment(mid_t mod_id, uint8_t cc_id)
long flexran_get_ra_ResponseWindowSize(mid_t mod_id, uint8_t cc_id) long flexran_get_ra_ResponseWindowSize(mid_t mod_id, uint8_t cc_id)
{ {
if (!rrc_is_present(mod_id)) return 0; if (!rrc_is_present(mod_id)) return 0;
return RC.rrc[mod_id]->configuration.rach_raResponseWindowSize[cc_id]; return RC.rrc[mod_id]->configuration.radioresourceconfig[cc_id].rach_raResponseWindowSize;
} }
long flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, uint8_t cc_id) long flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, uint8_t cc_id)
{ {
if (!rrc_is_present(mod_id)) return 0; if (!rrc_is_present(mod_id)) return 0;
return RC.rrc[mod_id]->configuration.rach_macContentionResolutionTimer[cc_id]; return RC.rrc[mod_id]->configuration.radioresourceconfig[cc_id].rach_macContentionResolutionTimer;
} }
Protocol__FlexDuplexMode flexran_get_duplex_mode(mid_t mod_id, uint8_t cc_id) Protocol__FlexDuplexMode flexran_get_duplex_mode(mid_t mod_id, uint8_t cc_id)
...@@ -1131,7 +1131,7 @@ int8_t flexran_agent_get_operating_pdsch_refpower(mid_t mod_id, uint8_t cc_id) ...@@ -1131,7 +1131,7 @@ int8_t flexran_agent_get_operating_pdsch_refpower(mid_t mod_id, uint8_t cc_id)
long flexran_agent_get_operating_pusch_p0(mid_t mod_id, uint8_t cc_id) long flexran_agent_get_operating_pusch_p0(mid_t mod_id, uint8_t cc_id)
{ {
if (!rrc_is_present(mod_id)) return 0; if (!rrc_is_present(mod_id)) return 0;
return RC.rrc[mod_id]->configuration.pusch_p0_Nominal[cc_id]; return RC.rrc[mod_id]->configuration.radioresourceconfig[cc_id].pusch_p0_Nominal;
} }
void flexran_agent_set_operating_dl_freq(mid_t mod_id, uint8_t cc_id, uint32_t dl_freq_mhz) void flexran_agent_set_operating_dl_freq(mid_t mod_id, uint8_t cc_id, uint32_t dl_freq_mhz)
......
This diff is collapsed.
...@@ -387,8 +387,6 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP, ...@@ -387,8 +387,6 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
frameP, frameP,
BCCH_SI_BR+i,1, BCCH_SI_BR+i,1,
&cc->BCCH_BR_pdu[i+1].payload[0], &cc->BCCH_BR_pdu[i+1].payload[0],
1,
module_idP,
0); // not used in this case 0); // not used in this case
AssertFatal(bcch_sdu_length>0,"RRC returned 0 bytes for SI-BR %d\n",i); AssertFatal(bcch_sdu_length>0,"RRC returned 0 bytes for SI-BR %d\n",i);
......
...@@ -2874,7 +2874,11 @@ schedule_ue_spec_br( ...@@ -2874,7 +2874,11 @@ schedule_ue_spec_br(
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH, DCCH,
(TBS-ta_len-header_len_dcch)); // transport block set size (TBS-ta_len-header_len_dcch)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
); // transport block set size
sdu_lengths[0]=0; sdu_lengths[0]=0;
...@@ -2890,7 +2894,11 @@ schedule_ue_spec_br( ...@@ -2890,7 +2894,11 @@ schedule_ue_spec_br(
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH, DCCH,
TBS, //not used TBS, //not used
(char *)&dlsch_buffer[0]); (char *)&dlsch_buffer[0]
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
T_INT(harq_pid), T_INT(DCCH), T_INT(sdu_lengths[0])); T_INT(harq_pid), T_INT(DCCH), T_INT(sdu_lengths[0]));
...@@ -2918,7 +2926,11 @@ schedule_ue_spec_br( ...@@ -2918,7 +2926,11 @@ schedule_ue_spec_br(
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH+1, DCCH+1,
(TBS-ta_len-header_len_dcch-sdu_length_total)); // transport block set size less allocations for timing advance and (TBS-ta_len-header_len_dcch-sdu_length_total)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
); // transport block set size less allocations for timing advance and
// DCCH SDU // DCCH SDU
sdu_lengths[num_sdus] = 0; sdu_lengths[num_sdus] = 0;
...@@ -2934,7 +2946,11 @@ schedule_ue_spec_br( ...@@ -2934,7 +2946,11 @@ schedule_ue_spec_br(
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH+1, DCCH+1,
TBS, //not used TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]); (char *)&dlsch_buffer[sdu_length_total]
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
T_INT(harq_pid), T_INT(DCCH+1), T_INT(sdu_lengths[num_sdus])); T_INT(harq_pid), T_INT(DCCH+1), T_INT(sdu_lengths[num_sdus]));
...@@ -2970,7 +2986,11 @@ schedule_ue_spec_br( ...@@ -2970,7 +2986,11 @@ schedule_ue_spec_br(
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS-ta_len-header_len_dcch-sdu_length_total-header_len_dtch); TBS-ta_len-header_len_dcch-sdu_length_total-header_len_dtch
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
if (rlc_status.bytes_in_buffer > 0) { if (rlc_status.bytes_in_buffer > 0) {
...@@ -2985,7 +3005,11 @@ schedule_ue_spec_br( ...@@ -2985,7 +3005,11 @@ schedule_ue_spec_br(
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS, //not used TBS, //not used
(char*)&dlsch_buffer[sdu_length_total]); (char*)&dlsch_buffer[sdu_length_total]
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
T_INT(harq_pid), T_INT(lcid), T_INT(sdu_lengths[num_sdus])); T_INT(harq_pid), T_INT(lcid), T_INT(sdu_lengths[num_sdus]));
...@@ -3109,8 +3133,8 @@ schedule_ue_spec_br( ...@@ -3109,8 +3133,8 @@ schedule_ue_spec_br(
// this is the normalized RX power // this is the normalized RX power
/* TODO: fix how we deal with power, unit is not dBm, it's special from nfapi */ /* TODO: fix how we deal with power, unit is not dBm, it's special from nfapi */
normalized_rx_power = ue_sched_ctl->pucch1_snr[CC_id]; normalized_rx_power = (5*ue_sched_ctl->pucch1_snr[CC_id]-640)/10+30;
target_rx_power = 208; target_rx_power = eNB->puCch10xSnr/10+30;
// this assumes accumulated tpc // this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
...@@ -3125,17 +3149,15 @@ schedule_ue_spec_br( ...@@ -3125,17 +3149,15 @@ schedule_ue_spec_br(
if (normalized_rx_power>(target_rx_power+4)) { if (normalized_rx_power>(target_rx_power+4)) {
tpc = 0; //-1 tpc = 0; //-1
ue_sched_ctl->pucch_tpc_accumulated[CC_id]--;
} else if (normalized_rx_power<(target_rx_power-4)) { } else if (normalized_rx_power<(target_rx_power-4)) {
tpc = 2; //+1 tpc = 2; //+1
ue_sched_ctl->pucch_tpc_accumulated[CC_id]++;
} else { } else {
tpc = 1; //0 tpc = 1; //0
} }
LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n", LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, normalized/target rx power %d/%d\n",
module_idP,frameP, subframeP,harq_pid,tpc, module_idP,frameP, subframeP,harq_pid,tpc,
ue_sched_ctl->pucch_tpc_accumulated[CC_id],normalized_rx_power,target_rx_power); normalized_rx_power,target_rx_power);
} // Po_PUCCH has been updated } // Po_PUCCH has been updated
else { else {
......
...@@ -195,7 +195,7 @@ void dlsch_scheduler_pre_ue_select_fairRR( ...@@ -195,7 +195,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
// Initialization // Initialization
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
dlsch_ue_max_num[CC_id] = (uint16_t)RC.rrc[module_idP]->configuration.ue_multiple_max[CC_id]; dlsch_ue_max_num[CC_id] = (uint16_t)RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max;
// save origin DL PDU number // save origin DL PDU number
DL_req = &eNB->DL_req[CC_id].dl_config_request_body; DL_req = &eNB->DL_req[CC_id].dl_config_request_body;
...@@ -1978,7 +1978,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -1978,7 +1978,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
//save ulsch dci number //save ulsch dci number
saved_ulsch_dci[CC_id] = eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body.number_of_dci; saved_ulsch_dci[CC_id] = eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body.number_of_dci;
// maximum multiplicity number // maximum multiplicity number
ulsch_ue_max_num[CC_id] =RC.rrc[module_idP]->configuration.ue_multiple_max[CC_id]; ulsch_ue_max_num[CC_id] =RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max;
cc_id_flag[CC_id] = 0; cc_id_flag[CC_id] = 0;
ue_first_num[CC_id] = 0; ue_first_num[CC_id] = 0;
......
This diff is collapsed.
...@@ -896,9 +896,6 @@ typedef struct { ...@@ -896,9 +896,6 @@ typedef struct {
uint32_t pucch_tpc_tx_frame; uint32_t pucch_tpc_tx_frame;
uint32_t pucch_tpc_tx_subframe; uint32_t pucch_tpc_tx_subframe;
#ifdef LOCALIZATION
eNB_UE_estimated_distances distance;
#endif
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t rach_resource_type; uint8_t rach_resource_type;
...@@ -978,6 +975,7 @@ typedef struct { ...@@ -978,6 +975,7 @@ typedef struct {
uint16_t feedback_cnt[NFAPI_CC_MAX]; uint16_t feedback_cnt[NFAPI_CC_MAX];
uint16_t timing_advance; uint16_t timing_advance;
uint16_t timing_advance_r9; uint16_t timing_advance_r9;
uint8_t tpc_accumulated[NFAPI_CC_MAX];
uint8_t periodic_wideband_cqi[NFAPI_CC_MAX]; uint8_t periodic_wideband_cqi[NFAPI_CC_MAX];
uint8_t periodic_wideband_spatial_diffcqi[NFAPI_CC_MAX]; uint8_t periodic_wideband_spatial_diffcqi[NFAPI_CC_MAX];
uint8_t periodic_wideband_pmi[NFAPI_CC_MAX]; uint8_t periodic_wideband_pmi[NFAPI_CC_MAX];
...@@ -1050,9 +1048,12 @@ typedef struct { ...@@ -1050,9 +1048,12 @@ typedef struct {
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t rach_resource_type; uint8_t rach_resource_type;
uint8_t msg2_mpdcch_repetition_cnt; uint8_t msg2_mpdcch_repetition_cnt;
int msg2_mpdcch_done;
uint8_t msg4_mpdcch_repetition_cnt; uint8_t msg4_mpdcch_repetition_cnt;
int msg4_mpdcch_done;
uint8_t msg2_narrowband; uint8_t msg2_narrowband;
uint8_t msg34_narrowband; uint8_t msg34_narrowband;
int msg4_rrc_sdu_length;
#endif #endif
int32_t crnti_rrc_mui; int32_t crnti_rrc_mui;
int8_t crnti_harq_pid; int8_t crnti_harq_pid;
......
...@@ -113,12 +113,12 @@ fill_rar(const module_id_t module_idP, ...@@ -113,12 +113,12 @@ fill_rar(const module_id_t module_idP,
unsigned short fill_rar_br(eNB_MAC_INST *eNB, unsigned short fill_rar_br(eNB_MAC_INST *eNB,
int CC_id, int CC_id,
RA_TEMPLATE *RA_template, RA_t *ra,
const frame_t frameP, const frame_t frameP,
const sub_frame_t subframeP, const sub_frame_t subframeP,
uint8_t* const dlsch_buffer, uint8_t* const dlsch_buffer,
const uint8_t ce_level const uint8_t ce_level
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
...@@ -142,37 +142,36 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB, ...@@ -142,37 +142,36 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4 rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4 rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
int N_NB_index;
// Copy the Msg2 narrowband
RA_template->msg34_narrowband = RA_template->msg2_narrowband;
RA_template->msg3_first_rb = 0;
RA_template->msg3_nb_rb = 2;
// Copy the Msg2 narrowband // Copy the Msg2 narrowband
ra->msg34_narrowband = ra->msg2_narrowband; ra->msg34_narrowband = ra->msg2_narrowband;
ra->msg3_first_rb = 0;
ra->msg3_nb_rb = 2;
if (ce_level < 2) { //CE Level 0,1, CEmodeA if (ce_level < 2) { //CE Level 0,1, CEmodeA
input_buffer_length = 6; input_buffer_length = 6;
N_NB_index = get_numnarrowbandbits(cc->mib->message.dl_Bandwidth);
rar[4] = (uint8_t)(RA_template->rnti>>8); rar[4] = (uint8_t)(ra->rnti>>8);
rar[5] = (uint8_t)(RA_template->rnti&0xff); rar[5] = (uint8_t)(ra->rnti&0xff);
//cc->RA_template[ra_idx].timing_offset = 0; //cc->ra[ra_idx].timing_offset = 0;
reps = 0; reps = 0;
RA_template->msg3_mcs = 7; ra->msg3_mcs = 7;
TPC = 3; // no power increase TPC = 3; // no power increase
ULdelay = 0; ULdelay = 0;
cqireq = 0; cqireq = 0;
mpdcch_nb_index = 0; mpdcch_nb_index = 0;
rballoc = mac_computeRIV(6,RA_template->msg3_first_rb,RA_template->msg3_nb_rb); rballoc = mac_computeRIV(6,ra->msg3_first_rb,ra->msg3_nb_rb);
uint32_t buffer = 0; uint32_t buffer = 0;
buffer |= RA_template->msg34_narrowband << (16 + (4 - N_NB_index)); buffer |= ra->msg34_narrowband << (16 + (4 - N_NB_index));
buffer |= ((rballoc & 0xFF) << (12 + (4 - N_NB_index))); buffer |= ((rballoc & 0xFF) << (12 + (4 - N_NB_index)));
buffer |= ((reps & 0x03) << (10 + (4 - N_NB_index))); buffer |= ((reps & 0x03) << (10 + (4 - N_NB_index)));
buffer |= ((RA_template->msg3_mcs & 0x07) << (7 + (4 - N_NB_index))); buffer |= ((ra->msg3_mcs & 0x07) << (7 + (4 - N_NB_index)));
buffer |= ((TPC & 0x07) << (4 + (4 - N_NB_index))); buffer |= ((TPC & 0x07) << (4 + (4 - N_NB_index)));
buffer |= ((cqireq & 0x01) << (3 + (4 - N_NB_index))); buffer |= ((cqireq & 0x01) << (3 + (4 - N_NB_index)));
buffer |= ((ULdelay & 0x01) << (2 + (4 - N_NB_index))); buffer |= ((ULdelay & 0x01) << (2 + (4 - N_NB_index)));
...@@ -183,37 +182,20 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB, ...@@ -183,37 +182,20 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
} }
else { // CE level 2,3 => CEModeB else { // CE level 2,3 => CEModeB
// reps = 4; AssertFatal(1==0,"Shouldn't get here ...\n");
mcs = 7; input_buffer_length =5;
TPC = 3; // no power increase
ULdelay = 0;
cqireq = 0;
rar[2] |= ((mcs & 0x8) >> 3); // mcs 10
rar[3] =
(((mcs & 0x7) << 5)) | ((TPC & 7) << 2) | ((ULdelay & 1) << 1)
| (cqireq & 1);
} else { // CE level 2,3 => CEModeB
rar[3] = (uint8_t)(RA_template->rnti>>8); rar[3] = (uint8_t)(ra->rnti>>8);
rar[4] = (uint8_t)(RA_template->rnti&0xff); rar[4] = (uint8_t)(ra->rnti&0xff);
} }
LOG_I(MAC,"[RAPROC] Frame %d Subframe %d : Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x,preamble %d/%d,TIMING OFFSET %d\n", LOG_I(MAC,"[RAPROC] Frame %d Subframe %d : Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x,preamble %d/%d,TIMING OFFSET %d\n",
frameP,subframeP, frameP,subframeP,
*(uint8_t*)rarh,rar[0],rar[1],rar[2],rar[3],rar[4],rar[5], *(uint8_t*)rarh,rar[0],rar[1],rar[2],rar[3],rar[4],rar[5],
ce_level, ce_level,
RA_template->rnti, ra->rnti,
rarh->RAPID,RA_template->preamble_index, rarh->RAPID,ra->preamble_index,
RA_template->timing_offset); ra->timing_offset);
rar[3] = (uint8_t) (ra->rnti >> 8);
rar[4] = (uint8_t) (ra->rnti & 0xff);
}
LOG_D(MAC,
"[RAPROC] Frame %d Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x,preamble %d/%d,TIMING OFFSET %d\n",
frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2], rar[3],
rar[4], rar[5], ce_level, ra->rnti, rarh->RAPID,
ra->preamble_index, ra->timing_offset);
if (opt_enabled) { if (opt_enabled) {
trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, eNB->Mod_id, WS_RA_RNTI , 1, trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, eNB->Mod_id, WS_RA_RNTI , 1,
......
...@@ -558,19 +558,15 @@ ue_send_sdu(module_id_t module_idP, ...@@ -558,19 +558,15 @@ ue_send_sdu(module_id_t module_idP,
LOG_T(MAC, "\n"); LOG_T(MAC, "\n");
#endif #endif
mac_rrc_data_ind(module_idP, mac_rrc_data_ind_ue(module_idP,
CC_id, CC_id,
frameP,subframeP, frameP,subframeP,
UE_mac_inst[module_idP].crnti, UE_mac_inst[module_idP].crnti,
CCCH, CCCH,
(uint8_t*)payload_ptr, (uint8_t*)payload_ptr,
rx_lengths[i], rx_lengths[i],
ENB_FLAG_NO,
eNB_index, eNB_index,
0 0
#ifdef Rel14
,0
#endif
); );
} else if ((rx_lcids[i] == DCCH) || (rx_lcids[i] == DCCH1)) { } else if ((rx_lcids[i] == DCCH) || (rx_lcids[i] == DCCH1)) {
......
...@@ -48,8 +48,8 @@ void handle_rach(UL_IND_t *UL_info) { ...@@ -48,8 +48,8 @@ void handle_rach(UL_IND_t *UL_info) {
"Got regular PRACH preamble, not BL/CE\n"); "Got regular PRACH preamble, not BL/CE\n");
LOG_D(MAC,"Frame %d, Subframe %d Calling initiate_ra_proc (CE_level %d)\n",UL_info->frame,UL_info->subframe, LOG_D(MAC,"Frame %d, Subframe %d Calling initiate_ra_proc (CE_level %d)\n",UL_info->frame,UL_info->subframe,
UL_info->rach_ind_br.preamble_list[i].preamble_rel13.rach_resource_type-1); UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type-1);
UL_info->rach_ind_br.number_of_preambles=0; UL_info->rach_ind_br.rach_indication_body.number_of_preambles=0;
initiate_ra_proc(UL_info->module_id, initiate_ra_proc(UL_info->module_id,
UL_info->CC_id, UL_info->CC_id,
......
This diff is collapsed.
This diff is collapsed.
...@@ -1857,7 +1857,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance ...@@ -1857,7 +1857,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
lte_frame_type_t frame_type = RC.eNB[instance][CC_id]->frame_parms.frame_type; lte_frame_type_t frame_type = RC.eNB[instance][CC_id]->frame_parms.frame_type;
/* get nB from configuration */ /* get nB from configuration */
/* get default DRX cycle from configuration */ /* get default DRX cycle from configuration */
Tc = (uint8_t)RC.rrc[instance]->configuration.pcch_defaultPagingCycle[CC_id]; Tc = (uint8_t)RC.rrc[instance]->configuration.radioresourceconfig[CC_id].pcch_defaultPagingCycle;
if (Tc < PCCH_Config__defaultPagingCycle_rf32 || Tc > PCCH_Config__defaultPagingCycle_rf256) { if (Tc < PCCH_Config__defaultPagingCycle_rf32 || Tc > PCCH_Config__defaultPagingCycle_rf256) {
continue; continue;
} }
...@@ -1865,7 +1865,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance ...@@ -1865,7 +1865,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
/* set T = min(Tc,Tue) */ /* set T = min(Tc,Tue) */
T = Tc < Tue ? Ttab[Tc] : Ttab[Tue]; T = Tc < Tue ? Ttab[Tc] : Ttab[Tue];
/* set pcch_nB = PCCH-Config->nB */ /* set pcch_nB = PCCH-Config->nB */
pcch_nB = (uint32_t)RC.rrc[instance]->configuration.pcch_nB[CC_id]; pcch_nB = (uint32_t)RC.rrc[instance]->configuration.radioresourceconfig[CC_id].pcch_nB;
switch (pcch_nB) { switch (pcch_nB) {
case PCCH_Config__nB_fourT: case PCCH_Config__nB_fourT:
Ns = 4; Ns = 4;
......
...@@ -432,6 +432,9 @@ mac_rrc_data_ind( ...@@ -432,6 +432,9 @@ mac_rrc_data_ind(
const uint8_t* sduP, const uint8_t* sduP,
const sdu_size_t sdu_lenP, const sdu_size_t sdu_lenP,
const uint8_t mbsfn_sync_areaP const uint8_t mbsfn_sync_areaP
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, const boolean_t brOption
#endif
); );
int8_t int8_t
...@@ -458,9 +461,6 @@ mac_rrc_data_ind_ue( ...@@ -458,9 +461,6 @@ mac_rrc_data_ind_ue(
const sdu_size_t sdu_lenP, const sdu_size_t sdu_lenP,
const mac_enb_index_t eNB_indexP, const mac_enb_index_t eNB_indexP,
const uint8_t mbsfn_sync_areaP const uint8_t mbsfn_sync_areaP
#ifdef Rel14
, const boolean_t brOption
#endif
); );
void mac_sync_ind( module_id_t Mod_instP, uint8_t status); void mac_sync_ind( module_id_t Mod_instP, uint8_t status);
......
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