Commit 07db8e39 authored by Rohit Gupta's avatar Rohit Gupta

Merge branch 'enhancement-10-harmony' of...

Merge branch 'enhancement-10-harmony' of gitlab.eurecom.fr:oai/openairinterface5g into enhancement-10-harmony
parents 7a1e8347 6599d1c9
......@@ -736,14 +736,8 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
#endif
if (abstraction_flag == 0) {
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id,
frame_tx,
subframe_tx,
ue->prach_resources[eNB_id]->ra_PreambleIndex,
ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER,
ue->prach_resources[eNB_id]->ra_TDD_map_index,
ue->prach_resources[eNB_id]->ra_RNTI);
LOG_I(PHY,"mode %d\n",mode);
if ((ue->mac_enabled==1) && (mode != calib_prach_tx)) {
ue->tx_power_dBm[subframe_tx] = ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id);
......@@ -753,6 +747,15 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->prach_resources[eNB_id]->ra_PreambleIndex = 19;
}
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id,
frame_tx,
subframe_tx,
ue->prach_resources[eNB_id]->ra_PreambleIndex,
ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER,
ue->prach_resources[eNB_id]->ra_TDD_map_index,
ue->prach_resources[eNB_id]->ra_RNTI);
ue->tx_total_RE[subframe_tx] = 96;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
......
......@@ -774,6 +774,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
openair0_cfg[card].rxbase[ant] = (int32_t*)openair0_exmimo_pci[card].adc_head[ant];
openair0_cfg[card].txbase[ant] = (int32_t*)openair0_exmimo_pci[card].dac_head[ant];
}
openair0_cfg[card].mmapped_dma = 1;
}
create_watchdog(device);
......
......@@ -22,7 +22,11 @@ eNBs =
////////// Physical parameters:
component_carriers = (
{
{
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
......
......@@ -23,6 +23,9 @@ eNBs =
component_carriers = (
{
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
......
......@@ -776,6 +776,7 @@ static void get_options (int argc, char **argv)
case LONG_OPTION_CALIB_PRACH_TX:
mode = calib_prach_tx;
printf("Setting mode to calib_prach_tx (%d)\n",mode);
break;
case LONG_OPTION_RXGAIN:
......@@ -1574,6 +1575,7 @@ int main( int argc, char **argv )
UE[CC_id]->UE_scan = UE_scan;
UE[CC_id]->UE_scan_carrier = UE_scan_carrier;
UE[CC_id]->mode = mode;
printf("UE[%d]->mode = %d\n",CC_id,mode);
compute_prach_seq(&UE[CC_id]->frame_parms.prach_config_common,
UE[CC_id]->frame_parms.frame_type,
......
......@@ -448,7 +448,7 @@ static void *UE_thread_synch(void *arg)
case pbch:
LOG_I(PHY,"[UE thread Synch] Running Initial Synch\n");
LOG_I(PHY,"[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
if (initial_sync( UE, UE->mode ) == 0) {
hw_slot_offset = (UE->rx_offset<<1) / UE->frame_parms.samples_per_tti;
......@@ -493,7 +493,7 @@ static void *UE_thread_synch(void *arg)
break;
}
//UE->rfdevice.trx_set_freq_func(&openair0,&openair0_cfg[0],0);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0);
//UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]);
UE->rfdevice.trx_stop_func(&UE->rfdevice);
sleep(1);
......@@ -801,7 +801,7 @@ static void *UE_thread_rxn_txnp4(void *arg)
(subframe_select( &UE->frame_parms, proc->subframe_tx ) == SF_S)) {
if (UE->mode != loop_through_memory) {
phy_procedures_UE_TX(UE,proc,0,0,normal_txrx,no_relay);
phy_procedures_UE_TX(UE,proc,0,0,UE->mode,no_relay);
}
}
......@@ -995,7 +995,7 @@ void *UE_thread(void *arg) {
if (UE->mode != loop_through_memory) {
if (UE->no_timing_correction==0) {
LOG_I(PHY,"Resynchronizing RX by %d samples\n",UE->rx_offset);
LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode);
rxs = UE->rfdevice.trx_read_func(&UE->rfdevice,
&timestamp,
(void**)rxdata,
......@@ -1036,21 +1036,6 @@ void *UE_thread(void *arg) {
UE->proc.proc_rxtx[1].frame_rx++;
for (int sf=0;sf<10;sf++) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
// prepare tx buffer pointers
for (i=0; i<UE->frame_parms.nb_antennas_tx; i++)
txp[i] = (void*)&UE->common_vars.txdata[i][((sf+4)%10)*UE->frame_parms.samples_per_tti];
txs = UE->rfdevice.trx_write_func(&UE->rfdevice,
timestamp+(4*UE->frame_parms.samples_per_tti)-UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0-openair0_cfg[0].tx_sample_advance,
txp,
UE->frame_parms.samples_per_tti,
UE->frame_parms.nb_antennas_tx,
1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
for (i=0; i<UE->frame_parms.nb_antennas_rx; i++)
rxp[i] = (void*)&rxdata[i][UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0+(sf*UE->frame_parms.samples_per_tti)];
// grab signal for subframe
......@@ -1062,6 +1047,24 @@ void *UE_thread(void *arg) {
rxp,
UE->frame_parms.samples_per_tti,
UE->frame_parms.nb_antennas_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
// prepare tx buffer pointers
for (i=0; i<UE->frame_parms.nb_antennas_tx; i++)
txp[i] = (void*)&UE->common_vars.txdata[i][((sf+2)%10)*UE->frame_parms.samples_per_tti];
txs = UE->rfdevice.trx_write_func(&UE->rfdevice,
timestamp+
(2*UE->frame_parms.samples_per_tti) -
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0 -
openair0_cfg[0].tx_sample_advance,
txp,
UE->frame_parms.samples_per_tti,
UE->frame_parms.nb_antennas_tx,
1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
}
else {
......@@ -1070,6 +1073,24 @@ void *UE_thread(void *arg) {
rxp,
UE->frame_parms.samples_per_tti-UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0,
UE->frame_parms.nb_antennas_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
// prepare tx buffer pointers
for (i=0; i<UE->frame_parms.nb_antennas_tx; i++)
txp[i] = (void*)&UE->common_vars.txdata[i][((sf+2)%10)*UE->frame_parms.samples_per_tti];
txs = UE->rfdevice.trx_write_func(&UE->rfdevice,
timestamp+
(2*UE->frame_parms.samples_per_tti) -
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0 -
openair0_cfg[0].tx_sample_advance,
txp,
UE->frame_parms.samples_per_tti - rx_off_diff,
UE->frame_parms.nb_antennas_tx,
1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
// read in first symbol of next frame and adjust for timing drift
rxs = UE->rfdevice.trx_read_func(&UE->rfdevice,
&timestamp1,
......
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