streamline embms parameters and fix MCS selection

This commit is contained in:
Andre Puschmann 2019-07-19 16:09:28 +02:00
parent c4bc151e14
commit e60a4490d2
11 changed files with 43 additions and 34 deletions

View File

@ -142,6 +142,18 @@ enable = false
pusch_max_mcs = 16
nof_ctrl_symbols = 3
#####################################################################
# eMBMS configuration options
#
# enable: Enable MBMS transmission in the eNB
# m1u_multiaddr: Multicast addres the M1-U socket will register to
# m1u_if_addr: Address of the inteferface the M1-U interface will listen for multicast packets.
#
#####################################################################
#enable = false
#m1u_multiaddr = 239.255.0.1
#m1u_if_addr = 127.0.1.201
#####################################################################
# Expert configuration options
#
@ -156,10 +168,7 @@ nof_ctrl_symbols = 3
# link_failure_nof_err: Number of PUSCH failures after which a radio-link failure is triggered.
# a link failure is when SNR<0 and CRC=KO
# max_prach_offset_us: Maximum allowed RACH offset (in us)
# enable_mbsfn: Enable MBMS transmission in the eNB
# m1u_multiaddr: Multicast addres the M1-U socket will register to
# m1u_if_addr: Address of the inteferface the M1-U interface will listen for multicast packets.
# eea_pref_list: Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1).
# eea_pref_list: Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1).
# eia_pref_list: Ordered preference list for the selection of integrity algorithm (EIA) (default: EIA2, EIA1, EIA0).
#
#####################################################################
@ -175,8 +184,5 @@ nof_ctrl_symbols = 3
#link_failure_nof_err = 50
#rrc_inactivity_timer = 60000
#max_prach_offset_us = 30
#enable_mbsfn = false
#m1u_multiaddr = 239.255.0.1
#m1u_if_addr = 127.0.1.201
#eea_pref_list = EEA0, EEA2, EEA1
#eia_pref_list = EIA2, EIA1, EIA0

View File

@ -92,10 +92,7 @@ struct general_args_t {
float metrics_period_secs;
bool metrics_csv_enable;
std::string metrics_csv_filename;
bool enable_mbsfn;
bool print_buffer_state;
std::string m1u_multiaddr;
std::string m1u_if_addr;
std::string eia_pref_list;
std::string eea_pref_list;
};

View File

@ -130,10 +130,10 @@ private:
phy_interface_stack_lte::phy_cfg_mbsfn_t mbsfn;
bool sib13_configured;
bool mcch_configured;
uint8_t mch_table[40];
uint8_t mcch_table[10];
uint8_t mch_table[40] = {};
uint8_t mcch_table[10] = {};
uint32_t mch_period_stop;
uint8_t mch_sf_idx_lut[10];
uint8_t mch_sf_idx_lut[10] = {};
bool is_mch_subframe(srslte_mbsfn_cfg_t* cfg, uint32_t phy_tti);
bool is_mcch_subframe(srslte_mbsfn_cfg_t* cfg, uint32_t phy_tti);

View File

