Commit 1f6d111f authored by Sakthivel Velumani's avatar Sakthivel Velumani

Num wait idication as Tpool message field

parent 2bfe9ba2
...@@ -567,12 +567,11 @@ void processSlotTX(void *arg) { ...@@ -567,12 +567,11 @@ void processSlotTX(void *arg) {
LOG_D(PHY,"%d.%d => slot type %d\n", proc->frame_tx, proc->nr_slot_tx, proc->tx_slot_type); LOG_D(PHY,"%d.%d => slot type %d\n", proc->frame_tx, proc->nr_slot_tx, proc->tx_slot_type);
if (proc->tx_slot_type == NR_UPLINK_SLOT || proc->tx_slot_type == NR_MIXED_SLOT){ if (proc->tx_slot_type == NR_UPLINK_SLOT || proc->tx_slot_type == NR_MIXED_SLOT){
// wait for rx slots to send indication // wait for rx slots to send indication (if any) that DLSCH decoding is finished
for(int i=0; i < UE->tx_wait_for_dlsch[proc->nr_slot_tx]; i++) { for(int i=0; i < rxtxD->tx_wait_for_dlsch; i++) {
notifiedFIFO_elt_t *res = pullNotifiedFIFO(UE->tx_resume_ind_fifo[proc->nr_slot_tx]); notifiedFIFO_elt_t *res = pullNotifiedFIFO(UE->tx_resume_ind_fifo[proc->nr_slot_tx]);
delNotifiedFIFO_elt(res); delNotifiedFIFO_elt(res);
} }
UE->tx_wait_for_dlsch[proc->nr_slot_tx] = 0;
// trigger L2 to run ue_scheduler thru IF module // trigger L2 to run ue_scheduler thru IF module
// [TODO] mapping right after NR initial sync // [TODO] mapping right after NR initial sync
...@@ -798,6 +797,7 @@ void *UE_thread(void *arg) { ...@@ -798,6 +797,7 @@ void *UE_thread(void *arg) {
int num_ind_fifo = nb_slot_frame; int num_ind_fifo = nb_slot_frame;
for(int i=0; i < num_ind_fifo; i++) { for(int i=0; i < num_ind_fifo; i++) {
UE->tx_wait_for_dlsch[num_ind_fifo] = 0;
UE->tx_resume_ind_fifo[i] = malloc(sizeof(*UE->tx_resume_ind_fifo[i])); UE->tx_resume_ind_fifo[i] = malloc(sizeof(*UE->tx_resume_ind_fifo[i]));
initNotifiedFIFO(UE->tx_resume_ind_fifo[i]); initNotifiedFIFO(UE->tx_resume_ind_fifo[i]);
} }
...@@ -965,15 +965,16 @@ void *UE_thread(void *arg) { ...@@ -965,15 +965,16 @@ void *UE_thread(void *arg) {
curMsgTx->writeBlockSize = writeBlockSize; curMsgTx->writeBlockSize = writeBlockSize;
curMsgTx->proc.timestamp_tx = writeTimestamp; curMsgTx->proc.timestamp_tx = writeTimestamp;
curMsgTx->UE = UE; curMsgTx->UE = UE;
curMsgTx->tx_wait_for_dlsch = UE->tx_wait_for_dlsch[curMsgTx->proc.nr_slot_tx];
UE->tx_wait_for_dlsch[curMsgTx->proc.nr_slot_tx] = 0;
pushTpool(&(get_nrUE_params()->Tpool), newElt); pushTpool(&(get_nrUE_params()->Tpool), newElt);
// RX slot processing. We launch and forget. // RX slot processing. We launch and forget.
nr_phy_data_t phy_data = UE_dl_preprocessing(UE, &curMsg.proc);
newElt = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), curMsg.proc.nr_slot_rx, NULL, UE_dl_processing); newElt = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), curMsg.proc.nr_slot_rx, NULL, UE_dl_processing);
nr_rxtx_thread_data_t *curMsgRx = (nr_rxtx_thread_data_t *) NotifiedFifoData(newElt); nr_rxtx_thread_data_t *curMsgRx = (nr_rxtx_thread_data_t *) NotifiedFifoData(newElt);
curMsgRx->proc = curMsg.proc; curMsgRx->proc = curMsg.proc;
curMsgRx->UE = UE; curMsgRx->UE = UE;
curMsgRx->phy_data = phy_data; curMsgRx->phy_data = UE_dl_preprocessing(UE, &curMsg.proc);
pushTpool(&(get_nrUE_params()->Tpool), newElt); pushTpool(&(get_nrUE_params()->Tpool), newElt);
if (curMsg.proc.decoded_frame_rx != -1) if (curMsg.proc.decoded_frame_rx != -1)
......
...@@ -688,6 +688,7 @@ typedef struct nr_rxtx_thread_data_s { ...@@ -688,6 +688,7 @@ typedef struct nr_rxtx_thread_data_s {
PHY_VARS_NR_UE *UE; PHY_VARS_NR_UE *UE;
int writeBlockSize; int writeBlockSize;
nr_phy_data_t phy_data; nr_phy_data_t phy_data;
int tx_wait_for_dlsch;
} nr_rxtx_thread_data_t; } nr_rxtx_thread_data_t;
typedef struct LDPCDecode_ue_s { typedef struct LDPCDecode_ue_s {
......
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