Commit 02b17c79 authored by Raymond Knopp's avatar Raymond Knopp

commit before merge. minor changes for testing

parent bac8bc56
......@@ -268,13 +268,13 @@ void rx_func(void *param) {
// Call the scheduler
start_meas(&gNB->ul_indication_stats);
pthread_mutex_lock(&gNB->UL_INFO_mutex);
// pthread_mutex_lock(&gNB->UL_INFO_mutex);
gNB->UL_INFO.frame = frame_rx;
gNB->UL_INFO.slot = slot_rx;
gNB->UL_INFO.module_id = gNB->Mod_id;
gNB->UL_INFO.CC_id = gNB->CC_id;
gNB->if_inst->NR_UL_indication(&gNB->UL_INFO);
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
// pthread_mutex_unlock(&gNB->UL_INFO_mutex);
stop_meas(&gNB->ul_indication_stats);
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT) {
......@@ -342,7 +342,7 @@ static void *process_stats_thread(void *param) {
reset_meas(&gNB->ul_indication_stats);
reset_meas(&gNB->rx_pusch_stats);
reset_meas(&gNB->ulsch_decoding_stats);
reset_meas(&gNB->schedule_response_stats);
wait_sync("process_stats_thread");
while(!oai_exit)
......@@ -353,6 +353,7 @@ static void *process_stats_thread(void *param) {
print_meas(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL);
print_meas(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL);
print_meas(&gNB->ul_indication_stats, "UL Indication", NULL, NULL);
print_meas(&gNB->schedule_response_stats,"Schedule Response",NULL,NULL);
print_meas(&gNB->rx_pusch_stats, "PUSCH inner-receiver", NULL, NULL);
print_meas(&gNB->ulsch_decoding_stats, "PUSCH decoding", NULL, NULL);
}
......
......@@ -424,7 +424,7 @@ uint8_t nr_generate_pdsch(processingData_L1tx_t *msgTx,
remaining_re = upper_limit + start_sc - frame_parms->ofdm_symbol_size;
upper_limit = frame_parms->ofdm_symbol_size - start_sc;
}
if (frame_parms->N_RB_DL&1==0) {
if (0/*(frame_parms->N_RB_DL&1)==0*/) {
__m128i *txF=(__m128i*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+start_sc+txdataF_offset)<<1)];
__m128i *txl = (__m128i*)&tx_layers[ap][m<<1];
......
......@@ -128,6 +128,7 @@ static inline void start_meas(time_stats_t *ts) {
} else {
ts->in = rdtsc_oai();
}
if ((ts->trials&16383)<10) ts->max=0;
}
}
......
......@@ -868,6 +868,7 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t rx_pusch_stats;
time_stats_t ul_indication_stats;
time_stats_t schedule_response_stats;
time_stats_t ulsch_decoding_stats;
time_stats_t ulsch_rate_unmatching_stats;
time_stats_t ulsch_ldpc_decoding_stats;
......
......@@ -148,7 +148,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
AssertFatal(RC.gNB[Mod_id]!=NULL,"RC.gNB[%d] is null\n",Mod_id);
gNB = RC.gNB[Mod_id];
start_meas(&gNB->schedule_response_stats);
notifiedFIFO_elt_t *res;
res = pullTpool(gNB->resp_L1_tx, gNB->threadPool);
processingData_L1tx_t *msgTx = (processingData_L1tx_t *)NotifiedFifoData(res);
......@@ -248,5 +248,5 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
oai_nfapi_tx_data_req(TX_req);
}
stop_meas(&gNB->schedule_response_stats);
}
......@@ -401,7 +401,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id, uint8_t harq_pid, uint8_t crc_flag, int dtx_flag) {
pthread_mutex_lock(&gNB->UL_INFO_mutex);
//pthread_mutex_lock(&gNB->UL_INFO_mutex);
int timing_advance_update, cqi;
int sync_pos;
......@@ -526,7 +526,7 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
gNB->UL_INFO.rx_ind.number_of_pdus++;
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
// pthread_mutex_unlock(&gNB->UL_INFO_mutex);
}
// Function to fill UL RB mask to be used for N0 measurements
......
......@@ -393,7 +393,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nr_schedule_ulsch(module_idP, frame, slot);
// This schedules the DCI for Downlink and PDSCH
nr_schedule_ue_spec(module_idP, frame, slot);
start_meas(&gNB->schedule_dlsch);
nr_schedule_ue_spec(module_idP, frame, slot);
stop_meas(&gNB->schedule_dlsch);
nr_schedule_pucch(module_idP, frame, slot);
......
......@@ -1218,6 +1218,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
// const int lcid = DL_SCH_LCID_DTCH;
const int lcid = sched_ctrl->lcid_to_schedule;
int dlsch_total_bytes = 0;
start_meas(&gNB_mac->rlc_data_req);
if (sched_ctrl->num_total_bytes > 0) {
tbs_size_t len = 0;
while (size > 3) {
......@@ -1231,6 +1232,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
/* limit requested number of bytes to what preprocessor specified, or
* such that TBS is full */
const rlc_buffer_occupancy_t ndata = min(sched_ctrl->rlc_status[lcid].bytes_in_buffer, size);
len = mac_rlc_data_req(module_id,
rnti,
module_id,
......@@ -1243,6 +1246,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
0,
0);
LOG_D(NR_MAC,
"%4d.%2d RNTI %04x: %d bytes from %s %d (ndata %d, remaining size %d)\n",
frame,
......@@ -1291,6 +1295,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
buf += size;
dlsch_total_bytes += size;
}
stop_meas(&gNB_mac->rlc_data_req);
// Add padding header and zero rest out if there is space left
if (size > 0) {
......
......@@ -128,6 +128,8 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen)
}
}
print_meas(&gNB->eNB_scheduler, "DL & UL scheduling timing stats", NULL, NULL);
print_meas(&gNB->schedule_dlsch,"dlsch scheduler",NULL,NULL);
print_meas(&gNB->rlc_data_req, "rlc_data_req",NULL,NULL);
}
......
......@@ -736,6 +736,8 @@ typedef struct gNB_MAC_INST_s {
time_stats_t schedule_dlsch_preprocessor;
/// processing time of eNB DLSCH scheduler
time_stats_t schedule_dlsch; // include rlc_data_req + MAC header + preprocessor
/// processing time of rlc_data_req
time_stats_t rlc_data_req;
/// processing time of eNB MCH scheduler
time_stats_t schedule_mch;
/// processing time of eNB ULSCH reception
......
......@@ -266,13 +266,11 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
dump_dl(sched_info);
#endif
if (ifi->NR_Schedule_response) {
AssertFatal(ifi->NR_Schedule_response!=NULL,
"nr_schedule_response is null (mod %d, cc %d)\n",
module_id,
CC_id);
ifi->NR_Schedule_response(sched_info);
}
AssertFatal(ifi->NR_Schedule_response!=NULL,
"nr_schedule_response is null (mod %d, cc %d)\n",
module_id,
CC_id);
ifi->NR_Schedule_response(sched_info);
LOG_D(PHY,"NR_Schedule_response: SFN_SF:%d%d dl_pdus:%d\n",
sched_info->frame,
......
......@@ -800,7 +800,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
DRB_config->pdcp_Config->moreThanOneRLC = NULL;
DRB_config->pdcp_Config->t_Reordering = calloc(1, sizeof(*DRB_config->pdcp_Config->t_Reordering));
*DRB_config->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms0;
*DRB_config->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms100;
DRB_config->pdcp_Config->ext1 = NULL;
ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment