Skip to content
Snippets Groups Projects
Commit 1b141172 authored by ChiehChun's avatar ChiehChun Committed by Robert Schmidt
Browse files

Calculate UL throughput & Initial ulsch_current_bytes

parent cf725a18
No related branches found
No related tags found
8 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1493fix DL arq errors in UE,!1093Issue in generating NR PRACH for High Speed case,!1074PBCH test case support for non-zero bchpyload,!1045Integration 2021 wk06 c,!1044Integration 2021 wk06 b,!1043Integration 2021 wk06,!1015Draft: Multi-UE + more slots
......@@ -504,6 +504,7 @@ long get_K2(NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu) {
return 3;
}
float ul_thr_ue[MAX_MOBILES_PER_GNB];
void pf_ul(module_id_t module_id,
frame_t frame,
sub_frame_t slot,
......@@ -527,6 +528,11 @@ void pf_ul(module_id_t module_id,
const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
/* Calculate throughput */
const float a = 0.0005f; // corresponds to 200ms window
const uint32_t b = UE_info->mac_stats[UE_id].ulsch_current_bytes;
ul_thr_ue[UE_id] = (1 - a) * ul_thr_ue[UE_id] + a * b;
LOG_D(MAC,"%4d.%2d %s() static TBS %d, ul_thr_ue[%d] %f\n",
frame, slot, __func__, b, UE_id, ul_thr_ue[UE_id]);
/* RETRANSMISSION: Check retransmission */
......@@ -742,6 +748,7 @@ void nr_schedule_ulsch(module_id_t module_id,
const NR_list_t *UE_list = &UE_info->list;
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
UE_info->mac_stats[UE_id].ulsch_current_bytes = 0;
/* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in
* every TTI are pre-populated by the preprocessor and used below */
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment