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
e993a59d
Commit
e993a59d
authored
Nov 29, 2021
by
sfn
Committed by
Thomas Schlichter
Nov 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make use of gNB precoding matrix for PDSCH layer precoding
parent
0517b973
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
498 additions
and
421 deletions
+498
-421
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+432
-380
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+15
-0
openair1/PHY/MODULATION/nr_modulation.h
openair1/PHY/MODULATION/nr_modulation.h
+5
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+29
-38
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-1
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-0
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+13
-2
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+2
-0
No files found.
openair1/PHY/INIT/nr_init.c
View file @
e993a59d
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/nr_modulation.c
View file @
e993a59d
...
...
@@ -801,3 +801,18 @@ int nr_layer_precoder(int16_t **datatx_F_precoding, char *prec_matrix, uint8_t n
/* ((int16_t *)precodatatx_F)[0] = (int16_t)((((int16_t *)precodatatx_F)[0]*ONE_OVER_SQRT2_Q15)>>15);
((int16_t *)precodatatx_F)[1] = (int16_t)((((int16_t *)precodatatx_F)[1]*ONE_OVER_SQRT2_Q15)>>15);*/
}
int
nr_layer_precoder_cm
(
int16_t
**
datatx_F_precoding
,
int
*
prec_matrix
,
uint8_t
n_layers
,
int32_t
re_offset
)
{
int32_t
precodatatx_F
=
0
;
for
(
int
al
=
0
;
al
<
n_layers
;
al
++
)
{
int16_t
antenna_re
=
datatx_F_precoding
[
al
][
re_offset
<<
1
];
int16_t
antenna_im
=
datatx_F_precoding
[
al
][(
re_offset
<<
1
)
+
1
];
//printf("antenna precoding: %d %d\n",((int16_t *)&prec_matrix[al])[0],((int16_t *)&prec_matrix[al])[1]);
((
int16_t
*
)
&
precodatatx_F
)[
0
]
+=
(
int16_t
)(((
int32_t
)(
antenna_re
*
(((
int16_t
*
)
&
prec_matrix
[
al
])[
0
]))
-
(
int32_t
)(
antenna_im
*
(((
int16_t
*
)
&
prec_matrix
[
al
])[
1
])))
>>
15
);
((
int16_t
*
)
&
precodatatx_F
)[
1
]
+=
(
int16_t
)(((
int32_t
)(
antenna_re
*
(((
int16_t
*
)
&
prec_matrix
[
al
])[
1
]))
+
(
int32_t
)(
antenna_im
*
(((
int16_t
*
)
&
prec_matrix
[
al
])[
0
])))
>>
15
);
}
return
precodatatx_F
;
}
openair1/PHY/MODULATION/nr_modulation.h
View file @
e993a59d
...
...
@@ -135,4 +135,9 @@ int nr_layer_precoder(int16_t **datatx_F_precoding,
char
*
prec_matrix
,
uint8_t
n_layers
,
int32_t
re_offset
);
int
nr_layer_precoder_cm
(
int16_t
**
datatx_F_precoding
,
int
*
prec_matrix
,
uint8_t
n_layers
,
int32_t
re_offset
);
#endif
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
e993a59d
...
...
@@ -459,48 +459,39 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
}
}
else
{
//get the precoding matrix weights:
char
*
W_prec
;
switch
(
frame_parms
->
nb_antennas_tx
)
{
case
1
:
//1 antenna port
W_prec
=
nr_W_1l_2p
[
pmi
][
ap
];
break
;
case
2
:
//2 antenna ports
if
(
rel15
->
nrOfLayers
==
1
)
//1 layer
W_prec
=
nr_W_1l_2p
[
pmi
][
ap
];
else
//2 layers
W_prec
=
nr_W_2l_2p
[
pmi
][
ap
];
break
;
case
4
:
//4 antenna ports
if
(
rel15
->
nrOfLayers
==
1
)
//1 layer
W_prec
=
nr_W_1l_4p
[
pmi
][
ap
];
else
if
(
rel15
->
nrOfLayers
==
2
)
//2 layers
W_prec
=
nr_W_2l_4p
[
pmi
][
ap
];
else
if
(
rel15
->
nrOfLayers
==
3
)
//3 layers
W_prec
=
nr_W_3l_4p
[
pmi
][
ap
];
else
//4 layers
W_prec
=
nr_W_4l_4p
[
pmi
][
ap
];
break
;
default:
LOG_D
(
PHY
,
"Precoding 1,2, or 4 antenna ports are currently supported
\n
"
);
W_prec
=
nr_W_1l_2p
[
pmi
][
ap
];
break
;
if
(
frame_parms
->
nb_antennas_tx
==
1
){
//no precoding matrix defined
memcpy
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
txdataF_offset
+
k
],
(
void
*
)
&
txdataF_precoding
[
ap
][
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
txdataF_offset
+
k
)],
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
k
+=
NR_NB_SC_PER_RB
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
else
{
//get the precoding matrix weights:
int32_t
**
mat
=
gNB
->
nr_mimo_precoding_matrix
[
rel15
->
nrOfLayers
-
1
];
//i_row =0,...,dl_antenna_port
//j_col =0,...,nrOfLayers
//mat[pmi][i_rows*2+j_col]
int
*
W_prec
;
W_prec
=
(
int32_t
*
)
&
mat
[
pmi
][
ap
*
rel15
->
nrOfLayers
];
for
(
int
i
=
0
;
i
<
NR_NB_SC_PER_RB
;
i
++
)
{
int32_t
re_offset
=
l
*
frame_parms
->
ofdm_symbol_size
+
k
;
int32_t
precodatatx_F
=
nr_layer_precoder
(
txdataF_precoding
,
W_prec
,
rel15
->
nrOfLayers
,
re_offset
+
txdataF_offset
);
int32_t
precodatatx_F
=
nr_layer_precoder_cm
(
txdataF_precoding
,
W_prec
,
rel15
->
nrOfLayers
,
re_offset
+
txdataF_offset
);
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
(
2
*
txdataF_offset
)]
=
((
int16_t
*
)
&
precodatatx_F
)[
0
];
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]
=
((
int16_t
*
)
&
precodatatx_F
)[
1
];
#ifdef DEBUG_DLSCH_MAPPING
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"antenna %d
\t
l %d
\t
k %d
\t
txdataF: %d %d
\n
"
,
ap
,
l
,
k
,
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
(
2
*
txdataF_offset
)],
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]);
#endif
#endif
if
(
++
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
}
}
}
//RB loop
}
// symbol loop
}
// port loop
...
...
openair1/PHY/defs_gNB.h
View file @
e993a59d
...
...
@@ -805,7 +805,7 @@ typedef struct PHY_VARS_gNB_s {
uint32_t
****
nr_gold_pdsch_dmrs
;
/// PDSCH codebook I precoding LUTs
int32_t
**
nr_mimo_precoding_matrix
;
int32_t
**
*
nr_mimo_precoding_matrix
;
/// PUSCH DMRS
uint32_t
****
nr_gold_pusch_dmrs
;
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
e993a59d
...
...
@@ -794,6 +794,7 @@ int main(int argc, char **argv)
// rrc_mac_config_req_gNB
gNB_mac
->
pre_processor_dl
=
nr_dlsim_preprocessor
;
phy_init_nr_gNB
(
gNB
,
0
,
1
);
mac_init_codebook_gNB
(
gNB
,
gNB_mac
);
N_RB_DL
=
gNB
->
frame_parms
.
N_RB_DL
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
0
]
->
UE_info
;
UE_info
->
num_UEs
=
1
;
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
e993a59d
...
...
@@ -1156,7 +1156,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csi_MeasConfig
->
csi_ReportConfigToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_ReportConfigToAddModList
));
csi_MeasConfig
->
csi_ReportConfigToReleaseList
=
NULL
;
if
(
d
o_csirs
&&
dl_antenna_ports
>
1
)
{
if
(
d
l_antenna_ports
>
1
)
{
/*do_csirs&&*/
NR_CSI_ReportConfig_t
*
csirep1
=
calloc
(
1
,
sizeof
(
*
csirep1
));
csirep1
->
reportConfigId
=
0
;
csirep1
->
carrier
=
NULL
;
...
...
@@ -1208,8 +1208,19 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts_PR_moreThanTwo
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
moreThanTwo
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
moreThanTwo
));
if
(
dl_antenna_ports
==
4
)
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
moreThanTwo
->
n1_n2
.
present
=
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_one_TypeI_SinglePanel_Restriction
;
else
if
(
dl_antenna_ports
==
8
)
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
moreThanTwo
->
n1_n2
.
present
=
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_one_TypeI_SinglePanel_Restriction
;
else
if
(
dl_antenna_ports
==
12
)
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
moreThanTwo
->
n1_n2
.
present
=
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_three_two_TypeI_SinglePanel_Restriction
;
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_six_one_TypeI_SinglePanel_Restriction
;
else
//default
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
moreThanTwo
->
n1_n2
.
present
=
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_one_TypeI_SinglePanel_Restriction
;
/*csirep1->codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel->nrOfAntennaPorts.choice.moreThanTwo->n1_n2.choice.two_one_TypeI_SinglePanel_Restriction.size=1;
csirep1->codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel->nrOfAntennaPorts.choice.moreThanTwo->n1_n2.choice.two_one_TypeI_SinglePanel_Restriction.bits_unused=1;
csirep1->codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel->nrOfAntennaPorts.choice.moreThanTwo->n1_n2.choice.two_one_TypeI_SinglePanel_Restriction.buf=malloc(1);
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
e993a59d
...
...
@@ -239,6 +239,8 @@ RUs = (
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
## beamforming 2x2 matrix:
#bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
## beamforming 2x4 matrix:
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000];
## beamforming 4x4 matrix:
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
sdr_addrs
=
"addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2"
;
...
...
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