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
zzha zzha
OpenXG-RAN
Commits
678b8a23
Commit
678b8a23
authored
Sep 22, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/nr_ue_odd_prb_fixes' into integration_2022_wk38
parents
1273846c
4e024e1f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
121 additions
and
220 deletions
+121
-220
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+79
-165
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+14
-46
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+28
-9
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
678b8a23
...
...
@@ -1599,7 +1599,7 @@ void nr_dlsch_channel_level_median(int **dl_ch_estimates_ext,
// Extraction functions
//==============================================================================================
unsigned
short
nr_dlsch_extract_rbs_single
(
int
**
rxdataF
,
void
nr_dlsch_extract_rbs
(
int
**
rxdataF
,
int
**
dl_ch_estimates
,
int
**
rxdataF_ext
,
int
**
dl_ch_estimates_ext
,
...
...
@@ -1609,6 +1609,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
unsigned
short
start_rb
,
unsigned
short
nb_rb_pdsch
,
uint8_t
n_dmrs_cdm_groups
,
uint8_t
Nl
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
dlDmrsSymbPos
,
int
chest_time_type
)
...
...
@@ -1631,178 +1632,91 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
for
(
unsigned
char
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
int32_t
*
dl_ch0
=
&
dl_ch_estimates
[
aarx
][
validDmrsEst
*
frame_parms
->
ofdm_symbol_size
];
int32_t
*
dl_ch0_ext
=
&
dl_ch_estimates_ext
[
aarx
][
symbol
*
nb_rb_pdsch
*
NR_NB_SC_PER_RB
];
int32_t
*
rxF_ext
=
&
rxdataF_ext
[
aarx
][
symbol
*
nb_rb_pdsch
*
NR_NB_SC_PER_RB
];
int32_t
*
rxF
=
&
rxdataF
[
aarx
][
symbol
*
frame_parms
->
ofdm_symbol_size
];
for
(
unsigned
char
aatx
=
0
;
aatx
<
Nl
;
aatx
++
)
{
int32_t
*
dl_ch0
=
&
dl_ch_estimates
[(
aatx
*
frame_parms
->
nb_antennas_rx
)
+
aarx
][
validDmrsEst
*
frame_parms
->
ofdm_symbol_size
];
int32_t
*
dl_ch0_ext
=
&
dl_ch_estimates_ext
[(
aatx
*
frame_parms
->
nb_antennas_rx
)
+
aarx
][
symbol
*
nb_rb_pdsch
*
NR_NB_SC_PER_RB
];
if
(
pilots
==
0
)
{
//data symbol only
if
(
aatx
==
0
)
{
if
(
start_re
+
nb_rb_pdsch
*
NR_NB_SC_PER_RB
<=
frame_parms
->
ofdm_symbol_size
)
{
memcpy
((
void
*
)
rxF_ext
,
(
void
*
)
&
rxF
[
start_re
],
nb_rb_pdsch
*
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
memcpy
(
rxF_ext
,
&
rxF
[
start_re
],
nb_rb_pdsch
*
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
}
else
{
int
neg_length
=
frame_parms
->
ofdm_symbol_size
-
start_re
;
int
pos_length
=
nb_rb_pdsch
*
NR_NB_SC_PER_RB
-
neg_length
;
memcpy
((
void
*
)
rxF_ext
,
(
void
*
)
&
rxF
[
start_re
],
neg_length
*
sizeof
(
int32_t
));
memcpy
((
void
*
)
&
rxF_ext
[
neg_length
],
(
void
*
)
rxF
,
pos_length
*
sizeof
(
int32_t
));
memcpy
(
rxF_ext
,
&
rxF
[
start_re
],
neg_length
*
sizeof
(
int32_t
));
memcpy
(
&
rxF_ext
[
neg_length
],
rxF
,
pos_length
*
sizeof
(
int32_t
));
}
}
memcpy
((
void
*
)
dl_ch0_ext
,
(
void
*
)
dl_ch0
,
nb_rb_pdsch
*
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
memcpy
(
dl_ch0_ext
,
dl_ch0
,
nb_rb_pdsch
*
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
}
else
if
(
config_type
==
NFAPI_NR_DMRS_TYPE1
){
if
(
n_dmrs_cdm_groups
==
1
)
{
//data is multiplexed
if
(
aatx
==
0
)
{
unsigned
short
k
=
start_re
;
for
(
unsigned
short
j
=
0
;
j
<
6
*
nb_rb_pdsch
;
j
+=
3
)
{
rxF_ext
[
j
]
=
rxF
[
k
+
1
];
rxF_ext
[
j
+
1
]
=
rxF
[
k
+
3
];
rxF_ext
[
j
+
2
]
=
rxF
[
k
+
5
];
k
+=
6
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
for
(
unsigned
short
j
=
0
;
j
<
6
*
nb_rb_pdsch
;
j
+=
3
)
{
dl_ch0_ext
[
j
]
=
dl_ch0
[
1
];
dl_ch0_ext
[
j
+
1
]
=
dl_ch0
[
3
];
dl_ch0_ext
[
j
+
2
]
=
dl_ch0
[
5
];
dl_ch0
+=
6
;
k
+=
6
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
}
else
{
//NFAPI_NR_DMRS_TYPE2
if
(
n_dmrs_cdm_groups
==
1
)
{
//data is multiplexed
if
(
aatx
==
0
)
{
unsigned
short
k
=
start_re
;
for
(
unsigned
short
j
=
0
;
j
<
8
*
nb_rb_pdsch
;
j
+=
4
)
{
rxF_ext
[
j
]
=
rxF
[
k
+
2
];
rxF_ext
[
j
+
1
]
=
rxF
[
k
+
3
];
rxF_ext
[
j
+
2
]
=
rxF
[
k
+
4
];
rxF_ext
[
j
+
3
]
=
rxF
[
k
+
5
];
k
+=
6
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
for
(
unsigned
short
j
=
0
;
j
<
8
*
nb_rb_pdsch
;
j
+=
4
)
{
dl_ch0_ext
[
j
]
=
dl_ch0
[
2
];
dl_ch0_ext
[
j
+
1
]
=
dl_ch0
[
3
];
dl_ch0_ext
[
j
+
2
]
=
dl_ch0
[
4
];
dl_ch0_ext
[
j
+
3
]
=
dl_ch0
[
5
];
dl_ch0
+=
6
;
k
+=
6
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
else
if
(
n_dmrs_cdm_groups
==
2
)
{
//data is multiplexed
if
(
aatx
==
0
)
{
unsigned
short
k
=
start_re
;
for
(
unsigned
short
j
=
0
;
j
<
4
*
nb_rb_pdsch
;
j
+=
2
)
{
rxF_ext
[
j
]
=
rxF
[
k
+
4
];
rxF_ext
[
j
+
1
]
=
rxF
[
k
+
5
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
4
];
dl_ch0_ext
[
j
+
1
]
=
dl_ch0
[
5
];
dl_ch0
+=
6
;
k
+=
6
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
for
(
unsigned
short
j
=
0
;
j
<
4
*
nb_rb_pdsch
;
j
+=
2
)
{
dl_ch0_ext
[
j
]
=
dl_ch0
[
4
];
dl_ch0_ext
[
j
+
1
]
=
dl_ch0
[
5
];
dl_ch0
+=
6
;
}
}
return
nb_rb_pdsch
;
}
void
nr_dlsch_extract_rbs
(
int
**
rxdataF
,
int
**
dl_ch_estimates
,
int
**
rxdataF_ext
,
int
**
dl_ch_estimates_ext
,
unsigned
char
symbol
,
uint8_t
pilots
,
uint8_t
config_type
,
unsigned
short
start_rb
,
unsigned
short
nb_rb_pdsch
,
uint8_t
n_dmrs_cdm_groups
,
uint8_t
Nl
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
dlDmrsSymbPos
,
int
chest_time_type
)
{
unsigned
short
k
,
rb
;
unsigned
char
nushift
,
j
,
i
,
aarx
,
aatx
;
int
*
dl_ch0
,
*
dl_ch0_ext
,
*
rxF
,
*
rxF_ext
;
int8_t
validDmrsEst
=
0
;
//store last DMRS Symbol index
if
(
config_type
==
NFAPI_NR_DMRS_TYPE1
)
{
AssertFatal
(
n_dmrs_cdm_groups
==
1
||
n_dmrs_cdm_groups
==
2
,
"n_dmrs_cdm_groups %d is illegal
\n
"
,
n_dmrs_cdm_groups
);
nushift
=
n_dmrs_cdm_groups
-
1
;
//delta in Table 7.4.1.1.2-1
}
else
{
AssertFatal
(
n_dmrs_cdm_groups
==
1
||
n_dmrs_cdm_groups
==
2
||
n_dmrs_cdm_groups
==
3
,
"n_dmrs_cdm_groups %d is illegal
\n
"
,
n_dmrs_cdm_groups
);
nushift
=
(
n_dmrs_cdm_groups
-
1
)
<<
1
;
//delta in Table 7.4.1.1.2-2
}
if
(
chest_time_type
==
0
)
validDmrsEst
=
get_valid_dmrs_idx_for_channel_est
(
dlDmrsSymbPos
,
symbol
);
else
validDmrsEst
=
get_next_dmrs_symbol_in_slot
(
dlDmrsSymbPos
,
0
,
14
);
// get first dmrs symbol index
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
k
=
frame_parms
->
first_carrier_offset
+
NR_NB_SC_PER_RB
*
start_rb
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
=
k
-
frame_parms
->
ofdm_symbol_size
;
rxF_ext
=
&
rxdataF_ext
[
aarx
][
symbol
*
(
nb_rb_pdsch
*
12
)];
rxF
=
&
rxdataF
[
aarx
][(
k
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
)))];
for
(
aatx
=
0
;
aatx
<
Nl
;
aatx
++
)
{
dl_ch0
=
&
dl_ch_estimates
[(
aatx
*
frame_parms
->
nb_antennas_rx
)
+
aarx
][(
validDmrsEst
*
(
frame_parms
->
ofdm_symbol_size
))];
dl_ch0_ext
=
&
dl_ch_estimates_ext
[(
aatx
*
frame_parms
->
nb_antennas_rx
)
+
aarx
][
symbol
*
(
nb_rb_pdsch
*
NR_NB_SC_PER_RB
)];
for
(
rb
=
0
;
rb
<
nb_rb_pdsch
;
rb
++
)
{
if
(
pilots
==
0
)
{
//data symbol only
if
(
aatx
==
0
)
{
//Extract Rx signal only
memcpy
((
void
*
)
rxF_ext
,(
void
*
)
rxF
,
12
*
sizeof
(
*
rxF_ext
));
rxF_ext
+=
12
;
}
memcpy
((
void
*
)
dl_ch0_ext
,(
void
*
)
dl_ch0
,
12
*
sizeof
(
*
dl_ch0_ext
));
//Extract Channel Estimate
dl_ch0_ext
+=
12
;
}
else
{
//the symbol contains DMRS
j
=
0
;
if
(
config_type
==
NFAPI_NR_DMRS_TYPE1
)
{
if
(
nushift
==
0
)
{
//data is multiplexed
for
(
i
=
(
1
-
nushift
);
i
<
12
;
i
+=
2
)
{
if
(
aatx
==
0
)
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
}
dl_ch0_ext
+=
6
;
if
(
aatx
==
0
)
rxF_ext
+=
6
;
}
}
else
{
//NFAPI_NR_DMRS_TYPE2
for
(
i
=
(
2
+
nushift
);
i
<
6
;
i
++
)
{
if
(
aatx
==
0
)
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
}
for
(
i
=
(
8
+
nushift
);
i
<
12
;
i
++
)
{
if
(
aatx
==
0
)
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
}
dl_ch0_ext
+=
j
;
if
(
aatx
==
0
)
rxF_ext
+=
j
;
}
}
dl_ch0
+=
12
;
if
(
aatx
==
0
)
{
rxF
+=
12
;
k
+=
12
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
=
k
-
(
frame_parms
->
ofdm_symbol_size
);
rxF
=
&
rxdataF
[
aarx
][
k
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
))];
}
}
}
//rb
}
//aatx
}
//aarx
}
void
nr_dlsch_detection_mrc
(
int
**
rxdataF_comp
,
...
...
@@ -2439,9 +2353,9 @@ static void nr_dlsch_layer_demapping(int16_t **llr_cw,
switch
(
Nl
)
{
case
1
:
if
(
codeword_TB1
==
-
1
)
memcpy
(
(
void
*
)
llr_cw
[
0
],
(
void
*
)
llr_layers
[
0
],
(
length
)
*
sizeof
(
int16_t
));
memcpy
(
llr_cw
[
0
],
llr_layers
[
0
],
(
length
)
*
sizeof
(
int16_t
));
else
if
(
codeword_TB0
==
-
1
)
memcpy
(
(
void
*
)
llr_cw
[
1
],
(
void
*
)
llr_layers
[
0
],
(
length
)
*
sizeof
(
int16_t
));
memcpy
(
llr_cw
[
1
],
llr_layers
[
0
],
(
length
)
*
sizeof
(
int16_t
));
break
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
678b8a23
...
...
@@ -680,39 +680,7 @@ void dlsch_detection_mrc_TM34(NR_DL_FRAME_PARMS *frame_parms,
unsigned
short
nb_rb
,
unsigned
char
dual_stream_UE
);
/** \fn dlsch_extract_rbs_single(int32_t **rxdataF,
int32_t **dl_ch_estimates,
int32_t **rxdataF_ext,
int32_t **dl_ch_estimates_ext,
uint32_t *rb_alloc,
uint8_t symbol,
NR_DL_FRAME_PARMS *frame_parms)
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
for the current allocation and for single antenna eNB transmission.
@param rxdataF Raw FFT output of received signal
@param dl_ch_estimates Channel estimates of current slot
@param rxdataF_ext FFT output for RBs in this allocation
@param dl_ch_estimates_ext Channel estimates for RBs in this allocation
@param rb_alloc RB allocation vector
@param symbol Symbol to extract
@param n_dmrs_cdm_groups
@param frame_parms Pointer to frame descriptor
*/
unsigned
short
nr_dlsch_extract_rbs_single
(
int
**
rxdataF
,
int
**
dl_ch_estimates
,
int
**
rxdataF_ext
,
int
**
dl_ch_estimates_ext
,
unsigned
char
symbol
,
uint8_t
pilots
,
uint8_t
config_type
,
unsigned
short
start_rb
,
unsigned
short
nb_rb_pdsch
,
uint8_t
n_dmrs_cdm_groups
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
dlDmrsSymbPos
,
int
chest_time_type
);
/** \fn dlsch_extract_rbs_multiple(int32_t **rxdataF,
/** \fn dlsch_extract_rbs(int32_t **rxdataF,
int32_t **dl_ch_estimates,
int32_t **rxdataF_ext,
int32_t **dl_ch_estimates_ext,
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
678b8a23
...
...
@@ -495,15 +495,34 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
uint8_t
pmi
=
pusch_pdu
->
Tpmi
;
if
(
pmi
==
0
)
{
//unitary Precoding
if
(
ap
<
pusch_pdu
->
nrOfLayers
)
memcpy
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
k
],
(
void
*
)
&
tx_precoding
[
ap
][
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)],
if
(
k
+
NR_NB_SC_PER_RB
<=
frame_parms
->
ofdm_symbol_size
)
{
// RB does not cross DC
if
(
ap
<
pusch_pdu
->
nrOfLayers
)
memcpy
(
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
k
],
&
tx_precoding
[
ap
][
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)],
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
else
memset
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
k
],
memset
(
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
k
],
0
,
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
}
else
{
// RB does cross DC
int
neg_length
=
frame_parms
->
ofdm_symbol_size
-
k
;
int
pos_length
=
NR_NB_SC_PER_RB
-
neg_length
;
if
(
ap
<
pusch_pdu
->
nrOfLayers
)
{
memcpy
(
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
k
],
&
tx_precoding
[
ap
][
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)],
neg_length
*
sizeof
(
int32_t
));
memcpy
(
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
],
&
tx_precoding
[
ap
][
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
)],
pos_length
*
sizeof
(
int32_t
));
}
else
{
memset
(
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
k
],
0
,
neg_length
*
sizeof
(
int32_t
));
memset
(
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
],
0
,
pos_length
*
sizeof
(
int32_t
));
}
}
k
+=
NR_NB_SC_PER_RB
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
-=
frame_parms
->
ofdm_symbol_size
;
...
...
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