Commit 2bab910f authored by Raymond Knopp's avatar Raymond Knopp

USRP TX now always on

parent 2e91cca4
......@@ -113,10 +113,14 @@ void tx_func(void *param) {
processingData_L1_t *info = (processingData_L1_t *) param;
PHY_VARS_gNB *gNB = info->gNB;
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
int frame_tx = info->frame_tx;
int slot_tx = info->slot_tx;
int tx_slot_type = nr_slot_select(cfg,frame_tx,slot_tx);
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT) {
phy_procedures_gNB_TX(gNB, frame_tx,slot_tx, 1);
}
// start FH TX processing
notifiedFIFO_elt_t *res;
......@@ -229,7 +233,6 @@ void rx_func(void *param) {
if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1);
// RX processing
int tx_slot_type = nr_slot_select(cfg,frame_tx,slot_tx);
int rx_slot_type = nr_slot_select(cfg,frame_rx,slot_rx);
if (rx_slot_type == NR_UPLINK_SLOT || rx_slot_type == NR_MIXED_SLOT) {
......@@ -268,7 +271,6 @@ void rx_func(void *param) {
notifiedFIFO_elt_t *res;
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT) {
res = pullTpool(gNB->resp_L1_tx, gNB->threadPool);
processingData_L1_t *syncMsg = (processingData_L1_t *)NotifiedFifoData(res);
syncMsg->gNB = gNB;
......@@ -279,7 +281,6 @@ void rx_func(void *param) {
syncMsg->timestamp_tx = info->timestamp_tx;
res->key = slot_tx;
pushTpool(gNB->threadPool, res);
}
#if 0
LOG_D(PHY, "rxtx:%lld nfapi:%lld phy:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ",
......
......@@ -724,10 +724,20 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
int sf_extension = 0; //sf_extension = ru->sf_extension;
int siglen=fp->get_samples_per_slot(slot,fp);
int flags=1;
static int first_tx = 1;
//nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
if (slot_type == NR_DOWNLINK_SLOT || slot_type == NR_MIXED_SLOT || IS_SOFTMODEM_RFSIM) {
if (first_tx==1) {
flags=2;
first_tx=0;
}
else {
flags=1;
}
//nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
//if (slot_type == NR_DOWNLINK_SLOT || slot_type == NR_MIXED_SLOT || IS_SOFTMODEM_RFSIM) {
if (1) {
/*
if (cfg->cell_config.frame_duplex_type.value == TDD){
if(slot_type == NR_MIXED_SLOT) {
txsymb = 0;
......@@ -750,6 +760,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
if (slot_type == NR_DOWNLINK_SLOT && nextslot_type == NR_UPLINK_SLOT)
flags = 3; // end of burst
}
*/
if (fp->freq_range==nr_FR2) {
// the beam index is written in bits 8-10 of the flags
......
......@@ -329,7 +329,7 @@ static void trx_usrp_end(openair0_device *device) {
for (size_t ch = 0; ch < s->tx_stream->get_num_channels(); ch++)
buffs.push_back(&dummy); // same buffer for each channel
s->tx_stream->send(buffs, 0, s->tx_md);
//s->tx_stream->send(buffs, 0, s->tx_md);
}
iqrecorder_end(device);
......
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