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
a3724019
Commit
a3724019
authored
Feb 03, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes, mostly cosmetic
parent
055bb6a6
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
86 deletions
+98
-86
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+22
-12
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+4
-4
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+64
-62
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+5
-5
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+1
-1
No files found.
openair1/PHY/INIT/nr_init.c
View file @
a3724019
...
...
@@ -93,7 +93,7 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
O2
=
1
;
//Vertical beam oversampling (1 or 4)
N1
=
gNB
->
frame_parms
.
nb_antennas_tx
/
(
N2
*
x_polarization
);
//
O1
=
1
;
//Horizontal beam oversampling (1 or 4)
CSI_RS_antenna_ports
=
N1
*
N2
*
x_polarization
;
CSI_RS_antenna_ports
=
gNB
->
frame_parms
.
nb_antennas_tx
;
LOG_D
(
PHY
,
"NR Codebook Config: antenna ports: %d N1 %d N2 %d
\n
"
,
CSI_RS_antenna_ports
,
N1
,
N2
);
// Generation of codebook Type1 with codebookMode 1 (CSI_RS_antenna_ports < 16)
...
...
@@ -139,7 +139,9 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
}
}
gNB
->
nr_mimo_precoding_matrix
=
(
int32_t
***
)
malloc16
(
gNB
->
frame_parms
.
nb_antennas_tx
*
sizeof
(
int32_t
**
));
int
max_mimo_layers
=
(
CSI_RS_antenna_ports
<
NR_MAX_NB_LAYERS
)
?
CSI_RS_antenna_ports
:
NR_MAX_NB_LAYERS
;
gNB
->
nr_mimo_precoding_matrix
=
(
int32_t
***
)
malloc16
(
max_mimo_layers
*
sizeof
(
int32_t
**
));
int32_t
***
mat
=
gNB
->
nr_mimo_precoding_matrix
;
double
complex
res_code
;
...
...
@@ -174,7 +176,8 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
+
0
.
5
);
//convert to Q15
else
((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
-
0
.
5
);
//convert to Q15
LOG_D
(
PHY
,
"1 Layer Precoding Matrix[0][pmi %d][antPort %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
len
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
0
],((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
1
]);
LOG_D
(
PHY
,
"1 Layer Precoding Matrix[0][pmi %d][antPort %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
len
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
0
],((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
1
]);
}
for
(
int
len
=
N1
*
N2
;
len
<
2
*
N1
*
N2
;
len
++
)
{
...
...
@@ -187,7 +190,8 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
+
0
.
5
);
//convert to Q15
else
((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
-
0
.
5
);
//convert to Q15
LOG_D
(
PHY
,
"1 Layer Precoding Matrix[0][pmi %d][antPort %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
len
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
0
],((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
1
]);
LOG_D
(
PHY
,
"1 Layer Precoding Matrix[0][pmi %d][antPort %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
len
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
0
],((
short
*
)
&
mat
[
0
][
pmiq
][
len
])[
1
]);
}
}
}
...
...
@@ -257,7 +261,8 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
+
0
.
5
);
//convert to Q15
else
((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
-
0
.
5
);
//convert to Q15
LOG_I
(
PHY
,
"2 Layer Precoding Matrix[1][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
0
],((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
1
]);
LOG_D
(
PHY
,
"2 Layer Precoding Matrix[1][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
0
],((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
1
]);
}
for
(
int
i_rows
=
N1
*
N2
;
i_rows
<
2
*
N1
*
N2
;
i_rows
++
)
{
res_code
=
sqrt
(
1
/
(
double
)(
2
*
CSI_RS_antenna_ports
))
*
(
phase_sign
)
*
theta_n
[
nn
]
*
v_lm
[
llc
][
mmc
][
i_rows
-
N1
*
N2
];
...
...
@@ -269,7 +274,8 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
+
0
.
5
);
//convert to Q15
else
((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
-
0
.
5
);
//convert to Q15
LOG_I
(
PHY
,
"2 Layer Precoding Matrix[1][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
0
],((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
1
]);
LOG_D
(
PHY
,
"2 Layer Precoding Matrix[1][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
0
],((
short
*
)
&
mat
[
1
][
pmiq
][
i_rows
*
2
+
j_col
])[
1
]);
}
}
}
...
...
@@ -281,7 +287,7 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
//Table 5.2.2.2.1-7:
//Codebook for 3-layer CSI reporting using antenna ports 3000 to 2999+PCSI-RS
if
(
CSI_RS_antenna_port
s
>=
3
)
{
if
(
max_mimo_layer
s
>=
3
)
{
//pmi_size is computed as follows
pmiq_size
=
1
;
//unity matrix
...
...
@@ -344,7 +350,8 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
+
0
.
5
);
//convert to Q15
else
((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
-
0
.
5
);
//convert to Q15
LOG_I
(
PHY
,
"3 Layer Precoding Matrix[2][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
0
],((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
1
]);
LOG_D
(
PHY
,
"3 Layer Precoding Matrix[2][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
0
],((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
1
]);
}
for
(
int
i_rows
=
N1
*
N2
;
i_rows
<
2
*
N1
*
N2
;
i_rows
++
)
{
res_code
=
sqrt
(
1
/
(
double
)(
3
*
CSI_RS_antenna_ports
))
*
(
phase_sign
)
*
theta_n
[
nn
]
*
v_lm
[
llc
][
mmc
][
i_rows
-
N1
*
N2
];
...
...
@@ -356,7 +363,8 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
+
0
.
5
);
//convert to Q15
else
((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
-
0
.
5
);
//convert to Q15
LOG_I
(
PHY
,
"3 Layer Precoding Matrix[2][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
0
],((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
1
]);
LOG_D
(
PHY
,
"3 Layer Precoding Matrix[2][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
0
],((
short
*
)
&
mat
[
2
][
pmiq
][
i_rows
*
3
+
j_col
])[
1
]);
}
}
}
...
...
@@ -369,7 +377,7 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
//Table 5.2.2.2.1-8:
//Codebook for 4-layer CSI reporting using antenna ports 3000 to 2999+PCSI-RS
if
(
CSI_RS_antenna_port
s
>=
4
)
{
if
(
max_mimo_layer
s
>=
4
)
{
//pmi_size is computed as follows
pmiq_size
=
1
;
//unity matrix
for
(
int
llb
=
0
;
llb
<
N1
*
O1
;
llb
++
)
{
//i_1_1
...
...
@@ -438,7 +446,8 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
+
0
.
5
);
//convert to Q15
else
((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
-
0
.
5
);
//convert to Q15
LOG_D
(
PHY
,
"4 Layer Precoding Matrix[3][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
0
],((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
1
]);
LOG_D
(
PHY
,
"4 Layer Precoding Matrix[3][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
0
],((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
1
]);
}
for
(
int
i_rows
=
N1
*
N2
;
i_rows
<
2
*
N1
*
N2
;
i_rows
++
)
{
...
...
@@ -451,7 +460,8 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
+
0
.
5
);
//convert to Q15
else
((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
1
]
=
(
short
)
((
cimag
(
res_code
)
*
32768
)
-
0
.
5
);
//convert to Q15
LOG_D
(
PHY
,
"4 Layer Precoding Matrix[3][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
0
],((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
1
]);
LOG_D
(
PHY
,
"4 Layer Precoding Matrix[3][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d
\n
"
,
pmiq
,
i_rows
,
j_col
,
creal
(
res_code
),
cimag
(
res_code
),((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
0
],((
short
*
)
&
mat
[
3
][
pmiq
][
i_rows
*
4
+
j_col
])[
1
]);
}
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
a3724019
...
...
@@ -386,15 +386,15 @@ void nr_processULSegment(void* arg) {
p_procTime
);
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
ulsch_harq
->
F
,
crc_type
))
{
//
#ifdef PRINT_CRC_CHECK
#ifdef PRINT_CRC_CHECK
LOG_I
(
PHY
,
"Segment %d CRC OK, iterations %d/%d
\n
"
,
r
,
no_iteration_ldpc
,
max_ldpc_iterations
);
//
#endif
#endif
rdata
->
decodeIterations
=
no_iteration_ldpc
;
if
(
rdata
->
decodeIterations
>
p_decoderParms
->
numMaxIter
)
rdata
->
decodeIterations
--
;
}
else
{
//
#ifdef PRINT_CRC_CHECK
#ifdef PRINT_CRC_CHECK
LOG_I
(
PHY
,
"CRC NOK
\n
"
);
//
#endif
#endif
rdata
->
decodeIterations
=
max_ldpc_iterations
+
1
;
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
a3724019
...
...
@@ -446,7 +446,7 @@ void nr_processDLSegment(void* arg) {
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
harq_process
->
F
,
crc_type
))
{
LOG_
I
(
PHY
,
"Segment %u CRC OK
\n
"
,
r
);
LOG_
D
(
PHY
,
"Segment %u CRC OK
\n
"
,
r
);
if
(
r
==
0
)
{
for
(
int
i
=
0
;
i
<
10
;
i
++
)
LOG_D
(
PHY
,
"byte %d : %x
\n
"
,
i
,((
uint8_t
*
)
llrProcBuf
)[
i
]);
...
...
@@ -456,7 +456,7 @@ void nr_processDLSegment(void* arg) {
no_iteration_ldpc
=
dlsch
->
max_ldpc_iterations
;
rdata
->
decodeIterations
=
no_iteration_ldpc
;
}
else
{
LOG_
I
(
PHY
,
"CRC NOT OK
\n
"
);
LOG_
D
(
PHY
,
"CRC NOT OK
\n
"
);
}
nb_total_decod
++
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
a3724019
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
a3724019
...
...
@@ -825,11 +825,11 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext,
int
start_point
);
void
nr_dlsch_deinterleaving
(
uint8_t
symbol
,
uint8_t
start_symbol
,
uint16_t
L
,
uint16_t
*
llr
,
uint16_t
*
llr_deint
,
uint16_t
nb_rb_pdsch
);
uint8_t
start_symbol
,
uint16_t
L
,
uint16_t
*
llr
,
uint16_t
*
llr_deint
,
uint16_t
nb_rb_pdsch
);
void
dlsch_dual_stream_correlation
(
NR_DL_FRAME_PARMS
*
frame_parms
,
unsigned
char
symbol
,
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
a3724019
...
...
@@ -1190,7 +1190,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
));
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
present
=
NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
));
if
(
dl_antenna_ports
<
=
2
)
{
if
(
dl_antenna_ports
=
=
2
)
{
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
present
=
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts_PR_two
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
=
...
...
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