Commit ce314470 authored by Sakthivel Velumani's avatar Sakthivel Velumani Committed by Laurent THOMAS

Enable concurrent UL proc

fixed race in txdataF
minor cleanups in UL procedures
parent fbcf31ff
......@@ -748,10 +748,6 @@ void *UE_thread(void *arg)
notifiedFIFO_t nf;
initNotifiedFIFO(&nf);
notifiedFIFO_t txFifo;
initNotifiedFIFO(&txFifo);
bool oneTxDone = false;
notifiedFIFO_t freeBlocks;
initNotifiedFIFO_nothreadSafe(&freeBlocks);
......@@ -951,18 +947,8 @@ void *UE_thread(void *arg)
curMsgRx->UE = UE;
pushTpool(&(get_nrUE_params()->Tpool), MsgRx);
// in this code, ul seems to be a big race condition, so we wait the previous call to processTX last
// Wait for TX slot processing to finish
if (oneTxDone) {
notifiedFIFO_elt_t *res = pullTpool(&txFifo, &(get_nrUE_params()->Tpool));
if (res == NULL)
LOG_E(PHY, "Tpool has been aborted\n");
else
delNotifiedFIFO_elt(res);
}
oneTxDone = true;
// Start TX slot processing here. It runs and end freely but it will wait the ACK/NACK information
notifiedFIFO_elt_t *MsgTx = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), proc.nr_slot_tx, &txFifo, processSlotTX);
notifiedFIFO_elt_t *MsgTx = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), proc.nr_slot_tx, NULL, processSlotTX);
nr_rxtx_thread_data_t *curMsgTx = (nr_rxtx_thread_data_t *)NotifiedFifoData(MsgTx);
curMsgTx->proc = proc;
curMsgTx->writeBlockSize = writeBlockSize;
......
......@@ -81,13 +81,7 @@ typedef enum { SEARCH_EXIST=0,
SEARCH_EXIST_RA
} find_type_t;
typedef enum {
SCH_IDLE=0,
ACTIVE,
CBA_ACTIVE,
DISABLED
} SCH_status_t;
typedef enum { SCH_IDLE = 0, ACTIVE, IN_PROC, CBA_ACTIVE, DISABLED } SCH_status_t;
typedef enum {
CEmodeA = 0,
......
......@@ -37,7 +37,12 @@
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h"
#include "../NR_TRANSPORT/nr_transport_common_proto.h"
#ifndef __cplusplus
#include <stdatomic.h>
#else
#include <atomic>
#define _Atomic(X) std::atomic<X>
#endif
typedef enum {
NEW_TRANSMISSION_HARQ,
......@@ -50,7 +55,7 @@ typedef struct {
/// HARQ tx status
harq_result_t tx_status;
/// Status Flag indicating for this ULSCH (idle,active,disabled)
SCH_status_t status;
_Atomic(SCH_status_t) status;
/// Last TPC command
uint8_t TPC;
/// Length of ACK information (bits)
......
......@@ -488,6 +488,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
pusch_config_pdu = &ul_config->ul_config_list[i].pusch_config_pdu;
current_harq_pid = pusch_config_pdu->pusch_data.harq_process_id;
NR_UL_UE_HARQ_t *harq_process_ul_ue = &PHY_vars_UE_g[module_id][cc_id]->ul_harq_processes[current_harq_pid];
if (harq_process_ul_ue->status != SCH_IDLE)
LOG_E(PHY, "harq process not finished. Data will be overwritten\n");
NR_UE_ULSCH_t *ulsch = &((nr_phy_data_tx_t *)scheduled_response->phy_data)->ulsch;
nfapi_nr_ue_pusch_pdu_t *pusch_pdu = &ulsch->pusch_pdu;
......
......@@ -1221,5 +1221,4 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc)
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_OUT);
}
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