Commit b77f026f authored by laurent's avatar laurent

fix CI warnings

parent e1869e38
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <unistd.h> #include <unistd.h>
nfapi_pnf_config_t *nfapi_pnf_config_create() { nfapi_pnf_config_t *nfapi_pnf_config_create() {
static pnf_t *_this==NULL; static pnf_t *_this=NULL;
if (_this) if (_this)
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: called twice\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: called twice\n", __FUNCTION__);
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#define FAPI2_IP_DSCP 0 #define FAPI2_IP_DSCP 0
nfapi_vnf_p7_config_t *nfapi_vnf_p7_config_create() { nfapi_vnf_p7_config_t *nfapi_vnf_p7_config_create() {
static vnf_p7_t *_this==NULL; static vnf_p7_t *_this=NULL;
if (_this) if (_this)
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: called twice\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: called twice\n", __FUNCTION__);
......
...@@ -48,17 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -48,17 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int G, int G,
uint8_t q, uint8_t q,
uint16_t frame, uint16_t frame,
uint8_t Ns) uint8_t Ns) {
{
int n; int n;
// uint8_t reset; // uint8_t reset;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e; uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
uint8_t *e=dlsch_e; uint8_t *e=dlsch_e;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// Rule for accumulation of subframes for BL/CE UEs // Rule for accumulation of subframes for BL/CE UEs
uint8_t Nacc=4; uint8_t Nacc=4;
...@@ -69,21 +65,27 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -69,21 +65,27 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
#else #else
uint16_t i0 = dlsch->i0; uint16_t i0 = dlsch->i0;
#endif #endif
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1) Nacc=1; if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1) Nacc=1;
#else #else
if (dlsch->sib1_br_flag==1) Nacc=1; if (dlsch->sib1_br_flag==1) Nacc=1;
#endif #endif
else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
// Note: above SC-RNTI will also have to be added when/if implemented // Note: above SC-RNTI will also have to be added when/if implemented
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeA) Nacc=1; else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeA) Nacc=1;
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#else #else
// Note: above SC-RNTI will also have to be added when/if implemented // Note: above SC-RNTI will also have to be added when/if implemented
else if (dlsch->CEmode == CEmodeA) Nacc=1; else if (dlsch->CEmode == CEmodeA) Nacc=1;
else if (dlsch->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#endif #endif
if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0; if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0;
...@@ -98,15 +100,17 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -98,15 +100,17 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
if (mbsfn_flag == 0) { if (mbsfn_flag == 0) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) { if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) {
#else #else
if (dlsch->i0 != 0xFFFF) { if (dlsch->i0 != 0xFFFF) {
#endif #endif
// rule for BL/CE UEs from Section 6.3.1 in 36.211 // rule for BL/CE UEs from Section 6.3.1 in 36.211
x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell; x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell;
if ((frame&1023) < 200) LOG_D(PHY,"Scrambling init for (i0 %d, i %d, j0 %d, j %d, Nacc %d) => x2 %d\n",i0,i,j0,j,Nacc,x2); if ((frame&1023) < 200) LOG_D(PHY,"Scrambling init for (i0 %d, i %d, j0 %d, j %d, Nacc %d) => x2 %d\n",i0,i,j0,j,Nacc,x2);
} } else
else
#endif #endif
x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH
} else { } else {
...@@ -123,12 +127,11 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -123,12 +127,11 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
s = lte_gold_generic(&x1, &x2, 1); s = lte_gold_generic(&x1, &x2, 1);
for (n=0; n<(1+(G>>5)); n++) { for (n=0; n<(1+(G>>5)); n++) {
#ifdef DEBUG_SCRAMBLING #ifdef DEBUG_SCRAMBLING
for (int k=0;k<32;k++) printf("scrambling %d : %u xor %d = %u\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
#endif
for (int k=0; k<32; k++) printf("scrambling %d : %u xor %d = %u\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
#endif
e[0] = (e[0]) ^ (s&1); e[0] = (e[0]) ^ (s&1);
e[1] = (e[1]) ^ ((s>>1)&1); e[1] = (e[1]) ^ ((s>>1)&1);
e[2] = (e[2]) ^ ((s>>2)&1); e[2] = (e[2]) ^ ((s>>2)&1);
...@@ -161,30 +164,24 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -161,30 +164,24 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
e[29] = (e[29]) ^ ((s>>29)&1); e[29] = (e[29]) ^ ((s>>29)&1);
e[30] = (e[30]) ^ ((s>>30)&1); e[30] = (e[30]) ^ ((s>>30)&1);
e[31] = (e[31]) ^ ((s>>31)&1); e[31] = (e[31]) ^ ((s>>31)&1);
// This is not faster for some unknown reason // This is not faster for some unknown reason
// ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]); // ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]);
// ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]); // ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]);
s = lte_gold_generic(&x1, &x2, 0); s = lte_gold_generic(&x1, &x2, 0);
e += 32; e += 32;
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT);
} }
void init_scrambling_lut(void) { void init_scrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
for (s=0;s<=65535;s++) { for (s=0; s<=65535; s++) {
for (j=0;j<16;j++) { for (j=0; j<16; j++) {
scrambling_lut[i++] = (uint8_t)((s>>j)&1); scrambling_lut[i++] = (uint8_t)((s>>j)&1);
} }
} }
...@@ -194,11 +191,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -194,11 +191,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag, int mbsfn_flag,
LTE_UE_DLSCH_t *dlsch, LTE_UE_DLSCH_t *dlsch,
int G, int G,
int16_t* llr, int16_t *llr,
uint8_t q, uint8_t q,
uint8_t Ns) uint8_t Ns) {
{
int i,j,k=0; int i,j,k=0;
// uint8_t reset; // uint8_t reset;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
...@@ -232,12 +227,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -232,12 +227,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
} }
void init_unscrambling_lut(void) { void init_unscrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
for (s=0;s<=65535;s++) { for (s=0; s<=65535; s++) {
for (j=0;j<16;j++) { for (j=0; j<16; j++) {
unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1); unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1);
} }
} }
......
...@@ -122,7 +122,6 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxt ...@@ -122,7 +122,6 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxt
phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms; phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms;
phich->num_hi++; phich->num_hi++;
AssertFatal(phich->num_hi<32,"Maximum number of phich reached in subframe\n"); AssertFatal(phich->num_hi<32,"Maximum number of phich reached in subframe\n");
} }
void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
...@@ -186,6 +185,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro ...@@ -186,6 +185,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
#endif #endif
harq_pid = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx]; harq_pid = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx];
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) { if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__); LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
return; return;
...@@ -260,9 +260,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro ...@@ -260,9 +260,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
dlsch0->harq_mask = 1; dlsch0->harq_mask = 1;
dlsch0_harq = dlsch0->harq_processes[0]; dlsch0_harq = dlsch0->harq_processes[0];
dlsch0_harq->pdu = sdu; dlsch0_harq->pdu = sdu;
LOG_D(PHY,"NFAPI: frame %d, subframe %d (TX %d.%d): Programming SI-BR (%d) => %d\n",frame,subframe,proc->frame_tx,proc->subframe_tx,rel13->pdsch_payload_type,UE_id); LOG_D(PHY,"NFAPI: frame %d, subframe %d (TX %d.%d): Programming SI-BR (%d) => %d\n",frame,subframe,proc->frame_tx,proc->subframe_tx,rel13->pdsch_payload_type,UE_id);
dlsch0->rnti = 0xFFFF; dlsch0->rnti = 0xFFFF;
dlsch0->Kmimo = 1; dlsch0->Kmimo = 1;
dlsch0->Mdlharq = 4; dlsch0->Mdlharq = 4;
...@@ -569,8 +567,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB, ...@@ -569,8 +567,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
nfapi_ul_config_request_pdu_t *ul_config_pdu, nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame, uint16_t frame,
uint8_t subframe, uint8_t subframe,
uint8_t srs_active) uint8_t srs_active) {
{
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id]; LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
if (NFAPI_MODE==NFAPI_MODE_VNF) return; if (NFAPI_MODE==NFAPI_MODE_VNF) return;
...@@ -820,6 +817,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -820,6 +817,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE: case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_dci_dl_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu); handle_nfapi_dci_dl_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu);
eNB->pdcch_vars[NFAPI_SFNSF2SF(DL_req->sfn_sf)&1].num_dci++; eNB->pdcch_vars[NFAPI_SFNSF2SF(DL_req->sfn_sf)&1].num_dci++;
//LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci); //LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci);
do_oai=1; do_oai=1;
...@@ -832,11 +830,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -832,11 +830,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
TX_req->tx_request_body.number_of_pdus); TX_req->tx_request_body.number_of_pdus);
eNB->pbch_configured=1; eNB->pbch_configured=1;
do_oai=1; do_oai=1;
//LOG_D(PHY,"%s() NFAPI_DL_CONFIG_BCH_PDU_TYPE TX:%d/%d RX:%d/%d TXREQ:%d/%d\n", //LOG_D(PHY,"%s() NFAPI_DL_CONFIG_BCH_PDU_TYPE TX:%d/%d RX:%d/%d TXREQ:%d/%d\n",
//__FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, NFAPI_SFNSF2SFN(TX_req->sfn_sf), NFAPI_SFNSF2SF(TX_req->sfn_sf)); //__FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, NFAPI_SFNSF2SFN(TX_req->sfn_sf), NFAPI_SFNSF2SF(TX_req->sfn_sf));
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu, handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu,
TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data); TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data);
break; break;
case NFAPI_DL_CONFIG_MCH_PDU_TYPE: case NFAPI_DL_CONFIG_MCH_PDU_TYPE:
...@@ -911,6 +911,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -911,6 +911,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE: case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu); handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
eNB->mpdcch_vars[subframe&1].num_dci++; eNB->mpdcch_vars[subframe&1].num_dci++;
break; break;
#endif #endif
...@@ -918,10 +919,11 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -918,10 +919,11 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
} }
if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) { if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) {
if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0){ if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0) {
Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe; Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_tx_req(Sched_INFO->TX_req); oai_nfapi_tx_req(Sched_INFO->TX_req);
} }
Sched_INFO->DL_req->sfn_sf = frame << 4 | subframe; Sched_INFO->DL_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
Sched_INFO->UE_release_req->sfn_sf = frame << 4 | subframe; Sched_INFO->UE_release_req->sfn_sf = frame << 4 | subframe;
...@@ -935,7 +937,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -935,7 +937,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_pdcch_symbols=0; eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_pdcch_symbols=0;
} }
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
for (i=0; i<number_hi_dci0_pdu; i++) { for (i=0; i<number_hi_dci0_pdu; i++) {
hi_dci0_req_pdu = &HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[i]; hi_dci0_req_pdu = &HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[i];
LOG_D(PHY,"NFAPI: hi_dci0_pdu %d : type %d\n",i,hi_dci0_req_pdu->pdu_type); LOG_D(PHY,"NFAPI: hi_dci0_pdu %d : type %d\n",i,hi_dci0_req_pdu->pdu_type);
......
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