New prach procedures
This commit is contained in:
@@ -84,8 +84,8 @@
|
|||||||
#define MAX_eNB 2
|
#define MAX_eNB 2
|
||||||
#define MAX_gNB 2
|
#define MAX_gNB 2
|
||||||
#else
|
#else
|
||||||
#define MAX_MOBILES_PER_ENB 20 // This was maxed at 4 Why? -Andrew
|
#define MAX_MOBILES_PER_ENB 256 // This was maxed at 4 Why? -Andrew
|
||||||
#define MAX_MOBILES_PER_ENB_NB_IoT 4
|
#define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||||
#define MAX_MOBILES_PER_GNB 2//16
|
#define MAX_MOBILES_PER_GNB 2//16
|
||||||
#define MAX_eNB 2
|
#define MAX_eNB 2
|
||||||
#define MAX_gNB 2
|
#define MAX_gNB 2
|
||||||
|
|||||||
@@ -2603,7 +2603,7 @@ ue_scheduler(const module_id_t module_idP,
|
|||||||
if(NFAPI_MODE==NFAPI_UE_STUB_PNF || NFAPI_MODE==NFAPI_MODE_STANDALONE_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
|
// Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
|
||||||
// PRACH state.
|
// PRACH state.
|
||||||
LOG_I(MAC, "nfapi_mode3: Setting UE_mode to PRACH 2 \n");
|
LOG_A(MAC, "nfapi_mode3: Setting UE_mode to PRACH 2 \n");
|
||||||
UE_mac_inst[module_idP].UE_mode[eNB_indexP] = PRACH;
|
UE_mac_inst[module_idP].UE_mode[eNB_indexP] = PRACH;
|
||||||
//ra_failed(module_idP,CC_id,eNB_index);UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
|
//ra_failed(module_idP,CC_id,eNB_index);UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -921,7 +921,7 @@ void hi_dci0_req_UE_MAC(int sfn,
|
|||||||
|
|
||||||
// The following set of memcpy functions should be getting called as callback
|
// The following set of memcpy functions should be getting called as callback
|
||||||
// functions from pnf_p7_subframe_ind.
|
// functions from pnf_p7_subframe_ind.
|
||||||
int memcpy_dl_config_req(L1_rxtx_proc_t *proc,
|
int memcpy_dl_config_req(L1_rxtx_proc_t *proc,
|
||||||
nfapi_pnf_p7_config_t *pnf_p7,
|
nfapi_pnf_p7_config_t *pnf_p7,
|
||||||
nfapi_dl_config_request_t *req) {
|
nfapi_dl_config_request_t *req) {
|
||||||
|
|
||||||
|
|||||||
+32
-25
@@ -1044,6 +1044,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
|
|||||||
{
|
{
|
||||||
LOG_W(MAC, "repeated sfn_sf = %d.%d\n",
|
LOG_W(MAC, "repeated sfn_sf = %d.%d\n",
|
||||||
sfn_sf >> 4, sfn_sf & 15);
|
sfn_sf >> 4, sfn_sf & 15);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
last_sfn_sf = sfn_sf;
|
last_sfn_sf = sfn_sf;
|
||||||
|
|
||||||
@@ -1171,38 +1172,44 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
|
|||||||
// Prepare the future Tx data
|
// Prepare the future Tx data
|
||||||
if ((subframe_select(&UE->frame_parms, NFAPI_SFNSF2SF(sfn_sf)) == SF_UL) ||
|
if ((subframe_select(&UE->frame_parms, NFAPI_SFNSF2SF(sfn_sf)) == SF_UL) ||
|
||||||
(UE->frame_parms.frame_type == FDD))
|
(UE->frame_parms.frame_type == FDD))
|
||||||
if (UE->mode != loop_through_memory) {
|
if (UE->mode != loop_through_memory)
|
||||||
|
{
|
||||||
// We make the start of RA between consecutive UEs differ by 20 frames
|
// We make the start of RA between consecutive UEs differ by 20 frames
|
||||||
//if ((UE_mac_inst[Mod_id].UE_mode[0] == PRACH && Mod_id == 0) || (UE_mac_inst[Mod_id].UE_mode[0] == PRACH && Mod_id>0 && rx_frame >= UE_mac_inst[Mod_id-1].ra_frame + 20) ) {
|
//if ((UE_mac_inst[Mod_id].UE_mode[0] == PRACH && Mod_id == 0) || (UE_mac_inst[Mod_id].UE_mode[0] == PRACH && Mod_id>0 && rx_frame >= UE_mac_inst[Mod_id-1].ra_frame + 20) ) {
|
||||||
|
if (UE_mac_inst[ue_Mod_id].UE_mode[0] == RA_RESPONSE &&
|
||||||
|
is_prach_subframe(&UE->frame_parms, NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf)))
|
||||||
|
{
|
||||||
|
UE_mac_inst[ue_Mod_id].UE_mode[0] = PRACH;
|
||||||
|
}
|
||||||
LOG_I(MAC, "UE_mode: %d\n", UE_mac_inst[ue_Mod_id].UE_mode[0]);
|
LOG_I(MAC, "UE_mode: %d\n", UE_mac_inst[ue_Mod_id].UE_mode[0]);
|
||||||
if (UE_mac_inst[ue_Mod_id].UE_mode[0] == PRACH) { //&& ue_Mod_id == next_Mod_id) {
|
if (UE_mac_inst[ue_Mod_id].UE_mode[0] == PRACH)
|
||||||
|
{ //&& ue_Mod_id == next_Mod_id) {
|
||||||
next_ra_frame++;
|
next_ra_frame++;
|
||||||
// if (next_ra_frame > 500) {
|
// if (next_ra_frame > 500) {
|
||||||
// check if we have PRACH opportunity
|
// check if we have PRACH opportunity
|
||||||
LOG_I(MAC, "is_prach_subframe(): %d\n",
|
if (is_prach_subframe(&UE->frame_parms, NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf)) && UE_mac_inst[ue_Mod_id].SI_Decoded == 1)
|
||||||
is_prach_subframe(&UE->frame_parms, NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf)));
|
{
|
||||||
if (is_prach_subframe(&UE->frame_parms, NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf)) && UE_mac_inst[ue_Mod_id].SI_Decoded == 1) {
|
// The one working strangely...
|
||||||
// The one working strangely...
|
//if (is_prach_subframe(&UE->frame_parms,NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf) && Mod_id == (module_id_t) init_ra_UE) ) {
|
||||||
//if (is_prach_subframe(&UE->frame_parms,NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf) && Mod_id == (module_id_t) init_ra_UE) ) {
|
PRACH_RESOURCES_t *prach_resources = ue_get_rach(ue_Mod_id, 0, NFAPI_SFNSF2SFN(sfn_sf), 0, NFAPI_SFNSF2SF(sfn_sf));
|
||||||
PRACH_RESOURCES_t *prach_resources = ue_get_rach(ue_Mod_id, 0, NFAPI_SFNSF2SFN(sfn_sf), 0, NFAPI_SFNSF2SF(sfn_sf));
|
if (prach_resources != NULL)
|
||||||
if (prach_resources != NULL) {
|
{
|
||||||
LOG_I(MAC, "preamble_received_tar_power: %d\n",
|
LOG_I(MAC, "preamble_received_tar_power: %d\n",
|
||||||
prach_resources->ra_PREAMBLE_RECEIVED_TARGET_POWER);
|
prach_resources->ra_PREAMBLE_RECEIVED_TARGET_POWER);
|
||||||
UE_mac_inst[ue_Mod_id].ra_frame = NFAPI_SFNSF2SFN(sfn_sf); // Is this why RACH comes in late to proxy? - Andrew
|
UE_mac_inst[ue_Mod_id].ra_frame = NFAPI_SFNSF2SFN(sfn_sf); // Is this why RACH comes in late to proxy? - Andrew
|
||||||
LOG_D(MAC, "UE_phy_stub_thread_rxn_txnp4 before RACH, Mod_id: %d frame %d subframe %d\n", ue_Mod_id, NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf));
|
LOG_D(MAC, "UE_phy_stub_thread_rxn_txnp4 before RACH, Mod_id: %d frame %d subframe %d\n", ue_Mod_id, NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf));
|
||||||
fill_rach_indication_UE_MAC(ue_Mod_id, NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf), UL_INFO, prach_resources->ra_PreambleIndex, prach_resources->ra_RNTI);
|
fill_rach_indication_UE_MAC(ue_Mod_id, NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf), UL_INFO, prach_resources->ra_PreambleIndex, prach_resources->ra_RNTI);
|
||||||
sent_any = true;
|
sent_any = true;
|
||||||
Msg1_transmitted(ue_Mod_id, 0, NFAPI_SFNSF2SFN(sfn_sf), 0);
|
Msg1_transmitted(ue_Mod_id, 0, NFAPI_SFNSF2SFN(sfn_sf), 0);
|
||||||
UE_mac_inst[ue_Mod_id].UE_mode[0] = RA_RESPONSE;
|
UE_mac_inst[ue_Mod_id].UE_mode[0] = RA_RESPONSE;
|
||||||
next_Mod_id = ue_Mod_id + 1;
|
next_Mod_id = ue_Mod_id + 1;
|
||||||
//next_ra_frame = (rx_frame + 20)%1000;
|
//next_ra_frame = (rx_frame + 20)%1000;
|
||||||
next_ra_frame = 0;
|
next_ra_frame = 0;
|
||||||
}
|
|
||||||
|
|
||||||
//ue_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode);
|
|
||||||
}
|
}
|
||||||
|
//ue_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode);
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
} // mode is PRACH
|
} // mode is PRACH
|
||||||
|
|
||||||
// Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
|
// Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
|
||||||
// UE Tx procedures directly at the MAC layer, based on the received ul_config requests from the vnf (eNB).
|
// UE Tx procedures directly at the MAC layer, based on the received ul_config requests from the vnf (eNB).
|
||||||
|
|||||||
Reference in New Issue
Block a user