Commit 75665ad0 authored by laurent's avatar laurent

Create DL sub header

parent 2af75f48
...@@ -2094,7 +2094,7 @@ target_link_libraries (lte-softmodem ...@@ -2094,7 +2094,7 @@ target_link_libraries (lte-softmodem
add_executable(ocp-softmodem add_executable(ocp-softmodem
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_DIR}/executables/main-ocp.c ${OPENAIR_DIR}/executables/main-ocp.c
${OPENAIR_DIR}/executables/dl_fs6.c ${OPENAIR_DIR}/executables/main-fs6.c
${OPENAIR_DIR}/executables/transport_split.c ${OPENAIR_DIR}/executables/transport_split.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c ${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem-common.c ${OPENAIR_TARGETS}/RT/USER/lte-softmodem-common.c
......
...@@ -53,13 +53,19 @@ typedef struct { ...@@ -53,13 +53,19 @@ typedef struct {
DCI_ALLOC_t dci_alloc[32]; DCI_ALLOC_t dci_alloc[32];
int num_mdci; int num_mdci;
int amp; int amp;
int8_t UE_dl_active[NUMBER_OF_UE_MAX]; // the HARQ id for this UE (-1: disabled)
int8_t UE_ul_active[NUMBER_OF_UE_MAX]; int8_t UE_ul_active[NUMBER_OF_UE_MAX];
int8_t UE_ul_first_rb[NUMBER_OF_UE_MAX]; // int8_t UE_ul_first_rb[NUMBER_OF_UE_MAX]; //
int8_t UE_ul_last_rb[NUMBER_OF_UE_MAX]; // int8_t UE_ul_last_rb[NUMBER_OF_UE_MAX]; //
LTE_eNB_PHICH phich_vars; LTE_eNB_PHICH phich_vars;
} fs6_dl_t; } fs6_dl_t;
typedef struct {
int UE_id;
int8_t harq_pid;
uint16_t rnti;
int dataLen;
} fs6_dl_uespec_t;
bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result); bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result);
int receiveSubFrame(UDPsock_t *sock, uint64_t expectedTS, void *bufferZone, int bufferSize); int receiveSubFrame(UDPsock_t *sock, uint64_t expectedTS, void *bufferZone, int bufferSize);
int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize); int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize);
......
...@@ -307,7 +307,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t ...@@ -307,7 +307,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0_harq->codeword = 0; dlsch0_harq->codeword = 0;
dlsch1_harq = dlsch1->harq_processes[rel8->harq_process]; dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
dlsch1_harq->codeword = 1; dlsch1_harq->codeword = 1;
dlsch0->subframe_tx[subframe] = 1; //dlsch0->subframe_tx[subframe] = 1;
LOG_D(PHY,"NFAPI: SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d dlsch0[rnti:%x harq_mask:%04x] dci_pdu[rnti:%x rnti_type:%d harq_process:%d ndi1:%d] dlsch0_harq[round:%d harq_mask:%x ndi:%d]\n", LOG_D(PHY,"NFAPI: SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d dlsch0[rnti:%x harq_mask:%04x] dci_pdu[rnti:%x rnti_type:%d harq_process:%d ndi1:%d] dlsch0_harq[round:%d harq_mask:%x ndi:%d]\n",
frame,subframe, frame,subframe,
...@@ -658,7 +658,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t ...@@ -658,7 +658,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0_harq->codeword = 0; dlsch0_harq->codeword = 0;
// printf("DCI: Setting subframe_tx for subframe %d\n",subframe); // printf("DCI: Setting subframe_tx for subframe %d\n",subframe);
dlsch0->subframe_tx[subframe] = 1; //dlsch0->subframe_tx[subframe] = 1;
conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc); conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc);
...@@ -868,7 +868,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t ...@@ -868,7 +868,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0_harq = dlsch0->harq_processes[rel8->harq_process]; dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
dlsch1_harq = dlsch1->harq_processes[rel8->harq_process]; dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
dlsch0->subframe_tx[subframe] = 1; //dlsch0->subframe_tx[subframe] = 1;
dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process; dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
dlsch1->harq_ids[frame%2][subframe] = rel8->harq_process; dlsch1->harq_ids[frame%2][subframe] = rel8->harq_process;
...@@ -1316,7 +1316,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t ...@@ -1316,7 +1316,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
} }
if (dlsch0 != NULL) { if (dlsch0 != NULL) {
dlsch0->subframe_tx[subframe] = 1; //dlsch0->subframe_tx[subframe] = 1;
dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process; dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
} }
...@@ -1723,7 +1723,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1723,7 +1723,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
dlsch0_harq->codeword = 0; dlsch0_harq->codeword = 0;
// printf("DCI: Setting subframe_tx for subframe %d\n",subframe); // printf("DCI: Setting subframe_tx for subframe %d\n",subframe);
dlsch0->subframe_tx[(subframe + 2) % 10] = 1; //dlsch0->subframe_tx[(subframe + 2) % 10] = 1;
LOG_D(PHY,"PDSCH : resource_block_coding %x\n",rel13->resource_block_coding); LOG_D(PHY,"PDSCH : resource_block_coding %x\n",rel13->resource_block_coding);
conv_eMTC_rballoc (rel13->resource_block_coding, conv_eMTC_rballoc (rel13->resource_block_coding,
...@@ -1746,7 +1746,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1746,7 +1746,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
dlsch0_harq->dl_power_off = 1; dlsch0_harq->dl_power_off = 1;
dlsch0->subframe_tx[subframe] = 1; //dlsch0->subframe_tx[subframe] = 1;
if (dlsch0->rnti != rel13->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry if (dlsch0->rnti != rel13->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry
dlsch0_harq->round = 0; dlsch0_harq->round = 0;
dlsch0->harq_mask =0; dlsch0->harq_mask =0;
......
...@@ -154,11 +154,11 @@ typedef struct { ...@@ -154,11 +154,11 @@ typedef struct {
uint8_t active; uint8_t active;
#endif #endif
/// indicator of UE type (0 = LTE, 1,2 = Cat-M) /// indicator of UE type (0 = LTE, 1,2 = Cat-M)
int ue_type; UE_type_t ue_type;
/// HARQ process mask, indicates which processes are currently active /// HARQ process mask, indicates which processes are currently active
uint16_t harq_mask; uint16_t harq_mask;
/// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK. /// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK.
uint8_t subframe_tx[10]; //uint8_t subframe_tx[10];
/// First CCE of last PDSCH scheduling per subframe. Again used during PUCCH detection for ACK/NAK. /// First CCE of last PDSCH scheduling per subframe. Again used during PUCCH detection for ACK/NAK.
uint8_t nCCE[10]; uint8_t nCCE[10];
/// Process ID's per subframe. Used to associate received ACKs on PUSCH/PUCCH to DLSCH harq process ids /// Process ID's per subframe. Used to associate received ACKs on PUSCH/PUCCH to DLSCH harq process ids
...@@ -450,7 +450,7 @@ typedef struct { ...@@ -450,7 +450,7 @@ typedef struct {
typedef struct { typedef struct {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// UE type (normal, CEModeA, CEModeB) /// UE type (normal, CEModeA, CEModeB)
uint8_t ue_type; UE_type_t ue_type;
#endif #endif
/// HARQ process mask, indicates which processes are currently active /// HARQ process mask, indicates which processes are currently active
uint16_t harq_mask; uint16_t harq_mask;
......
...@@ -410,8 +410,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -410,8 +410,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
// clear previous allocation information for all UEs // clear previous allocation information for all UEs
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if (eNB->dlsch[i][0]) //if (eNB->dlsch[i][0])
eNB->dlsch[i][0]->subframe_tx[subframe] = 0; //eNB->dlsch[i][0]->subframe_tx[subframe] = 0;
} }
/* TODO: check the following test - in the meantime it is put back as it was before */ /* TODO: check the following test - in the meantime it is put back as it was before */
...@@ -548,7 +548,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -548,7 +548,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
#endif #endif
) { ) {
// clear subframe TX flag since UE is not scheduled for PDSCH in this subframe (so that we don't look for PUCCH later) // clear subframe TX flag since UE is not scheduled for PDSCH in this subframe (so that we don't look for PUCCH later)
dlsch0->subframe_tx[subframe]=0; //dlsch0->subframe_tx[subframe]=0;
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
......
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