Commit 760c19b7 authored by florian kaltenberger's avatar florian kaltenberger

Rebasing all the work from feature-247-tm89 onto current develop. This does...

Rebasing all the work from feature-247-tm89 onto current develop. This does not include any changes that were made to phy_procedures_lte_eNB and to the MAC, which will be done in a second step. At the moment this commit only contains the PHY and RRC functionality.
parent 3fd24705
...@@ -20,11 +20,11 @@ ID = ENB_PHY_DLSCH_UE_DCI ...@@ -20,11 +20,11 @@ ID = ENB_PHY_DLSCH_UE_DCI
ID = ENB_PHY_DLSCH_UE_ACK ID = ENB_PHY_DLSCH_UE_ACK
DESC = eNodeB downlink UE ACK as seen by the PHY layer in process_HARQ_feedback DESC = eNodeB downlink UE ACK as seen by the PHY layer in process_HARQ_feedback
GROUP = ALL:PHY:GRAPHIC:ENB GROUP = ALL:PHY:GRAPHIC:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti : int,harq_pid FORMAT = int,eNB_ID : int,frame : int,subframe : int,UE_id : int,rnti : int,harq_pid : int,tb
ID = ENB_PHY_DLSCH_UE_NACK ID = ENB_PHY_DLSCH_UE_NACK
DESC = eNodeB downlink UE NACK as seen by the PHY layer in process_HARQ_feedback DESC = eNodeB downlink UE NACK as seen by the PHY layer in process_HARQ_feedback
GROUP = ALL:PHY:GRAPHIC:ENB GROUP = ALL:PHY:GRAPHIC:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti : int,harq_pid FORMAT = int,eNB_ID : int,frame : int,subframe : int,UE_id : int,rnti : int,harq_pid : int,tb
ID = ENB_PHY_ULSCH_UE_DCI ID = ENB_PHY_ULSCH_UE_DCI
DESC = eNodeB uplink UE specific DCI as sent by the PHY layer DESC = eNodeB uplink UE specific DCI as sent by the PHY layer
GROUP = ALL:PHY:GRAPHIC:ENB GROUP = ALL:PHY:GRAPHIC:ENB
......
...@@ -78,8 +78,8 @@ typedef struct { ...@@ -78,8 +78,8 @@ typedef struct {
logger *pucch1_energy_ue_energy_logger; logger *pucch1_energy_ue_energy_logger;
logger *pucch_iq_ue_logger; logger *pucch_iq_ue_logger;
logger *dl_dci_logger[8]; logger *dl_dci_logger[8];
logger *dl_ack_logger[8]; logger *dl_ack_logger[2][8];
logger *dl_nack_logger[8]; logger *dl_nack_logger[2][8];
logger *ul_dci_logger[8]; logger *ul_dci_logger[8];
logger *ul_dci_retransmission_logger[8]; logger *ul_dci_retransmission_logger[8];
logger *ul_ack_logger[8]; logger *ul_ack_logger[8];
...@@ -133,7 +133,7 @@ static void *gui_thread(void *_g) ...@@ -133,7 +133,7 @@ static void *gui_thread(void *_g)
static filter *ticktime_filter(void *database, char *event, int i, int ue) static filter *ticktime_filter(void *database, char *event, int i, int ue)
{ {
/* filter is "harq_pid == i && UE_id == 0 && eNB_id == 0" */ /* filter is harq_pid == i && UE_id == ue && eNB_id == 0" */
/* we get the UE_id from the rnti */ /* we get the UE_id from the rnti */
return return
filter_and( filter_and(
...@@ -146,9 +146,25 @@ static filter *ticktime_filter(void *database, char *event, int i, int ue) ...@@ -146,9 +146,25 @@ static filter *ticktime_filter(void *database, char *event, int i, int ue)
filter_eq(filter_evarg(database, event, "eNB_ID"), filter_int(0)))); filter_eq(filter_evarg(database, event, "eNB_ID"), filter_int(0))));
} }
static filter *ticktime_filter_tb(void *database, char *event, int i, int ue, int tb)
{
/* filter is "tb == tb && harq_pid == i && UE_id == ue && eNB_id == 0" */
return
filter_and(
filter_eq(filter_evarg(database, event, "harq_pid"), filter_int(i)),
filter_and(
filter_eq(
filter_evfun(database, ue_id_from_rnti, NULL,
filter_evarg(database, event, "rnti")),
filter_int(ue)),
filter_and(
filter_eq(filter_evarg(database, event, "eNB_ID"), filter_int(0)),
filter_eq(filter_evarg(database, event, "tb"),filter_int(tb)))));
}
static void set_current_ue(gui *g, enb_data *e, int ue) static void set_current_ue(gui *g, enb_data *e, int ue)
{ {
int i; int i,tb;
char s[256]; char s[256];
sprintf(s, "[UE %d] ", ue); sprintf(s, "[UE %d] ", ue);
...@@ -196,15 +212,17 @@ static void set_current_ue(gui *g, enb_data *e, int ue) ...@@ -196,15 +212,17 @@ static void set_current_ue(gui *g, enb_data *e, int ue)
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
logger_set_filter(e->e->dl_dci_logger[i], logger_set_filter(e->e->dl_dci_logger[i],
ticktime_filter(e->database, "ENB_PHY_DLSCH_UE_DCI", i, ue)); ticktime_filter(e->database, "ENB_PHY_DLSCH_UE_DCI", i, ue));
logger_set_filter(e->e->dl_ack_logger[i], for (tb=0; tb<2; tb++)
ticktime_filter(e->database, "ENB_PHY_DLSCH_UE_ACK", i, ue)); {
logger_set_filter(e->e->dl_nack_logger[i], logger_set_filter(e->e->dl_ack_logger[tb][i],
ticktime_filter(e->database, "ENB_PHY_DLSCH_UE_NACK", i, ue)); ticktime_filter_tb(e->database, "ENB_PHY_DLSCH_UE_ACK", i, ue,tb));
logger_set_filter(e->e->dl_nack_logger[tb][i],
ticktime_filter_tb(e->database, "ENB_PHY_DLSCH_UE_NACK", i, ue,tb));
}
logger_set_filter(e->e->ul_dci_logger[i], logger_set_filter(e->e->ul_dci_logger[i],
ticktime_filter(e->database, "ENB_PHY_ULSCH_UE_DCI", i, ue)); ticktime_filter(e->database, "ENB_PHY_ULSCH_UE_DCI", i, ue));
logger_set_filter(e->e->ul_dci_retransmission_logger[i], logger_set_filter(e->e->ul_dci_retransmission_logger[i],
ticktime_filter(e->database, ticktime_filter(e->database, "ENB_PHY_ULSCH_UE_NO_DCI_RETRANSMISSION", i, ue));
"ENB_PHY_ULSCH_UE_NO_DCI_RETRANSMISSION", i, ue));
logger_set_filter(e->e->ul_ack_logger[i], logger_set_filter(e->e->ul_ack_logger[i],
ticktime_filter(e->database, "ENB_PHY_ULSCH_UE_ACK", i, ue)); ticktime_filter(e->database, "ENB_PHY_ULSCH_UE_ACK", i, ue));
logger_set_filter(e->e->ul_nack_logger[i], logger_set_filter(e->e->ul_nack_logger[i],
...@@ -266,6 +284,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database, ...@@ -266,6 +284,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
widget *w, *w2; widget *w, *w2;
view *v; view *v;
logger *l; logger *l;
int tb;
main_window = new_toplevel_window(g, 1200, 900, "eNB tracer"); main_window = new_toplevel_window(g, 1200, 900, "eNB tracer");
top_container = new_container(g, VERTICAL); top_container = new_container(g, VERTICAL);
...@@ -468,12 +487,13 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database, ...@@ -468,12 +487,13 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
widget_add_child(g, top_container, e->dl_ul_harq_ue_label, -1); widget_add_child(g, top_container, e->dl_ul_harq_ue_label, -1);
line = new_container(g, HORIZONTAL); line = new_container(g, HORIZONTAL);
widget_add_child(g, top_container, line, -1); widget_add_child(g, top_container, line, -1);
timeline_plot = new_timeline(g, 512, 2*8+2, 3); timeline_plot = new_timeline(g, 512, 2*8+2+8, 3);
widget_add_child(g, line, timeline_plot, -1); widget_add_child(g, line, timeline_plot, -1);
container_set_child_growable(g, line, timeline_plot, 1); container_set_child_growable(g, line, timeline_plot, 1);
for (i = 0; i < 2*8+2; i++) for (i = 0; i < 2*8+2+8; i++)
timeline_set_subline_background_color(g, timeline_plot, i, timeline_set_subline_background_color(g, timeline_plot, i,
new_color(g, i==0 || i==9 ? "#ddd" : (i%9)&1 ? "#e6e6e6" : "#eee")); new_color(g, i >= 9 && i <= 16 ? (i%8)&1 ? "#e6e6bb" : "#eeb" :
i==0 || i==9+8 ? "#ddd" : (i%9)&1 ? "#e6e6e6" : "#eee"));
timeview = new_view_ticktime(10, g, timeline_plot); timeview = new_view_ticktime(10, g, timeline_plot);
ticktime_set_tick(timeview, ticktime_set_tick(timeview,
new_ticklog(h, database, "ENB_MASTER_TICK", "frame", "subframe")); new_ticklog(h, database, "ENB_MASTER_TICK", "frame", "subframe"));
...@@ -483,48 +503,50 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database, ...@@ -483,48 +503,50 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
subview = new_subview_ticktime(timeview, 0, new_color(g,"#bbb"), 3600*1000); subview = new_subview_ticktime(timeview, 0, new_color(g,"#bbb"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
/* tick on UL view */ /* tick on UL view */
subview = new_subview_ticktime(timeview, 9, new_color(g,"#bbb"), 3600*1000); subview = new_subview_ticktime(timeview,9+8,new_color(g,"#bbb"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
/* DL DCI */ /* DL DCI */
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
timelog = new_ticklog(h, database, "ENB_PHY_DLSCH_UE_DCI", timelog = new_ticklog(h, database, "ENB_PHY_DLSCH_UE_DCI",
"frame", "subframe"); "frame", "subframe");
subview = new_subview_ticktime(timeview, i+1, subview = new_subview_ticktime(timeview, i+1+0*8,
new_color(g,"#55f"), 3600*1000); new_color(g,"#55f"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
e->dl_dci_logger[i] = timelog; e->dl_dci_logger[i] = timelog;
} }
/* DL ACK */ /* DL ACK */
for (tb = 0; tb < 2; tb++)
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
timelog = new_ticklog(h, database, "ENB_PHY_DLSCH_UE_ACK", timelog = new_ticklog(h, database, "ENB_PHY_DLSCH_UE_ACK",
"frame", "subframe"); "frame", "subframe");
subview = new_subview_ticktime(timeview, i+1, subview = new_subview_ticktime(timeview, i+1+tb*8,
new_color(g,"#282"), 3600*1000); new_color(g,"#282"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
e->dl_ack_logger[i] = timelog; e->dl_ack_logger[tb][i] = timelog;
} }
/* DL NACK */ /* DL NACK */
for (tb = 0; tb < 2; tb++)
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
timelog = new_ticklog(h, database, "ENB_PHY_DLSCH_UE_NACK", timelog = new_ticklog(h, database, "ENB_PHY_DLSCH_UE_NACK",
"frame", "subframe"); "frame", "subframe");
subview = new_subview_ticktime(timeview, i+1, subview = new_subview_ticktime(timeview, i+1+tb*8,
new_color(g,"#f22"), 3600*1000); new_color(g,"#f22"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
e->dl_nack_logger[i] = timelog; e->dl_nack_logger[tb][i] = timelog;
} }
/* UL DCI/retransmission without DCI */ /* UL DCI/retransmission without DCI */
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
/* first transmission */ /* first transmission */
timelog = new_ticklog(h, database, "ENB_PHY_ULSCH_UE_DCI", timelog = new_ticklog(h, database, "ENB_PHY_ULSCH_UE_DCI",
"frame", "subframe"); "frame", "subframe");
subview = new_subview_ticktime(timeview, i+9+1, subview = new_subview_ticktime(timeview, i+9+1+8,
new_color(g,"#55f"), 3600*1000); new_color(g,"#55f"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
e->ul_dci_logger[i] = timelog; e->ul_dci_logger[i] = timelog;
/* retransmission */ /* retransmission */
timelog = new_ticklog(h, database, timelog = new_ticklog(h, database,
"ENB_PHY_ULSCH_UE_NO_DCI_RETRANSMISSION", "frame", "subframe"); "ENB_PHY_ULSCH_UE_NO_DCI_RETRANSMISSION", "frame", "subframe");
subview = new_subview_ticktime(timeview, i+9+1, subview = new_subview_ticktime(timeview, i+9+1+8,
new_color(g,"#99f"), 3600*1000); new_color(g,"#99f"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
e->ul_dci_retransmission_logger[i] = timelog; e->ul_dci_retransmission_logger[i] = timelog;
...@@ -533,7 +555,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database, ...@@ -533,7 +555,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
timelog = new_ticklog(h, database, "ENB_PHY_ULSCH_UE_ACK", timelog = new_ticklog(h, database, "ENB_PHY_ULSCH_UE_ACK",
"frame", "subframe"); "frame", "subframe");
subview = new_subview_ticktime(timeview, i+9+1, subview = new_subview_ticktime(timeview, i+9+1+8,
new_color(g,"#282"), 3600*1000); new_color(g,"#282"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
e->ul_ack_logger[i] = timelog; e->ul_ack_logger[i] = timelog;
...@@ -542,7 +564,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database, ...@@ -542,7 +564,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
timelog = new_ticklog(h, database, "ENB_PHY_ULSCH_UE_NACK", timelog = new_ticklog(h, database, "ENB_PHY_ULSCH_UE_NACK",
"frame", "subframe"); "frame", "subframe");
subview = new_subview_ticktime(timeview, i+9+1, subview = new_subview_ticktime(timeview, i+9+1+8,
new_color(g,"#f22"), 3600*1000); new_color(g,"#f22"), 3600*1000);
logger_add_view(timelog, subview); logger_add_view(timelog, subview);
e->ul_nack_logger[i] = timelog; e->ul_nack_logger[i] = timelog;
......
...@@ -652,10 +652,14 @@ void phy_config_dedicated_eNB(uint8_t Mod_id, ...@@ -652,10 +652,14 @@ void phy_config_dedicated_eNB(uint8_t Mod_id,
break; break;
case AntennaInfoDedicated__transmissionMode_tm7: case AntennaInfoDedicated__transmissionMode_tm7:
lte_gold_ue_spec_port5(eNB->lte_gold_uespec_port5_table[0],eNB->frame_parms.Nid_cell,rnti); lte_gold_ue_spec_port5(eNB->lte_gold_uespec_port5_table[0],eNB->frame_parms.Nid_cell,rnti);
for (i=0;i<eNB->num_RU;i++) eNB->RU_list[i]->do_precoding=1; for (i=0;i<eNB->num_RU;i++) eNB->RU_list[i]->do_precoding=1;
eNB->transmission_mode[UE_id] = 7; eNB->transmission_mode[UE_id] = 7;
break; break;
case AntennaInfoDedicated__transmissionMode_tm8_v920:
lte_gold_ue_spec(eNB->lte_gold_uespec_table,eNB->frame_parms.Nid_cell,NULL);
for (i=0;i<eNB->num_RU;i++) eNB->RU_list[i]->do_precoding=1;
eNB->transmission_mode[UE_id] = 8;
break;
default: default:
LOG_E(PHY,"Unknown transmission mode!\n"); LOG_E(PHY,"Unknown transmission mode!\n");
break; break;
...@@ -887,6 +891,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -887,6 +891,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
eNB->pdsch_config_dedicated->p_a = dB0; //defaul value until overwritten by RRCConnectionReconfiguration eNB->pdsch_config_dedicated->p_a = dB0; //defaul value until overwritten by RRCConnectionReconfiguration
/*init the ue spec reference sequence for TM8/9*/
lte_gold_ue_spec(eNB->lte_gold_uespec_table,eNB->frame_parms.Nid_cell, NULL);
return (0); return (0);
......
...@@ -114,15 +114,15 @@ int phy_init_RU(RU_t *ru) { ...@@ -114,15 +114,15 @@ int phy_init_RU(RU_t *ru) {
for (i=0; i<RC.nb_L1_inst; i++) { for (i=0; i<RC.nb_L1_inst; i++) {
for (p=0;p<15;p++) { for (p=0;p<15;p++) {
LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB); LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB);
if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) { if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5 || i==7 || i==8) {
LOG_D(PHY,"[INIT] %s() DO BEAM WEIGHTS nb_antenna_ports_eNB:%d nb_tx:%d\n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB, ru->nb_tx); LOG_D(PHY,"[INIT] %s() DO BEAM WEIGHTS nb_antenna_ports_eNB:%d nb_tx:%d\n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB, ru->nb_tx);
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*)); ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
for (j=0; j<ru->nb_tx; j++) { for (j=0; j<ru->nb_tx; j++) {
ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t)); ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
// antenna ports 0-3 are mapped on antennas 0-3 // antenna ports 0-3 are mapped on antennas 0-3
// antenna port 4 is mapped on antenna 0 // antenna port 4,5,7 is mapped on antenna 0
// antenna ports 5-14 are mapped on all antennas // antenna ports 8 are mapped on antenna 1
if (((p<4) && (p==j)) || ((p==4) && (j==0))) { if (((p<4) && (p==j)) || ((p==4) && (j==0)) || ((p==5) && (j==0)) || ((p==7) && (j==0)) || ((p==8) && (j==1)) ) {
for (re=0; re<fp->ofdm_symbol_size; re++) for (re=0; re<fp->ofdm_symbol_size; re++)
{ {
ru->beam_weights[i][p][j][re] = 0x00007fff; ru->beam_weights[i][p][j][re] = 0x00007fff;
...@@ -130,6 +130,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -130,6 +130,7 @@ int phy_init_RU(RU_t *ru) {
//LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]); //LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
} }
} }
/*
else if (p>4) { else if (p>4) {
for (re=0; re<fp->ofdm_symbol_size; re++) for (re=0; re<fp->ofdm_symbol_size; re++)
{ {
...@@ -137,6 +138,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -137,6 +138,7 @@ int phy_init_RU(RU_t *ru) {
//LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]); //LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
} }
} }
*/
//LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d] = %p (%lu bytes)\n", i,j,ru->beam_weights[i][p][j], fp->ofdm_symbol_size*sizeof(int32_t)); //LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d] = %p (%lu bytes)\n", i,j,ru->beam_weights[i][p][j], fp->ofdm_symbol_size*sizeof(int32_t));
} // for (j=0 } // for (j=0
} // if (p<ru } // if (p<ru
......
...@@ -147,15 +147,21 @@ void lte_param_init(PHY_VARS_eNB **eNBp, ...@@ -147,15 +147,21 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
// DL power control init // DL power control init
//if (transmission_mode == 1) { //if (transmission_mode == 1) {
UE->pdsch_config_dedicated->p_a = pa; if (N_tx_port_eNB == 1) {
eNB->pdsch_config_dedicated->p_a = dB0;
if (transmission_mode == 1 || transmission_mode ==7) {
((eNB->frame_parms).pdsch_config_common).p_b = 0; ((eNB->frame_parms).pdsch_config_common).p_b = 0;
UE->pdsch_config_dedicated->p_a = dB0;
((UE->frame_parms).pdsch_config_common).p_b = 0; ((UE->frame_parms).pdsch_config_common).p_b = 0;
} else { // rho_a = rhob } else if (N_tx_port_eNB == 2) { // rho_a = rhob
eNB->pdsch_config_dedicated->p_a = dBm3;
((eNB->frame_parms).pdsch_config_common).p_b = 1; ((eNB->frame_parms).pdsch_config_common).p_b = 1;
UE->pdsch_config_dedicated->p_a = dBm3;
((UE->frame_parms).pdsch_config_common).p_b = 1; ((UE->frame_parms).pdsch_config_common).p_b = 1;
} }
else {
LOG_E(PHY,"only 1 or 2 cell specific antenna ports supported!\n");
exit(-1);
}
UE->perfect_ce = perfect_ce; UE->perfect_ce = perfect_ce;
......
...@@ -81,49 +81,44 @@ void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14] ...@@ -81,49 +81,44 @@ void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14]
} }
} }
void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS) void lte_gold_ue_spec(uint32_t lte_gold_uespec_table[2][20][2][100],uint16_t Nid_cell, uint16_t *n_idDMRS)
{ {
unsigned char ns,l; unsigned char ns,l;
unsigned int n,x1,x2;//,x1tmp,x2tmp; unsigned int n,x1,x2;
int nscid; int nscid;
int nid; int nid;
for (nscid=0; nscid<2; nscid++) { for (nscid=0; nscid<2; nscid++) {
if (n_idDMRS) if (n_idDMRS){
nid = n_idDMRS[nscid]; nid = n_idDMRS[nscid];
else } else {
nid = Nid_cell; nid = Nid_cell;
}
for (ns=0; ns<20; ns++) { for (ns=0; ns<20; ns++) { //do only slot=14,15, subframe=7
for (l=0; l<2; l++) { for (l=0; l<2; l++) {
x2 = ((((ns>>1)+1)*((nid<<1)+1))<<16) + nscid; //cinit at the start of each subframe
x2 = ((((ns>>1)+1)*((nid<<1)+1))<<16) + nscid;
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit //x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
//n = 0 x1 = 1 + (1<<31);
// printf("cinit (ns %d, l %d) => %d\n",ns,l,x2); x2 = x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
x1 = 1+ (1<<31);
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
// skip first 50 double words (1600 bits) // skip first 50 double words (1600 bits)
//printf("n=0 : x1 %x, x2 %x\n",x1,x2);
for (n=1; n<50; n++) { for (n=1; n<50; n++) {
x1 = (x1>>1) ^ (x1>>4); x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28); x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4); x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28); x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
// printf("x1 : %x, x2 : %x\n",x1,x2);
} }
for (n=0; n<14; n++) { for (n=0; n<100; n++) {
x1 = (x1>>1) ^ (x1>>4); x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28); x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4); x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28); x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
lte_gold_uespec_table[nscid][ns][l][n] = x1^x2; lte_gold_uespec_table[nscid][ns][l][n] = x1^x2;
// printf("n=%d : c %x\n",n,x1^x2);
} }
} }
...@@ -131,7 +126,7 @@ void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_t ...@@ -131,7 +126,7 @@ void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_t
} }
} }
void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_t Nid_cell, uint16_t n_rnti) void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][75],uint16_t Nid_cell, uint16_t n_rnti)
{ {
unsigned char ns; unsigned char ns;
...@@ -157,7 +152,7 @@ void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_ ...@@ -157,7 +152,7 @@ void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_
//printf("x1 : %x, x2 : %x\n",x1,x2); //printf("x1 : %x, x2 : %x\n",x1,x2);
} }
for (n=0; n<38; n++) { for (n=0; n<75; n++) {
x1 = (x1>>1) ^ (x1>>4); x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28); x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4); x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
...@@ -208,7 +203,7 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char ...@@ -208,7 +203,7 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char
main() main()
{ {
lte_gold(423,0); lte_gold(0,0);
} }
#endif #endif
......
...@@ -43,19 +43,19 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char ...@@ -43,19 +43,19 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char
@param frame_parms LTE DL Frame parameters @param frame_parms LTE DL Frame parameters
@param lte_gold_table pointer to table where sequences are stored @param lte_gold_table pointer to table where sequences are stored
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells) */ @param Nid_cell Cell Id (to compute sequences for local and adjacent cells) */
void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14],uint16_t Nid_cell); void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14],uint16_t Nid_cell);
void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS); /*! \brief This function generates the LTE Gold sequence for DL UE-specific pilots for antenna ports 7,...,14 (transmission modes 8/9) */
void lte_gold_ue_spec(uint32_t lte_gold_uespec_table[2][20][2][100],uint16_t Nid_cell, uint16_t *n_idDMRS);
void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_t Nid_cell, uint16_t n_rnti); /*! \brief This function generates the LTE Gold sequence for DL UE-specific pilots for antenna port 5 (transmission mode 7) */
void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][75],uint16_t Nid_cell, uint16_t n_rnti);
/*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL UE-specific reference signals for antenna ports 7..14. /*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL UE-specific reference signals for antenna ports 7..14.
@param frame_parms LTE DL Frame parameters @param frame_parms LTE DL Frame parameters
@param lte_gold_uespec_table pointer to table where sequences are stored @param lte_gold_uespec_table pointer to table where sequences are stored
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells) @param Nid_cell Cell Id (to compute sequences for local and adjacent cells)
@param n_idDMRS Scrambling identity for TM10*/ @param n_idDMRS Scrambling identity for TM10*/
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_MBSFN); void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_MBSFN);
......
...@@ -229,6 +229,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t ...@@ -229,6 +229,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
uint8_t *dci_pdu = &dci_alloc->dci_pdu[0]; uint8_t *dci_pdu = &dci_alloc->dci_pdu[0];
nfapi_dl_config_dci_dl_pdu_rel8_t *rel8 = &pdu->dci_dl_pdu_rel8; nfapi_dl_config_dci_dl_pdu_rel8_t *rel8 = &pdu->dci_dl_pdu_rel8;
nfapi_dl_config_dci_dl_pdu_rel9_t *rel9 = &pdu->dci_dl_pdu_rel9;
/* check if this is a DCI 1A PDCCH order for RAPROC */ /* check if this is a DCI 1A PDCCH order for RAPROC */
if (rel8->dci_format == NFAPI_DL_DCI_FORMAT_1A && rel8->rnti_type == 1) { if (rel8->dci_format == NFAPI_DL_DCI_FORMAT_1A && rel8->rnti_type == 1) {
...@@ -794,11 +795,10 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t ...@@ -794,11 +795,10 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2; ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->TPC = rel8->tpc; ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process; ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->tb_swap = rel8->transport_block_to_codeword_swap_flag; ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->tb_swap = rel8->transport_block_to_codeword_swap_flag;
((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->padding = 0; ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->padding = 0;
} }
break; break;
} }
AssertFatal(rel8->harq_process<8,"Format 2_2A: harq_pid=%d >= 8\n", rel8->harq_process); AssertFatal(rel8->harq_process<8,"Format 2_2A: harq_pid=%d >= 8\n", rel8->harq_process);
...@@ -1370,6 +1370,285 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t ...@@ -1370,6 +1370,285 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
dlsch1->rnti = rel8->rnti; dlsch1->rnti = rel8->rnti;
break; break;
case NFAPI_DL_DCI_FORMAT_2B:
dci_alloc->format = format2B;
switch (fp->N_RB_DL) {
case 6:
if (fp->frame_type == TDD) {
dci_alloc->dci_length = sizeof_DCI2B_1_5MHz_TDD_t;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->mcs1 = rel8->mcs_1;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->mcs2 = rel8->mcs_2;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->ndi1 = rel8->new_data_indicator_1;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->ndi2 = rel8->new_data_indicator_2;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rballoc = rel8->resource_block_coding;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rv1 = rel8->redundancy_version_1;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->dai = rel8->downlink_assignment_index;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->scrambling_id = rel9->scrambling_identity;
((DCI2B_1_5MHz_TDD_t *)dci_pdu)->padding = 0;
} else {
dci_alloc->dci_length = sizeof_DCI2B_1_5MHz_FDD_t;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->mcs1 = rel8->mcs_1;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->mcs2 = rel8->mcs_2;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->ndi1 = rel8->new_data_indicator_1;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->ndi2 = rel8->new_data_indicator_2;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rballoc = rel8->resource_block_coding;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rv1 = rel8->redundancy_version_1;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->scrambling_id = rel9->scrambling_identity;
((DCI2B_1_5MHz_FDD_t *)dci_pdu)->padding = 0;
// printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
break;
case 25:
if (fp->frame_type == TDD) {
dci_alloc->dci_length = sizeof_DCI2B_5MHz_TDD_t;
((DCI2B_5MHz_TDD_t *)dci_pdu)->mcs1 = rel8->mcs_1;
((DCI2B_5MHz_TDD_t *)dci_pdu)->mcs2 = rel8->mcs_2;
((DCI2B_5MHz_TDD_t *)dci_pdu)->ndi1 = rel8->new_data_indicator_1;
((DCI2B_5MHz_TDD_t *)dci_pdu)->ndi2 = rel8->new_data_indicator_2;
((DCI2B_5MHz_TDD_t *)dci_pdu)->rballoc = rel8->resource_block_coding;
((DCI2B_5MHz_TDD_t *)dci_pdu)->rv1 = rel8->redundancy_version_1;
((DCI2B_5MHz_TDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2B_5MHz_TDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2B_5MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2B_5MHz_TDD_t *)dci_pdu)->dai = rel8->downlink_assignment_index;
((DCI2B_5MHz_TDD_t *)dci_pdu)->scrambling_id = rel9->scrambling_identity;
((DCI2B_5MHz_TDD_t *)dci_pdu)->padding = 0;
// printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
} else {
dci_alloc->dci_length = sizeof_DCI2B_5MHz_FDD_t;
((DCI2B_5MHz_FDD_t *)dci_pdu)->mcs1 = rel8->mcs_1;
((DCI2B_5MHz_FDD_t *)dci_pdu)->mcs2 = rel8->mcs_2;
((DCI2B_5MHz_FDD_t *)dci_pdu)->ndi1 = rel8->new_data_indicator_1;
((DCI2B_5MHz_FDD_t *)dci_pdu)->ndi2 = rel8->new_data_indicator_2;
((DCI2B_5MHz_FDD_t *)dci_pdu)->rballoc = rel8->resource_block_coding;
((DCI2B_5MHz_FDD_t *)dci_pdu)->rv1 = rel8->redundancy_version_1;
((DCI2B_5MHz_FDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2B_5MHz_FDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2B_5MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2B_5MHz_FDD_t *)dci_pdu)->scrambling_id = rel9->scrambling_identity;
((DCI2B_5MHz_FDD_t *)dci_pdu)->padding = 0;
// printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
break;
case 50:
if (fp->frame_type == TDD) {
dci_alloc->dci_length = sizeof_DCI2B_10MHz_TDD_t;
((DCI2B_10MHz_TDD_t *)dci_pdu)->mcs1 = rel8->mcs_1;
((DCI2B_10MHz_TDD_t *)dci_pdu)->mcs2 = rel8->mcs_2;
((DCI2B_10MHz_TDD_t *)dci_pdu)->ndi1 = rel8->new_data_indicator_1;
((DCI2B_10MHz_TDD_t *)dci_pdu)->ndi2 = rel8->new_data_indicator_2;
((DCI2B_10MHz_TDD_t *)dci_pdu)->rballoc = rel8->resource_block_coding;
((DCI2B_10MHz_TDD_t *)dci_pdu)->rv1 = rel8->redundancy_version_1;
((DCI2B_10MHz_TDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2B_10MHz_TDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2B_10MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2B_10MHz_TDD_t *)dci_pdu)->dai = rel8->downlink_assignment_index;
((DCI2B_10MHz_TDD_t *)dci_pdu)->scrambling_id = rel9->scrambling_identity;
((DCI2B_10MHz_TDD_t *)dci_pdu)->padding = 0;
// printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
} else {
dci_alloc->dci_length = sizeof_DCI2B_10MHz_FDD_t;
((DCI2B_10MHz_FDD_t *)dci_pdu)->mcs1 = rel8->mcs_1;
((DCI2B_10MHz_FDD_t *)dci_pdu)->mcs2 = rel8->mcs_2;
((DCI2B_10MHz_FDD_t *)dci_pdu)->ndi1 = rel8->new_data_indicator_1;
((DCI2B_10MHz_FDD_t *)dci_pdu)->ndi2 = rel8->new_data_indicator_2;
((DCI2B_10MHz_FDD_t *)dci_pdu)->rballoc = rel8->resource_block_coding;
((DCI2B_10MHz_FDD_t *)dci_pdu)->rv1 = rel8->redundancy_version_1;
((DCI2B_10MHz_FDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2B_10MHz_FDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2B_10MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2B_10MHz_FDD_t *)dci_pdu)->scrambling_id = rel9->scrambling_identity;
((DCI2B_10MHz_FDD_t *)dci_pdu)->padding = 0;
}
break;
case 100:
if (fp->frame_type == TDD) {
dci_alloc->dci_length = sizeof_DCI2B_20MHz_TDD_t;
((DCI2B_20MHz_TDD_t *)dci_pdu)->mcs1 = rel8->mcs_1;
((DCI2B_20MHz_TDD_t *)dci_pdu)->mcs2 = rel8->mcs_2;
((DCI2B_20MHz_TDD_t *)dci_pdu)->ndi1 = rel8->new_data_indicator_1;
((DCI2B_20MHz_TDD_t *)dci_pdu)->ndi2 = rel8->new_data_indicator_2;
((DCI2B_20MHz_TDD_t *)dci_pdu)->rballoc = rel8->resource_block_coding;
((DCI2B_20MHz_TDD_t *)dci_pdu)->rv1 = rel8->redundancy_version_1;
((DCI2B_20MHz_TDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2B_20MHz_TDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2B_20MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2B_20MHz_TDD_t *)dci_pdu)->dai = rel8->downlink_assignment_index;
((DCI2B_20MHz_TDD_t *)dci_pdu)->scrambling_id = rel9->scrambling_identity;
((DCI2B_20MHz_TDD_t *)dci_pdu)->padding = 0;
// printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
} else {
dci_alloc->dci_length = sizeof_DCI2B_20MHz_FDD_t;
((DCI2B_20MHz_FDD_t *)dci_pdu)->mcs1 = rel8->mcs_1;
((DCI2B_20MHz_FDD_t *)dci_pdu)->mcs2 = rel8->mcs_2;
((DCI2B_20MHz_FDD_t *)dci_pdu)->ndi1 = rel8->new_data_indicator_1;
((DCI2B_20MHz_FDD_t *)dci_pdu)->ndi2 = rel8->new_data_indicator_2;
((DCI2B_20MHz_FDD_t *)dci_pdu)->rballoc = rel8->resource_block_coding;
((DCI2B_20MHz_FDD_t *)dci_pdu)->rv1 = rel8->redundancy_version_1;
((DCI2B_20MHz_FDD_t *)dci_pdu)->rv2 = rel8->redundancy_version_2;
((DCI2B_20MHz_FDD_t *)dci_pdu)->TPC = rel8->tpc;
((DCI2B_20MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
((DCI2B_20MHz_FDD_t *)dci_pdu)->scrambling_id = rel9->scrambling_identity;
((DCI2B_20MHz_FDD_t *)dci_pdu)->padding = 0;
}
break;
}
AssertFatal(rel8->harq_process>=8, "ERROR: Format 2B: harq_pid=%d >= 8\n", rel8->harq_process);
/*
If both transport blocks are enabled, the number of layers equals two; transport block 1 is mapped to codeword 0; and transport block 2 is mapped to codeword 1. Antenna ports 7 and 8 are used for spatial multiplexing.
In case one of the transport blocks is disabled, the number of layers equals one; the active transport block is mapped to codeword 0; and the antenna port for single-antenna port transmission is according to the ndi of the disabled TB (0 -> 7, 1 -> 8)
*/
TB0_active = 1;
TB1_active = 1;
if ((rel8->redundancy_version_1 == 1) && (rel8->mcs_1 == 0)) {
TB0_active=0;
}
if ((rel8->redundancy_version_2 == 1) && (rel8->mcs_2 == 0)) {
TB1_active=0;
}
if (TB0_active && TB1_active) {
dlsch0=eNB->dlsch[UE_id][0];
dlsch1=eNB->dlsch[UE_id][1];
dlsch0->active = 1;
dlsch1->active = 1;
dlsch0->harq_mask |= (1<<rel8->harq_process);
dlsch1->harq_mask |= (1<<rel8->harq_process);
dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
dlsch0_harq->Qm = get_Qm(rel8->mcs_1);
dlsch1_harq->Qm = get_Qm(rel8->mcs_2);
dlsch0_harq->rvidx = rel8->redundancy_version_1;
dlsch1_harq->rvidx = rel8->redundancy_version_2;
dlsch0_harq->status = ACTIVE;
dlsch1_harq->status = ACTIVE;
dlsch0_harq->codeword=0;
dlsch1_harq->codeword=1;
dlsch0_harq->first_layer=7;
dlsch1_harq->first_layer=8;
#ifdef DEBUG_HARQ
printf("\n ENB: BOTH ACTIVE\n");
#endif
}
else if (TB0_active && (TB1_active==0)) {
dlsch0=eNB->dlsch[UE_id][0];
dlsch0->active = 1;
dlsch0->harq_mask |= (1<<rel8->harq_process);
dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
dlsch0_harq->Qm = get_Qm(rel8->mcs_1);
dlsch0_harq->rvidx = rel8->redundancy_version_1;
dlsch0_harq->status = ACTIVE;
dlsch0_harq->codeword = 0;
dlsch0_harq->first_layer = (rel8->new_data_indicator_2==0 ? 7 : 8);
dlsch1=NULL;
dlsch1_harq = NULL;
#ifdef DEBUG_HARQ
printf("\n ENB: TB1 is deactivated, retransmit TB0 transmit in TM6\n");
#endif
}
else if ((TB0_active==0) && TB1_active) {
dlsch1=eNB->dlsch[UE_id][1];
dlsch1->active = 1;
dlsch1->harq_mask |= (1<<rel8->harq_process);
dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
dlsch1_harq->Qm = get_Qm(rel8->mcs_2);
dlsch1_harq->rvidx = rel8->redundancy_version_2;
dlsch1_harq->status = ACTIVE;
dlsch1_harq->codeword = 0;
dlsch1_harq->first_layer = (rel8->new_data_indicator_1==0 ? 7 : 8);
dlsch0=NULL;
dlsch0_harq = NULL;
#ifdef DEBUG_HARQ
printf("\n ENB: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
#endif
}
else {
LOG_E(PHY,"should not happen (rv1 %d mcs1 %d TB0_active %d, rv2 %d mcs2 %d TB1_active %d)!\n",rel8->redundancy_version_1,rel8->mcs_1,TB0_active,rel8->redundancy_version_2,rel8->mcs_2,TB1_active);
AssertFatal(0,"should not happen\n");
}
if (dlsch0 != NULL) {
dlsch0->rnti = rel8->rnti;
dlsch0->subframe_tx[subframe] = 1;
dlsch0->harq_ids[subframe] = rel8->harq_process;
}
if (dlsch1 != NULL) {
dlsch1->rnti = rel8->rnti;
dlsch1->subframe_tx[subframe] = 1;
dlsch1->harq_ids[subframe] = rel8->harq_process;
}
// printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe);
if (dlsch0 != NULL) {
conv_rballoc(rel8->resource_allocation_type,
rel8->resource_block_coding,
fp->N_RB_DL,
dlsch0_harq->rb_alloc);
dlsch0_harq->nb_rb = conv_nprb(rel8->resource_allocation_type,
rel8->resource_block_coding,
fp->N_RB_DL);
if (dlsch1!=NULL) {
memcpy(dlsch1_harq->rb_alloc,dlsch0_harq->rb_alloc,4*sizeof(uint32_t));
dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
}
} else if ((dlsch0 == NULL ) && (dlsch1 != NULL )) {
conv_rballoc(rel8->resource_allocation_type,
rel8->resource_block_coding,
fp->N_RB_DL,
dlsch1_harq->rb_alloc);
dlsch1_harq->nb_rb = conv_nprb(rel8->resource_allocation_type,
rel8->resource_block_coding,
fp->N_RB_DL);
}
if (dlsch0_harq != NULL) {
if (dlsch0_harq->nb_rb > 0) {
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1];
} else {
dlsch0_harq->TBS = 0;
}
dlsch0_harq->Nl = 1;
dlsch0_harq->dl_power_off = 1;
dlsch0_harq->mimo_mode = TM8; //this DCI can only be used in TM8
dlsch0_harq->Nlayers = 1;
dlsch0_harq->nscid = rel9->scrambling_identity;
}
if (dlsch1_harq != NULL) {
if (dlsch1_harq->nb_rb > 0) {
dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1];
} else {
dlsch1_harq->TBS = 0;
}
dlsch1_harq->Nl = 1;
dlsch1_harq->dl_power_off = 1;
dlsch1_harq->mimo_mode = TM8; //this DCI can only be used in TM8
dlsch1_harq->Nlayers = 1;
dlsch1_harq->nscid = rel9->scrambling_identity;
}
break;
} }
if (dlsch0_harq) { if (dlsch0_harq) {
......
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
#include "PHY/LTE_TRANSPORT/transport_proto.h" #include "PHY/LTE_TRANSPORT/transport_proto.h"
//#define DEBUG_DLSCH_MODULATION //#define DEBUG_DLSCH_MODULATION
#define NEW_ALLOC_RE //#define NEW_ALLOC_RE
//note FK: NEW_ALLOC_RE not yet working with TM8 changes
//#define is_not_pilot(pilots,re,nushift,use2ndpilots) ((pilots==0) || ((re!=nushift) && (re!=nushift+6)&&((re!=nushift+3)||(use2ndpilots==1))&&((re!=nushift+9)||(use2ndpilots==1)))?1:0) //#define is_not_pilot(pilots,re,nushift,use2ndpilots) ((pilots==0) || ((re!=nushift) && (re!=nushift+6)&&((re!=nushift+3)||(use2ndpilots==1))&&((re!=nushift+9)||(use2ndpilots==1)))?1:0)
...@@ -63,23 +64,20 @@ uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2nd ...@@ -63,23 +64,20 @@ uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2nd
return(0); return(0);
} }
/*uint8_t is_not_UEspecRS(int first_layer,int re) uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode, uint8_t Ns)
{ {
return(1); uint8_t offset = 0;
}*/
uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode)
{
uint8_t offset = (lprime==1||lprime==3)?2:0;
if (lprime==-1) if (lprime==-1)
return(1); return(1);
switch (beamforming_mode) { switch (beamforming_mode) {
case 7: case 7:
offset = (lprime==1||lprime==3)?2:0;
if (Ncp == NORMAL){ if (Ncp == NORMAL){
if ((re!=nushift+offset) && (re!=((nushift+4+offset)%12)) && (re!=((nushift+8+offset)%12))) if ((re!=nushift+offset) && (re!=((nushift+4+offset)%12)) && (re!=((nushift+8+offset)%12)))
return(1); return(1);
/*else{ /*else{
LOG_I(PHY,"(is_no_UEspec_RS):lprime=%d, re=%d, nushift=%d, offset=%d\n",lprime, re,nushift,offset); printf("(is_no_UEspec_RS):lprime=%d, re=%d, nushift=%d, offset=%d\n",lprime, re,nushift,offset);
}*/ }*/
} else { } else {
if ((re!=nushift+offset) && (re!=((nushift+3+offset)%12)) && (re!=((nushift+6+offset)%12)) && (re!=((nushift+9+offset)%12))) if ((re!=nushift+offset) && (re!=((nushift+3+offset)%12)) && (re!=((nushift+6+offset)%12)) && (re!=((nushift+9+offset)%12)))
...@@ -87,6 +85,21 @@ uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, ...@@ -87,6 +85,21 @@ uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp,
} }
break; break;
case 8:/*ToDo (36.211 v11.3 p86)*/ /* Mapping to REs */
if (Ncp == NORMAL){
if ((re!=offset+1) && (re!=5+offset+1) && (re!=10+offset+1))
return(1);
} else {
if (Ns%2==0) { // even slot in a subframe
if ((re!=offset+1) && (re!=3+offset+1) && (re!=6+offset+1) && (re!=9+offset+1))
return(1);
} else { // odd slot in a subframe
if ((re!=offset+2) && (re!=3+offset+2) && (re!=6+offset+2) && (re!=9+offset+2))
return(1);
}
}
break;
default: default:
LOG_E(PHY,"is_not_UEspecRS() [dlsch_modulation.c] : ERROR, unknown beamforming_mode %d\n",beamforming_mode); LOG_E(PHY,"is_not_UEspecRS() [dlsch_modulation.c] : ERROR, unknown beamforming_mode %d\n",beamforming_mode);
return(-1); return(-1);
...@@ -387,7 +400,7 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -387,7 +400,7 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
{ {
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
uint8_t *x0 = dlsch0_harq->e; uint8_t *x0 = dlsch0_harq->e;
uint32_t qam16_table_offset_re = 0; uint32_t qam16_table_offset_re = 0;
...@@ -614,7 +627,7 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -614,7 +627,7 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
{ {
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
uint8_t *x0 = dlsch0_harq->e; uint8_t *x0 = dlsch0_harq->e;
uint32_t qam64_table_offset_re = 0; uint32_t qam64_table_offset_re = 0;
...@@ -683,10 +696,11 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -683,10 +696,11 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
return(0); return(0);
} }
int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, int allocate_REs_in_RB(PHY_VARS_eNB *phy_vars_eNB,
int32_t **txdataF, int32_t **txdataF,
uint32_t *jj, uint32_t *jj,
uint32_t *jj2, uint32_t *jj2,
uint16_t rb,
uint16_t re_offset, uint16_t re_offset,
uint32_t symbol_offset, uint32_t symbol_offset,
LTE_DL_eNB_HARQ_t *dlsch0_harq, LTE_DL_eNB_HARQ_t *dlsch0_harq,
...@@ -703,25 +717,26 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -703,25 +717,26 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
uint8_t mprime, uint8_t mprime,
uint8_t Ns, uint8_t Ns,
int *P1_SHIFT, int *P1_SHIFT,
int *P2_SHIFT) int *P2_SHIFT,
uint8_t nscid)
{ {
uint8_t *x0 = NULL;
MIMO_mode_t mimo_mode = -1;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
MIMO_mode_t mimo_mode = -1;
// first codeword
int first_layer0 = -1; //= dlsch0_harq->first_layer; uint8_t *x0 = NULL;
int Nlayers0 = -1; // = dlsch0_harq->Nlayers; int Nlayers0=-1;
int first_layer0 = -1;
uint8_t mod_order0=0; uint8_t mod_order0=0;
uint8_t mod_order1=0; uint8_t precoder_index0;
uint8_t precoder_index0,precoder_index1;
// second codeword (TM3-4, TM8-10)
uint8_t *x1=NULL; uint8_t *x1=NULL;
// Fill these in later for TM8-10 int Nlayers1=-1;
// int Nlayers1; int first_layer1=-1;
// int first_layer1; uint8_t mod_order1=0;
uint8_t precoder_index1;
int use2ndpilots = (frame_parms->nb_antenna_ports_eNB==1)?1:0; int use2ndpilots = (frame_parms->nb_antenna_ports_eNB==1)?1:0;
...@@ -749,21 +764,33 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -749,21 +764,33 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
int32_t tmp_sample1,tmp_sample2; int32_t tmp_sample1,tmp_sample2;
int16_t tmp_amp=amp; int16_t tmp_amp=amp;
int s=1; int s=1;
int mprime2 = mprime,ind,ind_dword,ind_qpsk_symb; int mprime2 = mprime,ind,ind_dword,ind_qpsk_symb,p,w;
/* The sequence w_bar for normal cyclic prefix */
int Wbar_NCP_0[8][4] = {{1,1,1,1},{1,-1,1,-1},{1,1,1,1},{1,-1,1,-1},{1,1,-1,-1},{-1,-1,1,1},{1,-1,-1,1},{-1,1,1,-1}} ;
/* The sequence w_bar for extended cyclic prefix */
int Wbar_NCP_1[2][2] = {{1,1},{-1,1}};
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15); gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15);
int32_t qpsk[4]; int32_t qpsk[4],nqpsk[4],*qpsk_p;
((int16_t *)&qpsk[0])[0] = gain_lin_QPSK; ((int16_t *)&qpsk[0])[0] = gain_lin_QPSK;
((int16_t *)&qpsk[0])[1] = gain_lin_QPSK; ((int16_t *)&qpsk[0])[1] = gain_lin_QPSK;
((int16_t *)&qpsk[1])[0] = -gain_lin_QPSK; ((int16_t *)&qpsk[1])[0] = -gain_lin_QPSK;
((int16_t *)&qpsk[1])[1] = gain_lin_QPSK;; ((int16_t *)&qpsk[1])[1] = gain_lin_QPSK;
((int16_t *)&qpsk[2])[0] = gain_lin_QPSK;; ((int16_t *)&qpsk[2])[0] = gain_lin_QPSK;
((int16_t *)&qpsk[2])[1] = -gain_lin_QPSK;; ((int16_t *)&qpsk[2])[1] = -gain_lin_QPSK;
((int16_t *)&qpsk[3])[0] = -gain_lin_QPSK;; ((int16_t *)&qpsk[3])[0] = -gain_lin_QPSK;
((int16_t *)&qpsk[3])[1] = -gain_lin_QPSK; ((int16_t *)&qpsk[3])[1] = -gain_lin_QPSK;
if ((dlsch0_harq != NULL) && (dlsch1_harq != NULL)) { //this is for TM3, TM4 ((int16_t *)&nqpsk[0])[0] = -gain_lin_QPSK;
((int16_t *)&nqpsk[0])[1] = -gain_lin_QPSK;
((int16_t *)&nqpsk[1])[0] = gain_lin_QPSK;
((int16_t *)&nqpsk[1])[1] = -gain_lin_QPSK;
((int16_t *)&nqpsk[2])[0] = -gain_lin_QPSK;
((int16_t *)&nqpsk[2])[1] = gain_lin_QPSK;
((int16_t *)&nqpsk[3])[0] = gain_lin_QPSK;
((int16_t *)&nqpsk[3])[1] = gain_lin_QPSK;
if (dlsch0_harq && (dlsch0_harq->status == ACTIVE) && dlsch1_harq && (dlsch1_harq->status == ACTIVE)) { //this is for TM3, TM4, TM8
x0 = dlsch0_harq->e; x0 = dlsch0_harq->e;
mimo_mode = dlsch0_harq->mimo_mode; mimo_mode = dlsch0_harq->mimo_mode;
...@@ -772,11 +799,11 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -772,11 +799,11 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
mod_order0 = dlsch0_harq->Qm; mod_order0 = dlsch0_harq->Qm;
x1 = dlsch1_harq->e; x1 = dlsch1_harq->e;
// Fill these in later for TM8-10 // Fill these in later for TM8-10
// Nlayers1 = dlsch1_harq->Nlayers; Nlayers1 = dlsch1_harq->Nlayers;
// first_layer1 = dlsch1_harq->first_layer; first_layer1 = dlsch1_harq->first_layer;
mod_order1 = dlsch1_harq->Qm; mod_order1 = dlsch1_harq->Qm;
} else if ((dlsch0_harq != NULL) && (dlsch1_harq == NULL)){ //This is for SIS0 TM1, TM6, etc } else if (dlsch0_harq && (dlsch0_harq->status == ACTIVE)){ //This is for SIS0 TM1, TM6, etc
x0 = dlsch0_harq->e; x0 = dlsch0_harq->e;
mimo_mode = dlsch0_harq->mimo_mode; mimo_mode = dlsch0_harq->mimo_mode;
...@@ -784,7 +811,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -784,7 +811,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
Nlayers0 = dlsch0_harq->Nlayers; Nlayers0 = dlsch0_harq->Nlayers;
mod_order0 = dlsch0_harq->Qm; mod_order0 = dlsch0_harq->Qm;
} else if ((dlsch0_harq == NULL) && (dlsch1_harq != NULL)){ // This is for TM4 retransmission } else if (dlsch1_harq && (dlsch1_harq->status == ACTIVE)){ // This is for TM4 retransmission
x0 = dlsch1_harq->e; x0 = dlsch1_harq->e;
mimo_mode = dlsch1_harq->mimo_mode; mimo_mode = dlsch1_harq->mimo_mode;
...@@ -794,15 +821,11 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -794,15 +821,11 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
} }
if (dlsch0_harq != NULL){ #ifdef DEBUG_DLSCH_MODULATION
#ifdef DEBUG_DLSCH_MODULATION LOG_D(PHY,"mimo_mode %d, first_layer0 %d, NLayers0 %d, first_layer1 %d, NLayers1 %d\n",mimo_mode,first_layer0,Nlayers0,first_layer1,Nlayers1);
LOG_I(PHY,"allocate_re (mod %d): symbol_offset %d re_offset %d (%d,%d), jj %d -> %d,%d\n",mod_order0,symbol_offset,re_offset,skip_dc,skip_half,*jj, x0[*jj], x0[1+*jj]);
#endif LOG_D(PHY,"allocate_re (mod %d): symbol_offset %d re_offset %d (%d,%d), jj %d -> %d,%d\n",mod_order0,symbol_offset,re_offset,skip_dc,skip_half,*jj, x0[*jj], x0[1+*jj]);
} else{ #endif
#ifdef DEBUG_DLSCH_MODULATION
LOG_I(PHY,"allocate_re (mod %d): symbol_offset %d re_offset %d (%d,%d), jj %d -> %d,%d\n",mod_order0,symbol_offset,re_offset,skip_dc,skip_half,*jj, x0[*jj], x0[1+*jj]);
#endif
}
first_re=0; first_re=0;
last_re=12; last_re=12;
...@@ -1585,7 +1608,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -1585,7 +1608,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
if (mimo_mode == TM7) { if (mimo_mode == TM7) {
*re_allocated = *re_allocated + 1; *re_allocated = *re_allocated + 1;
if (is_not_UEspecRS(lprime,re,frame_parms->Nid_cell%3,frame_parms->Ncp,7)) { if (is_not_UEspecRS(lprime,re,frame_parms->Nid_cell%3,frame_parms->Ncp,7,Ns)) {
switch (mod_order0){ switch (mod_order0){
case 2: //QPSK case 2: //QPSK
...@@ -1685,108 +1708,284 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -1685,108 +1708,284 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
} }
} else if (mimo_mode >= TM8) { //TM8,TM9,TM10 } else if (mimo_mode == TM8) { //TM8,TM9,TM10
//uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode) *re_allocated = *re_allocated + 1;
// TODO: integrate second codeword!
// in TM8, Nlayers is alwyas 1
if (is_not_UEspecRS(lprime,re,frame_parms->nushift,frame_parms->Ncp,8,Ns)) {
//LOG_D(PHY,"TM8 tti_offset %d, jj %d, jj2 %d, x0 %p, x1 %p\n",tti_offset,*jj,*jj2,x0,x1);
if (is_not_UEspecRS(lprime,re,frame_parms->nushift,frame_parms->Ncp,8)) {
switch (mod_order0) { switch (mod_order0) {
case 2: //QPSK case 2: //QPSK
// LOG_I(PHY,"%d : %d,%d => ",tti_offset,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]); if (x0 && Nlayers0==1) {
for (int layer=first_layer0; layer<=(first_layer0+Nlayers0); layer++) { ((int16_t*)&txdataF[first_layer0][tti_offset])[0] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
((int16_t*)&txdataF[layer][tti_offset])[0] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
*jj = *jj + 1; *jj = *jj + 1;
((int16_t*)&txdataF[layer][tti_offset])[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1} ((int16_t*)&txdataF[first_layer0][tti_offset])[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1}
*jj = *jj + 1; *jj = *jj + 1;
} }
if (x1 && Nlayers1==1) {
((int16_t*)&txdataF[first_layer1][tti_offset])[0] = (x1[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
*jj2 = *jj2 + 1;
((int16_t*)&txdataF[first_layer1][tti_offset])[1] = (x1[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1}
*jj2 = *jj2 + 1;
}
break; break;
case 4: //16QAM case 4: //16QAM
if (is_not_UEspecRS(lprime,re,frame_parms->nushift,frame_parms->Ncp,8)) { if (x0 && Nlayers0==1) {
qam16_table_offset_re = 0; qam16_table_offset_re = 0;
qam16_table_offset_im = 0; qam16_table_offset_im = 0;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam16_table_offset_re+=2; qam16_table_offset_re+=2;
*jj = *jj + 1; *jj = *jj + 1;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam16_table_offset_im+=2; qam16_table_offset_im+=2;
*jj = *jj + 1; *jj = *jj + 1;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam16_table_offset_re+=1; qam16_table_offset_re+=1;
*jj = *jj + 1; *jj = *jj + 1;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam16_table_offset_im+=1; qam16_table_offset_im+=1;
*jj = *jj + 1; *jj = *jj + 1;
for (int layer=first_layer0; layer<=(first_layer0+Nlayers0); layer++) { ((int16_t*)&txdataF[first_layer0][tti_offset])[0] = qam_table_s0[qam16_table_offset_re];
((int16_t*)&txdataF[layer][tti_offset])[0] = qam_table_s0[qam16_table_offset_re]; ((int16_t*)&txdataF[first_layer0][tti_offset])[1] = qam_table_s0[qam16_table_offset_im];
((int16_t*)&txdataF[layer][tti_offset])[1] = qam_table_s0[qam16_table_offset_im];
} }
if (x1 && Nlayers1==1) {
qam16_table_offset_re = 0;
qam16_table_offset_im = 0;
if (x1[*jj2] == 1)
qam16_table_offset_re+=2;
*jj2 = *jj2 + 1;
if (x1[*jj2] == 1)
qam16_table_offset_im+=2;
*jj2 = *jj2 + 1;
if (x1[*jj2] == 1)
qam16_table_offset_re+=1;
*jj2 = *jj2 + 1;
if (x1[*jj2] == 1)
qam16_table_offset_im+=1;
*jj2 = *jj2 + 1;
((int16_t*)&txdataF[first_layer1][tti_offset])[0] = qam_table_s0[qam16_table_offset_re];
((int16_t*)&txdataF[first_layer1][tti_offset])[1] = qam_table_s0[qam16_table_offset_im];
} }
break; break;
case 6: //64QAM case 6: //64QAM
if (x0 && Nlayers0==1) {
qam64_table_offset_re = 0; qam64_table_offset_re = 0;
qam64_table_offset_im = 0; qam64_table_offset_im = 0;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam64_table_offset_re+=4; qam64_table_offset_re+=4;
*jj = *jj + 1; *jj = *jj + 1;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam64_table_offset_im+=4; qam64_table_offset_im+=4;
*jj = *jj + 1; *jj = *jj + 1;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam64_table_offset_re+=2; qam64_table_offset_re+=2;
*jj = *jj + 1; *jj = *jj + 1;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam64_table_offset_im+=2; qam64_table_offset_im+=2;
*jj = *jj + 1; *jj = *jj + 1;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam64_table_offset_re+=1; qam64_table_offset_re+=1;
*jj = *jj + 1; *jj = *jj + 1;
if (x0[*jj] == 1) if (x0[*jj] == 1)
qam64_table_offset_im+=1; qam64_table_offset_im+=1;
*jj = *jj + 1; *jj = *jj + 1;
for (int layer=first_layer0; layer<=(first_layer0+Nlayers0); layer++) { ((int16_t*)&txdataF[first_layer0][tti_offset])[0] = qam_table_s0[qam64_table_offset_re];
((int16_t*)&txdataF[layer][tti_offset])[0] = qam_table_s0[qam64_table_offset_re]; ((int16_t*)&txdataF[first_layer0][tti_offset])[1] = qam_table_s0[qam64_table_offset_im];
((int16_t*)&txdataF[layer][tti_offset])[1] = qam_table_s0[qam64_table_offset_im]; }
if (x1 && Nlayers1==1) {
qam64_table_offset_re = 0;
qam64_table_offset_im = 0;
if (x1[*jj2] == 1)
qam64_table_offset_re+=4;
*jj2 = *jj2 + 1;
if (x1[*jj2] == 1)
qam64_table_offset_im+=4;
*jj2 = *jj2 + 1;
if (x1[*jj2] == 1)
qam64_table_offset_re+=2;
*jj2 = *jj2 + 1;
if (x1[*jj2] == 1)
qam64_table_offset_im+=2;
*jj2 = *jj2 + 1;
if (x1[*jj2] == 1)
qam64_table_offset_re+=1;
*jj2 = *jj2 + 1;
if (x1[*jj2] == 1)
qam64_table_offset_im+=1;
*jj2 = *jj2 + 1;
((int16_t*)&txdataF[first_layer1][tti_offset])[0] = qam_table_s0[qam64_table_offset_re];
((int16_t*)&txdataF[first_layer1][tti_offset])[1] = qam_table_s0[qam64_table_offset_im];
} }
break; break;
} }
}
else {/* The following process is called 4 times (lprime=0,1,2,3), N_RB_DL times per lprime, 3 times per rb (re=1,6,11), 2 times per re (p=7,8) */
for (p=7; p<9; p++) {
if (p==first_layer0 || p==first_layer1) {
/*if (p==7 && re<2 && lprime==0 && mprime2==0 && rb==0) {
int cnt=0;
for (rb=0; rb<100; rb++) {
for (mprime2=0; mprime2<3; mprime2++) {
ind = 3*3*frame_parms->N_RB_DL+3*rb+mprime2;
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
printf("cnt=%d, rb=%d, mprime2=%d, dword=%d, qpsk_symb=%d\n", cnt,rb,mprime2,ind_dword,ind_qpsk_symb);
//printf("cnt=%d, rb=%d, mprime2=%d, ind_dword=%d, ind_qpsk=%d, %d %d\n", cnt,rb,mprime2,ind_dword,ind_qpsk_symb,((int16_t *)&qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[nscid][Ns][0][ind_dword]>>(2*ind_qpsk_symb))&3])[0],((int16_t *)&qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[nscid][Ns][0][ind_dword]>>(2*ind_qpsk_symb))&3])[1]);
cnt++;
}
}
}*/
/*if (p==7 && re<2 && lprime==0 && mprime2==0 && rb==0) {
int cnt=0;
qpsk_p = qpsk;
for (ind_dword=0; ind_dword<100; ind_dword++){
for (ind_qpsk_symb=0; ind_qpsk_symb<16; ind_qpsk_symb++) {
printf("cnt=%d, ind_dword=%d, ind_qpsk=%d, %d %d\n", cnt,ind_dword,ind_qpsk_symb,((int16_t *)&qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[nscid][Ns][0][ind_dword]>>(2*ind_qpsk_symb))&3])[0],((int16_t *)&qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[nscid][Ns][0][ind_dword]>>(2*ind_qpsk_symb))&3])[1]);
cnt++;
}
}
}*/
/* Here rb has to be 0 to N_RB_DL otherwise w does not get the right values in the case of p8 */
if (p==8) {
if (lprime==1) {
if (frame_parms->N_RB_DL==25) {
rb = rb-85;
} else if (frame_parms->N_RB_DL==50) {
rb = rb-60;
} else {
rb = rb-10;
}
} else if (lprime==2) {
if (frame_parms->N_RB_DL==25) {
rb = rb-170;
} else if (frame_parms->N_RB_DL==50) {
rb = rb-120;
} else {
rb = rb-20;
}
} else if (lprime==3) {
if (frame_parms->N_RB_DL==25) {
rb = rb-255;
} else if (frame_parms->N_RB_DL==50) {
rb = rb-180;
} else {
rb = rb-30;
}
}
}
if (frame_parms->Ncp==0) { //normal CP
if (((mprime2+rb)%2)==0) {
w = Wbar_NCP_0[p-7][lprime];
} else {
w = Wbar_NCP_0[p-7][3-lprime];
}
} else { //extended CP
if ((mprime2%2)==0) {
w = Wbar_NCP_1[p-7][lprime%2] ;
} else {
w = Wbar_NCP_1[p-7][1-(lprime%2)] ;
}
}
/* Here we have to assign specific values to rb in order to produce the same ind values as the Matlab */
if ((re<=2 && p==7) ||(p==8 && lprime>0)) {
if (lprime==1) {
if (frame_parms->N_RB_DL==25) {
rb = rb+85;
} else if (frame_parms->N_RB_DL==50) {
rb = rb+60;
} else {
rb = rb+10;
}
} else if (lprime==2) {
if (frame_parms->N_RB_DL==25) {
rb = rb+170;
} else if (frame_parms->N_RB_DL==50) {
rb = rb+120;
} else {
rb = rb+20;
}
} else if (lprime==3) {
if (frame_parms->N_RB_DL==25) {
rb = rb+255;
} else if (frame_parms->N_RB_DL==50) {
rb = rb+180;
} else {
rb = rb+30;
}
}
} }
if (frame_parms->Ncp==0) { //normal CP
ind = 3*lprime*frame_parms->N_RB_DL+3*rb+mprime2;
} else { //extended CP
ind = 4*lprime*frame_parms->N_RB_DL+4*rb+mprime2;
}
ind_dword = ind>>4 ;
ind_qpsk_symb = ind&0xf ;
qpsk_p = (w==1) ? qpsk : nqpsk;
txdataF[p][tti_offset] = qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[nscid][Ns][0][ind_dword]>>(2*ind_qpsk_symb))&3];
if (lprime==2 && p==7) {
printf("re=%d, mprime2=%d, p=%d, w=%d, rb=%d, txdataF = {%d %d}\n\n", re,mprime2,p,w,rb,((int16_t *)&txdataF[p][tti_offset])[0],((int16_t *)&txdataF[p][tti_offset])[1]);
}
}//end if p=first_layer
}// end for p=7
mprime2++ ; // mprime2 is the counter of UE-spec REs within an OFDM symbol
}//end for else
} else if (mimo_mode>=TM9_10) { } else if (mimo_mode>=TM9_10) {
LOG_I(PHY,"allocate_REs_in_RB() [dlsch.c] : ERROR, unknown mimo_mode %d\n",mimo_mode); LOG_I(PHY,"allocate_REs_in_RB() [dlsch.c] : ERROR, unknown mimo_mode %d\n",mimo_mode);
return(-1); return(-1);
} }
} }// end for is_not_pilot()
} }// end for re=first_re
return(0); return(0);
} }// end for allocate_REs_in_RB
int allocate_REs_in_RB_MCH(int32_t **txdataF, int allocate_REs_in_RB_MCH(int32_t **txdataF,
...@@ -2136,11 +2335,11 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2136,11 +2335,11 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
uint8_t mprime=0,Ns; uint8_t mprime=0,Ns;
int8_t lprime=-1; int8_t lprime=-1;
int aa=0; int aa=0;
uint8_t nscid=0;
#ifdef DEBUG_DLSCH_MODULATION #ifdef DEBUG_DLSCH_MODULATION
uint8_t Nl0; //= dlsch0_harq->Nl; uint8_t Nl0=0; //= dlsch0_harq->Nl;
uint8_t Nl1; uint8_t Nl1=0;
#endif #endif
int ru_id; int ru_id;
RU_t *ru; RU_t *ru;
...@@ -2164,6 +2363,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2164,6 +2363,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
Nl1 = dlsch1_harq->Nl; Nl1 = dlsch1_harq->Nl;
#endif #endif
nscid = dlsch0_harq->nscid;
}else if ((dlsch0 != NULL) && (dlsch1 == NULL)){ }else if ((dlsch0 != NULL) && (dlsch1 == NULL)){
harq_pid = dlsch0->harq_ids[subframe_offset]; harq_pid = dlsch0->harq_ids[subframe_offset];
...@@ -2181,6 +2382,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2181,6 +2382,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
Nl1 = 0; Nl1 = 0;
#endif #endif
nscid = dlsch0_harq->nscid;
}else if ((dlsch0 == NULL) && (dlsch1 != NULL)){ }else if ((dlsch0 == NULL) && (dlsch1 != NULL)){
harq_pid = dlsch1->harq_ids[subframe_offset]; harq_pid = dlsch1->harq_ids[subframe_offset];
...@@ -2195,9 +2398,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2195,9 +2398,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
dlsch0_harq = NULL; dlsch0_harq = NULL;
mod_order1 = 0; mod_order1 = 0;
#ifdef DEBUG_DLSCH_MODULATION #ifdef DEBUG_DLSCH_MODULATION
Nl1 = NULL; Nl1 = 0;
#endif #endif
nscid = dlsch1_harq->nscid;
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN);
...@@ -2256,12 +2460,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2256,12 +2460,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
re_allocated=0; re_allocated=0;
// LOG_I(PHY,"num_pdcch_symbols %d, nsymb %d\n",num_pdcch_symbols,nsymb);
for (l=num_pdcch_symbols; l<nsymb; l++) {
if (dlsch0 != NULL ) {
#ifdef DEBUG_DLSCH_MODULATION #ifdef DEBUG_DLSCH_MODULATION
LOG_I(PHY,"Generating DLSCH (harq_pid %d,mimo %d, pmi_alloc0 %lx, mod0 %d, mod1 %d, rb_alloc[0] %d)\n", LOG_D(PHY,"Generating DLSCH (harq_pid %d,mimo %d, pmi_alloc0 %lx, mod0 %d, mod1 %d, rb_alloc[0] %d)\n",
harq_pid, harq_pid,
dlsch0_harq->mimo_mode, dlsch0_harq->mimo_mode,
pmi2hex_2Ar2(dlsch0_harq->pmi_alloc), pmi2hex_2Ar2(dlsch0_harq->pmi_alloc),
...@@ -2270,7 +2470,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2270,7 +2470,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
rb_alloc[0] rb_alloc[0]
); );
#endif #endif
}
// printf("num_pdcch_symbols %d, nsymb %d\n",num_pdcch_symbols,nsymb);
for (l=num_pdcch_symbols; l<nsymb; l++) {
if (frame_parms->Ncp==0) { // normal prefix if (frame_parms->Ncp==0) { // normal prefix
if ((l==4)||(l==11)) if ((l==4)||(l==11))
...@@ -2326,7 +2528,97 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2326,7 +2528,97 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
} }
} }
} }
/*
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][5][aa])[i+1] = (phy_vars_eNB->dlsch[0][0]->ue_spec_bf_weights[0][aa])[i+frame_parms->N_RB_DL*12/2] ;
//memcpy(PHY_vars_eNB->lte_eNB_common_vars.beam_weights[0][5][aa][i], PHY_vars_eNB->dlsch_eNB[0][0]->ue_spec_bf_weights[0][aa][i+149], 300) ;
}
}
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][5][aa])[i+frame_parms->first_carrier_offset] = (phy_vars_eNB->dlsch[0][0]->ue_spec_bf_weights[0][aa])[i] ;
// memcpy(PHY_vars_eNB->lte_eNB_common_vars.beam_weights[0][5][aa][i+363], PHY_vars_eNB->dlsch_eNB[0][0]->ue_spec_bf_weights[0][aa][i], 300) ;
}
}
//printf("beam_weights[0][5][0][363]\n", PHY_vars_eNB->lte_eNB_common_vars.beam_weights[0][5][0][363]) ;
//printf("beam_weights[0][5][0][362]\n", PHY_vars_eNB->lte_eNB_common_vars.beam_weights[0][5][0][362]) ;
*/
}
else if (mimo_mode==TM8) { /*TODO (p 86 36.211 v11.3)*/
mprime = 0;
if (frame_parms->Ncp==0) {
if (l==13)
lprime=3;
else if (l==12)
lprime=2;
else if (l==6)
lprime=1;
else if (l==5)
lprime=0;
else
lprime=-1;
} else {
if (l==11)
lprime=3;
else if (l==10)
lprime=2;
else if (l==5)
lprime=1;
else if (l==4)
lprime=0;
else
lprime=-1;
}
/*NOTE: the antenna port 7 and 8 should be replaced with dlsch0_harq->first_layer and dlsch1_harq->first_layer below (when first_layer is actually initialized)*/
// mapping ue specific beamforming weights from UE specified DLSCH structure to RU beam weights for the eNB
for (ru_id=0;ru_id<RC.nb_RU;ru_id++) {
ru = RC.ru[ru_id];
for (eNB_id=0;eNB_id<ru->num_eNB;eNB_id++){
if (phy_vars_eNB == ru->eNB_list[eNB_id]) {
for (aa=0;aa<ru->nb_tx;aa++){
LOG_I(PHY,"ru_id:%d eNB_id:%d aa:%d memcpy(ru->beam_weights, dlsch0->ue_spec_bf_weights[ru_id][0],)\n", ru_id, eNB_id, aa);
if (dlsch0 != NULL)
memcpy(ru->beam_weights[eNB_id][7][aa],
dlsch0->ue_spec_bf_weights[ru_id][0],
frame_parms->ofdm_symbol_size*sizeof(int32_t));
if (dlsch1 != NULL)
memcpy(ru->beam_weights[eNB_id][8][aa],
dlsch1->ue_spec_bf_weights[ru_id][0],
frame_parms->ofdm_symbol_size*sizeof(int32_t));
}
}
}
}
/*
if (dlsch0 != NULL) {
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][7][aa])[i+1] = (dlsch0->ue_spec_bf_weights[0][aa])[i+frame_parms->N_RB_DL*12/2] ;
}
}
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][7][aa])[i+frame_parms->first_carrier_offset] = (dlsch0->ue_spec_bf_weights[0][aa])[i] ;
}
}
}
if (dlsch1 != NULL) {
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][8][aa])[i+1] = (dlsch1->ue_spec_bf_weights[0][aa])[i+frame_parms->N_RB_DL*12/2] ;
}
}
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][8][aa])[i+frame_parms->first_carrier_offset] = (dlsch1->ue_spec_bf_weights[0][aa])[i] ;
}
}
}
*/
} }
Ns = 2*subframe_offset+(l>=(nsymb>>1)); Ns = 2*subframe_offset+(l>=(nsymb>>1));
...@@ -2525,6 +2817,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2525,6 +2817,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
txdataF, txdataF,
&jj, &jj,
&jj2, &jj2,
rb,
re_offset, re_offset,
symbol_offset, symbol_offset,
(dlsch0 == NULL) ? NULL : dlsch0->harq_processes[harq_pid], (dlsch0 == NULL) ? NULL : dlsch0->harq_processes[harq_pid],
...@@ -2541,7 +2834,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2541,7 +2834,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
mprime, mprime,
Ns, Ns,
P1_SHIFT, P1_SHIFT,
P2_SHIFT); P2_SHIFT,
nscid);
if ((mimo_mode == TM7) && (lprime>=0)) if ((mimo_mode == TM7) && (lprime>=0))
mprime +=3+frame_parms->Ncp; mprime +=3+frame_parms->Ncp;
...@@ -2559,6 +2853,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2559,6 +2853,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
else else
re_offset=7; // odd number of RBs re_offset=7; // odd number of RBs
} }
#ifdef DEBUG_DLSCH_MODULATION
LOG_D(PHY,"generate_dlsch : l=%d, rb=%d, jj=%d, jj2=%d, lprime=%d, mprime=%d, re_allocated = %d\n",l,rb,jj,jj2,lprime,mprime,re_allocated);
#endif
} }
} }
...@@ -2597,7 +2894,6 @@ int dlsch_modulation_SIC(int32_t **sic_buffer, ...@@ -2597,7 +2894,6 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
int16_t gain_lin_QPSK; int16_t gain_lin_QPSK;
#ifdef DEBUG_DLSCH_MODULATION #ifdef DEBUG_DLSCH_MODULATION
uint8_t Nl0 = dlsch0_harq->Nl; uint8_t Nl0 = dlsch0_harq->Nl;
uint8_t Nl1;
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN);
......
...@@ -121,10 +121,12 @@ typedef struct { ...@@ -121,10 +121,12 @@ typedef struct {
uint8_t Nl; uint8_t Nl;
/// Number of layers for this PDSCH transmission (TM8-10) /// Number of layers for this PDSCH transmission (TM8-10)
uint8_t Nlayers; uint8_t Nlayers;
/// First layer for this PSCH transmission /// First layer for this PDSCH transmission
uint8_t first_layer; uint8_t first_layer;
/// codeword this transport block is mapped to /// codeword this transport block is mapped to
uint8_t codeword; uint8_t codeword;
/// nscid
uint8_t nscid;
} LTE_DL_eNB_HARQ_t; } LTE_DL_eNB_HARQ_t;
......
...@@ -203,6 +203,7 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -203,6 +203,7 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
int32_t **txdataF, int32_t **txdataF,
uint32_t *jj, uint32_t *jj,
uint32_t *jj2, uint32_t *jj2,
uint16_t rb,
uint16_t re_offset, uint16_t re_offset,
uint32_t symbol_offset, uint32_t symbol_offset,
LTE_DL_eNB_HARQ_t *dlsch0_harq, LTE_DL_eNB_HARQ_t *dlsch0_harq,
...@@ -219,7 +220,8 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -219,7 +220,8 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
uint8_t mprime, uint8_t mprime,
uint8_t Ns, uint8_t Ns,
int *P1_SHIFT, int *P1_SHIFT,
int *P2_SHIFT); int *P2_SHIFT,
uint8_t nscid);
/** \fn int32_t dlsch_modulation(int32_t **txdataF, /** \fn int32_t dlsch_modulation(int32_t **txdataF,
...@@ -590,7 +592,7 @@ void init_unscrambling_lut(void); ...@@ -590,7 +592,7 @@ void init_unscrambling_lut(void);
uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2ndpilots); uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2ndpilots);
uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode); uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode, uint8_t Ns);
......
...@@ -1530,6 +1530,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1530,6 +1530,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
ulsch_harq->o_RI[0] = ((ulsch_harq->q_RI[0] + ulsch_harq->q_RI[Q_m/2]) > 0) ? 0 : 1; ulsch_harq->o_RI[0] = ((ulsch_harq->q_RI[0] + ulsch_harq->q_RI[Q_m/2]) > 0) ? 0 : 1;
} }
LOG_D(PHY,"ulsch_decoding: o_RI=%d\n",ulsch_harq->o_RI[0]);
// CQI // CQI
// printf("before cqi c[%d] = %p\n",0,ulsch_harq->c[0]); // printf("before cqi c[%d] = %p\n",0,ulsch_harq->c[0]);
......
...@@ -1643,7 +1643,7 @@ int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parm ...@@ -1643,7 +1643,7 @@ int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parm
uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2ndpilots); uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2ndpilots);
uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode); uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode, uint8_t Ns);
uint32_t dlsch_decoding_abstraction(double *dlsch_MIPB, uint32_t dlsch_decoding_abstraction(double *dlsch_MIPB,
LTE_DL_FRAME_PARMS *lte_frame_parms, LTE_DL_FRAME_PARMS *lte_frame_parms,
......
...@@ -57,7 +57,7 @@ int beam_precoding(int32_t **txdataF, ...@@ -57,7 +57,7 @@ int beam_precoding(int32_t **txdataF,
memset(txdataF_BF[aa],0,sizeof(int32_t)*(frame_parms->ofdm_symbol_size)); memset(txdataF_BF[aa],0,sizeof(int32_t)*(frame_parms->ofdm_symbol_size));
for (p=0; p<NB_ANTENNA_PORTS_ENB; p++) { for (p=0; p<NB_ANTENNA_PORTS_ENB; p++) {
if (p<frame_parms->nb_antenna_ports_eNB || p==5) { if (p<frame_parms->nb_antenna_ports_eNB || p==5 || p==7 || p==8) {
multadd_cpx_vector((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size], multadd_cpx_vector((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size],
(int16_t*)beam_weights[p][aa], (int16_t*)beam_weights[p][aa],
(int16_t*)&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size], (int16_t*)&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size],
......
...@@ -658,7 +658,7 @@ typedef struct { ...@@ -658,7 +658,7 @@ typedef struct {
uint32_t lte_gold_table[7][20][2][14]; uint32_t lte_gold_table[7][20][2][14];
/// UE-specific reference symbols (p=5), TM 7 /// UE-specific reference symbols (p=5), TM 7
uint32_t lte_gold_uespec_port5_table[20][38]; uint32_t lte_gold_uespec_port5_table[20][75];
/// ue-specific reference symbols /// ue-specific reference symbols
uint32_t lte_gold_uespec_table[2][20][2][21]; uint32_t lte_gold_uespec_table[2][20][2][21];
......
...@@ -929,10 +929,10 @@ typedef struct PHY_VARS_eNB_s { ...@@ -929,10 +929,10 @@ typedef struct PHY_VARS_eNB_s {
uint32_t lte_gold_table[20][2][14]; uint32_t lte_gold_table[20][2][14];
/// UE-specific reference symbols (p=5), TM 7 /// UE-specific reference symbols (p=5), TM 7
uint32_t lte_gold_uespec_port5_table[NUMBER_OF_UE_MAX][20][38]; uint32_t lte_gold_uespec_port5_table[NUMBER_OF_UE_MAX][20][75];
/// UE-specific reference symbols (p=7...14), TM 8/9/10 /// UE-specific reference symbols (p=7...14), TM 8/9/10
uint32_t lte_gold_uespec_table[2][20][2][21]; uint32_t lte_gold_uespec_table[2][20][2][100];
/// mbsfn reference symbols /// mbsfn reference symbols
uint32_t lte_gold_mbsfn_table[10][3][42]; uint32_t lte_gold_mbsfn_table[10][3][42];
......
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
#define DMA_BLKS_PER_SLOT (SLOT_LENGTH_BYTES/2048) // Number of DMA blocks per slot #define DMA_BLKS_PER_SLOT (SLOT_LENGTH_BYTES/2048) // Number of DMA blocks per slot
#define SLOT_TIME_NS (SLOT_LENGTH_SAMPLES*(1e3)/7.68) // slot time in ns #define SLOT_TIME_NS (SLOT_LENGTH_SAMPLES*(1e3)/7.68) // slot time in ns
#define NB_ANTENNA_PORTS_ENB 6 // total number of eNB antenna ports #define NB_ANTENNA_PORTS_ENB 9 // total number of eNB antenna ports
#ifdef EXMIMO #ifdef EXMIMO
#define TARGET_RX_POWER 55 // Target digital power for the AGC #define TARGET_RX_POWER 55 // Target digital power for the AGC
......
...@@ -103,7 +103,7 @@ double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012 ...@@ -103,7 +103,7 @@ double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545} { -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
}; };
//int cqi_to_mcs[16]={0, 0, 1, 3, 5, 7, 9, 13, 15, 16, 20, 23, 25, 27, 27, 27}; //int cqi_to_mcs[16]={-1, 0, 1, 3, 5, 7, 9, 13, 15, 16, 20, 23, 25, 27, 27, 27};
int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28}; int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
//for SNR to MI conversion 7 th order Polynomial coeff //for SNR to MI conversion 7 th order Polynomial coeff
......
...@@ -330,6 +330,17 @@ int16_t get_hundred_times_delta_IF_mac(module_id_t module_idP, uint8_t CC_id, rn ...@@ -330,6 +330,17 @@ int16_t get_hundred_times_delta_IF_mac(module_id_t module_idP, uint8_t CC_id, rn
int16_t get_target_pusch_rx_power(module_id_t module_idP, uint8_t CC_id); int16_t get_target_pusch_rx_power(module_id_t module_idP, uint8_t CC_id);
int16_t get_target_pucch_rx_power(module_id_t module_idP, uint8_t CC_id); int16_t get_target_pucch_rx_power(module_id_t module_idP, uint8_t CC_id);
/*! \brief This function is typically called from the MAC and asks the PHY for a harq_pid for rnti to use in frame.subframe. The function will also return the current round (round is a vector of size 2 for the 2 TBs for DL) correspoing to this harq_pid. If the round (rounds) is (are) 0 then the harq_pid is free.
@param Mod_id
@param CC_id
@param rnti
@param frame
@param subframe
@param harq_pid
@param round
@param ul_flag
@returns 0 on succes, -1 for error
*/
int get_ue_active_harq_pid(uint8_t Mod_id,uint8_t CC_id,uint16_t rnti,int frame, uint8_t subframe,uint8_t *harq_pid,uint8_t *round,uint8_t ul_flag); int get_ue_active_harq_pid(uint8_t Mod_id,uint8_t CC_id,uint16_t rnti,int frame, uint8_t subframe,uint8_t *harq_pid,uint8_t *round,uint8_t ul_flag);
void dump_dlsch(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe,uint8_t harq_pid); void dump_dlsch(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe,uint8_t harq_pid);
......
...@@ -1573,6 +1573,9 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { ...@@ -1573,6 +1573,9 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
case 7: case 7:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7; RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7;
break; break;
case 8:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm8_v920;
break;
default: default:
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7",
......
...@@ -582,7 +582,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -582,7 +582,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
int32_t normalized_rx_power, target_rx_power; int32_t normalized_rx_power, target_rx_power;
int tpc = 1; int tpc = 1;
UE_sched_ctrl *ue_sched_ctl; UE_sched_ctrl *ue_sched_ctl;
int mcs; int mcs1;
int i; int i;
int min_rb_unit[MAX_NUM_CCs]; int min_rb_unit[MAX_NUM_CCs];
int N_RB_DL[MAX_NUM_CCs]; int N_RB_DL[MAX_NUM_CCs];
...@@ -800,21 +800,18 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -800,21 +800,18 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, slice_maxmcs[slice_idP]); //cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, slice_maxmcs[slice_idP]); //cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs);
} }
// store stats // store stats
//UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi= eNB_UE_stats->dl_cqi; UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi[0] = eNB_UE_stats->dl_cqi[0];
UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi[1] = eNB_UE_stats->dl_cqi[1];
// initializing the rb allocation indicator for each UE // initializing the rb allocation indicator for each UE
for (j = 0; j < N_RBG[CC_id]; j++) { for (j = 0; j < N_RBG[CC_id]; j++) {
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0; UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0;
} }
LOG_D(MAC, LOG_D(MAC,"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n",
"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n", module_idP, frameP, UE_id,CC_id,rnti,harq_pid, round, nb_available_rb,
module_idP, frameP, UE_id, CC_id, rnti, harq_pid, round, eNB_UE_stats->dl_cqi[0], eNB_UE_stats->dlsch_mcs1,
nb_available_rb, ue_sched_ctl->dl_cqi[CC_id],
eNB_UE_stats->dlsch_mcs1,
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status); UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status);
...@@ -899,7 +896,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -899,7 +896,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // dont adjust power when retransmitting dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // dont adjust power when retransmitting
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = UE_list->UE_template[CC_id][UE_id].oldNDI1[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3;
...@@ -1199,15 +1196,15 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1199,15 +1196,15 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// Now compute number of required RBs for total sdu length // Now compute number of required RBs for total sdu length
// Assume RAH format 2 // Assume RAH format 2
mcs = eNB_UE_stats->dlsch_mcs1; mcs1 = eNB_UE_stats->dlsch_mcs1;
if (mcs == 0) { if (mcs1 == 0) {
nb_rb = 4; // don't let the TBS get too small nb_rb = 4; // don't let the TBS get too small
} else { } else {
nb_rb = min_rb_unit[CC_id]; nb_rb = min_rb_unit[CC_id];
} }
TBS = get_TBS_DL(mcs, nb_rb); TBS = get_TBS_DL(mcs1, nb_rb);
while (TBS < sdu_length_total + header_length_total + ta_len) { while (TBS < sdu_length_total + header_length_total + ta_len) {
nb_rb += min_rb_unit[CC_id]; // nb_rb += min_rb_unit[CC_id]; //
...@@ -1248,29 +1245,29 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1248,29 +1245,29 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
} }
// decrease mcs until TBS falls below required length // decrease mcs until TBS falls below required length
while ((TBS > sdu_length_total + header_length_total + ta_len) && (mcs > 0)) { while ((TBS > sdu_length_total + header_length_total + ta_len) && (mcs1 > 0)) {
mcs--; mcs1--;
TBS = get_TBS_DL(mcs, nb_rb); TBS = get_TBS_DL(mcs1, nb_rb);
} }
// if we have decreased too much or we don't have enough RBs, increase MCS // if we have decreased too much or we don't have enough RBs, increase MCS
while ((TBS < sdu_length_total + header_length_total + ta_len) while ((TBS < sdu_length_total + header_length_total + ta_len)
&& (((ue_sched_ctl->dl_pow_off[CC_id] > 0) && (((ue_sched_ctl->dl_pow_off[CC_id] > 0)
&& (mcs < 28)) && (mcs1 < 28))
|| ((ue_sched_ctl->dl_pow_off[CC_id] == 0) || ((ue_sched_ctl->dl_pow_off[CC_id] == 0)
&& (mcs <= 15)))) { && (mcs1 <= 15)))) {
mcs++; mcs1++;
TBS = get_TBS_DL(mcs, nb_rb); TBS = get_TBS_DL(mcs1, nb_rb);
} }
LOG_D(MAC, LOG_D(MAC,
"dlsch_mcs before and after the rate matching = (%d, %d)\n", "dlsch_mcs before and after the rate matching = (%d, %d)\n",
eNB_UE_stats->dlsch_mcs1, mcs); eNB_UE_stats->dlsch_mcs1, mcs1);
#ifdef DEBUG_eNB_SCHEDULER #ifdef DEBUG_eNB_SCHEDULER
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] CC_id %d Generated DLSCH header (mcs %d, TBS %d, nb_rb %d)\n", "[eNB %d] CC_id %d Generated DLSCH header (mcs %d, TBS %d, nb_rb %d)\n",
module_idP, CC_id, mcs, TBS, nb_rb); module_idP, CC_id, mcs1, TBS, nb_rb);
// msg("[MAC][eNB ] Reminder of DLSCH with random data %d %d %d %d \n", // msg("[MAC][eNB ] Reminder of DLSCH with random data %d %d %d %d \n",
// TBS, sdu_length_total, offset, TBS-sdu_length_total-offset); // TBS, sdu_length_total, offset, TBS-sdu_length_total-offset);
#endif #endif
...@@ -1297,7 +1294,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1297,7 +1294,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
module_idP, frameP, UE_id, CC_id, module_idP, frameP, UE_id, CC_id,
sdu_length_total, num_sdus, sdu_lengths[0], sdu_length_total, num_sdus, sdu_lengths[0],
sdu_lcids[0], offset, ta_update, padding, sdu_lcids[0], offset, ta_update, padding,
post_padding, mcs, TBS, nb_rb, post_padding, mcs1, TBS, nb_rb,
header_length_total); header_length_total);
} }
//#endif //#endif
...@@ -1357,7 +1354,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1357,7 +1354,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
UE_list->eNB_UE_stats[CC_id][UE_id].num_mac_sdu_tx = num_sdus; UE_list->eNB_UE_stats[CC_id][UE_id].num_mac_sdu_tx = num_sdus;
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb;
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1;
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = mcs; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = eNB_UE_stats->dlsch_mcs2;
UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS; UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS;
UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes = TBS - sdu_length_total; UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes = TBS - sdu_length_total;
...@@ -1428,8 +1425,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1428,8 +1425,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI1[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
//deactivate second codeword //deactivate second codeword
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0;
...@@ -1440,11 +1437,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1440,11 +1437,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n", "[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
module_idP, CC_id, harq_pid, module_idP, CC_id, harq_pid,
(UE_list->UE_template[CC_id][UE_id].DAI - 1), (UE_list->UE_template[CC_id][UE_id].DAI - 1),
mcs); mcs1);
} else { } else {
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n", "[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n",
module_idP, CC_id, harq_pid, mcs); module_idP, CC_id, harq_pid, mcs1);
} }
...@@ -1468,10 +1465,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1468,10 +1465,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
CC_id, frameP, subframeP, UE_id, rnti, CC_id, frameP, subframeP, UE_id, rnti,
harq_pid, harq_pid,
UE_list-> UE_list->
UE_template[CC_id][UE_id].oldNDI[harq_pid]); UE_template[CC_id][UE_id].oldNDI1[harq_pid]);
UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid] = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; UE_list->UE_template[CC_id][UE_id].oldNDI1[harq_pid] = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI1[harq_pid];
UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs; UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs1;
UE_list->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0; UE_list->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated != NULL, AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated != NULL,
"physicalConfigDedicated is NULL\n"); "physicalConfigDedicated is NULL\n");
...@@ -1481,7 +1478,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1481,7 +1478,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
fill_nfapi_dlsch_config(eNB, dl_req, TBS, eNB->pdu_index[CC_id], rnti, 0, // type 0 allocation from 7.1.6 in 36.213 fill_nfapi_dlsch_config(eNB, dl_req, TBS, eNB->pdu_index[CC_id], rnti, 0, // type 0 allocation from 7.1.6 in 36.213
0, // virtual_resource_block_assignment_flag, unused here 0, // virtual_resource_block_assignment_flag, unused here
0, // resource_block_coding, to be filled in later 0, // resource_block_coding, to be filled in later
getQm(mcs), 0, // redundancy version getQm(mcs1), 0, // redundancy version
1, // transport blocks 1, // transport blocks
0, // transport block to codeword swap flag 0, // transport block to codeword swap flag
cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
...@@ -1613,7 +1610,6 @@ fill_DLSCH_dci(module_id_t module_idP, ...@@ -1613,7 +1610,6 @@ fill_DLSCH_dci(module_id_t module_idP,
} }
} }
} }
} }
stop_meas(&eNB->fill_DLSCH_dci); stop_meas(&eNB->fill_DLSCH_dci);
...@@ -1646,10 +1642,8 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP, ...@@ -1646,10 +1642,8 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP,
UE_id = find_UE_id(module_idP,rntiP); UE_id = find_UE_id(module_idP,rntiP);
if (UE_id != -1) { if (UE_id != -1) {
LOG_D(MAC, LOG_D(MAC,"[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n",module_idP,frameP,CC_id,rntiP,UE_id);
"[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n", return((unsigned char *)&eNB->UE_list.DLSCH_pdu[CC_id][TBindex][UE_id].payload[0][0]);
module_idP, frameP, CC_id, rntiP, UE_id);
return ((unsigned char *) &eNB->UE_list.DLSCH_pdu[CC_id][TBindex][UE_id].payload[0]);
} else { } else {
LOG_E(MAC, LOG_E(MAC,
"[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist\n", "[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist\n",
......
...@@ -1876,8 +1876,8 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP ...@@ -1876,8 +1876,8 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
UE_list->UE_sched_ctrl[UE_id].ta_update = 31; UE_list->UE_sched_ctrl[UE_id].ta_update = 31;
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
UE_list->UE_template[cc_idP][UE_id].oldNDI[j] = (j == 0) ? 1 : 0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0 UE_list->UE_template[cc_idP][UE_id].oldNDI1[j] = (j==0)?1:0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0
UE_list->UE_template[cc_idP][UE_id].oldNDI_UL[j] = (j == harq_pidP) ? 0 : 1; // 1st transmission is with Msg3; UE_list->UE_template[cc_idP][UE_id].oldNDI2[j] = 0;
UE_list->UE_sched_ctrl[UE_id].round[cc_idP][j] = 8; UE_list->UE_sched_ctrl[UE_id].round[cc_idP][j] = 8;
UE_list->UE_sched_ctrl[UE_id].round_UL[cc_idP][j] = 0; UE_list->UE_sched_ctrl[UE_id].round_UL[cc_idP][j] = 0;
} }
......
...@@ -663,6 +663,9 @@ typedef struct { ...@@ -663,6 +663,9 @@ typedef struct {
// total rb used for retransmission // total rb used for retransmission
uint32_t total_rbs_used_retx; uint32_t total_rbs_used_retx;
/// DL Wideband CQI index (2 TBs)
uint8_t dl_cqi[2];
/// TX /// TX
/// Num pkt /// Num pkt
uint32_t num_pdu_tx[NB_RB_MAX]; uint32_t num_pdu_tx[NB_RB_MAX];
...@@ -778,7 +781,9 @@ typedef struct { ...@@ -778,7 +781,9 @@ typedef struct {
/// C-RNTI of UE /// C-RNTI of UE
rnti_t rnti; rnti_t rnti;
/// NDI from last scheduling /// NDI from last scheduling
uint8_t oldNDI[8]; uint8_t oldNDI1[8];
/// NDI from last scheduling
uint8_t oldNDI2[8];
/// mcs1 from last scheduling /// mcs1 from last scheduling
uint8_t oldmcs1[8]; uint8_t oldmcs1[8];
/// mcs2 from last scheduling /// mcs2 from last scheduling
...@@ -795,7 +800,7 @@ typedef struct { ...@@ -795,7 +800,7 @@ typedef struct {
boolean_t configured; boolean_t configured;
/// MCS from last scheduling /// MCS from last scheduling
uint8_t mcs[8]; uint8_t mcs[2][8];
/// TPC from last scheduling /// TPC from last scheduling
uint8_t oldTPC[8]; uint8_t oldTPC[8];
...@@ -884,6 +889,9 @@ typedef struct { ...@@ -884,6 +889,9 @@ typedef struct {
/// UE tx power /// UE tx power
int32_t ue_tx_power; int32_t ue_tx_power;
// active TBs
uint8_t TB_active[2][8];
/// stores the frame where the last TPC was transmitted /// stores the frame where the last TPC was transmitted
uint32_t pusch_tpc_tx_frame; uint32_t pusch_tpc_tx_frame;
uint32_t pusch_tpc_tx_subframe; uint32_t pusch_tpc_tx_subframe;
......
...@@ -220,7 +220,12 @@ assign_rbs_required(module_id_t Mod_id, ...@@ -220,7 +220,12 @@ assign_rbs_required(module_id_t Mod_id,
eNB_UE_stats->dlsch_mcs1 =cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], eNB_UE_stats->dlsch_mcs1 =cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]],
slice_maxmcs[slice_id]); slice_maxmcs[slice_id]);
if (get_tmode(Mod_id,CC_id,UE_id)==3)
eNB_UE_stats->dlsch_mcs2 = cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]],slice_maxmcs[slice_id]); //in TM3 there is only one CQI value
else if (get_tmode(Mod_id,CC_id,UE_id)==4)
eNB_UE_stats->dlsch_mcs2 = cqi_to_mcs[eNB_UE_stats->dl_cqi[1]];
else
eNB_UE_stats->dlsch_mcs2 = 0;
} }
// provide the list of CCs sorted according to MCS // provide the list of CCs sorted according to MCS
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
#define msg printf #define msg printf
#endif #endif
//#define XER_PRINT #define XER_PRINT
typedef struct xer_sprint_string_s { typedef struct xer_sprint_string_s {
char *string; char *string;
...@@ -3357,7 +3357,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) ...@@ -3357,7 +3357,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
int i; int i;
UE_EUTRA_Capability_t *UE_EUTRA_Capability; UE_EUTRA_Capability_t *UE_EUTRA_Capability;
char UE_EUTRA_Capability_xer[8192]; char UE_EUTRA_Capability_xer[102400];
size_t size; size_t size;
LOG_I(RRC,"Allocating %zu bytes for UE_EUTRA_Capability\n",sizeof(*UE_EUTRA_Capability)); LOG_I(RRC,"Allocating %zu bytes for UE_EUTRA_Capability\n",sizeof(*UE_EUTRA_Capability));
...@@ -3474,7 +3474,10 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) ...@@ -3474,7 +3474,10 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
return(NULL); return(NULL);
} }
dec_rval = xer_decode(0, &asn_DEF_UE_EUTRA_Capability, (void*)UE_EUTRA_Capability, UE_EUTRA_Capability_xer, size); // use this line if UE capabilites was stored in a xml file (does not seem to work)
// dec_rval = xer_decode(0, &asn_DEF_UE_EUTRA_Capability, (void*)UE_EUTRA_Capability, UE_EUTRA_Capability_xer, size);
// use this line if UE capabilites was stored as a raw file
dec_rval = uper_decode(NULL, &asn_DEF_UE_EUTRA_Capability, (void**)&UE_EUTRA_Capability, UE_EUTRA_Capability_xer, size, 0, 0);
assert(dec_rval.code == RC_OK); assert(dec_rval.code == RC_OK);
} }
......
...@@ -1963,7 +1963,7 @@ rrc_ue_process_securityModeCommand( ...@@ -1963,7 +1963,7 @@ rrc_ue_process_securityModeCommand(
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
(void*)&ul_dcch_msg, (void*)&ul_dcch_msg,
buffer, buffer,
100); 256);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
enc_rval.failed_type->name, enc_rval.encoded); enc_rval.failed_type->name, enc_rval.encoded);
...@@ -2029,7 +2029,7 @@ rrc_ue_process_ueCapabilityEnquiry( ...@@ -2029,7 +2029,7 @@ rrc_ue_process_ueCapabilityEnquiry(
UE_CapabilityRAT_Container_t ue_CapabilityRAT_Container; UE_CapabilityRAT_Container_t ue_CapabilityRAT_Container;
uint8_t buffer[200]; uint8_t buffer[256];
int i; int i;
LOG_I(RRC,"[UE %d] Frame %d: Receiving from SRB1 (DL-DCCH), Processing UECapabilityEnquiry (eNB %d)\n", LOG_I(RRC,"[UE %d] Frame %d: Receiving from SRB1 (DL-DCCH), Processing UECapabilityEnquiry (eNB %d)\n",
......
...@@ -3728,7 +3728,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt ...@@ -3728,7 +3728,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
if (*physicalConfigDedicated) { if (*physicalConfigDedicated) {
if ((*physicalConfigDedicated)->antennaInfo) { if ((*physicalConfigDedicated)->antennaInfo) {
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.transmissionMode = rrc_inst->configuration.ue_TransmissionMode[0]; (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.transmissionMode = rrc_inst->configuration.ue_TransmissionMode[0];
LOG_D(RRC,"Setting transmission mode to %ld+1\n",rrc_inst->configuration.ue_TransmissionMode[0]); LOG_I(RRC,"Setting transmission mode to %ld+1\n",rrc_inst->configuration.ue_TransmissionMode[0]);
if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm3) { if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm3) {
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction= (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR)); CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR));
...@@ -3770,6 +3770,53 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt ...@@ -3770,6 +3770,53 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.size=1; (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.size=1;
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.bits_unused=4; (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.bits_unused=4;
} }
else if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm8_v920) {
// delete previously allocated release 8 configs
free((*physicalConfigDedicated)->antennaInfo);
(*physicalConfigDedicated)->antennaInfo=NULL;
free((*physicalConfigDedicated)->cqi_ReportConfig);
(*physicalConfigDedicated)->cqi_ReportConfig=NULL;
// Rel 9 config (does not seem to work)
/*
(*physicalConfigDedicated)->ext1 = CALLOC(1,sizeof((*physicalConfigDedicated)->ext1));
(*physicalConfigDedicated)->ext1->antennaInfo_v920 = CALLOC(1, sizeof((*physicalConfigDedicated)->ext1->antennaInfo_v920));
(*physicalConfigDedicated)->ext1->antennaInfo_v920->codebookSubsetRestriction_v920 = NULL;
*/
/*
//optional: use codebook subset restriction
(*physicalConfigDedicated)->ext1->antennaInfo_v920->codebookSubsetRestriction_v920 = CALLOC(1, sizeof((*physicalConfigDedicated)->ext1->antennaInfo_v920->codebookSubsetRestriction_v920));
(*physicalConfigDedicated)->ext1->antennaInfo_v920->codebookSubsetRestriction_v920->present = AntennaInfoDedicated_v920__codebookSubsetRestriction_v920_PR_n2TxAntenna_tm8_r9;
(*physicalConfigDedicated)->ext1->antennaInfo_v920->codebookSubsetRestriction_v920->choice.n2TxAntenna_tm8_r9.buf= MALLOC(1);
(*physicalConfigDedicated)->ext1->antennaInfo_v920->codebookSubsetRestriction_v920->choice.n2TxAntenna_tm8_r9.buf[0] = 0xfc;
(*physicalConfigDedicated)->ext1->antennaInfo_v920->codebookSubsetRestriction_v920->choice.n2TxAntenna_tm8_r9.size=1;
(*physicalConfigDedicated)->ext1->antennaInfo_v920->codebookSubsetRestriction_v920->choice.n2TxAntenna_tm8_r9.bits_unused=2;
*/
// Rel 10 config
(*physicalConfigDedicated)->ext2 = CALLOC(1,sizeof(struct PhysicalConfigDedicated__ext2));
(*physicalConfigDedicated)->ext2->antennaInfo_r10 = CALLOC(1,sizeof(struct PhysicalConfigDedicated__ext2__antennaInfo_r10));
(*physicalConfigDedicated)->ext2->antennaInfo_r10->present = PhysicalConfigDedicated__ext2__antennaInfo_r10_PR_explicitValue_r10;
(*physicalConfigDedicated)->ext2->antennaInfo_r10->choice.explicitValue_r10.transmissionMode_r10 = AntennaInfoDedicated_r10__transmissionMode_r10_tm8_v920;
(*physicalConfigDedicated)->ext2->antennaInfo_r10->choice.explicitValue_r10.ue_TransmitAntennaSelection.present=AntennaInfoDedicated_r10__ue_TransmitAntennaSelection_PR_release;
// TM8 requires at least this minimal CQI config to be present
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10 = CALLOC(1,sizeof(struct CQI_ReportConfig_r10));
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->nomPDSCH_RS_EPRE_Offset = 0;
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportPeriodic_r10 = NULL;
/*
// this is the CQI config that amarisoft uses. the corresponding procedures are not yet supported in OAI
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportPeriodic_r10 = CALLOC(1,sizeof(struct CQI_ReportPeriodic_r10));
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportPeriodic_r10->present = CQI_ReportPeriodic_r10_PR_setup;
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportPeriodic_r10->choice.setup.cqi_PUCCH_ResourceIndex_r10 = 0;
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportPeriodic_r10->choice.setup.cqi_pmi_ConfigIndex = 39;
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportPeriodic_r10->choice.setup.simultaneousAckNackAndCQI = true;
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportPeriodic_r10->choice.setup.cqi_FormatIndicatorPeriodic_r10.present=CQI_ReportPeriodic_r10__setup__cqi_FormatIndicatorPeriodic_r10_PR_widebandCQI_r10;
*/
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportAperiodic_r10 = CALLOC(1,sizeof(struct CQI_ReportAperiodic_r10));
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportAperiodic_r10->present = CQI_ReportAperiodic_r10_PR_setup;
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->cqi_ReportAperiodic_r10->choice.setup.cqi_ReportModeAperiodic_r10 = CQI_ReportModeAperiodic_rm30;
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->csi_SubframePatternConfig_r10 = NULL;
(*physicalConfigDedicated)->ext2->cqi_ReportConfig_r10->pmi_RI_Report_r9 = NULL;
}
} }
else { else {
LOG_E(RRC,"antenna_info not present in physical_config_dedicated. Not reconfiguring!\n"); LOG_E(RRC,"antenna_info not present in physical_config_dedicated. Not reconfiguring!\n");
...@@ -7018,6 +7065,19 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { ...@@ -7018,6 +7065,19 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
ue_context_p->ue_context.UE_Capability, 0); ue_context_p->ue_context.UE_Capability, 0);
ue_context_p->ue_context.UE_Capability = 0; ue_context_p->ue_context.UE_Capability = 0;
} }
/*
//write the UE capabilities raw to a binary file
FILE *uecap_fd = fopen("uecap.raw","wb");
assert(uecap_fd);
fwrite(ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.
choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.
array[0]->ueCapabilityRAT_Container.buf,
ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.
choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.
array[0]->ueCapabilityRAT_Container.size,
1,uecap_fd);
fclose(uecap_fd);
*/
#if defined(ENABLE_USE_MME) #if defined(ENABLE_USE_MME)
......
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