Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pasolini/openairinterface5g
  • odukan/openairinterface5g
  • ewa/openairinterface5g
  • deksprime/openairinterface5g
  • jackokie/openairinterface5g
  • Srushti16/openairinterface5g
  • BRodolphe/openairinterface5g
  • kramantas/openairinterface5g
  • suraj_4g5g/openairinterface5g
  • turletti/openairinterface5g
  • anandriisc/openairinterface5g
  • lvguorong/openairinterface5g
  • dast/openairinterface5g
  • yashwanthr/openairinterface5g
  • ajiti2tb/openairinterface5g
  • qzhou/openairinterface5g
  • nickmxxx/openairinterface5g
  • bin_he4/openairinterface5g
  • delarco/openairinterface5g
  • limx1980/openairinterface5g
  • Aniq/openairinterface5g
  • yassir63/openairinterface5g
  • orc318/openairinterface5g
  • vader/openairinterface5g
  • limx59/openairinterface5g
  • nadavaati_12345/openairinterface5g
  • jenshz/openairinterface5g
  • kuldeep/openairinterface5g
  • lurker/openairinterface5g
  • shariat/openairinterface5g
  • Alireza.najafzadeh/openairinterface5g
  • Ling/openairinterface5g
  • EvanKrall/openairinterface5g
  • youyih/openairinterface5g
  • anindya/openairinterface5g
  • ahan/openairinterface5g
  • beraoud/openairinterface5g
  • obejarano/openairinterface5g
  • Monti/openairinterface5g
  • akhamsi/openairinterface5g
  • Worker.N/openairinterface5g
  • zhangtu/openairinterface5g
  • desouza/openairinterface5g
  • zhijun/openairinterface5g
  • sureshkumar/openairinterface5g
  • milan/openairinterface5g
  • bigbangbingo/openairinterface5g
  • platini/openairinterface5g
  • muralir-nv/openairinterface5g
  • Joshua_Zhang/openairinterface5g
  • siddharthmurali1/openairinterface5g
  • sorinros/openairinterface5g
  • elainecao/openairinterface5g
  • sneltved/openairinterface5g
  • aikaterini.trilyraki/openairinterface5g
  • wujunning11/openairinterface5g
  • magounak/openairinterface5g
  • ycl1729020039/openairinterface5g
  • mayukhweb/openairinterface5g
  • wataru/openairinterface5g
  • afonsoli/openairinterface5g
  • ppokar/openairinterface5g
  • emest/openairinterface5g
  • Najib/openairinterface5g
  • liqing/openairinterface5g
  • gprshome/openairinterface5g
  • Dvevgedveccc/openairinterface5g
  • Elena_Lukashova/openairinterface5g
  • imaneouss/openairinterface5g
  • yangyuan/openairinterface5g
  • ycliang/openairinterface5g
  • rohanfds/openairinterface5g
  • cong2008abc/openairinterface5g
  • Giovanni/openairinterface5g
  • willvegapunk/openairinterface5g
  • Chen/openairinterface5g
  • Ella/openairinterface5g
  • kollabalu/openairinterface5g
  • tsaichanglan/openairinterface5g
  • Artifice/openairinterface5g
  • HJR0129/openairinterface5g
  • alextp/openairinterface5g
  • Changron/openairinterface5g
  • pedosb/openairinterface5g
  • Flozzen/openairinterface5g
  • hobei/openairinterface5g
  • WP_Jing/openairinterface5g
  • reset4/openairinterface5g
  • alexjoseph/openairinterface5g
  • latuan1710/openairinterface5g
  • wynter-wang/openairinterface5g
  • stt12706/openairinterface5g
  • sy/openairinterface5g
  • dzxu/openairinterface5g
  • ptizoom/openairinterface5g
  • Thierry/openairinterface5g
  • tjamc80/openairinterface5g
  • yenmuse/openairinterface5g
  • archerling/openairinterface5g
  • grahul/openairinterface5g
  • ashish.shri/openairinterface5g
  • TianyuChen/openairinterface5g
  • cuixf1/openairinterface5g
  • Jan/openairinterface5g
  • jboatenng/openairinterface5g_gpio
  • geokal/openairinterface5g
  • johannhg/openairinterface5g
  • TofunmiA/openairinterface5g
  • razvanursu/openairinterface5g-mac-scheduling
  • Julio/openairinterface5g
  • fredrichx/openairinterface5g
  • nems/openairinterface5g
  • wb_li/openairinterface5g
  • ferrieux/openairinterface5g
  • prajna_g/openairinterface-5-g-xnap-ho
  • mtinasc/openairinterface5g
  • Hofschroeer/openairinterface5g
  • buptxiaofeng/openairinterface5g
  • fjgh_759/openairinterface5g
  • calcel/openairinterface5g
  • Reem/openairinterface5g
  • havar_mind/openairinterface5g
  • shrinish/openairinterface5g
  • YANGHELINDE/openairinterface5g
  • lool/openairinterface5g
  • raghav1900/openairinterface5g
  • allan1201/openairinterface5g
  • ferris/openairinterface5g
  • seanzw/openairinterface5g
  • emad72/openairinterface5g
  • guojilong123/openairinterface5g
  • Rony99/openairinterface5g
  • lity/openairinterface5g
  • sshrivastava/openairinterface5g
  • zhihengzhang/openairinterface5g
  • Rakesh_B_B/openairinterface5g
  • baleeiro/openairinterface5g
  • 19125064/openairinterface5g
  • linlin/openairinterface5g
  • NA1VE/openairinterface5g
  • oai1B/openairinterface5g
  • daveprice/openairinterface5g
  • mo/openairinterface5g
  • dhanmeet/openairinterface5g
  • mv2290/openairinterface-5-g-test
  • pagmatt/openairinterface5g
  • mmTestNYU/openairinterface5g
  • mmezzavilla/openairinterface5g
  • sudhakarb/openairinterface5g
  • mekki/openairinterface5g
  • virtanen/openairinterface5g
  • dyyu/openairinterface5g
  • mohammed_safwan/openairinterface5g
  • venkat/openairinterface5g
  • rupadhya/openairinterface5g
  • adjou/openairinterface5g
  • samiemostafavi/openairinterface5g-edaf
  • Sreeram/openairinterface5g
  • oliverxsch/openairinterface5g
  • oai/openairinterface5g
