Commit 1ed57bbf authored by matzakos's avatar matzakos

Extension to multiple UEs. Currently being tested with two UEs. Second UE...

Extension to multiple UEs. Currently being tested with two UEs. Second UE doesn't always reach the RRC Connection Reconfiguration stage.
parent 6cc3fb72
......@@ -1199,6 +1199,7 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) {
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) {
//LOG_I(MAC, "Panos-D: oai_nfapi_ul_config_req 1 \n");
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
ul_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
......
......@@ -2763,7 +2763,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu
if(result == 0)
{
//printf( "Panos-D: P7 Pack failed to pack message\n");
printf( "Panos-D: P7 Pack failed to pack message\n");
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack failed to pack message\n");
return -1;
}
......
......@@ -675,6 +675,8 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
//printf("subframe_buffer->sfn_sf:%d sfn_sf:%d\n", subframe_buffer->sfn_sf, sfn_sf);
if(tx_subframe_buffer->sfn_sf == sfn_sf_tx)
{
//printf("Panos-D: pnf_p7_subframe_ind tx_subframe_buffer->sfn_sf == sfn_sf_tx satisfied, pnf_p7: %d MINE: %d.%d, REAL: %d.%d \n",
// tx_subframe_buffer->sfn_sf, sfn_sf_tx>>4, sfn_sf_tx&0xf, tx_subframe_buffer->sfn_sf>>4, tx_subframe_buffer->sfn_sf&0xf);
if(tx_subframe_buffer->tx_req != 0)
{
if(pnf_p7->_public.tx_req)
......@@ -1366,6 +1368,7 @@ void pnf_handle_dl_node_sync(void *pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7, u
// unpack the message
if (nfapi_p7_message_unpack(pRecvMsg, recvMsgLen, &dl_node_sync, sizeof(dl_node_sync), &pnf_p7->_public.codec_config) < 0)
{
printf("Panos-D: %s: Unpack message failed, ignoring\n", __FUNCTION__);
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: Unpack message failed, ignoring\n", __FUNCTION__);
return;
}
......
......@@ -1247,9 +1247,14 @@ void vnf_handle_timing_info(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
int16_t vnf_pnf_sfnsf_delta = NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf) - NFAPI_SFNSF2DEC(ind.last_sfn_sf);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() PNF:SFN/SF:%d VNF:SFN/SF:%d deltaSFNSF:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind.last_sfn_sf), NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), vnf_pnf_sfnsf_delta);
// Panos: Careful here!!!
if (vnf_pnf_sfnsf_delta>1 || vnf_pnf_sfnsf_delta < -1)
//if (vnf_pnf_sfnsf_delta>0 || vnf_pnf_sfnsf_delta < 0)
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() LARGE SFN/SF DELTA between PNF and VNF delta:%d VNF:%d PNF:%d\n\n\n\n\n\n\n\n\n", __FUNCTION__, vnf_pnf_sfnsf_delta, NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), NFAPI_SFNSF2DEC(ind.last_sfn_sf));
// Panos: Careful here!!!
//vnf_p7->p7_connections[0].sfn_sf = ind.last_sfn_sf;
}
}
}
......
......@@ -816,7 +816,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
if (nfapi_mode) {
if (number_ul_pdu>0)
{
//LOG_D(PHY, "UL_CONFIG to send to PNF\n");
//LOG_I(PHY, "UL_CONFIG to send to PNF\n");
oai_nfapi_ul_config_req(UL_req);
UL_req->ul_config_request_body.number_of_pdus=0;
number_ul_pdu=0;
......
......@@ -1484,6 +1484,7 @@ typedef struct {
nfapi_dl_config_request_t* dl_config_req;
nfapi_ul_config_request_t* ul_config_req;
nfapi_hi_dci0_request_t* hi_dci0_req;
nfapi_tx_request_pdu_t* tx_request_pdu_list;
nfapi_tx_request_t* tx_req;
eth_params_t eth_params_n;
......
......@@ -186,10 +186,10 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
module_idP, frameP, subframeP, CC_id, ra->Msg3_frame,
ra->Msg3_subframe);
LOG_D(MAC,
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d)\n",
LOG_I(MAC,
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d) for rnti: %d\n",
frameP, subframeP, ra->Msg3_frame, ra->Msg3_subframe,
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round);
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round, ra->rnti);
ul_config_pdu =
&ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus];
......@@ -693,7 +693,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
cc[CC_idP].RAR_pdu.payload, N_RB_DL, 7);
add_msg3(module_idP, CC_idP, ra, frameP, subframeP);
ra->state = WAITMSG3;
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d: state:WAITMSG3\n", module_idP, frameP, subframeP);
LOG_I(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d: state:WAITMSG3\n", module_idP, frameP, subframeP);
// DL request
mac->TX_req[CC_idP].sfn_sf = (frameP << 4) + subframeP;
......
......@@ -87,6 +87,7 @@ rx_sdu(const module_id_t enb_mod_idP,
const uint16_t sdu_lenP,
const uint16_t timing_advance, const uint8_t ul_cqi)
{
//LOG_I(MAC, "Panos-D: rx_sdu 1 \n");
int current_rnti = rntiP;
unsigned char rx_ces[MAX_NUM_CE], num_ce, num_sdu, i, *payload_ptr;
unsigned char rx_lcids[NB_RB_MAX];
......@@ -155,7 +156,7 @@ rx_sdu(const module_id_t enb_mod_idP,
UE_id));
}
} else { // we've got an error
LOG_D(MAC,
LOG_I(MAC,
"[eNB %d][PUSCH %d] CC_id %d ULSCH in error in round %d, ul_cqi %d\n",
enb_mod_idP, harq_pid, CC_idP,
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
......@@ -185,7 +186,7 @@ rx_sdu(const module_id_t enb_mod_idP,
radioResourceConfigCommon->rach_ConfigCommon.
maxHARQ_Msg3Tx);
LOG_D(MAC,
LOG_I(MAC,
"[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu round %d from PHY (rnti %x, RA_id %d) ul_cqi %d\n",
enb_mod_idP, harq_pid, CC_idP, ra[RA_id].msg3_round,
current_rnti, RA_id, ul_cqi);
......@@ -217,10 +218,11 @@ rx_sdu(const module_id_t enb_mod_idP,
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP,
subframeP);
}
LOG_I(MAC, "Panos-D: rx_sdu() 2 before error returning \n");
return;
}
} else {
LOG_W(MAC,
LOG_I(MAC,
"Cannot find UE or RA corresponding to ULSCH rnti %x, dropping it\n",
current_rnti);
return;
......@@ -1043,6 +1045,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
for (i = 0; i < NB_RA_PROC_MAX; i++) {
if ((cc->ra[i].state == WAITMSG3) &&
(cc->ra[i].Msg3_subframe == sched_subframe)) {
//LOG_I(MAC, "Panos-D: schedule_ulsch WAITMSG3 \n");
first_rb[CC_id]++;
// cc->ray[i].Msg3_subframe = -1;
break;
......@@ -1062,6 +1065,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
unsigned char sched_subframeP, uint16_t * first_rb)
{
//LOG_I(MAC, "Panos-D: schedule_ulsch_rnti \n");
int UE_id;
uint8_t aggregation = 2;
rnti_t rnti = -1;
......@@ -1109,7 +1113,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
// don't schedule if Msg4 is not received yet
if (UE_list->UE_template[UE_PCCID(module_idP, UE_id)][UE_id].
configured == FALSE) {
LOG_D(MAC,
LOG_I(MAC,
"[eNB %d] frame %d subfarme %d, UE %d: not configured, skipping UE scheduling \n",
module_idP, frameP, subframeP, UE_id);
continue;
......@@ -1118,7 +1122,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
rnti = UE_RNTI(module_idP, UE_id);
if (rnti == NOT_A_RNTI) {
LOG_W(MAC, "[eNB %d] frame %d subfarme %d, UE %d: no RNTI \n",
LOG_I(MAC, "[eNB %d] frame %d subfarme %d, UE %d: no RNTI \n",
module_idP, frameP, subframeP, UE_id);
continue;
}
......@@ -1148,7 +1152,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
*/
if (UE_list->UE_sched_ctrl[UE_id].ul_failure_timer == 0 &&
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 0) {
LOG_W(MAC,
LOG_I(MAC,
"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: UE in weird state, let's put it 'out of sync'\n",
module_idP, frameP, subframeP, UE_id, rnti, CC_id);
// inform RRC of failure and clear timer
......@@ -1173,7 +1177,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
if (CCE_allocation_infeasible
(module_idP, CC_id, 1, subframeP, aggregation, rnti)) {
LOG_W(MAC,
LOG_I(MAC,
"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: not enough nCCE\n",
module_idP, frameP, subframeP, UE_id, rnti, CC_id);
continue; // break;
......@@ -1181,7 +1185,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
/* be sure that there are some free RBs */
if (first_rb[CC_id] >= N_RB_UL - 1) {
LOG_W(MAC,
LOG_I(MAC,
"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP, frameP, subframeP, UE_id, rnti, CC_id);
continue;
......@@ -1463,6 +1467,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
T_INT(rb_table[rb_table_index]), T_INT(round));
// fill in NAK information
LOG_I(MAC, "schedule_ulsch_rnti() Retransmission case! \n");
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
memset((void *) hi_dci0_pdu, 0,
......
......@@ -60,8 +60,10 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e
if (first_sync == 1 && !(mme_enabled == 1)) {
//layer2_init_UE(module_idP);
LOG_I(MAC, "Panos-D: dl_phy_sync_success 1 \n");
openair_rrc_ue_init(module_idP, eNB_index);
} else {
LOG_I(MAC, "Panos-D: dl_phy_sync_success 2 \n");
rrc_in_sync_ind(module_idP, frameP, eNB_index);
}
}
......
......@@ -327,7 +327,7 @@ Msg3_transmitted(module_id_t module_idP, uint8_t CC_id,
"Transmission on secondary CCs is not supported yet\n");
// start contention resolution timer
LOG_D(MAC,
LOG_I(MAC,
"[UE %d][RAPROC] Frame %d : Msg3_tx: Setting contention resolution timer\n",
module_idP, frameP);
UE_mac_inst[module_idP].RA_contention_resolution_cnt = 0;
......
......@@ -63,7 +63,7 @@ uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const fra
}
if (rarh->RAPID == preamble_index) {
LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
LOG_I(PHY, "Found RAR with the intended RAPID %d\n",
rarh->RAPID);
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
break;
......
......@@ -1625,7 +1625,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t * ulsch_buffer, uint16_t buflen, uint8_t * access_mode)
{
LOG_I(MAC, "Panos-D: In ue_get_sdu() 1 \n");
LOG_I(MAC, "Panos-D: UE[%d] In ue_get_sdu() 1 \n", module_idP);
uint8_t total_rlc_pdu_header_len = 0, rlc_pdu_header_len_last = 0;
uint16_t buflen_remain = 0;
uint8_t bsr_len = 0, bsr_ce_len = 0, bsr_header_len = 0;
......@@ -2214,7 +2214,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
buflen - sdu_length_total - payload_offset);
// cycle through SDUs and place in ulsch_buffer
if (sdu_length_total) {
LOG_I(MAC, "Panos-D: ue_get_sdu() 2 before copying to ulsch_buffer");
LOG_I(MAC, "Panos-D: [UE %d] ue_get_sdu() 2 before copying to ulsch_buffer, SFN/SF: %d/%d \n \n \n", module_idP, frameP, subframe);
memcpy(&ulsch_buffer[payload_offset], ulsch_buff,
sdu_length_total);
}
......
......@@ -372,22 +372,22 @@ boolean_t pdcp_data_req(
break;
case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
LOG_D(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
ret= FALSE;
break;
case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
LOG_D(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
ret= FALSE;
break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
LOG_D(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= FALSE;
break;
default:
LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
LOG_D(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
ret= FALSE;
break;
}
......
This diff is collapsed.
......@@ -20,6 +20,7 @@
UL_IND_t *UL_INFO;
nfapi_tx_request_pdu_t* tx_request_pdu_list;
int tx_req_num_elems;
......@@ -71,18 +72,19 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id, int frame, int subframe, UL_IND
/*uint8_t tdd_mapping_mode,
uint16_t tdd_multiplexing_mask*/);
int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req, int frame, int subframe);
int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req, int frame, int subframe, module_id_t Mod_id);
void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,uint8_t subframe,uint8_t srs_present, int index);
int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req);
//int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, nfapi_tx_request_pdu_t* tx_request_pdu_list);
int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, module_id_t Mod_id);
int tx_req_UE_MAC(nfapi_tx_request_t* req);
int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req);
int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req, module_id_t Mod_id);
// The following set of memcpy functions should be getting called as callback functions from
// pnf_p7_subframe_ind.
......
......@@ -418,6 +418,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt=0;
if (UE_rrc_inst[Mod_idP].Info[eNB_index].T310_active==1) {
LOG_I(RRC, "Panos-D: rrc_in_sync_ind 1 \n");
UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt++;
}
......
......@@ -1828,8 +1828,8 @@ rrc_ue_process_securityModeCommand(
uint8_t buffer[200];
int i, securityMode;
LOG_I(RRC,"[UE %d] Frame %d: Receiving from SRB1 (DL-DCCH), Processing securityModeCommand (eNB %d)\n",
ctxt_pP->module_id,ctxt_pP->frame,eNB_index);
LOG_I(RRC,"[UE %d] SFN/SF %d/%d: Receiving from SRB1 (DL-DCCH), Processing securityModeCommand (eNB %d)\n",
ctxt_pP->module_id,ctxt_pP->frame, ctxt_pP->subframe, eNB_index);
switch (securityModeCommand->criticalExtensions.choice.c1.choice.securityModeCommand_r8.securityConfigSMC.securityAlgorithmConfig.cipheringAlgorithm) {
case CipheringAlgorithm_r12_eea0:
......@@ -1886,8 +1886,10 @@ rrc_ue_process_securityModeCommand(
ul_dcch_msg.message.present = UL_DCCH_MessageType_PR_c1;
if (securityMode >= NO_SECURITY_MODE) {
LOG_I(RRC, "rrc_ue_process_securityModeCommand, security mode complete case \n");
ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_securityModeComplete;
} else {
LOG_I(RRC, "rrc_ue_process_securityModeCommand, security mode failure case \n");
ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_securityModeFailure;
}
......@@ -1938,11 +1940,11 @@ rrc_ue_process_securityModeCommand(
| (UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4),
kRRCenc, kRRCint, kUPenc);
} else {
LOG_W(RRC, "skipped pdcp_config_set_security() as securityMode == 0x%02x",
LOG_I(RRC, "skipped pdcp_config_set_security() as securityMode == 0x%02x",
securityMode);
}
} else {
LOG_W(RRC, "Could not get PDCP instance where key=0x%ld\n", key);
LOG_I(RRC, "Could not get PDCP instance where key=0x%ld\n", key);
}
#endif //#if defined(ENABLE_SECURITY)
......@@ -1957,8 +1959,8 @@ rrc_ue_process_securityModeCommand(
ul_dcch_msg.message.choice.c1.choice.securityModeComplete.criticalExtensions.present = SecurityModeCommand__criticalExtensions_PR_c1;
ul_dcch_msg.message.choice.c1.choice.securityModeComplete.criticalExtensions.choice.securityModeComplete_r8.nonCriticalExtension =NULL;
LOG_I(RRC,"[UE %d] Frame %d: Receiving from SRB1 (DL-DCCH), encoding securityModeComplete (eNB %d)\n",
ctxt_pP->module_id,ctxt_pP->frame,eNB_index);
LOG_I(RRC,"[UE %d] SFN/SF %d/%d: Receiving from SRB1 (DL-DCCH), encoding securityModeComplete (eNB %d), rrc_TransactionIdentifier: %ld\n",
ctxt_pP->module_id,ctxt_pP->frame, ctxt_pP->subframe, eNB_index, securityModeCommand->rrc_TransactionIdentifier);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
(void*)&ul_dcch_msg,
......
......@@ -1106,66 +1106,27 @@ int main( int argc, char **argv )
printf("Before CC \n");
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
if (UE_flag==1) {
NB_UE_INST=1;
NB_UE_INST=2;
NB_INST=1;
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**));
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
if (UE_flag==1) {
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**)*NB_UE_INST);
for (int i=0; i<NB_UE_INST; i++) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
PHY_vars_UE_g[i] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
PHY_vars_UE_g[i][CC_id] = init_ue_vars(frame_parms[CC_id], i,abstraction_flag);
PHY_vars_UE_g[0][CC_id] = init_ue_vars(frame_parms[CC_id], 0,abstraction_flag);
UE[CC_id] = PHY_vars_UE_g[0][CC_id];
printf("PHY_vars_UE_g[0][%d] = %p\n",CC_id,UE[CC_id]);
UE[CC_id] = PHY_vars_UE_g[i][CC_id];
printf("PHY_vars_UE_g[inst][%d] = %p\n",CC_id,UE[CC_id]);
if (phy_test==1)
UE[CC_id]->mac_enabled = 0;
else
UE[CC_id]->mac_enabled = 1;
/*if (UE[CC_id]->mac_enabled == 0) { //set default UL parameters for testing mode
for (i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
UE[CC_id]->pusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK;
UE[CC_id]->pusch_config_dedicated[i].betaOffset_RI_Index = beta_RI;
UE[CC_id]->pusch_config_dedicated[i].betaOffset_CQI_Index = beta_CQI;
UE[CC_id]->scheduling_request_config[i].sr_PUCCH_ResourceIndex = 0;
UE[CC_id]->scheduling_request_config[i].sr_ConfigIndex = 7+(0%3);
UE[CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;
}
}
UE[CC_id]->UE_scan = UE_scan;
UE[CC_id]->UE_scan_carrier = UE_scan_carrier;
UE[CC_id]->mode = mode;
printf("UE[%d]->mode = %d\n",CC_id,mode);
if (UE[CC_id]->mac_enabled == 1) {
UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1234;
UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1234;
}else {
UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1235;
UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235;
}
UE[CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0] + rx_gain_off;
UE[CC_id]->tx_power_max_dBm = tx_max_power[CC_id];
if (frame_parms[CC_id]->frame_type==FDD) {
UE[CC_id]->N_TA_offset = 0;
}
else {
if (frame_parms[CC_id]->N_RB_DL == 100)
UE[CC_id]->N_TA_offset = 624;
else if (frame_parms[CC_id]->N_RB_DL == 50)
UE[CC_id]->N_TA_offset = 624/2;
else if (frame_parms[CC_id]->N_RB_DL == 25)
UE[CC_id]->N_TA_offset = 624/4;
}*/
}
}
// Panos: Probably don't need these lines for phy_stub
......@@ -1374,7 +1335,10 @@ int main( int argc, char **argv )
// Panos: CHANGE we call init_timer_thread() from inside init_UE_stub() now
//init_timer_thread();
init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
// Panos: Temporarily we will be using single set of threads for multiple UEs.
//init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
init_UE_stub_single_thread(NB_UE_INST,eMBMS_active,uecap_xer_in,emul_iface);
/*for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
......@@ -1444,7 +1408,7 @@ int main( int argc, char **argv )
// connect the TX/RX buffers
if (UE_flag==1) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
/*for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
#ifdef OAI_USRP
......@@ -1452,7 +1416,11 @@ int main( int argc, char **argv )
#else
UE[CC_id]->hw_timing_advance = 160;
#endif
}
}*/
// Panos: No need to call setup_ue_buffers() for nfapi_mode=3
/*if (setup_ue_buffers(UE,&openair0_cfg[0])!=0) {
printf("Error setting up eNB buffer\n");
......
This diff is collapsed.
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