Commit de333099 authored by Andrew Burger's avatar Andrew Burger

New changes to get rach working.. Still not working

parent 3c9cb7f1
......@@ -199,7 +199,9 @@ get_prach_resources(module_id_t module_idP,
UE_mac_inst[module_idP].
RA_prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER =
get_Po_NOMINAL_PUSCH(module_idP, CC_id);
} else { // Msg3 is being retransmitted
} else {
LOG_E(MAC, "Didnt set UE Mode Correctly\n");
// Msg3 is being retransmitted
if (UE_mac_inst[module_idP].RA_usedGroupA == 1) {
if (rach_ConfigCommon->preambleInfo.preamblesGroupAConfig) {
UE_mac_inst[module_idP].RA_prach_resources.
......@@ -288,6 +290,8 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
uint8_t Size = 0;
UE_MODE_t UE_mode;
LOG_E(MAC, "got inside ue_get_rach\n");
// Modification for phy_stub_ue operation
if(NFAPI_MODE == NFAPI_UE_STUB_PNF) { // phy_stub_ue mode
UE_mode = UE_mac_inst[module_idP].UE_mode[0];
......
......@@ -153,9 +153,9 @@ void ue_init_mac(module_id_t module_idP) {
UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[i] = 0;
}
if(NFAPI_MODE==NFAPI_UE_STUB_PNF) {
if(NFAPI_MODE==NFAPI_UE_STUB_PNF || NFAPI_MODE==NFAPI_MODE_STANDALONE_PNF) {
pthread_mutex_init(&UE_mac_inst[module_idP].UL_INFO_mutex,NULL);
UE_mac_inst[module_idP].UE_mode[0] = NOT_SYNCHED; //PRACH;
UE_mac_inst[module_idP].UE_mode[0] = PRACH; //NOT_SYNCHED;
UE_mac_inst[module_idP].first_ULSCH_Tx =0;
UE_mac_inst[module_idP].SI_Decoded = 0;
next_ra_frame = 0;
......@@ -439,7 +439,7 @@ ue_send_sdu(module_id_t module_idP,
"[UE %d][RAPROC] Contention detected, RA failed\n",
module_idP);
if(NFAPI_MODE==NFAPI_UE_STUB_PNF) { // phy_stub mode
if(NFAPI_MODE==NFAPI_UE_STUB_PNF || NFAPI_MODE==NFAPI_MODE_STANDALONE_PNF) { // phy_stub mode
// Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
// PRACH state.
LOG_I(MAC, "nfapi_mode3: Setting UE_mode BACK to PRACH 1\n");
......@@ -465,7 +465,7 @@ ue_send_sdu(module_id_t module_idP,
[module_idP].
RA_contention_resolution_timer_active = 0;
if(NFAPI_MODE==NFAPI_UE_STUB_PNF) { // phy_stub mode
if(NFAPI_MODE==NFAPI_UE_STUB_PNF || NFAPI_MODE==NFAPI_MODE_STANDALONE_PNF) { // phy_stub mode
// Modification for phy_stub mode operation here. We only need to change the ue_mode to PUSCH
UE_mac_inst[module_idP].UE_mode[eNB_index] = PUSCH;
} else { // Full stack mode
......@@ -483,7 +483,7 @@ ue_send_sdu(module_id_t module_idP,
#endif
// Eliminate call to process_timing_advance for the phy_stub UE operation mode. Is this correct?
if (NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
if (NFAPI_MODE!=NFAPI_UE_STUB_PNF && NFAPI_MODE!=NFAPI_MODE_STANDALONE_PNF) {
process_timing_advance(module_idP,CC_id,payload_ptr[0]);
}
......@@ -2152,7 +2152,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
// build PHR and update the timers
if (phr_ce_len == sizeof(POWER_HEADROOM_CMD)) {
if(NFAPI_MODE==NFAPI_UE_STUB_PNF) {
if(NFAPI_MODE==NFAPI_UE_STUB_PNF || NFAPI_MODE==NFAPI_MODE_STANDALONE_PNF) {
//Substitute with a static value for the MAC layer abstraction (phy_stub mode)
phr_p->PH = 60;
} else {
......@@ -2600,7 +2600,7 @@ ue_scheduler(const module_id_t module_idP,
"Module id %u Contention resolution timer expired, RA failed\n",
module_idP);
if(NFAPI_MODE==NFAPI_UE_STUB_PNF) { // phy_stub mode
if(NFAPI_MODE==NFAPI_UE_STUB_PNF || NFAPI_MODE==NFAPI_MODE_STANDALONE_PNF) { // phy_stub mode
// Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
// PRACH state.
LOG_I(MAC, "nfapi_mode3: Setting UE_mode to PRACH 2 \n");
......
......@@ -1173,6 +1173,9 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
}
if (dl_config_req && tx_request_pdu_list) {
if ((num_pairs % 1000) == 0) {
LOG_I(MAC, "num_pairs:%d, num_lone:%d\n", num_pairs, num_lone);
}
nfapi_dl_config_request_body_t* dl_config_req_body = &dl_config_req->dl_config_request_body;
for (int i = 0; i < dl_config_req_body->number_pdu; ++i) {
nfapi_dl_config_request_pdu_t* pdu = &dl_config_req_body->dl_config_pdu_list[i];
......
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