ocp-gnb regression fixed on rfsimulator
This commit is contained in:
@@ -247,7 +247,7 @@ THREAD_STRUCT = (
|
|||||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||||
worker_config = "WORKER_DISABLE";
|
worker_config = "WORKER_ENABLE";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+21
-11
@@ -470,7 +470,6 @@ void OCPconfig_RU(RU_t *ru) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// this is for RU with local RF unit
|
// this is for RU with local RF unit
|
||||||
void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||||
int i;
|
int i;
|
||||||
@@ -811,10 +810,8 @@ static void *ru_thread( void *param ) {
|
|||||||
AssertFatal(ru->rfdevice.trx_start_func(&ru->rfdevice) == 0,"Could not start the RF device\n");
|
AssertFatal(ru->rfdevice.trx_start_func(&ru->rfdevice) == 0,"Could not start the RF device\n");
|
||||||
tpool_t *threadPool=(tpool_t *)malloc(sizeof(tpool_t));
|
tpool_t *threadPool=(tpool_t *)malloc(sizeof(tpool_t));
|
||||||
initTpool("-1,-1,-1", threadPool, true);
|
initTpool("-1,-1,-1", threadPool, true);
|
||||||
|
|
||||||
int64_t slot=-1;
|
int64_t slot=-1;
|
||||||
int64_t nextTSshouldBe=0;
|
int64_t nextHWTSshouldBe=0, nextRxTSlogical=0;
|
||||||
openair0_timestamp HWtimeStamp=0; //for multi RU
|
|
||||||
// weird globals, used in NR_IF_Module.c
|
// weird globals, used in NR_IF_Module.c
|
||||||
sf_ahead = (uint16_t) ceil((float)6/(0x01<<fp->numerology_index));
|
sf_ahead = (uint16_t) ceil((float)6/(0x01<<fp->numerology_index));
|
||||||
sl_ahead = sf_ahead*fp->slots_per_subframe;
|
sl_ahead = sf_ahead*fp->slots_per_subframe;
|
||||||
@@ -827,6 +824,7 @@ static void *ru_thread( void *param ) {
|
|||||||
int rxBuffOffset=fp->get_samples_slot_timestamp(nextSlot,fp,0);
|
int rxBuffOffset=fp->get_samples_slot_timestamp(nextSlot,fp,0);
|
||||||
AssertFatal(rxBuffOffset + samples_per_slot <= fp->samples_per_frame, "Will read outside allocated buffer\n");
|
AssertFatal(rxBuffOffset + samples_per_slot <= fp->samples_per_frame, "Will read outside allocated buffer\n");
|
||||||
int samples=fp->get_samples_per_slot(nextSlot,fp);
|
int samples=fp->get_samples_per_slot(nextSlot,fp);
|
||||||
|
openair0_timestamp HWtimeStamp=0; //for multi RU
|
||||||
int rxs=rx_rf(rxBuffOffset,
|
int rxs=rx_rf(rxBuffOffset,
|
||||||
samples,
|
samples,
|
||||||
ru->nb_rx,
|
ru->nb_rx,
|
||||||
@@ -835,13 +833,24 @@ static void *ru_thread( void *param ) {
|
|||||||
&HWtimeStamp);
|
&HWtimeStamp);
|
||||||
LOG_D(PHY,"Reading %d samples for slot %d\n",samples_per_slot,nextSlot);
|
LOG_D(PHY,"Reading %d samples for slot %d\n",samples_per_slot,nextSlot);
|
||||||
|
|
||||||
if ( HWtimeStamp != nextTSshouldBe)
|
if ( HWtimeStamp != nextHWTSshouldBe)
|
||||||
LOG_E(HW,"reading a stream must be continuous, %ld, %ld\n", HWtimeStamp, nextTSshouldBe);
|
LOG_E(HW,"reading a stream must be continuous, %ld, %ld\n", HWtimeStamp, nextHWTSshouldBe);
|
||||||
|
|
||||||
nextTSshouldBe=HWtimeStamp+rxs;
|
nextHWTSshouldBe=HWtimeStamp+rxs;
|
||||||
proc->tti_rx=nextSlot;
|
proc->timestamp_rx=nextRxTSlogical;
|
||||||
proc->timestamp_rx=(slot+1)*fp->samples_per_subframe;
|
nextRxTSlogical+=samples_per_slot;
|
||||||
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
|
int64_t HW_to_logical_RxTSoffset=(int64_t)HWtimeStamp-(int64_t)proc->timestamp_rx;
|
||||||
|
printf("%lu, %lu\n",HWtimeStamp, (slot+1)*fp->samples_per_subframe);
|
||||||
|
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
|
||||||
|
uint32_t idx_sf = proc->timestamp_rx / fp->samples_per_subframe;
|
||||||
|
float offsetInSubframe=proc->timestamp_rx % fp->samples_per_subframe;
|
||||||
|
proc->tti_rx = (idx_sf * fp->slots_per_subframe +
|
||||||
|
lroundf(offsetInSubframe / fp->samples_per_slot0))%
|
||||||
|
fp->slots_per_frame;
|
||||||
|
LOG_D(PHY,"RU %d/%d TS %llu (off %d), frame %d, slot %d.%d / %d\n",
|
||||||
|
ru->idx, 0,
|
||||||
|
(unsigned long long int)proc->timestamp_rx,
|
||||||
|
(int)ru->ts_offset,proc->frame_rx,proc->tti_rx,proc->tti_tx,fp->slots_per_frame);
|
||||||
int slot_type = nr_slot_select(&ru->gNB_list[0]->gNB_config,proc->frame_rx,proc->tti_rx);
|
int slot_type = nr_slot_select(&ru->gNB_list[0]->gNB_config,proc->frame_rx,proc->tti_rx);
|
||||||
|
|
||||||
if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
|
if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
|
||||||
@@ -880,7 +889,8 @@ static void *ru_thread( void *param ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// do outgoing fronthaul (south) if needed
|
// do outgoing fronthaul (south) if needed
|
||||||
tx_rf(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx);
|
tx_rf(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx+HW_to_logical_RxTSoffset);
|
||||||
|
slot++;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf( "Exiting ru_thread \n");
|
printf( "Exiting ru_thread \n");
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
|
|||||||
AssertFatal(fp->ul_CarrierFreq==(fp->dl_CarrierFreq+dlul_offset), "Disagreement in uplink frequency for band %d\n", fp->nr_band);
|
AssertFatal(fp->ul_CarrierFreq==(fp->dl_CarrierFreq+dlul_offset), "Disagreement in uplink frequency for band %d\n", fp->nr_band);
|
||||||
|
|
||||||
//fp->threequarter_fs = openair0_cfg[0].threequarter_fs;
|
//fp->threequarter_fs = openair0_cfg[0].threequarter_fs;
|
||||||
fp->threequarter_fs = 1;
|
//fp->threequarter_fs = 1;
|
||||||
LOG_I(PHY,"Configuring MIB for instance %d, : (Nid_cell %d,DL freq %llu, UL freq %llu)\n",
|
LOG_I(PHY,"Configuring MIB for instance %d, : (Nid_cell %d,DL freq %llu, UL freq %llu)\n",
|
||||||
Mod_id,
|
Mod_id,
|
||||||
gNB_config->cell_config.phy_cell_id.value,
|
gNB_config->cell_config.phy_cell_id.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user