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) {
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
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) {
}
}//j<fp->symbols_per_slot
}//else (RU only machine)
}
//}
// wait all process to finish
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_feptx))==0,"mutex_lock return %d\n",ret);
while (proc->feptx_mask != ofdm_mask_full) {
......@@ -432,6 +432,7 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
int32_t ***bw;
int i=0;
int slot_tx = tti_tx;
int txdataF_offset = ((tti_tx%2)*fp->samples_per_slot_wCP);
start_meas(&ru->precoding_stats);
if (ru->num_gNB == 1){
......@@ -441,7 +442,7 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
for(i=0; i<fp->Lmax; ++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));
if (ru->nb_tx == 1) {
......
......@@ -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
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_sss(gNB->d_sss, 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][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
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
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,
&gNB->ssb_pdu,
gNB->nr_pbch_interleaver,
txdataF[ssb_index],
&txdataF[ssb_index][txdataF_offset],
AMP,
ssb_start_symbol,
n_hf,fp->Lmax,
......@@ -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,
gNB->ul_dci_pdu,
gNB->nr_gold_pdcch_dmrs[slot],
gNB->common_vars.txdataF[0],
&gNB->common_vars.txdataF[0][txdataF_offset],
AMP, *fp);
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