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
1216eb2e
Commit
1216eb2e
authored
Oct 03, 2021
by
Hongzhi Wang
Committed by
Hongzhi Wang
Mar 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding segment buffer offset and updates
parent
8c09af62
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
24 deletions
+32
-24
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
+20
-9
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+11
-14
No files found.
cmake_targets/CMakeLists.txt
View file @
1216eb2e
...
...
@@ -833,7 +833,7 @@ add_library(ldpc_offload MODULE ${HWLIB_LDPC_OFFLOAD_SOURCE} )
set_target_properties
(
ldpc_offload PROPERTIES COMPILE_FLAGS
"-include rte_config.h -march=native -I/usr/local/include"
)
SET
(
T1_DPDK_LIBS
"-L/usr/local/lib64 -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -Wl,--whole-archive -L/usr/local/lib64 -lrte_common_cpt -lrte_common_dpaax -lrte_common_iavf -lrte_common_octeontx -lrte_common_octeontx2 -lrte_bus_dpaa -lrte_bus_fslmc -lrte_bus_ifpga -lrte_bus_pci -lrte_bus_vdev -lrte_bus_vmbus -lrte_mempool_bucket -lrte_mempool_dpaa -lrte_mempool_dpaa2 -lrte_mempool_octeontx -lrte_mempool_octeontx2 -lrte_mempool_ring -lrte_mempool_stack -lrte_pmd_af_packet -lrte_pmd_ark -lrte_pmd_hns3 -lrte_pmd_iavf -lrte_pmd_ice -lrte_pmd_igc -lrte_pmd_ixgbe -lrte_pmd_kni -lrte_pmd_liquidio -lrte_pmd_memif -lrte_pmd_netvsc -lrte_pmd_nfp -lrte_pmd_null -lrte_pmd_octeontx -lrte_pmd_octeontx2 -lrte_pmd_pcap -lrte_pmd_pfe -lrte_pmd_qede -lrte_pmd_ring -lrte_pmd_sfc -lrte_pmd_softnic -lrte_pmd_tap -lrte_pmd_thunderx -lrte_pmd_vdev_netvsc -lrte_pmd_vhost -lrte_pmd_virtio -lrte_pmd_vmxnet3 -lrte_rawdev_dpaa2_cmdif -lrte_rawdev_dpaa2_qdma -lrte_rawdev_ioat -lrte_rawdev_ntb -lrte_rawdev_octeontx2_dma -lrte_rawdev_octeontx2_ep -lrte_rawdev_skeleton -lrte_pmd_caam_jr -lrte_pmd_ccp -lrte_pmd_dpaa_sec -lrte_pmd_dpaa2_sec -lrte_pmd_nitrox -lrte_pmd_null_crypto -lrte_pmd_octeontx_crypto -lrte_pmd_octeontx2_crypto -lrte_pmd_openssl -lrte_pmd_crypto_scheduler -lrte_pmd_virtio_crypto -lrte_pmd_octeontx_compress -lrte_pmd_qat -lrte_pmd_zlib -lrte_pmd_ifc -lrte_pmd_dpaa_event -lrte_pmd_dpaa2_event -lrte_pmd_octeontx2_event -lrte_pmd_opdl_event -lrte_pmd_skeleton_event -lrte_pmd_sw_event -lrte_pmd_dsw_event -lrte_pmd_octeontx_event -lrte_pmd_bbdev_null -lrte_pmd_bbdev_fpga_5gnr_fec -lrte_pmd_hpac_sdfec_pmd -Wl,--no-whole-archive -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -Wl,-Bdynamic -pthread -lm -ldl -lnuma -lpcap"
)
SET
(
T1_DPDK_LIBS
"-
Wl,-rpath /usr/local/lib64 -
L/usr/local/lib64 -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -Wl,--whole-archive -L/usr/local/lib64 -lrte_common_cpt -lrte_common_dpaax -lrte_common_iavf -lrte_common_octeontx -lrte_common_octeontx2 -lrte_bus_dpaa -lrte_bus_fslmc -lrte_bus_ifpga -lrte_bus_pci -lrte_bus_vdev -lrte_bus_vmbus -lrte_mempool_bucket -lrte_mempool_dpaa -lrte_mempool_dpaa2 -lrte_mempool_octeontx -lrte_mempool_octeontx2 -lrte_mempool_ring -lrte_mempool_stack -lrte_pmd_af_packet -lrte_pmd_ark -lrte_pmd_hns3 -lrte_pmd_iavf -lrte_pmd_ice -lrte_pmd_igc -lrte_pmd_ixgbe -lrte_pmd_kni -lrte_pmd_liquidio -lrte_pmd_memif -lrte_pmd_netvsc -lrte_pmd_nfp -lrte_pmd_null -lrte_pmd_octeontx -lrte_pmd_octeontx2 -lrte_pmd_pcap -lrte_pmd_pfe -lrte_pmd_qede -lrte_pmd_ring -lrte_pmd_sfc -lrte_pmd_softnic -lrte_pmd_tap -lrte_pmd_thunderx -lrte_pmd_vdev_netvsc -lrte_pmd_vhost -lrte_pmd_virtio -lrte_pmd_vmxnet3 -lrte_rawdev_dpaa2_cmdif -lrte_rawdev_dpaa2_qdma -lrte_rawdev_ioat -lrte_rawdev_ntb -lrte_rawdev_octeontx2_dma -lrte_rawdev_octeontx2_ep -lrte_rawdev_skeleton -lrte_pmd_caam_jr -lrte_pmd_ccp -lrte_pmd_dpaa_sec -lrte_pmd_dpaa2_sec -lrte_pmd_nitrox -lrte_pmd_null_crypto -lrte_pmd_octeontx_crypto -lrte_pmd_octeontx2_crypto -lrte_pmd_openssl -lrte_pmd_crypto_scheduler -lrte_pmd_virtio_crypto -lrte_pmd_octeontx_compress -lrte_pmd_qat -lrte_pmd_zlib -lrte_pmd_ifc -lrte_pmd_dpaa_event -lrte_pmd_dpaa2_event -lrte_pmd_octeontx2_event -lrte_pmd_opdl_event -lrte_pmd_skeleton_event -lrte_pmd_sw_event -lrte_pmd_dsw_event -lrte_pmd_octeontx_event -lrte_pmd_bbdev_null -lrte_pmd_bbdev_fpga_5gnr_fec -lrte_pmd_hpac_sdfec_pmd -Wl,--no-whole-archive -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -Wl,-Bdynamic -pthread -lm -ldl -lnuma -lpcap"
)
TARGET_LINK_LIBRARIES
(
ldpc_offload
${
T1_DPDK_LIBS
}
)
TARGET_LINK_LIBRARIES
(
ldpc_offload pthread dl rt m numa
)
...
...
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
View file @
1216eb2e
...
...
@@ -168,6 +168,7 @@ struct thread_params {
double
bler
;
struct
nrLDPCoffload_params
*
p_offloadParams
;
int8_t
*
p_out
;
uint8_t
r
;
rte_atomic16_t
nb_dequeued
;
rte_atomic16_t
processing_status
;
rte_atomic16_t
burst_sz
;
...
...
@@ -797,6 +798,7 @@ set_ldpc_dec_op(struct rte_bbdev_dec_op **ops, unsigned int n,
struct
rte_bbdev_op_data
*
harq_inputs
,
struct
rte_bbdev_op_data
*
harq_outputs
,
struct
rte_bbdev_dec_op
*
ref_op
,
uint8_t
r
,
t_nrLDPCoffload_params
*
p_offloadParams
)
{
unsigned
int
i
;
...
...
@@ -825,9 +827,13 @@ set_ldpc_dec_op(struct rte_bbdev_dec_op **ops, unsigned int n,
ops
[
i
]
->
ldpc_dec
.
n_cb
=
p_offloadParams
->
n_cb
;
ops
[
i
]
->
ldpc_dec
.
iter_max
=
20
;
ops
[
i
]
->
ldpc_dec
.
rv_index
=
p_offloadParams
->
rv
;
ops
[
i
]
->
ldpc_dec
.
op_flags
=
RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE
;
ops
[
i
]
->
ldpc_dec
.
op_flags
=
RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE
|
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE
|
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE
|
RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP
;
ops
[
i
]
->
ldpc_dec
.
code_block_mode
=
1
;
//ldpc_dec->code_block_mode;
ops
[
i
]
->
ldpc_dec
.
harq_combined_input
.
offset
=
r
*
1024
*
32
;
ops
[
i
]
->
ldpc_dec
.
harq_combined_output
.
offset
=
r
*
1024
*
32
;
if
(
hard_outputs
!=
NULL
)
ops
[
i
]
->
ldpc_dec
.
hard_output
=
hard_outputs
[
start_idx
+
i
];
...
...
@@ -967,6 +973,7 @@ create_reference_ldpc_dec_op(struct rte_bbdev_dec_op *op, t_nrLDPCoffload_params
op
->
ldpc_dec
.
z_c
=
p_offloadParams
->
Z
;
op
->
ldpc_dec
.
n_filler
=
p_offloadParams
->
F
;
op
->
ldpc_dec
.
code_block_mode
=
1
;
op
->
ldpc_dec
.
op_flags
=
RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE
|
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE
|
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE
|
RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP
;
}
...
...
@@ -1038,6 +1045,7 @@ pmd_lcore_ldpc_dec(void *arg)
struct
rte_bbdev_dec_op
*
ops_enq
[
num_ops
];
struct
rte_bbdev_dec_op
*
ops_deq
[
num_ops
];
struct
rte_bbdev_dec_op
*
ref_op
=
tp
->
op_params
->
ref_dec_op
;
uint8_t
r
=
tp
->
r
;
struct
test_buffers
*
bufs
=
NULL
;
int
i
,
j
,
ret
;
struct
rte_bbdev_info
info
;
...
...
@@ -1081,7 +1089,7 @@ pmd_lcore_ldpc_dec(void *arg)
set_ldpc_dec_op
(
ops_enq
,
num_ops
,
0
,
bufs
->
inputs
,
bufs
->
hard_outputs
,
bufs
->
soft_outputs
,
bufs
->
harq_inputs
,
bufs
->
harq_outputs
,
ref_op
,
p_offloadParams
);
bufs
->
harq_inputs
,
bufs
->
harq_outputs
,
ref_op
,
r
,
p_offloadParams
);
/* Set counter to validate the ordering */
for
(
j
=
0
;
j
<
num_ops
;
++
j
)
...
...
@@ -1194,6 +1202,7 @@ int
start_pmd_dec
(
struct
active_device
*
ad
,
struct
test_op_params
*
op_params
,
t_nrLDPCoffload_params
*
p_offloadParams
,
uint8_t
r
,
int8_t
*
p_out
)
{
int
ret
;
...
...
@@ -1233,6 +1242,7 @@ start_pmd_dec(struct active_device *ad,
t_params
[
0
].
iter_count
=
0
;
t_params
[
0
].
p_out
=
p_out
;
t_params
[
0
].
p_offloadParams
=
p_offloadParams
;
t_params
[
0
].
r
=
r
;
RTE_LCORE_FOREACH_SLAVE
(
lcore_id
)
{
if
(
used_cores
>=
num_lcores
)
...
...
@@ -1244,6 +1254,7 @@ start_pmd_dec(struct active_device *ad,
t_params
[
used_cores
].
iter_count
=
0
;
t_params
[
used_cores
].
p_out
=
p_out
;
t_params
[
used_cores
].
p_offloadParams
=
p_offloadParams
;
t_params
[
used_cores
].
r
=
r
;
rte_eal_remote_launch
(
pmd_lcore_ldpc_dec
,
&
t_params
[
used_cores
++
],
lcore_id
);
...
...
@@ -1549,7 +1560,7 @@ int32_t nrLDPC_decod_offload(t_nrLDPC_dec_params* p_decParams, uint8_t C, uint8_
}
ret
=
start_pmd_dec
(
ad
,
op_params
,
p_offloadParams
,
p_out
);
ret
=
start_pmd_dec
(
ad
,
op_params
,
p_offloadParams
,
C
,
p_out
);
if
(
ret
<
0
)
{
printf
(
"Couldn't start pmd dec"
);
return
(
-
1
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
1216eb2e
...
...
@@ -371,7 +371,7 @@ void nr_processULSegment(void* arg) {
if
(
rdata
->
decodeIterations
>
p_decoderParms
->
numMaxIter
)
rdata
->
decodeIterations
--
;
}
else
{
#ifdef PRINT_CRC_CHECK
LOG_I
(
PHY
,
"CRC NOK
\n
"
);
LOG_I
(
PHY
,
"segment %d CRC NOK
\n
"
,
r
);
#endif
rdata
->
decodeIterations
=
max_ldpc_iterations
+
1
;
}
...
...
@@ -602,7 +602,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
}
ret
=
nrLDPC_decoder_offload
(
p_decParams
,
1
,
r
,
pusch_pdu
->
pusch_data
.
rv_index
,
harq_process
->
F
,
E
,
...
...
@@ -626,7 +626,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
no_iteration_ldpc
=
2
;
}
else
{
#ifdef PRINT_CRC_CHECK
LOG_I
(
PHY
,
"
CRC NOK
\n
"
);
LOG_I
(
PHY
,
"
segment %d CRC NOK
\n
"
,
r
);
#endif
no_iteration_ldpc
=
ulsch
->
max_ldpc_iterations
+
1
;
}
...
...
@@ -640,24 +640,21 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
printf("llrprocbuf [%d] = %x adr %p\n", k, llrProcBuf[k], llrProcBuf+k);
}
*/
bool
decodeSuccess
=
(
no_iteration_ldpc
<=
ulsch
->
max_ldpc_iterations
);
if
(
decodeSuccess
)
{
memcpy
(
harq_process
->
b
+
offset
,
harq_process
->
c
[
r
],
Kr_bytes
-
(
harq_process
->
F
>>
3
)
-
((
harq_process
->
C
>
1
)
?
3
:
0
));
offset
+=
(
Kr_bytes
-
(
harq_process
->
F
>>
3
)
-
((
harq_process
->
C
>
1
)
?
3
:
0
));
harq_process
->
processedSegments
=
r
+
1
;
harq_process
->
processedSegments
++
;
}
else
{
if
(
harq_process
->
C
!=
harq_process
->
processedSegments
)
{
LOG_I
(
PHY
,
"uplink segment error %d/%d
\n
"
,
r
,
harq_process
->
C
);
LOG_D
(
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
){
if
(
decodeSuccess
)
{
if
(
r
==
(
harq_process
->
C
-
1
)
){
if
(
(
decodeSuccess
)
&&
(
harq_process
->
processedSegments
==
(
harq_process
->
C
))
)
{
LOG_D
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for slot %d TBS %d
\n
"
,
phy_vars_gNB
->
Mod_id
,
harq_process
->
slot
,
harq_process
->
TBS
);
harq_process
->
status
=
SCH_IDLE
;
...
...
@@ -678,7 +675,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
ulsch
->
harq_mask
&=
~
(
1
<<
harq_pid
);
}
harq_process
->
handled
=
1
;
no_iteration_ldpc
=
ulsch
->
max_ldpc_iterations
+
1
;
LOG_D
(
PHY
,
"ULSCH %d in error
\n
"
,
ULSCH_id
);
nr_fill_indication
(
phy_vars_gNB
,
harq_process
->
frame
,
harq_process
->
slot
,
ULSCH_id
,
harq_pid
,
1
);
}
...
...
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