Merge remote-tracking branch 'origin/integration_2026_w30' into develop

Integration: 2026.w30

- #324 ci: fix pull_request_target fork checkout error and Node 20 deprecation warning
- #143 Harmonize PUSCH CDM groups and port allocation
- #182 PMI and MCS table index in phy-test
- #285 Cleanup RU_t for NR and LTE
- #325 Simplify nr_fill_xx_indication()
- #140 Introduce group based processing for 5G uplink MU-MIMO and a MU-MIMO physical simulator
- #292 simplify and comment how the UE generates PSS reference signal
- #328 ci: split PCF CN config out of shared mini_nonrf_config.yaml
- #234 [NR UE] PDSCH Rx: Pre-allocate large buffers on heap
- #319 fix(nr_ue_rrc): calculate shortMAC-I and fill in RRCReestablishmentRequest
- #282 Two-pass min1/min2 cnProc for BG1 and BG2.
- #310 doc(t2): Update T2 related documentation
- #330 Force RedCap UE on the initialBWP

Closes: #278
parents 1e266426 4814de95
...@@ -1339,13 +1339,6 @@ target_link_libraries(NR_L2_UE PRIVATE nr_rlc) ...@@ -1339,13 +1339,6 @@ target_link_libraries(NR_L2_UE PRIVATE nr_rlc)
target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_common nr_ue_power_procedures nr_ue_ra_procedures) target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_common nr_ue_power_procedures nr_ue_ra_procedures)
target_link_libraries(NR_L2_UE PRIVATE nr_nas) target_link_libraries(NR_L2_UE PRIVATE nr_nas)
add_library(MAC_NR_COMMON
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
)
target_link_libraries(MAC_NR_COMMON PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
include_directories("${OPENAIR2_DIR}/NR_UE_PHY_INTERFACE") include_directories("${OPENAIR2_DIR}/NR_UE_PHY_INTERFACE")
include_directories("${OPENAIR2_DIR}/LAYER2") include_directories("${OPENAIR2_DIR}/LAYER2")
include_directories("${OPENAIR1_DIR}/SCHED_NR_UE") include_directories("${OPENAIR1_DIR}/SCHED_NR_UE")
...@@ -2043,6 +2036,19 @@ target_link_libraries(nr_srssim PRIVATE ...@@ -2043,6 +2036,19 @@ target_link_libraries(nr_srssim PRIVATE
m pthread ITTI dl nr_ue_phy_meas physim_common softmodem_common m pthread ITTI dl nr_ue_phy_meas physim_common softmodem_common
) )
add_executable(nr_ulsim_mu_mimo
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim_mu_mimo.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_ulsim_mu_mimo PRIVATE
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common NR_L2_UE
)
target_link_libraries(nr_ulsim_mu_mimo PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
if(ENABLE_CHANNEL_SIM_CUDA) if(ENABLE_CHANNEL_SIM_CUDA)
if (TARGET oai_cuda_lib) if (TARGET oai_cuda_lib)
target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib) target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib)
...@@ -2100,7 +2106,7 @@ if (${T_TRACER}) ...@@ -2100,7 +2106,7 @@ if (${T_TRACER})
nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7 nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7
ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim
syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_pucchsim syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_pucchsim
nr_ulschsim ldpctest polartest smallblocktest nr_srssim nr_ulschsim ldpctest polartest smallblocktest nr_srssim nr_ulsim_mu_mimo
#all "add_library" definitions #all "add_library" definitions
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap
params_libconfig params_libconfig
......
...@@ -675,5 +675,5 @@ class Containerize(): ...@@ -675,5 +675,5 @@ class Containerize():
logging.info(f"check against thresholds from {thresholds}") logging.info(f"check against thresholds from {thresholds}")
success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, local_files) success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, local_files)
HTML.CreateHtmlDataLogTable(datalog_rt_stats) HTML.CreateHtmlDataLogTable(datalog_rt_stats, thresholds)
return success return success
...@@ -289,14 +289,14 @@ class HTMLManagement(): ...@@ -289,14 +289,14 @@ class HTMLManagement():
self.htmlFile.close() self.htmlFile.close()
#for the moment it is limited to 4 columns, to be made generic later #for the moment it is limited to 4 columns, to be made generic later
def CreateHtmlDataLogTable(self, DataLog): def CreateHtmlDataLogTable(self, DataLog, filename):
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)): if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
return return
self.htmlFile = open('test_results.html', 'a') self.htmlFile = open('test_results.html', 'a')
# TabHeader # TabHeader
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n') self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
self.htmlFile.write(' <td colspan="6"><b> ---- ' + DataLog['Title'] + ' ---- </b></td>\n') self.htmlFile.write(f' <td colspan="6"><b> ---- Processing Time from {filename} ---- </b></td>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n') self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
self.htmlFile.write(' <th colspan="3">'+ DataLog['ColNames'][0] +'</th>\n') self.htmlFile.write(' <th colspan="3">'+ DataLog['ColNames'][0] +'</th>\n')
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.4x4.fhi72.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -13,9 +9,8 @@ Ref : ...@@ -13,9 +9,8 @@ Ref :
feptx_prec (per port, half_slot) : 46.0 feptx_prec (per port, half_slot) : 46.0
L1 Tx processing : 371.7 L1 Tx processing : 371.7
DLSCH encoding : 196.9 DLSCH encoding : 196.9
L1 Rx processing : 578.0 L1 Rx processing : 460.0
UL segments decoding : 81.2 UL segments decoding : 58.0
UL Indication : 0.4
Slot Indication : 14.3 Slot Indication : 14.3
PUSCH inner-receiver : 739.4 PUSCH inner-receiver : 739.4
DeviationThreshold : DeviationThreshold :
...@@ -25,6 +20,5 @@ DeviationThreshold : ...@@ -25,6 +20,5 @@ DeviationThreshold :
DLSCH encoding : 0.25 DLSCH encoding : 0.25
L1 Rx processing : 0.25 L1 Rx processing : 0.25
UL segments decoding : 0.25 UL segments decoding : 0.25
UL Indication : 1.00
Slot Indication : 0.50 Slot Indication : 0.50
PUSCH inner-receiver : 0.25 PUSCH inner-receiver : 0.25
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.100.2x2.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -15,10 +11,9 @@ Ref : ...@@ -15,10 +11,9 @@ Ref :
feptx_total : 150.0 feptx_total : 150.0
L1 Tx processing : 475.0 L1 Tx processing : 475.0
DLSCH encoding : 200.0 DLSCH encoding : 200.0
L1 Rx processing : 530.0 L1 Rx processing : 407.0
PUSCH inner-receiver : 360.0 PUSCH inner-receiver : 360.0
DL & UL scheduling timing : 17.0 DL & UL scheduling timing : 17.0
UL Indication : 1.0
Slot Indication : 13.0 Slot Indication : 13.0
feprx : 151.0 feprx : 151.0
feptx_ofdm (per port, half_slot) : 57 feptx_ofdm (per port, half_slot) : 57
...@@ -33,7 +28,6 @@ DeviationThreshold : ...@@ -33,7 +28,6 @@ DeviationThreshold :
L1 Rx processing : 0.25 L1 Rx processing : 0.25
PUSCH inner-receiver : 0.25 PUSCH inner-receiver : 0.25
DL & UL scheduling timing : 0.25 DL & UL scheduling timing : 0.25
UL Indication : 1.00
Slot Indication : 0.50 Slot Indication : 0.50
feprx : 0.25 feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25 feptx_ofdm (per port, half_slot) : 0.25
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.4x4.fhi72.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -15,7 +11,6 @@ Ref : ...@@ -15,7 +11,6 @@ Ref :
DLSCH encoding : 141.0 DLSCH encoding : 141.0
L1 Rx processing : 332.5 L1 Rx processing : 332.5
UL segments decoding : 55.2 UL segments decoding : 55.2
UL Indication : 0.4
Slot Indication : 14.3 Slot Indication : 14.3
PUSCH inner-receiver : 421.4 PUSCH inner-receiver : 421.4
DeviationThreshold : DeviationThreshold :
...@@ -25,6 +20,5 @@ DeviationThreshold : ...@@ -25,6 +20,5 @@ DeviationThreshold :
DLSCH encoding : 0.25 DLSCH encoding : 0.25
L1 Rx processing : 0.25 L1 Rx processing : 0.25
UL segments decoding : 0.25 UL segments decoding : 0.25
UL Indication : 1.00
Slot Indication : 0.50 Slot Indication : 0.50
PUSCH inner-receiver : 0.25 PUSCH inner-receiver : 0.25
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.1x1.60.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -15,10 +11,9 @@ Ref : ...@@ -15,10 +11,9 @@ Ref :
feptx_total : 45.0 feptx_total : 45.0
L1 Tx processing : 175.0 L1 Tx processing : 175.0
DLSCH encoding : 110.0 DLSCH encoding : 110.0
L1 Rx processing : 345.0 L1 Rx processing : 254.0
PUSCH inner-receiver : 150.0 PUSCH inner-receiver : 150.0
DL & UL scheduling timing : 5.0 DL & UL scheduling timing : 5.0
UL Indication : 1.0
Slot Indication : 6.0 Slot Indication : 6.0
feprx : 44.0 feprx : 44.0
feptx_ofdm (per port, half_slot) : 31 feptx_ofdm (per port, half_slot) : 31
...@@ -33,7 +28,6 @@ DeviationThreshold : ...@@ -33,7 +28,6 @@ DeviationThreshold :
L1 Rx processing : 0.25 L1 Rx processing : 0.25
PUSCH inner-receiver : 0.25 PUSCH inner-receiver : 0.25
DL & UL scheduling timing : 0.50 DL & UL scheduling timing : 0.50
UL Indication : 1.00
Slot Indication : 0.50 Slot Indication : 0.50
feprx : 0.25 feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25 feptx_ofdm (per port, half_slot) : 0.25
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.2x2.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -18,7 +14,6 @@ Ref : ...@@ -18,7 +14,6 @@ Ref :
L1 Rx processing : 175.0 L1 Rx processing : 175.0
PUSCH inner-receiver : 100.0 PUSCH inner-receiver : 100.0
DL & UL scheduling timing : 11.0 DL & UL scheduling timing : 11.0
UL Indication : 3.0
Slot Indication : 14.0 Slot Indication : 14.0
DeviationThreshold : DeviationThreshold :
feprx : 0.25 feprx : 0.25
...@@ -30,5 +25,4 @@ DeviationThreshold : ...@@ -30,5 +25,4 @@ DeviationThreshold :
L1 Rx processing : 0.25 L1 Rx processing : 0.25
PUSCH inner-receiver : 0.25 PUSCH inner-receiver : 0.25
DL & UL scheduling timing : 0.50 DL & UL scheduling timing : 0.50
UL Indication : 1.00
Slot Indication : 0.25 Slot Indication : 0.25
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.60.2x2.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -15,10 +11,9 @@ Ref : ...@@ -15,10 +11,9 @@ Ref :
feptx_total : 80.0 feptx_total : 80.0
L1 Tx processing : 280.0 L1 Tx processing : 280.0
DLSCH encoding : 140.0 DLSCH encoding : 140.0
L1 Rx processing : 345.0 L1 Rx processing : 255.0
PUSCH inner-receiver : 155.0 PUSCH inner-receiver : 155.0
DL & UL scheduling timing : 8.0 DL & UL scheduling timing : 8.0
UL Indication : 3.0
Slot Indication : 9.0 Slot Indication : 9.0
feprx : 50.0 feprx : 50.0
feptx_ofdm (per port, half_slot) : 31 feptx_ofdm (per port, half_slot) : 31
...@@ -33,7 +28,6 @@ DeviationThreshold : ...@@ -33,7 +28,6 @@ DeviationThreshold :
L1 Rx processing : 0.25 L1 Rx processing : 0.25
PUSCH inner-receiver : 0.25 PUSCH inner-receiver : 0.25
DL & UL scheduling timing : 0.35 DL & UL scheduling timing : 0.35
UL Indication : 1.00
Slot Indication : 0.35 Slot Indication : 0.35
feprx : 0.25 feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25 feptx_ofdm (per port, half_slot) : 0.25
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.default.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -15,10 +11,9 @@ Ref : ...@@ -15,10 +11,9 @@ Ref :
feptx_total : 45.0 feptx_total : 45.0
L1 Tx processing : 145.0 L1 Tx processing : 145.0
DLSCH encoding : 90.0 DLSCH encoding : 90.0
L1 Rx processing : 290.0 L1 Rx processing : 223.0
PUSCH inner-receiver : 115.0 PUSCH inner-receiver : 115.0
DL & UL scheduling timing : 4.0 DL & UL scheduling timing : 4.0
UL Indication : 2.0
Slot Indication : 5.0 Slot Indication : 5.0
feprx : 43.0 feprx : 43.0
feptx_ofdm (per port, half_slot) : 30 feptx_ofdm (per port, half_slot) : 30
...@@ -33,7 +28,6 @@ DeviationThreshold : ...@@ -33,7 +28,6 @@ DeviationThreshold :
L1 Rx processing : 0.25 L1 Rx processing : 0.25
PUSCH inner-receiver : 0.25 PUSCH inner-receiver : 0.25
DL & UL scheduling timing : 0.50 DL & UL scheduling timing : 0.50
UL Indication : 1.00
Slot Indication : 0.50 Slot Indication : 0.50
feprx : 0.25 feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25 feptx_ofdm (per port, half_slot) : 0.25
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : gNB Processing Time (us) from datalog_rt_stats.default.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -11,10 +7,9 @@ ColNames : ...@@ -11,10 +7,9 @@ ColNames :
Ref : Ref :
L1 Tx processing : 190.0 L1 Tx processing : 190.0
DLSCH encoding : 120.0 DLSCH encoding : 120.0
L1 Rx processing : 235.0 L1 Rx processing : 208.0
UL segments decoding : 120.0 UL segments decoding : 120.0
PUSCH inner-receiver : 150.0 PUSCH inner-receiver : 150.0
UL Indication : 2.0
Slot Indication : 10.0 Slot Indication : 10.0
feprx : 40.0 feprx : 40.0
feptx_ofdm (per port, half_slot) : 30 feptx_ofdm (per port, half_slot) : 30
...@@ -25,7 +20,6 @@ DeviationThreshold : ...@@ -25,7 +20,6 @@ DeviationThreshold :
L1 Rx processing : 0.25 L1 Rx processing : 0.25
UL segments decoding : 0.25 UL segments decoding : 0.25
PUSCH inner-receiver : 0.25 PUSCH inner-receiver : 0.25
UL Indication : 1.00
Slot Indication : 0.50 Slot Indication : 0.50
feprx : 0.25 feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25 feptx_ofdm (per port, half_slot) : 0.25
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : UE Processing Time (us) from datalog_rt_stats.ue.40.vrtsim.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
...@@ -13,15 +9,15 @@ Ref : ...@@ -13,15 +9,15 @@ Ref :
DLSCH_RX_PDCCH_STATS : 30.5 DLSCH_RX_PDCCH_STATS : 30.5
RX_DFT_STATS : 5.5 RX_DFT_STATS : 5.5
DLSCH_CHANNEL_ESTIMATION_STATS : 39.0 DLSCH_CHANNEL_ESTIMATION_STATS : 39.0
DLSCH_DECODING_STATS : 178.0 DLSCH_DECODING_STATS : 141.0
DLSCH_LDPC_DECODING_STATS : 78.0 DLSCH_LDPC_DECODING_STATS : 50.0
DLSCH_LLR_STATS : 25.0 DLSCH_LLR_STATS : 21.0
DLSCH_LAYER_DEMAPPING : 8.5 DLSCH_LAYER_DEMAPPING : 8.5
DLSCH_PROCEDURES_STATS : 188.0 DLSCH_PROCEDURES_STATS : 153.0
PHY_PROC_TX : 158.0 PHY_PROC_TX : 158.0
PUSCH_PROC_STATS : 167.0 PUSCH_PROC_STATS : 167.0
ULSCH_LDPC_ENCODING_STATS : 43.0 ULSCH_LDPC_ENCODING_STATS : 54.0
ULSCH_ENCODING_STATS : 121.0 ULSCH_ENCODING_STATS : 135.0
OFDM_MOD_STATS : 44.5 OFDM_MOD_STATS : 44.5
DeviationThreshold : DeviationThreshold :
RX_PDSCH_STATS : 0.25 RX_PDSCH_STATS : 0.25
......
...@@ -26,4 +26,4 @@ RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON \ ...@@ -26,4 +26,4 @@ RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON \
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \ -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \
-DPHYSIM_CHECK_FILES="ThresholdsGracehopper.cmake" \ -DPHYSIM_CHECK_FILES="ThresholdsGracehopper.cmake" \
.. && \ .. && \
ninja ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim nr_srssim ninja ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_ulsim_mu_mimo nr_pucchsim nr_prachsim nr_psbchsim nr_srssim
...@@ -146,5 +146,5 @@ class RANManagement(): ...@@ -146,5 +146,5 @@ class RANManagement():
logging.info(f"check against thresholds from {thresholds}") logging.info(f"check against thresholds from {thresholds}")
success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, [l1_file, mac_file]) success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, [l1_file, mac_file])
HTML.CreateHtmlDataLogTable(datalog_rt_stats) HTML.CreateHtmlDataLogTable(datalog_rt_stats, thresholds)
return success return success
...@@ -28,7 +28,6 @@ class TestAnalysis(unittest.TestCase): ...@@ -28,7 +28,6 @@ class TestAnalysis(unittest.TestCase):
macf = "tests/analysis/gnb_phytest.success.nrMAC.log" macf = "tests/analysis/gnb_phytest.success.nrMAC.log"
status, s = cls_analysis.Analysis.analyze_rt_stats(rtsf, [l1f, macf]) status, s = cls_analysis.Analysis.analyze_rt_stats(rtsf, [l1f, macf])
self.assertTrue(status) self.assertTrue(status)
self.assertEqual(s['Title'], "Processing Time (us) from datalog_rt_stats.100.2x2.yaml")
self.assertEqual(s['ColNames'], ["Metric", "Average; Max; Count", "Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)"]) self.assertEqual(s['ColNames'], ["Metric", "Average; Max; Count", "Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)"])
with open(rtsf, 'r') as f: with open(rtsf, 'r') as f:
rt_stats = yaml.load(f, Loader=yaml.FullLoader) rt_stats = yaml.load(f, Loader=yaml.FullLoader)
...@@ -46,7 +45,6 @@ class TestAnalysis(unittest.TestCase): ...@@ -46,7 +45,6 @@ class TestAnalysis(unittest.TestCase):
self.assertEqual(s['Data']['L1 Tx processing'], ['476', '872', '102933', '1.00']) self.assertEqual(s['Data']['L1 Tx processing'], ['476', '872', '102933', '1.00'])
self.assertEqual(s['Data']['DLSCH encoding'], ['216', '544', '77201', '1.08']) self.assertEqual(s['Data']['DLSCH encoding'], ['216', '544', '77201', '1.08'])
self.assertEqual(s['Data']['L1 Rx processing'], ['488', '868', '38598', '0.92']) self.assertEqual(s['Data']['L1 Rx processing'], ['488', '868', '38598', '0.92'])
self.assertEqual(s['Data']['UL Indication'], ['1', '10', '38598', '0.76'])
self.assertEqual(s['Data']['Slot Indication'], ['18', '94', '128667', '1.38']) self.assertEqual(s['Data']['Slot Indication'], ['18', '94', '128667', '1.38'])
self.assertEqual(s['Data']['PUSCH inner-receiver'], ['307', '530', '25730', '0.85']) self.assertEqual(s['Data']['PUSCH inner-receiver'], ['307', '530', '25730', '0.85'])
self.assertEqual(s['Data']['feprx'], ['169', '310', '38600', '1.12']) self.assertEqual(s['Data']['feprx'], ['169', '310', '38600', '1.12'])
......
...@@ -28,7 +28,6 @@ ULSCH RNTI 1234, 389: ulsch_power[0] 41,5 ulsch_noise_power[0] 7.8, sync_pos 0 ...@@ -28,7 +28,6 @@ ULSCH RNTI 1234, 389: ulsch_power[0] 41,5 ulsch_noise_power[0] 7.8, sync_pos 0
UL segment deinterleaving: 5.063 us; 488870; 27.005 us; UL segment deinterleaving: 5.063 us; 488870; 27.005 us;
UL segment rate recovery: 11.554 us; 488870; 517.998 us; UL segment rate recovery: 11.554 us; 488870; 517.998 us;
UL segments decoding: 134.035 us; 488870; 759.164 us; UL segments decoding: 134.035 us; 488870; 759.164 us;
UL Indication: 0.763 us; 38598; 9.588 us;
Slot Indication: 17.891 us; 128667; 94.446 us; Slot Indication: 17.891 us; 128667; 94.446 us;
PUSCH inner-receiver: 307.193 us; 25730; 529.580 us; PUSCH inner-receiver: 307.193 us; 25730; 529.580 us;
feprx: 169.305 us; 38600; 310.489 us; feprx: 169.305 us; 38600; 310.489 us;
......
...@@ -43,12 +43,6 @@ nfs: ...@@ -43,12 +43,6 @@ nfs:
n4: n4:
interface_name: eth0 interface_name: eth0
port: 8805 port: 8805
pcf:
host: oai-pcf
sbi:
port: 8080
api_version: v1
interface_name: eth0
upf: upf:
host: oai-upf host: oai-upf
...@@ -83,10 +77,6 @@ database: ...@@ -83,10 +77,6 @@ database:
snssais: snssais:
- &embb_slice1 - &embb_slice1
sst: 1 sst: 1
sd: "FFFFFF"
- &embb_slice2
sst: 1
sd: "123456"
############## NF-specific configuration ############## NF-specific configuration
amf: amf:
...@@ -113,7 +103,6 @@ amf: ...@@ -113,7 +103,6 @@ amf:
tac: 0x0001 tac: 0x0001
nssai: nssai:
- *embb_slice1 - *embb_slice1
- *embb_slice2
supported_integrity_algorithms: supported_integrity_algorithms:
- "NIA0" - "NIA0"
- "NIA1" - "NIA1"
...@@ -127,7 +116,7 @@ smf: ...@@ -127,7 +116,7 @@ smf:
ue_mtu: 1500 ue_mtu: 1500
support_features: support_features:
use_local_subscription_info: yes # Use infos from local_subscription_info or from UDM use_local_subscription_info: yes # Use infos from local_subscription_info or from UDM
use_local_pcc_rules: no # Enforce PCC rules from PCF use_local_pcc_rules: yes # Use infos from local_pcc_rules or from PCF
upfs: upfs:
- host: oai-upf - host: oai-upf
port: 8805 port: 8805
...@@ -155,9 +144,6 @@ smf: ...@@ -155,9 +144,6 @@ smf:
- sNssai: *embb_slice1 - sNssai: *embb_slice1
dnnSmfInfoList: dnnSmfInfoList:
- dnn: "oai" - dnn: "oai"
- sNssai: *embb_slice2
dnnSmfInfoList:
- dnn: "openairinterface"
local_subscription_infos: local_subscription_infos:
- single_nssai: *embb_slice1 - single_nssai: *embb_slice1
dnn: "oai" dnn: "oai"
...@@ -165,19 +151,6 @@ smf: ...@@ -165,19 +151,6 @@ smf:
5qi: 9 5qi: 9
session_ambr_ul: "200Mbps" session_ambr_ul: "200Mbps"
session_ambr_dl: "400Mbps" session_ambr_dl: "400Mbps"
- single_nssai: *embb_slice2
dnn: "openairinterface"
qos_profile:
5qi: 9
session_ambr_ul: "200Mbps"
session_ambr_dl: "400Mbps"
pcf:
local_policy:
policy_decisions_path: /openair-pcf/policies/policy_decisions
pcc_rules_path: /openair-pcf/policies/pcc_rules
traffic_rules_path: /openair-pcf/policies/traffic_rules
qos_data_path: /openair-pcf/policies/qos_data
upf: upf:
support_features: support_features:
...@@ -189,15 +162,9 @@ upf: ...@@ -189,15 +162,9 @@ upf:
- sNssai: *embb_slice1 - sNssai: *embb_slice1
dnnUpfInfoList: dnnUpfInfoList:
- dnn: "oai" - dnn: "oai"
- sNssai: *embb_slice2
dnnUpfInfoList:
- dnn: "openairinterface"
## DNN configuration ## DNN configuration
dnns: dnns:
- dnn: "oai" - dnn: "oai"
pdu_session_type: "IPV4" pdu_session_type: "IPV4"
ipv4_subnet: "12.1.1.0/24" ipv4_subnet: "12.1.1.0/24"
- dnn: "openairinterface"
pdu_session_type: "IPV4"
ipv4_subnet: "12.1.2.0/24"
...@@ -30,7 +30,7 @@ services: ...@@ -30,7 +30,7 @@ services:
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
volumes: volumes:
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml - ./mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
depends_on: depends_on:
- mysql - mysql
networks: networks:
...@@ -42,7 +42,7 @@ services: ...@@ -42,7 +42,7 @@ services:
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
volumes: volumes:
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml - ./mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
depends_on: depends_on:
- oai-amf - oai-amf
- oai-pcf - oai-pcf
...@@ -55,7 +55,7 @@ services: ...@@ -55,7 +55,7 @@ services:
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
volumes: volumes:
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-pcf/etc/config.yaml - ./mini_nonrf_config.yaml:/openair-pcf/etc/config.yaml
- ./policies/policy_decisions:/openair-pcf/policies/policy_decisions - ./policies/policy_decisions:/openair-pcf/policies/policy_decisions
- ./policies/pcc_rules:/openair-pcf/policies/pcc_rules - ./policies/pcc_rules:/openair-pcf/policies/pcc_rules
- ./policies/traffic_rules:/openair-pcf/policies/traffic_rules - ./policies/traffic_rules:/openair-pcf/policies/traffic_rules
...@@ -72,7 +72,7 @@ services: ...@@ -72,7 +72,7 @@ services:
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
volumes: volumes:
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml - ./mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
depends_on: depends_on:
- oai-smf - oai-smf
cap_add: cap_add:
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
# OAI CN Configuration File
### This file can be used by all OAI NFs
### Some fields are specific to an NF and will be ignored by other NFs
## NOTE ON YAML ANCHORS ##
# We use YAML anchors to ease the configuration and to avoid duplicating parts of the configuration.
# This is especially true for the SNSSAIs, as we have to define them for multiple NFs.
# Please note that the use of anchors is not mandatory, and you can define the SNSSAI in each NF yourself.
# You can read more about anchors here: https://yaml.org/spec/1.2.2/#anchors-and-aliases
############# Common configuration
# Log level for all the NFs
log_level:
general: debug
# If you enable registration, the other NFs will use the NRF discovery mechanism
register_nf:
general: no
http_version: 1
############## SBI Interfaces
### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms
nfs:
amf:
host: oai-amf
sbi:
port: 80
api_version: v1
interface_name: eth0
n2:
interface_name: eth0
port: 38412
smf:
host: oai-smf
sbi:
port: 80
api_version: v1
interface_name: eth0
n4:
interface_name: eth0
port: 8805
pcf:
host: oai-pcf
sbi:
port: 8080
api_version: v1
interface_name: eth0
upf:
host: oai-upf
sbi:
port: 80
api_version: v1
interface_name: eth0
n3:
interface_name: eth0
port: 2152
n4:
interface_name: eth0
port: 8805
n6:
interface_name: eth1
n9:
interface_name: eth0
port: 2152
#### Common for UDR and AMF
database:
host: mysql
user: test
type: mysql
password: test
database_name: oai_db
generate_random: true
connection_timeout: 300 # seconds
## general single_nssai configuration
## Defines YAML anchors, which are reused in the config file
snssais:
- &embb_slice1
sst: 1
sd: "FFFFFF"
- &embb_slice2
sst: 1
sd: "123456"
############## NF-specific configuration
amf:
amf_name: "OAI-AMF"
# This really depends on if we want to keep the "mini" version or not
support_features_options:
enable_simple_scenario: yes # "no" by default with the normal deployment scenarios with AMF/SMF/UPF/AUSF/UDM/UDR/NRF.
# set it to "yes" to use with the minimalist deployment scenario (including only AMF/SMF/UPF) by using the internal AUSF/UDM implemented inside AMF.
# There's no NRF in this scenario, SMF info is taken from "nfs" section.
enable_nssf: no
enable_smf_selection: no
relative_capacity: 30
statistics_timer_interval: 20 # in seconds
emergency_support: false
served_guami_list:
- mcc: 208
mnc: 99
amf_region_id: 01
amf_set_id: 001
amf_pointer: 01
plmn_support_list:
- mcc: 208
mnc: 99
tac: 0x0001
nssai:
- *embb_slice1
- *embb_slice2
supported_integrity_algorithms:
- "NIA0"
- "NIA1"
- "NIA2"
supported_encryption_algorithms:
- "NEA0"
- "NEA1"
- "NEA2"
smf:
ue_mtu: 1500
support_features:
use_local_subscription_info: yes # Use infos from local_subscription_info or from UDM
use_local_pcc_rules: no # Enforce PCC rules from PCF
upfs:
- host: oai-upf
port: 8805
config:
enable_usage_reporting: no
# follows UPFInfo from 3GPP TS 29.510, currently only these values from interfaceUpfInfoList are supported
upf_info:
interfaceUpfInfoList:
- interfaceType: "N3"
networkInstance: "access.oai.org"
- interfaceType: "N6"
networkInstance: "core.oai.org"
ue_dns:
primary_ipv4: "172.21.3.100"
primary_ipv6: "2001:4860:4860::8888"
secondary_ipv4: "8.8.8.8"
secondary_ipv6: "2001:4860:4860::8888"
ims:
pcscf_ipv4: "127.0.0.1"
pcscf_ipv6: "fe80::7915:f408:1787:db8b"
# the DNN you configure here should be configured in "dnns"
# follows the SmfInfo datatype from 3GPP TS 29.510
smf_info:
sNssaiSmfInfoList:
- sNssai: *embb_slice1
dnnSmfInfoList:
- dnn: "oai"
- sNssai: *embb_slice2
dnnSmfInfoList:
- dnn: "openairinterface"
local_subscription_infos:
- single_nssai: *embb_slice1
dnn: "oai"
qos_profile:
5qi: 9
session_ambr_ul: "200Mbps"
session_ambr_dl: "400Mbps"
- single_nssai: *embb_slice2
dnn: "openairinterface"
qos_profile:
5qi: 9
session_ambr_ul: "200Mbps"
session_ambr_dl: "400Mbps"
pcf:
local_policy:
policy_decisions_path: /openair-pcf/policies/policy_decisions
pcc_rules_path: /openair-pcf/policies/pcc_rules
traffic_rules_path: /openair-pcf/policies/traffic_rules
qos_data_path: /openair-pcf/policies/qos_data
upf:
support_features:
enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off
enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off
remote_n6_gw: 127.0.0.1 # Dummy host since simple-switch does not use N6 GW
upf_info:
sNssaiUpfInfoList:
- sNssai: *embb_slice1
dnnUpfInfoList:
- dnn: "oai"
- sNssai: *embb_slice2
dnnUpfInfoList:
- dnn: "openairinterface"
## DNN configuration
dnns:
- dnn: "oai"
pdu_session_type: "IPV4"
ipv4_subnet: "12.1.1.0/24"
- dnn: "openairinterface"
pdu_session_type: "IPV4"
ipv4_subnet: "12.1.2.0/24"
...@@ -284,7 +284,7 @@ function main() { ...@@ -284,7 +284,7 @@ function main() {
SIMUS_PHY=1 SIMUS_PHY=1
CMAKE_CMD="$CMAKE_CMD -DENABLE_PHYSIM_TESTS=ON" CMAKE_CMD="$CMAKE_CMD -DENABLE_PHYSIM_TESTS=ON"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim # TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim nr_srssim" TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim nr_srssim nr_ulsim_mu_mimo"
echo_info "Will compile dlsim, ulsim, ..." echo_info "Will compile dlsim, ulsim, ..."
shift;; shift;;
-V | --vcd) -V | --vcd)
......
...@@ -2079,30 +2079,6 @@ INPUT = \ ...@@ -2079,30 +2079,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_bnProc.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_bnProc.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc_avx512/main.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc_avx512/cnProc_gen_BG2_avx512.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc_avx512/cnProc_gen_BG1_avx512.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/main.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/main128.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProcPc_gen_BG1_avx2.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProc_gen_BG2_128.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProcPc_gen_BG1_128.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProcPc_gen_BG2_avx2.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProc_gen_BG2_avx2.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProc_gen_BG1_128.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProc_gen_BG1_avx2.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc/bnProcPc_gen_BG2_128.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/main.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/cnProc_gen_BG1_avx2.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/cnProc_gen_BG1_128.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/main128.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/cnProc_gen_BG2_128.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/cnProc_gen_BG2_avx2.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc_avx512/main.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc_avx512/bnProcPc_gen_BG1_avx512.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc_avx512/bnProc_gen_BG2_avx512.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc_avx512/bnProc_gen_BG1_avx512.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc_avx512/bnProcPc_gen_BG2_avx512.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_cnProc.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_cnProc.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_mPass.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_mPass.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init.h \
......
...@@ -12,29 +12,33 @@ For details on the implementation, please consult the [developer notes](../opena ...@@ -12,29 +12,33 @@ For details on the implementation, please consult the [developer notes](../opena
## Requirements ## Requirements
In principle, any lookaside LDPC accelerator supporting the O-RAN AAL/DPDK BBDEV should work. In principle, any lookaside LDPC accelerator supporting the O-RAN AAL/DPDK BBDEV should work.
However, the current implementation has only been validated for the Xilinx T2, Intel ACC100, and Intel ACC200 (VRB1). However, the current implementation has only been validated for the AMD T2 Telco Accelerator Card, Intel ACC100, and Intel ACC200 (VRB1).
Therefore, your mileage may vary when using other BBDEV devices as there may be some hardware-specific changes required -- contributions are welcome! Therefore, your mileage may vary when using other BBDEV devices as there may be some hardware-specific changes required -- contributions are welcome!
### DPDK Version Requirements ### DPDK Version Requirements
The following DPDK versions are supported: The following DPDK versions are supported:
- For the Xilinx T2 card, DPDK20.11+ is supported. - For the AMD T2 Telco Accelerator Card, DPDK20.11+ is supported.
- As for the Intel ACC100/ACC200, only DPDK22.11+ is supported. - As for the Intel ACC100/ACC200, only DPDK22.11+ is supported.
### Tested Devices/ DPDK versions ### Tested Devices/ DPDK versions
#### Xilinx T2 #### AMD T2 Telco Accelerator Card
- DPDK20.11.9*. - DPDK22.11
- DPDK22.11.7*. - DPDK22.11.3
> Note: FPGA bitstream image and the corresponding patch file (e.g., `ACCL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch` for DPDK20.11) from Accelercomm required.
> [!NOTE]
> FPGA bitstream image and the corresponding patch file (e.g., `AMD-T2-SDFEC_25-03-1.patch` for DPDK22.11/DPDK22.11.3) required.
#### Intel ACC100 #### Intel ACC100
- DPDK22.11.7*. - DPDK22.11.7*.
- DPDK23.11.3*. - DPDK23.11.3*.
- DPDK24.11.2. - DPDK24.11.2.
> Note: [Patch]((https://github.com/DPDK/dpdk/commit/fdde63a1dfc129d0a510a831aa98253b36a2a1cd)) required for pre-DPDK24.11 versions when using the Intel ACC100.
> [!NOTE]
> [Patch](https://github.com/DPDK/dpdk/commit/fdde63a1dfc129d0a510a831aa98253b36a2a1cd) required for pre-DPDK24.11 versions when using the Intel ACC100.
#### Intel ACC200 (also known as VRB1) #### Intel ACC200 (also known as VRB1)
- DPDK22.11.7. - DPDK22.11.7.
...@@ -44,39 +48,34 @@ The following DPDK versions are supported: ...@@ -44,39 +48,34 @@ The following DPDK versions are supported:
## System Setup ## System Setup
### DPDK installation ### DPDK installation
> Important: > [!IMPORTANT]
> - If you are using the Xilinx T2 card, you will need to apply the vendor-supplied patches before compiling DPDK. > - If you are using the AMD T2 Telco Accelerator Card, you will need to apply the vendor-supplied patches before compiling DPDK.
> - If you are using the Intel ACC100, you will need to [patch](https://github.com/DPDK/dpdk/commit/fdde63a1dfc129d0a510a831aa98253b36a2a1cd) the ACC100's driver if you are using DPDK22.11 or DPDK23.11. > - If you are using the Intel ACC100, you will need to [patch](https://github.com/DPDK/dpdk/commit/fdde63a1dfc129d0a510a831aa98253b36a2a1cd) the ACC100's driver if you are using DPDK22.11 or DPDK23.11.
Refer to the guide [here](./ORAN_FHI7.2_Tutorial.md?ref_type=heads#dpdk-data-plane-development-kit) to install, and then validate your DPDK installation. Refer to the [guide](./ORAN_FHI7.2_Tutorial.md?ref_type=heads#dpdk-data-plane-development-kit) to install, and then validate your DPDK installation. Ensure that you follow the DPDK version requirements for your specific device.
<details open> <details open>
<summary> Notes on DPDK patching/installation for Xilinx T2. </summary> <summary> Notes on DPDK patching/installation for AMD T2 Telco Accelerator Card. </summary>
*Note: The following instructions apply to `ACCL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch`, compatible with DPDK 20.11.9. For older patches (e.g., `ACL_BBDEV_DPDK20.11.3_BL_1006_build_1105_dev_branch_MCT_optimisations_1106_physical_std.patch`), refer to the T2 documentation in `2023.w48`.* > The following instructions apply to `AMD-T2-SDFEC_25-03-1.patch`, compatible with DPDK22.11 and DPDK.22.11.3.
> For older patches:
```bash > - `ACCL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch`, refer to the T2 documentation in [2026.w28](https://github.com/duranta-project/openairinterface5g/releases/tag/2026.w28).
# Get DPDK source code > - `ACL_BBDEV_DPDK20.11.3_BL_1006_build_1105_dev_branch_MCT_optimisations_1106_physical_std.patch`, refer to the T2 documentation in [2023.w48](https://github.com/duranta-project/openairinterface5g/releases/tag/2023.w48).
git clone https://github.com/DPDK/dpdk-stable.git ~/dpdk-stable
cd ~/dpdk-stable
git checkout v20.11.9
git apply ~/ACL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch
```
Replace `~/ACL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch` by patch file provided by
Accelercomm.
If you would like to install DPDK to a custom directory, here is an example.
```bash ```bash
cd ~/dpdk-stable # Get DPDK source code for DPDK22.11.3
# meson setup build wget http://fast.dpdk.org/rel/dpdk-22.11.3.tar.xz
meson setup --prefix=/opt/dpdk-t2 build # for installation with non-default installation prefix tar xvf dpdk-22.11.3.tar.xz && cd dpdk-stable-22.11.3
cd build git apply ~/AMD-T2-SDFEC_25-03-1.patch
ninja # Install DPDK
meson setup build
# Use "meson setup --prefix=/opt/dpdk-t2 build" for installation into non-default installation path
ninja -C build
sudo ninja install sudo ninja install
sudo ldconfig sudo ldconfig
``` ```
</details> </details>
### System configuration ### System configuration
...@@ -121,12 +120,13 @@ Lastly, we bind our accelerator with the `vfio-pci` driver. ...@@ -121,12 +120,13 @@ Lastly, we bind our accelerator with the `vfio-pci` driver.
# sudo dpdk-devbind.py --bind=vfio-pci 0000:f7:00.0 # sudo dpdk-devbind.py --bind=vfio-pci 0000:f7:00.0
``` ```
> Note: For the Xilinx T2, we can use this device directly. > [!NOTE]
> For the AMD T2 Telco Accelerator Card, we can use this device directly.
If you use an Intel vRAN accelerator, read on. If you use an Intel vRAN accelerator, read on.
#### Additional Steps for Intel vRAN Accelerators #### Additional Steps for Intel vRAN Accelerators
> IMPORTANT NOTE: > [!IMPORTANT]
> - Currently, we only support using the Virtual Functions (VFs) of the Intel vRAN accelerators, but not the Physical Function (PF). > - Currently, we only support using the Virtual Functions (VFs) of the Intel vRAN accelerators, but not the Physical Function (PF).
> - One key advantage of using VFs is that this allows us to share the accelerator with other DU instances on the same machine, which is common in practice. > - One key advantage of using VFs is that this allows us to share the accelerator with other DU instances on the same machine, which is common in practice.
...@@ -206,12 +206,14 @@ A shared object file `libldpc_aal.so` will be created during the compilation. ...@@ -206,12 +206,14 @@ A shared object file `libldpc_aal.so` will be created during the compilation.
This object is conditionally compiled. This object is conditionally compiled.
The selection of the library to compile is done using `--build-lib ldpc_aal`. The selection of the library to compile is done using `--build-lib ldpc_aal`.
> Note: The required DPDK poll mode driver has to be present on the host machine and required DPDK version has to be installed on the host, prior to building OAI. > [!NOTE]
> The required DPDK poll mode driver has to be present on the host machine and required DPDK version has to be installed on the host, prior to building OAI.
## O-RAN AAL DPDK EAL parameters ## O-RAN AAL DPDK EAL parameters
To configure O-RAN AAL/DPDK BBDEV, you can set the following parameters via the command line of PHY simulators or nr-softmodem: To configure O-RAN AAL/DPDK BBDEV, you can set the following parameters via the command line of PHY simulators or nr-softmodem:
> Note: the group parameter name has been renamed from `nrLDPC_coding_t2` to > [!NOTE]
> The group parameter name has been renamed from `nrLDPC_coding_t2` to
> `nrLDPC_coding_aal` to better reflect that it is a generic AAL accelerator > `nrLDPC_coding_aal` to better reflect that it is a generic AAL accelerator
> card. > card.
...@@ -226,9 +228,11 @@ Ensure that the CPU cores specified in `nrLDPC_coding_aal.dpdk_core_list` are av ...@@ -226,9 +228,11 @@ Ensure that the CPU cores specified in `nrLDPC_coding_aal.dpdk_core_list` are av
- `nrLDPC_coding_aal.num_harq_codeblock` - optional parameter, size of the HARQ buffer in terms of the number of 32kB blocks, by default set to *512* (maximum for the T2; as for the ACCs, this can be further increased). - `nrLDPC_coding_aal.num_harq_codeblock` - optional parameter, size of the HARQ buffer in terms of the number of 32kB blocks, by default set to *512* (maximum for the T2; as for the ACCs, this can be further increased).
- `nrLDPC_coding_aal.is_t2` - optional parameter, set this to 1 when using the Xilinx T2 card. - `nrLDPC_coding_aal.is_t2` - optional parameter, set this to 1 when using the AMD T2 Telco Accelerator Card.
> [!NOTE]
> These parameters can also be provided in a configuration file.
**Note:** These parameters can also be provided in a configuration file.
Example for the ACC200: Example for the ACC200:
``` ```
nrLDPC_coding_aal : { nrLDPC_coding_aal : {
...@@ -278,6 +282,9 @@ When running the gNB **with FHI 7.2**, it is not necessary to provide the `--nrL ...@@ -278,6 +282,9 @@ When running the gNB **with FHI 7.2**, it is not necessary to provide the `--nrL
since the core list specified for FHI 7.2 will be used for DPDK. since the core list specified for FHI 7.2 will be used for DPDK.
If it is provided, the AAL core list wil be ignored. If it is provided, the AAL core list wil be ignored.
> [!NOTE]
> Ensure that the xRAN library is built using the same DPDK version as the accelerator poll-mode driver.
Example command: Example command:
```bash ```bash
cd ~/openairinterface5g cd ~/openairinterface5g
......
...@@ -273,6 +273,43 @@ OAI supports RF front-ends operating on arbitrary frequencies outside standard ...@@ -273,6 +273,43 @@ OAI supports RF front-ends operating on arbitrary frequencies outside standard
- `if_freq`: DL frequency in Hz (suffix with `L` in libconfig, e.g. `2169080000L`) - `if_freq`: DL frequency in Hz (suffix with `L` in libconfig, e.g. `2169080000L`)
- `if_offset`: UL frequency offset in Hz - `if_offset`: UL frequency offset in Hz
## RedCap UEs
OAI supports connecting RedCap (5G Release 17 Reduced Capability) UEs. This
ability was tested with the Quectel RG255C-GL RedCap module with firmware
version `RG255CGLABR01A04M4G`.
RedCap support requires some modifications to the gNB configuration. For
instance, this repository contains a reference [configuration file for a SISO
40MHz numerology 1 gNB supporting RedCap UEs](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.redcap.yaml).
To support both RedCap and other UEs, we configure an initial bandwidth part of
20MHz and an optional bandwidth part of 40MHz. Every UE first connects with
the initial 20MHz bandwidth part. RedCap UEs remain using this initial
bandwidth part while other UEs escalate to use the 40MHz bandwidth part.
Any gNB configuration file can be extended to support RedCap UEs:
1. Copy the `first_active_bwp`, `bwp_list`, `RedCap` and `TIMERS` sections from
the gNBs list of the reference configuration to the target configuration
file.
2. Modify the `bwpSize` in the `bwp_list` to match the bandwidth of the target
gNB. If necessary, in the same section, modify `scs` to match the numerology
of the target gNB.
3. Modify the initial bandwidth part location and bandwidth: set
`initialDLBWPlocationAndBandwidth` and `initialULBWPlocationAndBandwidth` to
13750 (or 13750 + RBstart to offset the initial bandwidth part, not tested).
4. Checkout the [gNB frequency setup documentation](gNB_frequency_setup.md) and
follow the instructions with the online calculator to find the
`absoluteFrequencySSB` for the new initial bandwidth part. The chosen
`absoluteFrequencySSB` is the `Arfcn GSCN` encountered in the line where
CRBstart is equal to 0 (or to the RBstart offset you chose previously, not
tested).
For example, connecting RedCap UEs on a 4x4 100MHz numerology 1 gNB with a 7.2
split Radio Unit could be achieved by following this process. For gNBs with
total bandwidth of 20MHz or below, it is not necessary to modify the bandwidth
part configuration. Then, only copy the `RedCap` and `TIMERS` sections from
the reference configuration to the target configuration file.
## Related documentation ## Related documentation
Further documentation not referenced above: Further documentation not referenced above:
......
...@@ -62,9 +62,9 @@ versions of gcc defined in the cmake cross-compilation file (`cross-arm.cmake`). ...@@ -62,9 +62,9 @@ versions of gcc defined in the cmake cross-compilation file (`cross-arm.cmake`).
### Build code generation tools for host ### Build code generation tools for host
Use the x86 compiler to build the `ldpc_generators` and generate the header Use the x86 compiler to generate the T header file in the `ran_build/build`
file in the `ran_build/build` folder. They are necessary during a build for folder. This is necessary during a build for code generation, and therefore
code generation, and therefore need to be created for the x86 architecture. need to be created for the x86 architecture.
```shell ```shell
rm -r ran_build rm -r ran_build
...@@ -74,7 +74,7 @@ mkdir ran_build/build-cross ...@@ -74,7 +74,7 @@ mkdir ran_build/build-cross
cd ran_build/build cd ran_build/build
cmake ../../.. cmake ../../..
make -j`nproc` ldpc_generators generate_T make -j`nproc` generate_T
``` ```
### Build executables for ARM64 ### Build executables for ARM64
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
FROM ran-base:latest AS ran-base FROM ran-base:latest AS ran-base
ARG xran_VERSION=11.1.5 ARG xran_VERSION=11.1.5
ARG DPDK_VERSION=22.11 ARG DPDK_VERSION=22.11.3
ARG T2_PATCH=AMD-T2-SDFEC_25-03-1.patch ARG T2_PATCH=AMD-T2-SDFEC_25-03-1.patch
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe ENV TZ=Europe
...@@ -31,9 +31,9 @@ WORKDIR /oai-ran ...@@ -31,9 +31,9 @@ WORKDIR /oai-ran
## Copy T2 patch ## Copy T2 patch
COPY ./$T2_PATCH /opt/. COPY ./$T2_PATCH /opt/.
## Download and build DPDK ## Download and build DPDK
RUN wget http://fast.dpdk.org/rel/dpdk-$DPDK_VERSION.tar.xz && \ RUN wget --no-verbose http://fast.dpdk.org/rel/dpdk-$DPDK_VERSION.tar.xz && \
tar -xvf dpdk-$DPDK_VERSION.tar.xz && \ tar -xvf dpdk-$DPDK_VERSION.tar.xz && \
cd dpdk-$DPDK_VERSION && \ cd dpdk-stable-$DPDK_VERSION && \
patch -p1 < /opt/$T2_PATCH && \ patch -p1 < /opt/$T2_PATCH && \
meson build && \ meson build && \
taskset -c 0-$(grep ^processor /proc/cpuinfo | wc -l) ninja -C build && \ taskset -c 0-$(grep ^processor /proc/cpuinfo | wc -l) ninja -C build && \
...@@ -44,7 +44,7 @@ RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \ ...@@ -44,7 +44,7 @@ RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \
cd /opt/phy && \ cd /opt/phy && \
git checkout $xran_VERSION &&\ git checkout $xran_VERSION &&\
cd /opt/phy/fhi_lib/lib && \ cd /opt/phy/fhi_lib/lib && \
WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=/oai-ran/dpdk-$DPDK_VERSION/ XRAN_DIR=/opt/phy/fhi_lib make XRAN_LIB_SO=1 WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=/oai-ran/dpdk-stable-$DPDK_VERSION/ XRAN_DIR=/opt/phy/fhi_lib make XRAN_LIB_SO=1
COPY . . COPY . .
......
...@@ -19,7 +19,7 @@ RUN /bin/sh oaienv && \ ...@@ -19,7 +19,7 @@ RUN /bin/sh oaienv && \
mkdir -p log ran_build/build ran_build/build-cross && \ mkdir -p log ran_build/build ran_build/build-cross && \
cd ran_build/build && \ cd ran_build/build && \
cmake ../../.. -GNinja && \ cmake ../../.. -GNinja && \
ninja ldpc_generators generate_T && \ ninja generate_T && \
cd ../build-cross/ && \ cd ../build-cross/ && \
# install missing libyaml-cpp-dev for arm64 # install missing libyaml-cpp-dev for arm64
apt install -y libyaml-cpp-dev:arm64 && \ apt install -y libyaml-cpp-dev:arm64 && \
......
This diff is collapsed.
...@@ -216,41 +216,41 @@ int main ( int argc, char **argv ) ...@@ -216,41 +216,41 @@ int main ( int argc, char **argv )
if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) { if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) {
AssertFatal(1==0,"IF_NAME is required\n"); AssertFatal(1==0,"IF_NAME is required\n");
} else { } else {
ru->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr)); ru->ifdevice.eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr));
ru->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); ru->ifdevice.eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr));
ru->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr)); ru->ifdevice.eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr));
ru->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr); ru->ifdevice.eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr);
ru->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr); ru->ifdevice.eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr);
// Check if control port set // Check if control port set
if (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ) { if (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ) {
printf("Removing control port for RU %d\n",j); printf("Removing control port for RU %d\n",j);
ru->has_ctrl_prt = 0; ru->has_ctrl_prt = 0;
} else { } else {
ru->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr); ru->ifdevice.eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr);
ru->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr); ru->ifdevice.eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr);
printf(" Control port %u \n",ru->eth_params.my_portc); printf(" Control port %u \n",ru->ifdevice.eth_params.my_portc);
} }
if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) { if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) {
ru->if_south = LOCAL_RF; ru->if_south = LOCAL_RF;
ru->function = NGFI_RRU_IF5; ru->function = NGFI_RRU_IF5;
ru->eth_params.transp_preference = ETH_UDP_MODE; ru->ifdevice.eth_params.transp_preference = ETH_UDP_MODE;
printf("Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j); printf("Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j);
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) {
ru->if_south = LOCAL_RF; ru->if_south = LOCAL_RF;
ru->function = NGFI_RRU_IF5; ru->function = NGFI_RRU_IF5;
ru->eth_params.transp_preference = ETH_RAW_MODE; ru->ifdevice.eth_params.transp_preference = ETH_RAW_MODE;
printf("Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j); printf("Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j);
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) {
ru->if_south = LOCAL_RF; ru->if_south = LOCAL_RF;
ru->function = NGFI_RRU_IF4p5; ru->function = NGFI_RRU_IF4p5;
ru->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; ru->ifdevice.eth_params.transp_preference = ETH_UDP_IF4p5_MODE;
printf("Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j); printf("Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j);
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) {
ru->if_south = LOCAL_RF; ru->if_south = LOCAL_RF;
ru->function = NGFI_RRU_IF4p5; ru->function = NGFI_RRU_IF4p5;
ru->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; ru->ifdevice.eth_params.transp_preference = ETH_RAW_IF4p5_MODE;
printf("Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j); printf("Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j);
} }
...@@ -275,30 +275,30 @@ int main ( int argc, char **argv ) ...@@ -275,30 +275,30 @@ int main ( int argc, char **argv )
} //strcmp(local_rf, "yes") == 0 } //strcmp(local_rf, "yes") == 0
else { else {
printf("RU %d: Transport %s\n",j,*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr)); printf("RU %d: Transport %s\n",j,*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr));
ru->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr)); ru->ifdevice.eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr));
ru->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); ru->ifdevice.eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr));
ru->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr)); ru->ifdevice.eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr));
ru->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr); ru->ifdevice.eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr);
ru->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr); ru->ifdevice.eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr);
ru->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr); ru->ifdevice.eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr);
ru->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr); ru->ifdevice.eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr);
if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) { if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) {
ru->if_south = REMOTE_IF5; ru->if_south = REMOTE_IF5;
ru->function = NGFI_RAU_IF5; ru->function = NGFI_RAU_IF5;
ru->eth_params.transp_preference = ETH_UDP_MODE; ru->ifdevice.eth_params.transp_preference = ETH_UDP_MODE;
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) {
ru->if_south = REMOTE_IF5; ru->if_south = REMOTE_IF5;
ru->function = NGFI_RAU_IF5; ru->function = NGFI_RAU_IF5;
ru->eth_params.transp_preference = ETH_RAW_MODE; ru->ifdevice.eth_params.transp_preference = ETH_RAW_MODE;
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) {
ru->if_south = REMOTE_IF4p5; ru->if_south = REMOTE_IF4p5;
ru->function = NGFI_RAU_IF4p5; ru->function = NGFI_RAU_IF4p5;
ru->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; ru->ifdevice.eth_params.transp_preference = ETH_UDP_IF4p5_MODE;
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) {
ru->if_south = REMOTE_IF4p5; ru->if_south = REMOTE_IF4p5;
ru->function = NGFI_RAU_IF4p5; ru->function = NGFI_RAU_IF4p5;
ru->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; ru->ifdevice.eth_params.transp_preference = ETH_RAW_IF4p5_MODE;
} }
if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) ru->is_slave=1; if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) ru->is_slave=1;
......
...@@ -249,15 +249,8 @@ static size_t dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output, size ...@@ -249,15 +249,8 @@ static size_t dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output, size
output += print_meas_log(&ru->txdataF_copy_stats, "txdataF_copy", NULL, NULL, output, end - output); output += print_meas_log(&ru->txdataF_copy_stats, "txdataF_copy", NULL, NULL, output, end - output);
} }
if (ru->fh_north_asynch_in)
output += print_meas_log(&ru->rx_fhaul,"rx_fhaul",NULL,NULL, output, end - output);
output += print_meas_log(&ru->tx_fhaul,"tx_fhaul",NULL,NULL, output, end - output); output += print_meas_log(&ru->tx_fhaul,"tx_fhaul",NULL,NULL, output, end - output);
if (ru->fh_north_out) {
output += print_meas_log(&ru->compression,"compression",NULL,NULL, output, end - output);
output += print_meas_log(&ru->transport,"transport",NULL,NULL, output, end - output);
}
return output - begin; return output - begin;
} }
......
...@@ -556,13 +556,11 @@ void ru_tx_func(void *param) ...@@ -556,13 +556,11 @@ void ru_tx_func(void *param)
ru->feptx_prec(ru,frame_tx,slot_tx); ru->feptx_prec(ru,frame_tx,slot_tx);
// do OFDM with/without TX front-end processing if needed // do OFDM with/without TX front-end processing if needed
if (ru->fh_north_asynch_in == NULL && ru->feptx_ofdm) if (ru->feptx_ofdm)
ru->feptx_ofdm(ru, frame_tx, slot_tx); ru->feptx_ofdm(ru, frame_tx, slot_tx);
if (ru->fh_north_asynch_in == NULL && ru->fh_south_out) if (ru->fh_south_out)
ru->fh_south_out(ru, frame_tx, slot_tx, info->timestamp_tx); ru->fh_south_out(ru, frame_tx, slot_tx, info->timestamp_tx);
if (ru->fh_north_out)
ru->fh_north_out(ru);
} }
/* @brief wait for the next RX TTI to be free /* @brief wait for the next RX TTI to be free
...@@ -637,7 +635,7 @@ void *ru_thread(void *param) ...@@ -637,7 +635,7 @@ void *ru_thread(void *param)
// Start IF device if any // Start IF device if any
if (ru->nr_start_if) { if (ru->nr_start_if) {
LOG_I(PHY, "starting transport\n"); LOG_I(PHY, "starting transport\n");
ret = openair0_transport_load(&ru->ifdevice, &ru->openair0_cfg, &ru->eth_params); ret = openair0_transport_load(&ru->ifdevice, &ru->openair0_cfg);
AssertFatal(ret == 0, "RU %u: openair0_transport_init() ret %d: cannot initialize transport protocol\n", ru->idx, ret); AssertFatal(ret == 0, "RU %u: openair0_transport_init() ret %d: cannot initialize transport protocol\n", ru->idx, ret);
if (ru->ifdevice.get_internal_parameter) { if (ru->ifdevice.get_internal_parameter) {
...@@ -843,18 +841,6 @@ int start_write_thread(RU_t *ru) { ...@@ -843,18 +841,6 @@ int start_write_thread(RU_t *ru) {
return ru->rfdevice.trx_write_init(&ru->rfdevice); return ru->rfdevice.trx_write_init(&ru->rfdevice);
} }
void init_RU_proc(RU_t *ru)
{
ru->proc = (RU_proc_t){.ru = ru, .first_rx = 1, .first_tx = 1};
LOG_I(PHY, "Initialized RU proc %d (%s,%s),\n", ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]);
}
void start_RU_proc(RU_t *ru)
{
threadCreate(&ru->proc.pthread_FH, ru_thread, (void *)ru, "ru_thread", ru->ru_thread_core, OAI_PRIORITY_RT_MAX);
}
void kill_NR_RU_proc(int inst) { void kill_NR_RU_proc(int inst) {
RU_t *ru = RC.ru[inst]; RU_t *ru = RC.ru[inst];
RU_proc_t *proc = &ru->proc; RU_proc_t *proc = &ru->proc;
...@@ -894,14 +880,10 @@ void set_function_spec_param(RU_t *ru) ...@@ -894,14 +880,10 @@ void set_function_spec_param(RU_t *ru)
case LOCAL_RF: // this is an RU with integrated RF (RRU, gNB) case LOCAL_RF: // this is an RU with integrated RF (RRU, gNB)
reset_meas(&ru->rx_fhaul); reset_meas(&ru->rx_fhaul);
AssertFatal(ru->function == gNodeB_3GPP, "ru->function %d not supported for LOCAL_RF\n", ru->function); AssertFatal(ru->function == gNodeB_3GPP, "ru->function %d not supported for LOCAL_RF\n", ru->function);
ru->do_prach = 0; // no prach processing in RU
ru->feprx = nr_fep_tp; // this is frequency-shift + DFTs ru->feprx = nr_fep_tp; // this is frequency-shift + DFTs
ru->feptx_ofdm = nr_feptx_tp; // this is fep with idft and precoding ru->feptx_ofdm = nr_feptx_tp; // this is fep with idft and precoding
ru->feptx_prec = NULL; ru->feptx_prec = NULL;
ru->fh_north_in = NULL; // no incoming fronthaul from north
ru->fh_north_out = NULL; // no outgoing fronthaul to north
ru->nr_start_if = NULL; // no if interface ru->nr_start_if = NULL; // no if interface
ru->rfdevice.host_type = RAU_HOST;
ru->fh_south_in = rx_rf; // local synchronous RF RX ru->fh_south_in = rx_rf; // local synchronous RF RX
ru->fh_south_out = tx_rf; // local synchronous RF TX ru->fh_south_out = tx_rf; // local synchronous RF TX
ru->start_rf = start_rf; // need to start the local RF interface ru->start_rf = start_rf; // need to start the local RF interface
...@@ -910,38 +892,27 @@ void set_function_spec_param(RU_t *ru) ...@@ -910,38 +892,27 @@ void set_function_spec_param(RU_t *ru)
break; break;
case REMOTE_IF5: // the remote unit is IF5 RRU case REMOTE_IF5: // the remote unit is IF5 RRU
ru->do_prach = 0;
ru->txfh_in_fep = 0;
ru->feprx = nr_fep_tp; // this is frequency-shift + DFTs ru->feprx = nr_fep_tp; // this is frequency-shift + DFTs
ru->feptx_prec = NULL; // need to do transmit Precoding + IDFTs ru->feptx_prec = NULL; // need to do transmit Precoding + IDFTs
ru->feptx_ofdm = nr_feptx_tp; // need to do transmit Precoding + IDFTs ru->feptx_ofdm = nr_feptx_tp; // need to do transmit Precoding + IDFTs
ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception
ru->fh_south_out = (ru->txfh_in_fep > 0) ? NULL : fh_if5_south_out; // synchronous IF5 transmission ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission
ru->fh_south_asynch_in = NULL; // no asynchronous UL ru->start_rf = ru->ifdevice.eth_params.transp_preference == ETH_UDP_IF5_ECPRI_MODE ? start_streaming : NULL;
ru->start_rf = ru->eth_params.transp_preference == ETH_UDP_IF5_ECPRI_MODE ? start_streaming : NULL;
ru->stop_rf = NULL; ru->stop_rf = NULL;
ru->start_write_thread = NULL; ru->start_write_thread = NULL;
ru->nr_start_if = nr_start_if; // need to start if interface for IF5 ru->nr_start_if = nr_start_if; // need to start if interface for IF5
ru->ifdevice.host_type = RAU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
break; break;
case REMOTE_IF4p5: case REMOTE_IF4p5:
ru->do_prach = 0;
ru->feprx = NULL; // DFTs ru->feprx = NULL; // DFTs
ru->feptx_prec = nr_feptx_prec; // Precoding operation ru->feptx_prec = nr_feptx_prec; // Precoding operation
ru->feptx_ofdm = NULL; // no OFDM mod ru->feptx_ofdm = NULL; // no OFDM mod
ru->fh_south_in = NULL; ru->fh_south_in = NULL;
ru->fh_south_out = NULL; ru->fh_south_out = NULL;
ru->fh_south_asynch_in = NULL;
ru->fh_north_out = NULL;
ru->fh_north_asynch_in = NULL;
ru->start_rf = NULL; // no local RF ru->start_rf = NULL; // no local RF
ru->stop_rf = NULL; ru->stop_rf = NULL;
ru->start_write_thread = NULL; ru->start_write_thread = NULL;
ru->nr_start_if = nr_start_if; // need to start if interface for IF4p5 ru->nr_start_if = nr_start_if; // need to start if interface for IF4p5
ru->ifdevice.host_type = RAU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
break; break;
default: default:
...@@ -1002,8 +973,12 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file) ...@@ -1002,8 +973,12 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file)
} }
} }
} }
set_function_spec_param(ru); set_function_spec_param(ru);
init_RU_proc(ru);
// init RU_proc -> needed for timing alignment
ru->proc = (RU_proc_t){.ru = ru, .first_rx = 1, .first_tx = 1};
if (ru->if_south != REMOTE_IF4p5) { if (ru->if_south != REMOTE_IF4p5) {
int threadCnt = ru->num_tpcores; int threadCnt = ru->num_tpcores;
if (threadCnt < 2) if (threadCnt < 2)
...@@ -1031,7 +1006,7 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file) ...@@ -1031,7 +1006,7 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file)
void start_NR_RU() void start_NR_RU()
{ {
RU_t *ru = RC.ru[0]; RU_t *ru = RC.ru[0];
start_RU_proc(ru); threadCreate(&ru->proc.pthread_FH, ru_thread, ru, "ru_thread", ru->ru_thread_core, OAI_PRIORITY_RT_MAX);
} }
void stop_RU(int nb_ru) { void stop_RU(int nb_ru) {
...@@ -1059,8 +1034,6 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg) ...@@ -1059,8 +1034,6 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
RU_t *ru = RC.ru[j] = calloc(1, sizeof(*RC.ru[j])); RU_t *ru = RC.ru[j] = calloc(1, sizeof(*RC.ru[j]));
ru->idx = j; ru->idx = j;
ru->nr_frame_parms = calloc(1, sizeof(*ru->nr_frame_parms)); ru->nr_frame_parms = calloc(1, sizeof(*ru->nr_frame_parms));
ru->frame_parms = calloc(1, sizeof(*ru->frame_parms));
ru->if_timing = synch_to_ext_device;
paramdef_t *param = RUParamList.paramarray[j]; paramdef_t *param = RUParamList.paramarray[j];
if (RC.nb_nr_L1_inst > 0) if (RC.nb_nr_L1_inst > 0)
ru->num_gNB = param[RU_ENB_LIST_IDX].numelt; ru->num_gNB = param[RU_ENB_LIST_IDX].numelt;
...@@ -1146,35 +1119,34 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg) ...@@ -1146,35 +1119,34 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
ru->max_pdschReferenceSignalPower = *param[RU_MAX_RS_EPRE_IDX].uptr; ru->max_pdschReferenceSignalPower = *param[RU_MAX_RS_EPRE_IDX].uptr;
ru->max_rxgain = *param[RU_MAX_RXGAIN_IDX].uptr; ru->max_rxgain = *param[RU_MAX_RXGAIN_IDX].uptr;
ru->sf_extension = *param[RU_SF_EXTENSION_IDX].uptr; ru->sf_extension = *param[RU_SF_EXTENSION_IDX].uptr;
} else { // strcmp(local_rf, "yes") == 0 } else {
char *str = *param[RU_TRANSPORT_PREFERENCE_IDX].strptr; char *str = *param[RU_TRANSPORT_PREFERENCE_IDX].strptr;
LOG_D(PHY, "RU %d: Transport %s\n", j, str); LOG_D(PHY, "RU %d: Transport %s\n", j, str);
ru->eth_params.local_if_name = strdup(*param[RU_LOCAL_IF_NAME_IDX].strptr); ru->ifdevice.eth_params.local_if_name = strdup(*param[RU_LOCAL_IF_NAME_IDX].strptr);
ru->eth_params.my_addr = strdup(*param[RU_LOCAL_ADDRESS_IDX].strptr); ru->ifdevice.eth_params.my_addr = strdup(*param[RU_LOCAL_ADDRESS_IDX].strptr);
ru->eth_params.remote_addr = strdup(*param[RU_REMOTE_ADDRESS_IDX].strptr); ru->ifdevice.eth_params.remote_addr = strdup(*param[RU_REMOTE_ADDRESS_IDX].strptr);
ru->eth_params.my_portc = *param[RU_LOCAL_PORTC_IDX].uptr; ru->ifdevice.eth_params.my_portc = *param[RU_LOCAL_PORTC_IDX].uptr;
ru->eth_params.remote_portc = *param[RU_REMOTE_PORTC_IDX].uptr; ru->ifdevice.eth_params.remote_portc = *param[RU_REMOTE_PORTC_IDX].uptr;
ru->eth_params.my_portd = *param[RU_LOCAL_PORTD_IDX].uptr; ru->ifdevice.eth_params.my_portd = *param[RU_LOCAL_PORTD_IDX].uptr;
ru->eth_params.remote_portd = *param[RU_REMOTE_PORTD_IDX].uptr; ru->ifdevice.eth_params.remote_portd = *param[RU_REMOTE_PORTD_IDX].uptr;
if (strcmp(str, "udp") == 0) { if (strcmp(str, "udp") == 0) {
ru->if_south = REMOTE_IF5; ru->if_south = REMOTE_IF5;
ru->function = NGFI_RAU_IF5; ru->function = NGFI_RAU_IF5;
ru->eth_params.transp_preference = ETH_UDP_MODE; ru->ifdevice.eth_params.transp_preference = ETH_UDP_MODE;
} else if (strcmp(str, "udp_ecpri_if5") == 0) { } else if (strcmp(str, "udp_ecpri_if5") == 0) {
ru->if_south = REMOTE_IF5; ru->if_south = REMOTE_IF5;
ru->function = NGFI_RAU_IF5; ru->function = NGFI_RAU_IF5;
ru->eth_params.transp_preference = ETH_UDP_IF5_ECPRI_MODE; ru->ifdevice.eth_params.transp_preference = ETH_UDP_IF5_ECPRI_MODE;
} else if (strcmp(str, "raw") == 0) { } else if (strcmp(str, "raw") == 0) {
ru->if_south = REMOTE_IF5; ru->if_south = REMOTE_IF5;
ru->function = NGFI_RAU_IF5; ru->function = NGFI_RAU_IF5;
ru->eth_params.transp_preference = ETH_RAW_MODE; ru->ifdevice.eth_params.transp_preference = ETH_RAW_MODE;
} else if (strcmp(str, "raw_if4p5") == 0) { } else if (strcmp(str, "raw_if4p5") == 0) {
ru->if_south = REMOTE_IF4p5; ru->if_south = REMOTE_IF4p5;
ru->function = NGFI_RAU_IF4p5; ru->function = NGFI_RAU_IF4p5;
ru->eth_params.transp_preference = ETH_RAW_IF4p5_MODE;
} }
} /* strcmp(local_rf, "yes") != 0 */ }
ru->nb_tx = *param[RU_NB_TX_IDX].uptr; ru->nb_tx = *param[RU_NB_TX_IDX].uptr;
ru->nb_rx = *param[RU_NB_RX_IDX].uptr; ru->nb_rx = *param[RU_NB_RX_IDX].uptr;
......
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */ /* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
#define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n" #define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n"
#define CONFIG_HLP_DLMCST_PHYTEST "Set the downlink MCS table index for PHYTEST mode\n"
#define CONFIG_HLP_DLNL_PHYTEST "Set the downlink nrOfLayers for PHYTEST mode\n" #define CONFIG_HLP_DLNL_PHYTEST "Set the downlink nrOfLayers for PHYTEST mode\n"
#define CONFIG_HLP_DLPMI_PHYTEST "Set the downlink Precoding Matrix Index for PHYTEST mode\n"
#define CONFIG_HLP_ULNL_PHYTEST "Set the uplink nrOfLayers for PHYTEST mode\n" #define CONFIG_HLP_ULNL_PHYTEST "Set the uplink nrOfLayers for PHYTEST mode\n"
#define CONFIG_HLP_DLBW_PHYTEST "Set the number of PRBs used for DLSCH in PHYTEST mode\n" #define CONFIG_HLP_DLBW_PHYTEST "Set the number of PRBs used for DLSCH in PHYTEST mode\n"
#define CONFIG_HLP_ULBW_PHYTEST "Set the number of PRBs used for ULSCH in PHYTEST mode\n" #define CONFIG_HLP_ULBW_PHYTEST "Set the number of PRBs used for ULSCH in PHYTEST mode\n"
...@@ -53,6 +55,7 @@ ...@@ -53,6 +55,7 @@
#define CONFIG_HLP_SSC "Set the start subcarrier \n" #define CONFIG_HLP_SSC "Set the start subcarrier \n"
#define CONFIG_HLP_DISABLETIMECORR "disable UE timing correction\n" #define CONFIG_HLP_DISABLETIMECORR "disable UE timing correction\n"
#define CONFIG_HLP_ULMCS_PHYTEST "Set the uplink MCS for PHYTEST mode\n" #define CONFIG_HLP_ULMCS_PHYTEST "Set the uplink MCS for PHYTEST mode\n"
#define CONFIG_HLP_ULMCST_PHYTEST "Set the uplink MCS table index for PHYTEST mode\n"
#define CONFIG_HLP_DLBW_PHYTEST "Set the number of PRBs used for DLSCH in PHYTEST mode\n" #define CONFIG_HLP_DLBW_PHYTEST "Set the number of PRBs used for DLSCH in PHYTEST mode\n"
#define CONFIG_HLP_ULBW_PHYTEST "Set the number of PRBs used for ULSCH in PHYTEST mode\n" #define CONFIG_HLP_ULBW_PHYTEST "Set the number of PRBs used for ULSCH in PHYTEST mode\n"
#define CONFIG_HLP_DLBM_PHYTEST "Bitmap for DLSCH slots in period (slot 0 starts at LSB)\n" #define CONFIG_HLP_DLBM_PHYTEST "Bitmap for DLSCH slots in period (slot 0 starts at LSB)\n"
......
...@@ -21,10 +21,13 @@ ...@@ -21,10 +21,13 @@
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
// clang-format off // clang-format off
#define CMDLINE_PARAMS_DESC_GNB { \ #define CMDLINE_PARAMS_DESC_GNB { \
{"m" , CONFIG_HLP_DLMCS_PHYTEST, 0, .uptr=&target_dl_mcs, .defintval=0, TYPE_UINT, 0}, \
{"l" , CONFIG_HLP_DLNL_PHYTEST, 0, .uptr=&target_dl_Nl, .defintval=0, TYPE_UINT, 0}, \ {"l" , CONFIG_HLP_DLNL_PHYTEST, 0, .uptr=&target_dl_Nl, .defintval=0, TYPE_UINT, 0}, \
{"L" , CONFIG_HLP_ULNL_PHYTEST, 0, .uptr=&target_ul_Nl, .defintval=0, TYPE_UINT, 0}, \ {"L" , CONFIG_HLP_ULNL_PHYTEST, 0, .uptr=&target_ul_Nl, .defintval=0, TYPE_UINT, 0}, \
{"p" , CONFIG_HLP_DLPMI_PHYTEST, 0, .uptr=&target_dl_pmi, .defintval=0, TYPE_UINT, 0}, \
{"m" , CONFIG_HLP_DLMCS_PHYTEST, 0, .uptr=&target_dl_mcs, .defintval=0, TYPE_UINT, 0}, \
{"n" , CONFIG_HLP_DLMCST_PHYTEST, 0, .uptr=&target_dl_mcs_table_index, .defintval=0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS_PHYTEST, 0, .uptr=&target_ul_mcs, .defintval=0, TYPE_UINT, 0}, \ {"t" , CONFIG_HLP_ULMCS_PHYTEST, 0, .uptr=&target_ul_mcs, .defintval=0, TYPE_UINT, 0}, \
{"u" , CONFIG_HLP_ULMCST_PHYTEST, 0, .uptr=&target_ul_mcs_table_index, .defintval=0, TYPE_UINT, 0}, \
{"M" , CONFIG_HLP_DLBW_PHYTEST, 0, .uptr=&target_dl_bw, .defintval=0, TYPE_UINT, 0}, \ {"M" , CONFIG_HLP_DLBW_PHYTEST, 0, .uptr=&target_dl_bw, .defintval=0, TYPE_UINT, 0}, \
{"T" , CONFIG_HLP_ULBW_PHYTEST, 0, .uptr=&target_ul_bw, .defintval=0, TYPE_UINT, 0}, \ {"T" , CONFIG_HLP_ULBW_PHYTEST, 0, .uptr=&target_ul_bw, .defintval=0, TYPE_UINT, 0}, \
{"D" , CONFIG_HLP_DLBM_PHYTEST, 0, .u64ptr=&dlsch_slot_bitmap, .defint64val=0, TYPE_UINT64, 0}, \ {"D" , CONFIG_HLP_DLBM_PHYTEST, 0, .u64ptr=&dlsch_slot_bitmap, .defint64val=0, TYPE_UINT64, 0}, \
...@@ -36,10 +39,13 @@ ...@@ -36,10 +39,13 @@
} }
// clang-format on // clang-format on
extern uint32_t target_dl_mcs;
extern uint32_t target_dl_Nl; extern uint32_t target_dl_Nl;
extern uint32_t target_ul_Nl; extern uint32_t target_ul_Nl;
extern uint32_t target_dl_pmi;
extern uint32_t target_dl_mcs;
extern uint32_t target_dl_mcs_table_index;
extern uint32_t target_ul_mcs; extern uint32_t target_ul_mcs;
extern uint32_t target_ul_mcs_table_index;
extern uint32_t target_dl_bw; extern uint32_t target_dl_bw;
extern uint32_t target_ul_bw; extern uint32_t target_ul_bw;
extern uint64_t dlsch_slot_bitmap; extern uint64_t dlsch_slot_bitmap;
...@@ -54,7 +60,6 @@ extern void stop_gNB(int); ...@@ -54,7 +60,6 @@ extern void stop_gNB(int);
// In nr-ru.c // In nr-ru.c
extern void init_NR_RU(configmodule_interface_t *cfg, char *); extern void init_NR_RU(configmodule_interface_t *cfg, char *);
extern void init_RU_proc(RU_t *ru);
extern void start_NR_RU(void); extern void start_NR_RU(void);
extern void stop_RU(int nb_ru); extern void stop_RU(int nb_ru);
extern void kill_NR_RU_proc(int inst); extern void kill_NR_RU_proc(int inst);
......
...@@ -547,8 +547,15 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, ...@@ -547,8 +547,15 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE,
if (proc->rx_slot_type == NR_DOWNLINK_SLOT || proc->rx_slot_type == NR_MIXED_SLOT) { if (proc->rx_slot_type == NR_DOWNLINK_SLOT || proc->rx_slot_type == NR_MIXED_SLOT) {
dl_slot = true; dl_slot = true;
if(UE->if_inst != NULL && UE->if_inst->dl_indication != NULL) { if(UE->if_inst != NULL && UE->if_inst->dl_indication != NULL) {
nr_downlink_indication_t dl_indication; nr_downlink_indication_t dl_indication = (nr_downlink_indication_t){
nr_fill_dl_indication(&dl_indication, NULL, NULL, proc, UE, phy_data); .gNB_index = proc->gNB_id,
.module_id = UE->Mod_id,
.cc_id = UE->CC_id,
.hfn = proc->hfn_rx,
.frame = proc->frame_rx,
.slot = proc->nr_slot_rx,
.phy_data = phy_data,
};
UE->if_inst->dl_indication(&dl_indication); UE->if_inst->dl_indication(&dl_indication);
} }
......
...@@ -155,8 +155,6 @@ typedef struct { ...@@ -155,8 +155,6 @@ typedef struct {
/// ///
#define NFAPI_RX_IND_MAX_PDU 100 #define NFAPI_RX_IND_MAX_PDU 100
typedef struct { typedef struct {
uint16_t sfn;
uint16_t slot;
uint16_t number_pdus; uint16_t number_pdus;
fapi_nr_rx_indication_body_t rx_indication_body[NFAPI_RX_IND_MAX_PDU]; fapi_nr_rx_indication_body_t rx_indication_body[NFAPI_RX_IND_MAX_PDU];
} fapi_nr_rx_indication_t; } fapi_nr_rx_indication_t;
...@@ -174,8 +172,6 @@ typedef struct { ...@@ -174,8 +172,6 @@ typedef struct {
/// ///
typedef struct { typedef struct {
uint16_t sfn;
uint16_t slot;
fapi_nr_tx_config_t tx_config; fapi_nr_tx_config_t tx_config;
uint16_t number_of_pdus; uint16_t number_of_pdus;
fapi_nr_tx_request_body_t tx_request_body[NFAPI_MAX_NUM_UL_PDU]; fapi_nr_tx_request_body_t tx_request_body[NFAPI_MAX_NUM_UL_PDU];
......
...@@ -16,14 +16,14 @@ add_library(ldpc_orig MODULE ...@@ -16,14 +16,14 @@ add_library(ldpc_orig MODULE
nrLDPC_encoder/ldpc_encoder.c nrLDPC_encoder/ldpc_encoder.c
) )
set_target_properties(ldpc_orig PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set_target_properties(ldpc_orig PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
target_link_libraries(ldpc_orig PRIVATE ldpc_segment ldpc_gen_HEADERS) target_link_libraries(ldpc_orig PRIVATE ldpc_segment)
add_library(ldpc MODULE add_library(ldpc MODULE
nrLDPC_decoder/nrLDPC_decoder.c nrLDPC_decoder/nrLDPC_decoder.c
nrLDPC_encoder/ldpc_encoder_optim8segmulti.c nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
) )
set_target_properties(ldpc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set_target_properties(ldpc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
target_link_libraries(ldpc PRIVATE ldpc_segment ldpc_gen_HEADERS) target_link_libraries(ldpc PRIVATE ldpc_segment)
add_dependencies(ldpctest ldpc ldpc_orig) add_dependencies(ldpctest ldpc ldpc_orig)
add_dependencies(nr-softmodem ldpc ldpc_orig) add_dependencies(nr-softmodem ldpc ldpc_orig)
...@@ -36,6 +36,5 @@ add_dependencies(nr_dlschsim ldpc ldpc_orig) ...@@ -36,6 +36,5 @@ add_dependencies(nr_dlschsim ldpc ldpc_orig)
add_library(crc_byte OBJECT crc_byte.c) add_library(crc_byte OBJECT crc_byte.c)
add_subdirectory(nrLDPC_coding) add_subdirectory(nrLDPC_coding)
add_subdirectory(nrLDPC_decoder)
add_subdirectory(nrPolar_tools) add_subdirectory(nrPolar_tools)
add_subdirectory(nrSmallBlock) add_subdirectory(nrSmallBlock)
...@@ -23,7 +23,7 @@ if (ENABLE_LDPC_AAL) ...@@ -23,7 +23,7 @@ if (ENABLE_LDPC_AAL)
set_target_properties(ldpc_aal PROPERTIES COMPILE_FLAGS "-DALLOW_EXPERIMENTAL_API") set_target_properties(ldpc_aal PROPERTIES COMPILE_FLAGS "-DALLOW_EXPERIMENTAL_API")
set_target_properties(ldpc_aal PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set_target_properties(ldpc_aal PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
target_include_directories(ldpc_aal PRIVATE ${LIBDPDK_AAL_INCLUDE_DIRS}) target_include_directories(ldpc_aal PRIVATE ${LIBDPDK_AAL_INCLUDE_DIRS})
target_link_libraries(ldpc_aal PRIVATE log_headers ldpc_gen_HEADERS ${LIBDPDK_AAL_LDFLAGS}) target_link_libraries(ldpc_aal PRIVATE log_headers ${LIBDPDK_AAL_LDFLAGS})
if (PMD_T2) if (PMD_T2)
target_link_libraries(ldpc_aal PRIVATE ${PMD_T2}) target_link_libraries(ldpc_aal PRIVATE ${PMD_T2})
endif() endif()
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
add_subdirectory(nrLDPC_tools)
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
add_subdirectory(generator_bnProc ldpc/generator_bnProc)
add_subdirectory(generator_bnProc_avx512 ldpc/generator_bnProc_avx512)
add_subdirectory(generator_cnProc ldpc/generator_cnProc)
add_subdirectory(generator_cnProc_avx512 ldpc/generator_cnProc_avx512)
# custom target to build all generators
add_custom_target(ldpc_generators)
# if (CROSS_COMPILE)
# find_package(bnProc_gen_avx2)
# find_package(bnProc_gen_128)
# find_package(bnProc_gen_avx512)
# find_package(cnProc_gen_avx2)
# find_package(cnProc_gen_128)
# find_package(cnProc_gen_avx512)
# endif()
add_dependencies(ldpc_generators
bnProc_gen_avx2_files
bnProc_gen_128_files
bnProc_gen_avx512_files
cnProc_gen_avx2_files
cnProc_gen_128_files
cnProc_gen_avx512_files)
add_library(ldpc_gen_HEADERS INTERFACE)
target_link_libraries(ldpc_gen_HEADERS INTERFACE
bnProc_gen_avx2_HEADERS
bnProc_gen_128_HEADERS
bnProc_gen_avx512_HEADERS
cnProc_gen_avx2_HEADERS
cnProc_gen_128_HEADERS
cnProc_gen_avx512_HEADERS)
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
if (CROSS_COMPILE)
find_package(bnProc_gen_128)
find_package(bnProc_gen_avx2)
else()
add_executable(bnProc_gen_avx2
bnProc_gen_BG1_avx2.c
bnProc_gen_BG2_avx2.c
bnProcPc_gen_BG1_avx2.c
bnProcPc_gen_BG2_avx2.c
main.c)
add_executable(bnProc_gen_128
bnProc_gen_BG1_128.c
bnProc_gen_BG2_128.c
bnProcPc_gen_BG1_128.c
bnProcPc_gen_BG2_128.c
main128.c)
target_compile_options(bnProc_gen_avx2 PRIVATE -W -Wall )
target_compile_options(bnProc_gen_128 PRIVATE -W -Wall )
export(TARGETS bnProc_gen_avx2 FILE
"${CMAKE_BINARY_DIR}/bnProc_gen_avx2Config.cmake")
export(TARGETS bnProc_gen_128 FILE
"${CMAKE_BINARY_DIR}/bnProc_gen_128Config.cmake")
endif ()
set(bnProc_headers
bnProc/nrLDPC_bnProc_BG1_R13_AVX2.h
bnProc/nrLDPC_bnProc_BG1_R23_AVX2.h
bnProc/nrLDPC_bnProc_BG1_R89_AVX2.h
bnProc/nrLDPC_bnProc_BG2_R13_AVX2.h
bnProc/nrLDPC_bnProc_BG2_R15_AVX2.h
bnProc/nrLDPC_bnProc_BG2_R23_AVX2.h)
set(bnProcPc_headers
bnProcPc/nrLDPC_bnProcPc_BG1_R13_AVX2.h
bnProcPc/nrLDPC_bnProcPc_BG1_R23_AVX2.h
bnProcPc/nrLDPC_bnProcPc_BG1_R89_AVX2.h
bnProcPc/nrLDPC_bnProcPc_BG2_R13_AVX2.h
bnProcPc/nrLDPC_bnProcPc_BG2_R15_AVX2.h
bnProcPc/nrLDPC_bnProcPc_BG2_R23_AVX2.h)
set(bnProc128_headers
bnProc/nrLDPC_bnProc_BG1_R13_128.h
bnProc/nrLDPC_bnProc_BG1_R23_128.h
bnProc/nrLDPC_bnProc_BG1_R89_128.h
bnProc/nrLDPC_bnProc_BG2_R13_128.h
bnProc/nrLDPC_bnProc_BG2_R15_128.h
bnProc/nrLDPC_bnProc_BG2_R23_128.h)
set(bnProcPc128_headers
bnProcPc/nrLDPC_bnProcPc_BG1_R13_128.h
bnProcPc/nrLDPC_bnProcPc_BG1_R23_128.h
bnProcPc/nrLDPC_bnProcPc_BG1_R89_128.h
bnProcPc/nrLDPC_bnProcPc_BG2_R13_128.h
bnProcPc/nrLDPC_bnProcPc_BG2_R15_128.h
bnProcPc/nrLDPC_bnProcPc_BG2_R23_128.h)
add_custom_command(
# TARGET bnProc_gen_avx2 POST_BUILD
OUTPUT ${bnProc_headers} ${bnProcPc_headers}
COMMAND ${CMAKE_COMMAND} -E make_directory bnProc
COMMAND ${CMAKE_COMMAND} -E make_directory bnProcPc
COMMAND bnProc_gen_avx2 .
DEPENDS bnProc_gen_avx2
COMMENT "Generating LDPC bnProc header files for AVX2"
)
add_custom_target(bnProc_gen_avx2_files DEPENDS ${bnProc_headers} ${bnProcPc_headers})
add_custom_command(
# TARGET bnProc_gen_128 POST_BUILD
OUTPUT ${bnProc128_headers} ${bnProcPc128_headers}
COMMAND ${CMAKE_COMMAND} -E make_directory bnProc128
COMMAND ${CMAKE_COMMAND} -E make_directory bnProcPc128
COMMAND bnProc_gen_128 .
DEPENDS bnProc_gen_128
COMMENT "Generating LDPC bnProc header files for 128-bit SIMD"
)
add_custom_target(bnProc_gen_128_files DEPENDS ${bnProc128_headers} ${bnProcPc128_headers})
add_library(bnProc_gen_avx2_HEADERS INTERFACE)
target_include_directories(bnProc_gen_avx2_HEADERS INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
add_dependencies(bnProc_gen_avx2_HEADERS bnProc_gen_avx2_files)
add_library(bnProc_gen_128_HEADERS INTERFACE)
target_include_directories(bnProc_gen_128_HEADERS INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
add_dependencies(bnProc_gen_128_HEADERS bnProc_gen_128_files)
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "../../nrLDPCdecoder_defs.h"
#include "../../nrLDPC_types.h"
void nrLDPC_bnProcPc_BG1_generator_128(const char *dir, int R)
{
const char *ratestr[3]={"13","23","89"};
if (R<0 || R>2) {printf("Illegal R %d\n",R); abort();}
// system("mkdir -p ../ldpc_gen_files");
char fname[FILENAME_MAX+1];
snprintf(fname, sizeof(fname), "%s/bnProcPc128/nrLDPC_bnProcPc_BG1_R%s_128.h", dir, ratestr[R]);
FILE *fd=fopen(fname,"w");
if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
fprintf(fd,"#include <stdint.h>\n");
fprintf(fd,"#include \"PHY/sse_intrin.h\"\n");
fprintf(fd,"static inline void nrLDPC_bnProcPc_BG1_R%s_128(int8_t* bnProcBuf,int8_t* bnProcBufRes,int8_t* llrRes , int8_t* llrProcBuf, uint16_t Z ) {\n",ratestr[R]);
const uint8_t* lut_numBnInBnGroups;
const uint32_t* lut_startAddrBnGroups;
const uint16_t* lut_startAddrBnGroupsLlr;
if (R==0) {
lut_numBnInBnGroups = lut_numBnInBnGroups_BG1_R13;
lut_startAddrBnGroups = lut_startAddrBnGroups_BG1_R13;
lut_startAddrBnGroupsLlr = lut_startAddrBnGroupsLlr_BG1_R13;
}
else if (R==1){
lut_numBnInBnGroups = lut_numBnInBnGroups_BG1_R23;
lut_startAddrBnGroups = lut_startAddrBnGroups_BG1_R23;
lut_startAddrBnGroupsLlr = lut_startAddrBnGroupsLlr_BG1_R23;
}
else if (R==2) {
lut_numBnInBnGroups = lut_numBnInBnGroups_BG1_R89;
lut_startAddrBnGroups = lut_startAddrBnGroups_BG1_R89;
lut_startAddrBnGroupsLlr = lut_startAddrBnGroupsLlr_BG1_R89;
}
else { printf("aborting, illegal R %d\n",R); fclose(fd);abort();}
// Number of BNs in Groups
uint32_t k;
// Offset to each bit within a group in terms of 32 Byte
uint32_t cnOffsetInGroup;
uint8_t idxBnGroup = 0;
fprintf(fd," // Process group with 1 CN\n");
fprintf(fd," uint32_t M = (%d*Z + 15)>>4;\n",lut_numBnInBnGroups[0]);
fprintf(fd," simde__m128i* p_bnProcBuf = (simde__m128i*) &bnProcBuf [%u];\n", lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," simde__m128i* p_bnProcBufRes = (simde__m128i*) &bnProcBufRes [%u];\n", lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," simde__m128i* p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," simde__m128i* p_llrRes = (simde__m128i*) &llrRes [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," simde__m128i ymm0, ymm1, ymmRes0, ymmRes1;\n");
fprintf(fd," for (int i=0;i<M;i++) {\n");
fprintf(fd," p_bnProcBufRes[i] = p_llrProcBuf[i];\n");
fprintf(fd," ymm0 = simde_mm_cvtepi8_epi16(p_bnProcBuf [i]);\n");
fprintf(fd," ymm1 = simde_mm_cvtepi8_epi16(p_llrProcBuf[i]);\n");
fprintf(fd," ymmRes0 = simde_mm_adds_epi16(ymm0, ymm1);\n");
fprintf(fd," ymm0 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_bnProcBuf [i],8));\n");
fprintf(fd," ymm1 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_llrProcBuf[i],8));\n");
fprintf(fd," ymmRes1 = simde_mm_adds_epi16(ymm0, ymm1);\n");
fprintf(fd," *p_llrRes = simde_mm_packs_epi16(ymmRes0, ymmRes1);\n");
fprintf(fd," p_llrRes++;\n");
fprintf(fd," }\n");
for (uint32_t cnidx=1;cnidx<30;cnidx++) {
// Process group with 4 CNs
if (lut_numBnInBnGroups[cnidx] > 0)
{
// If elements in group move to next address
idxBnGroup++;
fprintf(fd," M = (%d*Z + 15)>>4;\n",lut_numBnInBnGroups[cnidx]);
// Set the offset to each CN within a group in terms of 16 Byte
cnOffsetInGroup = (lut_numBnInBnGroups[cnidx]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (simde__m128i*) &bnProcBuf [%u];\n", lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (simde__m128i*) &llrRes [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
fprintf(fd," for (int i=0;i<M;i++) {\n");
// First 16 LLRs of first CN
fprintf(fd," ymmRes0 = simde_mm_cvtepi8_epi16(p_bnProcBuf [i]);\n");
fprintf(fd," ymmRes1 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_bnProcBuf [i],8));\n");
// Loop over CNs
for (k=1; k<=cnidx; k++)
{
fprintf(fd," ymm0 = simde_mm_cvtepi8_epi16(p_bnProcBuf[%u + i]);\n", k * cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_bnProcBuf[%u + i],8));\n", k * cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm_adds_epi16(ymmRes1, ymm1); \n");
}
// Add LLR from receiver input
fprintf(fd," ymm0 = simde_mm_cvtepi8_epi16(p_llrProcBuf[i]);\n");
fprintf(fd," ymmRes0 = simde_mm_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_llrProcBuf[i],8));\n");
fprintf(fd," ymmRes1 = simde_mm_adds_epi16(ymmRes1, ymm1);\n");
// Pack results back to epi8
fprintf(fd," *p_llrRes = simde_mm_packs_epi16(ymmRes0, ymmRes1);\n");
fprintf(fd," p_llrRes++;\n");
fprintf(fd," }\n");
}
}
fprintf(fd,"}\n");
fclose(fd);
}//end of the function nrLDPC_bnProcPc_BG1
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include <stdio.h>
#include <stdint.h>
#include "PHY/sse_intrin.h"
#include "../../nrLDPCdecoder_defs.h"
#include "../../nrLDPC_types.h"
void nrLDPC_bnProcPc_BG2_generator_128(const char *dir, int R)
{
const char *ratestr[3]={"15","13","23"};
if (R<0 || R>2) {printf("Illegal R %d\n",R); abort();}
// system("mkdir -p ../ldpc_gen_files");
char fname[FILENAME_MAX+1];
snprintf(fname, sizeof(fname), "%s/bnProcPc128/nrLDPC_bnProcPc_BG2_R%s_128.h", dir, ratestr[R]);
FILE *fd=fopen(fname,"w");
if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
fprintf(fd,"#include <stdint.h>\n");
fprintf(fd,"#include \"PHY/sse_intrin.h\"\n");
fprintf(fd,"static inline void nrLDPC_bnProcPc_BG2_R%s_128(int8_t* bnProcBuf,int8_t* bnProcBufRes,int8_t* llrRes , int8_t* llrProcBuf, uint16_t Z ) {\n",ratestr[R]);
const uint8_t* lut_numBnInBnGroups;
const uint32_t* lut_startAddrBnGroups;
const uint16_t* lut_startAddrBnGroupsLlr;
if (R==0) {
lut_numBnInBnGroups = lut_numBnInBnGroups_BG2_R15;
lut_startAddrBnGroups = lut_startAddrBnGroups_BG2_R15;
lut_startAddrBnGroupsLlr = lut_startAddrBnGroupsLlr_BG2_R15;
}
else if (R==1){
lut_numBnInBnGroups = lut_numBnInBnGroups_BG2_R13;
lut_startAddrBnGroups = lut_startAddrBnGroups_BG2_R13;
lut_startAddrBnGroupsLlr = lut_startAddrBnGroupsLlr_BG2_R13;
}
else if (R==2) {
lut_numBnInBnGroups = lut_numBnInBnGroups_BG2_R23;
lut_startAddrBnGroups = lut_startAddrBnGroups_BG2_R23;
lut_startAddrBnGroupsLlr = lut_startAddrBnGroupsLlr_BG2_R23;
}
else { printf("aborting, illegal R %d\n",R); fclose(fd);abort();}
// Number of BNs in Groups
uint32_t k;
// Offset to each bit within a group in terms of 32 Byte
uint32_t cnOffsetInGroup;
uint8_t idxBnGroup = 0;
fprintf(fd," // Process group with 1 CN\n");
fprintf(fd," uint32_t M = (%d*Z + 15)>>4;\n",lut_numBnInBnGroups[0]);
fprintf(fd," simde__m128i* p_bnProcBuf = (simde__m128i*) &bnProcBuf [%u];\n", lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," simde__m128i* p_bnProcBufRes = (simde__m128i*) &bnProcBufRes [%u];\n", lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," simde__m128i* p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," simde__m128i* p_llrRes = (simde__m128i*) &llrRes [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," simde__m128i ymm0, ymm1, ymmRes0, ymmRes1;\n");
fprintf(fd," for (int i=0;i<M;i++) {\n");
fprintf(fd," p_bnProcBufRes[i] = p_llrProcBuf[i];\n");
fprintf(fd," ymm0 = simde_mm_cvtepi8_epi16(p_bnProcBuf [i]);\n");
fprintf(fd," ymm1 = simde_mm_cvtepi8_epi16(p_llrProcBuf[i]);\n");
fprintf(fd," ymmRes0 = simde_mm_adds_epi16(ymm0, ymm1);\n");
fprintf(fd," ymm0 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_bnProcBuf [i],8));\n");
fprintf(fd," ymm1 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_llrProcBuf[i],8));\n");
fprintf(fd," ymmRes1 = simde_mm_adds_epi16(ymm0, ymm1);\n");
fprintf(fd," *p_llrRes = simde_mm_packs_epi16(ymmRes0, ymmRes1);\n");
fprintf(fd," p_llrRes++;\n");
fprintf(fd," }\n");
for (uint32_t cnidx=1;cnidx<30;cnidx++) {
// Process group with 4 CNs
if (lut_numBnInBnGroups[cnidx] > 0)
{
// If elements in group move to next address
idxBnGroup++;
fprintf(fd," M = (%d*Z + 15)>>4;\n",lut_numBnInBnGroups[cnidx]);
// Set the offset to each CN within a group in terms of 16 Byte
cnOffsetInGroup = (lut_numBnInBnGroups[cnidx]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (simde__m128i*) &bnProcBuf [%u];\n", lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (simde__m128i*) &llrProcBuf [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (simde__m128i*) &llrRes [%d];\n", lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
fprintf(fd," for (int i=0;i<M;i++) {\n");
// First 16 LLRs of first CN
fprintf(fd," ymmRes0 = simde_mm_cvtepi8_epi16(p_bnProcBuf [i]);\n");
fprintf(fd," ymmRes1 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_bnProcBuf [i],8));\n");
// Loop over CNs
for (k=1; k<=cnidx; k++)
{
fprintf(fd," ymm0 = simde_mm_cvtepi8_epi16(p_bnProcBuf[%u + i]);\n", k * cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_bnProcBuf[%u + i],8));\n", k * cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm_adds_epi16(ymmRes1, ymm1); \n");
}
// Add LLR from receiver input
fprintf(fd," ymm0 = simde_mm_cvtepi8_epi16(p_llrProcBuf[i]);\n");
fprintf(fd," ymmRes0 = simde_mm_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm_cvtepi8_epi16(simde_mm_srli_si128(p_llrProcBuf[i],8));\n");
fprintf(fd," ymmRes1 = simde_mm_adds_epi16(ymmRes1, ymm1);\n");
// Pack results back to epi8
fprintf(fd," *p_llrRes = simde_mm_packs_epi16(ymmRes0, ymmRes1);\n");
fprintf(fd," p_llrRes++;\n");
fprintf(fd," }\n");
}
}
fprintf(fd,"}\n");
fclose(fd);
}//end of the function nrLDPC_bnProcPc_BG2
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include <stdio.h>
#include <stdint.h>
#define NB_R 3
void nrLDPC_bnProc_BG1_generator_AVX2(const char*, int);
void nrLDPC_bnProc_BG2_generator_AVX2(const char*, int);
void nrLDPC_bnProcPc_BG1_generator_AVX2(const char*, int);
void nrLDPC_bnProcPc_BG2_generator_AVX2(const char*, int);
const char *__asan_default_options()
{
/* don't do leak checking in nr_ulsim, creates problems in the CI */
return "detect_leaks=0";
}
int main(int argc, char *argv[])
{
if (argc != 2) {
fprintf(stderr, "usage: %s <output-dir>\n", argv[0]);
return 1;
}
const char *dir = argv[1];
int R[NB_R]={0,1,2};
for(int i=0; i<NB_R;i++){
nrLDPC_bnProc_BG1_generator_AVX2(dir, R[i]);
nrLDPC_bnProc_BG2_generator_AVX2(dir, R[i]);
nrLDPC_bnProcPc_BG1_generator_AVX2(dir, R[i]);
nrLDPC_bnProcPc_BG2_generator_AVX2(dir, R[i]);
}
return(0);
}
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include <stdio.h>
#include <stdint.h>
#define NB_R 3
void nrLDPC_bnProc_BG1_generator_128(const char*, int);
void nrLDPC_bnProc_BG2_generator_128(const char*, int);
void nrLDPC_bnProcPc_BG1_generator_128(const char*, int);
void nrLDPC_bnProcPc_BG2_generator_128(const char*, int);
const char *__asan_default_options()
{
/* don't do leak checking in nr_ulsim, creates problems in the CI */
return "detect_leaks=0";
}
int main(int argc, char *argv[])
{
if (argc != 2) {
fprintf(stderr, "usage: %s <output-dir>\n", argv[0]);
return 1;
}
const char *dir = argv[1];
int R[NB_R]={0,1,2};
for(int i=0; i<NB_R;i++){
nrLDPC_bnProc_BG1_generator_128(dir, R[i]);
nrLDPC_bnProc_BG2_generator_128(dir, R[i]);
nrLDPC_bnProcPc_BG1_generator_128(dir, R[i]);
nrLDPC_bnProcPc_BG2_generator_128(dir, R[i]);
}
return(0);
}
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
if (CROSS_COMPILE)
find_package(bnProc_gen_avx512)
else()
add_executable(bnProc_gen_avx512
bnProc_gen_BG1_avx512.c
bnProc_gen_BG2_avx512.c
bnProcPc_gen_BG1_avx512.c
bnProcPc_gen_BG2_avx512.c
main.c)
target_compile_options(bnProc_gen_avx512 PRIVATE -W -Wall )
export(TARGETS bnProc_gen_avx512 FILE
"${CMAKE_BINARY_DIR}/bnProc_gen_avx512Config.cmake")
endif ()
set(bnProc_avx512_headers
bnProc_avx512/nrLDPC_bnProc_BG1_R13_AVX512.h
bnProc_avx512/nrLDPC_bnProc_BG1_R23_AVX512.h
bnProc_avx512/nrLDPC_bnProc_BG1_R89_AVX512.h
bnProc_avx512/nrLDPC_bnProc_BG2_R13_AVX512.h
bnProc_avx512/nrLDPC_bnProc_BG2_R15_AVX512.h
bnProc_avx512/nrLDPC_bnProc_BG2_R23_AVX512.h)
set(bnProcPc_avx512_headers
bnProcPc_avx512/nrLDPC_bnProcPc_BG1_R13_AVX512.h
bnProcPc_avx512/nrLDPC_bnProcPc_BG1_R23_AVX512.h
bnProcPc_avx512/nrLDPC_bnProcPc_BG1_R89_AVX512.h
bnProcPc_avx512/nrLDPC_bnProcPc_BG2_R13_AVX512.h
bnProcPc_avx512/nrLDPC_bnProcPc_BG2_R15_AVX512.h
bnProcPc_avx512/nrLDPC_bnProcPc_BG2_R23_AVX512.h)
add_custom_command(
# TARGET bnProc_gen_avx512 POST_BUILD
OUTPUT ${bnProc_avx512_headers} ${bnProcPc_avx512_headers}
COMMAND ${CMAKE_COMMAND} -E make_directory bnProc_avx512
COMMAND ${CMAKE_COMMAND} -E make_directory bnProcPc_avx512
COMMAND bnProc_gen_avx512 .
DEPENDS bnProc_gen_avx512
COMMENT "Generating LDPC bnProc header files for AVX512"
)
add_custom_target(bnProc_gen_avx512_files DEPENDS ${bnProc_avx512_headers} ${bnProcPc_avx512_headers})
add_library(bnProc_gen_avx512_HEADERS INTERFACE)
target_include_directories(bnProc_gen_avx512_HEADERS INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
add_dependencies(bnProc_gen_avx512_HEADERS bnProc_gen_avx512_files)
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define NB_R 3
void nrLDPC_bnProc_BG1_generator_AVX512(const char *, int);
void nrLDPC_bnProc_BG2_generator_AVX512(const char *, int);
void nrLDPC_bnProcPc_BG1_generator_AVX512(const char *, int);
void nrLDPC_bnProcPc_BG2_generator_AVX512(const char *, int);
const char *__asan_default_options()
{
/* don't do leak checking in nr_ulsim, creates problems in the CI */
return "detect_leaks=0";
}
int main(int argc, char *argv[])
{
if (argc != 2) {
fprintf(stderr, "usage: %s <output-dir>\n", argv[0]);
return 1;
}
const char *dir = argv[1];
int R[NB_R]={0,1,2};
for(int i=0; i<NB_R;i++){
nrLDPC_bnProc_BG1_generator_AVX512(dir, R[i]);
nrLDPC_bnProc_BG2_generator_AVX512(dir, R[i]);
nrLDPC_bnProcPc_BG1_generator_AVX512(dir, R[i]);
nrLDPC_bnProcPc_BG2_generator_AVX512(dir, R[i]);
}
return(0);
}
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
if (CROSS_COMPILE)
find_package(cnProc_gen_128)
find_package(cnProc_gen_avx2)
else()
add_executable(cnProc_gen_avx2
cnProc_gen_BG1_avx2.c
cnProc_gen_BG2_avx2.c
main.c)
add_executable(cnProc_gen_128
cnProc_gen_BG1_128.c
cnProc_gen_BG2_128.c
main128.c)
target_compile_options(cnProc_gen_avx2 PRIVATE -W -Wall )
target_compile_options(cnProc_gen_128 PRIVATE -W -Wall )
export(TARGETS cnProc_gen_avx2 FILE
"${CMAKE_BINARY_DIR}/cnProc_gen_avx2Config.cmake")
export(TARGETS cnProc_gen_128 FILE
"${CMAKE_BINARY_DIR}/cnProc_gen_128Config.cmake")
endif()
set(cnProc_headers
cnProc/nrLDPC_cnProc_BG1_R13_AVX2.h
cnProc/nrLDPC_cnProc_BG1_R23_AVX2.h
cnProc/nrLDPC_cnProc_BG1_R89_AVX2.h
cnProc/nrLDPC_cnProc_BG2_R13_AVX2.h
cnProc/nrLDPC_cnProc_BG2_R15_AVX2.h
cnProc/nrLDPC_cnProc_BG2_R23_AVX2.h)
set(cnProc128_headers
cnProc/nrLDPC_cnProc_BG1_R13_128.h
cnProc/nrLDPC_cnProc_BG1_R23_128.h
cnProc/nrLDPC_cnProc_BG1_R89_128.h
cnProc/nrLDPC_cnProc_BG2_R13_128.h
cnProc/nrLDPC_cnProc_BG2_R15_128.h
cnProc/nrLDPC_cnProc_BG2_R23_128.h)
add_custom_command(
# TARGET cnProc_gen_avx2 POST_BUILD
OUTPUT ${cnProc_headers}
COMMAND ${CMAKE_COMMAND} -E make_directory cnProc
COMMAND cnProc_gen_avx2 .
DEPENDS cnProc_gen_avx2
COMMENT "Generating LDPC cnProc header files for AVX2"
)
add_custom_target(cnProc_gen_avx2_files DEPENDS ${cnProc_headers})
add_custom_command(
# TARGET cnProc_gen_128 POST_BUILD
OUTPUT ${cnProc128_headers}
COMMAND ${CMAKE_COMMAND} -E make_directory cnProc128
COMMAND cnProc_gen_128 .
DEPENDS cnProc_gen_128
COMMENT "Generating LDPC cnProc header files for 128-bit SIMD"
)
add_custom_target(cnProc_gen_128_files DEPENDS ${cnProc128_headers})
add_library(cnProc_gen_avx2_HEADERS INTERFACE)
target_include_directories(cnProc_gen_avx2_HEADERS INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
add_dependencies(cnProc_gen_avx2_HEADERS cnProc_gen_avx2_files)
add_library(cnProc_gen_128_HEADERS INTERFACE)
target_include_directories(cnProc_gen_128_HEADERS INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
add_dependencies(cnProc_gen_128_HEADERS cnProc_gen_128_files)
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include <stdio.h>
#include <stdint.h>
#define NB_R 3
void nrLDPC_cnProc_BG1_generator_AVX2(const char*, int);
void nrLDPC_cnProc_BG2_generator_AVX2(const char*, int);
const char *__asan_default_options()
{
/* don't do leak checking in nr_ulsim, creates problems in the CI */
return "detect_leaks=0";
}
int main(int argc, char *argv[])
{
if (argc != 2) {
fprintf(stderr, "usage: %s <output-dir>\n", argv[0]);
return 1;
}
const char *dir = argv[1];
int R[NB_R]={0,1,2};
for(int i=0; i<NB_R;i++) {
nrLDPC_cnProc_BG1_generator_AVX2(dir, R[i]);
nrLDPC_cnProc_BG2_generator_AVX2(dir, R[i]);
}
return(0);
}
#!/bin/bash
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
echo "to build the LDPC decoder headers: go to the build directory, and type"
echo "make/ninja ldpc_generators"
echo
echo "assuming your build directory is ran_build/build, I trigger building for"
echo "you now. The generated headers will be in ran_build/build/ldpc/generator_*/"
echo
cd $OPENAIR_HOME/cmake_targets/ran_build/build
make ldpc_generators || ninja ldpc_generators
This diff is collapsed.
...@@ -28,6 +28,8 @@ void nr_init_dl_harq_processes(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_HARQ_PROCESSE ...@@ -28,6 +28,8 @@ void nr_init_dl_harq_processes(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_HARQ_PROCESSE
void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx); void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx);
void free_nr_ue_dl_harq(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_HARQ_PROCESSES], int number_of_processes, int num_rb); void free_nr_ue_dl_harq(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_HARQ_PROCESSES], int number_of_processes, int num_rb);
void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx); void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx);
void nr_init_pdsch_buffers(pdsch_scratch_t *buffers, int num_actors, const NR_DL_FRAME_PARMS *fp);
void free_nr_ue_pdsch_buffers(pdsch_scratch_t *buffers, int num_actors);
void phy_init_nr_top(PHY_VARS_NR_UE *ue); void phy_init_nr_top(PHY_VARS_NR_UE *ue);
void phy_term_nr_top(void); void phy_term_nr_top(void);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment