Commit a72c960e authored by Guy De Souza's avatar Guy De Souza

txdata fix

parent da3ef782
...@@ -49,11 +49,11 @@ int nr_generate_pss( int16_t *d_pss, ...@@ -49,11 +49,11 @@ int nr_generate_pss( int16_t *d_pss,
for (i=0; i < NR_PSS_LENGTH; i++) { for (i=0; i < NR_PSS_LENGTH; i++) {
m = (i + 43*Nid2)%(NR_PSS_LENGTH); m = (i + 43*Nid2)%(NR_PSS_LENGTH);
d_pss[i] = (1 - 2*x[m]) * 768; d_pss[i] = (1 - 2*x[m]) * 32767;
} }
#ifdef NR_PSS_DEBUG #ifdef NR_PSS_DEBUG
write_output("d_pss.m", "d_pss", (void*)d_pss, NR_PSS_LENGTH, 1, 3); write_output("d_pss.m", "d_pss", (void*)d_pss, NR_PSS_LENGTH, 1, 1);
#endif #endif
/// Resource mapping /// Resource mapping
...@@ -78,7 +78,7 @@ int nr_generate_pss( int16_t *d_pss, ...@@ -78,7 +78,7 @@ int nr_generate_pss( int16_t *d_pss,
} }
#ifdef NR_PSS_DEBUG #ifdef NR_PSS_DEBUG
write_output("pss_0.m", "pss_0", (void*)txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 3); write_output("pss_0.m", "pss_0", (void*)txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 1);
#endif #endif
return (0); return (0);
......
...@@ -59,11 +59,11 @@ int nr_generate_sss( int16_t *d_sss, ...@@ -59,11 +59,11 @@ int nr_generate_sss( int16_t *d_sss,
m1 = Nid1 % 112; m1 = Nid1 % 112;
for (i = 0; i < NR_SSS_LENGTH ; i++) { for (i = 0; i < NR_SSS_LENGTH ; i++) {
d_sss[i] = (1 - 2*x0[(i + m0) % NR_SSS_LENGTH] ) * (1 - 2*x1[(i + m1) % NR_SSS_LENGTH] ) * 768; d_sss[i] = (1 - 2*x0[(i + m0) % NR_SSS_LENGTH] ) * (1 - 2*x1[(i + m1) % NR_SSS_LENGTH] ) * 32767;
} }
#ifdef NR_SSS_DEBUG #ifdef NR_SSS_DEBUG
write_output("d_sss.m", "d_sss", (void*)d_sss, NR_SSS_LENGTH, 1, 3); write_output("d_sss.m", "d_sss", (void*)d_sss, NR_SSS_LENGTH, 1, 1);
#endif #endif
/// Resource mapping /// Resource mapping
...@@ -87,7 +87,7 @@ int nr_generate_sss( int16_t *d_sss, ...@@ -87,7 +87,7 @@ int nr_generate_sss( int16_t *d_sss,
} }
} }
#ifdef NR_SSS_DEBUG #ifdef NR_SSS_DEBUG
write_output("sss_0.m", "sss_0", (void*)txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 3); write_output("sss_0.m", "sss_0", (void*)txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 1);
#endif #endif
return (0); return (0);
......
...@@ -33,5 +33,17 @@ ...@@ -33,5 +33,17 @@
#include "SCHED/defs.h" #include "SCHED/defs.h"
lte_subframe_t nr_subframe_select (nfapi_config_request_t *cfg, unsigned char subframe); lte_subframe_t nr_subframe_select (nfapi_config_request_t *cfg, unsigned char subframe);
int nr_generate_pss( int16_t *d_pss,
int32_t **txdataF,
int16_t amp,
uint8_t ssb_start_symbol,
nfapi_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms);
int nr_generate_sss( int16_t *d_sss,
int32_t **txdataF,
int16_t amp,
uint8_t ssb_start_symbol,
nfapi_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms);
#endif #endif
...@@ -98,6 +98,12 @@ void nr_feptx_ofdm_2thread(RU_t *ru) { ...@@ -98,6 +98,12 @@ void nr_feptx_ofdm_2thread(RU_t *ru) {
if (nr_subframe_select(fp,subframe) == SF_UL) return; if (nr_subframe_select(fp,subframe) == SF_UL) return;
// this copy should be done in the precoding thread (currently inactive)
for (int aa=0;aa<ru->nb_tx;aa++)
memcpy((void*)ru->common.txdataF_BF[aa],
(void*)&ru->gNB_list[0]->common_vars.txdataF[aa][subframe*fp->samples_per_subframe_wCP],
fp->samples_per_subframe_wCP*sizeof(int32_t));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 1 );
if (nr_subframe_select(fp,subframe)==SF_DL) { if (nr_subframe_select(fp,subframe)==SF_DL) {
......
...@@ -55,7 +55,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) { ...@@ -55,7 +55,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
if (subframe == ss_subframe) if (subframe == ss_subframe)
{ {
LOG_I(PHY,"SS TX: frame %d, subframe %d\n",frame,subframe); LOG_I(PHY,"SS TX: frame %d, subframe %d, start_symbol %d\n",frame,subframe, ssb_start_symbol);
nr_generate_pss(gNB->d_pss, txdataF, AMP, ssb_start_symbol, cfg, fp); nr_generate_pss(gNB->d_pss, txdataF, AMP, ssb_start_symbol, cfg, fp);
nr_generate_sss(gNB->d_sss, txdataF, AMP_OVER_2, ssb_start_symbol, cfg, fp); nr_generate_sss(gNB->d_sss, txdataF, AMP_OVER_2, ssb_start_symbol, cfg, fp);
} }
...@@ -88,5 +88,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -88,5 +88,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
if (nfapi_mode == 0 || nfapi_mode == 1) { if (nfapi_mode == 0 || nfapi_mode == 1) {
nr_common_signal_procedures(gNB,frame, subframe); nr_common_signal_procedures(gNB,frame, subframe);
//if (frame == 9)
//write_output("txdataF.m","txdataF",gNB->common_vars.txdataF[aa],fp->samples_per_frame_wCP, 1, 1);
} }
} }
...@@ -814,6 +814,8 @@ void tx_rf(RU_t *ru) { ...@@ -814,6 +814,8 @@ void tx_rf(RU_t *ru) {
for (i=0; i<ru->nb_tx; i++) for (i=0; i<ru->nb_tx; i++)
txp[i] = (void*)&ru->common.txdata[i][(proc->subframe_tx*fp->samples_per_subframe)-sf_extension]; txp[i] = (void*)&ru->common.txdata[i][(proc->subframe_tx*fp->samples_per_subframe)-sf_extension];
//if (proc->subframe_tx == 9)
//write_output("txdata_frame.m","txdata_frame",gNB->common_vars.txdata[i],fp->samples_per_frame, 1, 1);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_tx-ru->openair0_cfg.tx_sample_advance)&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_tx-ru->openair0_cfg.tx_sample_advance)&0xffffffff );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
......
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