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
bd2a27f6
Commit
bd2a27f6
authored
Sep 24, 2021
by
Florian Kaltenberger
Committed by
Hongzhi Wang
Mar 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more error checks + data collection
parent
d91226f0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
22 deletions
+59
-22
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
+17
-3
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+3
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+17
-9
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+22
-9
No files found.
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
View file @
bd2a27f6
...
...
@@ -1161,17 +1161,27 @@ pmd_lcore_ldpc_dec(void *arg)
deq
+=
rte_bbdev_dequeue_ldpc_dec_ops
(
tp
->
dev_id
,
queue_id
,
&
ops_deq
[
deq
],
enq
-
deq
);
//printf("enq %d, deq %d\n",enq,deq);
}
/* dequeue the remaining */
int
trials
=
0
;
while
(
deq
<
enq
)
{
deq
+=
rte_bbdev_dequeue_ldpc_dec_ops
(
tp
->
dev_id
,
queue_id
,
&
ops_deq
[
deq
],
enq
-
deq
);
usleep
(
10
);
trials
++
;
if
(
trials
>=
100
)
{
printf
(
"aborting decoding after 100 dequeue tries
\n
"
);
break
;
}
}
// total_time += rte_rdtsc_precise() - start_time;
}
if
(
deq
==
enq
)
{
tp
->
iter_count
=
0
;
/* get the max of iter_count for all dequeued ops */
for
(
i
=
0
;
i
<
num_ops
;
++
i
)
{
...
...
@@ -1182,6 +1192,10 @@ pmd_lcore_ldpc_dec(void *arg)
ret
=
retrieve_ldpc_dec_op
(
ops_deq
,
num_ops
,
ref_op
,
tp
->
op_params
->
vector_mask
,
p_out
);
TEST_ASSERT_SUCCESS
(
ret
,
"Validation failed!"
);
}
else
{
ret
=
TEST_FAILED
;
}
rte_bbdev_dec_op_free_bulk
(
ops_enq
,
num_ops
);
...
...
@@ -1193,7 +1207,7 @@ pmd_lcore_ldpc_dec(void *arg)
1000000.0) / ((double)total_time /
(double)rte_get_tsc_hz());
*/
return
TEST_SUCCESS
;
return
ret
;
}
...
...
@@ -1513,14 +1527,14 @@ int32_t nrLDPC_decod_offload(t_nrLDPC_dec_params* p_decParams, uint8_t C, uint8_
info
.
drv
.
min_alignment
,
socket_id
);
if
(
f_ret
!=
TEST_SUCCESS
)
{
printf
(
"Couldn't init queue buffers"
);
printf
(
"Couldn't init queue buffers
\n
"
);
return
(
-
1
);
}
}
ret
=
start_pmd_dec
(
ad
,
op_params
,
p_offloadParams
,
p_out
);
if
(
ret
<
0
)
{
printf
(
"Couldn't start pmd dec"
);
printf
(
"Couldn't start pmd dec
\n
"
);
return
(
-
1
);
}
break
;
...
...
openair1/PHY/INIT/nr_init.c
View file @
bd2a27f6
...
...
@@ -109,6 +109,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
init_pucch2_luts
();
load_nrLDPClib
(
NULL
);
if
(
gNB
->
ldpc_offload_flag
)
load_nrLDPClib_offload
();
// PBCH DMRS gold sequences generation
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
bd2a27f6
...
...
@@ -610,6 +610,11 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
(
int8_t
*
)
&
pl_ol128
[
0
],
llrProcBuf
,
1
);
if
(
ret
<
0
)
{
no_iteration_ldpc
=
ulsch
->
max_ldpc_iterations
+
1
;
}
else
{
for
(
int
m
=
0
;
m
<
Kr
>>
3
;
m
++
)
{
harq_process
->
c
[
r
][
m
]
=
(
uint8_t
)
llrProcBuf
[
m
];
}
...
...
@@ -625,8 +630,10 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
#endif
no_iteration_ldpc
=
ulsch
->
max_ldpc_iterations
+
1
;
}
}
r_offset
+=
E
;
/*for (int k=0;k<8;k++)
{
printf("output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
...
...
@@ -646,6 +653,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
LOG_I
(
PHY
,
"uplink segment error %d/%d
\n
"
,
r
,
harq_process
->
C
);
LOG_D
(
PHY
,
"ULSCH %d in error
\n
"
,
ULSCH_id
);
harq_process
->
processedSegments
=
harq_process
->
C
;
r
=
harq_process
->
C
;
}
}
if
(
harq_process
->
processedSegments
==
harq_process
->
C
){
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
bd2a27f6
...
...
@@ -312,6 +312,7 @@ int main(int argc, char **argv)
uint8_t
snrRun
;
int
prb_inter
=
0
;
int
ldpc_offload_flag
=
0
;
uint8_t
max_rounds
=
4
;
int
enable_ptrs
=
0
;
int
modify_dmrs
=
0
;
...
...
@@ -345,7 +346,7 @@ int main(int argc, char **argv)
/* initialize the sin-cos table */
InitSinLUT
();
while
((
c
=
getopt
(
argc
,
argv
,
"a:b:c:d:ef:g:h:ikl:m:n:o:p:r:s:u:w:y:z:F:G:H:M:N:PR:S:T:U:L:Z"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"a:b:c:d:ef:g:h:ikl:m:n:o:p:
q:
r:s:u:w:y:z:F:G:H:M:N:PR:S:T:U:L:Z"
))
!=
-
1
)
{
printf
(
"handling optarg %c
\n
"
,
c
);
switch
(
c
)
{
...
...
@@ -466,6 +467,10 @@ int main(int argc, char **argv)
extended_prefix_flag
=
1
;
break
;
case
'q'
:
max_rounds
=
atoi
(
optarg
);
break
;
case
'r'
:
nb_rb
=
atoi
(
optarg
);
break
;
...
...
@@ -756,7 +761,11 @@ int main(int argc, char **argv)
nfapi_nr_config_request_scf_t
*
cfg
=
&
gNB
->
gNB_config
;
cfg
->
carrier_config
.
num_tx_ant
.
value
=
n_tx
;
cfg
->
carrier_config
.
num_rx_ant
.
value
=
n_rx
;
// nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,0,0x01);
gNB
->
ldpc_offload_flag
=
ldpc_offload_flag
;
phy_init_nr_gNB
(
gNB
,
0
,
1
);
N_RB_DL
=
gNB
->
frame_parms
.
N_RB_DL
;
...
...
@@ -810,7 +819,6 @@ int main(int argc, char **argv)
unsigned
char
harq_pid
=
0
;
gNB
->
ldpc_offload_flag
=
ldpc_offload_flag
;
NR_gNB_ULSCH_t
*
ulsch_gNB
=
gNB
->
ulsch
[
UE_id
][
0
];
//nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &ulsch_gNB->harq_processes[harq_pid]->ulsch_pdu;
nfapi_nr_ul_tti_request_t
*
UL_tti_req
=
malloc
(
sizeof
(
*
UL_tti_req
));
...
...
@@ -845,7 +853,6 @@ int main(int argc, char **argv)
uint16_t
n_rb1
=
75
;
uint16_t
pdu_bit_map
=
PUSCH_PDU_BITMAP_PUSCH_DATA
;
// | PUSCH_PDU_BITMAP_PUSCH_PTRS;
uint8_t
max_rounds
=
4
;
uint8_t
crc_status
=
0
;
unsigned
char
mod_order
=
nr_get_Qm_ul
(
Imcs
,
mcs_table
);
...
...
@@ -1014,12 +1021,14 @@ int main(int argc, char **argv)
double
blerStats
[
4
][
100
];
double
berStats
[
4
][
100
];
double
snrStats
[
100
];
double
ldpcDecStats
[
100
];
memset
(
errors_scrambling
,
0
,
sizeof
(
uint32_t
)
*
4
*
100
);
memset
(
n_errors
,
0
,
sizeof
(
int
)
*
4
*
100
);
memset
(
round_trials
,
0
,
sizeof
(
int
)
*
4
*
100
);
memset
(
blerStats
,
0
,
sizeof
(
double
)
*
4
*
100
);
memset
(
berStats
,
0
,
sizeof
(
double
)
*
4
*
100
);
memset
(
snrStats
,
0
,
sizeof
(
double
)
*
100
);
memset
(
ldpcDecStats
,
0
,
sizeof
(
double
)
*
100
);
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
snr_step
)
{
varArray_t
*
table_rx
=
initVarArray
(
1000
,
sizeof
(
double
));
int
error_flag
=
0
;
...
...
@@ -1421,16 +1430,16 @@ int main(int argc, char **argv)
errors_decoding
++
;
}
}
if
(
n_trials
==
1
)
{
/*
if (n_trials == 1) {
for (int r=0;r<ulsch_ue[0]->harq_processes[harq_pid]->C;r++)
for (int i=0;i<ulsch_ue[0]->harq_processes[harq_pid]->K>>3;i++) {
if
((
ulsch_ue
[
0
]
->
harq_processes
[
harq_pid
]
->
c
[
r
][
i
]
^
ulsch_gNB
->
harq_processes
[
harq_pid
]
->
c
[
r
][
i
])
!=
0
)
printf
(
"************"
);
/*
printf("r %d: in[%d] %x, out[%d] %x (%x)\n",r,
if ((ulsch_ue[0]->harq_processes[harq_pid]->c[r][i]^ulsch_gNB->harq_processes[harq_pid]->c[r][i]) != 0)
printf("r %d: in[%d] %x, out[%d] %x (%x)\n",r,
i,ulsch_ue[0]->harq_processes[harq_pid]->c[r][i],
i,ulsch_gNB->harq_processes[harq_pid]->c[r][i],
ulsch_ue[0]->harq_processes[harq_pid]->c[r][i]^ulsch_gNB->harq_processes[harq_pid]->c[r][i]);*/
}
ulsch_ue[0]->harq_processes[harq_pid]->c[r][i]^ulsch_gNB->harq_processes[harq_pid]->c[r][i]);
}
}*/
if
(
errors_decoding
>
0
&&
error_flag
==
0
)
{
n_false_positive
++
;
if
(
n_trials
==
1
)
...
...
@@ -1496,6 +1505,8 @@ int main(int argc, char **argv)
printf
(
"
\n
"
);
}
ldpcDecStats
[
snrRun
]
=
gNB
->
ulsch_decoding_stats
.
trials
?
inMicroS
(
gNB
->
ulsch_decoding_stats
.
diff
/
gNB
->
ulsch_decoding_stats
.
trials
)
:
0
;
if
(
n_trials
==
1
)
break
;
...
...
@@ -1540,8 +1551,10 @@ int main(int argc, char **argv)
LOG_MM
(
"ulsimStats.m"
,
"BER_round3"
,
berStats
[
3
],
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"EffRate"
,
effRate
,
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"EffTP"
,
effTP
,
snrRun
,
1
,
7
);
LOG_MM
(
"ulsimStats.m"
,
"LDPC_dec_time"
,
ldpcDecStats
,
snrRun
,
1
,
7
);
free
(
test_input_bit
);
free
(
estimated_output_bit
);
if
(
gNB
->
ldpc_offload_flag
)
free_nrLDPClib_offload
();
if
(
output_fd
)
...
...
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