Commit 8d5bb7c0 authored by lfarizav's avatar lfarizav

new generate_prach_freq function

parent ca98dc9d
......@@ -1152,13 +1152,12 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
}
// init RX buffers
if (do_ofdm_mod)
{
common_vars->rxdata = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
for (i=0; i<fp->nb_antennas_rx; i++) {
common_vars->rxdata[i] = (int32_t*) malloc16_clear( (fp->samples_per_tti*10+2048)*sizeof(int32_t) );
}
if (do_ofdm_mod)
{
common_vars->common_vars_rx_data_per_thread[0].rxdataF = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*));
printf("[lte_init_f] address of rxdataF in memory: %p, thread %d\n",&common_vars->common_vars_rx_data_per_thread[0].rxdataF,0);
for (i=0; i<fp->nb_antennas_rx; i++) {
......
This diff is collapsed.
......@@ -2150,6 +2150,7 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame, uint8_t sub
*/
int32_t generate_prach(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe,uint16_t Nf);
int32_t generate_prach_freq(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe,uint16_t Nf);
/*!
\brief Process PRACH waveform
......
......@@ -1483,7 +1483,10 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
// start_meas(&ue->tx_prach);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_IN);
prach_power = generate_prach(ue,eNB_id,subframe_tx,frame_tx);
if (ue->do_ofdm_mod)
prach_power = generate_prach_freq(ue,eNB_id,subframe_tx,frame_tx);
else
prach_power = generate_prach(ue,eNB_id,subframe_tx,frame_tx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_OUT);
// stop_meas(&ue->tx_prach);
LOG_D(PHY,"[UE %d][RAPROC] PRACH PL %d dB, power %d dBm, digital power %d dB (amp %d)\n",
......
......@@ -531,7 +531,7 @@ void do_DL_sig_freq(channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][
txdataF = PHY_vars_eNB_g[eNB_id][CC_id]->common_vars.txdataF[0];
sf_offset = subframe*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti;
//for (int idx=0;idx<10;idx++) printf("dumping raw subframe %d: txdataF[%d] = (%d,%d)\n", subframe, idx, ((short*)&txdataF[0][sf_offset+idx])[0], ((short*)&txdataF[0][sf_offset+idx])[1]);
for (int idx=0;idx<10;idx++) printf("dumping raw subframe %d: txdataF[%d] = (%d,%d)\n", subframe, idx, ((short*)&txdataF[0][sf_offset+idx])[0], ((short*)&txdataF[0][sf_offset+idx])[1]);
tx_pwr = dac_fixed_gain(s_re_f,
......@@ -1156,7 +1156,7 @@ void do_UL_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX
if (abstraction_flag!=0) {
#ifdef PHY_ABSTRACTION_UL
LOG_D(OCM,"[SIM][UL] UE %d, Abstraction for do_UL_prach is not implemented in frequency domain\n",UE_id);
exit(1);
exit(-1);
#else
#endif
} else { //without abstraction
......
......@@ -1046,6 +1046,7 @@ int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void *
int CC_id = device->CC_id;
int subframe;
int n_ra_prb;
int read_samples, max_samples;
openair0_timestamp last = last_eNB_rx_timestamp[eNB_id][CC_id];
......@@ -1114,7 +1115,7 @@ int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void *
0, // frame is only used for abstraction
eNB_id,
CC_id);
write_output("txprachF.m","prach_txF", PHY_vars_UE_g[0][0]->prach_vars[0]->prachF,frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti,1,1);
write_output("txprachF.m","prach_txF", PHY_vars_UE_g[0][0]->prach_vars[0]->prachF,12*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti,1,1);
//generate_prach(PHY_vars_UE_g[0][0],eNB_id,subframe,frame);
//PHY_vars_UE_g[0][0]->generate_prach=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