Commit d092a130 authored by knopp's avatar knopp
Browse files

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5927 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent d704453e
...@@ -4673,85 +4673,85 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu, ...@@ -4673,85 +4673,85 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
if (cqi_req == 1) { if (cqi_req == 1) {
ulsch->O_RI = 1; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table ulsch->harq_processes[harq_pid]->O_RI = 1; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table
switch(transmission_mode){ switch(transmission_mode){
// The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling // The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling
case 1: case 1:
if ((rnti >= cba_rnti) && (rnti < p_rnti)){ if ((rnti >= cba_rnti) && (rnti < p_rnti)){
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz;
ulsch->uci_format = HLC_subband_cqi_mcs_CBA; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA;
} }
else { else {
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz;
ulsch->uci_format = HLC_subband_cqi_nopmi; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
} }
break; break;
case 2: case 2:
if ((rnti >= cba_rnti) && (rnti < p_rnti)){ if ((rnti >= cba_rnti) && (rnti < p_rnti)){
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz;
ulsch->uci_format = HLC_subband_cqi_mcs_CBA; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA;
} }
else { else {
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz;
ulsch->uci_format = HLC_subband_cqi_nopmi; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
} }
break; break;
case 3: case 3:
if ((rnti >= cba_rnti) && (rnti < p_rnti)){ if ((rnti >= cba_rnti) && (rnti < p_rnti)){
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz;
ulsch->uci_format = HLC_subband_cqi_mcs_CBA; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA;
} }
else { else {
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz;
ulsch->uci_format = HLC_subband_cqi_nopmi; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
} }
break; break;
case 4: case 4:
if ((rnti >= cba_rnti) && (rnti < p_rnti)){ if ((rnti >= cba_rnti) && (rnti < p_rnti)){
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz;
ulsch->uci_format = HLC_subband_cqi_mcs_CBA; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA;
} }
else { else {
ulsch->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz; ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz;
ulsch->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz;
ulsch->uci_format = wideband_cqi_rank1_2A; ulsch->harq_processes[harq_pid]->uci_format = wideband_cqi_rank1_2A;
} }
break; break;
case 5: case 5:
if ((rnti >= cba_rnti) && (rnti < p_rnti)){ if ((rnti >= cba_rnti) && (rnti < p_rnti)){
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz;
ulsch->uci_format = HLC_subband_cqi_mcs_CBA; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA;
} }
else { else {
ulsch->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz; ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz;
ulsch->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz;
ulsch->uci_format = wideband_cqi_rank1_2A; ulsch->harq_processes[harq_pid]->uci_format = wideband_cqi_rank1_2A;
} }
break; break;
case 6: case 6:
if ((rnti >= cba_rnti) && (rnti < p_rnti)){ if ((rnti >= cba_rnti) && (rnti < p_rnti)){
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz;
ulsch->uci_format = HLC_subband_cqi_mcs_CBA; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA;
} }
else { else {
ulsch->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz; ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz;
ulsch->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz;
ulsch->uci_format = wideband_cqi_rank1_2A; ulsch->harq_processes[harq_pid]->uci_format = wideband_cqi_rank1_2A;
} }
break; break;
case 7: case 7:
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz;
ulsch->uci_format = HLC_subband_cqi_nopmi; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
break; break;
default: default:
LOG_E(PHY,"Incorrect Transmission Mode \n"); LOG_E(PHY,"Incorrect Transmission Mode \n");
...@@ -4759,10 +4759,10 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu, ...@@ -4759,10 +4759,10 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
} }
} }
else { else {
ulsch->O_RI = 0;//1; ulsch->harq_processes[harq_pid]->O_RI = 0;//1;
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = 0;//sizeof_HLC_subband_cqi_nopmi_5MHz; ulsch->harq_processes[harq_pid]->Or1 = 0;//sizeof_HLC_subband_cqi_nopmi_5MHz;
ulsch->uci_format = HLC_subband_cqi_nopmi; ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
} }
if (frame_parms->frame_type == FDD) { if (frame_parms->frame_type == FDD) {
...@@ -4786,8 +4786,8 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu, ...@@ -4786,8 +4786,8 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
ulsch->beta_offset_ri_times8 = beta_ri[phy_vars_eNB->pusch_config_dedicated[UE_id].betaOffset_RI_Index];//10; ulsch->beta_offset_ri_times8 = beta_ri[phy_vars_eNB->pusch_config_dedicated[UE_id].betaOffset_RI_Index];//10;
ulsch->beta_offset_harqack_times8 = beta_ack[phy_vars_eNB->pusch_config_dedicated[UE_id].betaOffset_ACK_Index];//16; ulsch->beta_offset_harqack_times8 = beta_ack[phy_vars_eNB->pusch_config_dedicated[UE_id].betaOffset_ACK_Index];//16;
ulsch->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1); ulsch->harq_processes[harq_pid]->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1);
ulsch->srs_active = use_srs; ulsch->harq_processes[harq_pid]->srs_active = use_srs;
ulsch->bundling = 1-AckNackFBMode; ulsch->bundling = 1-AckNackFBMode;
//Mapping of cyclic shift field in DCI format0 to n_DMRS2 (3GPP 36.211, Table 5.5.2.1.1-1) //Mapping of cyclic shift field in DCI format0 to n_DMRS2 (3GPP 36.211, Table 5.5.2.1.1-1)
if(cshift == 0) if(cshift == 0)
...@@ -4832,7 +4832,7 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu, ...@@ -4832,7 +4832,7 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
ulsch->harq_processes[harq_pid]->TBS = TBStable[get_I_TBS_UL(ulsch->harq_processes[harq_pid]->mcs)][ulsch->harq_processes[harq_pid]->nb_rb-1]; ulsch->harq_processes[harq_pid]->TBS = TBStable[get_I_TBS_UL(ulsch->harq_processes[harq_pid]->mcs)][ulsch->harq_processes[harq_pid]->nb_rb-1];
ulsch->harq_processes[harq_pid]->Msc_initial = 12*ulsch->harq_processes[harq_pid]->nb_rb; ulsch->harq_processes[harq_pid]->Msc_initial = 12*ulsch->harq_processes[harq_pid]->nb_rb;
ulsch->harq_processes[harq_pid]->Nsymb_initial = ulsch->Nsymb_pusch; ulsch->harq_processes[harq_pid]->Nsymb_initial = ulsch->harq_processes[harq_pid]->Nsymb_pusch;
ulsch->harq_processes[harq_pid]->round = 0; ulsch->harq_processes[harq_pid]->round = 0;
} }
else { else {
...@@ -4858,8 +4858,8 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu, ...@@ -4858,8 +4858,8 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
msg("ulsch (eNB): round %d\n",ulsch->harq_processes[harq_pid]->round); msg("ulsch (eNB): round %d\n",ulsch->harq_processes[harq_pid]->round);
msg("ulsch (eNB): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS); msg("ulsch (eNB): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS);
msg("ulsch (eNB): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs); msg("ulsch (eNB): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs);
msg("ulsch (eNB): Or1 %d\n",ulsch->Or1); msg("ulsch (eNB): Or1 %d\n",ulsch->harq_processes[harq_pid]->Or1);
msg("ulsch (eNB): Nsymb_pusch %d\n",ulsch->Nsymb_pusch); msg("ulsch (eNB): Nsymb_pusch %d\n",ulsch->harq_processes[harq_pid]->Nsymb_pusch);
msg("ulsch (eNB): cshift %d\n",ulsch->harq_processes[harq_pid]->n_DMRS2); msg("ulsch (eNB): cshift %d\n",ulsch->harq_processes[harq_pid]->n_DMRS2);
#else #else
UNUSED_VARIABLE(dai); UNUSED_VARIABLE(dai);
......
...@@ -355,16 +355,52 @@ typedef struct { ...@@ -355,16 +355,52 @@ typedef struct {
uint32_t TBS; uint32_t TBS;
/// The payload + CRC size in bits /// The payload + CRC size in bits
uint32_t B; uint32_t B;
/// CQI CRC status
uint8_t cqi_crc_status;
/// Pointer to CQI data
uint8_t o[MAX_CQI_BYTES];
/// Format of CQI data
UCI_format_t uci_format;
/// Length of CQI data under RI=1 assumption(bits)
uint8_t Or1;
/// Length of CQI data under RI=2 assumption(bits)
uint8_t Or2;
/// Rank information
uint8_t o_RI[2];
/// Length of rank information (bits)
uint8_t O_RI;
/// Pointer to ACK
uint8_t o_ACK[4];
/// Length of ACK information (bits) /// Length of ACK information (bits)
uint8_t O_ACK; uint8_t O_ACK;
/// The value of DAI in DCI format 0 /// The value of DAI in DCI format 0
uint8_t V_UL_DAI; uint8_t V_UL_DAI;
/// "q" sequences for CQI/PMI (for definition see 36-212 V8.6 2009-03, p.27)
int8_t q[MAX_CQI_PAYLOAD];
/// number of coded CQI bits after interleaving
uint8_t o_RCC;
/// coded and interleaved CQI bits
int8_t o_w[(MAX_CQI_BITS+8)*3];
/// coded CQI bits
int8_t o_d[96+((MAX_CQI_BITS+8)*3)];
/// coded ACK bits
int16_t q_ACK[MAX_ACK_PAYLOAD];
/// coded RI bits
int16_t q_RI[MAX_RI_PAYLOAD];
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
int16_t e[MAX_NUM_CHANNEL_BITS];
/// Temporary h sequence to flag PUSCH_x/PUSCH_y symbols which are not scrambled
uint8_t h[MAX_NUM_CHANNEL_BITS];
/// Pointer to the payload /// Pointer to the payload
uint8_t *b; uint8_t *b;
/// Pointers to transport block segments /// Pointers to transport block segments
uint8_t *c[MAX_NUM_ULSCH_SEGMENTS]; uint8_t *c[MAX_NUM_ULSCH_SEGMENTS];
/// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15) /// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15)
uint32_t RTC[MAX_NUM_ULSCH_SEGMENTS]; uint32_t RTC[MAX_NUM_ULSCH_SEGMENTS];
/// Current Number of Symbols
uint8_t Nsymb_pusch;
/// SRS active flag
uint8_t srs_active;
/// Index of current HARQ round for this ULSCH /// Index of current HARQ round for this ULSCH
uint8_t round; uint8_t round;
/// MCS format for this ULSCH /// MCS format for this ULSCH
...@@ -404,50 +440,14 @@ typedef struct { ...@@ -404,50 +440,14 @@ typedef struct {
} LTE_UL_eNB_HARQ_t; } LTE_UL_eNB_HARQ_t;
typedef struct { typedef struct {
/// Current Number of Symbols
uint8_t Nsymb_pusch;
/// SRS active flag
uint8_t srs_active;
/// Pointers to 8 HARQ processes for the ULSCH /// Pointers to 8 HARQ processes for the ULSCH
LTE_UL_eNB_HARQ_t *harq_processes[8]; LTE_UL_eNB_HARQ_t *harq_processes[8];
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
int16_t e[MAX_NUM_CHANNEL_BITS];
/// Temporary h sequence to flag PUSCH_x/PUSCH_y symbols which are not scrambled
uint8_t h[MAX_NUM_CHANNEL_BITS];
/// Maximum number of HARQ rounds (for definition see 36-212 V8.6 2009-03, p.17) /// Maximum number of HARQ rounds (for definition see 36-212 V8.6 2009-03, p.17)
uint8_t Mdlharq; uint8_t Mdlharq;
/// Maximum number of iterations used in eNB turbo decoder /// Maximum number of iterations used in eNB turbo decoder
uint8_t max_turbo_iterations; uint8_t max_turbo_iterations;
/// CQI CRC status
uint8_t cqi_crc_status;
/// Pointer to CQI data
uint8_t o[MAX_CQI_BYTES];
/// Format of CQI data
UCI_format_t uci_format;
/// Length of CQI data under RI=1 assumption(bits)
uint8_t Or1;
/// Length of CQI data under RI=2 assumption(bits)
uint8_t Or2;
/// Rank information
uint8_t o_RI[2];
/// Length of rank information (bits)
uint8_t O_RI;
/// Pointer to ACK
uint8_t o_ACK[4];
/// ACK/NAK Bundling flag /// ACK/NAK Bundling flag
uint8_t bundling; uint8_t bundling;
/// "q" sequences for CQI/PMI (for definition see 36-212 V8.6 2009-03, p.27)
int8_t q[MAX_CQI_PAYLOAD];
/// number of coded CQI bits after interleaving
uint8_t o_RCC;
/// coded and interleaved CQI bits
int8_t o_w[(MAX_CQI_BITS+8)*3];
/// coded CQI bits
int8_t o_d[96+((MAX_CQI_BITS+8)*3)];
/// coded ACK bits
int16_t q_ACK[MAX_ACK_PAYLOAD];
/// coded RI bits
int16_t q_RI[MAX_RI_PAYLOAD];
/// beta_offset_cqi times 8 /// beta_offset_cqi times 8
uint16_t beta_offset_cqi_times8; uint16_t beta_offset_cqi_times8;
/// beta_offset_ri times 8 /// beta_offset_ri times 8
......
...@@ -880,8 +880,9 @@ int dlsch_modulation(mod_sym_t **txdataF, ...@@ -880,8 +880,9 @@ int dlsch_modulation(mod_sym_t **txdataF,
int16_t amp_rho_a, amp_rho_b; int16_t amp_rho_a, amp_rho_b;
int16_t qam16_table_a[4],qam64_table_a[8],qam16_table_b[4],qam64_table_b[8]; int16_t qam16_table_a[4],qam64_table_a[8],qam16_table_b[4],qam64_table_b[8];
int16_t *qam_table_s; int16_t *qam_table_s;
#ifdef DEBUG_DLSCH_MODULATION
uint8_t Nl = dlsch->harq_processes[harq_pid]->Nl; uint8_t Nl = dlsch->harq_processes[harq_pid]->Nl;
#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);
nsymb = (frame_parms->Ncp==0) ? 14:12; nsymb = (frame_parms->Ncp==0) ? 14:12;
......
...@@ -1283,6 +1283,9 @@ void rx_phich(PHY_VARS_UE *phy_vars_ue, ...@@ -1283,6 +1283,9 @@ void rx_phich(PHY_VARS_UE *phy_vars_ue,
// ulsch->harq_processes[harq_pid]->Ndi = 0; // ulsch->harq_processes[harq_pid]->Ndi = 0;
ulsch->harq_processes[harq_pid]->round++; ulsch->harq_processes[harq_pid]->round++;
ulsch->harq_processes[harq_pid]->rvidx = rv_table[ulsch->harq_processes[harq_pid]->round&3]; ulsch->harq_processes[harq_pid]->rvidx = rv_table[ulsch->harq_processes[harq_pid]->round&3];
ulsch->O_RI = 0;
ulsch->O = 0;
ulsch->uci_format = HLC_subband_cqi_nopmi;
} }
...@@ -1406,6 +1409,11 @@ void generate_phich_top(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1406,6 +1409,11 @@ void generate_phich_top(PHY_VARS_eNB *phy_vars_eNB,
// ulsch_eNB[UE_id]->harq_processes[harq_pid]->Ndi = 0; // ulsch_eNB[UE_id]->harq_processes[harq_pid]->Ndi = 0;
// ulsch_eNB[UE_id]->harq_processes[harq_pid]->round++; //this is already done in phy_procedures // ulsch_eNB[UE_id]->harq_processes[harq_pid]->round++; //this is already done in phy_procedures
ulsch_eNB[UE_id]->harq_processes[harq_pid]->rvidx = rv_table[ulsch_eNB[UE_id]->harq_processes[harq_pid]->round&3]; ulsch_eNB[UE_id]->harq_processes[harq_pid]->rvidx = rv_table[ulsch_eNB[UE_id]->harq_processes[harq_pid]->round&3];
ulsch_eNB[UE_id]->harq_processes[harq_pid]->O_RI = 0;
ulsch_eNB[UE_id]->harq_processes[harq_pid]->Or2 = 0;
ulsch_eNB[UE_id]->harq_processes[harq_pid]->Or1 = 0;//sizeof_HLC_subband_cqi_nopmi_5MHz;
ulsch_eNB[UE_id]->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
} }
else { else {
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d PHICH ACK (no format0 DCI) Clearing subframe_scheduling_flag, setting round to 0\n", LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d PHICH ACK (no format0 DCI) Clearing subframe_scheduling_flag, setting round to 0\n",
......
...@@ -120,14 +120,14 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu, ...@@ -120,14 +120,14 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
cqireq = rar[3]&1; cqireq = rar[3]&1;
if (cqireq==1){ if (cqireq==1){
ulsch->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz; ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz;
ulsch->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz; ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz;
ulsch->O_RI = 1; ulsch->harq_processes[harq_pid]->O_RI = 1;
} }
else{ else{
ulsch->O_RI = 0;//1; ulsch->harq_processes[harq_pid]->O_RI = 0;//1;
ulsch->Or2 = 0; ulsch->harq_processes[harq_pid]->Or2 = 0;
ulsch->Or1 = 0; ulsch->harq_processes[harq_pid]->Or1 = 0;
} }
ulsch->harq_processes[harq_pid]->O_ACK = 0;//2; ulsch->harq_processes[harq_pid]->O_ACK = 0;//2;
...@@ -136,7 +136,7 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu, ...@@ -136,7 +136,7 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
ulsch->beta_offset_harqack_times8 = 16; ulsch->beta_offset_harqack_times8 = 16;
ulsch->Nsymb_pusch = 12-(frame_parms->Ncp<<1); ulsch->harq_processes[harq_pid]->Nsymb_pusch = 12-(frame_parms->Ncp<<1);
ulsch->rnti = (((uint16_t)rar[4])<<8)+rar[5]; ulsch->rnti = (((uint16_t)rar[4])<<8)+rar[5];
if (ulsch->harq_processes[harq_pid]->round == 0) { if (ulsch->harq_processes[harq_pid]->round == 0) {
ulsch->harq_processes[harq_pid]->status = ACTIVE; ulsch->harq_processes[harq_pid]->status = ACTIVE;
...@@ -160,8 +160,8 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu, ...@@ -160,8 +160,8 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
msg("ulsch ra (eNB): round %d\n",ulsch->harq_processes[harq_pid]->round); msg("ulsch ra (eNB): round %d\n",ulsch->harq_processes[harq_pid]->round);
msg("ulsch ra (eNB): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS); msg("ulsch ra (eNB): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS);
msg("ulsch ra (eNB): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs); msg("ulsch ra (eNB): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs);
msg("ulsch ra (eNB): Or1 %d\n",ulsch->Or1); msg("ulsch ra (eNB): Or1 %d\n",ulsch->harq_processes[harq_pid]->Or1);
msg("ulsch ra (eNB): ORI %d\n",ulsch->O_RI); msg("ulsch ra (eNB): ORI %d\n",ulsch->harq_processes[harq_pid]->O_RI);
#endif #endif
return(0); return(0);
} }
......
This diff is collapsed.
...@@ -1293,7 +1293,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1293,7 +1293,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB,
rx_power_correction = 1; rx_power_correction = 1;
for (l=0;l<(frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active);l++) { for (l=0;l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active);l++) {
#ifdef DEBUG_ULSCH #ifdef DEBUG_ULSCH
msg("rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l, msg("rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l,
...@@ -1400,7 +1400,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1400,7 +1400,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB,
#endif #endif
} }
for (l=0;l<frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active;l++) { for (l=0;l<frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active;l++) {
if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))|| // skip pilots if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))|| // skip pilots
((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) { ((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) {
...@@ -1505,7 +1505,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1505,7 +1505,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB,
llrp = (int16_t*)&eNB_pusch_vars->llr[0]; llrp = (int16_t*)&eNB_pusch_vars->llr[0];
for (l=0;l<frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active;l++) { for (l=0;l<frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active;l++) {
if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))|| // skip pilots if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))|| // skip pilots
((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) { ((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) {
...@@ -1567,7 +1567,7 @@ void dump_ulsch(PHY_VARS_eNB *PHY_vars_eNB,uint8_t sched_subframe, uint8_t UE_id ...@@ -1567,7 +1567,7 @@ void dump_ulsch(PHY_VARS_eNB *PHY_vars_eNB,uint8_t sched_subframe, uint8_t UE_id
harq_pid = subframe2harq_pid(&PHY_vars_eNB->lte_frame_parms,PHY_vars_eNB->proc[sched_subframe].frame_rx,subframe); harq_pid = subframe2harq_pid(&PHY_vars_eNB->lte_frame_parms,PHY_vars_eNB->proc[sched_subframe].frame_rx,subframe);
printf("Dumping ULSCH in subframe %d with harq_pid %d, for NB_rb %d, mcs %d, Qm %d, N_symb %d\n", subframe,harq_pid,PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->nb_rb,PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->mcs,get_Qm_ul(PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->mcs),PHY_vars_eNB->ulsch_eNB[UE_id]->Nsymb_pusch); printf("Dumping ULSCH in subframe %d with harq_pid %d, for NB_rb %d, mcs %d, Qm %d, N_symb %d\n", subframe,harq_pid,PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->nb_rb,PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->mcs,get_Qm_ul(PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->mcs),PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
//#ifndef OAI_EMU //#ifndef OAI_EMU
write_output("/tmp/ulsch_d.m","ulsch_dseq",&PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->d[0][96], write_output("/tmp/ulsch_d.m","ulsch_dseq",&PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->d[0][96],
PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->Kplus*3,1,0); PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->Kplus*3,1,0);
...@@ -1590,7 +1590,7 @@ void dump_ulsch(PHY_VARS_eNB *PHY_vars_eNB,uint8_t sched_subframe, uint8_t UE_id ...@@ -1590,7 +1590,7 @@ void dump_ulsch(PHY_VARS_eNB *PHY_vars_eNB,uint8_t sched_subframe, uint8_t UE_id
write_output("/tmp/drs_est1.m","drsest1",PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->drs_ch_estimates[0][1],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1); write_output("/tmp/drs_est1.m","drsest1",PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->drs_ch_estimates[0][1],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1);
write_output("/tmp/ulsch_rxF_comp0.m","ulsch0_rxF_comp0",&PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->rxdataF_comp[0][0][0],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1); write_output("/tmp/ulsch_rxF_comp0.m","ulsch0_rxF_comp0",&PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->rxdataF_comp[0][0][0],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1);
// write_output("ulsch_rxF_comp1.m","ulsch0_rxF_comp1",&PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->rxdataF_comp[0][1][0],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1); // write_output("ulsch_rxF_comp1.m","ulsch0_rxF_comp1",&PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->rxdataF_comp[0][1][0],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1);
write_output("/tmp/ulsch_rxF_llr.m","ulsch_llr",PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->llr,PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->nb_rb*12*get_Qm_ul(PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->mcs)*PHY_vars_eNB->ulsch_eNB[UE_id]->Nsymb_pusch,1,0); write_output("/tmp/ulsch_rxF_llr.m","ulsch_llr",PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->llr,PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->nb_rb*12*get_Qm_ul(PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->mcs)*PHY_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->Nsymb_pusch,1,0);
write_output("/tmp/ulsch_ch_mag.m","ulsch_ch_mag",&PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->ul_ch_mag[0][0][0],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1); write_output("/tmp/ulsch_ch_mag.m","ulsch_ch_mag",&PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->ul_ch_mag[0][0][0],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1);
// write_output("ulsch_ch_mag1.m","ulsch_ch_mag1",&PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->ul_ch_mag[0][1][0],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1); // write_output("ulsch_ch_mag1.m","ulsch_ch_mag1",&PHY_vars_eNB->lte_eNB_pusch_vars[UE_id]->ul_ch_mag[0][1][0],PHY_vars_eNB->lte_frame_parms.N_RB_UL*12*nsymb,1,1);
//#endif //#endif
......
...@@ -2192,14 +2192,15 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -2192,14 +2192,15 @@ void process_HARQ_feedback(uint8_t UE_id,
int all_ACKed=1,nb_alloc=0,nb_ACK=0; int all_ACKed=1,nb_alloc=0,nb_ACK=0;
int frame = phy_vars_eNB->proc[sched_subframe].frame_rx; int frame = phy_vars_eNB->proc[sched_subframe].frame_rx;
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx; int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx;
int harq_pid = subframe2harq_pid( &phy_vars_eNB->lte_frame_parms,frame,subframe);
if (phy_vars_eNB->lte_frame_parms.frame_type == 0){ //FDD if (phy_vars_eNB->lte_frame_parms.frame_type == FDD){ //FDD
subframe_m4 = (subframe<4) ? subframe+6 : subframe-4; subframe_m4 = (subframe<4) ? subframe+6 : subframe-4;
dl_harq_pid[0] = dlsch->harq_ids[subframe_m4]; dl_harq_pid[0] = dlsch->harq_ids[subframe_m4];
M=1; M=1;
if (pusch_flag == 1) if (pusch_flag == 1)
dlsch_ACK[0] = phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->o_ACK[0]; dlsch_ACK[0] = phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[harq_pid]->o_ACK[0];
else else
dlsch_ACK[0] = pucch_payload[0]; dlsch_ACK[0] = pucch_payload[0];
LOG_D(PHY,"[eNB %d] Frame %d: Received ACK/NAK %d for subframe %d\n",phy_vars_eNB->Mod_id, LOG_D(PHY,"[eNB %d] Frame %d: Received ACK/NAK %d for subframe %d\n",phy_vars_eNB->Mod_id,
...@@ -2217,8 +2218,8 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -2217,8 +2218,8 @@ void process_HARQ_feedback(uint8_t UE_id,
// otherwise, it depends on how many of the PDSCH in the set are scheduled, we can leave it like this, // otherwise, it depends on how many of the PDSCH in the set are scheduled, we can leave it like this,
// but we have to adapt the code below. For example, if only one out of 2 are scheduled, only 1 bit o_ACK is used // but we have to adapt the code below. For example, if only one out of 2 are scheduled, only 1 bit o_ACK is used
dlsch_ACK[0] = phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->o_ACK[0]; dlsch_ACK[0] = phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[harq_pid]->o_ACK[0];
dlsch_ACK[1] = (phy_vars_eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode == bundling)?phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->o_ACK[0]:phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->o_ACK[1]; dlsch_ACK[1] = (phy_vars_eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode == bundling)?phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[harq_pid]->o_ACK[0]:phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[harq_pid]->o_ACK[1];
// printf("UE %d: ACK %d,%d\n",UE_id,dlsch_ACK[0],dlsch_ACK[1]); // printf("UE %d: ACK %d,%d\n",UE_id,dlsch_ACK[0],dlsch_ACK[1]);
} }
...@@ -2952,8 +2953,8 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -2952,8 +2953,8 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->eNB_UE_stats[i].UL_rssi[1], phy_vars_eNB->eNB_UE_stats[i].UL_rssi[1],
phy_vars_eNB->PHY_measurements_eNB->n0_power_dB[0], phy_vars_eNB->PHY_measurements_eNB->n0_power_dB[0],
phy_vars_eNB->PHY_measurements_eNB->n0_power_dB[1], phy_vars_eNB->PHY_measurements_eNB->n0_power_dB[1],