Commit 88c614ee authored by Melissa Elkadi's avatar Melissa Elkadi

RAR successful here. This commit includes:

- Hardcoding the freq_index when filling RACH
- Not handling DCI unless dci_rel_15 global is allocated
- Verifies ra_rnti matches in prach pdu and RACH
- Updates handling of DCI and RX from dl and tx reqs
parent 082afd0c
......@@ -159,7 +159,7 @@ static void L1_nsa_prach_procedures(frame_t frame, int slot)
rach_ind.pdu_list[pdu_index].phy_cell_id = 0;
rach_ind.pdu_list[pdu_index].symbol_index = 0;
rach_ind.pdu_list[pdu_index].slot_index = slot;
rach_ind.pdu_list[pdu_index].freq_index = 0;
rach_ind.pdu_list[pdu_index].freq_index = 0; //Melissa Fill these things from the prach pdu
rach_ind.pdu_list[pdu_index].avg_rssi = 128;
rach_ind.pdu_list[pdu_index].avg_snr = 0xff; // invalid for now
......@@ -179,8 +179,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
{
NR_PRACH_RESOURCES_t prach_resources;
memset(&prach_resources, 0, sizeof(prach_resources));
fapi_nr_ul_config_prach_pdu prach_pdu;
memset(&prach_pdu, 0, sizeof(prach_pdu));
int last_sfn_slot = -1;
while (!oai_exit)
{
......@@ -225,8 +223,8 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
}
int CC_id = 0;
uint8_t gNB_id = 0;
prach_pdu = ul_config->ul_config_list[ul_config->number_pdus].prach_config_pdu;
uint8_t nr_prach = nr_ue_get_rach(&prach_resources, &prach_pdu, mod_id, CC_id, ul_info.frame_tx, gNB_id, ul_info.slot_tx);
fapi_nr_ul_config_prach_pdu *prach_pdu = &ul_config->ul_config_list[ul_config->number_pdus].prach_config_pdu;
uint8_t nr_prach = nr_ue_get_rach(&prach_resources, prach_pdu, mod_id, CC_id, ul_info.frame_tx, gNB_id, ul_info.slot_tx);
if (nr_prach == 1)
{
......
......@@ -394,7 +394,7 @@ uint16_t set_ra_rnti(NR_UE_MAC_INST_t *mac, fapi_nr_ul_config_prach_pdu *prach_p
ra->ra_rnti = 1 + s_id + 14 * t_id + 1120 * f_id + 8960 * ul_carrier_id;
//gNB: ra_rnti = 1 + symbol + (slotP * 14) + (freq_index * 14 * 80) + (ul_carrier_id * 14 * 80 * 8);
LOG_I(MAC, "Computed ra_RNTI is %x, sid %d, fid %d, tid %d \n", ra->ra_rnti, s_id, f_id, t_id);
LOG_D(MAC, "Computed ra_RNTI is %x \n", ra->ra_rnti);
return ra->ra_rnti;
......
......@@ -232,7 +232,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
// Fetch configuration for searchSpaceZero
// note: The search space with the SearchSpaceId = 0 identifies the search space configured via PBCH (MIB) and in ServingCellConfigCommon (searchSpaceZero).
if (pdcch_ConfigCommon->choice.setup->searchSpaceZero){
if (pdcch_ConfigCommon->choice.setup->searchSpaceZero && !get_softmodem_params()->nsa){
if (pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 == NULL){
pdcch_ConfigCommon->choice.setup->searchSpaceSIB1=calloc(1,sizeof(*pdcch_ConfigCommon->choice.setup->searchSpaceSIB1));
}
......@@ -363,7 +363,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
NR_BWP_DownlinkCommon_t *bwp_Common = bwp->bwp_Common;
NR_SetupRelease_PDCCH_ConfigCommon_t *pdcch_ConfigCommon = bwp_Common->pdcch_ConfigCommon;
if (pdcch_ConfigCommon->choice.setup->searchSpaceSIB1){
if (pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 && !get_softmodem_params()->nsa){
NR_SearchSpace_t *ss0 = mac->search_space_zero;
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15;
......
......@@ -2182,7 +2182,7 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t
int ret = 0;
NR_RA_HEADER_RAPID *rarh = (NR_RA_HEADER_RAPID *) dlsch_buffer; // RAR subheader pointer
NR_MAC_RAR *rar = (NR_MAC_RAR *) (dlsch_buffer + 1); // RAR subPDU pointer
uint8_t preamble_index = get_ra_PreambleIndex(mod_id, cc_id, gNB_id); //prach_resources->ra_PreambleIndex;
uint8_t preamble_index = 63; //Melissa get_ra_PreambleIndex(mod_id, cc_id, gNB_id); //prach_resources->ra_PreambleIndex;
LOG_D(MAC, "In %s:[%d.%d]: [UE %d][RAPROC] invoking MAC for received RAR (current preamble %d)\n", __FUNCTION__, frame, slot, mod_id, preamble_index);
......
......@@ -511,8 +511,6 @@ void nr_initiate_ra_proc(module_id_t module_idP,
ra_rnti = 1 + symbol + (9 /*slotP*/ * 14) + (freq_index * 14 * 80) + (ul_carrier_id * 14 * 80 * 8);
else
ra_rnti = 1 + symbol + (slotP * 14) + (freq_index * 14 * 80) + (ul_carrier_id * 14 * 80 * 8);
LOG_I(NR_MAC, "Melissa ra_rnti %x, symbol %d, slot %d, freq_idx %d, ul_carrier_id %d\n",
ra_rnti, symbol, slotP, freq_index, ul_carrier_id);
// This should be handled differently when we use the initialBWP for RA
ra->bwp_id = 1;
......
This diff is collapsed.
......@@ -342,7 +342,7 @@ int8_t nr_rrc_ue_process_scg_config(const module_id_t module_id, NR_CellGroupCon
// maintain list
if(cell_group_config->spCellConfig != NULL){
nr_rrc_mac_config_req_ue(0, 0, 0, NULL, cell_group_config);
LOG_I(NR_RRC, "Melissa, we filled scc now \n");
LOG_D(NR_RRC, "Filled scc now \n");
if(cell_group_config->spCellConfig->spCellConfigDedicated != NULL){
// process element of list to be add by RRC message
if(cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList != NULL){
......
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