PUSCH running with rfsimulator

This commit is contained in:
Khalid Ahmed
2019-08-23 16:08:56 +02:00
committed by Thomas Schlichter
parent 4541922258
commit f9b583e06e
15 changed files with 144 additions and 125 deletions
+6 -6
View File
@@ -659,6 +659,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
ru->nb_rx);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
proc->timestamp_rx = ts-ru->ts_offset;
@@ -1445,6 +1446,7 @@ static void *ru_thread( void *param ) {
}
// synchronization on input FH interface, acquire signals/data and block
LOG_D(PHY,"[RU_thread] read data: frame_rx = %d, tti_rx = %d\n", frame, slot);
if (ru->fh_south_in) ru->fh_south_in(ru,&frame,&slot);
else AssertFatal(1==0, "No fronthaul interface at south port");
@@ -1471,14 +1473,12 @@ static void *ru_thread( void *param ) {
// do RX front-end processing (frequency-shift, dft) if needed
if (ru->feprx) ru->feprx(ru,proc->tti_rx);
LOG_I(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx);
LOG_I(PHY,"gNB proc: frame_rx = %d, slot_rx = %d\n", RC.gNB[0][0]->proc.frame_rx, RC.gNB[0][0]->proc.slot_rx);
LOG_I(PHY,"Copying rxdataF from RU to gNB\n");
LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx);
LOG_D(PHY,"Copying rxdataF from RU to gNB\n");
for (aa=0;aa<ru->nb_rx;aa++)
memcpy((void*)RC.gNB[0][0]->common_vars.rxdataF[aa],
(void*)&ru->common.rxdataF[aa][proc->tti_rx*fp->symbols_per_tti*fp->ofdm_symbol_size],
fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t));
(void*)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t));
// At this point, all information for subframe has been received on FH interface
@@ -2152,7 +2152,7 @@ void init_NR_RU(char *rf_config_file)
if (gNB0) {
LOG_I(PHY,"Copying frame parms from gNB %d to ru %d\n",gNB0->Mod_id,ru->idx);
memcpy((void *)fp,(void *)&gNB0->frame_parms,sizeof(NR_DL_FRAME_PARMS));
memset((void *)ru->frame_parms, 0, sizeof(LTE_DL_FRAME_PARMS));
memset((void *)ru->nr_frame_parms, 0, sizeof(NR_DL_FRAME_PARMS));
// attach all RU to all gNBs in its list/
LOG_D(PHY,"ru->num_gNB:%d gNB0->num_RU:%d\n", ru->num_gNB, gNB0->num_RU);
+5 -5
View File
@@ -141,8 +141,10 @@ PHY_VARS_NR_UE *init_nr_ue_vars(NR_DL_FRAME_PARMS *frame_parms,
ue = (PHY_VARS_NR_UE *)malloc(sizeof(PHY_VARS_NR_UE));
memset(ue,0,sizeof(PHY_VARS_NR_UE));
memcpy(&(ue->frame_parms), frame_parms, sizeof(NR_DL_FRAME_PARMS));
ue->Mod_id = UE_id;
ue->mac_enabled = 1;
// initialize all signal buffers
init_nr_ue_signal(ue,1,abstraction_flag);
// intialize transport
@@ -430,14 +432,12 @@ void UE_processing(void *arg) {
(UE->frame_parms.frame_type == FDD) )
#endif
*/
if (proc->nr_tti_tx == NR_UPLINK_SLOT){
LOG_I(PHY, "[UE_processing] Frame = %d, Slot = %d\n", proc->frame_tx, proc->nr_tti_tx);
//if (proc->nr_tti_tx == NR_UPLINK_SLOT){
if (UE->mode != loop_through_memory)
phy_procedures_nrUE_TX(UE,proc,0,0);
}
//}
//phy_procedures_UE_TX(UE,proc,0,0,UE->mode,no_relay);
@@ -664,7 +664,7 @@ void *UE_thread(void *arg) {
slot_nr*UE->frame_parms.samples_per_slot];
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
txp[i] = (void *)&UE->common_vars.txdata[i][curMsg->proc.nr_tti_tx*UE->frame_parms.samples_per_slot];
txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + 2)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
int readBlockSize, writeBlockSize;
+2
View File
@@ -77,6 +77,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include <forms.h>
/* Callbacks, globals and object handlers */
extern void reset_stats( FL_OBJECT *, long );
@@ -735,6 +736,7 @@ int main( int argc, char **argv ) {
PHY_vars_UE_g[0][CC_id] = init_nr_ue_vars(frame_parms[CC_id], 0,abstraction_flag);
UE[CC_id] = PHY_vars_UE_g[0][CC_id];
if (phy_test==1)
UE[CC_id]->mac_enabled = 0;
else