@ -32,10 +32,10 @@ typedef struct {
} pcap_args_t;
typedef struct {
bool enable_mbsfn;
bool enable;
std::string m1u_multiaddr;
std::string m1u_if_addr;
} stack_expert_args_t;
} embms_args_t;
typedef struct {
std::string mac_level;
@ -58,7 +58,7 @@ typedef struct {
s1ap_args_t s1ap;
pcap_args_t pcap;
stack_log_args_t log;
stack_expert_args_t expert;
embms_args_t embms;
} stack_args_t;
struct stack_metrics_t;

View File

@ -194,7 +194,7 @@ int enb::parse_args(const all_args_t& args_)
}
rrc_cfg.inactivity_timeout_ms = args.general.rrc_inactivity_timer;
rrc_cfg.enable_mbsfn = args.general.enable_mbsfn;
rrc_cfg.enable_mbsfn = args.stack.embms.enable;
// Check number of control symbols
if (cell_cfg.nof_prb < 50 && args.stack.mac.sched.nof_ctrl_symbols != 3) {

View File

@ -661,7 +661,7 @@ int enb::parse_sibs(all_args_t* args, rrc_cfg_t* rrc_cfg, phy_cfg_t* phy_config_
}
// Update MBSFN list counter. Only 1 supported
if (not args->general.enable_mbsfn) {
if (not args->stack.embms.enable) {
sib2->mbsfn_sf_cfg_list_present = false;
sib2->mbsfn_sf_cfg_list.resize(0);
} else {

View File

@ -145,13 +145,15 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
("expert.equalizer_mode", bpo::value<string>(&args->phy.equalizer_mode)->default_value("mmse"), "Equalizer mode")
("expert.estimator_fil_w", bpo::value<float>(&args->phy.estimator_fil_w)->default_value(0.1), "Chooses the coefficients for the 3-tap channel estimator centered filter.")
("expert.rrc_inactivity_timer", bpo::value<uint32_t>(&args->general.rrc_inactivity_timer)->default_value(60000), "Inactivity timer in ms")
("expert.enable_mbsfn", bpo::value<bool>(&args->general.enable_mbsfn)->default_value(false), "Enables MBMS in the eNB")
("expert.print_buffer_state", bpo::value<bool>(&args->general.print_buffer_state)->default_value(false), "Prints on the console the buffer state every 10 seconds")
("expert.m1u_multiaddr", bpo::value<string>(&args->general.m1u_multiaddr)->default_value("239.255.0.1"), "M1-U Multicast address the eNB joins.")
("expert.m1u_if_addr", bpo::value<string>(&args->general.m1u_if_addr)->default_value("127.0.1.201"), "IP address of the interface the eNB will listen for M1-U traffic.")
("expert.eea_pref_list", bpo::value<string>(&args->general.eea_pref_list)->default_value("EEA0, EEA2, EEA1"), "Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1).")
("expert.eia_pref_list", bpo::value<string>(&args->general.eia_pref_list)->default_value("EIA2, EIA1, EIA0"), "Ordered preference list for the selection of integrity algorithm (EIA) (default: EIA2, EIA1, EIA0).")
;
// eMBMS section
("embms.enable", bpo::value<bool>(&args->stack.embms.enable)->default_value(false), "Enables MBMS in the eNB")
("embms.m1u_multiaddr", bpo::value<string>(&args->stack.embms.m1u_multiaddr)->default_value("239.255.0.1"), "M1-U Multicast address the eNB joins.")
("embms.m1u_if_addr", bpo::value<string>(&args->stack.embms.m1u_if_addr)->default_value("127.0.1.201"), "IP address of the interface the eNB will listen for M1-U traffic.")
;
// Positional options - config file location
bpo::options_description position("Positional options");
@ -261,7 +263,7 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
exit(1);
}
}
if (args->general.enable_mbsfn) {
if (args->stack.embms.enable) {
if (args->stack.mac.sched.nof_ctrl_symbols == 3) {
fprintf(stderr,
"nof_ctrl_symbols = %d, While using MBMS, please set number of control symbols to either 1 or 2, "

View File

@ -264,6 +264,9 @@ void phy::configure_mbsfn(sib_type2_s* sib2, sib_type13_r9_s* sib13, mcch_msg_s
}
phy_rrc_config.mbsfn.mbsfn_subfr_cnfg = sib2->mbsfn_sf_cfg_list[0];
}
} else {
fprintf(stderr, "SIB2 has no MBSFN subframe config specified\n");
return;
}
phy_rrc_config.mbsfn.mbsfn_notification_cnfg = sib13->notif_cfg_r9;

View File

@ -264,12 +264,15 @@ void phy_common::build_mch_table()
ZERO_OBJECT(mcch_table);
// 40 element table represents 4 frames (40 subframes)
uint32_t nof_sfs = 10;
uint32_t nof_sfs = 0;
if (mbsfn.mbsfn_subfr_cnfg.sf_alloc.type().value == mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame) {
generate_mch_table(&mch_table[0], (uint32_t)mbsfn.mbsfn_subfr_cnfg.sf_alloc.one_frame().to_number(), 1);
} else {
nof_sfs = 10;
} else if (mbsfn.mbsfn_subfr_cnfg.sf_alloc.type().value == mbsfn_sf_cfg_s::sf_alloc_c_::types::four_frames) {
generate_mch_table(&mch_table[0], (uint32_t)mbsfn.mbsfn_subfr_cnfg.sf_alloc.four_frames().to_number(), 4);
nof_sfs = 40;
} else {
fprintf(stderr, "No valid SF alloc\n");
}
// Debug
std::stringstream ss;

View File

@ -121,11 +121,11 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_)
s1ap.init(args.s1ap, &rrc, &s1ap_log);
gtpu.init(args.s1ap.gtp_bind_addr,
args.s1ap.mme_addr,
args.expert.m1u_multiaddr,
args.expert.m1u_if_addr,
args.embms.m1u_multiaddr,
args.embms.m1u_if_addr,
&pdcp,
&gtpu_log,
args.expert.enable_mbsfn);
args.embms.enable);
started = true;

View File

@ -672,7 +672,7 @@ void mac::build_mch_sched(uint32_t tbs)
int last_mtch_stop = 0;
if (total_bytes_to_tx >= total_space_avail_bytes) {
if (total_bytes_to_tx > 0 && total_bytes_to_tx >= total_space_avail_bytes) {
for(uint32_t i = 0; i < mch.num_mtch_sched;i++){
double ratio = mch.mtch_sched[i].lcid_buffer_size/total_bytes_to_tx;
float assigned_sfs = floor(sfs_per_sched_period*ratio);
@ -690,16 +690,14 @@ void mac::build_mch_sched(uint32_t tbs)
int mac::get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_t* dl_sched_res)
{
log_h->step(tti);
srslte_ra_tb_t mcs;
srslte_ra_tb_t mcs_data;
mcs.mcs_idx = this->sib13.mbsfn_area_info_list_r9[0].mcch_cfg_r9.sig_mcs_r9;
srslte_ra_tb_t mcs = {};
srslte_ra_tb_t mcs_data = {};
mcs.mcs_idx = this->sib13.mbsfn_area_info_list_r9[0].mcch_cfg_r9.sig_mcs_r9.to_number();
mcs_data.mcs_idx = this->mcch.msg.c1().mbsfn_area_cfg_r9().pmch_info_list_r9[0].pmch_cfg_r9.data_mcs_r9;
srslte_dl_fill_ra_mcs(&mcs, 0, this->cell_config.cell.nof_prb, false);
srslte_dl_fill_ra_mcs(&mcs_data, 0, this->cell_config.cell.nof_prb, false);
if (is_mcch) {
build_mch_sched(mcs_data.tbs);
mch.mcch_payload = mcch_payload_buffer;
mch.current_sf_allocation_num = 1;