Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
b6312bba
Unverified
Commit
b6312bba
authored
Jun 21, 2023
by
Quency Lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feat / add frequency equalization for 16/64QAM with transform precoding
parent
57bae67f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
2 deletions
+104
-2
CMakeLists.txt
CMakeLists.txt
+1
-0
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+3
-0
openair1/PHY/NR_ESTIMATION/nr_freq_equalization.c
openair1/PHY/NR_ESTIMATION/nr_freq_equalization.c
+78
-0
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
+11
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+10
-1
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+1
-1
No files found.
CMakeLists.txt
View file @
b6312bba
...
...
@@ -1179,6 +1179,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ptrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_freq_equalization.c
${
OPENAIR1_DIR
}
/PHY/NR_ESTIMATION/nr_measurements_gNB.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/file_output.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cadd_vv.c
...
...
openair1/PHY/INIT/nr_init.c
View file @
b6312bba
...
...
@@ -28,6 +28,7 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/NR_ESTIMATION/nr_ul_estimation.h"
#include "openair1/PHY/MODULATION/nr_modulation.h"
#include "openair1/PHY/defs_RU.h"
#include "openair1/PHY/CODING/nrLDPC_extern.h"
...
...
@@ -536,6 +537,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
init_scrambling_luts
();
init_pucch2_luts
();
nr_init_fde
();
// Init array for frequency equalization of transform precoding of PUSCH
load_nrLDPClib
(
NULL
);
if
(
gNB
->
ldpc_offload_flag
)
...
...
openair1/PHY/NR_ESTIMATION/nr_freq_equalization.c
0 → 100644
View file @
b6312bba
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "PHY/defs_eNB.h"
#include "PHY/sse_intrin.h"
#include "PHY/NR_ESTIMATION/nr_ul_estimation.h"
// Reference of openair1/PHY/LTE_ESTIMATION/freq_equalization.c
// This is 4096/(1:4096) in simde__m128i format
simde__m128i
nr_inv_ch
[
4096
]
=
{
0
};
/* = {0, 4096/1, 4096/2, 4096/3, 4096/4...}*/
void
nr_init_fde
()
{
for
(
int
i
=
1
;
i
<
4096
;
i
++
)
nr_inv_ch
[
i
]
=
simde_mm_set1_epi16
(
4096
/
i
);
}
void
nr_freq_equalization
(
NR_DL_FRAME_PARMS
*
frame_parms
,
int32_t
*
rxdataF_comp
,
int32_t
*
ul_ch_mag
,
int32_t
*
ul_ch_magb
,
uint8_t
symbol
,
uint16_t
Msc_RS
,
uint8_t
Qm
)
{
uint16_t
re
;
int16_t
amp
;
size_t
offset
=
frame_parms
!=
NULL
?
(
symbol
*
frame_parms
->
N_RB_DL
*
12
)
:
0
;
simde__m128i
*
rxdataF_comp128
=
(
simde__m128i
*
)
&
rxdataF_comp
[
offset
];
simde__m128i
*
ul_ch_mag128
=
(
simde__m128i
*
)
&
ul_ch_mag
[
offset
];
simde__m128i
*
ul_ch_magb128
=
(
simde__m128i
*
)
&
ul_ch_magb
[
offset
];
if
(
frame_parms
!=
NULL
){
AssertFatal
(
symbol
<
frame_parms
->
symbols_per_slot
,
"symbol %d >= %d
\n
"
,
symbol
,
frame_parms
->
symbols_per_slot
);
AssertFatal
(
Msc_RS
<=
frame_parms
->
N_RB_UL
*
12
,
"Msc_RS %d >= %d
\n
"
,
Msc_RS
,
frame_parms
->
N_RB_UL
*
12
);
}
for
(
re
=
0
;
re
<
(
Msc_RS
>>
2
);
re
++
)
{
amp
=
(
*
((
int16_t
*
)
&
ul_ch_mag128
[
re
]));
if
(
amp
>
4095
)
amp
=
4095
;
//printf("freq_eq: symbol %d re %d => mag %d,amp %d,inv %d, prod %d (%d,%d)\n",symbol,re,*((int16_t*)(&ul_ch_mag128[re])),amp,simde_mm_extract_epi16(nr_inv_ch[amp],0),(*((int16_t*)(&ul_ch_mag128[re]))*simde_mm_extract_epi16(nr_inv_ch[amp],0))>>3,*(int16_t*)&(rxdataF_comp128[re]),*(1+(int16_t*)&(rxdataF_comp128[re])));
rxdataF_comp128
[
re
]
=
simde_mm_srai_epi16
(
simde_mm_mullo_epi16
(
rxdataF_comp128
[
re
],
nr_inv_ch
[
amp
]),
3
);
if
(
Qm
==
4
)
ul_ch_mag128
[
re
]
=
simde_mm_set1_epi16
(
324
);
// this is 512*2/sqrt(10)
else
if
(
Qm
==
6
){
ul_ch_mag128
[
re
]
=
simde_mm_set1_epi16
(
316
);
// this is 512*4/sqrt(42)
ul_ch_magb128
[
re
]
=
simde_mm_set1_epi16
(
158
);
// this is 512*2/sqrt(42)
}
else
if
(
Qm
!=
2
)
AssertFatal
(
1
,
"nr_freq_equalization(), Qm = %d, should be 2, 4 or 6. symbol=%d, Msc_RS=%d
\n
"
,
Qm
,
symbol
,
Msc_RS
);
// printf("(%d,%d)\n",*(int16_t*)&(rxdataF_comp128[re]),*(1+(int16_t*)&(rxdataF_comp128[re])));
}
}
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
View file @
b6312bba
...
...
@@ -86,4 +86,15 @@ int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
int32_t
srs_estimated_channel_time_shifted
[][
1
<<
srs_pdu
->
num_ant_ports
][
gNB
->
frame_parms
.
ofdm_symbol_size
],
int8_t
*
snr_per_rb
,
int8_t
*
snr
);
void
nr_freq_equalization
(
NR_DL_FRAME_PARMS
*
frame_parms
,
int
*
rxdataF_comp
,
int
*
ul_ch_mag
,
int
*
ul_ch_mag_b
,
unsigned
char
symbol
,
unsigned
short
Msc_RS
,
unsigned
char
Qm
);
void
nr_init_fde
(
void
);
#endif
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
b6312bba
...
...
@@ -2796,8 +2796,17 @@ void nr_pusch_symbol_processing_noprecoding(void *arg)
}
// Perform IDFT if transform precoding is enabled
// TODO: Frequency equalizer
if
(
rel15_ul
->
transform_precoding
==
transformPrecoder_enabled
){
// Perform frequency equalization
if
(
rel15_ul
->
qam_mod_order
>
2
){
nr_freq_equalization
(
NULL
,
rxF_comp
,
rxF_ch_mag
,
rxF_ch_magb
,
symbol
,
nb_re_pusch
,
rel15_ul
->
qam_mod_order
);
}
nr_idft
(
rxF_comp
,
nb_re_pusch
);
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
b6312bba
...
...
@@ -472,7 +472,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
if
(
++
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
//for (i=0; i< nb_rb*NR_NB_SC_PER_RB; i++)
}
//for (i=0; i< nb_rb*NR_NB_SC_PER_RB; i++)
}
//for (l=start_symbol; l<start_symbol+number_of_symbols; l++)
}
//for (nl=0; nl < Nl; nl++)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment