Commit cef0567a authored by Sakthivel Velumani's avatar Sakthivel Velumani

Process PDSCH and PUSCH in parallel

1. RX PBCH slot n
2. RX PDCCH slot n
3. Start TX PUSCH in parallel for slot n+6
4. RX PDSCH slot n
5. Join PUSCH
6. TX PUCCH slot n+6
parent 616477a5
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "SCHED_NR_UE/phy_frame_config_nr.h" #include "SCHED_NR_UE/phy_frame_config_nr.h"
#include "SCHED_NR_UE/defs.h" #include "SCHED_NR_UE/defs.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "executables/softmodem-common.h"
/* /*
* NR SLOT PROCESSING SEQUENCE * NR SLOT PROCESSING SEQUENCE
...@@ -316,14 +317,9 @@ static void UE_synch(void *arg) { ...@@ -316,14 +317,9 @@ static void UE_synch(void *arg) {
} }
} }
typedef struct processingData_s {
UE_nr_rxtx_proc_t proc;
PHY_VARS_NR_UE *UE;
} processingData_t;
void processSlotTX(void *arg) { void processSlotTX(void *arg) {
processingData_t *rxtxD = (processingData_t *) arg; nr_rxtx_thread_data_t *rxtxD = (nr_rxtx_thread_data_t *) arg;
UE_nr_rxtx_proc_t *proc = &rxtxD->proc; UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
PHY_VARS_NR_UE *UE = rxtxD->UE; PHY_VARS_NR_UE *UE = rxtxD->UE;
fapi_nr_config_request_t *cfg = &UE->nrUE_config; fapi_nr_config_request_t *cfg = &UE->nrUE_config;
...@@ -354,12 +350,11 @@ void processSlotTX(void *arg) { ...@@ -354,12 +350,11 @@ void processSlotTX(void *arg) {
phy_procedures_nrUE_TX(UE,proc,0); phy_procedures_nrUE_TX(UE,proc,0);
} }
} }
ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
} }
void processSlotRX(void *arg) { void processSlotRX(void *arg) {
processingData_t *rxtxD = (processingData_t *) arg; nr_rxtx_thread_data_t *rxtxD = (nr_rxtx_thread_data_t *) arg;
UE_nr_rxtx_proc_t *proc = &rxtxD->proc; UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
PHY_VARS_NR_UE *UE = rxtxD->UE; PHY_VARS_NR_UE *UE = rxtxD->UE;
fapi_nr_config_request_t *cfg = &UE->nrUE_config; fapi_nr_config_request_t *cfg = &UE->nrUE_config;
...@@ -389,14 +384,44 @@ void processSlotRX(void *arg) { ...@@ -389,14 +384,44 @@ void processSlotRX(void *arg) {
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0);
pdcp_run(&ctxt); pdcp_run(&ctxt);
} }
}
// Wait for PUSCH processing to finish
notifiedFIFO_elt_t *res; notifiedFIFO_elt_t *res;
res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool)); res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
processingData_t *curMsg=(processingData_t *)NotifiedFifoData(res); pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
*curMsg = *rxtxD;
res->key = 1; if (get_softmodem_params()->usim_test==0) {
pushTpool(&(get_nrUE_params()->Tpool), res); pucch_procedures_ue_nr(UE,
gNB_id,
proc,
FALSE);
}
LOG_D(PHY, "Sending Uplink data \n");
nr_ue_pusch_common_procedures(UE,
proc->nr_slot_tx,
&UE->frame_parms,1);
ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
} else {
processSlotTX(rxtxD);
if (get_softmodem_params()->usim_test==0) {
pucch_procedures_ue_nr(UE,
gNB_id,
proc,
FALSE);
}
LOG_D(PHY, "Sending Uplink data \n");
nr_ue_pusch_common_procedures(UE,
proc->nr_slot_tx,
&UE->frame_parms,1);
ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
}
} }
...@@ -524,12 +549,12 @@ void *UE_thread(void *arg) { ...@@ -524,12 +549,12 @@ void *UE_thread(void *arg) {
notifiedFIFO_t rxFifo; notifiedFIFO_t rxFifo;
UE->rxFifo = &rxFifo; UE->rxFifo = &rxFifo;
initNotifiedFIFO(&rxFifo); initNotifiedFIFO(&rxFifo);
pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 1,&rxFifo,processSlotRX)); pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&rxFifo,processSlotRX));
notifiedFIFO_t txFifo; notifiedFIFO_t txFifo;
UE->txFifo = &txFifo; UE->txFifo = &txFifo;
initNotifiedFIFO(&txFifo); initNotifiedFIFO(&txFifo);
pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 1,&txFifo,processSlotTX)); pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&txFifo,processSlotTX));
int nbSlotProcessing=0; int nbSlotProcessing=0;
int thread_idx=0; int thread_idx=0;
...@@ -612,7 +637,7 @@ void *UE_thread(void *arg) { ...@@ -612,7 +637,7 @@ void *UE_thread(void *arg) {
int slot_nr = absolute_slot % nb_slot_frame; int slot_nr = absolute_slot % nb_slot_frame;
notifiedFIFO_elt_t *msgToPush; notifiedFIFO_elt_t *msgToPush;
AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure"); AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
processingData_t *curMsg=(processingData_t *)NotifiedFifoData(msgToPush); nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
curMsg->UE=UE; curMsg->UE=UE;
// update thread index for received subframe // update thread index for received subframe
curMsg->proc.thread_id = thread_idx; curMsg->proc.thread_id = thread_idx;
......
...@@ -299,19 +299,6 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, ...@@ -299,19 +299,6 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
nr_ue_ulsch_procedures(ue, harq_pid, frame_tx, slot_tx, proc->thread_id, gNB_id); nr_ue_ulsch_procedures(ue, harq_pid, frame_tx, slot_tx, proc->thread_id, gNB_id);
} }
if (get_softmodem_params()->usim_test==0) {
LOG_D(PHY, "Generating PUCCH\n");
pucch_procedures_ue_nr(ue,
gNB_id,
proc,
FALSE);
}
LOG_D(PHY, "Sending Uplink data \n");
nr_ue_pusch_common_procedures(ue,
slot_tx,
&ue->frame_parms,1);
} }
if (ue->UE_mode[gNB_id] > NOT_SYNCHED && ue->UE_mode[gNB_id] < PUSCH) { if (ue->UE_mode[gNB_id] > NOT_SYNCHED && ue->UE_mode[gNB_id] < PUSCH) {
...@@ -1868,6 +1855,15 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1868,6 +1855,15 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
#endif //NR_PDCCH_SCHED #endif //NR_PDCCH_SCHED
// Start PUSCH processing here. It runs in parallel with PDSCH processing
notifiedFIFO_elt_t *res;
res = pullTpool(ue->txFifo,&(get_nrUE_params()->Tpool));
nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(res);
curMsg->proc = *proc;
curMsg->UE = ue;
res->key = 1;
pushTpool(&(get_nrUE_params()->Tpool), res);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat); start_meas(&ue->generic_stat);
#endif #endif
...@@ -1999,6 +1995,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1999,6 +1995,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat); start_meas(&ue->generic_stat);
#endif #endif
......
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