Commit 1cb67184 authored by frtabu's avatar frtabu

remove develop version of USRP device, remove some compilation warnings

parent 2634e1e0
......@@ -808,9 +808,6 @@ fi
# Build RF device and transport protocol libraries #
####################################################
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HWLAT" = "1" ] ; then
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
USRPVERSION="lte"
fi
# build RF device libraries
if [ "$HW" != "None" ] ; then
rm -f liboai_device.so
......@@ -827,11 +824,11 @@ fi
echo_info "liboai_device.so is linked to EXMIMO device library"
elif [ "$HW" == "OAI_USRP" ] ; then
compilations \
$build_dir oai_usrpdevif$USRPVERSION \
liboai_usrpdevif$USRPVERSION.so $dbin/liboai_usrpdevif$USRPVERSION.so.$REL
$build_dir oai_usrpdevif \
liboai_usrpdevif.so $dbin/liboai_usrpdevif.so.$REL
ln -sf liboai_usrpdevif$USRPVERSION.so liboai_device.so
ln -sf $dbin/liboai_usrpdevif$USRPVERSION.so.$REL $dbin/liboai_device.so
ln -sf liboai_usrpdevif.so liboai_device.so
ln -sf $dbin/liboai_usrpdevif.so.$REL $dbin/liboai_device.so
echo_info "liboai_device.so is linked to USRP device library"
elif [ "$HW" == "OAI_BLADERF" ] ; then
if [ -f "/usr/include/libbladeRF.h" ] ; then
......
......@@ -47,18 +47,18 @@ uint16_t get_SLIV(uint8_t S, uint8_t L);
uint8_t nr_get_S(uint8_t row_idx, uint8_t CP, uint8_t time_alloc_type, uint8_t dmrs_typeA_position);
void nr_get_rbg_parms(NR_BWP_PARMS* bwp, uint8_t config_type);
void nr_get_rbg_parms(NR_BWP_PARMS *bwp, uint8_t config_type);
void nr_get_rbg_list(uint32_t bitmap, uint8_t n_rbg, uint8_t* rbg_list);
void nr_get_rbg_list(uint32_t bitmap, uint8_t n_rbg, uint8_t *rbg_list);
void nr_get_PRG_parms(NR_BWP_PARMS* bwp, NR_gNB_DCI_ALLOC_t dci_alloc, uint8_t prb_bundling_type);
void nr_get_PRG_parms(NR_BWP_PARMS *bwp, NR_gNB_DCI_ALLOC_t dci_alloc, uint8_t prb_bundling_type);
void nr_pdsch_codeword_scrambling(uint8_t *in,
uint32_t size,
uint8_t q,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t* out);
uint32_t *out);
void nr_fill_dlsch(PHY_VARS_gNB *gNB,
int frame,
......@@ -69,7 +69,7 @@ void nr_fill_dlsch(PHY_VARS_gNB *gNB,
uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
NR_gNB_DCI_ALLOC_t *dci_alloc,
uint32_t ***pdsch_dmrs,
int32_t** txdataF,
int32_t **txdataF,
int16_t amp,
int frame,
uint8_t slot,
......@@ -91,9 +91,10 @@ int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type);
int nr_dlsch_encoding(unsigned char *a,int frame,
uint8_t slot,
NR_gNB_DLSCH_t *dlsch,
NR_DL_FRAME_PARMS* frame_parms);
NR_DL_FRAME_PARMS *frame_parms);
void nr_emulate_dlsch_payload(uint8_t* payload, uint16_t size);
void nr_emulate_dlsch_payload(uint8_t *payload, uint16_t size);
int16_t find_nr_ulsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type);
#endif
......@@ -41,17 +41,13 @@ extern uint8_t nfapi_mode;
void handle_nr_nfapi_bch_pdu(PHY_VARS_gNB *gNB,
nfapi_nr_dl_config_request_pdu_t *dl_config_pdu,
uint8_t *sdu)
{
uint8_t *sdu) {
AssertFatal(dl_config_pdu->bch_pdu_rel15.length == 3, "BCH PDU has length %d != 3\n",
dl_config_pdu->bch_pdu_rel15.length);
LOG_D(PHY,"pbch_pdu[0]: %x,pbch_pdu[1]: %x,gNB->pbch_pdu[2]: %x\n",sdu[0],sdu[1],sdu[2]);
gNB->pbch_pdu[0] = sdu[2];
gNB->pbch_pdu[1] = sdu[1];
gNB->pbch_pdu[2] = sdu[0];
// adjust transmit amplitude here based on NFAPI info
}
......@@ -99,29 +95,20 @@ void handle_nfapi_nr_dci_dl_pdu(PHY_VARS_gNB *gNB,
nfapi_nr_dl_config_dci_dl_pdu *dci_dl_pdu) {
int idx = slot&1;
NR_gNB_PDCCH *pdcch_vars = &gNB->pdcch_vars;
LOG_D(PHY,"Frame %d, Slot %d: DCI processing - populating pdcch_vars->dci_alloc[%d] proc:slot_tx:%d idx:%d pdcch_vars->num_dci:%d\n",frame,slot, pdcch_vars->num_dci, slot, idx, pdcch_vars->num_dci);
// copy dci configuration into gNB structure
nr_fill_dci(gNB,frame,slot,&pdcch_vars->dci_alloc[pdcch_vars->num_dci],dci_dl_pdu);
LOG_D(PHY,"Frame %d, Slot %d: DCI processing - populated pdcch_vars->dci_alloc[%d] proc:slot_tx:%d idx:%d pdcch_vars->num_dci:%d\n",frame,slot, pdcch_vars->num_dci, slot, idx, pdcch_vars->num_dci);
}
void handle_nr_nfapi_dlsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
uint8_t *sdu)
{
uint8_t *sdu) {
nr_fill_dlsch(gNB,frame,slot,dlsch_pdu,sdu);
}
void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO) {
PHY_VARS_gNB *gNB;
// copy data from L2 interface into L1 structures
module_id_t Mod_id = Sched_INFO->module_id;
......@@ -131,35 +118,27 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
nfapi_nr_ul_tti_request_t *UL_tti_req = Sched_INFO->UL_tti_req;
frame_t frame = Sched_INFO->frame;
sub_frame_t slot = Sched_INFO->slot;
AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n");
AssertFatal(RC.gNB[Mod_id]!=NULL,"RC.gNB[%d] is null\n",Mod_id);
AssertFatal(RC.gNB[Mod_id][CC_id]!=NULL,"RC.gNB[%d][%d] is null\n",Mod_id,CC_id);
gNB = RC.gNB[Mod_id][CC_id];
uint8_t number_dl_pdu = DL_req->dl_config_request_body.number_pdu;
uint8_t number_ul_pdu = UL_tti_req->n_pdus;
nfapi_nr_dl_config_request_pdu_t *dl_config_pdu;
int i;
LOG_D(PHY,"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d \n",
frame,slot,
NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),number_dl_pdu,
NFAPI_SFNSF2SFN(TX_req->sfn_sf),NFAPI_SFNSF2SF(TX_req->sfn_sf),TX_req->tx_request_body.number_of_pdus);
int do_oai =0;
int dont_send =0;
gNB->pdcch_vars.num_dci = 0;
gNB->pdcch_vars.num_pdsch_rnti = 0;
gNB->pdcch_vars.num_dci=0;
for (i=0;i<number_dl_pdu;i++) {
for (i=0; i<number_dl_pdu; i++) {
dl_config_pdu = &DL_req->dl_config_request_body.dl_config_pdu_list[i];
LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type);
switch (dl_config_pdu->pdu_type) {
case NFAPI_NR_DL_CONFIG_BCH_PDU_TYPE:
AssertFatal(dl_config_pdu->bch_pdu_rel15.pdu_index < TX_req->tx_request_body.number_of_pdus,
......@@ -168,7 +147,6 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
TX_req->tx_request_body.number_of_pdus);
gNB->pbch_configured=1;
do_oai=1;
handle_nr_nfapi_bch_pdu(gNB,
dl_config_pdu,
TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu_rel15.pdu_index].segments[0].segment_data);
......@@ -182,15 +160,13 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
gNB->pdcch_vars.num_pdsch_rnti++;
do_oai=1;
break;
case NFAPI_NR_DL_CONFIG_DLSCH_PDU_TYPE:
{
case NFAPI_NR_DL_CONFIG_DLSCH_PDU_TYPE: {
nfapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_pdu_rel15 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel15;
uint16_t pdu_index = dlsch_pdu_rel15->pdu_index;
uint16_t tx_pdus = TX_req->tx_request_body.number_of_pdus;
uint16_t invalid_pdu = pdu_index == -1;
uint8_t *sdu = invalid_pdu ? NULL : pdu_index >= tx_pdus ? NULL : TX_req->tx_request_body.tx_pdu_list[pdu_index].segments[0].segment_data;
AssertFatal(sdu!=NULL,"sdu is null, pdu_index %d, tx_pdus %d\n",pdu_index,tx_pdus);
handle_nr_nfapi_dlsch_pdu(gNB,frame,slot,&dl_config_pdu->dlsch_pdu, sdu);
do_oai=1;
......@@ -216,8 +192,6 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
if (nfapi_mode && do_oai && !dont_send) {
oai_nfapi_tx_req(Sched_INFO->TX_req);
oai_nfapi_nr_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
}
}
......@@ -171,7 +171,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
frame_t frameP,
sub_frame_t subframeP,
int *mbsfn_flag,
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
uint16_t nb_rbs_required[MAX_NUM_CCs][MAX_MOBILES_PER_ENB],
DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs]) {
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc = eNB->common_channels;
......@@ -573,8 +573,8 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
uint8_t slice_allocation[MAX_NUM_CCs][N_RBG_MAX];
int UE_id, i;
uint16_t j,c;
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
uint16_t nb_rbs_required[MAX_NUM_CCs][MAX_MOBILES_PER_ENB];
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][MAX_MOBILES_PER_ENB];
// uint16_t nb_rbs_required_remaining_1[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
uint16_t average_rbs_per_user[MAX_NUM_CCs] = {0};
rnti_t rnti;
......@@ -617,7 +617,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
frameP,
subframeP,
min_rb_unit,
(uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required,
nb_rbs_required,
rballoc_sub,
MIMO_mode_indicator,
mbsfn_flag);
......@@ -701,8 +701,8 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
CC_id,
N_RBG[CC_id],
min_rb_unit[CC_id],
(uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required,
(uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required_remaining,
nb_rbs_required,
nb_rbs_required_remaining,
rballoc_sub,
slice_allocation,
MIMO_mode_indicator);
......
......@@ -81,8 +81,8 @@ void dlsch_scheduler_pre_ue_select_fairRR(
module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
int* mbsfn_flag,
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
int *mbsfn_flag,
uint16_t nb_rbs_required[MAX_NUM_CCs][MAX_MOBILES_PER_ENB],
DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs]);
void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
......@@ -95,7 +95,7 @@ void fill_DLSCH_dci_fairRR(
module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
int* mbsfn_flagP);
int *mbsfn_flagP);
void schedule_ue_spec_fairRR(module_id_t module_idP,
frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag);
......
This diff is collapsed.
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