Merge remote-tracking branch 'origin/develop' into RU-RAU-split

Conflicts:
	openair1/PHY/INIT/lte_init.c
	openair1/PHY/LTE_ESTIMATION/defs.h
	openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
	openair1/PHY/LTE_TRANSPORT/dci.c
	openair1/PHY/LTE_TRANSPORT/dci_tools.c
	openair1/PHY/LTE_TRANSPORT/defs.h
	openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
	openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
	openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
	openair1/PHY/LTE_TRANSPORT/if5_tools.c
	openair1/PHY/LTE_TRANSPORT/phich.c
	openair1/PHY/LTE_TRANSPORT/proto.h
	openair1/PHY/defs.h
	openair1/SCHED/phy_procedures_lte_eNb.c
	openair1/SCHED/phy_procedures_lte_ue.c
	openair1/SCHED/pusch_pc.c
	openair2/ENB_APP/enb_config.c
	openair2/LAYER2/MAC/defs.h
	openair2/LAYER2/MAC/eNB_scheduler.c
	openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
	openair2/LAYER2/MAC/eNB_scheduler_primitives.c
	openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
	openair2/LAYER2/MAC/pre_processor.c
	openair2/LAYER2/MAC/ue_procedures.c
	targets/RT/USER/lte-enb.c
	targets/RT/USER/lte-softmodem.c
	targets/RT/USER/lte-softmodem.h
	targets/RT/USER/lte-ue.c
	targets/SIMU/USER/init_lte.c
	targets/SIMU/USER/oaisim_functions.c
