Merge remote-tracking branch 'origin/NR_UE_improve_RA_contd' into integration_2022_wk51
This commit is contained in:
@@ -32,10 +32,8 @@
|
||||
#define __LAYER2_NR_MAC_COMMON_H__
|
||||
|
||||
#include "NR_MIB.h"
|
||||
#include "NR_PDSCH-Config.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "nr_mac.h"
|
||||
#include "openair1/PHY/impl_defs_nr.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -228,7 +228,6 @@ typedef struct {
|
||||
|
||||
typedef enum {
|
||||
RA_UE_IDLE = 0,
|
||||
GENERATE_IDLE = 0,
|
||||
GENERATE_PREAMBLE = 1,
|
||||
WAIT_RAR = 2,
|
||||
WAIT_CONTENTION_RESOLUTION = 3,
|
||||
@@ -281,8 +280,8 @@ typedef struct {
|
||||
uint8_t RA_active;
|
||||
/// Random-access preamble index
|
||||
int ra_PreambleIndex;
|
||||
/// Flag for the Msg1 generation: enabled at every occurrence of nr prach slot
|
||||
RA_state_t generate_nr_prach;
|
||||
// When multiple SSBs per RO is configured, this indicates which one is selected in this RO -> this is used to properly compute the PRACH preamble
|
||||
uint8_t ssb_nb_in_ro;
|
||||
|
||||
/// Random-access window counter
|
||||
int16_t RA_window_cnt;
|
||||
|
||||
@@ -406,8 +406,7 @@ andom-access to transmit a BSR along with the C-RNTI control element (see 5.1.4
|
||||
@param gNB_id gNB index
|
||||
@param nr_slot_tx slot for PRACH transmission
|
||||
@returns indication to generate PRACH to phy */
|
||||
uint8_t nr_ue_get_rach(fapi_nr_ul_config_prach_pdu *prach_pdu,
|
||||
module_id_t mod_id,
|
||||
uint8_t nr_ue_get_rach(module_id_t mod_id,
|
||||
int CC_id,
|
||||
frame_t frame,
|
||||
uint8_t gNB_id,
|
||||
@@ -423,7 +422,6 @@ void nr_get_prach_resources(module_id_t mod_id,
|
||||
int CC_id,
|
||||
uint8_t gNB_id,
|
||||
NR_PRACH_RESOURCES_t *prach_resources,
|
||||
fapi_nr_ul_config_prach_pdu *prach_pdu,
|
||||
NR_RACH_ConfigDedicated_t * rach_ConfigDedicated);
|
||||
|
||||
void init_RA(module_id_t mod_id,
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
/* RRC */
|
||||
#include "NR_RACH-ConfigCommon.h"
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
|
||||
/* MAC */
|
||||
@@ -403,7 +402,7 @@ int nr_get_Po_NOMINAL_PUSCH(NR_PRACH_RESOURCES_t *prach_resources, module_id_t m
|
||||
return receivedTargerPower;
|
||||
}
|
||||
|
||||
void ssb_rach_config(RA_config_t *ra, NR_PRACH_RESOURCES_t *prach_resources, NR_RACH_ConfigCommon_t *nr_rach_ConfigCommon, fapi_nr_ul_config_prach_pdu *prach_pdu){
|
||||
void ssb_rach_config(RA_config_t *ra, NR_PRACH_RESOURCES_t *prach_resources, NR_RACH_ConfigCommon_t *nr_rach_ConfigCommon){
|
||||
|
||||
// Determine the SSB to RACH mapping ratio
|
||||
// =======================================
|
||||
@@ -467,7 +466,7 @@ void ssb_rach_config(RA_config_t *ra, NR_PRACH_RESOURCES_t *prach_resources, NR_
|
||||
if ((true == multiple_ssb_per_ro) && (ssb_rach_ratio > 1)) {
|
||||
total_preambles_per_ssb = numberOfRA_Preambles / ssb_rach_ratio;
|
||||
|
||||
ssb_nb_in_ro = prach_pdu->ssb_nb_in_ro;
|
||||
ssb_nb_in_ro = ra->ssb_nb_in_ro;
|
||||
ra->starting_preamble_nb = total_preambles_per_ssb * ssb_nb_in_ro;
|
||||
} else {
|
||||
total_preambles_per_ssb = numberOfRA_Preambles;
|
||||
@@ -657,7 +656,6 @@ void nr_get_prach_resources(module_id_t mod_id,
|
||||
int CC_id,
|
||||
uint8_t gNB_id,
|
||||
NR_PRACH_RESOURCES_t *prach_resources,
|
||||
fapi_nr_ul_config_prach_pdu *prach_pdu,
|
||||
NR_RACH_ConfigDedicated_t *rach_ConfigDedicated){
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
|
||||
@@ -667,7 +665,7 @@ void nr_get_prach_resources(module_id_t mod_id,
|
||||
mac->scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup :
|
||||
mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.rach_ConfigCommon->choice.setup;
|
||||
|
||||
LOG_D(PHY, "In %s: getting PRACH resources frame (first_Msg3 %d)\n", __FUNCTION__, ra->first_Msg3);
|
||||
LOG_D(MAC, "In %s: getting PRACH resources frame (first_Msg3 %d)\n", __FUNCTION__, ra->first_Msg3);
|
||||
|
||||
if (rach_ConfigDedicated) {
|
||||
if (rach_ConfigDedicated->cfra){
|
||||
@@ -679,7 +677,7 @@ void nr_get_prach_resources(module_id_t mod_id,
|
||||
/* TODO: This controls the tx_power of UE and the ramping procedure of RA of UE. Later we
|
||||
can abstract this, perhaps in the proxy. But for the time being lets leave it as below. */
|
||||
int16_t dl_pathloss = !get_softmodem_params()->emulate_l1 ? compute_nr_SSB_PL(mac, mac->phy_measurements.ssb_rsrp_dBm) : 0;
|
||||
ssb_rach_config(ra, prach_resources, nr_rach_ConfigCommon, prach_pdu);
|
||||
ssb_rach_config(ra, prach_resources, nr_rach_ConfigCommon);
|
||||
ra_preambles_config(prach_resources, mac, dl_pathloss);
|
||||
LOG_D(MAC, "[RAPROC] - Selected RA preamble index %d for contention-based random access procedure... \n", ra->ra_PreambleIndex);
|
||||
}
|
||||
@@ -738,8 +736,7 @@ void nr_Msg3_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, slot
|
||||
* @gNB_id gNB ID
|
||||
* @nr_slot_tx current UL TX slot
|
||||
*/
|
||||
uint8_t nr_ue_get_rach(fapi_nr_ul_config_prach_pdu *prach_pdu,
|
||||
module_id_t mod_id,
|
||||
uint8_t nr_ue_get_rach(module_id_t mod_id,
|
||||
int CC_id,
|
||||
frame_t frame,
|
||||
uint8_t gNB_id,
|
||||
@@ -896,13 +893,11 @@ uint8_t nr_ue_get_rach(fapi_nr_ul_config_prach_pdu *prach_pdu,
|
||||
if(ra->cfra) {
|
||||
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
|
||||
nr_ra_succeeded(mod_id, frame, nr_slot_tx);
|
||||
} else {
|
||||
ra->generate_nr_prach = GENERATE_IDLE;
|
||||
}
|
||||
|
||||
} else if (ra->RA_window_cnt == 0 && !ra->RA_RAPID_found) {
|
||||
|
||||
LOG_I(MAC, "[UE %d][%d:%d] RAR reception failed \n", mod_id, frame, nr_slot_tx);
|
||||
LOG_W(MAC, "[UE %d][%d:%d] RAR reception failed \n", mod_id, frame, nr_slot_tx);
|
||||
|
||||
nr_ra_failed(mod_id, CC_id, prach_resources, frame, nr_slot_tx);
|
||||
|
||||
@@ -912,8 +907,8 @@ uint8_t nr_ue_get_rach(fapi_nr_ul_config_prach_pdu *prach_pdu,
|
||||
|
||||
// Fill in preamble and PRACH resources
|
||||
ra->RA_window_cnt--;
|
||||
if (ra->generate_nr_prach == GENERATE_PREAMBLE) {
|
||||
nr_get_prach_resources(mod_id, CC_id, gNB_id, prach_resources, prach_pdu, rach_ConfigDedicated);
|
||||
if (ra->ra_state == GENERATE_PREAMBLE) {
|
||||
nr_get_prach_resources(mod_id, CC_id, gNB_id, prach_resources, rach_ConfigDedicated);
|
||||
}
|
||||
} else if (ra->RA_backoff_cnt > 0) {
|
||||
|
||||
@@ -921,10 +916,9 @@ uint8_t nr_ue_get_rach(fapi_nr_ul_config_prach_pdu *prach_pdu,
|
||||
|
||||
ra->RA_backoff_cnt--;
|
||||
|
||||
if ((ra->RA_backoff_cnt > 0 && ra->generate_nr_prach == GENERATE_PREAMBLE) || ra->RA_backoff_cnt == 0) {
|
||||
nr_get_prach_resources(mod_id, CC_id, gNB_id, prach_resources, prach_pdu, rach_ConfigDedicated);
|
||||
if ((ra->RA_backoff_cnt > 0 && ra->ra_state == GENERATE_PREAMBLE) || ra->RA_backoff_cnt == 0) {
|
||||
nr_get_prach_resources(mod_id, CC_id, gNB_id, prach_resources, rach_ConfigDedicated);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -933,8 +927,7 @@ uint8_t nr_ue_get_rach(fapi_nr_ul_config_prach_pdu *prach_pdu,
|
||||
nr_ue_contention_resolution(mod_id, CC_id, frame, nr_slot_tx, prach_resources);
|
||||
}
|
||||
|
||||
LOG_D(MAC,"ra->generate_nr_prach %d ra->ra_state %d (GENERATE_IDLE %d)\n",ra->generate_nr_prach,ra->ra_state,GENERATE_IDLE);
|
||||
return ra->generate_nr_prach;
|
||||
return ra->ra_state;
|
||||
}
|
||||
|
||||
void nr_get_RA_window(NR_UE_MAC_INST_t *mac){
|
||||
@@ -1041,7 +1034,6 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){
|
||||
|
||||
LOG_D(MAC, "In %s: [UE %d] clearing RA_active flag...\n", __FUNCTION__, mod_id);
|
||||
ra->RA_active = 0;
|
||||
ra->generate_nr_prach = GENERATE_IDLE;
|
||||
ra->ra_state = RA_SUCCEEDED;
|
||||
|
||||
}
|
||||
@@ -1060,7 +1052,6 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res
|
||||
|
||||
ra->first_Msg3 = 1;
|
||||
ra->ra_PreambleIndex = -1;
|
||||
ra->generate_nr_prach = RA_FAILED;
|
||||
ra->ra_state = RA_UE_IDLE;
|
||||
|
||||
prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER++;
|
||||
|
||||
@@ -39,10 +39,6 @@
|
||||
|
||||
/* RRC*/
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
#include "NR_RACH-ConfigCommon.h"
|
||||
#include "NR_RACH-ConfigGeneric.h"
|
||||
#include "NR_FrequencyInfoDL.h"
|
||||
#include "NR_PDCCH-ConfigCommon.h"
|
||||
|
||||
/* MAC */
|
||||
#include "NR_MAC_COMMON/nr_mac.h"
|
||||
|
||||
@@ -35,13 +35,6 @@
|
||||
/* exe */
|
||||
#include <common/utils/nr/nr_common.h>
|
||||
|
||||
/* RRC*/
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
#include "NR_RACH-ConfigCommon.h"
|
||||
#include "NR_RACH-ConfigGeneric.h"
|
||||
#include "NR_FrequencyInfoDL.h"
|
||||
#include "NR_PDCCH-ConfigCommon.h"
|
||||
|
||||
/* MAC */
|
||||
#include "NR_MAC_COMMON/nr_mac.h"
|
||||
#include "NR_MAC_COMMON/nr_mac_common.h"
|
||||
@@ -1154,8 +1147,6 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
} else if (ul_info) {
|
||||
|
||||
int cc_id = ul_info->cc_id;
|
||||
//frame_t rx_frame = ul_info->frame_rx;
|
||||
//slot_t rx_slot = ul_info->slot_rx;
|
||||
frame_t frame_tx = ul_info->frame_tx;
|
||||
slot_t slot_tx = ul_info->slot_tx;
|
||||
module_id_t mod_id = ul_info->module_id;
|
||||
@@ -1169,6 +1160,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
LOG_E(NR_MAC, "mac->ul_config is null!\n");
|
||||
}
|
||||
|
||||
nr_ue_get_rach(mod_id, cc_id, frame_tx, gNB_index, slot_tx);
|
||||
// Periodic SRS scheduling
|
||||
nr_ue_periodic_srs_scheduling(mod_id, frame_tx, slot_tx);
|
||||
|
||||
@@ -2659,12 +2651,12 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
|
||||
// - Partial configuration is actually already stored in (fapi_nr_prach_config_t) &mac->phy_config.config_req->prach_config
|
||||
void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) {
|
||||
|
||||
uint16_t format, format0, format1, ncs;
|
||||
int is_nr_prach_slot;
|
||||
prach_occasion_info_t *prach_occasion_info_p;
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_idP);
|
||||
RA_config_t *ra = &mac->ra;
|
||||
ra->RA_offset = 2; // to compensate the rx frame offset at the gNB
|
||||
if(ra->ra_state != GENERATE_PREAMBLE)
|
||||
return;
|
||||
|
||||
fapi_nr_ul_config_request_t *ul_config = get_ul_config_request(mac, slotP);
|
||||
if (!ul_config) {
|
||||
LOG_E(NR_MAC, "mac->ul_config is null! \n");
|
||||
@@ -2683,8 +2675,6 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
|
||||
else setup = scc_SIB->uplinkConfigCommon->initialUplinkBWP.rach_ConfigCommon->choice.setup;
|
||||
NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &setup->rach_ConfigGeneric;
|
||||
|
||||
ra->RA_offset = 2; // to compensate the rx frame offset at the gNB
|
||||
ra->generate_nr_prach = GENERATE_IDLE; // Reset flag for PRACH generation
|
||||
NR_TDD_UL_DL_ConfigCommon_t *tdd_config = scc==NULL ? scc_SIB->tdd_UL_DL_ConfigurationCommon : scc->tdd_UL_DL_ConfigurationCommon;
|
||||
|
||||
if (is_nr_UL_slot(tdd_config, slotP, mac->frame_type)) {
|
||||
@@ -2694,22 +2684,21 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
|
||||
uint8_t selected_gnb_ssb_idx = mac->mib_ssb;
|
||||
|
||||
// Get any valid PRACH occasion in the current slot for the selected SSB index
|
||||
is_nr_prach_slot = get_nr_prach_info_from_ssb_index(selected_gnb_ssb_idx,
|
||||
prach_occasion_info_t *prach_occasion_info_p;
|
||||
int is_nr_prach_slot = get_nr_prach_info_from_ssb_index(selected_gnb_ssb_idx,
|
||||
(int)frameP,
|
||||
(int)slotP,
|
||||
&prach_occasion_info_p);
|
||||
|
||||
if (is_nr_prach_slot && ra->ra_state == GENERATE_PREAMBLE) {
|
||||
if (is_nr_prach_slot) {
|
||||
AssertFatal(NULL != prach_occasion_info_p,"PRACH Occasion Info not returned in a valid NR Prach Slot\n");
|
||||
|
||||
ra->generate_nr_prach = GENERATE_PREAMBLE;
|
||||
|
||||
init_RA(module_idP, &ra->prach_resources, setup, rach_ConfigGeneric, ra->rach_ConfigDedicated);
|
||||
nr_get_RA_window(mac);
|
||||
|
||||
format = prach_occasion_info_p->format;
|
||||
format0 = format & 0xff; // single PRACH format
|
||||
format1 = (format >> 8) & 0xff; // dual PRACH format
|
||||
uint16_t format = prach_occasion_info_p->format;
|
||||
uint16_t format0 = format & 0xff; // single PRACH format
|
||||
uint16_t format1 = (format >> 8) & 0xff; // dual PRACH format
|
||||
AssertFatal(ul_config->number_pdus < sizeof(ul_config->ul_config_list) / sizeof(ul_config->ul_config_list[0]),
|
||||
"Number of PDUS in ul_config = %d > ul_config_list num elements", ul_config->number_pdus);
|
||||
|
||||
@@ -2723,7 +2712,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
|
||||
|
||||
memset(prach_config_pdu, 0, sizeof(fapi_nr_ul_config_prach_pdu));
|
||||
|
||||
ncs = get_NCS(rach_ConfigGeneric->zeroCorrelationZoneConfig, format0, setup->restrictedSetConfig);
|
||||
uint16_t ncs = get_NCS(rach_ConfigGeneric->zeroCorrelationZoneConfig, format0, setup->restrictedSetConfig);
|
||||
|
||||
prach_config_pdu->phys_cell_id = mac->physCellId;
|
||||
prach_config_pdu->num_prach_ocas = 1;
|
||||
@@ -2736,15 +2725,17 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
|
||||
prach_config_pdu->restricted_set = prach_config->restricted_set_config;
|
||||
prach_config_pdu->freq_msg1 = prach_config->num_prach_fd_occasions_list[prach_occasion_info_p->fdm].k1;
|
||||
|
||||
LOG_D(NR_MAC,"PRACH scheduler: Selected RO Frame %u, Slot %u, Symbol %u, Fdm %u\n",
|
||||
LOG_I(NR_MAC,"PRACH scheduler: Selected RO Frame %u, Slot %u, Symbol %u, Fdm %u\n",
|
||||
frameP, prach_config_pdu->prach_slot, prach_config_pdu->prach_start_symbol, prach_config_pdu->num_ra);
|
||||
|
||||
// Search which SSB is mapped in the RO (among all the SSBs mapped to this RO)
|
||||
for (prach_config_pdu->ssb_nb_in_ro=0; prach_config_pdu->ssb_nb_in_ro<prach_occasion_info_p->nb_mapped_ssb; prach_config_pdu->ssb_nb_in_ro++) {
|
||||
if (prach_occasion_info_p->mapped_ssb_idx[prach_config_pdu->ssb_nb_in_ro] == selected_gnb_ssb_idx)
|
||||
for (int ssb_nb_in_ro=0; ssb_nb_in_ro<prach_occasion_info_p->nb_mapped_ssb; ssb_nb_in_ro++) {
|
||||
if (prach_occasion_info_p->mapped_ssb_idx[ssb_nb_in_ro] == selected_gnb_ssb_idx) {
|
||||
ra->ssb_nb_in_ro = ssb_nb_in_ro;
|
||||
break;
|
||||
}
|
||||
}
|
||||
AssertFatal(prach_config_pdu->ssb_nb_in_ro<prach_occasion_info_p->nb_mapped_ssb, "%u not found in the mapped SSBs to the PRACH occasion", selected_gnb_ssb_idx);
|
||||
AssertFatal(ra->ssb_nb_in_ro<prach_occasion_info_p->nb_mapped_ssb, "%u not found in the mapped SSBs to the PRACH occasion", selected_gnb_ssb_idx);
|
||||
|
||||
if (format1 != 0xff) {
|
||||
switch(format0) { // dual PRACH format
|
||||
@@ -2800,7 +2791,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
|
||||
}
|
||||
} // if format1
|
||||
|
||||
nr_get_prach_resources(module_idP, 0, 0, &ra->prach_resources, prach_config_pdu, ra->rach_ConfigDedicated);
|
||||
nr_get_prach_resources(module_idP, 0, 0, &ra->prach_resources, ra->rach_ConfigDedicated);
|
||||
prach_config_pdu->ra_PreambleIndex = ra->ra_PreambleIndex;
|
||||
prach_config_pdu->prach_tx_power = get_prach_tx_power(module_idP);
|
||||
set_ra_rnti(mac, prach_config_pdu);
|
||||
|
||||
@@ -692,8 +692,7 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
|
||||
|
||||
if (pthread_mutex_lock(&mac->mutex_dl_info)) abort();
|
||||
|
||||
if (dl_tti_request)
|
||||
{
|
||||
if (dl_tti_request) {
|
||||
frame = dl_tti_request->SFN;
|
||||
slot = dl_tti_request->Slot;
|
||||
LOG_D(NR_PHY, "[%d, %d] dl_tti_request\n", frame, slot);
|
||||
@@ -705,40 +704,34 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
|
||||
incoming tx_data_request is also destined for the current UE. If the
|
||||
RAR hasn't been processed yet, we do not want to be filtering the
|
||||
tx_data_requests. */
|
||||
if (tx_data_request)
|
||||
{
|
||||
if (tx_data_request) {
|
||||
if (mac->nr_ue_emul_l1.expected_sib ||
|
||||
mac->nr_ue_emul_l1.expected_rar ||
|
||||
mac->nr_ue_emul_l1.expected_dci)
|
||||
{
|
||||
mac->nr_ue_emul_l1.expected_dci) {
|
||||
frame = tx_data_request->SFN;
|
||||
slot = tx_data_request->Slot;
|
||||
LOG_D(NR_PHY, "[%d, %d] PDSCH in tx_request\n", frame, slot);
|
||||
copy_tx_data_req_to_dl_info(&mac->dl_info, tx_data_request);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
LOG_D(NR_MAC, "Unexpected tx_data_req\n");
|
||||
}
|
||||
free_and_zero(tx_data_request);
|
||||
}
|
||||
else if (ul_dci_request)
|
||||
{
|
||||
else if (ul_dci_request) {
|
||||
frame = ul_dci_request->SFN;
|
||||
slot = ul_dci_request->Slot;
|
||||
LOG_D(NR_PHY, "[%d, %d] ul_dci_request\n", frame, slot);
|
||||
copy_ul_dci_data_req_to_dl_info(&mac->dl_info, ul_dci_request);
|
||||
free_and_zero(ul_dci_request);
|
||||
}
|
||||
else if (ul_tti_request)
|
||||
{
|
||||
else if (ul_tti_request) {
|
||||
frame = ul_tti_request->SFN;
|
||||
slot = ul_tti_request->Slot;
|
||||
LOG_T(NR_PHY, "[%d, %d] ul_tti_request\n", frame, slot);
|
||||
copy_ul_tti_data_req_to_dl_info(&mac->dl_info, ul_tti_request);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if (pthread_mutex_unlock(&mac->mutex_dl_info)) abort();
|
||||
LOG_T(NR_MAC, "All indications were NULL in %s\n", __FUNCTION__);
|
||||
return;
|
||||
@@ -762,15 +755,12 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
|
||||
ul_info.slot_rx = slot;
|
||||
ul_info.slot_tx = (slot + slot_ahead) % slots_per_frame;
|
||||
ul_info.frame_tx = (ul_info.slot_rx + slot_ahead >= slots_per_frame) ? ul_info.frame_rx + 1 : ul_info.frame_rx;
|
||||
ul_info.ue_sched_mode = SCHED_PUSCH;
|
||||
if (mac->scc || mac->scc_SIB)
|
||||
{
|
||||
if (mac->scc || mac->scc_SIB) {
|
||||
if (is_nr_UL_slot(mac->scc ?
|
||||
mac->scc->tdd_UL_DL_ConfigurationCommon :
|
||||
mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
|
||||
ul_info.slot_tx,
|
||||
mac->frame_type) && mac->ra.ra_state != RA_SUCCEEDED)
|
||||
{
|
||||
mac->frame_type) && mac->ra.ra_state != RA_SUCCEEDED) {
|
||||
nr_ue_scheduler(NULL, &ul_info);
|
||||
nr_ue_prach_scheduler(ul_info.module_id, ul_info.frame_tx, ul_info.slot_tx);
|
||||
}
|
||||
@@ -1137,8 +1127,8 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
|
||||
NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon = mac->scc != NULL ? mac->scc->tdd_UL_DL_ConfigurationCommon : mac->scc_SIB->tdd_UL_DL_ConfigurationCommon;
|
||||
LOG_T(NR_MAC, "In %s():%d not calling scheduler. sched mode = %d and mac->ra.ra_state = %d\n",
|
||||
__FUNCTION__, __LINE__, ul_info->ue_sched_mode, mac->ra.ra_state);
|
||||
LOG_T(NR_MAC, "In %s():%d not calling scheduler mac->ra.ra_state = %d\n",
|
||||
__FUNCTION__, __LINE__, mac->ra.ra_state);
|
||||
|
||||
ret = nr_ue_scheduler(NULL, ul_info);
|
||||
if (is_nr_UL_slot(tdd_UL_DL_ConfigurationCommon, ul_info->slot_tx, mac->frame_type)) {
|
||||
|
||||
@@ -46,11 +46,6 @@ extern slot_rnti_mcs_s slot_rnti_mcs[NUM_NFAPI_SLOT];
|
||||
|
||||
typedef struct NR_UL_TIME_ALIGNMENT NR_UL_TIME_ALIGNMENT_t;
|
||||
|
||||
typedef enum {
|
||||
SCHED_PUSCH,
|
||||
SCHED_PUCCH,
|
||||
} NR_UE_SCHED_MODE_t;
|
||||
|
||||
typedef struct {
|
||||
/// module id
|
||||
module_id_t module_id;
|
||||
@@ -112,7 +107,6 @@ typedef struct {
|
||||
/// dci reception indication structure
|
||||
fapi_nr_dci_indication_t *dci_ind;
|
||||
|
||||
NR_UE_SCHED_MODE_t ue_sched_mode;
|
||||
void *phy_data;
|
||||
|
||||
} nr_uplink_indication_t;
|
||||
|
||||
Reference in New Issue
Block a user