Commit 732c92f1 authored by lipingyu's avatar lipingyu

add enb_nb_iot_top in lte-enb-nbiot.c

parent 2f4e52e4
......@@ -367,6 +367,8 @@ typedef struct RU_t_s{
int do_precoding;
/// Frame parameters
LTE_DL_FRAME_PARMS frame_parms;
/// NB-IoT frame parameters
NB_IoT_DL_FRAME_PARMS frame_parms;
///timing offset used in TDD
int N_TA_offset;
/// SF extension used in TDD (unit: number of samples at 30.72MHz) (this is an expert option)
......@@ -381,6 +383,8 @@ typedef struct RU_t_s{
int num_eNB;
/// list of eNBs using this RU
struct PHY_VARS_eNB_s *eNB_list[NUMBER_OF_eNB_MAX];
/// list of eNBs using this RU
struct PHY_VARS_eNB_NB_IoT_s *eNB_nbiot_list[NUMBER_OF_eNB_MAX];
/// Mapping of antenna ports to RF chain index
openair0_rf_map rf_map;
/// IF device descriptor
......
......@@ -500,10 +500,31 @@ static void* eNB_thread_rxtx_NB_IoT( void* param ) {
*/
void eNB_nb_iot_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string,RU_t *ru) {
void eNB_nb_iot_top(PHY_VARS_eNB_NB_IoT *eNB, int frame_rx, int subframe_rx, char *string,RU_t *ru) {
eNB_proc_NB_IoT_t *proc = &eNB->proc;
eNB_rxtx_proc_NB_IoT_t *L1_proc = &proc->proc_rxtx[0];
NB_IoT_DL_FRAME_PARMS *fp = &ru->frame_parms;
RU_proc_t *ru_proc_nbiot = &ru->proc;
proc->frame_rx = frame_rx;
proc->subframe_rx = subframe_rx;
if (!oai_exit) {
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(ru_proc_nbiot->frame_rx), T_INT(ru_proc_nbiot->subframe_rx));
L1_proc->timestamp_tx = ru_proc_nbiot->timestamp_rx + (sf_ahead*fp->samples_per_tti);
L1_proc->frame_rx = ru_proc_nbiot->frame_rx;
L1_proc->subframe_rx = ru_proc_nbiot->subframe_rx;
L1_proc->frame_tx = (L1_proc->subframe_rx > (9-sf_ahead)) ? (L1_proc->frame_rx+1)&1023 : L1_proc->frame_rx;
L1_proc->subframe_tx = (L1_proc->subframe_rx + sf_ahead)%10;
if (rxtx_NB_IoT(eNB,L1_proc,string) < 0) LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
ru_proc_nbiot->timestamp_tx = L1_proc->timestamp_tx;
ru_proc_nbiot->subframe_tx = L1_proc->subframe_tx;
ru_proc_nbiot->frame_tx = L1_proc->frame_tx;
}
}
extern void do_prach_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,int frame,int subframe);
......
......@@ -1097,9 +1097,9 @@ void wakeup_L1s(RU_t *ru) {
LOG_D(PHY,"wakeup_L1s (num %d) for RU %d (%d.%d)\n",ru->num_eNB,ru->idx, ru->proc.frame_rx,ru->proc.subframe_rx);
PHY_VARS_eNB *eNB=eNB_list[0];
PHY_VARS_eNB *eNB_nbiot=eNB_nbiot_list[0];
PHY_VARS_eNB_NB_IoT *eNB_nbiot=eNB_nbiot_list[0];
L1_proc_t *proc = &eNB->proc;
L1_nbiot_proc_t *proc_nbiot = &eNB_nbiot->proc;
eNB_proc_NB_IoT_t *proc_nbiot = &eNB_nbiot->proc;
struct timespec t;
LOG_D(PHY,"wakeup_L1s (num %d) for RU %d ru->eNB_top:%p\n",ru->num_eNB,ru->idx, ru->eNB_top);
......
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