This commit is contained in:
Raymond Knopp
2017-09-26 21:43:03 -07:00
133 changed files with 10012 additions and 4048 deletions
@@ -1,4 +1,4 @@
//'syntax = "proto2";'
syntax = "proto2";
package protocol;
//
@@ -1,4 +1,4 @@
//'syntax = "proto2";'
syntax = "proto2";
package protocol;
import "config_common.proto";
@@ -1,4 +1,4 @@
//'syntax = "proto2";'
syntax = "proto2";
package protocol;
enum flex_control_delegation_type {
@@ -1,3 +1,4 @@
syntax = "proto2";
package protocol;
import "mac_primitives.proto";
+2 -2
View File
@@ -1,4 +1,4 @@
//'syntax = "proto2";'
syntax = "proto2";
package protocol;
import "stats_messages.proto";
@@ -40,7 +40,7 @@ enum flexran_direction {
}
enum flexran_err {
option allow_alias = true;
//option allow_alias = true;
// message errors
NO_ERR = 0;
MSG_DEQUEUING = -1;
@@ -1,3 +1,4 @@
syntax = "proto2";
package protocol;
message flex_header {
@@ -1,3 +1,4 @@
syntax = "proto2";
package protocol;
//
@@ -1,3 +1,4 @@
syntax = "proto2";
package protocol;
//
@@ -1,3 +1,4 @@
syntax = "proto2";
package protocol;
//import "header.proto";
@@ -1,3 +1,4 @@
syntax = "proto2";
package protocol;
enum flex_harq_status {
+4 -60
View File
@@ -637,20 +637,11 @@ void Eurecom_RCconfig_macrlc() {
int Eurecom_RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
config_t cfg;
config_setting_t *setting = NULL;
config_setting_t *subsetting = NULL;
config_setting_t *setting_component_carriers = NULL;
config_setting_t *component_carrier = NULL;
config_setting_t *setting_srb1 = NULL;
config_setting_t *setting_mme_addresses = NULL;
config_setting_t *setting_mme_address = NULL;
config_setting_t *setting_ru = NULL;
config_setting_t *setting_enb = NULL;
config_setting_t *setting_otg = NULL;
config_setting_t *subsetting_otg = NULL;
int parse_errors = 0;
config_setting_t *setting_enb = NULL;
int num_enbs = 0;
int num_mme_address = 0;
int num_otg_elements = 0;
int num_component_carriers = 0;
int j = 0;
libconfig_int enb_id = 0;
@@ -683,10 +674,6 @@ int Eurecom_RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
libconfig_int Nid_cell_mbsfn = 0;
libconfig_int N_RB_DL = 0;
libconfig_int nb_antenna_ports = 0;
libconfig_int nb_antennas_tx = 0;
libconfig_int nb_antennas_rx = 0;
libconfig_int tx_gain = 0;
libconfig_int rx_gain = 0;
libconfig_int prach_root = 0;
libconfig_int prach_config_index = 0;
const char* prach_high_speed = NULL;
@@ -760,38 +747,8 @@ int Eurecom_RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
const char* active_enb[MAX_ENB];
char* enb_interface_name_for_S1U = NULL;
char* enb_ipv4_address_for_S1U = NULL;
libconfig_int enb_port_for_S1U = 0;
char* enb_interface_name_for_S1_MME = NULL;
char* enb_ipv4_address_for_S1_MME = NULL;
char *address = NULL;
char *cidr = NULL;
char *astring = NULL;
char* flexran_agent_interface_name = NULL;
char* flexran_agent_ipv4_address = NULL;
libconfig_int flexran_agent_port = 0;
char* flexran_agent_cache = NULL;
libconfig_int otg_ue_id = 0;
char* otg_app_type = NULL;
char* otg_bg_traffic = NULL;
char* glog_level = NULL;
char* glog_verbosity = NULL;
char* hw_log_level = NULL;
char* hw_log_verbosity = NULL;
char* phy_log_level = NULL;
char* phy_log_verbosity = NULL;
char* mac_log_level = NULL;
char* mac_log_verbosity = NULL;
char* rlc_log_level = NULL;
char* rlc_log_verbosity = NULL;
char* pdcp_log_level = NULL;
char* pdcp_log_verbosity = NULL;
char* rrc_log_level = NULL;
char* rrc_log_verbosity = NULL;
char* udp_log_verbosity = NULL;
char* osa_log_level = NULL;
char* osa_log_verbosity = NULL;
// for no gcc warnings
(void)astring;
@@ -886,6 +843,7 @@ int Eurecom_RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
if (strcmp(tr_s_preference, "local_mac") == 0) {
}
else if (strcmp(tr_s_preference, "cudu") == 0) {
if ( !(config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_LOCAL_S_IF_NAME, (const char **)&if_name_s)
@@ -2429,7 +2387,6 @@ int Eurecom_RCconfig_gtpu() {
config_setting_t *subsetting = NULL;
config_setting_t *setting_enb = NULL;
int num_enbs = 0;
libconfig_int enb_id = 0;
@@ -2513,16 +2470,10 @@ int Eurecom_RCconfig_S1(MessageDef *msg_p, uint32_t i) {
config_setting_t *setting_mme_addresses = NULL;
config_setting_t *setting_mme_address = NULL;
config_setting_t *setting_enb = NULL;
config_setting_t *setting_otg = NULL;
config_setting_t *subsetting_otg = NULL;
int parse_errors = 0;
int num_enbs = 0;
int num_mme_address = 0;
int num_otg_elements = 0;
int num_component_carriers = 0;
int j = 0;
libconfig_int enb_id = 0;
int num_enbs = 0;
const char* cell_type = NULL;
const char* tac = 0;
@@ -2533,17 +2484,10 @@ int Eurecom_RCconfig_S1(MessageDef *msg_p, uint32_t i) {
libconfig_int my_int;
char* if_name = NULL;
char* ipv4 = NULL;
char* ipv4_remote = NULL;
char* ipv6 = NULL;
char* local_rf = NULL;
char* preference = NULL;
char* active = NULL;
char* tr_preference = NULL;
libconfig_int local_port = 0;
libconfig_int remote_port = 0;
const char* active_enb[MAX_ENB];
char* enb_interface_name_for_S1U = NULL;
char* enb_ipv4_address_for_S1U = NULL;
+3
View File
@@ -223,6 +223,7 @@ void schedule_SR(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
int CC_id,UE_id;
SchedulingRequestConfig_t *SRconfig;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) {
@@ -522,10 +523,12 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
// Allocate CCEs for good after scheduling is done
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) allocate_CCEs(module_idP,CC_id,subframeP,0);
stop_meas(&RC.mac[module_idP]->eNB_scheduler);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT);
}
+21 -1
View File
@@ -423,6 +423,7 @@ schedule_ue_spec(
//------------------------------------------------------------------------------
{
uint8_t CC_id;
int UE_id;
unsigned char aggregation;
@@ -501,6 +502,7 @@ schedule_ue_spec(
}
}
//weight = get_ue_weight(module_idP,UE_id);
aggregation = 2;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
@@ -534,7 +536,6 @@ schedule_ue_spec(
stop_meas(&eNB->schedule_dlsch_preprocessor);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,VCD_FUNCTION_OUT);
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n",CC_id);
@@ -607,6 +608,21 @@ schedule_ue_spec(
continue;
}
#warning RK->CR This old API call has to be revisited for FAPI, or logic must be changed
#if 0
/* add "fake" DCI to have CCE_allocation_infeasible work properly for next allocations */
/* if we don't add it, next allocations may succeed but overall allocations may fail */
/* will be removed at the end of this function */
add_ue_spec_dci(&eNB->common_channels[CC_id].DCI_pdu,
&(char[]){0},
rnti,
1,
aggregation,
1,
format1,
0);
#endif
nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id];
if (cc->tdd_Config) harq_pid = ((frameP*10)+subframeP)%10;
@@ -670,6 +686,7 @@ schedule_ue_spec(
while((nb_rb_temp > 0) && (j<N_RBG[CC_id])) {
if(ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) {
if (UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j]) printf("WARN: rballoc_subband not free for retrans?\n");
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
if((j == N_RBG[CC_id]-1) &&
@@ -771,6 +788,7 @@ schedule_ue_spec(
}
}
add_ue_dlsch_info(module_idP,
CC_id,
UE_id,
@@ -1282,6 +1300,7 @@ schedule_ue_spec(
} // UE_id loop
} // CC_id loop
fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_flag);
@@ -1424,6 +1443,7 @@ void update_ul_dci(module_id_t module_idP,
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_idP];
int i;
if (cc->tdd_Config != NULL) { // TDD
for (i=0; i<HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_dci; i++) {
+11 -3
View File
@@ -56,6 +56,8 @@
# include "intertask_interface.h"
#endif
#include "T.h"
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
@@ -2077,8 +2079,6 @@ void swap_UEs(UE_list_t *listP,int nodeiP, int nodejP, int ul_flag)
#endif
*/
// This has to be updated to include BSR information
uint8_t UE_is_to_be_scheduled(module_id_t module_idP,int CC_id,uint8_t UE_id)
{
@@ -2512,7 +2512,8 @@ int get_nCCE_offset(int *CCE_table,
search_space_free = 1;
for (l=0; l<L; l++) {
if (CCE_table[(((Yk+m)%(nCCE/L))*L) + l] == 1) {
int cce = (((Yk+m)%(nCCE/L))*L) + l;
if (cce >= nCCE || CCE_table[cce] == 1) {
search_space_free = 0;
break;
}
@@ -2713,6 +2714,7 @@ int allocate_CCEs(int module_idP,
int i,j,idci;
int nCCE=0;
LOG_D(MAC,"Allocate CCEs subframe %d, test %d : (DL PDU %d, DL DCI %d, UL %d)\n",subframeP,test_onlyP,DL_req->number_pdu,DL_req->number_dci,HI_DCI0_req->number_of_dci);
DL_req->number_pdcch_ofdm_symbols=1;
@@ -2720,6 +2722,7 @@ try_again:
init_CCE_table(module_idP,CC_idP);
nCCE=0;
for (i=0,idci=0;i<DL_req->number_pdu;i++) {
// allocate DL common DCIs first
if ((dl_config_pdu[i].pdu_type == NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE)&&
@@ -2899,6 +2902,7 @@ try_again:
return 0;
failed:
return -1;
}
@@ -2988,6 +2992,7 @@ nfapi_ul_config_request_pdu_t* has_ul_grant(module_id_t module_idP,int CC_idP,ui
}
boolean_t CCE_allocation_infeasible(int module_idP,
int CC_idP,
int format_flag,
int subframe,
@@ -3002,6 +3007,7 @@ boolean_t CCE_allocation_infeasible(int module_idP,
int ret;
boolean_t res=FALSE;
if (format_flag!=2) { // DL DCI
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = aggregation;
@@ -3021,6 +3027,7 @@ boolean_t CCE_allocation_infeasible(int module_idP,
HI_DCI0_req->number_of_dci--;
}
return(res);
}
void extract_harq(module_id_t mod_idP,int CC_idP,int UE_id,frame_t frameP,sub_frame_t subframeP,void *harq_indication,int format) {
@@ -3588,6 +3595,7 @@ void cqi_indication(module_id_t mod_idP, int CC_idP, frame_t frameP, sub_frame_t
void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, sub_frame_t subframeP, rnti_t rntiP, uint8_t ul_cqi)
{
T(T_ENB_MAC_SCHEDULING_REQUEST, T_INT(mod_idP), T_INT(cc_idP), T_INT(frameP), T_INT(subframeP), T_INT(rntiP));
int UE_id = find_UE_id(mod_idP, rntiP);
UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list;
+9 -1
View File
@@ -812,7 +812,6 @@ void schedule_ulsch(module_id_t module_idP,
schedule_ulsch_rnti(module_idP, frameP, subframeP, sched_subframe,first_rb);
stop_meas(&eNB->schedule_ulsch);
}
@@ -946,6 +945,13 @@ abort();
continue; // break;
}
/* be sure that there are some free RBs */
if (first_rb[CC_id] >= N_RB_UL-1) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id);
continue;
}
// if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
@@ -1036,6 +1042,7 @@ abort();
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2=UE_template->mcs_UL[harq_pid];
// buffer_occupancy = UE_template->ul_total_buffer;
while (((rb_table[rb_table_index]>(N_RB_UL-1-first_rb[CC_id])) ||
(rb_table[rb_table_index]>45)) &&
@@ -1148,6 +1155,7 @@ abort();
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n", module_idP,CC_id,frameP,subframeP,UE_id);
// increment first rb for next UE allocation
first_rb[CC_id]+=rb_table[rb_table_index];
+69 -38
View File
@@ -606,7 +606,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
}
// hypotetical assignement
// hypothetical assignment
/*
* If schedule is enabled and if the priority of the UEs is modified
* The average rbs per logical channel per user will depend on the level of
@@ -640,9 +640,12 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
for (ii=0; ii<UE_num_active_CC(UE_list,i); ii++) {
CC_id = UE_list->ordered_CCids[ii][i];
ue_sched_ctl = &UE_list->UE_sched_ctrl[i];
round = ue_sched_ctl->round[CC_id][harq_pid];
// control channel
if (mac_eNB_get_rrc_status(Mod_id,rnti) < RRC_RECONFIGURED) {
// control channel or retransmission
/* TODO: do we have to check for retransmission? */
if (mac_eNB_get_rrc_status(Mod_id,rnti) < RRC_RECONFIGURED || round > 0) {
nb_rbs_required_remaining_1[CC_id][i] = nb_rbs_required[CC_id][i];
} else {
nb_rbs_required_remaining_1[CC_id][i] = cmin(average_rbs_per_user[CC_id],nb_rbs_required[CC_id][i]);
@@ -664,6 +667,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
nb_rbs_required_remaining[CC_id][i] = nb_rbs_required_remaining_1[CC_id][i];
} else { // rb required based only on the buffer - rb allloctaed in the 1st round + extra reaming rb form the 1st round
nb_rbs_required_remaining[CC_id][i] = nb_rbs_required[CC_id][i]-nb_rbs_required_remaining_1[CC_id][i]+nb_rbs_required_remaining[CC_id][i];
if (nb_rbs_required_remaining[CC_id][i]<0) abort();
}
if (nb_rbs_required[CC_id][i]> 0 )
@@ -863,7 +867,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
}
}
#define SF05_LIMIT 1
#define SF0_LIMIT 1
void dlsch_scheduler_pre_processor_reset (int module_idP,
int UE_id,
@@ -881,12 +885,12 @@ void dlsch_scheduler_pre_processor_reset (int module_idP,
UE_list_t *UE_list=&RC.mac[module_idP]->UE_list;
UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
rnti_t rnti = UE_RNTI(module_idP,UE_id);
uint8_t *vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map;
int N_RB_DL = to_prb(RC.mac[module_idP]->common_channels[CC_id].mib->message.dl_Bandwidth);
int RBGsize = N_RB_DL/N_RBG;
#ifdef SF05_LIMIT
//int subframe05_limit=0;
int sf05_upper=-1,sf05_lower=-1;
int RBGsize = N_RB_DL/N_RBG,RBGsize_last;
#ifdef SF0_LIMIT
int sf0_upper=-1,sf0_lower=-1;
#endif
@@ -955,45 +959,61 @@ void dlsch_scheduler_pre_processor_reset (int module_idP,
ue_sched_ctl->pre_nb_available_rbs[CC_id] = 0;
ue_sched_ctl->dl_pow_off[CC_id] = 2;
nb_rbs_required_remaining[CC_id][UE_id] = 0;
#ifdef SF05_LIMIT
switch (N_RB_DL) {
case 6: RBGsize = 1; RBGsize_last = 1; break;
case 15: RBGsize = 2; RBGsize_last = 1; break;
case 25: RBGsize = 2; RBGsize_last = 1; break;
case 50: RBGsize = 3; RBGsize_last = 2; break;
case 75: RBGsize = 4; RBGsize_last = 3; break;
case 100: RBGsize = 4; RBGsize_last = 4; break;
default: AssertFatal(1==0,"unsupported RBs (%d)\n", N_RB_DL);
}
#ifdef SF0_LIMIT
switch (N_RBG) {
case 6:
sf05_lower=0;
sf05_upper=5;
sf0_lower=0;
sf0_upper=5;
break;
case 8:
sf05_lower=2;
sf05_upper=5;
sf0_lower=2;
sf0_upper=5;
break;
case 13:
sf05_lower=4;
sf05_upper=7;
sf0_lower=4;
sf0_upper=7;
break;
case 17:
sf05_lower=7;
sf05_upper=9;
sf0_lower=7;
sf0_upper=9;
break;
case 25:
sf05_lower=11;
sf05_upper=13;
sf0_lower=11;
sf0_upper=13;
break;
default: AssertFatal(1==0,"unsupported RBs (%d)\n", N_RB_DL);
}
#endif
// Initialize Subbands according to VRB map
for (i=0; i<N_RBG; i++) {
int rb_size = i==N_RBG-1 ? RBGsize_last : RBGsize;
ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 0;
rballoc_sub[CC_id][i] = 0;
#ifdef SF05_LIMIT
// for avoiding 6+ PRBs around DC in subframe 0-5 (avoid excessive errors)
if ((subframeP==0 || subframeP==5) &&
(i>=sf05_lower && i<=sf05_upper))
#ifdef SF0_LIMIT
// for avoiding 6+ PRBs around DC in subframe 0 (avoid excessive errors)
/* TODO: make it proper - allocate those RBs, do not "protect" them, but
* compute number of available REs and limit MCS according to the
* TBS table 36.213 7.1.7.2.1-1 (can be done after pre-processor)
*/
if (subframeP==0 &&
i >= sf0_lower && i <= sf0_upper)
rballoc_sub[CC_id][i]=1;
#endif
// for SI-RNTI,RA-RNTI and P-RNTI allocations
for (j=0;j<RBGsize;j++) {
if (vrb_map[j+(i*RBGsize)]!=0) {
for (j = 0; j < rb_size; j++) {
if (vrb_map[j+(i*RBGsize)] != 0) {
rballoc_sub[CC_id][i] = 1;
LOG_D(MAC,"Frame %d, subframe %d : vrb %d allocated\n",frameP,subframeP,j+(i*RBGsize));
break;
@@ -1033,14 +1053,16 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
if (ue_sched_ctl->dl_pow_off[CC_id] != 0 ) {
if ((i == N_RBG-1) && ((N_RB_DL == 25) || (N_RB_DL == 50))) {
rballoc_sub[CC_id][i] = 1;
ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 1;
MIMO_mode_indicator[CC_id][i] = 1;
if (transmission_mode == 5 ) {
ue_sched_ctl->dl_pow_off[CC_id] = 1;
}
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit+1;
ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit - 1;
if (nb_rbs_required_remaining[CC_id][UE_id] >= min_rb_unit-1){
rballoc_sub[CC_id][i] = 1;
ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 1;
MIMO_mode_indicator[CC_id][i] = 1;
if (transmission_mode == 5 ) {
ue_sched_ctl->dl_pow_off[CC_id] = 1;
}
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit+1;
ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit - 1;
}
} else {
if (nb_rbs_required_remaining[CC_id][UE_id] >= min_rb_unit){
rballoc_sub[CC_id][i] = 1;
@@ -1056,7 +1078,6 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
} // dl_pow_off[CC_id][UE_id] ! = 0
}
}
}
@@ -1301,7 +1322,10 @@ void assign_max_mcs_min_rb(module_id_t module_idP,int frameP, sub_frame_t subfra
// if this UE has UL traffic
if (UE_template->ul_total_buffer > 0 ) {
tbs = get_TBS_UL(mcs,3)<<3; // 1 or 2 PRB with cqi enabled does not work well!
rb_table_index = 2;
// fixme: set use_srs flag
tx_power= estimate_ue_tx_power(tbs,rb_table[rb_table_index],0,Ncp,0);
@@ -1344,8 +1368,15 @@ void assign_max_mcs_min_rb(module_id_t module_idP,int frameP, sub_frame_t subfra
UE_template->pre_allocated_nb_rb_ul,
UE_template->phr_info,tx_power);
} else {
UE_template->pre_allocated_rb_table_index_ul=-1;
UE_template->pre_allocated_nb_rb_ul=0;
/* if UE has pending scheduling request then pre-allocate 3 RBs */
//if (UE_template->ul_active == 1 && UE_template->ul_SR == 1) {
if (UE_is_to_be_scheduled(module_idP, CC_id, i)) {
UE_template->pre_allocated_rb_table_index_ul = 2;
UE_template->pre_allocated_nb_rb_ul = 3;
} else {
UE_template->pre_allocated_rb_table_index_ul=-1;
UE_template->pre_allocated_nb_rb_ul=0;
}
}
}
}
+48 -8
View File
@@ -341,8 +341,9 @@ ue_send_sdu(
unsigned char rx_lcids[NB_RB_MAX];
unsigned short rx_lengths[NB_RB_MAX];
unsigned char *tx_sdu;
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].rx_dlsch_sdu);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_IN);
LOG_T(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
@@ -500,13 +501,16 @@ ue_send_sdu(
} // end if (payload_ptr != NULL)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_dlsch_sdu);
#endif
}
void ue_decode_si(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_index, void *pdu,uint16_t len)
{
start_meas(&UE_mac_inst[module_idP].rx_si);
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].rx_si);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
LOG_D(MAC,"[UE %d] Frame %d Sending SI to RRC (LCID Id %d,len %d)\n",module_idP,frameP,BCCH,len);
@@ -522,7 +526,9 @@ void ue_decode_si(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_i
eNB_index,
0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_si);
#endif
if (opt_enabled == 1) {
trace_pdu(0,
(uint8_t *)pdu,
@@ -541,8 +547,9 @@ void ue_decode_si(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_i
void ue_decode_p(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_index, void *pdu,uint16_t len)
{
start_meas(&UE_mac_inst[module_idP].rx_p);
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].rx_p);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_PCCH, VCD_FUNCTION_IN);
LOG_D(MAC,"[UE %d] Frame %d Sending Paging message to RRC (LCID Id %d,len %d)\n",module_idP,frameP,PCCH,len);
@@ -558,7 +565,9 @@ void ue_decode_p(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_in
eNB_index,
0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_PCCH, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_p);
#endif
if (opt_enabled == 1) {
trace_pdu(0,
(uint8_t *)pdu,
@@ -632,8 +641,9 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uint
unsigned char num_sdu, i, *payload_ptr;
unsigned char rx_lcids[NB_RB_MAX];
unsigned short rx_lengths[NB_RB_MAX];
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].rx_mch_sdu);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_MCH_SDU, VCD_FUNCTION_IN);
LOG_D(MAC,"[UE %d] Frame %d : process the mch PDU for sync area %d \n",module_idP,frameP, sync_area);
@@ -692,7 +702,9 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uint
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_MCH_SDU, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_mch_sdu);
#endif
}
int8_t ue_get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_area, unsigned char eNB_index)
@@ -717,9 +729,13 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
int mbsfn_period = 0;// 1<<(UE_mac_inst[module_idP].mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
int mcch_period = 0;// 32<<(UE_mac_inst[module_idP].mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
int mch_scheduling_period = -1;
int frame_FDD=1;
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].ue_query_mch);
#endif
if (UE_mac_inst[module_idP].pmch_Config[0]) {
mch_scheduling_period = 8<<(UE_mac_inst[module_idP].pmch_Config[0]->mch_SchedulingPeriod_r9);
@@ -976,8 +992,9 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
}
}
} // end of for
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].ue_query_mch);
#endif
if ( (mcch_flag==1)) { // || (msi_flag==1))
*mcch_active=1;
@@ -1295,9 +1312,13 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
LOG_D(MAC,"[UE %d] MAC PROCESS UL TRANSPORT BLOCK at frame%d subframe %d TBS=%d\n",
module_idP, frameP, subframe, buflen);
AssertFatal(CC_id==0,
"Transmission on secondary CCs is not supported yet\n");
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_IN);
#ifdef CBA
@@ -1779,7 +1800,9 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
#endif
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);
@@ -1823,7 +1846,9 @@ ue_scheduler(
instance_t instance;
int result;
#endif
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_IN);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_NO, UE_mac_inst[module_idP].crnti, txFrameP, txSubframeP,eNB_indexP);
@@ -1883,14 +1908,18 @@ ue_scheduler(
case RRC_ConnSetup_failed:
LOG_E(MAC,"RRCConnectionSetup failed, returning to IDLE state\n");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
return(CONNECTION_LOST);
break;
case RRC_PHY_RESYNCH:
LOG_E(MAC,"RRC Loss of synch, returning PHY_RESYNCH\n");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
return(PHY_RESYNCH);
case RRC_Handover_failed:
@@ -1903,7 +1932,9 @@ ue_scheduler(
case RRC_HO_STARTED:
LOG_I(MAC,"RRC handover, Instruct PHY to start the contention-free PRACH and synchronization\n");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
return(PHY_HO_PRACH);
default:
@@ -1920,8 +1951,13 @@ ue_scheduler(
} else {
LOG_E(MAC,"FATAL: radioResourceConfigCommon is NULL!!!\n");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_OUT);
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
AssertFatal(1==0,"");
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
//return(RRC_OK);
}
@@ -2005,7 +2041,9 @@ ue_scheduler(
UE_mac_inst[module_idP].ul_active=0;
LOG_T(MAC,"[UE %d] Release all SRs \n", module_idP);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
return(CONNECTION_OK);
}
@@ -2053,7 +2091,9 @@ ue_scheduler(
//If the UE has UL resources allocated for new transmission for this TTI here:
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_OUT);
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
return(CONNECTION_OK);
}
@@ -206,23 +206,28 @@ boolean_t rlc_am_nack_pdu (
void rlc_am_ack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP)
const rlc_sn_t snP,
boolean_t free_pdu)
{
mem_block_t* mb_p = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].mem_block;
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
tx_data_pdu_buffer->flags.retransmit = 0;
if ((tx_data_pdu_buffer->flags.ack == 0) && (mb_p != NULL)) {
//if (mb_pP != NULL) {
if (mb_p != NULL) {
if (free_pdu) {
free_mem_block(mb_p, __func__);
tx_data_pdu_buffer->mem_block = NULL;
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[ACK-PDU] ACK PDU SN %05d previous retx_count %d \n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP,
tx_data_pdu_buffer->retx_count);
}
if (tx_data_pdu_buffer->retx_payload_size) {
AssertFatal (tx_data_pdu_buffer->flags.ack == 0,
"RLC AM Rx Status Report sn=%d acked twice but is pending for Retx vtA=%d vtS=%d LcId=%d\n",
snP, rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
rlc_pP->retrans_num_bytes_to_retransmit -= tx_data_pdu_buffer->retx_payload_size;
tx_data_pdu_buffer->retx_payload_size = 0;
tx_data_pdu_buffer->num_holes = 0;
@@ -74,12 +74,14 @@ protected_rlc_am_retransmit(boolean_t rlc_am_nack_pdu (
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] snP Sequence number of the PDU that is acknowledged.
* \param[in] free_pdu Boolean indicating that the PDU can be freed because smaller than new vtA.
* \note Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU.
*/
protected_rlc_am_retransmit(void rlc_am_ack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP);)
const rlc_sn_t snP,
boolean_t free_pdu);)
/*! \fn mem_block_t* rlc_am_retransmit_get_copy (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, rlc_sn_t snP)
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
@@ -318,7 +318,7 @@ rlc_am_receive_process_control_pdu(
{
if (rlc_pP->control_pdu_info.num_nack == 0) {
while (sn_cursor != ack_sn) {
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor);
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE);
sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
}
@@ -330,7 +330,7 @@ rlc_am_receive_process_control_pdu(
prev_nack_sn = 0x3FFF;
while (sn_cursor != nack_sn) {
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor);
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE);
sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
}
@@ -354,7 +354,8 @@ rlc_am_receive_process_control_pdu(
if (sn_cursor != nack_sn) {
rlc_am_ack_pdu(ctxt_pP,
rlc_pP,
sn_cursor);
sn_cursor,
FALSE);
} else {
status = rlc_am_nack_pdu (ctxt_pP,
rlc_pP,
@@ -88,8 +88,8 @@ rlc_am_check_timer_poll_retransmit(
/* Look for the first retransmittable PDU starting from vtS - 1 */
while (sn != sn_end) {
tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[sn % RLC_AM_WINDOW_SIZE];
AssertFatal (tx_data_pdu_buffer_p->mem_block != NULL, "RLC AM Tpoll Retx expiry sn=%d is empty vtA=%d vtS=%d LcId=%d\n",
sn, rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
AssertFatal (tx_data_pdu_buffer_p->mem_block != NULL, "RLC AM Tpoll Retx expiry sn=%d ack=%d is empty vtA=%d vtS=%d LcId=%d\n",
sn, tx_data_pdu_buffer_p->flags.ack,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
if ((tx_data_pdu_buffer_p->flags.ack == 0) && (tx_data_pdu_buffer_p->flags.max_retransmit == 0)) {
tx_data_pdu_buffer_p->flags.retransmit = 1;
tx_data_pdu_buffer_p->retx_payload_size = tx_data_pdu_buffer_p->payload_size;
+1 -1
View File
@@ -1555,7 +1555,7 @@ do_RRCConnectionSetup(
// SchedulingRequestConfig
physicalConfigDedicated2->schedulingRequestConfig->present = SchedulingRequestConfig_PR_setup;
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex = 3;//ue_context_pP->local_uid;
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex = 71 - ue_context_pP->local_uid/10;//ue_context_pP->local_uid;
if (carrier->sib1->tdd_Config == NULL) { // FDD
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 5+(ue_context_pP->local_uid%10); // Isr = 5 (every 10 subframes, offset=2+UE_id mod3)
+31 -11
View File
@@ -45,6 +45,9 @@
#include <stdarg.h>
#include <time.h>
#include <stdint.h>
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@@ -315,16 +318,29 @@ void *log_thread_function(void * list);
# define LOG_N(c, x...) /* */
# define LOG_F(c, x...) /* */
# else /* T_TRACER */
# define LOG_G(c, x...) logIt(c, LOG_EMERG, x)
# define LOG_A(c, x...) logIt(c, LOG_ALERT, x)
# define LOG_C(c, x...) logIt(c, LOG_CRIT, x)
# define LOG_E(c, x...) logIt(c, LOG_ERR, x)
# define LOG_W(c, x...) logIt(c, LOG_WARNING, x)
# define LOG_N(c, x...) logIt(c, LOG_NOTICE, x)
# define LOG_I(c, x...) logIt(c, LOG_INFO, x)
# define LOG_D(c, x...) logIt(c, LOG_DEBUG, x)
# define LOG_F(c, x...) logIt(c, LOG_FILE, x) // log to a file, useful for the MSC chart generation
# define LOG_T(c, x...) logIt(c, LOG_TRACE, x)
# if DISABLE_LOG_X
# define LOG_I(c, x...) /* */
# define LOG_W(c, x...) /* */
# define LOG_E(c, x...) /* */
# define LOG_D(c, x...) /* */
# define LOG_T(c, x...) /* */
# define LOG_G(c, x...) /* */
# define LOG_A(c, x...) /* */
# define LOG_C(c, x...) /* */
# define LOG_N(c, x...) /* */
# define LOG_F(c, x...) /* */
# else /*DISABLE_LOG_X*/
# define LOG_G(c, x...) logIt(c, LOG_EMERG, x)
# define LOG_A(c, x...) logIt(c, LOG_ALERT, x)
# define LOG_C(c, x...) logIt(c, LOG_CRIT, x)
# define LOG_E(c, x...) logIt(c, LOG_ERR, x)
# define LOG_W(c, x...) logIt(c, LOG_WARNING, x)
# define LOG_N(c, x...) logIt(c, LOG_NOTICE, x)
# define LOG_I(c, x...) logIt(c, LOG_INFO, x)
# define LOG_D(c, x...) logIt(c, LOG_DEBUG, x)
# define LOG_F(c, x...) logIt(c, LOG_FILE, x) // log to a file, useful for the MSC chart generation
# define LOG_T(c, x...) logIt(c, LOG_TRACE, x)
# endif /*DISABLE_LOG_X*/
# endif /* T_TRACER */
#else /* USER_MODE */
# define LOG_G(c, x...) printk(x)
@@ -408,7 +424,11 @@ static inline void printMeas(char * txt, Meas *M, int period) {
M->iterations,
M->maxArray[1],M->maxArray[2], M->maxArray[3],M->maxArray[4], M->maxArray[5],
M->maxArray[6],M->maxArray[7], M->maxArray[8],M->maxArray[9],M->maxArray[10]);
LOG_W(PHY,"%s",txt2);
#if DISABLE_LOG_X
printf("%s",txt2);
#else
LOG_W(PHY, "%s",txt2);
#endif
}
}
+9 -9
View File
@@ -185,16 +185,16 @@ const char* eurecomVariablesNames[] = {
"ue0_SFN5",
"ue0_SFN6",
"ue0_SFN7",
"send_if4_symbol",
"recv_if4_symbol",
"send_if5_pkt_id",
"recv_if5_pkt_id",
"ue_pdcp_flush_size",
"ue_pdcp_flush_err",
"ue0_trx_read_ns",
"ue0_trx_write_ns",
"ue0_trx_read_ns_missing",
"ue0_trx_write_ns_missing"
"send_if4_symbol",
"recv_if4_symbol",
"send_if5_pkt_id",
"recv_if5_pkt_id"
"ue0_trx_write_ns_missing",
};
const char* eurecomFunctionsNames[] = {
@@ -398,10 +398,10 @@ const char* eurecomFunctionsNames[] = {
"recv_if5",
"compress_if",
"decompress_if"
"decompress_if",
};
struct vcd_module_s vcd_modules[VCD_SIGNAL_DUMPER_MODULE_END] = {
struct vcd_module_s vcd_modules[] = {
{ "variables", VCD_SIGNAL_DUMPER_VARIABLES_END, eurecomVariablesNames, VCD_WIRE, 64 },
{ "functions", VCD_SIGNAL_DUMPER_FUNCTIONS_END, eurecomFunctionsNames, VCD_WIRE, 1 },
// { "ue_procedures_functions", VCD_SIGNAL_DUMPER_UE_PROCEDURES_FUNCTIONS_END, eurecomUEFunctionsNames, VCD_WIRE, 1 },
@@ -702,7 +702,7 @@ void vcd_signal_dumper_create_header(void)
fprintf(vcd_fd, "$timescale 1 ns $end\n");
/* Initialize each module definition */
for(i = 0; i < VCD_SIGNAL_DUMPER_MODULE_END; i++) {
for(i = 0; i < sizeof(vcd_modules) / sizeof(struct vcd_module_s); i++) {
struct vcd_module_s *module;
module = &vcd_modules[i];
fprintf(vcd_fd, "$scope module %s $end\n", module->name);
@@ -727,7 +727,7 @@ void vcd_signal_dumper_create_header(void)
/* Init variables and functions to 0 */
fprintf(vcd_fd, "$dumpvars\n");
for(i = 0; i < VCD_SIGNAL_DUMPER_MODULE_END; i++) {
for(i = 0; i < sizeof(vcd_modules) / sizeof(struct vcd_module_s); i++) {
struct vcd_module_s *module;
module = &vcd_modules[i];
+2 -6
View File
@@ -167,8 +167,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS,
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS_MISSING,
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS_MISSING,
VCD_SIGNAL_DUMPER_VARIABLES_LAST,
VCD_SIGNAL_DUMPER_VARIABLES_END = VCD_SIGNAL_DUMPER_VARIABLES_LAST,
VCD_SIGNAL_DUMPER_VARIABLES_END
} vcd_signal_dump_variables;
typedef enum {
@@ -377,8 +376,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF,
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF,
VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
VCD_SIGNAL_DUMPER_FUNCTIONS_END
} vcd_signal_dump_functions;
typedef enum {
@@ -387,8 +385,6 @@ typedef enum {
VCD_SIGNAL_DUMPER_MODULE_VARIABLES,
VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS,
// VCD_SIGNAL_DUMPER_MODULE_UE_PROCEDURES_FUNCTIONS,
VCD_SIGNAL_DUMPER_MODULE_LAST,
VCD_SIGNAL_DUMPER_MODULE_END = VCD_SIGNAL_DUMPER_MODULE_LAST,
} vcd_signal_dumper_modules;
typedef enum {