Merge remote-tracking branch 'origin/develop-nr' into test-x310
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
#include "L1_paramdef.h"
|
||||
#include "MACRLC_paramdef.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "RRC_config_tools.h"
|
||||
//#include "RRC_config_tools.h"
|
||||
#include "gnb_paramdef.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
@@ -81,6 +81,8 @@ extern void set_parallel_conf(char *parallel_conf);
|
||||
extern void set_worker_conf(char *worker_conf);
|
||||
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
|
||||
extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
extern int config_check_band_frequencies(int ind, int16_t band, uint32_t downlink_frequency,
|
||||
int32_t uplink_frequency_offset, uint32_t frame_type);
|
||||
|
||||
void RCconfig_nr_flexran()
|
||||
{
|
||||
@@ -628,7 +630,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
paramdef_t GNBParams[] = GNBPARAMS_DESC;
|
||||
paramlist_def_t GNBParamList = {GNB_CONFIG_STRING_GNB_LIST,NULL,0};
|
||||
////////// Physical parameters
|
||||
checkedparam_t config_check_CCparams[] = NRCCPARAMS_CHECK;
|
||||
//checkedparam_t config_check_CCparams[] = NRCCPARAMS_CHECK;
|
||||
paramdef_t CCsParams[] = NRCCPARAMS_DESC;
|
||||
paramlist_def_t CCsParamList = {GNB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0};
|
||||
|
||||
|
||||
@@ -238,8 +238,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
}
|
||||
if(nfapi_mode!=3)
|
||||
phy_config_harq_ue(Mod_idP, 0, eNB_index,
|
||||
UE_mac_inst[Mod_idP].
|
||||
scheduling_info.maxHARQ_Tx);
|
||||
UE_mac_inst[Mod_idP].scheduling_info.maxHARQ_Tx);
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->retxBSR_Timer) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
|
||||
@@ -65,11 +65,16 @@ uint8_t table_9_2_2_1[16][8]={
|
||||
{1,0, 14,4, 0,3,6,9},
|
||||
{1,0, 14,26,0,3,0,0}
|
||||
};
|
||||
int8_t nr_ue_process_dlsch(module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_nr_dci_indication_t *dci_ind, void *pduP, uint32_t pdu_len){
|
||||
|
||||
int8_t nr_ue_process_dlsch(module_id_t module_id,
|
||||
int cc_id,
|
||||
uint8_t gNB_index,
|
||||
fapi_nr_dci_indication_t *dci_ind,
|
||||
void *pduP,
|
||||
uint32_t pdu_len)
|
||||
{
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
fapi_nr_ul_config_request_t *ul_config = &mac->ul_config_request;
|
||||
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||
//fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||
nr_phy_config_t *phy_config = &mac->phy_config;
|
||||
|
||||
//ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti;
|
||||
@@ -1087,7 +1092,7 @@ int8_t nr_ue_process_dci_freq_dom_resource_assignment(
|
||||
start_RB = riv%n_RB_DLBWP;
|
||||
// if (l_RB - 1) > floor (n_RB_DLBWP/2) we need to recalculate them using the following lines
|
||||
tmp_RIV = n_RB_DLBWP * (l_RB - 1) + start_RB;
|
||||
if (tmp_RIV != riv) { // then (l_RB - 1) > floor (n_RB_DLBWP/2) and we need to recalculate l_RB and start_RB
|
||||
if ((tmp_RIV != riv) || ((start_RB+l_RB)>n_RB_DLBWP)) { // then (l_RB - 1) > floor (n_RB_DLBWP/2) and we need to recalculate l_RB and start_RB
|
||||
l_RB = n_RB_DLBWP - l_RB + 2;
|
||||
start_RB = n_RB_DLBWP - start_RB - 1;
|
||||
}
|
||||
@@ -1149,7 +1154,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(
|
||||
{0,4,7}, // row index 15
|
||||
{0,8,4} // row index 16
|
||||
};
|
||||
uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1
|
||||
/*uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1
|
||||
{0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?6:5}, // row index 1
|
||||
{0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?10:9}, // row index 2
|
||||
{0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?9:8}, // row index 3
|
||||
@@ -1166,8 +1171,8 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(
|
||||
{0,2,4}, // row index 14
|
||||
{0,4,6}, // row index 15
|
||||
{0,8,4} // row index 16
|
||||
};
|
||||
uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1
|
||||
};*/
|
||||
/*uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1
|
||||
{0,2,2}, // row index 1
|
||||
{0,4,2}, // row index 2
|
||||
{0,6,2}, // row index 3
|
||||
@@ -1184,8 +1189,8 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(
|
||||
{0,(dmrs_typeA_pos == 0)?2:3,(dmrs_typeA_pos == 0)?12:11}, // row index 14
|
||||
{1,2,4}, // row index 15
|
||||
{0,0,0} // row index 16
|
||||
};
|
||||
uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1
|
||||
};*/
|
||||
/*uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1
|
||||
{0,2,2}, // row index 1
|
||||
{0,4,2}, // row index 2
|
||||
{0,6,2}, // row index 3
|
||||
@@ -1202,7 +1207,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(
|
||||
{0,(dmrs_typeA_pos == 0)?2:3,(dmrs_typeA_pos == 0)?12:11}, // row index 14
|
||||
{0,0,6}, // row index 15
|
||||
{0,2,6} // row index 16
|
||||
};
|
||||
};*/
|
||||
uint8_t mu_pusch = 1;
|
||||
// definition table j Table 6.1.2.1.1-4
|
||||
uint8_t j = (mu_pusch==3)?3:(mu_pusch==2)?2:1;
|
||||
@@ -1224,7 +1229,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(
|
||||
{j+3,0,14}, // row index 15
|
||||
{j+3,0,10} // row index 16
|
||||
};
|
||||
uint8_t table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PUSCH from TS 38.214 subclause 6.1.2.1.1
|
||||
/*uint8_t table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PUSCH from TS 38.214 subclause 6.1.2.1.1
|
||||
{j, 0,8}, // row index 1
|
||||
{j, 0,12}, // row index 2
|
||||
{j, 0,10}, // row index 3
|
||||
@@ -1241,7 +1246,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(
|
||||
{j, 8,4}, // row index 14
|
||||
{j+3,0,8}, // row index 15
|
||||
{j+3,0,10} // row index 16
|
||||
};
|
||||
};*/
|
||||
|
||||
/*
|
||||
* TS 38.214 subclause 5.1.2.1 Resource allocation in time domain (downlink)
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "pdcp.h"
|
||||
|
||||
#include "openair1/PHY/defs_gNB.h"
|
||||
#include "openair1/PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
|
||||
//Agent-related headers
|
||||
#include "flexran_agent_extern.h"
|
||||
@@ -335,7 +336,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
rnti = UE_RNTI(module_idP, i);
|
||||
CC_id = UE_PCCID(module_idP, i);
|
||||
int spf = get_spf(cfg);
|
||||
//int spf = get_spf(cfg);
|
||||
|
||||
if (((frameP&127) == 0) && (slotP == 0)) {
|
||||
LOG_I(MAC,
|
||||
@@ -388,7 +389,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
NR_gNB_ULSCH_t *ulsch = RC.gNB[module_idP][CC_id]->ulsch[ii][0];
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
||||
LOG_W(MAC, "TODO: clean_eNb_ulsch UE %x \n", rnti);
|
||||
//clean_eNb_ulsch(ulsch);
|
||||
clean_gNB_ulsch(ulsch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +397,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
NR_gNB_DLSCH_t *dlsch = RC.gNB[module_idP][CC_id]->dlsch[ii][0];
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)){
|
||||
LOG_W(MAC, "TODO: clean_eNb_dlsch UE %x \n", rnti);
|
||||
//clean_eNb_dlsch(dlsch);
|
||||
clean_gNB_dlsch(dlsch);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -203,8 +203,8 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
||||
int dl_carrier_bandwidth = cfg->rf_config.dl_carrier_bandwidth.value;
|
||||
|
||||
// everything here is hard-coded to 30 kHz
|
||||
int scs = get_dlscs(cfg);
|
||||
int slots_per_frame = get_spf(cfg);
|
||||
//int scs = get_dlscs(cfg);
|
||||
//int slots_per_frame = get_spf(cfg);
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
LOG_I(MAC, "Scheduling UE specific search space DCI type 1 for CC_id %d\n",CC_id);
|
||||
|
||||
|
||||
@@ -36,6 +36,14 @@
|
||||
|
||||
void mac_top_init_gNB(void);
|
||||
|
||||
void config_common(int Mod_idP,
|
||||
int CC_idP,
|
||||
int Nid_cell,
|
||||
int nr_bandP,
|
||||
uint64_t ssb_pattern,
|
||||
uint64_t dl_CarrierFreqP,
|
||||
uint32_t dl_BandwidthP);
|
||||
|
||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int CC_id,
|
||||
int cellid,
|
||||
|
||||
@@ -171,8 +171,4 @@ typedef struct gNB_MAC_INST_s {
|
||||
time_stats_t schedule_pch;
|
||||
} gNB_MAC_INST;
|
||||
|
||||
void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
#endif /*__LAYER2_NR_MAC_GNB_H__ */
|
||||
|
||||
@@ -140,17 +140,18 @@ void rrc_gNB_process_SgNBAdditionRequest(
|
||||
|
||||
void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP
|
||||
){
|
||||
|
||||
int CC_id = ue_context_pP->ue_context.primaryCC_id;
|
||||
OCTET_STRING_t *secondaryCellGroup;
|
||||
rrc_gNB_ue_context_t *const ue_context_pP)
|
||||
{
|
||||
//uint8_t size;
|
||||
//uint8_t buffer[100];
|
||||
//int CC_id = ue_context_pP->ue_context.primaryCC_id;
|
||||
//OCTET_STRING_t *secondaryCellGroup;
|
||||
NR_CellGroupConfig_t *cellGroupconfig;
|
||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_BearerToAddModList;
|
||||
struct NR_MAC_CellGroupConfig *mac_CellGroupConfig;
|
||||
struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig;
|
||||
struct NR_SpCellConfig *spCellConfig;
|
||||
struct NR_CellGroupConfig__sCellToAddModList *sCellToAddModList;
|
||||
//struct NR_CellGroupConfig__sCellToAddModList *sCellToAddModList;
|
||||
|
||||
cellGroupconfig = CALLOC(1,sizeof(NR_CellGroupConfig_t));
|
||||
cellGroupconfig->rlc_BearerToAddModList = CALLOC(1,sizeof(struct NR_CellGroupConfig__rlc_BearerToAddModList));
|
||||
|
||||
Reference in New Issue
Block a user