Cleanup
This commit is contained in:
@@ -47,7 +47,6 @@
|
|||||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
#include "nfapi/oai_integration/vendor_ext.h"
|
|
||||||
|
|
||||||
#include "T.h"
|
#include "T.h"
|
||||||
|
|
||||||
@@ -87,8 +86,7 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB,
|
|||||||
int frame,
|
int frame,
|
||||||
int slot,
|
int slot,
|
||||||
nfapi_nr_pucch_pdu_t *pucch_pdu) {
|
nfapi_nr_pucch_pdu_t *pucch_pdu) {
|
||||||
if (NFAPI_MODE == NFAPI_MODE_PNF)
|
|
||||||
gNB->pucch[0]->active = 0; //check if ture in monolithic mode
|
|
||||||
int id = nr_find_pucch(pucch_pdu->rnti,frame,slot,gNB);
|
int id = nr_find_pucch(pucch_pdu->rnti,frame,slot,gNB);
|
||||||
AssertFatal( (id>=0) && (id<NUMBER_OF_NR_PUCCH_MAX),
|
AssertFatal( (id>=0) && (id<NUMBER_OF_NR_PUCCH_MAX),
|
||||||
"invalid id found for pucch !!! rnti %04x id %d\n",pucch_pdu->rnti,id);
|
"invalid id found for pucch !!! rnti %04x id %d\n",pucch_pdu->rnti,id);
|
||||||
@@ -169,6 +167,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
||||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||||
|
|
||||||
int nr_sequences;
|
int nr_sequences;
|
||||||
const uint8_t *mcs;
|
const uint8_t *mcs;
|
||||||
|
|
||||||
@@ -1086,7 +1085,8 @@ void init_pucch2_luts() {
|
|||||||
void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||||
int slot,
|
int slot,
|
||||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t* uci_pdu,
|
nfapi_nr_uci_pucch_pdu_format_2_3_4_t* uci_pdu,
|
||||||
nfapi_nr_pucch_pdu_t* pucch_pdu) {
|
nfapi_nr_pucch_pdu_t* pucch_pdu) {
|
||||||
|
|
||||||
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
||||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||||
//pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
//pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot
|
|||||||
if (cfg->cell_config.frame_duplex_type.value == FDD) {
|
if (cfg->cell_config.frame_duplex_type.value == FDD) {
|
||||||
return (NR_UPLINK_SLOT | NR_DOWNLINK_SLOT );
|
return (NR_UPLINK_SLOT | NR_DOWNLINK_SLOT );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nr_frame%2 == 0) {
|
if (nr_frame%2 == 0) {
|
||||||
for(int symbol_count=0; symbol_count<NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
|
for(int symbol_count=0; symbol_count<NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
|
||||||
if (cfg->tdd_table.max_tdd_periodicity_list[nr_slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value==1) {
|
if (cfg->tdd_table.max_tdd_periodicity_list[nr_slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value==1) {
|
||||||
|
|||||||
@@ -532,7 +532,6 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
|||||||
LOG_D(PHY,"phy_procedures_gNB_uespec_RX frame %d, slot %d\n",frame_rx,slot_rx);
|
LOG_D(PHY,"phy_procedures_gNB_uespec_RX frame %d, slot %d\n",frame_rx,slot_rx);
|
||||||
|
|
||||||
if (gNB->frame_parms.frame_type == TDD)
|
if (gNB->frame_parms.frame_type == TDD)
|
||||||
if(NFAPI_MODE != NFAPI_MODE_VNF)
|
|
||||||
fill_ul_rb_mask(gNB, frame_rx, slot_rx);
|
fill_ul_rb_mask(gNB, frame_rx, slot_rx);
|
||||||
|
|
||||||
gNB_I0_measurements(gNB);
|
gNB_I0_measurements(gNB);
|
||||||
@@ -547,8 +546,6 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
|||||||
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
|
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
|
||||||
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
|
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
|
||||||
if (pucch) {
|
if (pucch) {
|
||||||
if (NFAPI_MODE == NFAPI_MODE_PNF)
|
|
||||||
pucch->frame = frame_rx;
|
|
||||||
if ((pucch->active == 1) &&
|
if ((pucch->active == 1) &&
|
||||||
(pucch->frame == frame_rx) &&
|
(pucch->frame == frame_rx) &&
|
||||||
(pucch->slot == slot_rx) ) {
|
(pucch->slot == slot_rx) ) {
|
||||||
@@ -615,9 +612,6 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
|||||||
for (harq_pid=0;harq_pid<NR_MAX_ULSCH_HARQ_PROCESSES;harq_pid++) {
|
for (harq_pid=0;harq_pid<NR_MAX_ULSCH_HARQ_PROCESSES;harq_pid++) {
|
||||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||||
AssertFatal(ulsch_harq!=NULL,"harq_pid %d is not allocated\n",harq_pid);
|
AssertFatal(ulsch_harq!=NULL,"harq_pid %d is not allocated\n",harq_pid);
|
||||||
//printf("ulsch_harq->frame = %d, frame_rx = %d \n", ulsch_harq->frame, frame_rx);
|
|
||||||
if (NFAPI_MODE == NFAPI_MODE_PNF)
|
|
||||||
ulsch_harq->frame = frame_rx;
|
|
||||||
if ((ulsch_harq->status == NR_ACTIVE) &&
|
if ((ulsch_harq->status == NR_ACTIVE) &&
|
||||||
(ulsch_harq->frame == frame_rx) &&
|
(ulsch_harq->frame == frame_rx) &&
|
||||||
(ulsch_harq->slot == slot_rx) &&
|
(ulsch_harq->slot == slot_rx) &&
|
||||||
|
|||||||
@@ -121,38 +121,32 @@ void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
|||||||
nfapi_nr_tx_data_request_t *TX_req = &gNB->TX_req[0];
|
nfapi_nr_tx_data_request_t *TX_req = &gNB->TX_req[0];
|
||||||
|
|
||||||
gNB->pdu_index[CC_idP] = 0;
|
gNB->pdu_index[CC_idP] = 0;
|
||||||
if (NFAPI_MODE == NFAPI_MODE_VNF)
|
|
||||||
{
|
|
||||||
memset(pdcch, 0, sizeof(**pdcch) * MAX_NUM_BWP * MAX_NUM_CORESET);
|
|
||||||
}
|
|
||||||
if (NFAPI_MODE == NFAPI_MONOLITHIC || NFAPI_MODE == NFAPI_MODE_PNF) { // monolithic or PNF
|
|
||||||
|
|
||||||
DL_req[CC_idP].SFN = frameP;
|
DL_req[CC_idP].SFN = frameP;
|
||||||
DL_req[CC_idP].Slot = slotP;
|
DL_req[CC_idP].Slot = slotP;
|
||||||
DL_req[CC_idP].dl_tti_request_body.nPDUs = 0;
|
DL_req[CC_idP].dl_tti_request_body.nPDUs = 0;
|
||||||
DL_req[CC_idP].dl_tti_request_body.nGroup = 0;
|
DL_req[CC_idP].dl_tti_request_body.nGroup = 0;
|
||||||
//DL_req[CC_idP].dl_tti_request_body.transmission_power_pcfich = 6000;
|
//DL_req[CC_idP].dl_tti_request_body.transmission_power_pcfich = 6000;
|
||||||
memset(pdcch, 0, sizeof(**pdcch) * MAX_NUM_BWP * MAX_NUM_CORESET);
|
memset(pdcch, 0, sizeof(**pdcch) * MAX_NUM_BWP * MAX_NUM_CORESET);
|
||||||
|
|
||||||
UL_dci_req[CC_idP].SFN = frameP;
|
UL_dci_req[CC_idP].SFN = frameP;
|
||||||
UL_dci_req[CC_idP].Slot = slotP;
|
UL_dci_req[CC_idP].Slot = slotP;
|
||||||
UL_dci_req[CC_idP].numPdus = 0;
|
UL_dci_req[CC_idP].numPdus = 0;
|
||||||
|
|
||||||
/* advance last round's future UL_tti_req to be ahead of current frame/slot */
|
/* advance last round's future UL_tti_req to be ahead of current frame/slot */
|
||||||
future_ul_tti_req->SFN = (slotP == 0 ? frameP : frameP + 1) % 1024;
|
future_ul_tti_req->SFN = (slotP == 0 ? frameP : frameP + 1) % 1024;
|
||||||
/* future_ul_tti_req->Slot is fixed! */
|
/* future_ul_tti_req->Slot is fixed! */
|
||||||
future_ul_tti_req->n_pdus = 0;
|
future_ul_tti_req->n_pdus = 0;
|
||||||
future_ul_tti_req->n_ulsch = 0;
|
future_ul_tti_req->n_ulsch = 0;
|
||||||
future_ul_tti_req->n_ulcch = 0;
|
future_ul_tti_req->n_ulcch = 0;
|
||||||
future_ul_tti_req->n_group = 0;
|
future_ul_tti_req->n_group = 0;
|
||||||
|
|
||||||
/* UL_tti_req is a simple pointer into the current UL_tti_req_ahead, i.e.,
|
/* UL_tti_req is a simple pointer into the current UL_tti_req_ahead, i.e.,
|
||||||
* it walks over UL_tti_req_ahead in a circular fashion */
|
* it walks over UL_tti_req_ahead in a circular fashion */
|
||||||
gNB->UL_tti_req[CC_idP] = &gNB->UL_tti_req_ahead[CC_idP][slotP];
|
gNB->UL_tti_req[CC_idP] = &gNB->UL_tti_req_ahead[CC_idP][slotP];
|
||||||
|
|
||||||
TX_req[CC_idP].Number_of_PDUs = 0;
|
TX_req[CC_idP].Number_of_PDUs = 0;
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
void check_nr_ul_failure(module_id_t module_idP,
|
void check_nr_ul_failure(module_id_t module_idP,
|
||||||
|
|||||||
@@ -1141,7 +1141,7 @@ int nr_acknack_scheduling(int mod_id,
|
|||||||
if(NFAPI_MODE == NFAPI_MODE_VNF){
|
if(NFAPI_MODE == NFAPI_MODE_VNF){
|
||||||
gNB_MAC_INST *gNB = RC.nrmac[mod_id];
|
gNB_MAC_INST *gNB = RC.nrmac[mod_id];
|
||||||
gNB->UL_tti_req_ahead[0][7].SFN = f;//Added to set the UL_tti_req_ahead SFN in VNF mode for slot 7
|
gNB->UL_tti_req_ahead[0][7].SFN = f;//Added to set the UL_tti_req_ahead SFN in VNF mode for slot 7
|
||||||
gNB->UL_tti_req_ahead[0][8].SFN = f;//Added to set the UL_tti_req_ahead SFN in VNF mode for slot 8
|
gNB->[8].SFN = f;//Added to set the UL_tti_req_ahead SFN in VNF mode for slot 8
|
||||||
gNB->UL_tti_req_ahead[0][9].SFN = f;//Added to set the UL_tti_req_ahead SFN in VNF mode for slot 9
|
gNB->UL_tti_req_ahead[0][9].SFN = f;//Added to set the UL_tti_req_ahead SFN in VNF mode for slot 9
|
||||||
gNB->UL_tti_req[0] = &gNB->UL_tti_req_ahead[0][slot];
|
gNB->UL_tti_req[0] = &gNB->UL_tti_req_ahead[0][slot];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
|
|||||||
crc->tb_crc_status);
|
crc->tb_crc_status);
|
||||||
|
|
||||||
/* if CRC passes, pass PDU, otherwise pass NULL as error indication */
|
/* if CRC passes, pass PDU, otherwise pass NULL as error indication */
|
||||||
|
|
||||||
nr_rx_sdu(UL_info->module_id,
|
nr_rx_sdu(UL_info->module_id,
|
||||||
UL_info->CC_id,
|
UL_info->CC_id,
|
||||||
UL_info->rx_ind.sfn,
|
UL_info->rx_ind.sfn,
|
||||||
@@ -196,9 +195,8 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handle_nr_rach(UL_info);
|
handle_nr_rach(UL_info);
|
||||||
|
|
||||||
handle_nr_uci(UL_info);
|
handle_nr_uci(UL_info);
|
||||||
|
|
||||||
// clear HI prior to handling ULSCH
|
// clear HI prior to handling ULSCH
|
||||||
mac->UL_dci_req[CC_id].numPdus = 0;
|
mac->UL_dci_req[CC_id].numPdus = 0;
|
||||||
handle_nr_ulsch(UL_info);
|
handle_nr_ulsch(UL_info);
|
||||||
@@ -215,7 +213,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
|
|||||||
gNB_dlsch_ulsch_scheduler(module_id,
|
gNB_dlsch_ulsch_scheduler(module_id,
|
||||||
(UL_info->frame+((UL_info->slot>(spf-1-sl_ahead))?1:0)) % 1024,
|
(UL_info->frame+((UL_info->slot>(spf-1-sl_ahead))?1:0)) % 1024,
|
||||||
(UL_info->slot+sl_ahead)%spf);
|
(UL_info->slot+sl_ahead)%spf);
|
||||||
|
|
||||||
ifi->CC_mask = 0;
|
ifi->CC_mask = 0;
|
||||||
sched_info->module_id = module_id;
|
sched_info->module_id = module_id;
|
||||||
sched_info->CC_id = CC_id;
|
sched_info->CC_id = CC_id;
|
||||||
@@ -239,10 +237,10 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
|
|||||||
ifi->NR_Schedule_response(sched_info);
|
ifi->NR_Schedule_response(sched_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY,"NR_Schedule_response: SFN_SF:%d%d dl_pdus:%d\n",
|
LOG_D(PHY,"NR_Schedule_response: SFN_SF:%d%d dl_pdus:%d\n",
|
||||||
sched_info->frame,
|
sched_info->frame,
|
||||||
sched_info->slot,
|
sched_info->slot,
|
||||||
sched_info->DL_req->dl_tti_request_body.nPDUs);
|
sched_info->DL_req->dl_tti_request_body.nPDUs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user