git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5601 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -232,8 +232,8 @@ static char *conf_config_file_name = NULL;
|
|||||||
static char *itti_dump_file = NULL;
|
static char *itti_dump_file = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
double tx_gain = 20;
|
double tx_gain = 120;
|
||||||
double rx_gain = 20;
|
double rx_gain = 30;
|
||||||
|
|
||||||
double sample_rate=30.72e6;
|
double sample_rate=30.72e6;
|
||||||
double bw = 14e6;
|
double bw = 14e6;
|
||||||
@@ -253,9 +253,9 @@ static int tx_max_power = 0;
|
|||||||
char ref[128] = "internal";
|
char ref[128] = "internal";
|
||||||
char channels[128] = "0";
|
char channels[128] = "0";
|
||||||
|
|
||||||
int samples_per_frame = 307200;
|
unsigned int samples_per_frame = 307200;
|
||||||
int samples_per_packets = 2048; // samples got every recv or send
|
unsigned int samples_per_packets = 2048; // samples got every recv or send
|
||||||
int tx_forward_nsamps;
|
unsigned int tx_forward_nsamps;
|
||||||
|
|
||||||
int sf_bounds_5[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
|
int sf_bounds_5[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
|
||||||
int sf_bounds_10[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
|
int sf_bounds_10[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
|
||||||
@@ -713,8 +713,8 @@ void do_OFDM_mod(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
|
|||||||
|
|
||||||
slot_offset_F = (subframe<<1)*slot_sizeF;
|
slot_offset_F = (subframe<<1)*slot_sizeF;
|
||||||
|
|
||||||
slot_offset = (subframe<<1)*
|
slot_offset = subframe*phy_vars_eNB->lte_frame_parms.samples_per_tti;
|
||||||
(phy_vars_eNB->lte_frame_parms.samples_per_tti>>1);
|
|
||||||
if ((subframe_select(&phy_vars_eNB->lte_frame_parms,subframe)==SF_DL)||
|
if ((subframe_select(&phy_vars_eNB->lte_frame_parms,subframe)==SF_DL)||
|
||||||
((subframe_select(&phy_vars_eNB->lte_frame_parms,subframe)==SF_S))) {
|
((subframe_select(&phy_vars_eNB->lte_frame_parms,subframe)==SF_S))) {
|
||||||
// LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot);
|
// LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot);
|
||||||
@@ -785,8 +785,9 @@ void do_OFDM_mod(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
|
|||||||
CYCLIC_PREFIX);
|
CYCLIC_PREFIX);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
normal_prefix_mod(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][slot_offset_F],
|
normal_prefix_mod(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][slot_offset_F],
|
||||||
&PHY_vars_eNB_g[0]->lte_eNB_common_vars.txdata[aa][slot_offset],
|
&PHY_vars_eNB_g[0]->lte_eNB_common_vars.txdata[0][aa][slot_offset],
|
||||||
7,
|
7,
|
||||||
&(phy_vars_eNB->lte_frame_parms));
|
&(phy_vars_eNB->lte_frame_parms));
|
||||||
normal_prefix_mod(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][slot_offset_F+slot_sizeF],
|
normal_prefix_mod(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][slot_offset_F+slot_sizeF],
|
||||||
@@ -834,8 +835,9 @@ static void * eNB_thread_tx(void *param) {
|
|||||||
task);
|
task);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
LOG_I(PHY,"[SCHED][eNB] eNB TX thread %d started on CPU %d\n",
|
// LOG_I(PHY,
|
||||||
proc->subframe,sched_getcpu());
|
printf("[SCHED][eNB] eNB TX thread %d started on CPU %d\n",
|
||||||
|
proc->subframe,sched_getcpu());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||||
@@ -848,7 +850,7 @@ static void * eNB_thread_tx(void *param) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
subframe_tx = (proc->subframe+1)%10;
|
subframe_tx = (proc->subframe+2)%10;
|
||||||
|
|
||||||
while (!oai_exit){
|
while (!oai_exit){
|
||||||
|
|
||||||
@@ -856,6 +858,8 @@ static void * eNB_thread_tx(void *param) {
|
|||||||
|
|
||||||
|
|
||||||
// LOG_I(PHY,"Locking mutex for eNB proc %d (IC %d,mutex %p)\n",proc->subframe,proc->instance_cnt,&proc->mutex);
|
// LOG_I(PHY,"Locking mutex for eNB proc %d (IC %d,mutex %p)\n",proc->subframe,proc->instance_cnt,&proc->mutex);
|
||||||
|
//printf("Locking mutex for eNB proc %d (subframe_tx %d))\n",proc->subframe,subframe_tx);
|
||||||
|
|
||||||
if (pthread_mutex_lock(&proc->mutex_tx) != 0) {
|
if (pthread_mutex_lock(&proc->mutex_tx) != 0) {
|
||||||
LOG_E(PHY,"[SCHED][eNB] error locking mutex for eNB TX proc %d\n",proc->subframe);
|
LOG_E(PHY,"[SCHED][eNB] error locking mutex for eNB TX proc %d\n",proc->subframe);
|
||||||
}
|
}
|
||||||
@@ -863,6 +867,7 @@ static void * eNB_thread_tx(void *param) {
|
|||||||
|
|
||||||
while (proc->instance_cnt_tx < 0) {
|
while (proc->instance_cnt_tx < 0) {
|
||||||
// LOG_I(PHY,"Waiting and unlocking mutex for eNB proc %d (IC %d,lock %d)\n",proc->subframe,proc->instance_cnt,pthread_mutex_trylock(&proc->mutex));
|
// LOG_I(PHY,"Waiting and unlocking mutex for eNB proc %d (IC %d,lock %d)\n",proc->subframe,proc->instance_cnt,pthread_mutex_trylock(&proc->mutex));
|
||||||
|
//printf("Waiting and unlocking mutex for eNB proc %d (subframe_tx %d)\n",proc->subframe,subframe_tx);
|
||||||
|
|
||||||
pthread_cond_wait(&proc->cond_tx,&proc->mutex_tx);
|
pthread_cond_wait(&proc->cond_tx,&proc->mutex_tx);
|
||||||
}
|
}
|
||||||
@@ -879,11 +884,15 @@ static void * eNB_thread_tx(void *param) {
|
|||||||
|
|
||||||
if ((((PHY_vars_eNB_g[0]->lte_frame_parms.frame_type == TDD)&&(subframe_select(&PHY_vars_eNB_g[0]->lte_frame_parms,subframe_tx)==SF_DL))||
|
if ((((PHY_vars_eNB_g[0]->lte_frame_parms.frame_type == TDD)&&(subframe_select(&PHY_vars_eNB_g[0]->lte_frame_parms,subframe_tx)==SF_DL))||
|
||||||
(PHY_vars_eNB_g[0]->lte_frame_parms.frame_type == FDD))) {
|
(PHY_vars_eNB_g[0]->lte_frame_parms.frame_type == FDD))) {
|
||||||
|
|
||||||
phy_procedures_eNB_TX(subframe_tx,PHY_vars_eNB_g[0],0,no_relay,NULL);
|
phy_procedures_eNB_TX(subframe_tx,PHY_vars_eNB_g[0],0,no_relay,NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
if ((subframe_select(&PHY_vars_eNB_g[0]->lte_frame_parms,subframe_tx)==SF_S)) {
|
if ((subframe_select(&PHY_vars_eNB_g[0]->lte_frame_parms,subframe_tx)==SF_S)) {
|
||||||
phy_procedures_eNB_TX(subframe_tx,PHY_vars_eNB_g[0],0,no_relay,NULL);
|
phy_procedures_eNB_TX(subframe_tx,PHY_vars_eNB_g[0],0,no_relay,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
do_OFDM_mod(subframe_tx,PHY_vars_eNB_g[0]);
|
do_OFDM_mod(subframe_tx,PHY_vars_eNB_g[0]);
|
||||||
|
|
||||||
if (pthread_mutex_lock(&proc->mutex_tx) != 0) {
|
if (pthread_mutex_lock(&proc->mutex_tx) != 0) {
|
||||||
@@ -1121,6 +1130,7 @@ void kill_eNB_proc() {
|
|||||||
int eNB_thread_status;
|
int eNB_thread_status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void *eNB_thread(void *arg)
|
static void *eNB_thread(void *arg)
|
||||||
{
|
{
|
||||||
#ifdef RTAI
|
#ifdef RTAI
|
||||||
@@ -1141,11 +1151,14 @@ static void *eNB_thread(void *arg)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
int rx_cnt = 0;
|
unsigned int rx_cnt = 0;
|
||||||
int tx_cnt = tx_delay;
|
unsigned int tx_cnt = tx_delay;
|
||||||
// int tx_offset;
|
// int tx_offset;
|
||||||
|
|
||||||
hw_subframe = 0;
|
hw_subframe = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
/* Wait for eNB application initialization to be complete (eNB registration to MME) */
|
/* Wait for eNB application initialization to be complete (eNB registration to MME) */
|
||||||
@@ -1158,30 +1171,43 @@ static void *eNB_thread(void *arg)
|
|||||||
|
|
||||||
if (!oai_exit) {
|
if (!oai_exit) {
|
||||||
#ifdef RTAI
|
#ifdef RTAI
|
||||||
LOG_D(HW,"[SCHED][eNB] Started eNB thread (id %p)\n",task/*" on CPU %d",rtai_cpuid()*/);
|
printf("[SCHED][eNB] Started eNB thread (id %p)\n",task);
|
||||||
#else
|
#else
|
||||||
LOG_I(HW,"[SCHED][eNB] Started eNB thread on CPU %d\n",
|
printf("[SCHED][eNB] Started eNB thread on CPU %d\n",
|
||||||
sched_getcpu());
|
sched_getcpu());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HARD_RT
|
#ifdef HARD_RT
|
||||||
rt_make_hard_real_time();
|
rt_make_hard_real_time();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
printf("eNB_thread: mlockall in ...\n");
|
||||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||||
|
printf("eNB_thread: mlockall out ...\n");
|
||||||
|
|
||||||
timing_info.time_min = 100000000ULL;
|
timing_info.time_min = 100000000ULL;
|
||||||
timing_info.time_max = 0;
|
timing_info.time_max = 0;
|
||||||
timing_info.time_avg = 0;
|
timing_info.time_avg = 0;
|
||||||
timing_info.n_samples = 0;
|
timing_info.n_samples = 0;
|
||||||
|
|
||||||
while (!oai_exit) {
|
#ifdef USRP
|
||||||
|
printf("waiting for USRP sync \n");
|
||||||
|
#ifdef RTAI
|
||||||
|
rt_sem_wait(sync_sem);
|
||||||
|
#else
|
||||||
|
//pthread_mutex_lock(&sync_mutex);
|
||||||
|
pthread_cond_wait(&sync_cond, &sync_mutex);
|
||||||
|
//pthread_mutex_unlock(&sync_mutex);
|
||||||
|
#endif
|
||||||
|
// printf("starting eNB thread @ %llu\n",get_usrp_time(&openair0));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
while (!oai_exit) {
|
||||||
|
|
||||||
#ifndef USRP
|
#ifndef USRP
|
||||||
hw_slot = (((((volatile unsigned int *)DAQ_MBOX)[0]+1)%150)<<1)/15;
|
hw_slot = (((((volatile unsigned int *)DAQ_MBOX)[0]+1)%150)<<1)/15;
|
||||||
// LOG_D(HW,"eNB frame %d, time %llu: slot %d, hw_slot %d (mbox %d)\n",frame,rt_get_time_ns(),slot,hw_slot,((unsigned int *)DAQ_MBOX)[0]);
|
// LOG_D(HW,"eNB frame %d, time %llu: slot %d, hw_slot %d (mbox %d)\n",frame,rt_get_time_ns(),slot,hw_slot,((unsigned int *)DAQ_MBOX)[0]);
|
||||||
//this is the mbox counter where we should be
|
//this is the mbox counter where we should be
|
||||||
//mbox_target = ((((slot+1)%20)*15+1)>>1)%150;
|
|
||||||
mbox_target = mbox_bounds[slot];
|
mbox_target = mbox_bounds[slot];
|
||||||
//this is the mbox counter where we are
|
//this is the mbox counter where we are
|
||||||
mbox_current = ((volatile unsigned int *)DAQ_MBOX)[0];
|
mbox_current = ((volatile unsigned int *)DAQ_MBOX)[0];
|
||||||
@@ -1240,28 +1266,38 @@ static void *eNB_thread(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else // USRP
|
#else // USRP
|
||||||
|
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME, hw_subframe);
|
||||||
|
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME, frame);
|
||||||
while (rx_cnt < sf_bounds[hw_subframe]) {
|
while (rx_cnt < sf_bounds[hw_subframe]) {
|
||||||
openair0.trx_read_func(&openair0, ×tamp, &rxdata[rx_cnt*samples_per_packets], samples_per_packets);
|
|
||||||
|
|
||||||
|
openair0_timestamp time0,time1;
|
||||||
|
unsigned int rxs;
|
||||||
|
|
||||||
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ,1);
|
||||||
|
rxs = openair0.trx_read_func(&openair0, ×tamp, &rxdata[rx_cnt*samples_per_packets], samples_per_packets);
|
||||||
|
if (rxs != samples_per_packets)
|
||||||
|
oai_exit=1;
|
||||||
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ,0);
|
||||||
|
|
||||||
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,1);
|
||||||
openair0.trx_write_func(&openair0, (timestamp+samples_per_packets*tx_delay-tx_forward_nsamps), &txdata[tx_cnt*samples_per_packets], samples_per_packets, 1);
|
openair0.trx_write_func(&openair0, (timestamp+samples_per_packets*tx_delay-tx_forward_nsamps), &txdata[tx_cnt*samples_per_packets], samples_per_packets, 1);
|
||||||
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,0);
|
||||||
|
|
||||||
rx_cnt++;
|
rx_cnt++;
|
||||||
tx_cnt++;
|
tx_cnt++;
|
||||||
|
|
||||||
|
if(tx_cnt == max_cnt)
|
||||||
|
tx_cnt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef RTAI
|
if(rx_cnt == max_cnt)
|
||||||
//pthread_mutex_lock(&tti_mutex);
|
rx_cnt = 0;
|
||||||
#endif
|
|
||||||
hw_subframe++;
|
|
||||||
slot+=2;
|
|
||||||
if(hw_subframe==10)
|
|
||||||
hw_subframe = 0;
|
|
||||||
|
|
||||||
#endif // USRP
|
#endif // USRP
|
||||||
|
|
||||||
if (oai_exit) break;
|
if (oai_exit) break;
|
||||||
|
|
||||||
if (frame>5) {
|
if (frame>100) {
|
||||||
|
|
||||||
timing_info.time_last = timing_info.time_now;
|
timing_info.time_last = timing_info.time_now;
|
||||||
timing_info.time_now = rt_get_time_ns();
|
timing_info.time_now = rt_get_time_ns();
|
||||||
@@ -1290,7 +1326,7 @@ static void *eNB_thread(void *arg)
|
|||||||
if (multi_thread == 0) {
|
if (multi_thread == 0) {
|
||||||
if ((slot&1) == 0) {
|
if ((slot&1) == 0) {
|
||||||
LOG_I(PHY,"[eNB] Single thread slot %d\n",slot);
|
LOG_I(PHY,"[eNB] Single thread slot %d\n",slot);
|
||||||
phy_procedures_eNB_lte ((2+(slot>>1))%10, PHY_vars_eNB_g[0], 0, no_relay,NULL);
|
phy_procedures_eNB_lte ((2+(slot>>1))%10, PHY_vars_eNB_g[0], 0, no_relay,NULL);
|
||||||
do_OFDM_mod((2+(slot>>1))%10,PHY_vars_eNB_g[0]);
|
do_OFDM_mod((2+(slot>>1))%10,PHY_vars_eNB_g[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1298,7 +1334,7 @@ static void *eNB_thread(void *arg)
|
|||||||
if ((slot&1) == 0) {
|
if ((slot&1) == 0) {
|
||||||
sf = ((slot>>1)+1)%10;
|
sf = ((slot>>1)+1)%10;
|
||||||
// LOG_I(PHY,"[eNB] Multithread slot %d (IC %d)\n",slot,PHY_vars_eNB_g[0]->proc[sf].instance_cnt);
|
// LOG_I(PHY,"[eNB] Multithread slot %d (IC %d)\n",slot,PHY_vars_eNB_g[0]->proc[sf].instance_cnt);
|
||||||
|
|
||||||
if (pthread_mutex_lock(&PHY_vars_eNB_g[0]->proc[sf].mutex_tx) != 0) {
|
if (pthread_mutex_lock(&PHY_vars_eNB_g[0]->proc[sf].mutex_tx) != 0) {
|
||||||
LOG_E(PHY,"[eNB] ERROR pthread_mutex_lock for eNB TX thread %d (IC %d)\n",sf,PHY_vars_eNB_g[0]->proc[sf].instance_cnt_tx);
|
LOG_E(PHY,"[eNB] ERROR pthread_mutex_lock for eNB TX thread %d (IC %d)\n",sf,PHY_vars_eNB_g[0]->proc[sf].instance_cnt_tx);
|
||||||
}
|
}
|
||||||
@@ -1313,6 +1349,7 @@ static void *eNB_thread(void *arg)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG_W(PHY,"[eNB] Frame %d, eNB TX thread %d busy!!\n",PHY_vars_eNB_g[0]->proc[sf].frame_tx,sf);
|
LOG_W(PHY,"[eNB] Frame %d, eNB TX thread %d busy!!\n",PHY_vars_eNB_g[0]->proc[sf].frame_tx,sf);
|
||||||
|
oai_exit=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1330,18 +1367,29 @@ static void *eNB_thread(void *arg)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG_W(PHY,"[eNB] Frame %d, eNB RX thread %d busy!!\n",PHY_vars_eNB_g[0]->proc[sf].frame_rx,sf);
|
LOG_W(PHY,"[eNB] Frame %d, eNB RX thread %d busy!!\n",PHY_vars_eNB_g[0]->proc[sf].frame_rx,sf);
|
||||||
|
oai_exit=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef RTAI
|
||||||
|
//pthread_mutex_lock(&tti_mutex);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef USRP
|
#ifndef USRP
|
||||||
slot++;
|
slot++;
|
||||||
#else
|
#else
|
||||||
if(rx_cnt == max_cnt) {
|
hw_subframe++;
|
||||||
rx_cnt = 0;
|
slot+=2;
|
||||||
}
|
if(hw_subframe==10) {
|
||||||
|
hw_subframe = 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (slot==20) {
|
if (slot==20) {
|
||||||
@@ -1838,7 +1886,7 @@ int main(int argc, char **argv) {
|
|||||||
{
|
{
|
||||||
printf("configuring for UE\n");
|
printf("configuring for UE\n");
|
||||||
|
|
||||||
set_comp_log(HW, LOG_DEBUG, LOG_HIGH, 1);
|
set_comp_log(HW, LOG_INFO, LOG_HIGH, 1);
|
||||||
#ifdef OPENAIR2
|
#ifdef OPENAIR2
|
||||||
set_comp_log(PHY, LOG_INFO, LOG_HIGH, 1);
|
set_comp_log(PHY, LOG_INFO, LOG_HIGH, 1);
|
||||||
#else
|
#else
|
||||||
@@ -2084,7 +2132,7 @@ int main(int argc, char **argv) {
|
|||||||
tx_forward_nsamps = 175;
|
tx_forward_nsamps = 175;
|
||||||
sf_bounds = sf_bounds_20;
|
sf_bounds = sf_bounds_20;
|
||||||
max_cnt = 150;
|
max_cnt = 150;
|
||||||
tx_delay = 8;
|
tx_delay = 9;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if(frame_parms->N_RB_DL == 50){
|
else if(frame_parms->N_RB_DL == 50){
|
||||||
@@ -2106,7 +2154,7 @@ int main(int argc, char **argv) {
|
|||||||
tx_forward_nsamps = 70;
|
tx_forward_nsamps = 70;
|
||||||
sf_bounds = sf_bounds_5;
|
sf_bounds = sf_bounds_5;
|
||||||
max_cnt = 75;
|
max_cnt = 75;
|
||||||
tx_delay = 4;
|
tx_delay = 8;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2357,6 +2405,7 @@ int main(int argc, char **argv) {
|
|||||||
init_eNB_proc();
|
init_eNB_proc();
|
||||||
LOG_D(HW,"[lte-softmodem.c] eNB threads created\n");
|
LOG_D(HW,"[lte-softmodem.c] eNB threads created\n");
|
||||||
}
|
}
|
||||||
|
printf("Creating eNB_thread \n");
|
||||||
#ifdef RTAI
|
#ifdef RTAI
|
||||||
thread0 = rt_thread_create(eNB_thread, NULL, 100000000);
|
thread0 = rt_thread_create(eNB_thread, NULL, 100000000);
|
||||||
#else
|
#else
|
||||||
@@ -2371,9 +2420,12 @@ int main(int argc, char **argv) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sleep to allow all threads to setup
|
||||||
|
sleep(5);
|
||||||
|
|
||||||
#ifdef USRP
|
#ifdef USRP
|
||||||
openair0.trx_start_func(&openair0);
|
openair0.trx_start_func(&openair0);
|
||||||
|
// printf("returning from usrp start streaming: %llu\n",get_usrp_time(&openair0));
|
||||||
#ifdef RTAI
|
#ifdef RTAI
|
||||||
rt_sem_signal(sync_sem);
|
rt_sem_signal(sync_sem);
|
||||||
#else
|
#else
|
||||||
@@ -2583,7 +2635,7 @@ void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS *frame_par
|
|||||||
rxdata = (int32_t*)malloc16(samples_per_frame*sizeof(int32_t));
|
rxdata = (int32_t*)malloc16(samples_per_frame*sizeof(int32_t));
|
||||||
phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i] = rxdata-N_TA_offset; // N_TA offset for TDD
|
phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i] = rxdata-N_TA_offset; // N_TA offset for TDD
|
||||||
memset(rxdata, 0, samples_per_frame*sizeof(int32_t));
|
memset(rxdata, 0, samples_per_frame*sizeof(int32_t));
|
||||||
printf("rxdata[%d] @ %p\n", i, phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i]);
|
printf("rxdata[%d] @ %p (%p)\n", i, phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i],rxdata);
|
||||||
}
|
}
|
||||||
for (i=0;i<frame_parms->nb_antennas_tx;i++) {
|
for (i=0;i<frame_parms->nb_antennas_tx;i++) {
|
||||||
free(phy_vars_eNB->lte_eNB_common_vars.txdata[0][i]);
|
free(phy_vars_eNB->lte_eNB_common_vars.txdata[0][i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user