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
spbro
OpenXG-RAN
Commits
2a88c615
Commit
2a88c615
authored
Mar 25, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix_nr_odd_prb' into integration_2022_wk12_a
parents
bf58c6b4
05daeb66
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
197 additions
and
167 deletions
+197
-167
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+28
-8
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+1
-1
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+40
-15
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+43
-64
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+85
-79
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
2a88c615
...
...
@@ -457,14 +457,34 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
pmi
=
0
;
//no precoding
if
(
pmi
==
0
)
{
//unitary Precoding
if
(
ap
<
rel15
->
nrOfLayers
)
memcpy
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
txdataF_offset
+
k
],
(
void
*
)
&
txdataF_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
+
txdataF_offset
+
k
],
0
,
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
if
(
k
+
NR_NB_SC_PER_RB
<=
frame_parms
->
ofdm_symbol_size
)
{
// RB does not cross DC
if
(
ap
<
rel15
->
nrOfLayers
)
memcpy
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
txdataF_offset
+
k
],
(
void
*
)
&
txdataF_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
+
txdataF_offset
+
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
<
rel15
->
nrOfLayers
)
{
memcpy
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
txdataF_offset
+
k
],
(
void
*
)
&
txdataF_precoding
[
ap
][
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)],
neg_length
*
sizeof
(
int32_t
));
memcpy
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
txdataF_offset
],
(
void
*
)
&
txdataF_precoding
[
ap
][
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
)],
pos_length
*
sizeof
(
int32_t
));
}
else
{
memset
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
txdataF_offset
+
k
],
0
,
neg_length
*
sizeof
(
int32_t
));
memset
((
void
*
)
&
txdataF
[
ap
][
l
*
frame_parms
->
ofdm_symbol_size
+
txdataF_offset
],
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
;
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
2a88c615
...
...
@@ -356,7 +356,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
if
(
is_dmrs_symbol
==
0
)
{
//
//rxF[ ((start_re + re)*2) % (frame_parms->ofdm_symbol_size*2)]);
if
(
start_re
+
nb_re_pusch
<
frame_parms
->
ofdm_symbol_size
)
{
if
(
start_re
+
nb_re_pusch
<
=
frame_parms
->
ofdm_symbol_size
)
{
memcpy1
((
void
*
)
rxF_ext
,
(
void
*
)
&
rxF
[
start_re
*
2
],
nb_re_pusch
*
sizeof
(
int32_t
));
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
2a88c615
...
...
@@ -534,8 +534,12 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
16
);
pil
+=
2
;
rxF
+=
8
;
//for (int i= 0; i<8; i++)
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
k
+=
4
;
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
{
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
1
)];
}
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
...
...
@@ -548,6 +552,12 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
16
);
pil
+=
2
;
rxF
+=
8
;
k
+=
4
;
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
{
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
1
)];
}
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
...
...
@@ -560,23 +570,22 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
ch
,
dl_ch
,
16
);
#ifdef DEBUG_PDCCH
#ifdef DEBUG_PDCCH
for
(
int
m
=
0
;
m
<
12
;
m
++
)
printf
(
"data : dl_ch -> (%d,%d)
\n
"
,
dl_ch
[
0
+
2
*
m
],
dl_ch
[
1
+
2
*
m
]);
#endif
#endif
dl_ch
+=
24
;
pil
+=
2
;
rxF
+=
8
;
dl_ch
+=
24
;
k
+=
12
;
k
+=
4
;
for
(
pilot_cnt
=
3
;
pilot_cnt
<
(
3
*
nb_rb_coreset
);
pilot_cnt
+=
3
)
{
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
){
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
1
)];}
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
{
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
1
)];
}
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
...
...
@@ -593,6 +602,12 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
pil
+=
2
;
rxF
+=
8
;
k
+=
4
;
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
{
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
1
)];
}
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
...
...
@@ -605,6 +620,12 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
16
);
pil
+=
2
;
rxF
+=
8
;
k
+=
4
;
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
{
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
1
)];
}
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
...
...
@@ -617,11 +638,15 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
ch
,
dl_ch
,
16
);
pil
+=
2
;
rxF
+=
8
;
#ifdef DEBUG_PDCCH
for
(
int
m
=
0
;
m
<
12
;
m
++
)
printf
(
"data : dl_ch -> (%d,%d)
\n
"
,
dl_ch
[
0
+
2
*
m
],
dl_ch
[
1
+
2
*
m
]);
#endif
dl_ch
+=
24
;
k
+=
12
;
pil
+=
2
;
rxF
+=
8
;
k
+=
4
;
}
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
2a88c615
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
2a88c615
...
...
@@ -648,28 +648,29 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
// Please keep it: useful for debugging
#ifdef DEBUG_PDSCH_RX
char
filename
[
4
0
];
char
filename
[
5
0
];
uint8_t
aa
=
0
;
snprintf
(
filename
,
4
0
,
"rxdataF0_symb_%d_nr_slot_rx_%d.m"
,
symbol
,
nr_slot_rx
);
snprintf
(
filename
,
5
0
,
"rxdataF0_symb_%d_nr_slot_rx_%d.m"
,
symbol
,
nr_slot_rx
);
write_output
(
filename
,
"rxdataF0"
,
&
common_vars
->
common_vars_rx_data_per_thread
[
proc
->
thread_id
].
rxdataF
[
0
][
0
],
NR_SYMBOLS_PER_SLOT
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
snprintf
(
filename
,
4
0
,
"dl_ch_estimates0%d_symb_%d_nr_slot_rx_%d.m"
,
aa
,
symbol
,
nr_slot_rx
);
snprintf
(
filename
,
5
0
,
"dl_ch_estimates0%d_symb_%d_nr_slot_rx_%d.m"
,
aa
,
symbol
,
nr_slot_rx
);
write_output
(
filename
,
"dl_ch_estimates"
,
&
pdsch_vars
[
gNB_id
]
->
dl_ch_estimates
[
aa
][
0
],
NR_SYMBOLS_PER_SLOT
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
snprintf
(
filename
,
4
0
,
"rxdataF_ext0%d_symb_%d_nr_slot_rx_%d.m"
,
aa
,
symbol
,
nr_slot_rx
);
snprintf
(
filename
,
5
0
,
"rxdataF_ext0%d_symb_%d_nr_slot_rx_%d.m"
,
aa
,
symbol
,
nr_slot_rx
);
write_output
(
filename
,
"rxdataF_ext"
,
&
pdsch_vars
[
gNB_id
]
->
rxdataF_ext
[
aa
][
0
],
NR_SYMBOLS_PER_SLOT
*
frame_parms
->
N_RB_DL
*
NR_NB_SC_PER_RB
,
1
,
1
);
snprintf
(
filename
,
4
0
,
"dl_ch_estimates_ext0%d_symb_%d_nr_slot_rx_%d.m"
,
aa
,
symbol
,
nr_slot_rx
);
snprintf
(
filename
,
5
0
,
"dl_ch_estimates_ext0%d_symb_%d_nr_slot_rx_%d.m"
,
aa
,
symbol
,
nr_slot_rx
);
write_output
(
filename
,
"dl_ch_estimates_ext00"
,
&
pdsch_vars
[
gNB_id
]
->
dl_ch_estimates_ext
[
aa
][
0
],
NR_SYMBOLS_PER_SLOT
*
frame_parms
->
N_RB_DL
*
NR_NB_SC_PER_RB
,
1
,
1
);
snprintf
(
filename
,
4
0
,
"rxdataF_comp0%d_symb_%d_nr_slot_rx_%d.m"
,
aa
,
symbol
,
nr_slot_rx
);
snprintf
(
filename
,
5
0
,
"rxdataF_comp0%d_symb_%d_nr_slot_rx_%d.m"
,
aa
,
symbol
,
nr_slot_rx
);
write_output
(
filename
,
"rxdataF_comp00"
,
&
pdsch_vars
[
gNB_id
]
->
rxdataF_comp0
[
aa
][
0
],
NR_SYMBOLS_PER_SLOT
*
frame_parms
->
N_RB_DL
*
NR_NB_SC_PER_RB
,
1
,
1
);
/*
for (int i=0; i < 2; i++){
snprintf
(
filename
,
4
0
,
"llr%d_symb_%d_nr_slot_rx_%d.m"
,
i
,
symbol
,
nr_slot_rx
);
snprintf(filename,
5
0, "llr%d_symb_%d_nr_slot_rx_%d.m", i, symbol, nr_slot_rx);
write_output(filename,"llr", &pdsch_vars[gNB_id]->llr[i][0], (NR_SYMBOLS_PER_SLOT*nb_rb*NR_NB_SC_PER_RB*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm), 1, 0);
}
*/
#endif
#if T_TRACER
...
...
@@ -889,9 +890,11 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
rxdataF_comp128
[
1
]
=
_mm_packs_epi32
(
mmtmpD2
,
mmtmpD3
);
//print_shorts("rx:",(int16_t*)&rxdataF128[1]);
//print_shorts("ch:",(int16_t*)&dl_ch128[1]);
//print_shorts("pack:",(int16_t*)&rxdataF_comp128[1]);
#ifdef DEBUG_DLSCH_DEMOD
print_shorts
(
"rx:"
,(
int16_t
*
)
&
rxdataF128
[
1
]);
print_shorts
(
"ch:"
,(
int16_t
*
)
&
dl_ch128
[
1
]);
print_shorts
(
"pack:"
,(
int16_t
*
)
&
rxdataF_comp128
[
1
]);
#endif
// multiply by conjugated channel
mmtmpD0
=
_mm_madd_epi16
(
dl_ch128
[
2
],
rxdataF128
[
2
]);
...
...
@@ -907,9 +910,11 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
rxdataF_comp128
[
2
]
=
_mm_packs_epi32
(
mmtmpD2
,
mmtmpD3
);
//print_shorts("rx:",(int16_t*)&rxdataF128[2]);
//print_shorts("ch:",(int16_t*)&dl_ch128[2]);
//print_shorts("pack:",(int16_t*)&rxdataF_comp128[2]);
#ifdef DEBUG_DLSCH_DEMOD
print_shorts
(
"rx:"
,(
int16_t
*
)
&
rxdataF128
[
2
]);
print_shorts
(
"ch:"
,(
int16_t
*
)
&
dl_ch128
[
2
]);
print_shorts
(
"pack:"
,(
int16_t
*
)
&
rxdataF_comp128
[
2
]);
#endif
dl_ch128
+=
3
;
dl_ch_mag128
+=
3
;
...
...
@@ -1994,87 +1999,88 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
dlDmrsSymbPos
)
{
unsigned
short
k
,
rb
;
unsigned
char
nushift
,
i
,
aarx
;
int
*
dl_ch0
,
*
dl_ch0_ext
,
*
rxF
,
*
rxF_ext
;
int8_t
validDmrsEst
=
0
;
//store last DMRS Symbol index
unsigned
char
j
=
0
;
if
(
config_type
==
NFAPI_NR_DMRS_TYPE1
)
{
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
}
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
}
k
=
frame_parms
->
first_carrier_offset
+
NR_NB_SC_PER_RB
*
start_rb
;
const
unsigned
short
start_re
=
(
frame_parms
->
first_carrier_offset
+
start_rb
*
NR_NB_SC_PER_RB
)
%
frame_parms
->
ofdm_symbol_size
;
const
int8_t
validDmrsEst
=
get_valid_dmrs_idx_for_channel_est
(
dlDmrsSymbPos
,
symbol
);
validDmrsEst
=
get_valid_dmrs_idx_for_channel_est
(
dlDmrsSymbPos
,
symbol
);
for
(
unsigned
char
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
dl_ch0
=
&
dl_ch_estimates
[
aarx
][(
validDmrsEst
*
(
frame_parms
->
ofdm_symbol_size
))];
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
];
dl_ch0_ext
=
&
dl_ch_estimates_ext
[
aarx
][
symbol
*
(
nb_rb_pdsch
*
12
)];
if
(
pilots
==
0
)
{
//data symbol only
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
));
}
else
{
int
neg_length
=
frame_parms
->
ofdm_symbol_size
-
start_re
;
int
pos_length
=
nb_rb_pdsch
*
NR_NB_SC_PER_RB
-
neg_length
;
rxF_ext
=
&
rxdataF_ext
[
aarx
][
symbol
*
(
nb_rb_pdsch
*
12
)];
rxF
=
&
rxdataF
[
aarx
][(
k
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
)))];
for
(
rb
=
0
;
rb
<
nb_rb_pdsch
;
rb
++
)
{
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
=
k
-
frame_parms
->
ofdm_symbol_size
;
rxF
=
&
rxdataF
[
aarx
][(
k
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
)))];
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
));
}
if
(
pilots
==
0
)
{
memcpy
((
void
*
)
rxF_ext
,(
void
*
)
rxF
,
12
*
sizeof
(
*
rxF_ext
));
memcpy
((
void
*
)
dl_ch0_ext
,(
void
*
)
dl_ch0
,
12
*
sizeof
(
*
dl_ch0_ext
));
dl_ch0_ext
+=
12
;
rxF_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
)
{
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
}
dl_ch0_ext
+=
6
;
rxF_ext
+=
6
;
}
}
else
{
//NFAPI_NR_DMRS_TYPE2
for
(
i
=
(
2
+
nushift
);
i
<
6
;
i
++
)
{
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
}
for
(
i
=
(
8
+
nushift
);
i
<
12
;
i
++
)
{
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
}
dl_ch0_ext
+=
j
;
rxF_ext
+=
j
;
memcpy
((
void
*
)
dl_ch0_ext
,
(
void
*
)
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
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
];
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
;
}
}
dl_ch0
+=
12
;
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
))];
}
else
{
//NFAPI_NR_DMRS_TYPE2
if
(
n_dmrs_cdm_groups
==
1
)
{
//data is multiplexed
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
];
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
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
;
}
}
}
}
return
(
nb_rb_pdsch
);
return
nb_rb_pdsch
;
}
unsigned
short
nr_dlsch_extract_rbs_multiple
(
int
**
rxdataF
,
...
...
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