adding nfapi_new update

This commit is contained in:
David Kim
2021-03-18 11:22:06 -07:00
parent aaf50cbb80
commit 7c6e4ed01d
11 changed files with 192 additions and 127 deletions
+28 -15
View File
@@ -253,25 +253,33 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
// RX processing
int tx_slot_type; int rx_slot_type;
if(NFAPI_MODE == NFAPI_MODE_VNF) {
if ((slot_tx==8) || (slot_rx==8) || (slot_tx==9) || (slot_rx==9) || (slot_tx==18) || (slot_rx==18) || (slot_tx==19) || (slot_rx==19)) {
tx_slot_type = NR_UPLINK_SLOT;
rx_slot_type = NR_UPLINK_SLOT;
}
else if ((slot_tx==7) || (slot_rx==7) || (slot_tx==17) || (slot_rx==17)) {
tx_slot_type = NR_MIXED_SLOT;
rx_slot_type = NR_MIXED_SLOT;
}
else {
tx_slot_type = NR_DOWNLINK_SLOT;
rx_slot_type = NR_DOWNLINK_SLOT;
}
if(NFAPI_MODE != NFAPI_MONOLITHIC) { //slot selection routines not working properly in nfapi, so temporarily hardcoding
if ((slot_tx==8) || (slot_tx==9) || (slot_tx==18) || (slot_tx==19)) { //tx slot config
tx_slot_type = NR_UPLINK_SLOT;
}
else if ((slot_tx==7) || (slot_tx==17)) {
tx_slot_type = NR_MIXED_SLOT;
}
else {
tx_slot_type = NR_DOWNLINK_SLOT;;
}
if ((slot_rx==8) || (slot_rx==9) || (slot_rx==18) || (slot_rx==19)) { // rx slot config
rx_slot_type = NR_UPLINK_SLOT;
}
else if ((slot_rx==7) || (slot_rx==17)) {
rx_slot_type = NR_MIXED_SLOT;
}
else {
rx_slot_type = NR_DOWNLINK_SLOT;;
}
}
else {
tx_slot_type = nr_slot_select(cfg,frame_tx,slot_tx);
rx_slot_type = nr_slot_select(cfg,frame_rx,slot_rx);
}
if (rx_slot_type == NR_UPLINK_SLOT || rx_slot_type == NR_MIXED_SLOT) {
// UE-specific RX processing for subframe n
// TODO: check if this is correct for PARALLEL_RU_L1_TRX_SPLIT
@@ -417,12 +425,17 @@ static void *gNB_L1_thread( void *param ) {
while (!oai_exit) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 0 );
if (wait_on_condition(&L1_proc->mutex,&L1_proc->cond,&L1_proc->instance_cnt,thread_name)<0) break;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 1 );
int frame_rx = L1_proc->frame_rx;
int slot_rx = L1_proc->slot_rx;
int slot_rx;
if (NFAPI_MODE == NFAPI_MODE_PNF)
slot_rx = (L1_proc->slot_rx) + 1;
else
slot_rx = L1_proc->slot_rx;
int frame_tx = L1_proc->frame_tx;
int slot_tx = L1_proc->slot_tx;
uint64_t timestamp_tx = L1_proc->timestamp_tx;
+7 -1
View File
@@ -1606,7 +1606,13 @@ void *ru_thread( void *param ) {
// do RX front-end processing (frequency-shift, dft) if needed
int slot_type = nr_slot_select(cfg,proc->frame_rx,proc->tti_rx);
//int slot_type = nr_slot_select(cfg,proc->frame_rx,proc->tti_rx);
//if (NFAPI_MODE == NFAPI_MODE_PNF)
int slot_type;
if (slot ==7)
slot_type = NR_MIXED_SLOT;
if (slot == 8)
slot_type = NR_UPLINK_SLOT;
if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
//if (proc->tti_rx==8) {