160 results
Show changes
Commits on Source (6)
Showing
with 1976 additions and 7 deletions
......@@ -1167,6 +1167,7 @@ set(L2_SRC
${RRC_DIR}/L2_interface.c
)
set (MAC_SRC
${PHY_INTERFACE_DIR}/phy_stub_UE.c
${PHY_INTERFACE_DIR}/IF_Module.c
${MAC_DIR}/main.c
${MAC_DIR}/ue_procedures.c
......
......@@ -356,6 +356,8 @@ void phy_cleanup(void);
void phy_config_request(PHY_Config_t *phy_config);
void phy_config_request_ue(UE_PHY_Config_t* UE_config_INFO);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
......
......@@ -59,7 +59,6 @@ int l1_north_init_eNB() {
}
void phy_config_request(PHY_Config_t *phy_config) {
uint8_t Mod_id = phy_config->Mod_id;
......@@ -297,6 +296,18 @@ void phy_config_request(PHY_Config_t *phy_config) {
LOG_I(PHY,"eNB %d/%d configured\n",Mod_id,CC_id);
}
/* Panos: New function of the UE MAC interface: This function
should copy the values assigned to the interface parameters
(within MAC/config.c) to the PHY frame configuration. It should be called at the end of
config::rrc_mac_config_request_ue()*/
void phy_config_request_ue (UE_PHY_Config_t* UE_config_INFO)
{
}
void phy_config_sib1_ue(uint8_t Mod_id,int CC_id,
uint8_t eNB_id,
TDD_Config_t *tdd_Config,
......
......@@ -58,6 +58,7 @@
#include "msc.h"
#include "openair2/PHY_INTERFACE/IF_Module.h"
#include "openair2/PHY_INTERFACE/IF_Module_UE.h"
//#include <complex.h>
#include "assertions.h"
......@@ -1326,6 +1327,12 @@ typedef struct {
/// N0 (used for abstraction)
double N0;
/// Panos: Pointer to IF_Module_UE instance of the UE.
IF_Module_UE_t *if_inst_ue;
/// Panos: Pointer to DL.indication structure of the UE.
UE_DL_IND_t UE_DL_INFO;
/// PDSCH Varaibles
PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
......
......@@ -506,6 +506,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id
{
int Mod_id = ue->Mod_id;
int CC_id = ue->CC_id;
// Panos: Substitute call to ue_get_SR() with the filled ue_SR_config->SR_payload (0, or 1).
SR_payload = ue_get_SR(Mod_id,
CC_id,
frame_tx,
......@@ -1486,6 +1487,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
}
if (ue->mac_enabled==1){
// Panos: Substitute with fill_Tx_indication(ue->Mod_id, ue->CC_id, frame_tx, eNB_id, UE_MAC_Tx_IND_Msg1_TYPE)
Msg1_transmitted(ue->Mod_id,
ue->CC_id,
frame_tx,
......@@ -1764,6 +1766,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
if (ue->mac_enabled == 1) {
// signal MAC that Msg3 was sent
// Substitute call to this function by call to fill_Tx_indication (UE_MAC_Tx_IND_Msg3_TYPE)
Msg3_transmitted(Mod_id,
CC_id,
frame_tx,
......@@ -1780,6 +1783,10 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->round==0) {
//if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->calibration_flag == 0) {
access_mode=SCHEDULED_ACCESS;
// Panos: Remove the call to ue_get_sdu here and use
// the corresponding Tx.request PDU, instead of ulsch_input_buffer, below.
ue_get_sdu(Mod_id,
CC_id,
frame_tx,
......@@ -2765,6 +2772,7 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
ue->pbch_vars[eNB_id]->pdu_errors_conseq++;
ue->pbch_vars[eNB_id]->pdu_errors++;
// Panos: Substitute call to rrc_out_of_sync_ind() with fill_bch_incication(sync=0).
if (ue->mac_enabled == 1) rrc_out_of_sync_ind(ue->Mod_id,frame_rx,eNB_id);
else AssertFatal(ue->pbch_vars[eNB_id]->pdu_errors_conseq<100,
"More that 100 consecutive PBCH errors! Exiting!\n");
......@@ -2785,6 +2793,55 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_OUT);
}
// Panos: New function supporting the MAC interface
void fill_bch_indication(module_id_t module_idP,
frame_t frameP,
unsigned char eNB_index,
uint8_t first_sync,
uint8_t sync)
{
}
// Panos: New function supporting the MAC interface
void fill_dlsch_indication(module_id_t module_idP,
uint8_t CC_id,
frame_t frameP,
sub_frame_t subframeP,
uint8_t* sdu,
uint16_t sdu_len,
uint8_t eNB_index)
{
}
// Panos: New function supporting the MAC interface
void fill_dlsch_rar_indication(module_id_t module_idP,
int CC_id,
frame_t frameP,
rnti_t ra_rnti,
uint8_t* dlsch_buffer,
rnti_t* t_crnti,
uint8_t preamble_index,
uint8_t* selected_rar_buffer)
{
}
// PANOS: New function supporting the MAC interface
void fill_Tx_indication(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id, uint8_t Tx_ind_type)
{
switch (Tx_ind_type)
{
case UE_MAC_Tx_IND_Msg1_TYPE:
break;
case UE_MAC_Tx_IND_Msg3_TYPE:
break;
}
}
int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t abstraction_flag)
{
......@@ -3436,6 +3493,7 @@ void process_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, runmode_t mo
subframe_rx,
ue->prach_resources[eNB_id]->ra_PreambleIndex);
// Panos: Substitute call to ue_process_rar() with call to fill_dlsch_rar_indication()
timing_advance = ue_process_rar(ue->Mod_id,
ue->CC_id,
frame_rx,
......@@ -3777,6 +3835,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
switch (pdsch) {
case PDSCH:
// Panos: Substitute call to ue_send_sdu() with call to fill_dlsch_indication()
ue_send_sdu(ue->Mod_id,
CC_id,
frame_rx,
......@@ -3786,6 +3845,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
eNB_id);
break;
case SI_PDSCH:
// Panos: Substitute call with call to fill_dlsch_indication()
ue_decode_si(ue->Mod_id,
CC_id,
frame_rx,
......@@ -3794,7 +3854,8 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
break;
case P_PDSCH:
ue_decode_p(ue->Mod_id,
// Panos: Substitute call with call to fill_dlsch_indication()
ue_decode_p(ue->Mod_id,
CC_id,
frame_rx,
eNB_id,
......@@ -3802,6 +3863,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
break;
case RA_PDSCH:
// Panos: Substitute with call to fill_dlsch_rar_indication()
process_rar(ue,proc,eNB_id,mode,abstraction_flag);
break;
case PDSCH1:
......
......@@ -37,6 +37,12 @@
#else
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#endif
#include "SL-OffsetIndicator-r12.h"
#include "SubframeBitmapSL-r12.h"
#include "SL-CP-Len-r12.h"
#include "SL-PeriodComm-r12.h"
#include "SL-DiscResourcePool-r12.h"
//-------------------------------------------------------------------------------------------//
// Messages for RRC logging
......@@ -166,6 +172,41 @@ typedef struct RrcConfigurationReq_s {
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
long ue_TransmissionMode[MAX_NUM_CCs];
//TTN - for D2D
//SIB18
e_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
e_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
e_SL_CP_Len_r12 rxPool_data_CP_Len[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long rxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//SIB19
SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
long discRxPool_numRetx[MAX_NUM_CCs];
long discRxPool_numRepetition[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
} RrcConfigurationReq;
// UE: NAS -> RRC messages
......
......@@ -438,6 +438,37 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
int32_t ue_TimersAndConstants_n311 = 0;
int32_t ue_TransmissionMode = 0;
//TTN - for D2D
//SIB18
const char* rxPool_sc_CP_Len = NULL;
const char* rxPool_sc_Period = NULL;
const char* rxPool_data_CP_Len = NULL;
libconfig_int rxPool_ResourceConfig_prb_Num = 0;
libconfig_int rxPool_ResourceConfig_prb_Start = 0;
libconfig_int rxPool_ResourceConfig_prb_End = 0;
const char* rxPool_ResourceConfig_offsetIndicator_present = NULL;
libconfig_int rxPool_ResourceConfig_offsetIndicator_choice = 0;
const char* rxPool_ResourceConfig_subframeBitmap_present = NULL;
const char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
//SIB19
const char* discRxPool_cp_Len = NULL;
const char* discRxPool_discPeriod = NULL;
libconfig_int discRxPool_numRetx = 0;
libconfig_int discRxPool_numRepetition = 0;
libconfig_int discRxPool_ResourceConfig_prb_Num = 0;
libconfig_int discRxPool_ResourceConfig_prb_Start = 0;
libconfig_int discRxPool_ResourceConfig_prb_End = 0;
const char* discRxPool_ResourceConfig_offsetIndicator_present = NULL;
libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice = 0;
const char* discRxPool_ResourceConfig_subframeBitmap_present = NULL;
const char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
int32_t srb1_timer_poll_retransmit = 0;
int32_t srb1_timer_reordering = 0;
......@@ -1717,6 +1748,187 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
RC.config_file_name, i, ue_TransmissionMode);
break;
}
//TTN - for D2D
//SIB18
if (strcmp(rxPool_sc_CP_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(rxPool_sc_CP_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n",
RC.config_file_name, i, rxPool_sc_CP_Len);
if (strcmp(rxPool_sc_Period,"sf40")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf40;
} else if (strcmp(rxPool_sc_Period,"sf60")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf60;
} else if (strcmp(rxPool_sc_Period,"sf70")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf70;
} else if (strcmp(rxPool_sc_Period,"sf80")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf80;
} else if (strcmp(rxPool_sc_Period,"sf120")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf120;
} else if (strcmp(rxPool_sc_Period,"sf140")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf140;
} else if (strcmp(rxPool_sc_Period,"sf160")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf160;
} else if (strcmp(rxPool_sc_Period,"sf240")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf240;
} else if (strcmp(rxPool_sc_Period,"sf280")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf280;
} else if (strcmp(rxPool_sc_Period,"sf320")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf320;
} else if (strcmp(rxPool_sc_Period,"spare6")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare6;
} else if (strcmp(rxPool_sc_Period,"spare5")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare5;
} else if (strcmp(rxPool_sc_Period,"spare4")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare4;
} else if (strcmp(rxPool_sc_Period,"spare3")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare3;
} else if (strcmp(rxPool_sc_Period,"spare2")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare2;
} else if (strcmp(rxPool_sc_Period,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n",
RC.config_file_name, i, rxPool_sc_Period);
if (strcmp(rxPool_data_CP_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(rxPool_data_CP_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n",
RC.config_file_name, i, rxPool_data_CP_Len);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[j] = rxPool_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[j] = rxPool_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[j] = rxPool_ResourceConfig_prb_End;
if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
RC.config_file_name, i, rxPool_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[j] = rxPool_ResourceConfig_offsetIndicator_choice;
if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
RC.config_file_name, i, rxPool_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19
if (strcmp(discRxPool_cp_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(discRxPool_cp_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n",
RC.config_file_name, i, discRxPool_cp_Len);
if (strcmp(discRxPool_discPeriod,"rf32")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32;
} else if (strcmp(discRxPool_discPeriod,"rf64")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64;
} else if (strcmp(discRxPool_discPeriod,"rf128")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128;
} else if (strcmp(discRxPool_discPeriod,"rf256")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256;
} else if (strcmp(discRxPool_discPeriod,"rf512")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512;
} else if (strcmp(discRxPool_discPeriod,"rf1024")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
} else if (strcmp(discRxPool_discPeriod,"rf16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
} else if (strcmp(discRxPool_discPeriod,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
RC.config_file_name, i, discRxPool_discPeriod);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[j] = discRxPool_numRetx;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[j] = discRxPool_numRepetition;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[j] = discRxPool_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[j] = discRxPool_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[j] = discRxPool_ResourceConfig_prb_End;
if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
RC.config_file_name, i, discRxPool_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[j] = discRxPool_ResourceConfig_offsetIndicator_choice;
if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
RC.config_file_name, i, discRxPool_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
}
}
char srb1path[MAX_OPTNAME_SIZE*2 + 8];
......
......@@ -371,6 +371,37 @@ static int DEFENBS[] = {0};
#define ENB_CONFIG_STRING_UETIMERS_N310 "ue_TimersAndConstants_n310"
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
//TTN - for D2D
//SIB18
#define ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN "rxPool_sc_CP_Len"
#define ENB_CONFIG_STRING_RXPOOL_SC_PRIOD "rxPool_sc_Period"
#define ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN "rxPool_data_CP_Len"
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_NUM "rxPool_ResourceConfig_prb_Num"
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_START "rxPool_ResourceConfig_prb_Start"
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_END "rxPool_ResourceConfig_prb_End"
#define ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_PRESENT "rxPool_ResourceConfig_offsetIndicator_present"
#define ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_CHOICE "rxPool_ResourceConfig_offsetIndicator_choice"
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_PRESENT "rxPool_ResourceConfig_subframeBitmap_present"
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_BUF "rxPool_ResourceConfig_subframeBitmap_choice_bs_buf"
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE "rxPool_ResourceConfig_subframeBitmap_choice_bs_size"
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
//SIB19
#define ENB_CONFIG_STRING_DISCRXPOOL_CP_LEN "discRxPool_cp_Len"
#define ENB_CONFIG_STRING_DISCRXPOOL_DISCPERIOD "discRxPool_discPeriod"
#define ENB_CONFIG_STRING_DISCRXPOOL_NUMRETX "discRxPool_numRetx"
#define ENB_CONFIG_STRING_DISCRXPOOL_NUMREPETITION "discRxPool_numRepetition"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_NUM "discRxPool_ResourceConfig_prb_Num"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_START "discRxPool_ResourceConfig_prb_Start"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_END "discRxPool_ResourceConfig_prb_End"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_PRESENT "discRxPool_ResourceConfig_offsetIndicator_present"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_CHOICE "discRxPool_ResourceConfig_offsetIndicator_choice"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_PRESENT "discRxPool_ResourceConfig_subframeBitmap_present"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_BUF "discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE "discRxPool_ResourceConfig_subframeBitmap_choice_bs_size"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* component carriers configuration parameters */
......@@ -444,7 +475,32 @@ static int DEFENBS[] = {0};
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0} \
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN, NULL, 0, strptr:&rxPool_sc_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_SC_PRIOD, NULL, 0, strptr:&rxPool_sc_Period, defstrval:"sf40", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN, NULL, 0, strptr:&rxPool_data_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_NUM, NULL, 0, iptr:&rxPool_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_START, NULL, 0, iptr:&rxPool_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_END, NULL, 0, iptr:&rxPool_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, strptr:&rxPool_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, iptr:&rxPool_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, strptr:&rxPool_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:&rxPool_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:&rxPool_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED, NULL, 0, iptr:&rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_CP_LEN, NULL, 0, strptr:&discRxPool_cp_Len, defstrval:"normal", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_DISCPERIOD, NULL, 0, strptr:&discRxPool_discPeriod, defstrval:"rf32", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_NUMRETX, NULL, 0, iptr:&discRxPool_numRetx, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_NUMREPETITION, NULL, 0, iptr:&discRxPool_numRepetition, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_NUM, NULL, 0, iptr:&discRxPool_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_START, NULL, 0, iptr:&discRxPool_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_END, NULL, 0, iptr:&discRxPool_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, strptr:&discRxPool_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, iptr:&discRxPool_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, strptr:&discRxPool_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:&discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:&discRxPool_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:&discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0} \
}
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
......
......@@ -264,6 +264,7 @@ void config_sib1(int Mod_idP,
}
int power_off_dB[6] = {78,118,140,170,188,200};
void config_sib2(int Mod_idP,
......@@ -414,6 +415,10 @@ void config_sib2(int Mod_idP,
}
void config_dedicated(int Mod_idP,
int CC_idP,
uint16_t rnti,
......@@ -672,6 +677,45 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
return(0);
}
// P: New function supporting the MAC interface
void config_sib1_ue()
{
}
// P: New function supporting the MAC interface
void config_sib2_ue()
{
}
// P: New function supporting the MAC interface
void config_meas_ue()
{
}
// P: New function supporting the MAC interface
// to substitute call to phy_config_afterHO_ue().
void config_afterHO_ue()
{
}
// P: New function supporting the MAC interface
void config_sib13_ue()
{
}
// P: New function supporting the MAC interface
void config_dedicated_ue()
{
}
int
rrc_mac_config_req_ue(
module_id_t Mod_idP,
......@@ -1022,6 +1066,9 @@ rrc_mac_config_req_ue(
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
// Panos: Call to the phy_config_request_ue() function of the interface to copy the UE_PHY_Config_t interface
// configuration to the PHY common and dedicated configuration originating from RRC.
return(0);
}
......@@ -235,6 +235,33 @@ typedef struct {
uint8_t R:2;
} __attribute__((__packed__))SCH_SUBHEADER_FIXED;
// Panos:
/*!\brief MAC subheader long with 24bit DST field */
typedef struct {
uint8_t V:4; //Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint32_t SRC:24; //Prose UE source ID. Size 24 bits.
uint32_t DST:24; //Prose UE destination ID. Size 16 or 24 bits.
uint8_t LCID:5;
uint8_t L:7; // Length field indicating the size of the corresponding SDU in byes. Not sure about the size of this field (7).
uint8_t F:1;
uint8_t E:1;
uint8_t R:1;
}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST;
/*!\brief MAC subheader long with 16bit DST field */
typedef struct {
uint8_t V:4; //Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint32_t SRC:24; //Prose UE source ID. Size 24 bits.
uint32_t DST:16; //Prose UE destination ID. Size 16 or 24 bits.
uint8_t LCID:5;
uint8_t L:7; // Length field indicating the size of the corresponding SDU in byes. Not sure about the size of this field (7).
uint8_t F:1;
uint8_t E:1;
uint8_t R:1;
}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST;
/*!\brief mac control element: short buffer status report for a specific logical channel group ID*/
typedef struct {
uint8_t Buffer_size:6; // octet 1 LSB
......@@ -250,6 +277,30 @@ typedef struct {
uint8_t Buffer_size0:6;
} __attribute__((__packed__))BSR_LONG;
// Panos:
/*!\brief mac control element: sidelink buffer status report */
typedef struct {
uint8_t DST_1:4;
uint8_t LCGID_1: 2;
uint8_t Buffer_size_1:6;
uint8_t DST_2:4;
uint8_t LCGID_2: 2;
uint8_t Buffer_size_2:6;
}__attribute__((__packed__))SL_BSR;
/*!\brief mac control element: truncated sidelink buffer status report */
typedef struct {
uint8_t DST:4;
uint8_t LCGID: 2;
uint8_t Buffer_size:6;
uint8_t R1:1;
uint8_t R2:1;
uint8_t R3:1;
uint8_t R4:1;
}__attribute__((__packed__))SL_BSR_Truncated;
#define BSR_LONG_SIZE (sizeof(BSR_LONG))
/*!\brief mac control element: timing advance */
typedef struct {
......@@ -1228,6 +1279,17 @@ typedef struct {
MeasGapConfig_t *measGapConfig;
/// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
/// Panos: Pointer to IF_Module_UE instance of the UE
IF_Module_UE_t *if_inst_ue;
/// Panos: UE_MAC interface: Config request structure.
UE_PHY_Config_t UE_config;
/// Panos: UE_MAC interface: UL Config Request Structure
UE_MAC_ul_config_request_t UL_req_ue[MAX_NUM_CCs];
/// Panos: UE_MAC interface: UL Transmission request structure.
UE_MAC_tx_request_t UL_TX_req[MAX_NUM_CCs];
/// Scheduling Information
UE_SCHEDULING_INFO scheduling_info;
/// Outgoing CCCH pdu for PHY
......@@ -1319,7 +1381,9 @@ typedef struct {
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t rx_si;
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t rx_p;
time_stats_t rx_p;
/// Panos: Mutex for nfapi UL_INFO
pthread_mutex_t UL_INFO_mutex;
} UE_MAC_INST;
/*! \brief ID of the neighboring cells used for HO*/
typedef struct {
......
......@@ -1804,6 +1804,8 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid
stop_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
#endif
// Panos: Tx_request should be filled from the ulsch_buffer here.
if (opt_enabled) {
trace_pdu(0, ulsch_buffer, buflen, module_idP, 3, UE_mac_inst[module_idP].crnti, UE_mac_inst[module_idP].txFrame, UE_mac_inst[module_idP].txSubframe, 0, 0);
LOG_D(OPT,"[UE %d][ULSCH] Frame %d subframe %d trace pdu for rnti %x with size %d\n",
......
#include "openair1/PHY/defs.h"
#include "openair2/PHY_INTERFACE/IF_Module_UE.h"
#include "openair2/PHY_INTERFACE/UE_MAC_interface.h"
#include "openair1/PHY/extern.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
#include "common/ran_context.h"
IF_Module_UE_t *if_inst_ue;
void handle_bch(UE_DL_IND_t *UE_DL_INFO)
{
}
void handle_dlsch(UE_DL_IND_t *UE_DL_INFO)
{
int i;
UE_MAC_dlsch_indication_pdu_t *dlsch_pdu_ind;
for (i=0; i<UE_DL_INFO->UE_DLSCH_ind.number_of_pdus; i++)
{
dlsch_pdu_ind = UE_DL_INFO->UE_DLSCH_ind.dlsch_ind_list[i];
switch (dlsch_pdu_ind->pdu_type) {
case UE_MAC_DL_IND_PDSCH_PDU_TYPE:
// Call ue_send_sdu()
break;
case UE_MAC_DL_IND_SI_PDSCH_PDU_TYPE:
// Call ue_decode_si()
break;
case UE_MAC_DL_IND_P_PDSCH_PDU_TYPE:
// Call ue_decode_p()
break;
case UE_MAC_DL_IND_DLSCH_RAR_PDU_TYPE:
// Call ue_process_rar()
break;
}
}
}
void UE_DL_indication(UE_DL_IND_t *UE_DL_INFO)
{
/*Call handle functions to forward PDUs or control indications to the upper layers.
handle_bch(UE_DL_INFO);
handle_dlsch (UE_DL_INFO);
Trigger ue_scheduler() ?
*/
}
/* Indicate the Txon of Msg1 or Msg3 to the MAC layer of the transmitter side and trigger associated
* MAC layer operations */
void UE_Tx_indication(UE_Tx_IND_t *UE_Tx_INFO)
{
switch (UE_Tx_INFO->ind_type) {
case UE_MAC_Tx_IND_Msg1_TYPE:
//Call Msg1_transmitted()
break;
case UE_MAC_Tx_IND_Msg3_TYPE:
//Call Msg3_transmitted()
break;
}
}
/// Panos: Not sure about the implementation of this function.
IF_Module_UE_t *IF_Module_ue_init(int Mod_id){
AssertFatal(Mod_id<MAX_MODULES,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
if (if_inst_ue[Mod_id]==NULL) {
if_inst_ue[Mod_id] = (IF_Module_t*)malloc(sizeof(IF_Module_t));
memset((void*)if_inst_ue[Mod_id],0,sizeof(IF_Module_t));
//if_inst_ue[Mod_id]->CC_mask=0;
if_inst_ue[Mod_id]->UE_DL_indication = UE_DL_indication;
if_inst_ue[Mod_id]->UE_Tx_indication = UE_Tx_indication;
// Panos: Have to check about this.
/*AssertFatal(pthread_mutex_init(&if_inst_ue[Mod_id]->if_mutex,NULL)==0,
"allocation of if_inst[%d]->if_mutex fails\n",Mod_id);*/
}
return if_inst[Mod_id];
}
/*This is the interface module between PHY
*Provided the FAPI style interface structures for P7.
*
*
*
*//*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file openair2/PHY_INTERFACE/IF_Module.h
* \brief data structures for PHY/MAC interface modules
* \author EURECOM/NTUST
* \date 2017
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr
* \note
* \warning
*/
#ifndef __IF_MODULE_UE__H__
#define __IF_MODULE_UE__H__
#include <stdint.h>
#include "openair1/PHY/LTE_TRANSPORT/defs.h"
#include "UE_MAC_interface.h"
#define MAX_NUM_DL_PDU 100
#define MAX_NUM_UL_PDU 100
#define MAX_NUM_HI_DCI0_PDU 100
#define MAX_NUM_TX_REQUEST_PDU 100
#define MAX_NUM_HARQ_IND 100
#define MAX_NUM_CRC_IND 100
#define MAX_NUM_SR_IND 100
#define MAX_NUM_CQI_IND 100
#define MAX_NUM_RACH_IND 100
#define MAX_NUM_SRS_IND 100
typedef struct{
/// Module ID
module_id_t module_id;
/// CC ID
int CC_id;
// / frame
frame_t frame;
/// subframe
sub_frame_t subframe;
/// harq ACKs indication list
//UE_MAC_hi_indication_body_t UE_hi_ind;
/// crc indication list
//UE_MAC_crc_indication_body_t UE_crc_ind;
/// RX BCH indication
UE_MAC_BCH_indication_body_t UE_BCH_ind;
/// RX DLSCH indication
UE_MAC_DLSCH_indication_body_t UE_DLSCH_ind;
} UE_DL_IND_t;
typedef struct{
/// Module ID
module_id_t module_id;
/// CC ID
int CC_id;
/// frame
frame_t frame;
/// subframe
sub_frame_t subframe;
/// Txon Indication type (Msg1 or Msg3)
uint8_t ind_type;
}UE_Tx_IND_t;
typedef struct{
/// Module ID
module_id_t module_id;
/// CC ID
int CC_id;
/// frame
frame_t frame;
/// subframe
sub_frame_t subframe;
/// Sidelink Control Information indication
ue_sci_indication_body_t UE_SCI_ind;
/// RX SLSCH indication
ue_SLSCH_indication_body_t UE_SLSCH_ind;
/// RX SLDCH indication
ue_SLDCH_indication_body_t UE_SLDCH_ind;
/// RX SLBCH indication
ue_SLBCH_indication_body_t UE_SLBCH_ind;
} UE_SL_IND_t;
// Downlink subframe P7
typedef struct{
/// Module ID
module_id_t module_id;
/// CC ID
uint8_t CC_id;
/// frame
frame_t frame;
/// subframe
sub_frame_t subframe;
/// UE_Mode to be filled only after
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_eNB_MAX];
/// MAC IFace UL Config Request
UE_MAC_ul_config_request_t *UE_UL_req;
/// MAC IFace SL Transmission Config Request
UE_MAC_sl_config_request_Tx_t *SL_Tx_req;
/// MAC IFace SL Reception Config Request
UE_MAC_sl_config_request_Rx_t *SL_Rx_req;
/// Pointers to UL SDUs
UE_MAC_tx_request_t *UE_TX_req;
/// Pointers to SL SDUs
UE_MAC_sl_tx_request_t *TX_SL_req;
}UE_Sched_Rsp_t;
typedef struct {
uint8_t Mod_id;
int CC_id;
UE_PHY_config_common_request_t *cfg_common;
UE_PHY_config_dedicated_request_t *cfg_dedicated;
}UE_PHY_Config_t;
typedef struct IF_Module_UE_s{
//define the function pointer
void (*UE_DL_indication)(UE_DL_IND_t *UE_DL_INFO);
void (*UE_SL_indication)(UE_SL_IND_t *UE_SL_INFO);
void (*UE_Tx_indication)(UE_Tx_IND_t *UE_Tx_INFO);
void (*UE_sched_response)(UE_Sched_Rsp_t *UE_Sched_INFO);
void (*UE_config_req)(UE_PHY_Config_t* UE_config_INFO);
//P: Perhaps an additional separate function for dedicated PHY configuration is needed.
//uint32_t CC_mask_ue;
uint16_t current_frame;
uint8_t current_subframe;
pthread_mutex_t if_mutex;
}IF_Module_UE_t;
IF_Module_UE_t *IF_Module_UE_init(int Mod_id);
void IF_Module_UE_kill(int Mod_id);
void UE_DL_indication(UE_DL_IND_t *UE_DL_INFO);
void UE_Tx_indication(UE_Tx_IND_t *UE_Tx_INFO);
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
void UE_schedule_response(UE_Sched_Rsp_t *UE_Sched_INFO);
#endif
/*This is the interface module between PHY
*Provided the FAPI style interface structures for P7.
*
*
*
*//*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file openair2/PHY_INTERFACE/IF_Module.h
* \brief data structures for PHY/MAC interface modules
* \author EURECOM/NTUST
* \date 2017
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr
* \note
* \warning
*/
#ifndef __UE_MAC_INTERFACE__H__
#define __UE_MAC_INTERFACE__H__
#include "nfapi_interface.h"
#include "openair1/PHY/impl_defs_lte.h"
#include "targets/COMMON/openairinterface5g_limits.h"
#define MAX_NUM_DL_PDU 100
#define MAX_NUM_UL_PDU 100
#define MAX_NUM_HI_DCI0_PDU 100
#define MAX_NUM_TX_REQUEST_PDU 100
#define MAX_NUM_HARQ_IND 100
#define MAX_NUM_CRC_IND 100
#define MAX_NUM_SR_IND 100
#define MAX_NUM_CQI_IND 100
#define MAX_NUM_RACH_IND 100
#define MAX_NUM_SRS_IND 100
// UE_MAC enums
typedef enum {
UE_MAC_DL_IND_PDSCH_PDU_TYPE =0,
UE_MAC_DL_IND_SI_PDSCH_PDU_TYPE,
UE_MAC_DL_IND_P_PDSCH_PDU_TYPE,
UE_MAC_DL_IND_DLSCH_RAR_PDU_TYPE
} UE_MAC_dl_ind_pdu_type_e;
// UE_MAC enums
typedef enum {
UE_MAC_Tx_IND_Msg1_TYPE =0,
UE_MAC_Tx_IND_Msg3_TYPE
} UE_MAC_Tx_ind_type_e;
// *** UE_UL_Config.request related structures
typedef struct{
//module_id_t module_idP;
//int CC_id;
//frame_t frameP;
uint8_t eNB_id;
//uint16_t rnti;
//sub_frame_t subframe_tx;
uint32_t SR_payload; //0 or 1
}UE_MAC_ul_config_SR;
typedef struct{
//module_id_t module_idP;
//int CC_id;
//frame_t frameP;
uint8_t eNB_indexP;
//sub_frame_t subframeP;
uint8_t ra_RACH_MaskIndex;
int8_t ra_PREAMBLE_RECEIVED_TARGET_POWER;
uint8_t ra_TDD_map_index;
uint16_t ra_RNTI;
uint8_t *Msg3;
}UE_MAC_ul_config_rach;
typedef struct {
union {
UE_MAC_ul_config_rach ue_rach_config;
//UE_MAC_ul_config_ULSCH ue_ULSCH_pdu;
UE_MAC_ul_config_SR ue_SR_config;
};
} UE_MAC_ul_config_request_list;
typedef struct {
nfapi_tl_t tl;
uint16_t length_list;
UE_MAC_ul_config_request_list* ue_ul_config_list;
} UE_MAC_ul_config_request_body_t;
typedef struct {
//nfapi_p7_message_header_t header;
uint16_t sfn_sf;
UE_MAC_ul_config_request_body_t ue_ul_config_request_body; //nfapi_dl_config_request_body_t
} UE_MAC_ul_config_request_t;
// *** UE_Tx.request related structures
typedef struct {
uint16_t pdu_length;
uint16_t pdu_index;
uint8_t num_segments;
struct {
uint32_t segment_length;
uint8_t* segment_data;
} segments[NFAPI_TX_MAX_SEGMENTS];
} UE_MAC_tx_request_pdu_t;
typedef struct {
nfapi_tl_t tl;
uint16_t number_of_pdus;
UE_MAC_tx_request_pdu_t* ue_tx_pdu_list;
} UE_MAC_tx_request_body_t;
typedef struct {
//nfapi_p7_message_header_t header;
uint16_t sfn_sf;
UE_MAC_tx_request_body_t ue_tx_request_body;
} UE_MAC_tx_request_t;
typedef struct{
}UE_MAC_sl_config_request_Tx_t;
typedef struct{
}UE_MAC_sl_config_request_Rx_t;
typedef struct{
}UE_MAC_sl_tx_request_t;
// *** UE_DL.indication related structures
typedef struct{
unsigned char eNB_index;
uint8_t first_sync; //boolean 0 or 1
uint8_t sync; // boolean 0 or 1 to indicate whether rrc_out_of_sync_ind() or dl_phy_sync_success()
// should be called from the handler function of the interface respectively.
}UE_MAC_bch_indication_pdu_t;
typedef struct{
nfapi_tl_t tl;
UE_MAC_bch_indication_pdu_t* bch_ind_list;
}UE_MAC_BCH_indication_body_t;
// Panos: Corresponding to inputs of MAC functions: ue_send_sdu(), ue_decode_si(), ue_decode_p().
typedef struct{
uint8_t* data;
uint16_t data_len;
}UE_MAC_dlsch_pdu;
// Panos: Corresponding to inputs of MAC function: process_rar().
typedef struct{
rnti_t ra_rnti;
uint8_t* rar_input_buffer; // Originating from PHY
rnti_t* t_crnti;
uint8_t preamble_index;
uint8_t* rar_output_buffer; //should be returned to PHY: dlsch0->harq_processes[0]->b
}UE_MAC_dlsch_rar_pdu;
typedef struct{
uint8_t pdu_type;
uint8_t eNB_index;
union{
UE_MAC_dlsch_pdu dlsch_pdu_ind;
UE_MAC_dlsch_rar_pdu dlsch_rar_pdu_ind;
};
}UE_MAC_dlsch_indication_pdu_t;
typedef struct{
nfapi_tl_t tl;
uint16_t number_of_pdus;
UE_MAC_dlsch_indication_pdu_t* dlsch_ind_list;
}UE_MAC_DLSCH_indication_body_t;
// *** UE_SL.indication related structures
typedef struct{
}ue_sci_indication_body_t;
typedef struct{
}ue_SLSCH_indication_body_t;
typedef struct{
}ue_SLDCH_indication_body_t;
typedef struct{
}ue_SLBCH_indication_body_t;
// *** UE_Config_common.request related structures
typedef struct {
uint8_t subframeAssignment;
uint8_t specialSubframePatterns;
}UE_PHY_tdd_frame_structure_t;
typedef struct {
uint16_t rootSequenceIndex;
uint8_t prach_Config_enabled;
uint8_t prach_ConfigIndex;
uint8_t highSpeedFlag;
uint8_t zeroCorrelationZoneConfig;
uint8_t prach_FreqOffset;
}UE_PHY_prach_config_t;
typedef struct {
uint8_t deltaPUCCH_Shift;
uint8_t nRB_CQI;
uint8_t nCS_AN;
uint16_t n1PUCCH_AN;
}UE_PHY_pucch_config_t;
typedef struct {
int8_t referenceSignalPower;
uint8_t p_b;
}UE_PHY_pdsch_config_t;
typedef struct {
uint8_t n_SB;
PUSCH_HOPPING_t hoppingMode;
uint8_t pusch_HoppingOffset;
uint8_t enable64QAM;
uint8_t groupHoppingEnabled;
uint8_t groupAssignmentPUSCH;
uint8_t sequenceHoppingEnabled;
uint8_t cyclicShift;
}UE_PHY_pusch_config_t;
typedef struct{
uint8_t enabled_flag;
uint8_t srs_BandwidthConfig;
uint8_t srs_SubframeConfig;
uint8_t ackNackSRS_SimultaneousTransmission;
uint8_t srs_MaxUpPts;
}UE_PHY_SRS_config_t;
typedef struct{
int8_t p0_NominalPUSCH;
PUSCH_alpha_t alpha;
int8_t p0_NominalPUCCH;
int8_t deltaPreambleMsg3;
long deltaF_PUCCH_Format1;
long deltaF_PUCCH_Format1b;
long deltaF_PUCCH_Format2;
long deltaF_PUCCH_Format2a;
long deltaF_PUCCH_Format2b;
}UE_PHY_UL_power_control_config_t;
typedef struct{
uint8_t maxHARQ_Msg3Tx;
}UE_PHY_HARQ_Msg3_config_t;
typedef struct{
uint8_t nb_antennas_tx;
}UE_PHY_antenna_config_t;
typedef struct{
PHICH_RESOURCE_t phich_resource;
PHICH_DURATION_t phich_duration;
}UE_PHY_phich_config_t;
typedef struct {
UE_PHY_tdd_frame_structure_t ue_tdd_frame_structure_config;
UE_PHY_prach_config_t ue_prach_config;
UE_PHY_pucch_config_t ue_pucch_config;
UE_PHY_pdsch_config_t ue_pdsch_config;
UE_PHY_pusch_config_t ue_pusch_config;
UE_PHY_SRS_config_t ue_srs_config;
UE_PHY_UL_power_control_config_t ue_ul_pow_cntl_config;
UE_PHY_HARQ_Msg3_config_t ue_harq_msg3_config;
/* Where can we find the types and values of the configuration for the PCH?
UE_MAC_pusch_config_t ue_pch_config
radioResourceConfigCommon->pcch_Config.defaultPagingCycle, radioResourceConfigCommon->pcch_Config.nB*/
UE_PHY_antenna_config_t ue_ant_config;
UE_PHY_phich_config_t ue_phich_config;
/* MBSFN?*/
}UE_PHY_config_common_request_t;
// *** UE_Config_dedicated. request related structures
typedef struct{
PA_t p_a;
}UE_PHY_pdsch_config_dedicated_t;
typedef struct{
uint8_t ackNackRepetition;
ANFBmode_t tdd_AckNackFeedbackMode;
//ACKNAKREP_t repetitionFactor;
//uint16_t n1PUCCH_AN_Rep;
}UE_PHY_pucch_config_dedicated_t;
typedef struct{
uint16_t betaOffset_ACK_Index;
uint16_t betaOffset_RI_Index;
uint16_t betaOffset_CQI_Index;
}UE_PHY_pusch_config_dedicated_t;
typedef struct{
int8_t p0_UE_PUSCH;
uint8_t deltaMCS_Enabled;
uint8_t accumulationEnabled;
int8_t p0_UE_PUCCH;
int8_t pSRS_Offset;
uint8_t filterCoefficient;
}UE_PHY_ul_power_control_config_dedicated_t;
typedef struct{
uint16_t sr_PUCCH_ResourceIndex;
uint8_t sr_ConfigIndex;
DSR_TRANSMAX_t dsr_TransMax;
}UE_PHY_SR_config_dedicated_t;
typedef struct{
uint8_t srsConfigDedicatedSetup;
uint8_t duration;
uint8_t cyclicShift;
uint8_t freqDomainPosition;
uint8_t srs_Bandwidth;
uint16_t srs_ConfigIndex;
uint8_t srs_HoppingBandwidth;
uint8_t transmissionComb;
//uint8_t srsCellSubframe;
//uint8_t srsUeSubframe;
}UE_PHY_srs_ul_config_dedicated_t;
typedef struct{
CQI_REPORTMODEAPERIODIC cqi_ReportModeAperiodic;
CQI_REPORTPERIODIC CQI_ReportPeriodic;
//int8_t nomPDSCH_RS_EPRE_Offset;
}UE_PHY_cqi_report_config_dedicated_t;
typedef struct{
uint8_t transmission_mode [NUMBER_OF_CONNECTED_eNB_MAX];
UE_PHY_pdsch_config_dedicated_t ue_pdsch_config;
UE_PHY_pucch_config_dedicated_t ue_pucch_config;
UE_PHY_pusch_config_dedicated_t ue_pusch_config;
UE_PHY_ul_power_control_config_dedicated_t ue_ul_pow_cntrl_config;
UE_PHY_SR_config_dedicated_t ue_SR_config;
UE_PHY_srs_ul_config_dedicated_t ue_srs_ul_config;
UE_PHY_cqi_report_config_dedicated_t ue_cqi_report_config;
}UE_PHY_config_dedicated_request_t;
#endif
/*
typedef struct {
nfapi_p4_p5_message_header_t header;
uint8_t num_tlv;
nfapi_subframe_config_t subframe_config;
nfapi_rf_config_t rf_config;
nfapi_phich_config_t phich_config;
nfapi_sch_config_t sch_config;
nfapi_prach_config_t prach_config;
nfapi_pusch_config_t pusch_config;
nfapi_pucch_config_t pucch_config;
nfapi_srs_config_t srs_config;
nfapi_uplink_reference_signal_config_t uplink_reference_signal_config;
nfapi_laa_config_t laa_config;
nfapi_emtc_config_t emtc_config;
nfapi_tdd_frame_structure_t tdd_frame_structure_config;
nfapi_l23_config_t l23_config;
nfapi_nb_iot_config_t nb_iot_config;
// addition nfapi tlvs as per table 2-16 in idle or configure
nfapi_nfapi_t nfapi_config;
nfapi_vendor_extension_tlv_t vendor_extension;
} nfapi_config_request_t;
typedef struct {
nfapi_tl_t tl;
uint8_t dci_format;
uint8_t cce_index;
uint8_t aggregation_level;
uint16_t rnti;
uint8_t resource_block_start;
uint8_t number_of_resource_block;
uint8_t mcs_1;
uint8_t cyclic_shift_2_for_drms;
uint8_t frequency_hopping_enabled_flag;
uint8_t frequency_hopping_bits;
uint8_t new_data_indication_1;
uint8_t ue_tx_antenna_seleciton;
uint8_t tpc;
uint8_t cqi_csi_request;
uint8_t ul_index;
uint8_t dl_assignment_index;
uint32_t tpc_bitmap;
uint16_t transmission_power;
} nfapi_hi_dci0_dci_pdu_rel8_t;
*/
//#include "openair1/PHY/defs.h"
//#include "openair2/PHY_INTERFACE/IF_Module.h"
//#include "openair1/PHY/extern.h"
#include "LAYER2/MAC/extern.h"
//#include "LAYER2/MAC/proto.h"
#include "openair2/LAYER2/MAC/vars.h"
//#include "common/ran_context.h"
#include "openair2/PHY_INTERFACE/phy_stub_UE.h"
void handle_nfapi_UE_Rx(uint8_t Mod_id, Sched_Rsp_t *Sched_INFO, int eNB_id){
// copy data from eNB L2 interface to UE L2 interface
int CC_id = Sched_INFO->CC_id;
nfapi_dl_config_request_t *DL_req = Sched_INFO->DL_req;
nfapi_tx_request_t *Tx_req = Sched_INFO->TX_req;
frame_t frame = Sched_INFO->frame;
sub_frame_t subframe = Sched_INFO->subframe;
uint8_t number_dl_pdu = DL_req->dl_config_request_body.number_pdu;
nfapi_dl_config_request_pdu_t *dl_config_pdu;
nfapi_dl_config_request_pdu_t *dl_config_pdu_tmp;
int i = 0;
for (i=0; i<number_dl_pdu; i++)
{
dl_config_pdu = &DL_req->dl_config_request_body.dl_config_pdu_list[i];
switch (dl_config_pdu->pdu_type) {
case NFAPI_DL_CONFIG_BCH_PDU_TYPE:
// BCH case
// Last parameter is 1 if first time synchronization and zero otherwise. Not sure which value to put
// for our case.
dl_phy_sync_success(Mod_id,frame,eNB_id, 0);
break;
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
if (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type == 1) {
// C-RNTI (Normal DLSCH case)
dl_config_pdu_tmp = &DL_req->dl_config_request_body.dl_config_pdu_list[i+1];
if (dl_config_pdu_tmp->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE){
ue_send_sdu(Mod_id, CC_id, frame, subframe,
Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data,
Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_length,
eNB_id);
i++;
}
else {
LOG_E(MAC,"[UE %d] CCid %d Frame %d, subframe %d : Cannot extract DLSCH PDU from NFAPI\n",Mod_id, CC_id,frame,subframe);
}
}
else if (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type == 2) {
dl_config_pdu_tmp = &DL_req->dl_config_request_body.dl_config_pdu_list[i+1];
if(dl_config_pdu_tmp->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE && dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == 0xFFFF){
//pdu = Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data;
// Question about eNB_index here. How do we obtain it?
ue_decode_si(Mod_id, CC_id, frame, eNB_id,
Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data,
Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_length);
i++;
}
else if(dl_config_pdu_tmp->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE && dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == 0xFFFE){
// P_RNTI case
//pdu = Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data;
// Question about eNB_index here. How do we obtain it?
ue_decode_p(Mod_id, CC_id, frame, eNB_id,
Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data,
Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_length);
i++;
}
else if(dl_config_pdu_tmp->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE) {
// RA-RNTI case
// ue_process_rar should be called but the problem is that this function currently uses PHY_VARS_UE
// elements.
// C-RNTI parameter not actually used. Provided only to comply with existing function definition.
// Not sure about parameters to fill the preamble index. Originally it comes from PHY.
const rnti_t c_rnti;
ue_process_rar(Mod_id, CC_id, frame,
dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.rnti, //RA-RNTI
Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data,
c_rnti,
UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex,
Tx_req->tx_request_body.tx_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data);
}
else {
LOG_E(MAC,"[UE %d] CCid %d Frame %d, subframe %d : Cannot extract DLSCH PDU from NFAPI\n",Mod_id, CC_id,frame,subframe);
}
}
break;
}
}
}
void fill_rx_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t *ulsch_buffer, uint16_t buflen)
{
nfapi_rx_indication_pdu_t *pdu;
int timing_advance_update;
//int sync_pos;
/*uint32_t harq_pid = subframe2harq_pid(&eNB->frame_parms,
frame,subframe);*/
pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
//eNB->UL_INFO.rx_ind.sfn_sf = frame<<4| subframe;
//eNB->UL_INFO.rx_ind.rx_indication_body.tl.tag = NFAPI_RX_INDICATION_BODY_TAG;
pdu = &UL_INFO->rx_ind.rx_pdu_list[UL_INFO->rx_ind.number_of_pdus];
// pdu->rx_ue_information.handle = eNB->ulsch[UE_id]->handle;
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
pdu->rx_ue_information.rnti = UE_mac_inst[Mod_id].crnti;
pdu->rx_indication_rel8.tl.tag = NFAPI_RX_INDICATION_REL8_TAG;
//pdu->rx_indication_rel8.length = eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS>>3;
pdu->rx_indication_rel8.length = buflen;
pdu->rx_indication_rel8.offset = 1; // DJP - I dont understand - but broken unless 1 ???? 0; // filled in at the end of the UL_INFO formation
pdu->data = ulsch_buffer;
// estimate timing advance for MAC
//sync_pos = lte_est_timing_advance_pusch(eNB,UE_id);
timing_advance_update = 0; //Panos: Don't know what to put here
pdu->rx_indication_rel8.timing_advance = timing_advance_update;
// if (timing_advance_update > 10) { dump_ulsch(eNB,frame,subframe,UE_id); exit(-1);}
// if (timing_advance_update < -10) { dump_ulsch(eNB,frame,subframe,UE_id); exit(-1);}
/*switch (eNB->frame_parms.N_RB_DL) {
case 6:
pdu->rx_indication_rel8.timing_advance = timing_advance_update;
break;
case 15:
pdu->rx_indication_rel8.timing_advance = timing_advance_update/2;
break;
case 25:
pdu->rx_indication_rel8.timing_advance = timing_advance_update/4;
break;
case 50:
pdu->rx_indication_rel8.timing_advance = timing_advance_update/8;
break;
case 75:
pdu->rx_indication_rel8.timing_advance = timing_advance_update/12;
break;
case 100:
pdu->rx_indication_rel8.timing_advance = timing_advance_update/16;
break;
}
// put timing advance command in 0..63 range
timing_advance_update += 31;
if (timing_advance_update < 0) timing_advance_update = 0;
if (timing_advance_update > 63) timing_advance_update = 63;
pdu->rx_indication_rel8.timing_advance = timing_advance_update;*/
// estimate UL_CQI for MAC (from antenna port 0 only)
// Panos dependency from eNB not sure how to substitute this. Should we hardcode it?
//int SNRtimes10 = dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_power[0]) - 200;//(10*eNB->measurements.n0_power_dB[0]);
int SNRtimes10 = 640;
if (SNRtimes10 < -640) pdu->rx_indication_rel8.ul_cqi=0;
else if (SNRtimes10 > 635) pdu->rx_indication_rel8.ul_cqi=255;
else pdu->rx_indication_rel8.ul_cqi=(640+SNRtimes10)/5;
/*LOG_D(PHY,"[PUSCH %d] Filling RX_indication with SNR %d (%d), timing_advance %d (update %d)\n",
harq_pid,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,pdu->rx_indication_rel8.timing_advance,
timing_advance_update);*/
UL_INFO->rx_ind.number_of_pdus++;
pthread_mutex_unlock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
}
void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO) {
pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
nfapi_sr_indication_pdu_t *pdu = &UL_INFO->sr_ind.sr_pdu_list[UL_INFO->rx_ind.number_of_pdus];
pdu->instance_length = 0; // don't know what to do with this
// pdu->rx_ue_information.handle = handle;
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
pdu->rx_ue_information.rnti = UE_mac_inst[Mod_id].crnti;; //Panos: Is this the right RNTI?
// Panos dependency from PHY not sure how to substitute this. Should we hardcode it?
//int SNRtimes10 = dB_fixed_times10(stat) - 200;//(10*eNB->measurements.n0_power_dB[0]);
int SNRtimes10 = 640;
if (SNRtimes10 < -640) pdu->ul_cqi_information.ul_cqi=0;
else if (SNRtimes10 > 635) pdu->ul_cqi_information.ul_cqi=255;
else pdu->ul_cqi_information.ul_cqi=(640+SNRtimes10)/5;
pdu->ul_cqi_information.channel = 0;
UL_INFO->rx_ind.number_of_pdus++;
pthread_mutex_unlock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
}
void fill_crc_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t crc_flag) {
pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
nfapi_crc_indication_pdu_t *pdu = &UL_INFO->crc_ind.crc_pdu_list[UL_INFO->crc_ind.number_of_crcs];
//eNB->UL_INFO.crc_ind.sfn_sf = frame<<4 | subframe;
//eNB->UL_INFO.crc_ind.crc_indication_body.tl.tag = NFAPI_CRC_INDICATION_BODY_TAG;
pdu->instance_length = 0; // don't know what to do with this
// pdu->rx_ue_information.handle = handle;
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
pdu->rx_ue_information.rnti = UE_mac_inst[Mod_id].crnti;
pdu->crc_indication_rel8.tl.tag = NFAPI_CRC_INDICATION_REL8_TAG;
pdu->crc_indication_rel8.crc_flag = crc_flag;
UL_INFO->crc_ind.number_of_crcs++;
LOG_D(PHY, "%s() rnti:%04x pdus:%d\n", __FUNCTION__, pdu->rx_ue_information.rnti, UL_INFO->crc_ind.number_of_crcs);
pthread_mutex_unlock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
}
/*
* phy_stub_UE.h
*
* Created on: Sep 14, 2017
* Author: montre
*/
#ifndef __PHY_STUB_UE__H__
#define __PHY_STUB_UE__H__
#include <stdint.h>
#include "openair2/PHY_INTERFACE/IF_Module.h"
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
//#include "openair1/PHY/defs.h"
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
// Panos: This function should return all the sched_response config messages which concern a specific UE. Inside this
// function we should somehow make the translation of config message's rnti to Mod_ID.
Sched_Rsp_t get_nfapi_sched_response(uint8_t Mod_id);
// This function will be processing DL_config and Tx.requests and trigger all the MAC Rx related calls at the UE side,
// namely:ue_send_sdu(), or ue_decode_si(), or ue_decode_p(), or ue_process_rar() based on the rnti type.
void handle_nfapi_UE_Rx(uint8_t Mod_id, Sched_Rsp_t *Sched_INFO, int eNB_id);
// This function will be processing UL and HI_DCI0 config requests to trigger all the MAC Tx related calls
// at the UE side, namely: ue_get_SR(), ue_get_rach(), ue_get_sdu() based on the pdu configuration type.
// The output of these calls will be put to an UL_IND_t structure which will then be the input to
// send_nfapi_UL_indications().
UL_IND_t generate_nfapi_UL_indications(Sched_Rsp_t sched_response);
// This function should pass the UL indication messages to the eNB side through the socket interface.
void send_nfapi_UL_indications(UL_IND_t UL_INFO);
// This function should be filling the nfapi ULSCH indications at the MAC level of the UE in a similar manner
// as fill_rx_indication() does. It should get called from ue_get_SDU()
void fill_rx_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t *ulsch_buffer, uint16_t buflen);
// This function should be indicating directly to the eNB when there is a planned scheduling request at the MAC layer
// of the UE. It should get called from ue_get_SR()
void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO);
// In our case the this function will be always indicating ACK to the MAC of the eNB (i.e. always assuming)
// successful decoding.
void fill_crc_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t crc_flag);
#endif /* PHY_STUB_UE_H_ */
This diff is collapsed.
......@@ -495,6 +495,11 @@ typedef struct {
MBSFNAreaConfiguration_r9_t *mcch_message;
SRB_INFO MCCH_MESS[8];// MAX_MBSFN_AREA
#endif
//TTN - SIB 18,19,21 for D2D
SystemInformationBlockType18_r12_t *sib18;
SystemInformationBlockType19_r12_t *sib19;
SystemInformationBlockType21_r14_t *sib21;
// End - TTN
SRB_INFO SI;
SRB_INFO Srb0;
} rrc_eNB_carrier_data_t;
......@@ -584,6 +589,9 @@ typedef struct UE_RRC_INST_s {
SystemInformationBlockType9_t *sib9[NB_CNX_UE];
SystemInformationBlockType10_t *sib10[NB_CNX_UE];
SystemInformationBlockType11_t *sib11[NB_CNX_UE];
//TTN - SIB18
SystemInformationBlockType18_r12_t *sib18[NB_CNX_UE];
SystemInformationBlockType19_r12_t *sib19[NB_CNX_UE];
#if defined(Rel10) || defined(Rel14)
uint8_t MBMS_flag;
......
......@@ -3520,6 +3520,39 @@ static void dump_sib13( SystemInformationBlockType13_r9_t *sib13 )
}
#endif
//TTN - SIB18
//-----------------------------------------------------------------------------
static void dump_sib18(SystemInformationBlockType18_r12_t *sib18){
LOG_I( RRC, "[UE] Dumping SIB18\n" );
for (int i = 0; i < sib18->commConfig_r12->commRxPool_r12.list.count; i++) {
LOG_I(RRC, " Contents of SIB18 %d/%d \n", i+1, sib18->commConfig_r12->commRxPool_r12.list.count);
LOG_I(RRC, " SIB18 rxPool_sc_CP_Len: %d \n", sib18->commConfig_r12->commRxPool_r12.list.array[i]->sc_CP_Len_r12);
LOG_I(RRC, " SIB18 sc_Period_r12: %d \n", sib18->commConfig_r12->commRxPool_r12.list.array[i]->sc_Period_r12);
LOG_I(RRC, " SIB18 data_CP_Len_r12: %d \n", sib18->commConfig_r12->commRxPool_r12.list.array[i]->data_CP_Len_r12);
LOG_I(RRC, " SIB18 prb_Num_r12: %d \n", sib18->commConfig_r12->commRxPool_r12.list.array[i]->sc_TF_ResourceConfig_r12.prb_Num_r12);
LOG_I(RRC, " SIB18 prb_Start_r12: %d \n", sib18->commConfig_r12->commRxPool_r12.list.array[i]->sc_TF_ResourceConfig_r12.prb_Start_r12);
LOG_I(RRC, " SIB18 prb_End_r12: %d \n", sib18->commConfig_r12->commRxPool_r12.list.array[i]->sc_TF_ResourceConfig_r12.prb_End_r12);
//to add more log
}
}
//TTN - SIB19
//-----------------------------------------------------------------------------
static void dump_sib19(SystemInformationBlockType19_r12_t *sib19){
LOG_I( RRC, "[UE] Dumping SIB19\n" );
for (int i = 0; i < sib19->discConfig_r12->discRxPool_r12.list.count; i++) {
LOG_I(RRC, " Contents of SIB18 %d/%d \n", i+1, sib19->discConfig_r12->discRxPool_r12.list.count);
LOG_I(RRC, " SIB19 cp_Len_r12: %d \n", sib19->discConfig_r12->discRxPool_r12.list.array[i]->cp_Len_r12);
LOG_I(RRC, " SIB19 discPeriod_r12: %d \n", sib19->discConfig_r12->discRxPool_r12.list.array[i]->discPeriod_r12);
LOG_I(RRC, " SIB19 numRetx_r12: %d \n", sib19->discConfig_r12->discRxPool_r12.list.array[i]->numRetx_r12);
LOG_I(RRC, " SIB19 numRepetition_r12: %d \n", sib19->discConfig_r12->discRxPool_r12.list.array[i]->numRepetition_r12);
LOG_I(RRC, " SIB19 prb_Num_r12: %d \n", sib19->discConfig_r12->discRxPool_r12.list.array[i]->tf_ResourceConfig_r12.prb_Num_r12);
LOG_I(RRC, " SIB19 prb_Start_r12: %d \n", sib19->discConfig_r12->discRxPool_r12.list.array[i]->tf_ResourceConfig_r12.prb_Start_r12);
LOG_I(RRC, " SIB19 prb_End_r12: %d \n", sib19->discConfig_r12->discRxPool_r12.list.array[i]->tf_ResourceConfig_r12.prb_End_r12);
//to add more log
}
}
//-----------------------------------------------------------------------------
static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index )
{
......@@ -3531,7 +3564,10 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_IN );
// Dump contents
if ((*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_systemInformation_r8) {
//TTN - should be modified since we use SystemInformation__criticalExtensions_PR_criticalExtensionsFuture
// instead of SystemInformation__criticalExtensions_PR_systemInformation_r8
//if ((*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_systemInformation_r8) {
if ((*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_criticalExtensionsFuture) {
LOG_D( RRC, "[UE] (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count %d\n",
(*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count );
} else {
......@@ -3767,6 +3803,42 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
break;
}
#endif
//TTN - SIB18
case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&8192) == 0) {
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=8192;
new_sib=1;
memcpy( UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index], &typeandinfo->choice.sib18_v1250, sizeof(SystemInformationBlockType18_r12_t) );
LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB18 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
dump_sib18( UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index] );
// adding here function to store necessary parameters to transfer to PHY layer
LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB18 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
//should modify function rrc_mac_config_req_ue() to transfer SL-related parameters to PHY
//rrc_mac_config_req_ue();
}
break;
//TTN - SIB19
case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib19_v1250:
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&16384) == 0) {
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=16384;
new_sib=1;
memcpy( UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index], &typeandinfo->choice.sib19_v1250, sizeof(SystemInformationBlockType19_r12_t) );
LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB19 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
dump_sib19( UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index] );
// adding here function to store necessary parameters to transfer to PHY layer
LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB19 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
//should modify function rrc_mac_config_req_ue() to transfer SL-related parameters to PHY
//rrc_mac_config_req_ue();
}
break;
default:
break;
}
......
......@@ -222,7 +222,77 @@ init_SI(
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
ul_ReferenceSignalsPUSCH.cyclicShift);
//TTN - SIB 18
for (int j = 0; j < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.count; j++) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB18 %d/%d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
j+1,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.count);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 rxPool_sc_CP_Len: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_CP_Len_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 sc_Period_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_Period_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 data_CP_Len_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.array[j]->data_CP_Len_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 prb_Num_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_Num_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 prb_Start_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_Start_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 prb_End_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_End_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 offsetIndicator: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 subframeBitmap_choice_bs_buf: %s \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf);
}
//TTN - SIB 19
for (int j = 0; j < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.count; j++) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB19 %d/%d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
j+1,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.count);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 cp_Len_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->cp_Len_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 discPeriod_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->discPeriod_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 numRetx_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->numRetx_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 numRepetition_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->numRepetition_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 prb_Num_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_Num_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 prb_Start_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_Start_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 prb_End_r12: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_End_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 offsetIndicator: %d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 subframeBitmap_choice_bs_buf: %s \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf);
}
#if defined(Rel10) || defined(Rel14)
if (RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MBMS_flag > 0) {
......