Added ITTI message polling in PHY procedures.
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4700 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -65,6 +65,10 @@
|
|||||||
|
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
|
|
||||||
|
#if defined(ENABLE_ITTI)
|
||||||
|
# include "intertask_interface.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define DIAG_PHY
|
//#define DIAG_PHY
|
||||||
|
|
||||||
#define NS_PER_SLOT 500000
|
#define NS_PER_SLOT 500000
|
||||||
@@ -3510,6 +3514,12 @@ int phy_procedures_RN_eNB_TX(unsigned char last_slot, unsigned char next_slot, r
|
|||||||
#endif
|
#endif
|
||||||
void phy_procedures_eNB_lte(unsigned char last_slot, unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 abstraction_flag,
|
void phy_procedures_eNB_lte(unsigned char last_slot, unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 abstraction_flag,
|
||||||
relaying_type_t r_type, PHY_VARS_RN *phy_vars_rn) {
|
relaying_type_t r_type, PHY_VARS_RN *phy_vars_rn) {
|
||||||
|
#if defined(ENABLE_ITTI)
|
||||||
|
MessageDef *msg_p;
|
||||||
|
const char *msg_name;
|
||||||
|
instance_t instance;
|
||||||
|
unsigned int Mod_id;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
if (phy_vars_eNB->frame >= 1000)
|
if (phy_vars_eNB->frame >= 1000)
|
||||||
mac_xface->macphy_exit("Exiting after 1000 Frames\n");
|
mac_xface->macphy_exit("Exiting after 1000 Frames\n");
|
||||||
@@ -3518,6 +3528,28 @@ void phy_procedures_eNB_lte(unsigned char last_slot, unsigned char next_slot,PHY
|
|||||||
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_ENB, phy_vars_eNB->frame);
|
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_ENB, phy_vars_eNB->frame);
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,1);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,1);
|
||||||
|
|
||||||
|
#if defined(ENABLE_ITTI)
|
||||||
|
do {
|
||||||
|
// Checks if a message has been sent to PHY sub-task
|
||||||
|
itti_poll_msg ( TASK_PHY_ENB, &msg_p);
|
||||||
|
|
||||||
|
if (msg_p != NULL) {
|
||||||
|
msg_name = ITTI_MSG_NAME (msg_p);
|
||||||
|
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||||
|
Mod_id = instance;
|
||||||
|
|
||||||
|
switch (ITTI_MSG_ID(msg_p)) {
|
||||||
|
|
||||||
|
default:
|
||||||
|
LOG_E(PHY, "[ENB %d] Received unexpected message %s\n", Mod_id, msg_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||||
|
}
|
||||||
|
} while(msg_p != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((((phy_vars_eNB->lte_frame_parms.frame_type == TDD)&&(subframe_select(&phy_vars_eNB->lte_frame_parms,next_slot>>1)==SF_DL))||
|
if ((((phy_vars_eNB->lte_frame_parms.frame_type == TDD)&&(subframe_select(&phy_vars_eNB->lte_frame_parms,next_slot>>1)==SF_DL))||
|
||||||
(phy_vars_eNB->lte_frame_parms.frame_type == FDD)) && ((next_slot&1)==0)) {
|
(phy_vars_eNB->lte_frame_parms.frame_type == FDD)) && ((next_slot&1)==0)) {
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
|
|||||||
@@ -82,6 +82,10 @@ fifo_dump_emos_UE emos_dump_UE;
|
|||||||
|
|
||||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||||
|
|
||||||
|
#if defined(ENABLE_ITTI)
|
||||||
|
# include "intertask_interface.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
#ifndef OPENAIR2
|
||||||
//#define DIAG_PHY
|
//#define DIAG_PHY
|
||||||
#endif
|
#endif
|
||||||
@@ -2229,7 +2233,7 @@ int lte_ue_pdcch_procedures(u8 eNB_id,u8 last_slot, PHY_VARS_UE *phy_vars_ue,u8
|
|||||||
int eNB_id_i = 1;
|
int eNB_id_i = 1;
|
||||||
u8 dual_stream_UE = 0;
|
u8 dual_stream_UE = 0;
|
||||||
int ret=0;
|
int ret=0;
|
||||||
u8 harq_pid;
|
u8 harq_pid = -1;
|
||||||
int timing_advance;
|
int timing_advance;
|
||||||
u8 pilot1,pilot2,pilot3;
|
u8 pilot1,pilot2,pilot3;
|
||||||
u8 i_mod = 0;
|
u8 i_mod = 0;
|
||||||
@@ -3164,6 +3168,12 @@ int phy_procedures_RN_UE_RX(u8 last_slot, u8 next_slot, relaying_type_t r_type)
|
|||||||
#endif
|
#endif
|
||||||
void phy_procedures_UE_lte(u8 last_slot, u8 next_slot, PHY_VARS_UE *phy_vars_ue,u8 eNB_id,u8 abstraction_flag,runmode_t mode,
|
void phy_procedures_UE_lte(u8 last_slot, u8 next_slot, PHY_VARS_UE *phy_vars_ue,u8 eNB_id,u8 abstraction_flag,runmode_t mode,
|
||||||
relaying_type_t r_type, PHY_VARS_RN *phy_vars_rn) {
|
relaying_type_t r_type, PHY_VARS_RN *phy_vars_rn) {
|
||||||
|
#if defined(ENABLE_ITTI)
|
||||||
|
MessageDef *msg_p;
|
||||||
|
const char *msg_name;
|
||||||
|
instance_t instance;
|
||||||
|
unsigned int Mod_id;
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef DEBUG_PHY_PROC
|
#undef DEBUG_PHY_PROC
|
||||||
|
|
||||||
@@ -3187,6 +3197,33 @@ int phy_procedures_RN_UE_RX(u8 last_slot, u8 next_slot, relaying_type_t r_type)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_ITTI)
|
||||||
|
do {
|
||||||
|
// Checks if a message has been sent to PHY sub-task
|
||||||
|
itti_poll_msg ( TASK_PHY_UE, &msg_p);
|
||||||
|
|
||||||
|
if (msg_p != NULL) {
|
||||||
|
msg_name = ITTI_MSG_NAME (msg_p);
|
||||||
|
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||||
|
Mod_id = instance - NB_eNB_INST;
|
||||||
|
|
||||||
|
switch (ITTI_MSG_ID(msg_p)) {
|
||||||
|
case PHY_FIND_CELL_REQ:
|
||||||
|
LOG_I(PHY, "[UE %d] Received %s from %s\n", Mod_id, msg_name);
|
||||||
|
|
||||||
|
/* TODO process the message */
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
LOG_E(PHY, "[UE %d] Received unexpected message %s\n", Mod_id, msg_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||||
|
}
|
||||||
|
} while(msg_p != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((subframe_select(&phy_vars_ue->lte_frame_parms,next_slot>>1)==SF_UL)||
|
if ((subframe_select(&phy_vars_ue->lte_frame_parms,next_slot>>1)==SF_UL)||
|
||||||
(phy_vars_ue->lte_frame_parms.frame_type == 0)){
|
(phy_vars_ue->lte_frame_parms.frame_type == 0)){
|
||||||
phy_procedures_UE_TX(next_slot,phy_vars_ue,eNB_id,abstraction_flag,mode,r_type);
|
phy_procedures_UE_TX(next_slot,phy_vars_ue,eNB_id,abstraction_flag,mode,r_type);
|
||||||
|
|||||||
Reference in New Issue
Block a user