- fixing pmch file test for standard LTE rates

- adding special value for MTCH stop
- adding error messages for config values incompatible with MBMS
master
yagoda 6 years ago committed by Andre Puschmann
parent 4b01a2e4a0
commit 3842beab0f

@ -239,6 +239,8 @@ public:
MTCH_MAX_LCID = 0b11100, MTCH_MAX_LCID = 0b11100,
MCH_SCHED_INFO = 0b11110, MCH_SCHED_INFO = 0b11110,
/*MTCH STOP Value*/
MTCH_STOP_EMPTY = 0b11111111111,
/* Common */ /* Common */
PADDING = 0b11111, PADDING = 0b11111,
SDU = 0b00000 SDU = 0b00000

@ -454,13 +454,17 @@ int sch_subh::get_bsr(uint32_t buff_size[4])
bool sch_subh::get_next_mch_sched_info(uint8_t *lcid_, uint16_t *mtch_stop) bool sch_subh::get_next_mch_sched_info(uint8_t *lcid_, uint16_t *mtch_stop)
{ {
uint16_t mtch_stop_ce;
if(payload) { if(payload) {
nof_mch_sched_ce = nof_bytes/2; nof_mch_sched_ce = nof_bytes/2;
if (cur_mch_sched_ce < nof_mch_sched_ce) { if (cur_mch_sched_ce < nof_mch_sched_ce) {
*lcid_ = (payload[cur_mch_sched_ce * 2] & 0xF8) >> 3; *lcid_ = (payload[cur_mch_sched_ce * 2] & 0xF8) >> 3;
*mtch_stop = ((uint16_t)(payload[cur_mch_sched_ce * 2] & 0x07)) << 8; mtch_stop_ce = ((uint16_t)(payload[cur_mch_sched_ce * 2] & 0x07)) << 8;
*mtch_stop += payload[cur_mch_sched_ce * 2 + 1]; mtch_stop_ce += payload[cur_mch_sched_ce * 2 + 1];
cur_mch_sched_ce++; cur_mch_sched_ce++;
*mtch_stop = (mtch_stop_ce == srslte::mch_subh::MTCH_STOP_EMPTY)
? (0)
: (mtch_stop_ce);
return true; return true;
} }
} }
@ -613,8 +617,11 @@ bool sch_subh::set_ta_cmd(uint8_t ta_cmd)
bool sch_subh::set_next_mch_sched_info(uint8_t lcid_, uint16_t mtch_stop) bool sch_subh::set_next_mch_sched_info(uint8_t lcid_, uint16_t mtch_stop)
{ {
if (((sch_pdu*)parent)->has_space_ce(2, true)) { if (((sch_pdu*)parent)->has_space_ce(2, true)) {
w_payload_ce[nof_mch_sched_ce*2] = (lcid_&0x1F) << 3 | (uint8_t) ((mtch_stop&0x0700)>>8); uint16_t mtch_stop_ce =
w_payload_ce[nof_mch_sched_ce*2+1] = (uint8_t) (mtch_stop&0xff); (mtch_stop) ? (mtch_stop) : (srslte::mch_subh::MTCH_STOP_EMPTY);
w_payload_ce[nof_mch_sched_ce * 2] =
(lcid_ & 0x1F) << 3 | (uint8_t)((mtch_stop_ce & 0x0700) >> 8);
w_payload_ce[nof_mch_sched_ce * 2 + 1] = (uint8_t)(mtch_stop_ce & 0xff);
nof_mch_sched_ce++; nof_mch_sched_ce++;
lcid = MCH_SCHED_INFO; lcid = MCH_SCHED_INFO;
((sch_pdu*)parent)->update_space_ce(2, true); ((sch_pdu*)parent)->update_space_ce(2, true);

@ -159,7 +159,7 @@ int main(int argc, char **argv) {
exit(-1); exit(-1);
} }
parse_args(argc,argv); parse_args(argc,argv);
srslte_use_standard_symbol_size(false);
if (base_init()) { if (base_init()) {
ERROR("Error initializing memory\n"); ERROR("Error initializing memory\n");
exit(-1); exit(-1);
@ -215,9 +215,9 @@ int main(int argc, char **argv) {
srslte_pdsch_res_t pdsch_res; srslte_pdsch_res_t pdsch_res;
pdsch_res.payload = data; pdsch_res.payload = data;
ret = srslte_ue_dl_decode_pmch(&ue_dl, &dl_sf, &pmch_cfg, &pdsch_res); ret = srslte_ue_dl_decode_pmch(&ue_dl, &dl_sf, &pmch_cfg, &pdsch_res);
if (ret >= 0) { if (pdsch_res.crc == 1) {
printf("PMCH Decoded OK!\n"); printf("PMCH Decoded OK!\n");
} else if (ret < 0) { } else if (pdsch_res.crc == 0) {
printf("Error decoding PMCH\n"); printf("Error decoding PMCH\n");
} }

@ -663,14 +663,14 @@ void mac::build_mch_sched(uint32_t tbs)
int last_mtch_stop = 0; int last_mtch_stop = 0;
if(total_bytes_to_tx >= total_space_avail_bytes){ if (total_bytes_to_tx >= total_space_avail_bytes) {
for(uint32_t i = 0; i < mch.num_mtch_sched;i++){ for(uint32_t i = 0; i < mch.num_mtch_sched;i++){
double ratio = mch.mtch_sched[i].lcid_buffer_size/total_bytes_to_tx; double ratio = mch.mtch_sched[i].lcid_buffer_size/total_bytes_to_tx;
float assigned_sfs = floor(sfs_per_sched_period*ratio); float assigned_sfs = floor(sfs_per_sched_period*ratio);
mch.mtch_sched[i].stop = last_mtch_stop + (uint32_t)assigned_sfs; mch.mtch_sched[i].stop = last_mtch_stop + (uint32_t)assigned_sfs;
last_mtch_stop = mch.mtch_sched[i].stop; last_mtch_stop = mch.mtch_sched[i].stop;
} }
}else { } else {
for(uint32_t i = 0; i < mch.num_mtch_sched;i++){ for(uint32_t i = 0; i < mch.num_mtch_sched;i++){
float assigned_sfs = ceil(((float)mch.mtch_sched[i].lcid_buffer_size)/((float)bytes_per_sf)); float assigned_sfs = ceil(((float)mch.mtch_sched[i].lcid_buffer_size)/((float)bytes_per_sf));
mch.mtch_sched[i].stop = last_mtch_stop + (uint32_t)assigned_sfs; mch.mtch_sched[i].stop = last_mtch_stop + (uint32_t)assigned_sfs;
@ -694,8 +694,10 @@ int mac::get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_t* dl_sched_res)
build_mch_sched(mcs_data.tbs); build_mch_sched(mcs_data.tbs);
mch.mcch_payload = mcch_payload_buffer; mch.mcch_payload = mcch_payload_buffer;
mch.current_sf_allocation_num = 1; mch.current_sf_allocation_num = 1;
Info("MCH Sched Info: LCID: %d, Stop: %d, tti is %d \n", mch.mtch_sched[0].lcid, mch.mtch_sched[0].stop, tti); Info("MCH Sched Info: LCID: %d, Stop: %d, tti is %d \n",
phy_h->set_mch_period_stop(mch.mtch_sched[0].stop); mch.mtch_sched[0].lcid, mch.mtch_sched[mch.num_mtch_sched - 1].stop,
tti);
phy_h->set_mch_period_stop(mch.mtch_sched[mch.num_mtch_sched - 1].stop);
for(uint32_t i = 0; i < mch.num_mtch_sched; i++) { for(uint32_t i = 0; i < mch.num_mtch_sched; i++) {
mch.pdu[i].lcid = srslte::sch_subh::MCH_SCHED_INFO; mch.pdu[i].lcid = srslte::sch_subh::MCH_SCHED_INFO;
// mch.mtch_sched[i].lcid = 1+i; // mch.mtch_sched[i].lcid = 1+i;

@ -536,6 +536,26 @@ int main(int argc, char* argv[])
exit(1); exit(1);
} }
if (args.expert.mbms_service > -1) {
if (!args.expert.phy.interpolate_subframe_enabled) {
fprintf(stderr, "interpolate_subframe_enabled = %d, While using MBMS, "
"please set interpolate_subframe_enabled to true\n",
args.expert.phy.interpolate_subframe_enabled);
exit(1);
}
if (args.expert.phy.nof_phy_threads > 2) {
fprintf(stderr, "nof_phy_threads = %d, While using MBMS, please set "
"number of phy threads to 1 or 2\n",
args.expert.phy.nof_phy_threads);
exit(1);
}
if ((0 == args.expert.phy.snr_estim_alg.find("refs"))) {
fprintf(stderr, "snr_estim_alg = refs, While using MBMS, please set "
"algorithm to pss or empty \n");
exit(1);
}
}
metricshub.init(ue, args.expert.metrics_period_secs); metricshub.init(ue, args.expert.metrics_period_secs);
metricshub.add_listener(&metrics_screen); metricshub.add_listener(&metrics_screen);
metrics_screen.set_ue_handle(ue); metrics_screen.set_ue_handle(ue);

Loading…
Cancel
Save