Commit b5c19d18 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Inserted txdata in gNB with matlab waveform

parent 8d51c37f
...@@ -960,6 +960,17 @@ void init_eNB_afterRU(void) { ...@@ -960,6 +960,17 @@ void init_eNB_afterRU(void) {
LOG_I(PHY,"RC.nb_nr_CC[inst:%d]:%p\n", inst, RC.gNB[inst]); LOG_I(PHY,"RC.nb_nr_CC[inst:%d]:%p\n", inst, RC.gNB[inst]);
gNB = RC.gNB[inst]; gNB = RC.gNB[inst];
phy_init_nr_gNB(gNB,0,0); phy_init_nr_gNB(gNB,0,0);
FILE *matlab_gen_file = fopen("/home/sakthi/pdsch_mcs28_dci46_matlab.dat","r");
if (matlab_gen_file==NULL) {
printf("problem opening file\n");
exit(-1);
}
fread((void*)gNB->common_vars.debugBuff,sizeof(short),30720*2*2,matlab_gen_file);
for(int idx_samp=0; idx_samp<30720*2; idx_samp++) {
*((int16_t*)(gNB->common_vars.debugBuff+idx_samp))>>=2;
*(((int16_t*)(gNB->common_vars.debugBuff+idx_samp))+1)>>=2;
}
// map antennas and PRACH signals to gNB RX // map antennas and PRACH signals to gNB RX
if (0) AssertFatal(gNB->num_RU>0,"Number of RU attached to gNB %d is zero\n",gNB->Mod_id); if (0) AssertFatal(gNB->num_RU>0,"Number of RU attached to gNB %d is zero\n",gNB->Mod_id);
......
...@@ -861,6 +861,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, ...@@ -861,6 +861,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
LOG_D(PHY, "Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d\n", j, rel15->number_of_candidates, CCEind, CCEind*9*6*2, L); LOG_D(PHY, "Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d\n", j, rel15->number_of_candidates, CCEind, CCEind*9*6*2, L);
rel15->coreset.scrambling_rnti = 0x1234;
nr_pdcch_unscrambling(&pdcch_vars->e_rx[CCEind*108], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e); nr_pdcch_unscrambling(&pdcch_vars->e_rx[CCEind*108], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e);
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
......
...@@ -168,6 +168,10 @@ void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa) { ...@@ -168,6 +168,10 @@ void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa) {
} }
} }
if(tti_tx==1) {
//memset((void*)(&ru->common.txdata[aa][fp->get_samples_slot_timestamp(tti_tx,fp,0)]),0,sizeof(int16_t)*2*fp->get_samples_per_slot(tti_tx,fp));
memcpy((void*)(&ru->common.txdata[aa][fp->get_samples_slot_timestamp(tti_tx,fp,0)]),(void*)&ru->gNB_list[0]->common_vars.debugBuff[30720],sizeof(int16_t)*2*fp->get_samples_per_slot(tti_tx,fp));
}
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+(first_symbol!=0?1:0), 0); //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+(first_symbol!=0?1:0), 0);
} }
......
...@@ -912,6 +912,10 @@ int main(int argc, char **argv) ...@@ -912,6 +912,10 @@ int main(int argc, char **argv)
slot_length = get_samples_per_slot(slot,frame_parms); slot_length = get_samples_per_slot(slot,frame_parms);
fread((void*)&UE->common_vars.rxdata[0][slot_offset], fread((void*)&UE->common_vars.rxdata[0][slot_offset],
sizeof(int16_t),slot_length<<1,input_fd); sizeof(int16_t),slot_length<<1,input_fd);
for(int idx_samp=0; idx_samp<slot_length; idx_samp++) {
*((int16_t*)(&UE->common_vars.rxdata[0][slot_offset+idx_samp]))>>=2;
*(((int16_t*)(&UE->common_vars.rxdata[0][slot_offset+idx_samp]))+1)>>=2;
}
} }
nr_ue_dcireq(&dcireq); //to be replaced with function pointer later nr_ue_dcireq(&dcireq); //to be replaced with function pointer later
......
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