Commit 3f1dd8d7 authored by francescomani's avatar francescomani

syntaxError

parent 96ff859c
...@@ -292,8 +292,14 @@ int nr_pusch_lowpaprtype1_dmrs_rx(PHY_VARS_gNB *gNB, ...@@ -292,8 +292,14 @@ int nr_pusch_lowpaprtype1_dmrs_rx(PHY_VARS_gNB *gNB,
nb_pusch_rb, nb_pusch_rb,
nb_dmrs); nb_dmrs);
printf("NR_DMRS_RX: wf[%d] = %d wt[%d]= %d\n", i & 1, wf1[p - 1000][i & 1], lp, wt1[p - 1000][lp]); printf("NR_DMRS_RX: wf[%d] = %d wt[%d]= %d\n", i & 1, wf1[p - 1000][i & 1], lp, wt1[p - 1000][lp]);
printf("NR_DMRS_RX: i %d dmrs_offset %d k %d pusch dmrsseq[i<<1] %d, dmrsseq[(i<<1)+1] %d pilots[k<<1] %d pilots[(k<<1)+1] %d\n", i, dmrs_offset, k, printf("NR_DMRS_RX: i %d dmrs_offset %d k %d pusch dmrsseq.r %d, dmrsseq.i %d pilots.r %d pilots.i %d\n",
dmrs_seq[i].r, dmrs_seq[i].i, output[k].r, output[(k].i); i,
dmrs_offset,
k,
dmrs_seq[i].r,
dmrs_seq[i].i,
output[k].r,
output[k].i);
#endif #endif
} }
} else { } else {
......
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
//#define DEBUG_PBCH //#define DEBUG_PBCH
//#define DEBUG_PBCH_ENCODING //#define DEBUG_PBCH_ENCODING
//#include "PHY_INTERFACE/defs.h"
#define PBCH_A 24 #define PBCH_A 24
#define PBCH_MAX_RE_PER_SYMBOL (20*12) #define PBCH_MAX_RE_PER_SYMBOL (20*12)
#define PBCH_MAX_RE (PBCH_MAX_RE_PER_SYMBOL*4) #define PBCH_MAX_RE (PBCH_MAX_RE_PER_SYMBOL*4)
...@@ -69,15 +67,17 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, ...@@ -69,15 +67,17 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz,
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier; unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier;
rx_offset = (rx_offset)%(frame_parms->ofdm_symbol_size); rx_offset = (rx_offset)%(frame_parms->ofdm_symbol_size);
struct complex16 *rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size]; struct complex16 *rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size];
struct complex16 *rxF_ext = rxdataF_ext[aarx]; struct complex16 *rxF_ext = rxdataF_ext[aarx];
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
printf("extract_rbs (nushift %d): rx_offset=%d, symbol %u\n",frame_parms->nushift, printf("extract_rbs (nushift %d): rx_offset=%d, symbol %u\n",
(rx_offset + ((symbol+s_offset)*(frame_parms->ofdm_symbol_size))),symbol); nushiftmod4,
(rx_offset + ((symbol+s_offset) * (frame_parms->ofdm_symbol_size))),
symbol);
int16_t *p = (int16_t *)rxF; int16_t *p = (int16_t *)rxF;
for (int i =0; i<8; i++) { for (int i =0; i<8; i++) {
printf("rxF [%d]= %d\n",i,rxF[i]); printf("rxF.r [%d]= %d rxF.i [%d]= %d\n", i, rxF[i].r, i, rxF[i].i);
printf("pbch extract rxF %d %d addr %p\n", p[2*i], p[2*i+1], &p[2*i]); printf("pbch extract rxF %d %d addr %p\n", p[2*i], p[2*i+1], &p[2*i]);
} }
...@@ -94,10 +94,12 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, ...@@ -94,10 +94,12 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz,
rxF_ext[j]=rxF[rx_offset]; rxF_ext[j]=rxF[rx_offset];
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
printf("rxF ext[%d] = (%d,%d) rxF [%u]= (%d,%d)\n", printf("rxF ext[%d] = (%d,%d) rxF [%u]= (%d,%d)\n",
(9*rb) + j, (9 * rb) + j,
rxF_ext[j].r, rxF_ext[j].i, rxF_ext[j].r,
rxF_ext[j].i,
rx_offset, rx_offset,
rxF[rx_offset].r,rxF[rx_offset].j; rxF[rx_offset].r,
rxF[rx_offset].i);
#endif #endif
j++; j++;
} }
...@@ -115,10 +117,13 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, ...@@ -115,10 +117,13 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz,
(i!=(nushiftmod4+8))) { (i!=(nushiftmod4+8))) {
rxF_ext[j]=rxF[rx_offset]; rxF_ext[j]=rxF[rx_offset];
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
printf("rxF ext[%d] = (%d,%d) rxF [%u]= (%d,%d)\n",(rb<4) ? (9*rb) + j : (9*(rb-12))+j, printf("rxF ext[%d] = (%d,%d) rxF [%u]= (%d,%d)\n",
rxF_ext[j].r, rxF_ext[j].i, (rb < 4) ? (9 * rb) + j : (9 * (rb - 12)) + j,
rxF_ext[j].r,
rxF_ext[j].i,
rx_offset, rx_offset,
rxF[rx_offset].r,rxF[rx_offset].j; rxF[rx_offset].r,
rxF[rx_offset].i);
#endif #endif
j++; j++;
} }
...@@ -149,11 +154,14 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, ...@@ -149,11 +154,14 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz,
(i!=(nushiftmod4+8))) { (i!=(nushiftmod4+8))) {
dl_ch0_ext[j]=dl_ch0[i]; dl_ch0_ext[j]=dl_ch0[i];
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
if ((rb==0) && (i<2)) if ((rb == 0) && (i < 2))
printf("dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n",j, printf("dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n",
dl_ch0_ext[j].r, dl_ch0_ext[j].i, j,
dl_ch0_ext[j].r,
dl_ch0_ext[j].i,
i, i,
dl_ch0[j].r, dl_ch0[j].i, dl_ch0[j].r,
dl_ch0[j].i);
#endif #endif
j++; j++;
} }
...@@ -169,10 +177,13 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz, ...@@ -169,10 +177,13 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz,
(i!=(nushiftmod4+8))) { (i!=(nushiftmod4+8))) {
dl_ch0_ext[j]=dl_ch0[i]; dl_ch0_ext[j]=dl_ch0[i];
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
printf("dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n",j, printf("dl ch0 ext[%d] = (%d,%d) dl_ch0 [%d]= (%d,%d)\n",
dl_ch0_ext[j].r, dl_ch0_ext[j].i, j,
dl_ch0_ext[j].r,
dl_ch0_ext[j].i,
i, i,
dl_ch0[j].r, dl_ch0[j].i, dl_ch0[j].r,
dl_ch0[j].i);
#endif #endif
j++; j++;
} }
...@@ -425,7 +436,7 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue, ...@@ -425,7 +436,7 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
} }
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
LOG_I(PHY,"[PHY] PBCH log2_maxh = %d (%d)\n", log2_maxh, max_h); LOG_I(PHY,"[PHY] PBCH log2_maxh = %f (%d)\n", log2_maxh, max_h);
#endif #endif
__attribute__ ((aligned(32))) struct complex16 rxdataF_comp[frame_parms->nb_antennas_rx][PBCH_MAX_RE_PER_SYMBOL]; __attribute__ ((aligned(32))) struct complex16 rxdataF_comp[frame_parms->nb_antennas_rx][PBCH_MAX_RE_PER_SYMBOL];
nr_pbch_channel_compensation(rxdataF_ext, nr_pbch_channel_compensation(rxdataF_ext,
...@@ -452,12 +463,8 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue, ...@@ -452,12 +463,8 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
UEscopeCopy(ue, pbchRxdataF_comp, pbch_unClipped, sizeof(struct complex16), frame_parms->nb_antennas_rx, pbch_e_rx_idx / 2, 0); UEscopeCopy(ue, pbchRxdataF_comp, pbch_unClipped, sizeof(struct complex16), frame_parms->nb_antennas_rx, pbch_e_rx_idx / 2, 0);
UEscopeCopy(ue, pbchLlr, pbch_e_rx, sizeof(int16_t), frame_parms->nb_antennas_rx, pbch_e_rx_idx, 0); UEscopeCopy(ue, pbchLlr, pbch_e_rx, sizeof(int16_t), frame_parms->nb_antennas_rx, pbch_e_rx_idx, 0);
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
write_output("rxdataF_comp.m","rxFcomp",rxdataF_comp[0],240*3,1,1);
short *p = (short *)rxdataF_comp[0]);
for (int cnt = 0; cnt < 864 ; cnt++) for (int cnt = 0; cnt < 864 ; cnt++)
printf("pbch rx llr %d\n",*(pbch_e_rx+cnt)); printf("pbch rx llr %d\n", *(pbch_e_rx + cnt));
#endif #endif
// un-scrambling // un-scrambling
uint32_t unscrambling_mask = (Lmax==64)?0x100006D:0x1000041; uint32_t unscrambling_mask = (Lmax==64)?0x100006D:0x1000041;
...@@ -527,7 +534,7 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue, ...@@ -527,7 +534,7 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
ue->symbol_offset += (frame_parms->slots_per_frame>>1)*frame_parms->symbols_per_slot; ue->symbol_offset += (frame_parms->slots_per_frame>>1)*frame_parms->symbols_per_slot;
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
printf("xtra_byte %x payload %x\n", xtra_byte, payload); printf("xtra_byte %x payload %x\n", result->xtra_byte, payload);
for (int i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++) { for (int i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++) {
// printf("unscrambling pbch_a[%d] = %x \n", i,pbch_a[i]); // printf("unscrambling pbch_a[%d] = %x \n", i,pbch_a[i]);
......
...@@ -115,7 +115,7 @@ void display_data(int pss_sequence_number, int16_t *rxdata, int position) { ...@@ -115,7 +115,7 @@ void display_data(int pss_sequence_number, int16_t *rxdata, int position) {
int16_t *pss_sequence[pss_sequence] = {primary_synch0_time, primary_synch1_time, primary_synch2_time}; int16_t *pss_sequence[pss_sequence] = {primary_synch0_time, primary_synch1_time, primary_synch2_time};
int16_t *pss_sequence_sl[pss_sequence] = {primary_synch0_time, primary_synch1_time}; int16_t *pss_sequence_sl[pss_sequence] = {primary_synch0_time, primary_synch1_time};
int16_t *pss_sequence_time = pss_sequence[pss_sequence_number];; int16_t *pss_sequence_time = pss_sequence[pss_sequence_number];;
if (get_softmodem_params()->sl_mode != 0) { if (get_softmodem_params()->sl_mode != 0)
pss_sequence_time = pss_sequence_sl[pss_sequence_number]; pss_sequence_time = pss_sequence_sl[pss_sequence_number];
printf(" pss %6d data \n", pss_sequence_number); printf(" pss %6d data \n", pss_sequence_number);
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
......
...@@ -155,11 +155,11 @@ int RCconfig_NbIoTRRC(MessageDef *msg_p, int nbiotrrc_id,eNB_RRC_INST_NB_IoT *nb ...@@ -155,11 +155,11 @@ int RCconfig_NbIoTRRC(MessageDef *msg_p, int nbiotrrc_id,eNB_RRC_INST_NB_IoT *nb
NBIoTParams[i].chkPptr = &(NBIoTCheckParams[i]); NBIoTParams[i].chkPptr = &(NBIoTCheckParams[i]);
} }
for (int i=0; (i<sizeofArray(NBIoTParams) && i<sizeofArray(NBIoTCheckParamsB); i++ ) { for (int i = 0; i < sizeofArray(NBIoTParams) && i < sizeofArray(NBIoTCheckParamsB); i++) {
NBIoTParams[i+15].chkPptr = &(NBIoTCheckParamsB[i]); NBIoTParams[i + 15].chkPptr = &(NBIoTCheckParamsB[i]);
} }
for (int i=0; i<sizeofArray(NBIoTPrachParams && i<sizeofArray(NBIoTPrachCheckParams); i++ ) { for (int i = 0; i < sizeofArray(NBIoTPrachParams) && i < sizeofArray(NBIoTPrachCheckParams); i++) {
NBIoTPrachParams[i].chkPptr = &(NBIoTPrachCheckParams[i]); NBIoTPrachParams[i].chkPptr = &(NBIoTPrachCheckParams[i]);
} }
......
...@@ -133,7 +133,8 @@ static void trx_iris_end(openair0_device *device) { ...@@ -133,7 +133,8 @@ static void trx_iris_end(openair0_device *device) {
static int static int
trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) { trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags)
{
using namespace std::chrono; using namespace std::chrono;
int flag = 0; int flag = 0;
...@@ -158,7 +159,7 @@ trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buf ...@@ -158,7 +159,7 @@ trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buf
return nsamps; return nsamps;
} }
if (flags == TX_BURST_START || flags == TX_BURST_MIDDLE) if (flags == TX_BURST_START || flags == TX_BURST_MIDDLE) {
} else if (flags == TX_BURST_END || flags == TX_BURST_START_AND_END) { } else if (flags == TX_BURST_END || flags == TX_BURST_START_AND_END) {
flag |= SOAPY_SDR_END_BURST; flag |= SOAPY_SDR_END_BURST;
......
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