Commit b79199b4 authored by Raymond Knopp's avatar Raymond Knopp

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5397 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 7164409e
......@@ -2705,6 +2705,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
uint8_t format1A_size_bits,format1A_size_bytes;
uint8_t format0_size_bits,format0_size_bytes;
uint8_t format1_size_bits,format1_size_bytes;
uint8_t format2_size_bits,format2_size_bytes;
switch (frame_parms->N_RB_DL) {
case 6:
......@@ -2715,6 +2716,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format0_size_bytes = sizeof(DCI0_1_5MHz_TDD_1_6_t);
format1_size_bits = sizeof_DCI1_1_5MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_1_5MHz_TDD_t);
if (frame_parms->nb_antennas_tx == 2) {
format2_size_bits = sizeof_DCI2_1_5MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_2A_TDD_t);
}
else if (frame_parms->nb_antennas_tx == 4) {
format2_size_bits = sizeof_DCI2_1_5MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_4A_TDD_t);
}
}
else {
format1A_size_bits = sizeof_DCI1A_1_5MHz_FDD_t;
......@@ -2723,6 +2732,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format0_size_bytes = sizeof(DCI0_1_5MHz_FDD_t);
format1_size_bits = sizeof_DCI1_1_5MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_1_5MHz_FDD_t);
if (frame_parms->nb_antennas_tx == 2) {
format2_size_bits = sizeof_DCI2_1_5MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_2A_FDD_t);
}
else if (frame_parms->nb_antennas_tx == 4) {
format2_size_bits = sizeof_DCI2_1_5MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_4A_FDD_t);
}
}
break;
case 25:
......@@ -2734,6 +2751,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format0_size_bytes = sizeof(DCI0_5MHz_TDD_1_6_t);
format1_size_bits = sizeof_DCI1_5MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_5MHz_TDD_t);
if (frame_parms->nb_antennas_tx == 2) {
format2_size_bits = sizeof_DCI2_5MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_2A_TDD_t);
}
else if (frame_parms->nb_antennas_tx == 4) {
format2_size_bits = sizeof_DCI2_5MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_4A_TDD_t);
}
}
else {
format1A_size_bits = sizeof_DCI1A_5MHz_FDD_t;
......@@ -2742,6 +2767,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format0_size_bytes = sizeof(DCI0_5MHz_FDD_t);
format1_size_bits = sizeof_DCI1_5MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_5MHz_FDD_t);
if (frame_parms->nb_antennas_tx == 2) {
format2_size_bits = sizeof_DCI2_5MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_2A_FDD_t);
}
else if (frame_parms->nb_antennas_tx == 4) {
format2_size_bits = sizeof_DCI2_5MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_4A_FDD_t);
}
}
break;
case 50:
......@@ -2752,6 +2785,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format0_size_bytes = sizeof(DCI0_10MHz_TDD_1_6_t);
format1_size_bits = sizeof_DCI1_10MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_10MHz_TDD_t);
if (frame_parms->nb_antennas_tx == 2) {
format2_size_bits = sizeof_DCI2_10MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_2A_TDD_t);
}
else if (frame_parms->nb_antennas_tx == 4) {
format2_size_bits = sizeof_DCI2_10MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_4A_TDD_t);
}
}
else {
format1A_size_bits = sizeof_DCI1A_10MHz_FDD_t;
......@@ -2760,6 +2801,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format0_size_bytes = sizeof(DCI0_10MHz_FDD_t);
format1_size_bits = sizeof_DCI1_10MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_10MHz_FDD_t);
if (frame_parms->nb_antennas_tx == 2) {
format2_size_bits = sizeof_DCI2_10MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_2A_FDD_t);
}
else if (frame_parms->nb_antennas_tx == 4) {
format2_size_bits = sizeof_DCI2_10MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_4A_FDD_t);
}
}
break;
......@@ -2771,6 +2820,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format0_size_bytes = sizeof(DCI0_20MHz_TDD_1_6_t);
format1_size_bits = sizeof_DCI1_20MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_20MHz_TDD_t);
if (frame_parms->nb_antennas_tx == 2) {
format2_size_bits = sizeof_DCI2_20MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_2A_TDD_t);
}
else if (frame_parms->nb_antennas_tx == 4) {
format2_size_bits = sizeof_DCI2_20MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_4A_TDD_t);
}
}
else {
format1A_size_bits = sizeof_DCI1A_20MHz_FDD_t;
......@@ -2779,6 +2836,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format0_size_bytes = sizeof(DCI0_20MHz_FDD_t);
format1_size_bits = sizeof_DCI1_20MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_20MHz_FDD_t);
if (frame_parms->nb_antennas_tx == 2) {
format2_size_bits = sizeof_DCI2_20MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_2A_FDD_t);
}
else if (frame_parms->nb_antennas_tx == 4) {
format2_size_bits = sizeof_DCI2_20MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_4A_FDD_t);
}
}
break;
}
......@@ -3096,9 +3161,9 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
0,
format1A,
format1A,
format2_2A_M10PRB,
sizeof_DCI2_5MHz_2A_M10PRB_TDD_t,
sizeof(DCI2_5MHz_2A_M10PRB_TDD_t),
format2,
format2_size_bits,
format2_size_bytes,
&dci_cnt,
&format0_found,
&format_c_found,
......@@ -3111,7 +3176,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
if (dci_cnt>old_dci_cnt)
return(dci_cnt);
// Now check UE_SPEC format 2_2A_M10PRB search spaces at aggregation 2
// Now check UE_SPEC format 2 search spaces at aggregation 2
dci_decoding_procedure0(lte_ue_pdcch_vars,0,
subframe,
dci_alloc,
......@@ -3123,9 +3188,9 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
1,
format1A,
format1A,
format2_2A_M10PRB,
sizeof_DCI2_5MHz_2A_M10PRB_TDD_t,
sizeof(DCI2_5MHz_2A_M10PRB_TDD_t),
format2,
format2_size_bits,
format2_size_bytes,
&dci_cnt,
&format0_found,
&format_c_found,
......@@ -3150,9 +3215,9 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
2,
format1A,
format1A,
format2_2A_M10PRB,
sizeof_DCI2_5MHz_2A_M10PRB_TDD_t,
sizeof(DCI2_5MHz_2A_M10PRB_TDD_t),
format2,
format2_size_bits,
format2_size_bytes,
&dci_cnt,
&format0_found,
&format_c_found,
......@@ -3178,9 +3243,9 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
3,
format1A,
format1A,
format2_2A_M10PRB,
sizeof_DCI2_5MHz_2A_M10PRB_TDD_t,
sizeof(DCI2_5MHz_2A_M10PRB_TDD_t),
format2,
format2_size_bits,
format2_size_bytes,
&dci_cnt,
&format0_found,
&format_c_found,
......
This diff is collapsed.
......@@ -650,14 +650,11 @@ typedef enum {format0,
format1C,
format1D,
format1E_2A_M10PRB,
format2_2A_L10PRB,
format2_2A_M10PRB,
format2_4A_L10PRB,
format2_4A_M10PRB,
format2A_2A_L10PRB,
format2A_2A_M10PRB,
format2A_4A_L10PRB,
format2A_4A_M10PRB,
format2,
format2A,
format2B,
format2C,
format2D,
format3
} DCI_format_t;
......
......@@ -827,15 +827,40 @@ int allocate_REs_in_RB_MCH(mod_sym_t **txdataF,
return(0);
}
uint8_t get_pmi_5MHz(MIMO_mode_t mode,uint32_t pmi_alloc,uint16_t rb) {
uint8_t get_pmi(uint8_t N_RB_DL,MIMO_mode_t mode,uint32_t pmi_alloc,uint16_t rb) {
// printf("Getting pmi for RB %d => %d\n",rb,(pmi_alloc>>((rb>>2)<<1))&3);
switch (N_RB_DL) {
case 6: // 1 PRB per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>(rb<<1))&3);
else
return((pmi_alloc>>rb)&1);
break;
case 25: // 4 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb>>2)<<1))&3);
else
return((pmi_alloc>>(rb>>2))&1);
break;
case 50: // 6 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb/6)<<1))&3);
else
return((pmi_alloc>>(rb/6))&1);
break;
case 100: // 8 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb>>3)<<1))&3);
else
return((pmi_alloc>>(rb>>3))&1);
break;
default:
break;
}
}
int dlsch_modulation(mod_sym_t **txdataF,
int16_t amp,
uint32_t subframe_offset,
......@@ -1057,7 +1082,7 @@ int dlsch_modulation(mod_sym_t **txdataF,
dlsch->layer_index,
pilots,
mod_order,
get_pmi_5MHz(dlsch->harq_processes[harq_pid]->mimo_mode,dlsch->pmi_alloc,rb),
get_pmi(frame_parms->N_RB_DL,dlsch->harq_processes[harq_pid]->mimo_mode,dlsch->pmi_alloc,rb),
((pilots) ? amp_rho_b : amp_rho_a),
qam_table_s,
&re_allocated,
......
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