another workaround to make the UE transmit MSG3
This commit is contained in:
@@ -827,23 +827,6 @@ void init_NR_UE(int nb_inst, char* rrc_config_path) {
|
|||||||
AssertFatal((rrc_inst = nr_l3_init_ue(rrc_config_path)) != NULL, "can not initialize RRC module\n");
|
AssertFatal((rrc_inst = nr_l3_init_ue(rrc_config_path)) != NULL, "can not initialize RRC module\n");
|
||||||
AssertFatal((mac_inst = nr_l2_init_ue(rrc_inst)) != NULL, "can not initialize L2 module\n");
|
AssertFatal((mac_inst = nr_l2_init_ue(rrc_inst)) != NULL, "can not initialize L2 module\n");
|
||||||
AssertFatal((mac_inst->if_module = nr_ue_if_module_init(inst)) != NULL, "can not initialize IF module\n");
|
AssertFatal((mac_inst->if_module = nr_ue_if_module_init(inst)) != NULL, "can not initialize IF module\n");
|
||||||
|
|
||||||
NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = NULL;
|
|
||||||
if (mac_inst->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList) {
|
|
||||||
pusch_TimeDomainAllocationList = mac_inst->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList->choice.setup;
|
|
||||||
}
|
|
||||||
else if (mac_inst->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) {
|
|
||||||
pusch_TimeDomainAllocationList = mac_inst->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pusch_TimeDomainAllocationList) {
|
|
||||||
for(int i = 0; i < pusch_TimeDomainAllocationList->list.count; i++) {
|
|
||||||
AssertFatal(*pusch_TimeDomainAllocationList->list.array[i]->k2 >= DURATION_RX_TO_TX,
|
|
||||||
"Slot offset K2 (%ld) cannot be less than DURATION_RX_TO_TX (%d)\n",
|
|
||||||
*pusch_TimeDomainAllocationList->list.array[i]->k2,
|
|
||||||
DURATION_RX_TO_TX);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
#define MAX_NB_FRAME_IN_ASSOCIATION_PATTERN_PERIOD (16) // Maximum number of frames in the maximum association pattern period
|
#define MAX_NB_FRAME_IN_ASSOCIATION_PATTERN_PERIOD (16) // Maximum number of frames in the maximum association pattern period
|
||||||
#define MAX_NB_SSB (64) // Maximum number of possible SSB indexes
|
#define MAX_NB_SSB (64) // Maximum number of possible SSB indexes
|
||||||
#define MAX_RO_PER_SSB (8) // Maximum number of consecutive ROs that can be mapped to an SSB according to the ssb_per_RACH config
|
#define MAX_RO_PER_SSB (8) // Maximum number of consecutive ROs that can be mapped to an SSB according to the ssb_per_RACH config
|
||||||
|
#define DURATION_RX_TO_TX (6)
|
||||||
|
|
||||||
// Maximum number of ROs that can be mapped to an SSB in an association pattern
|
// Maximum number of ROs that can be mapped to an SSB in an association pattern
|
||||||
// This is to reserve enough elements in the SSBs list for each mapped ROs for a single SSB
|
// This is to reserve enough elements in the SSBs list for each mapped ROs for a single SSB
|
||||||
@@ -1367,7 +1368,11 @@ long get_k2(NR_UE_MAC_INST_t *mac, uint8_t time_domain_ind) {
|
|||||||
}
|
}
|
||||||
k2 = *pusch_TimeDomainAllocationList->list.array[time_domain_ind]->k2;
|
k2 = *pusch_TimeDomainAllocationList->list.array[time_domain_ind]->k2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AssertFatal(k2 >= DURATION_RX_TO_TX,
|
||||||
|
"Slot offset K2 (%ld) cannot be less than DURATION_RX_TO_TX (%d)\n",
|
||||||
|
k2,DURATION_RX_TO_TX);
|
||||||
|
|
||||||
LOG_D(MAC, "get_k2(): k2 is %ld\n", k2);
|
LOG_D(MAC, "get_k2(): k2 is %ld\n", k2);
|
||||||
return k2;
|
return k2;
|
||||||
}
|
}
|
||||||
@@ -1664,7 +1669,6 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
|||||||
NR_UE_MAC_INST_t *mac = get_mac_inst(ul_info->module_id);
|
NR_UE_MAC_INST_t *mac = get_mac_inst(ul_info->module_id);
|
||||||
|
|
||||||
if (ul_info->slot_tx == mac->msg3_slot && ul_info->frame_tx == mac->msg3_frame){
|
if (ul_info->slot_tx == mac->msg3_slot && ul_info->frame_tx == mac->msg3_frame){
|
||||||
|
|
||||||
uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES];
|
uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES];
|
||||||
nr_scheduled_response_t scheduled_response;
|
nr_scheduled_response_t scheduled_response;
|
||||||
fapi_nr_tx_request_t tx_req;
|
fapi_nr_tx_request_t tx_req;
|
||||||
@@ -1758,13 +1762,17 @@ void nr_ue_msg3_scheduler(NR_UE_MAC_INST_t *mac,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AssertFatal((k2+delta) >= DURATION_RX_TO_TX,
|
||||||
|
"Slot offset (%d) for Msg3 cannot be less than DURATION_RX_TO_TX (%d)\n",
|
||||||
|
k2+delta,DURATION_RX_TO_TX);
|
||||||
|
|
||||||
mac->msg3_slot = (current_slot + k2 + delta) % nr_slots_per_frame[mu];
|
mac->msg3_slot = (current_slot + k2 + delta) % nr_slots_per_frame[mu];
|
||||||
if (current_slot + k2 + delta > nr_slots_per_frame[mu])
|
if (current_slot + k2 + delta > nr_slots_per_frame[mu])
|
||||||
mac->msg3_frame = (current_frame + 1) % 1024;
|
mac->msg3_frame = (current_frame + 1) % 1024;
|
||||||
else
|
else
|
||||||
mac->msg3_frame = current_frame;
|
mac->msg3_frame = current_frame;
|
||||||
|
|
||||||
LOG_D(MAC, "[DEBUG_MSG3] current_slot %d k2 %d delta %d temp_slot %d mac->msg3_frame %d mac->msg3_slot %d \n", current_slot, k2, delta, current_slot + k2 + delta, mac->msg3_frame, mac->msg3_slot);
|
LOG_I(MAC, "[DEBUG_MSG3] current_slot %d k2 %d delta %d temp_slot %d mac->msg3_frame %d mac->msg3_slot %d \n", current_slot, k2, delta, current_slot + k2 + delta, mac->msg3_frame, mac->msg3_slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function schedules the PRACH according to prach_ConfigurationIndex and TS 38.211, tables 6.3.3.2.x
|
// This function schedules the PRACH according to prach_ConfigurationIndex and TS 38.211, tables 6.3.3.2.x
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ gNBs =
|
|||||||
# this is SS=0 L=12
|
# this is SS=0 L=12
|
||||||
initialULBWPstartSymbolAndLength_1 = 69;
|
initialULBWPstartSymbolAndLength_1 = 69;
|
||||||
|
|
||||||
initialULBWPk2_2 = 14;
|
initialULBWPk2_2 = 4;
|
||||||
initialULBWPmappingType_2 = 1;
|
initialULBWPmappingType_2 = 1;
|
||||||
# this is SS=10 L=4
|
# this is SS=10 L=4
|
||||||
initialULBWPstartSymbolAndLength_2 = 52;
|
initialULBWPstartSymbolAndLength_2 = 52;
|
||||||
|
|||||||
Reference in New Issue
Block a user