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
1d7569b4
Commit
1d7569b4
authored
Dec 21, 2021
by
sfn
Committed by
Thomas Schlichter
Jan 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up and optimize UE
parent
7d47e984
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
190 additions
and
645 deletions
+190
-645
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+6
-44
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
+174
-578
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+1
-14
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+2
-2
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
1d7569b4
...
...
@@ -64,7 +64,7 @@ extern uint16_t beta_cqi[16];
* \param[in] frame_parms LTE_DL_FRAME_PARMS structure.
* \note This function is optimistic in that it expects malloc() to succeed.
*/
void
phy_init_nr_ue_
_
PDSCH
(
NR_UE_PDSCH
*
const
pdsch
,
void
phy_init_nr_ue_PDSCH
(
NR_UE_PDSCH
*
const
pdsch
,
const
NR_DL_FRAME_PARMS
*
const
fp
)
{
AssertFatal
(
pdsch
,
"pdsch==0"
);
...
...
@@ -132,7 +132,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
NR_UE_COMMON
*
const
common_vars
=
&
ue
->
common_vars
;
NR_UE_PBCH
**
const
pbch_vars
=
ue
->
pbch_vars
;
NR_UE_PRACH
**
const
prach_vars
=
ue
->
prach_vars
;
int
i
,
j
,
k
,
l
,
slot
,
symb
,
q
;
int
i
,
j
,
slot
,
symb
,
q
;
int
gNB_id
;
int
th_id
;
uint32_t
****
pusch_dmrs
;
...
...
@@ -317,56 +317,18 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
if
(
abstraction_flag
==
0
)
{
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
phy_init_nr_ue_
_
PDSCH
(
ue
->
pdsch_vars
[
th_id
][
gNB_id
],
fp
);
phy_init_nr_ue_PDSCH
(
ue
->
pdsch_vars
[
th_id
][
gNB_id
],
fp
);
}
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
for
(
i
nt
i
=
0
;
i
<
NR_MAX_NB_CODEWORDS
;
i
++
)
{
for
(
i
=
0
;
i
<
NR_MAX_NB_CODEWORDS
;
i
++
)
{
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
llr
[
i
]
=
(
int16_t
*
)
malloc16_clear
(
(
8
*
(
3
*
8
*
8448
))
*
sizeof
(
int16_t
)
);
//Q_m = 8 bits/Sym, Code_Rate=3, Number of Segments =8, Circular Buffer K_cb = 8448
}
for
(
i
nt
i
=
0
;
i
<
NR_MAX_NB_LAYERS
;
i
++
)
{
for
(
i
=
0
;
i
<
NR_MAX_NB_LAYERS
;
i
++
)
{
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
layer_llr
[
i
]
=
(
int16_t
*
)
malloc16_clear
(
(
8
*
(
3
*
8
*
8448
))
*
sizeof
(
int16_t
)
);
//Q_m = 8 bits/Sym, Code_Rate=3, Number of Segments =8, Circular Buffer K_cb = 8448
}
}
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
dl_ch_rho2_ext
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
}
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
for
(
j
=
0
;
j
<
4
;
j
++
)
{
const
int
idx
=
(
j
*
fp
->
nb_antennas_rx
)
+
i
;
const
size_t
num
=
7
*
2
*
fp
->
N_RB_DL
*
12
+
4
;
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
dl_ch_rho2_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
}
}
//const size_t num = 7*2*fp->N_RB_DL*12+4;
for
(
k
=
0
;
k
<
8
;
k
++
)
{
//harq_pid
for
(
l
=
0
;
l
<
8
;
l
++
)
{
//round
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
rxdataF_comp1
[
k
][
l
]
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
dl_ch_rho_ext
[
k
][
l
]
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
dl_ch_mag1
[
k
][
l
]
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
dl_ch_magb1
[
k
][
l
]
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
}
for
(
int
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
for
(
int
j
=
0
;
j
<
4
;
j
++
)
{
//frame_parms->nb_antennas_tx; j++)
const
int
idx
=
(
j
*
fp
->
nb_antennas_rx
)
+
i
;
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
dl_ch_rho_ext
[
k
][
l
][
idx
]
=
(
int32_t
*
)
malloc16_clear
(
7
*
2
*
sizeof
(
int32_t
)
*
(
fp
->
N_RB_DL
*
12
));
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
rxdataF_comp1
[
k
][
l
][
idx
]
=
(
int32_t
*
)
malloc16_clear
(
7
*
2
*
sizeof
(
int32_t
)
*
(
fp
->
N_RB_DL
*
12
));
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
dl_ch_mag1
[
k
][
l
][
idx
]
=
(
int32_t
*
)
malloc16_clear
(
7
*
2
*
sizeof
(
int32_t
)
*
(
fp
->
N_RB_DL
*
12
));
ue
->
pdsch_vars
[
th_id
][
gNB_id
]
->
dl_ch_magb1
[
k
][
l
][
idx
]
=
(
int32_t
*
)
malloc16_clear
(
7
*
2
*
sizeof
(
int32_t
)
*
(
fp
->
N_RB_DL
*
12
));
}
}
}
}
// PDCCH
// 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
ue
->
pdcch_vars
[
th_id
][
gNB_id
]
->
llr
=
(
int16_t
*
)
malloc16_clear
(
2
*
4
*
100
*
12
*
sizeof
(
uint16_t
)
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
1d7569b4
...
...
@@ -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 @
1d7569b4
...
...
@@ -447,7 +447,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_
D
(
PHY
,
"Segment %u CRC OK
\n\033
[0m
"
,
r
);
LOG_
I
(
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
]);
...
...
@@ -457,7 +457,7 @@ void nr_processDLSegment(void* arg) {
no_iteration_ldpc
=
dlsch
->
max_ldpc_iterations
;
rdata
->
decodeIterations
=
no_iteration_ldpc
;
}
else
{
LOG_
D
(
PHY
,
"CRC NOT OK
\n\033
[0m
"
);
LOG_
I
(
PHY
,
"CRC NOT OK
\n
"
);
}
nb_total_decod
++
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
1d7569b4
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
1d7569b4
...
...
@@ -734,7 +734,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
@param n_dmrs_cdm_groups
@param frame_parms Pointer to frame descriptor
*/
unsigned
short
nr_dlsch_extract_rbs_multiple
(
int
**
rxdataF
,
void
nr_dlsch_extract_rbs
(
int
**
rxdataF
,
int
**
dl_ch_estimates
,
int
**
rxdataF_ext
,
int
**
dl_ch_estimates_ext
,
...
...
@@ -898,19 +898,6 @@ void nr_dlsch_detection_mrc(int **rxdataF_comp,
unsigned
short
nb_rb
,
int
length
);
void
nr_dlsch_detection_mrc_core
(
int
**
rxdataF_comp
,
int
**
rxdataF_comp_i
,
int
**
rho
,
int
**
rho_i
,
int
**
dl_ch_mag
,
int
**
dl_ch_magb
,
int
**
dl_ch_mag_i
,
int
**
dl_ch_magb_i
,
unsigned
char
n_tx
,
unsigned
char
n_rx
,
int
length
,
int
start_point
);
void
det_HhH
(
int32_t
*
after_mf_00
,
int32_t
*
after_mf_01
,
int32_t
*
after_mf_10
,
...
...
openair1/PHY/defs_nr_UE.h
View file @
1d7569b4
...
...
@@ -184,7 +184,7 @@ typedef struct {
//! estimated rssi (dBm)
short
rx_rssi_dBm
[
NUMBER_OF_CONNECTED_gNB_MAX
];
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
int
rx_correlation
[
NUMBER_OF_CONNECTED_gNB_MAX
][
4
][
4
];
int
rx_correlation
[
NUMBER_OF_CONNECTED_gNB_MAX
][
NB_ANTENNAS_RX
][
NR_MAX_NB_LAYERS
*
NR_MAX_NB_LAYERS
];
//
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
int
rx_correlation_dB
[
NUMBER_OF_CONNECTED_gNB_MAX
][
2
];
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
1d7569b4
...
...
@@ -216,11 +216,11 @@ RUs = (
## beamforming 1x4 matrix: 1 layer x 4 antennas
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
## beamforming 2x2 matrix:
#
bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
#
bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
## beamforming 2x4 matrix:
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000];
## beamforming 4x4 matrix:
bf_weights
= [
0
x00007fff
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x0000
0000
,
0
x00007fff
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x00007fff
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x00007fff
];
bf_weights
= [
0
x00007fff
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x00007fff
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x00007fff
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x0000
,
0
x00007fff
];
sdr_addrs
=
"addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2"
;
clock_src
=
"external"
;
}
...
...
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