Commit b2b51489 authored by WANG Tsu-Han's avatar WANG Tsu-Han

adding txdataF offset for gNB switch buffer

parent 272140cd
...@@ -135,7 +135,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) { ...@@ -135,7 +135,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
start_meas(&ru->ofdm_total_stats); start_meas(&ru->ofdm_total_stats);
if (nr_slot_select(cfg,frame_tx,slot)==NR_DOWNLINK_SLOT) { //if (nr_slot_select(cfg,frame_tx,slot)==NR_DOWNLINK_SLOT) {
if(ru->num_gNB != 0){//L1 RU on same machine if(ru->num_gNB != 0){//L1 RU on same machine
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 );
...@@ -229,7 +229,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) { ...@@ -229,7 +229,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
} }
}//j<fp->symbols_per_slot }//j<fp->symbols_per_slot
}//else (RU only machine) }//else (RU only machine)
} //}
// wait all process to finish // wait all process to finish
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_feptx))==0,"mutex_lock return %d\n",ret); AssertFatal((ret=pthread_mutex_lock(&proc->mutex_feptx))==0,"mutex_lock return %d\n",ret);
while (proc->feptx_mask != ofdm_mask_full) { while (proc->feptx_mask != ofdm_mask_full) {
...@@ -432,6 +432,7 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) { ...@@ -432,6 +432,7 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
int32_t ***bw; int32_t ***bw;
int i=0; int i=0;
int slot_tx = tti_tx; int slot_tx = tti_tx;
int txdataF_offset = ((tti_tx%2)*fp->samples_per_slot_wCP);
start_meas(&ru->precoding_stats); start_meas(&ru->precoding_stats);
if (ru->num_gNB == 1){ if (ru->num_gNB == 1){
...@@ -441,7 +442,7 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) { ...@@ -441,7 +442,7 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
for(i=0; i<fp->Lmax; ++i) for(i=0; i<fp->Lmax; ++i)
memcpy((void*)ru->common.txdataF[i], memcpy((void*)ru->common.txdataF[i],
(void*)gNB->common_vars.txdataF[i], (void*)&gNB->common_vars.txdataF[i][txdataF_offset],
fp->samples_per_slot_wCP*sizeof(int32_t)); fp->samples_per_slot_wCP*sizeof(int32_t));
if (ru->nb_tx == 1) { if (ru->nb_tx == 1) {
......
...@@ -127,18 +127,18 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) { ...@@ -127,18 +127,18 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
nr_set_ssb_first_subcarrier(cfg, fp); // setting the first subcarrier nr_set_ssb_first_subcarrier(cfg, fp); // setting the first subcarrier
LOG_D(PHY,"SS TX: frame %d, slot %d, start_symbol %d\n",frame,slot, ssb_start_symbol); LOG_D(PHY,"SS TX: frame %d, slot %d, start_symbol %d\n",frame,slot, ssb_start_symbol);
nr_generate_pss(gNB->d_pss, txdataF[ssb_index], AMP, ssb_start_symbol, cfg, fp); nr_generate_pss(gNB->d_pss, &txdataF[ssb_index][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_sss(gNB->d_sss, txdataF[ssb_index], AMP, ssb_start_symbol, cfg, fp); nr_generate_sss(gNB->d_sss, &txdataF[ssb_index][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
if (fp->Lmax == 4) if (fp->Lmax == 4)
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index],txdataF[ssb_index], AMP, ssb_start_symbol, cfg, fp); nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index],&txdataF[ssb_index][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
else else
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index],txdataF[ssb_index], AMP, ssb_start_symbol, cfg, fp); nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index],&txdataF[ssb_index][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_pbch(&gNB->pbch, nr_generate_pbch(&gNB->pbch,
&gNB->ssb_pdu, &gNB->ssb_pdu,
gNB->nr_pbch_interleaver, gNB->nr_pbch_interleaver,
txdataF[ssb_index], &txdataF[ssb_index][txdataF_offset],
AMP, AMP,
ssb_start_symbol, ssb_start_symbol,
n_hf,fp->Lmax, n_hf,fp->Lmax,
...@@ -192,7 +192,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -192,7 +192,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
if (gNB->pdcch_pdu || gNB->ul_dci_pdu) nr_generate_dci_top(gNB->pdcch_pdu, if (gNB->pdcch_pdu || gNB->ul_dci_pdu) nr_generate_dci_top(gNB->pdcch_pdu,
gNB->ul_dci_pdu, gNB->ul_dci_pdu,
gNB->nr_gold_pdcch_dmrs[slot], gNB->nr_gold_pdcch_dmrs[slot],
gNB->common_vars.txdataF[0], &gNB->common_vars.txdataF[0][txdataF_offset],
AMP, *fp); AMP, *fp);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,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