From aed2e6c7fb8f950ac7623530d856b6c1bba96b6a Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 22 Nov 2024 11:43:12 +0100 Subject: [PATCH 01/54] improvements in PRACH parameters in 5G configuration files --- ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf | 4 ++-- ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf | 2 +- ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf | 2 +- ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf | 4 ++-- .../conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf | 2 +- .../conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf | 2 +- .../conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf | 2 +- .../conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf | 2 +- .../conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf | 2 +- ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf | 4 ++-- .../conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf | 4 ++-- ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf | 4 ++-- ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf | 2 +- ci-scripts/conf_files/gnb.sa.band66.ntn.25prb.rfsim.conf | 2 +- ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf | 2 +- .../conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf | 4 ++-- .../conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf | 4 ++-- .../conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf | 4 ++-- .../conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf | 4 ++-- ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf | 4 ++-- ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf | 4 ++-- .../conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf | 4 ++-- .../conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf | 2 +- ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml | 4 ++-- ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf | 4 ++-- .../conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf | 2 +- .../conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf | 4 ++-- .../conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf | 4 ++-- ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf | 2 +- .../gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf | 6 +++--- ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf | 4 ++-- .../conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf | 6 +++--- ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf | 6 +++--- ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf | 2 +- doc/testing_gnb_w_cots_ue_resources/gnb.conf | 2 +- 35 files changed, 58 insertions(+), 58 deletions(-) diff --git a/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf b/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf index adf5b4ab14..e3ba0b881e 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band1.52prb.usrpb210.conf @@ -91,8 +91,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf index 679af4bc9e..fce5e6dc6e 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf @@ -90,7 +90,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf index b9823cd5b6..abce64a0c6 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf @@ -92,7 +92,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf index a38355ecea..b3570f4d13 100644 --- a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf +++ b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf @@ -116,8 +116,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf b/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf index 24d3fc094f..b1d2d6d724 100644 --- a/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf @@ -90,7 +90,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf index b3ed318aa7..e49f8c422a 100644 --- a/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf @@ -89,7 +89,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf index 4693bc2970..9c75dbe871 100644 --- a/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf @@ -89,7 +89,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf index b677f617eb..79e9fb5402 100644 --- a/ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf @@ -89,7 +89,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf index e8ccac378b..e0c7b78247 100644 --- a/ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf @@ -91,7 +91,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf index 5747b6baa1..37eaa80b8c 100644 --- a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpb200.conf @@ -84,8 +84,8 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; +#one (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 ra_ContentionResolutionTimer = 7; diff --git a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf index 8c7ae493aa..a7900e5e41 100644 --- a/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf @@ -89,8 +89,8 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; +#one (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 ra_ContentionResolutionTimer = 7; diff --git a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf index ee34e315bb..7cc7a9e3f9 100644 --- a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf @@ -88,8 +88,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf index fed2aea45f..6c8ee24c1b 100644 --- a/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band66.106prb.rfsim.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band66.ntn.25prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band66.ntn.25prb.rfsim.conf index 8731d00eb0..5e33d3fa61 100644 --- a/ci-scripts/conf_files/gnb.sa.band66.ntn.25prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band66.ntn.25prb.rfsim.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf index 0b3f3d58aa..f51bb977e0 100644 --- a/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf index fa1625fcf2..b0647e8e5f 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf @@ -91,8 +91,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf index d9aec14092..fef0f5a812 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf @@ -93,8 +93,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf index c9e51c352b..b539209800 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf @@ -95,8 +95,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf index 7cc6a172aa..d14493376f 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf @@ -91,8 +91,8 @@ gNBs = ( ra_ResponseWindow = 4; # ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR # 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; - # oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; + # one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; # ra_ContentionResolutionTimer # (0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf index e1ca5abff0..0941d931e6 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf @@ -97,8 +97,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf index ceb40487de..9627a48d87 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf @@ -91,8 +91,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf index 8e7f52a931..12a86c3e64 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf @@ -85,8 +85,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; - #oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; + #one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf index 8894867701..d21fd935d8 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf @@ -94,7 +94,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml index c4189ec9a7..7b75481634 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml @@ -77,8 +77,8 @@ gNBs: ra_ResponseWindow: 5 #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 3 - #oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 + #one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 15 #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf index dd9add6550..4f546e7f30 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrp310.2x2.conf @@ -90,8 +90,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf index fc21991b67..824c0a8cc2 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf @@ -84,7 +84,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf index b41ea46c42..05e6c5c67d 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.usrpn310.ddsuu-2x2.conf @@ -103,8 +103,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf index eda8b0dad6..aa7e011ef2 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.162prb.usrpn310.2x2.conf @@ -104,8 +104,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf index fa12bd78c2..e6baa257bc 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf @@ -86,7 +86,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf index acb000e7c3..a878c46236 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf @@ -82,7 +82,7 @@ gNBs = initialULBWPsubcarrierSpacing = 1; #rach-ConfigCommon #rach-ConfigGeneric - prach_ConfigurationIndex = 151; + prach_ConfigurationIndex = 152; #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; @@ -99,8 +99,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf index a722ef02bf..f158cb42bb 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf @@ -88,8 +88,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf index 1c89d257d9..fc90aa6a88 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf @@ -75,7 +75,7 @@ gNBs = initialULBWPsubcarrierSpacing = 1; #rach-ConfigCommon #rach-ConfigGeneric - prach_ConfigurationIndex = 100; + prach_ConfigurationIndex = 101; #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; @@ -92,8 +92,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf index 16a9ecfb93..143a1455e3 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf @@ -75,7 +75,7 @@ gNBs = initialULBWPsubcarrierSpacing = 1; #rach-ConfigCommon #rach-ConfigGeneric - prach_ConfigurationIndex = 100; + prach_ConfigurationIndex = 101; #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; @@ -92,8 +92,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf index c2ac243178..eb3289d333 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf @@ -84,7 +84,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/doc/testing_gnb_w_cots_ue_resources/gnb.conf b/doc/testing_gnb_w_cots_ue_resources/gnb.conf index 23d649babe..44d339c951 100755 --- a/doc/testing_gnb_w_cots_ue_resources/gnb.conf +++ b/doc/testing_gnb_w_cots_ue_resources/gnb.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 From 46fe1115adbe17c146256b98e789f1cbb6e66e58 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 2 Dec 2024 10:38:57 +0100 Subject: [PATCH 02/54] improving also 7.2 files in targets --- ...nb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf | 13 +++---------- ...u.sa.band77.273prb.fhi72.8x8-benetel650_650.conf | 13 +++---------- .../CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf | 11 ++--------- .../CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf | 11 ++--------- .../CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf | 11 ++--------- .../gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf | 13 +++---------- .../gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf | 13 +++---------- .../CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf | 11 ++--------- .../gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf | 12 +++--------- 9 files changed, 23 insertions(+), 85 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf index 10decbaf1d..a267d2e864 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf @@ -27,13 +27,6 @@ gNBs = force_UL256qam_off = 1; # maxMIMO_layers = 2; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon @@ -83,7 +76,7 @@ gNBs = initialULBWPsubcarrierSpacing = 1; #rach-ConfigCommon #rach-ConfigGeneric - prach_ConfigurationIndex = 151; + prach_ConfigurationIndex = 152; #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; @@ -100,8 +93,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf index 79c6e02f30..18f885945f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf @@ -27,13 +27,6 @@ gNBs = force_UL256qam_off = 1; maxMIMO_layers = 2; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon @@ -83,7 +76,7 @@ gNBs = initialULBWPsubcarrierSpacing = 1; #rach-ConfigCommon #rach-ConfigGeneric - prach_ConfigurationIndex = 151; + prach_ConfigurationIndex = 152; #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; @@ -100,8 +93,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf index c92bf1d0ce..a5b059bcfa 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf @@ -25,13 +25,6 @@ gNBs = do_SRS = 0; sib1_tda = 15; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon @@ -98,8 +91,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf index d4ce05b5d5..a1cc7a9685 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf @@ -23,13 +23,6 @@ gNBs = do_SRS = 0; sib1_tda = 15; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon @@ -96,8 +89,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf index 86079fd7c4..50fedbb5c2 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf @@ -25,13 +25,6 @@ gNBs = do_SRS = 0; sib1_tda = 15; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon @@ -98,8 +91,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf index a159cd5f9b..b66012c619 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf @@ -24,13 +24,6 @@ gNBs = sib1_tda = 15; # force_UL256qam_off = 1; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon @@ -80,7 +73,7 @@ gNBs = initialULBWPsubcarrierSpacing = 1; #rach-ConfigCommon #rach-ConfigGeneric - prach_ConfigurationIndex = 151; + prach_ConfigurationIndex = 152; #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; @@ -97,8 +90,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf index 23da52e1f9..3d584fdaba 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf @@ -26,13 +26,6 @@ gNBs = sib1_tda = 15; # force_UL256qam_off = 1; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon @@ -82,7 +75,7 @@ gNBs = initialULBWPsubcarrierSpacing = 1; #rach-ConfigCommon #rach-ConfigGeneric - prach_ConfigurationIndex = 151; + prach_ConfigurationIndex = 152; #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; @@ -99,8 +92,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf index cd994b246a..465bb6d71e 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf @@ -25,13 +25,6 @@ gNBs = do_SRS = 0; sib1_tda = 15; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon @@ -98,8 +91,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf index 00ca853c6d..d9ba0f24b5 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf @@ -23,12 +23,6 @@ gNBs = force_UL256qam_off = 1; # sib1_tda = 15; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 12; - searchSpaceZero = 0; - } - ); servingCellConfigCommon = ( { #spCellConfigCommon @@ -76,7 +70,7 @@ gNBs = initialULBWPsubcarrierSpacing = 1; #rach-ConfigCommon #rach-ConfigGeneric - prach_ConfigurationIndex = 151; + prach_ConfigurationIndex = 148; #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; @@ -93,8 +87,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 From e5675d38bfd5a7987fa47d72e206bd0408369448 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 2 Dec 2024 10:44:01 +0100 Subject: [PATCH 03/54] further cleanup of config files pdcch_ConfigSIB1 field not used since almost two years but still kept in some config file --- .../conf_files/gnb-vnf.sa.band78.273prb.aerial.conf | 7 ------- .../conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf | 7 ------- .../conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf | 8 -------- .../conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf | 6 ------ .../gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf | 7 ------- .../CONF/gnb-vnf.sa.band78.273prb.aerial.conf | 7 ------- .../GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf | 7 ------- 7 files changed, 49 deletions(-) diff --git a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf index b3570f4d13..2d2120b038 100644 --- a/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf +++ b/ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf @@ -35,13 +35,6 @@ gNBs = do_SRS = 0; min_rxtxtime = 2; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 12; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf index b539209800..4641cf8742 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf @@ -24,13 +24,6 @@ gNBs = do_CSIRS = 1; do_SRS = 0; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf index 0941d931e6..d92f096f24 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf @@ -26,14 +26,6 @@ gNBs = pdsch_AntennaPorts_XP = 1; pusch_AntennaPorts = 1; - - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 12; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf index d21fd935d8..e4f7d91900 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf @@ -21,12 +21,6 @@ gNBs = do_CSIRS = 0; do_SRS = 0; min_rxtxtime = 6; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 12; - searchSpaceZero = 0; - } - ); servingCellConfigCommon = ( { diff --git a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf index a878c46236..6a3c31e71a 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf @@ -26,13 +26,6 @@ gNBs = sib1_tda = 15; # force_UL256qam_off = 1; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 11; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf index b149913224..390d4a2ccf 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf @@ -36,13 +36,6 @@ gNBs = do_SRS = 0; min_rxtxtime = 3; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 12; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf index 8a058b9f92..1de13af195 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf @@ -26,13 +26,6 @@ gNBs = do_SRS = 0; min_rxtxtime = 3; - pdcch_ConfigSIB1 = ( - { - controlResourceSetZero = 12; - searchSpaceZero = 0; - } - ); - servingCellConfigCommon = ( { #spCellConfigCommon From 4d6b3f8c307560bf174a8ece7148fb2c2cda2e6e Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 2 Dec 2024 10:50:05 +0100 Subject: [PATCH 04/54] removing unused bf_weights from a config file --- ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf index fef0f5a812..ba427f747e 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf @@ -210,8 +210,6 @@ RUs = ( max_pdschReferenceSignalPower = -27; max_rxgain = 75; eNB_instances = [0]; - ##beamforming 1x2 matrix: 1 layer x 2 antennas - bf_weights = [0x00007fff, 0x0000, 0x00007fff, 0x0000]; #clock_src = "internal"; sdr_addrs = "addr=192.168.80.53, clock_source=internal,time_source=internal" From 7b61ebcb74f890938c2a3938945f149e28b2115a Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 6 Dec 2024 18:20:07 +0100 Subject: [PATCH 05/54] fixing ssb_perRACH_Occasion in targets SA files --- targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf | 2 +- .../CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf | 2 +- .../CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf | 2 +- .../CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf | 2 +- .../CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf | 2 +- .../GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf | 4 ++-- .../PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf | 4 ++-- .../CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf | 4 ++-- .../CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf | 4 ++-- .../GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf | 4 ++-- .../CONF/gnb.sa.band254.ntn.mu0.25prb.rfsim.conf | 2 +- .../CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf | 2 +- .../CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf | 2 +- .../CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf | 2 +- .../CONF/gnb.sa.band257.u3.32prb.usrpx410.conf | 4 ++-- .../CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 2 +- .../CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf | 2 +- .../CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf | 2 +- .../CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf | 2 +- .../CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf | 2 +- .../CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf | 2 +- .../CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf | 4 ++-- .../CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf | 4 ++-- .../CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf | 2 +- .../CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf | 4 ++-- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf | 2 +- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 2 +- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf | 2 +- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml | 2 +- .../CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf | 4 ++-- .../CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf | 4 ++-- .../CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf | 2 +- .../CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf | 4 ++-- .../CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf | 4 ++-- .../CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf | 5 +++-- .../CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf | 4 ++-- .../GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf | 2 +- 37 files changed, 53 insertions(+), 52 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf index b5fd259b9c..02b1e89b88 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf @@ -90,7 +90,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf index abd624747d..c2e28725bd 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci0.conf @@ -89,7 +89,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf index 8d2e46b44e..c5c84c9919 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band66.25prb.rfsim.pci1.conf @@ -89,7 +89,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf index 2e0f721504..d4f7f82c74 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf @@ -86,7 +86,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf index 8e939887ce..ff1de3cc21 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf @@ -86,7 +86,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf index 390d4a2ccf..aa7c380e51 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.273prb.aerial.conf @@ -110,8 +110,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf index 1de13af195..5f2293cfb9 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.cbrs.aerial.conf @@ -92,8 +92,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf index 66fca54e6c..b958ed809d 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf @@ -119,8 +119,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf index a71fd9a896..a7010921bb 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf @@ -123,8 +123,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf index 1c15b40967..e270dd690d 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band1.u0.52PRB.usrpb210.conf @@ -86,8 +86,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu0.25prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu0.25prb.rfsim.conf index 274f31db46..b206be672a 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu0.25prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu0.25prb.rfsim.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf index a84bf9c88f..60489ea6c2 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band254.ntn.mu1.24prb.rfsim.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf index 98cd0fb66b..edcee7ee98 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band255.ntn.mu0.25prb.rfsim.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf index 221b6b0c89..67f8eb6e85 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band256.ntn.mu0.25prb.rfsim.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf index d12752130f..667b15b10f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf @@ -89,8 +89,8 @@ gNBs = ra_ResponseWindow = 5; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index a8c6eca533..f9a0dfc372 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -85,7 +85,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf index 6ef35cb6c8..b72ca5dc32 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf @@ -91,7 +91,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf index 5690be2f0c..1d9693edb1 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf @@ -86,7 +86,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf index af96da5b28..b666616764 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpx300.conf @@ -102,7 +102,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf index 8dd8985ca3..144e7d042b 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.24PRB.usrpx300.conf @@ -104,7 +104,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf index ebf9279bbd..7f92bd1a3b 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf @@ -104,7 +104,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf index 0cef16488b..f4c31e3ee7 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf @@ -90,8 +90,8 @@ gNBs = ( ra_ResponseWindow = 4; # ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR # 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; - # oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; + # one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; # ra_ContentionResolutionTimer # (0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf index f986b9ac44..fcda4d3cc0 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.usrpx300.conf @@ -90,8 +90,8 @@ gNBs = ( ra_ResponseWindow = 4; # ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR # 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; - # oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; + # one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; # ra_ContentionResolutionTimer # (0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf index d59dca9384..24b0e17b1f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf @@ -86,7 +86,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf index 1e1e00b6f2..b4aa830dd5 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf @@ -87,8 +87,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf index 5270ff68d9..d2f9dc0005 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 9d789b9c40..388039579d 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -86,7 +86,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf index 813c864c33..46964ad72d 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf @@ -86,7 +86,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml index 10ae7e92e0..246f8f1bd4 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml @@ -81,7 +81,7 @@ gNBs: #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 - #oneHalf (0..15) 4,8,12,16,...60,64 + #one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 14 #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf index 1985789f5a..129b687c1a 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf @@ -88,8 +88,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf index e995999f46..9802cc0acd 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.217PRB.2x2.usrpn300.conf @@ -87,8 +87,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf index d7cf316b1d..3d81eafd7a 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf @@ -86,7 +86,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf index 8ab5788059..fbc77bf957 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf @@ -87,8 +87,8 @@ gNBs = #1,2,4,8,10,20,40,80 ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#0=oneeighth,1=onefourth,2=half,3=one,4=two,5=four,6=eight,7=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 7; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf index 4fc0b8a387..f0ea334f7e 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf @@ -123,8 +123,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf index bea34d6ed1..143345f275 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band261.fr2.64PRB.usrpx310.conf @@ -87,8 +87,9 @@ gNBs = #1,2,4,8,10,20,40,80 ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#0=oneeighth,1=onefourth,2=half,3=one,4=two,5=four,6=eight,7=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 7; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf index 28d880cf16..c8c1582584 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf @@ -122,8 +122,8 @@ gNBs = ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf index 63ec36174e..72f6192f4a 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/vnf.sa.band78.106prb.rfsim.conf @@ -104,7 +104,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 From 2ff81068efef45fdb1f17f74f7bde37e3994bb8b Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 6 Dec 2024 18:23:10 +0100 Subject: [PATCH 06/54] removing a couple of config files from targets with non conventional names (probably never used) --- .../GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf | 276 ------------------ ...b.band78.tm1.106PRB.usrpn300.gtp-itti.conf | 239 --------------- 2 files changed, 515 deletions(-) delete mode 100755 targets/PROJECTS/GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf delete mode 100644 targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf deleted file mode 100755 index 7dc75f5873..0000000000 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gNB_SA_40_2x2.conf +++ /dev/null @@ -1,276 +0,0 @@ -Active_gNBs = ( "gNB-OAI"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - -# cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-OAI"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({ - mcc = 208; - mnc = 99; - mnc_length = 2; - snssaiList = ( - { - sst = 1; - sd = 0x010203; // 0 false, else true - }, - { - sst = 1; - sd = 0x112233; // 0 false, else true - } - ); - }); - - nr_cellid = 12345678L - -# tr_s_preference = "local_mac" - - ////////// Physical parameters: - - pdsch_AntennaPorts = 1; - pusch_AntennaPorts = 2; - min_rxtxtime_pdsch = 2; - ul_prbblacklist = "51,52,53,54" - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6 - #absoluteFrequencySSB = 620640; - # this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68 - absoluteFrequencySSB = 621312; - # this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2 - #absoluteFrequencySSB = 634080; - # this is 3600.48 MHz - #absoluteFrequencySSB = 640032; - #dl_frequencyBand = 78; - # this is 3301.68 MHz - #dl_absoluteFrequencyPointA = 620112; - # this is 3300.60 MHz - dl_absoluteFrequencyPointA = 620040; - # this is 3502.56 MHz - #dl_absoluteFrequencyPointA = 633552; - # this is 3600.48 MHz - #dl_absoluteFrequencyPointA = 640032; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=0,L=106 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 28875; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 11; - initialDLBWPsearchSpaceZero = 0; - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 28875; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 12; - preambleReceivedTargetPower = -104; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - # pusch-ConfigCommon (up to 16 elements) - initialULBWPk2_0 = 6; - initialULBWPmappingType_0 = 1 - # this is SS=2 L=13 - initialULBWPstartSymbolAndLength_0 = 41; - - initialULBWPk2_1 = 6; - initialULBWPmappingType_1 = 1; - # this is SS=0 L=4 - initialULBWPstartSymbolAndLength_1 = 52; - - initialULBWPk2_2 = 7; - initialULBWPmappingType_2 = 1; - # this is SS=10 L=4 - initialULBWPstartSymbolAndLength_2 = 52; - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; - - ssb_PositionsInBurst_Bitmap = 1; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; - nrofDownlinkSymbols = 6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; - - ssPBCH_BlockPower = -25; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - ////////// AMF parameters: - amf_ip_address = ({ ipv4 = "192.168.69.131"; }); - - NETWORK_INTERFACES : - { - - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.196/24"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.196/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - }; - - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - pusch_TargetSNRx10 = 200; - pucch_TargetSNRx10 = 200; - ulsch_max_slots_inactivity=10; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - pusch_proc_threads = 3; - prach_dtx_threshold = 120; - pucch0_dtx_threshold = 50; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 2 - nb_rx = 2 - att_tx = 0 - att_rx = 0; - bands = [78]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 75; - eNB_instances = [0]; - sdr_addrs = "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=internal,time_source=internal" - } -); - - log_config : - { - global_log_level ="info"; - global_log_verbosity ="medium"; - hw_log_level ="info"; - hw_log_verbosity ="medium"; - phy_log_level ="info"; - phy_log_verbosity ="medium"; - mac_log_level ="info"; - mac_log_verbosity ="high"; - rlc_log_level ="info"; - rlc_log_verbosity ="medium"; - pdcp_log_level ="info"; - pdcp_log_verbosity ="medium"; - rrc_log_level ="info"; - rrc_log_verbosity ="medium"; - f1ap_log_level ="debug"; - f1ap_log_verbosity ="medium"; - }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf deleted file mode 100644 index 7d95cf8a03..0000000000 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf +++ /dev/null @@ -1,239 +0,0 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-Eurecom-5GNRBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 100; - - plmn_list = ({ mcc = 208; mnc = 93; mnc_length = 2; snssaiList = ({ sst = 1 }) }); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) - absoluteFrequencySSB = 641032; - dl_frequencyBand = 78; - # this is 3600 MHz - dl_absoluteFrequencyPointA = 640000; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=41,L=24 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6366; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 12; - initialDLBWPsearchSpaceZero = 0; - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 6366; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 13; - preambleReceivedTargetPower = -118; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, - -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; - - ssb_PositionsInBurst_Bitmap = 1; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; - nrofDownlinkSymbols = 6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; - - ssPBCH_BlockPower = 10; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// AMF parameters: - amf_ip_address = ({ ipv4 = "192.168.199.223"; }); - - - - NETWORK_INTERFACES : - { - - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.199.222/24"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.10.100/24"; - GNB_PORT_FOR_NGU = 2152; # Spec 2152 - GNB_IPV4_ADDRESS_FOR_X2C = "192.168.20.20/24"; - GNB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 75; - eNB_instances = [0]; - sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2"; - clock_src = "external"; - } -); - - -security = { - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms = ( "nea0" ); - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms = ( "nia2", "nia0" ); - - # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter - # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' - drb_ciphering = "yes"; - drb_integrity = "no"; -}; - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - ngap_log_level ="info"; - }; - From 44b3443533c6231f70c6cab31f04a5b560ea15d6 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 12 Dec 2024 10:37:56 +0100 Subject: [PATCH 07/54] remove deprecated ssb_PositionsInBurst_PR still present in some config files --- .../CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf | 6 ++---- .../CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf index 24b0e17b1f..8c419177d5 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106PRB.usrpb210.RA_2-Step.conf @@ -135,10 +135,8 @@ gNBs = pucchGroupHopping = 0; hoppingId = 40; p0_nominal = -90; -# ssb_PositionsInBurs_BitmapPR -# 1=short, 2=medium, 3=long - ssb_PositionsInBurst_PR = 2; - ssb_PositionsInBurst_Bitmap = 1; + + ssb_PositionsInBurst_Bitmap = 1; # ssb_periodicityServingCell # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf index d9ba0f24b5..b6c940c78b 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf @@ -112,9 +112,6 @@ gNBs = pucchGroupHopping = 0; hoppingId = 40; p0_nominal = -90; -# ssb_PositionsInBurs_BitmapPR -# 1=short, 2=medium, 3=long - ssb_PositionsInBurst_PR = 2; ssb_PositionsInBurst_Bitmap = 1; # ssb_periodicityServingCell # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 From de0b9881acee0c3c24930c2dccc70dc94cb666e3 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 12 Dec 2024 10:40:37 +0100 Subject: [PATCH 08/54] remove NSA testing config files probably not used anymore --- .../CONF/testing_eNB_band13.conf | 252 ----------------- .../GENERIC-LTE-EPC/CONF/testing_enb.conf | 253 ------------------ .../GENERIC-LTE-EPC/CONF/testing_gnb.conf | 245 ----------------- .../CONF/testing_gnb_24PRB.conf | 246 ----------------- .../CONF/testing_gnb_n310.conf | 244 ----------------- .../CONF/testing_gnb_nsa_n310.conf | 241 ----------------- 6 files changed, 1481 deletions(-) delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf deleted file mode 100644 index 22d05b6419..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf +++ /dev/null @@ -1,252 +0,0 @@ -Active_eNBs = ( "eNB-Eurecom-LTEBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -eNBs = -( - { - # real_time choice in {hard, rt-preempt, no} - real_time = "no"; - ////////// Identification parameters: - eNB_ID = 0xe01; - - cell_type = "CELL_MACRO_ENB"; - - eNB_name = "eNB-Eurecom-LTEBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - plmn_list = ( - { mcc = 311; mnc = 480; mnc_length = 3; } - ); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - component_carriers = ( - { - node_function = "eNodeB_3GPP"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - nb_antenna_ports = 1; - ue_TransmissionMode = 1; - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 13; - downlink_frequency = 751000000L; - uplink_frequency_offset = 31000000; - Nid_cell = 0; - N_RB_DL = 25; //100; - Nid_cell_mbsfn = 0; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - prach_root = 0; - tx_gain = 90; - rx_gain = 115; - pbch_repetition = "FALSE"; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 0; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower = -26; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; - srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; - srs_SubframeConfig =; - srs_ackNackST =; - srs_MaxUpPts =;*/ - - pusch_p0_Nominal = -96; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -96; - msg3_delta_Preamble = 6; - pucch_deltaF_Format1 = "deltaF2"; - pucch_deltaF_Format1b = "deltaF3"; - pucch_deltaF_Format2 = "deltaF0"; - pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; - - rach_numberOfRA_Preambles = 64; - rach_preamblesGroupAConfig = "DISABLE"; -/* - rach_sizeOfRA_PreamblesGroupA = ; - rach_messageSizeGroupA = ; - rach_messagePowerOffsetGroupB = ; -*/ - rach_powerRampingStep = 4; - rach_preambleInitialReceivedTargetPower = -108; - rach_preambleTransMax = 10; - rach_raResponseWindowSize = 10; - rach_macContentionResolutionTimer = 48; - rach_maxHARQ_Msg3Tx = 4; - - pcch_default_PagingCycle = 128; - pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; - - //Parameters for SIB18 - rxPool_sc_CP_Len = "normal"; - rxPool_sc_Period = "sf40"; - rxPool_data_CP_Len = "normal"; - rxPool_ResourceConfig_prb_Num = 20; - rxPool_ResourceConfig_prb_Start = 5; - rxPool_ResourceConfig_prb_End = 44; - rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - rxPool_ResourceConfig_offsetIndicator_choice = 0; - rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; -/* rxPool_dataHoppingConfig_hoppingParameter = 0; - rxPool_dataHoppingConfig_numSubbands = "ns1"; - rxPool_dataHoppingConfig_rbOffset = 0; - rxPool_commTxResourceUC-ReqAllowed = "TRUE"; -*/ - // Parameters for SIB19 - discRxPool_cp_Len = "normal" - discRxPool_discPeriod = "rf32" - discRxPool_numRetx = 1; - discRxPool_numRepetition = 2; - discRxPool_ResourceConfig_prb_Num = 5; - discRxPool_ResourceConfig_prb_Start = 3; - discRxPool_ResourceConfig_prb_End = 21; - discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - discRxPool_ResourceConfig_offsetIndicator_choice = 0; - discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; - - //SSB central frequency of NR secondary cell group (for ENDC NSA) - nr_scg_ssb_freq = 2071241; - - } - ); - - srb1_parameters : - { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; - - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; - - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; - - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; - - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; - - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - enable_measurement_reports = "yes"; - - ////////// MME parameters: - mme_ip_address = ({ ipv4 = "192.168.18.99"; }); - - ///X2 - enable_x2 = "yes"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - - NETWORK_INTERFACES : - { - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.199/24"; - - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.18.199/24"; - ENB_PORT_FOR_S1U = 2152; # Spec 2152 - - ENB_IPV4_ADDRESS_FOR_X2C = "192.168.18.199/24"; - ENB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - phy_test_mode = 0; - puSch10xSnr = 160; - puCch10xSnr = 160; - } -); - -THREAD_STRUCT = ( - { - parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; - worker_config = "WORKER_ENABLE"; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -26; - max_rxgain = 130; - eNB_instances = [0]; - clock_src = "external"; - } -); - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf deleted file mode 100644 index b1d4006849..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf +++ /dev/null @@ -1,253 +0,0 @@ -Active_eNBs = ( "eNB-Eurecom-LTEBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -eNBs = -( - { - # real_time choice in {hard, rt-preempt, no} - real_time = "no"; - ////////// Identification parameters: - eNB_ID = 0xe01; - - cell_type = "CELL_MACRO_ENB"; - - eNB_name = "eNB-Eurecom-LTEBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - plmn_list = ( - { mcc = 222; mnc = 01; mnc_length = 2; } - ); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - component_carriers = ( - { - node_function = "eNodeB_3GPP"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - nb_antenna_ports = 1; - ue_TransmissionMode = 1; - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2680000000L; //2655000000L; - uplink_frequency_offset = -120000000; - - Nid_cell = 0; - N_RB_DL = 25; //100; - Nid_cell_mbsfn = 0; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - prach_root = 0; - tx_gain = 90; - rx_gain = 115; - pbch_repetition = "FALSE"; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 0; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower = -29; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; - srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; - srs_SubframeConfig =; - srs_ackNackST =; - srs_MaxUpPts =;*/ - - pusch_p0_Nominal = -96; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -96; - msg3_delta_Preamble = 6; - pucch_deltaF_Format1 = "deltaF2"; - pucch_deltaF_Format1b = "deltaF3"; - pucch_deltaF_Format2 = "deltaF0"; - pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; - - rach_numberOfRA_Preambles = 64; - rach_preamblesGroupAConfig = "DISABLE"; -/* - rach_sizeOfRA_PreamblesGroupA = ; - rach_messageSizeGroupA = ; - rach_messagePowerOffsetGroupB = ; -*/ - rach_powerRampingStep = 4; - rach_preambleInitialReceivedTargetPower = -108; - rach_preambleTransMax = 10; - rach_raResponseWindowSize = 10; - rach_macContentionResolutionTimer = 48; - rach_maxHARQ_Msg3Tx = 4; - - pcch_default_PagingCycle = 128; - pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; - - //Parameters for SIB18 - rxPool_sc_CP_Len = "normal"; - rxPool_sc_Period = "sf40"; - rxPool_data_CP_Len = "normal"; - rxPool_ResourceConfig_prb_Num = 20; - rxPool_ResourceConfig_prb_Start = 5; - rxPool_ResourceConfig_prb_End = 44; - rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - rxPool_ResourceConfig_offsetIndicator_choice = 0; - rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; -/* rxPool_dataHoppingConfig_hoppingParameter = 0; - rxPool_dataHoppingConfig_numSubbands = "ns1"; - rxPool_dataHoppingConfig_rbOffset = 0; - rxPool_commTxResourceUC-ReqAllowed = "TRUE"; -*/ - // Parameters for SIB19 - discRxPool_cp_Len = "normal" - discRxPool_discPeriod = "rf32" - discRxPool_numRetx = 1; - discRxPool_numRepetition = 2; - discRxPool_ResourceConfig_prb_Num = 5; - discRxPool_ResourceConfig_prb_Start = 3; - discRxPool_ResourceConfig_prb_End = 21; - discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - discRxPool_ResourceConfig_offsetIndicator_choice = 0; - discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; - - //SSB central frequency of NR secondary cell group (for ENDC NSA) - nr_scg_ssb_freq = 641272; - - } - ); - - srb1_parameters : - { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; - - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; - - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; - - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; - - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; - - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - enable_measurement_reports = "yes"; - - ////////// MME parameters: - mme_ip_address = ({ ipv4 = "192.168.18.99"; }); - - ///X2 - enable_x2 = "yes"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - - NETWORK_INTERFACES : - { - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.199/24"; - - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.18.199/24"; - ENB_PORT_FOR_S1U = 2152; # Spec 2152 - - ENB_IPV4_ADDRESS_FOR_X2C = "192.168.18.199/24"; - ENB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - phy_test_mode = 0; - puSch10xSnr = 160; - puCch10xSnr = 160; - } -); - -THREAD_STRUCT = ( - { - parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; - worker_config = "WORKER_ENABLE"; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 118; - eNB_instances = [0]; - clock_src = "internal"; - } -); - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf deleted file mode 100644 index c7265da920..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf +++ /dev/null @@ -1,245 +0,0 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-Eurecom-5GNRBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({mcc = 222; mnc = 01; mnc_length = 2;}); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3600 MHz + 84 PRBs@30kHz SCS (same as initial BWP) - absoluteFrequencySSB = 641272; //641032; #641968; 641968=start of ssb at 3600MHz + 82 RBs 641032=center of SSB at center of cell - dl_frequencyBand = 78; - # this is 3600 MHz - dl_absoluteFrequencyPointA = 640000; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=84,L=13 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6368; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 0; - initialDLBWPsearchSpaceZero = 0; - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 6368; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 13; - preambleReceivedTargetPower = -100; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, - -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; - - ssb_PositionsInBurst_Bitmap = 1; #0x80; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; //8; //7; - nrofDownlinkSymbols = 6; //0; //6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; //0; //4; - - ssPBCH_BlockPower = -25; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - amf_ip_address = ({ ipv4 = "192.168.69.131"; }); - - ///X2 - enable_x2 = "yes"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); - - NETWORK_INTERFACES : - { - - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.198/24"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.198/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; - GNB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - pusch_TargetSNRx10 = 200; - pucch_TargetSNRx10 = 200; - } -); - -L1s = ( -{ - num_cc = 1; - tr_n_preference = "local_mac"; - ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0 -} -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 114; - eNB_instances = [0]; - clock_src = "internal"; - } -); - - -security = { - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms = ( "nea0" ); - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms = ( "nia2", "nia0" ); - - # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter - # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' - drb_ciphering = "yes"; - drb_integrity = "no"; -}; - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; - diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf deleted file mode 100644 index 53683cf3ba..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf +++ /dev/null @@ -1,246 +0,0 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-Eurecom-5GNRBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({mcc = 222; mnc = 01; mnc_length = 2;}); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3600 MHz + 12 PRBs@30kHz SCS - absoluteFrequencySSB = 640288; - dl_frequencyBand = 78; - # this is 3600 MHz - dl_absoluteFrequencyPointA = 640000; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 24; - #initialDownlinkBWP - #genericParameters - # this is RBstart=0,L=24 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6325; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 0; - initialDLBWPsearchSpaceZero = 0; - #pdsch-ConfigCommon - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 24; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 6325; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 13; - preambleReceivedTargetPower = -100; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, - -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; - - ssb_PositionsInBurst_Bitmap = 1; #0x80; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; //8; //7; - nrofDownlinkSymbols = 6; //0; //6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; //0; //4; - - ssPBCH_BlockPower = -25; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - mme_ip_address = ({ ipv4 = "192.168.18.99"; }); - - ///X2 - enable_x2 = "yes"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); - - NETWORK_INTERFACES : - { - - GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.198/24"; - GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.198/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; - GNB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - pusch_TargetSNRx10 = 200; - pucch_TargetSNRx10 = 200; - } -); - -L1s = ( -{ - num_cc = 1; - tr_n_preference = "local_mac"; - ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0 -} -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 114; - eNB_instances = [0]; - clock_src = "external"; - } -); - - -security = { - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms = ( "nea0" ); - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms = ( "nia2", "nia0" ); - - # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter - # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' - drb_ciphering = "yes"; - drb_integrity = "no"; -}; - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; - diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf deleted file mode 100644 index e394ead30d..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf +++ /dev/null @@ -1,244 +0,0 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-Eurecom-5GNRBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({mcc = 222; mnc = 01; mnc_length = 2;}); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3600 MHz + 84 PRBs@30kHz SCS (same as initial BWP) - absoluteFrequencySSB = 641272; //641032; #641968; 641968=start of ssb at 3600MHz + 82 RBs 641032=center of SSB at center of cell - dl_frequencyBand = 78; - # this is 3600 MHz - dl_absoluteFrequencyPointA = 640000; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=84,L=13 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6368; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 0; - initialDLBWPsearchSpaceZero = 0; - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 6368; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 13; - preambleReceivedTargetPower = -90; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, - -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; - - ssb_PositionsInBurst_Bitmap = 1; #0x80; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; //8; //7; - nrofDownlinkSymbols = 6; //0; //6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; //0; //4; - - ssPBCH_BlockPower = 0; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - mme_ip_address = ({ ipv4 = "192.168.18.99"; }); - - ///X2 - enable_x2 = "yes"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); - - NETWORK_INTERFACES : - { - - GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.196/24"; - GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.196/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.196/24"; - GNB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 75; - eNB_instances = [0]; - sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2"; - clock_src = "external"; - time_src = "external"; - } -); - - -security = { - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms = ( "nea0" ); - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms = ( "nia2", "nia0" ); - - # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter - # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' - drb_ciphering = "yes"; - drb_integrity = "no"; -}; - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; - diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf deleted file mode 100644 index ceb185e07f..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf +++ /dev/null @@ -1,241 +0,0 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-Eurecom-5GNRBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({mcc = 222; mnc = 01; mnc_length = 2;}); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - pusch_TargetSNRx10 = 200; - pucch_TargetSNRx10 = 200; - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3600 MHz + 84 PRBs@30kHz SCS (same as initial BWP) - absoluteFrequencySSB = 641272; //641032; #641968; 641968=start of ssb at 3600MHz + 82 RBs 641032=center of SSB at center of cell - dl_frequencyBand = 78; - # this is 3600 MHz - dl_absoluteFrequencyPointA = 640000; - #scs-SpecificCarrierList - dl_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=84,L=13 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6368; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 0; - initialDLBWPsearchSpaceZero = 0; - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 6368; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialULBWPsubcarrierSpacing = 1; - #rach-ConfigCommon - #rach-ConfigGeneric - prach_ConfigurationIndex = 98; -#prach_msg1_FDM -#0 = one, 1=two, 2=four, 3=eight - prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; - zeroCorrelationZoneConfig = 13; - preambleReceivedTargetPower = -100; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 5; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - prach_RootSequenceIndex = 1; - # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex - # - msg1_SubcarrierSpacing = 1, - -# restrictedSetConfig -# 0=unrestricted, 1=restricted type A, 2=restricted type B - restrictedSetConfig = 0, - - msg3_DeltaPreamble = 1; - p0_NominalWithGrant =-90; - -# pucch-ConfigCommon setup : -# pucchGroupHopping -# 0 = neither, 1= group hopping, 2=sequence hopping - pucchGroupHopping = 0; - hoppingId = 40; - p0_nominal = -90; - - ssb_PositionsInBurst_Bitmap = 1; #0x80; - -# ssb_periodicityServingCell -# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 - ssb_periodicityServingCell = 2; - -# dmrs_TypeA_position -# 0 = pos2, 1 = pos3 - dmrs_TypeA_Position = 0; - -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - subcarrierSpacing = 1; - - - #tdd-UL-DL-ConfigurationCommon -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - referenceSubcarrierSpacing = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; //8; //7; - nrofDownlinkSymbols = 6; //0; //6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; //0; //4; - - ssPBCH_BlockPower = -25; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - amf_ip_address = ({ ipv4 = "192.168.18.99"; }); - - ///X2 - enable_x2 = "yes"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ({ ipv4 = "192.168.18.199"; }); - - NETWORK_INTERFACES : - { - - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.198/24"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.198/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; - GNB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } -); - -L1s = ( -{ - num_cc = 1; - tr_n_preference = "local_mac"; -} -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 75; - eNB_instances = [0]; - sdr_addrs = "mgmt_addr=192.168.18.252,addr=192.168.80.50,clock_source=internal,time_source= internal" - #clock_src = "external"; - } -); - - -security = { - # preferred ciphering algorithms - # the first one of the list that an UE supports in chosen - # valid values: nea0, nea1, nea2, nea3 - ciphering_algorithms = ( "nea0", "nea2" ); - - # preferred integrity algorithms - # the first one of the list that an UE supports in chosen - # valid values: nia0, nia1, nia2, nia3 - integrity_algorithms = ( "nia0" ); -}; - - log_config : - { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; - rlc_log_level ="info"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - }; - From 3306a01c57fd7a63482aba63892711caa14cb82d Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Fri, 15 Nov 2024 14:24:09 +0100 Subject: [PATCH 09/54] CI: change frequency for timing and B200-SABOX pipelines --- .../gnb.band78.106prb.usrpn300.phytest-dora.conf | 8 ++++---- ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf b/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf index 4693bc2970..619f9e5641 100644 --- a/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf +++ b/ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf @@ -31,11 +31,11 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL - # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) - absoluteFrequencySSB = 641032; + # this is 3319.68 MHz + absoluteFrequencySSB = 621312; dl_frequencyBand = 78; - # this is 3600 MHz - dl_absoluteFrequencyPointA = 640000; + # this is 3300.6 MHz + dl_absoluteFrequencyPointA = 620040; #scs-SpecificCarrierList dl_offstToCarrier = 0; # subcarrierSpacing diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf index c2ac243178..14a11773a4 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.usrpb200.conf @@ -26,11 +26,11 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL - # this is 3300.30 MHz + (19 PRBs + 10 SCs)@30kHz SCS (GSCN: 7715) - absoluteFrequencySSB = 620736; + # this is 3610.56 MHz + absoluteFrequencySSB = 640704; dl_frequencyBand = 78; - # this is 3300.30 MHz - dl_absoluteFrequencyPointA = 620020; + # this is 3599.94 MHz + dl_absoluteFrequencyPointA = 639996; #scs-SpecificCarrierList dl_offstToCarrier = 0; # subcarrierSpacing From f3e60a141747ac12e2c9058e35e64fc5315d2911 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Tue, 8 Oct 2024 08:17:57 +0200 Subject: [PATCH 10/54] Use UL actor for processSlotTx Use UL actor instead of Thread pool for processSlotTX. --- executables/nr-ue.c | 23 ++++++++--------------- executables/nr-uesoftmodem.c | 1 + openair1/PHY/defs_nr_UE.h | 4 +--- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 78abb7b081..7d7cc0101f 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -103,10 +103,9 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg); static void start_process_slot_tx(void* arg) { - task_t task; - task.args = arg; - task.func = processSlotTX; - pushTpool(&(get_nrUE_params()->Tpool), task); + notifiedFIFO_elt_t *newTx = arg; + nr_rxtx_thread_data_t *curMsgTx = NotifiedFifoData(newTx); + pushNotifiedFIFO(&curMsgTx->UE->ul_actor.fifo, newTx); } static size_t dump_L1_UE_meas_stats(PHY_VARS_NR_UE *ue, char *output, size_t max_len) @@ -563,13 +562,7 @@ void processSlotTX(void *arg) phy_procedures_nrUE_TX(UE, proc, &phy_data); } } - - int slots_per_frame = (UE->sl_mode == 2) ? UE->SL_UE_PHY_PARAMS.sl_frame_params.slots_per_frame - : UE->frame_parms.slots_per_frame; - int next_slot_and_frame = proc->nr_slot_tx + 1 + proc->nr_slot_tx_offset + proc->frame_tx * slots_per_frame; - dynamic_barrier_join(&UE->process_slot_tx_barriers[next_slot_and_frame % NUM_PROCESS_SLOT_TX_BARRIERS]); RU_write(rxtxD, sl_tx_action); - free(rxtxD); TracyCZoneEnd(ctx); } @@ -1082,22 +1075,22 @@ void *UE_thread(void *arg) // Start TX slot processing here. It runs in parallel with RX slot processing // in current code, DURATION_RX_TO_TX constant is the limit to get UL data to encode from a RX slot - nr_rxtx_thread_data_t *curMsgTx = calloc(1, sizeof(*curMsgTx)); + notifiedFIFO_elt_t *newTx = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0, 0, processSlotTX); + nr_rxtx_thread_data_t *curMsgTx = NotifiedFifoData(newTx); + memset(curMsgTx, 0, sizeof(*curMsgTx)); curMsgTx->proc = curMsg.proc; curMsgTx->writeBlockSize = writeBlockSize; curMsgTx->proc.timestamp_tx = writeTimestamp; curMsgTx->UE = UE; - curMsgTx->stream_status = stream_status; curMsgTx->proc.nr_slot_tx_offset = nr_slot_tx_offset; - int sync_to_previous_thread = stream_status == STREAM_STATUS_SYNCED ? 1 : 0; int slot = curMsgTx->proc.nr_slot_tx; int slot_and_frame = slot + curMsgTx->proc.frame_tx * UE->frame_parms.slots_per_frame; dynamic_barrier_update(&UE->process_slot_tx_barriers[slot_and_frame % NUM_PROCESS_SLOT_TX_BARRIERS], - tx_wait_for_dlsch[slot] + sync_to_previous_thread, + tx_wait_for_dlsch[slot], start_process_slot_tx, - curMsgTx); + newTx); stream_status = STREAM_STATUS_SYNCED; tx_wait_for_dlsch[slot] = 0; // apply new duration next run to avoid thread dead lock diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 158cc293ef..96d9c3c19d 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -497,6 +497,7 @@ int main(int argc, char **argv) for (int i = 0; i < NUM_DL_ACTORS; i++) { init_actor(&UE[CC_id]->dl_actors[i], "DL_", -1); } + init_actor(&UE[CC_id]->ul_actor, "UL_", -1); init_nr_ue_vars(UE[CC_id], inst); if (UE[CC_id]->sl_mode) { diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index b8590f90c1..b64cb20752 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -548,9 +548,8 @@ typedef struct PHY_VARS_NR_UE_s { sl_nr_ue_phy_params_t SL_UE_PHY_PARAMS; Actor_t sync_actor; Actor_t dl_actors[NUM_DL_ACTORS]; - + Actor_t ul_actor; ntn_config_message_t* ntn_config_message; - } PHY_VARS_NR_UE; typedef struct { @@ -632,7 +631,6 @@ typedef struct nr_rxtx_thread_data_s { nr_phy_data_t phy_data; int tx_wait_for_dlsch; int rx_offset; - enum stream_status_e stream_status; } nr_rxtx_thread_data_t; typedef struct LDPCDecode_ue_s { From 1df5327f0c345f1ab8885893a33029ecfdb500f0 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Fri, 20 Dec 2024 19:43:18 +0100 Subject: [PATCH 11/54] Update NR UE threading documentation Include the newly added UL Actor in the NR UE threading documentation. --- doc/nr-ue-design.md | 2 +- doc/nr-ue-threads.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/nr-ue-design.md b/doc/nr-ue-design.md index f1cef858e1..9ca95c1a00 100644 --- a/doc/nr-ue-design.md +++ b/doc/nr-ue-design.md @@ -13,7 +13,7 @@ The `UE_thread` function in `nr-ue.c` is the main top level thread that interact The UE exits when at any point in operation it gets out of synchronization. When the command line option `--non-stop` is used, the UE goes to 'Initial Synchronization' mode when it loses synchronization with gNB. However, this feature is not fully implemented and it is a work in progress at the time of writing this documentation. This will be the default behavior (not a command line option) when the feature is fully implemented. -UE uses actors which are threads dedicated to particular activity. Sync Actor handles initial sync. DL Actors handle DLSCH PHY procedures. UL procedures are processed directly on the threadpool +UE uses actors which are threads dedicated to particular activity. Sync Actor handles initial sync. DL Actors handle DLSCH PHY procedures. UL procedures are are run on the UL Actor ![design](nr-ue-threads.svg) diff --git a/doc/nr-ue-threads.svg b/doc/nr-ue-threads.svg index 0ae01ea8aa..88302daeaf 100644 --- a/doc/nr-ue-threads.svg +++ b/doc/nr-ue-threads.svg @@ -1 +1 @@ - + From 9a3fbacfac9ed868fd7eac69dd768da8a558bab9 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Fri, 20 Dec 2024 19:45:42 +0100 Subject: [PATCH 12/54] Fix data race between processSlotTX and clean_UE_harq function --- executables/nr-ue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 7d7cc0101f..3c01225d84 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -602,7 +602,7 @@ static int handle_sync_req_from_mac(PHY_VARS_NR_UE *UE) for (int i = 0; i < NUM_DL_ACTORS; i++) { flush_actor(UE->dl_actors + i); } - /*TODO: Flush UL jobs */ + flush_actor(&UE->ul_actor); clean_UE_harq(UE); UE->is_synchronized = 0; From 70a6434168ee35c72cb28bd55c4da3dc728ce2fd Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 17 Sep 2024 09:22:10 +0200 Subject: [PATCH 13/54] remove unused input from get_beam_index function --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 2c51ee5f21..69671e2a89 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -3185,7 +3185,7 @@ void fapi_beam_index_allocation(NR_ServingCellConfigCommon_t *scc, gNB_MAC_INST } } -static inline int get_beam_index(const NR_beam_info_t *beam_info, int frame, int slot, int beam_index, int slots_per_frame) +static inline int get_beam_index(const NR_beam_info_t *beam_info, int frame, int slot, int slots_per_frame) { return ((frame * slots_per_frame + slot) / beam_info->beam_duration) % beam_info->beam_allocation_size; } @@ -3196,7 +3196,7 @@ NR_beam_alloc_t beam_allocation_procedure(NR_beam_info_t *beam_info, int frame, if (!beam_info->beam_allocation) return (NR_beam_alloc_t) {.new_beam = false, .idx = 0}; - const int index = get_beam_index(beam_info, frame, slot, beam_index, slots_per_frame); + const int index = get_beam_index(beam_info, frame, slot, slots_per_frame); for (int i = 0; i < beam_info->beams_per_period; i++) { NR_beam_alloc_t beam_struct = {.new_beam = false, .idx = i}; int *beam = &beam_info->beam_allocation[i][index]; @@ -3215,7 +3215,7 @@ void reset_beam_status(NR_beam_info_t *beam_info, int frame, int slot, int beam_ { if(!new_beam) // need to reset only if the beam was allocated specifically for this instance return; - const int index = get_beam_index(beam_info, frame, slot, beam_index, slots_per_frame); + const int index = get_beam_index(beam_info, frame, slot, slots_per_frame); for (int i = 0; i < beam_info->beams_per_period; i++) { if (beam_info->beam_allocation[i][index] == beam_index) beam_info->beam_allocation[i][index] = -1; From 2d2a92dd127bf2eca6a5406a95ea85f5b219a218 Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 17 Sep 2024 11:39:30 +0200 Subject: [PATCH 14/54] improvements in handling CSI report for RSRP --- openair2/LAYER2/NR_MAC_COMMON/nr_mac.h | 4 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 93 +++++++++---------- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 14 +-- 3 files changed, 52 insertions(+), 59 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h index 6ce41a30ea..6d78d6616a 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h @@ -564,8 +564,8 @@ typedef struct nr_csi_report { NR_CSI_ReportConfig__reportQuantity_PR reportQuantity_type; long periodicity; uint16_t offset; - long ** SSB_Index_list; - long ** CSI_Index_list; + long **SSB_Index_list; + long **CSI_Index_list; // uint8_t nb_of_nzp_csi_report; uint8_t nb_of_csi_ssb_report; L1_RSRP_bitlen_t CSI_report_bitlen; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 39f5e2453a..f4c77a9442 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -481,10 +481,11 @@ static bool get_measured_rsrp(uint8_t index, int *rsrp) } //returns the differential RSRP value (upper limit) -static int get_diff_rsrp(uint8_t index, int strongest_rsrp) { - if(strongest_rsrp != -1) { +static int get_diff_rsrp(uint8_t index, int strongest_rsrp) +{ + if(strongest_rsrp != -1) return strongest_rsrp + diff_rsrp_ssb_csi_meas_10_1_6_1_2[index]; - } else + else return MIN_RSRP_VALUE; } @@ -497,7 +498,6 @@ static void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) int curr_ssb_beam_index = 0; //ToDo: yet to know how to identify the serving ssb beam index uint8_t target_ssb_beam_index = curr_ssb_beam_index; uint8_t is_triggering_ssb_beam_switch =0; - uint8_t ssb_idx = 0; int pdsch_bwp_id = 0; int ssb_index[MAX_NUM_SSB] = {0}; int ssb_rsrp[MAX_NUM_SSB] = {0}; @@ -505,10 +505,8 @@ static void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - uint8_t nr_ssbri_cri = 0; uint8_t nb_of_csi_ssb_report = UE->csi_report_template[cqi_idx].nb_of_csi_ssb_report; int better_rsrp_reported = -140-(-0); /*minimum_measured_RSRP_value - minimum_differntail_RSRP_value*///considering the minimum RSRP value as better RSRP initially - uint8_t diff_rsrp_idx = 0; uint8_t i, j; //bwp indicator @@ -528,22 +526,16 @@ static void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) idx: resource set index */ - nr_ssbri_cri = sched_ctrl->CSI_report.ssb_cri_report.nr_ssbri_cri; + int nr_ssbri = sched_ctrl->CSI_report.ssb_rsrp_report.nr_reports; //extracting the ssb indexes - for (ssb_idx = 0; ssb_idx < nr_ssbri_cri; ssb_idx++) { - ssb_index[idx * nb_of_csi_ssb_report + ssb_idx] = sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[ssb_idx]; + for (int ssb_idx = 0; ssb_idx < nr_ssbri; ssb_idx++) { + ssb_index[idx * nb_of_csi_ssb_report + ssb_idx] = sched_ctrl->CSI_report.ssb_rsrp_report.resource_id[ssb_idx]; } //if strongest measured RSRP is configured - int strongest_ssb_rsrp; - int rsrp_index = sched_ctrl->CSI_report.ssb_cri_report.RSRP; - bool valid = get_measured_rsrp(rsrp_index, &strongest_ssb_rsrp); - if (!valid) { - LOG_E(NR_MAC, "UE %04x: reported RSRP index %d invalid\n", UE->rnti, rsrp_index); - return; - } + int strongest_ssb_rsrp = sched_ctrl->CSI_report.ssb_rsrp_report.RSRP[0]; ssb_rsrp[idx * nb_of_csi_ssb_report] = strongest_ssb_rsrp; - LOG_D(NR_MAC,"ssb_rsrp = %d\n",strongest_ssb_rsrp); + LOG_D(NR_MAC,"ssb_rsrp = %d\n", strongest_ssb_rsrp); //if current ssb rsrp is greater than better rsrp if(ssb_rsrp[idx * nb_of_csi_ssb_report] > better_rsrp_reported) { @@ -551,8 +543,8 @@ static void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) target_ssb_beam_index = idx * nb_of_csi_ssb_report; } - for(diff_rsrp_idx =1; diff_rsrp_idx < nr_ssbri_cri; diff_rsrp_idx++) { - ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] = get_diff_rsrp(sched_ctrl->CSI_report.ssb_cri_report.diff_RSRP[diff_rsrp_idx-1], strongest_ssb_rsrp); + for(int diff_rsrp_idx = 1; diff_rsrp_idx < nr_ssbri; diff_rsrp_idx++) { + ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] = sched_ctrl->CSI_report.ssb_rsrp_report.RSRP[diff_rsrp_idx]; //if current reported rsrp is greater than better rsrp if(ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] > better_rsrp_reported) { @@ -687,10 +679,6 @@ static void evaluate_rsrp_report(NR_UE_info_t *UE, int *cumul_bits, NR_CSI_ReportConfig__reportQuantity_PR reportQuantity_type) { - nr_csi_report_t *csi_report = &UE->csi_report_template[csi_report_id]; - uint8_t cri_ssbri_bitlen = csi_report->CSI_report_bitlen.cri_ssbri_bitlen; - uint16_t curr_payload; - /*! As per the spec 38.212 and table: 6.3.1.1.2-12 in a single UCI sequence we can have multiple CSI_report * the number of CSI_report will depend on number of CSI resource sets that are configured in CSI-ResourceConfig RRC IE * From spec 38.331 from the IE CSI-ResourceConfig for SSB RSRP reporting we can configure only one resource set @@ -708,46 +696,51 @@ static void evaluate_rsrp_report(NR_UE_info_t *UE, resources can be received simultaneously by the UE either with a single spatial domain receive filter, or with multiple simultaneous spatial domain receive filter */ + nr_csi_report_t *csi_report = &UE->csi_report_template[csi_report_id]; + RSRP_report_t *rsrp_report; + long **index_list; + switch (reportQuantity_type) { + case NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP: + rsrp_report = &sched_ctrl->CSI_report.ssb_rsrp_report; + index_list = csi_report->SSB_Index_list; + break; + case NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP : + rsrp_report = &sched_ctrl->CSI_report.csirs_rsrp_report; + index_list = csi_report->CSI_Index_list; + break; + default : + AssertFatal(false, "Invalid RSRP report type\n"); + } - sched_ctrl->CSI_report.ssb_cri_report.nr_ssbri_cri = csi_report->CSI_report_bitlen.nb_ssbri_cri; - - for (int csi_ssb_idx = 0; csi_ssb_idx < sched_ctrl->CSI_report.ssb_cri_report.nr_ssbri_cri ; csi_ssb_idx++) { - curr_payload = pickandreverse_bits(payload, cri_ssbri_bitlen, *cumul_bits); - - if (NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP == reportQuantity_type) { - sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx] = - *(csi_report->SSB_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1U<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]); - LOG_D(MAC,"SSB_index = %d\n",sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx]); - } - else { - sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx] = - *(csi_report->CSI_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1U<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]); - LOG_D(MAC,"CSI-RS Resource Indicator = %d\n",sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx]); - } - *cumul_bits += cri_ssbri_bitlen; - + uint16_t curr_payload; + for (int i = 0; i < rsrp_report->nr_reports; i++) { + int bitlen = csi_report->CSI_report_bitlen.cri_ssbri_bitlen; + curr_payload = pickandreverse_bits(payload, bitlen, *cumul_bits); + rsrp_report->resource_id[i] = *(index_list[bitlen > 0 ? ((curr_payload) & ~(~1U << (bitlen - 1))) : bitlen]); + LOG_D(MAC,"SSB/CSI-RS index = %d\n", rsrp_report->resource_id[i]); + *cumul_bits += bitlen; } curr_payload = pickandreverse_bits(payload, 7, *cumul_bits); - sched_ctrl->CSI_report.ssb_cri_report.RSRP = curr_payload & 0x7f; + int rsrp_index = curr_payload & 0x7f; *cumul_bits += 7; - for (int diff_rsrp_idx =0; diff_rsrp_idx < sched_ctrl->CSI_report.ssb_cri_report.nr_ssbri_cri - 1; diff_rsrp_idx++ ) { - curr_payload = pickandreverse_bits(payload, 4, *cumul_bits); - sched_ctrl->CSI_report.ssb_cri_report.diff_RSRP[diff_rsrp_idx] = curr_payload & 0x0f; - *cumul_bits += 4; - } csi_report->nb_of_csi_ssb_report++; - int strongest_ssb_rsrp; - int rsrp_index = sched_ctrl->CSI_report.ssb_cri_report.RSRP; - bool valid = get_measured_rsrp(rsrp_index, &strongest_ssb_rsrp); + bool valid = get_measured_rsrp(rsrp_index, &rsrp_report->RSRP[0]); if (!valid) { LOG_E(NR_MAC, "UE %04x: reported RSRP index %d invalid\n", UE->rnti, rsrp_index); return; } + + for (int i = 1; i < rsrp_report->nr_reports; i++) { + curr_payload = pickandreverse_bits(payload, 4, *cumul_bits); + rsrp_report->RSRP[i] = get_diff_rsrp(curr_payload & 0x0f, rsrp_report->RSRP[0]); + *cumul_bits += 4; + } + NR_mac_stats_t *stats = &UE->mac_stats; // including ssb rsrp in mac stats - stats->cumul_rsrp += strongest_ssb_rsrp; + stats->cumul_rsrp += rsrp_report->RSRP[0]; stats->num_rsrp_meas++; } diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 54be4358a7..df03e59eca 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -523,16 +523,16 @@ struct CRI_RI_LI_PMI_CQI { bool print_report; }; -typedef struct CRI_SSB_RSRP { - uint8_t nr_ssbri_cri; - uint8_t CRI_SSBRI[MAX_NR_OF_REPORTED_RS]; - uint8_t RSRP; - uint8_t diff_RSRP[MAX_NR_OF_REPORTED_RS - 1]; -} CRI_SSB_RSRP_t; +typedef struct RSRP_report { + uint8_t nr_reports; + uint8_t resource_id[MAX_NR_OF_REPORTED_RS]; + int RSRP[MAX_NR_OF_REPORTED_RS]; +} RSRP_report_t; struct CSI_Report { struct CRI_RI_LI_PMI_CQI cri_ri_li_pmi_cqi_report; - struct CRI_SSB_RSRP ssb_cri_report; + RSRP_report_t ssb_rsrp_report; + RSRP_report_t csirs_rsrp_report; }; #define MAX_SR_BITLEN 8 From 19c667fa80786a6f6ba18836764bbafb60b1f8b3 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 14 Nov 2024 11:40:00 +0100 Subject: [PATCH 15/54] remove unused tci handling function --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 251 ------------------ 1 file changed, 251 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index f4c77a9442..796361f0bc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -36,8 +36,6 @@ extern RAN_CONTEXT_t RC; - - static void nr_fill_nfapi_pucch(gNB_MAC_INST *nrmac, frame_t frame, sub_frame_t slot, @@ -97,13 +95,6 @@ static void nr_fill_nfapi_pucch(gNB_MAC_INST *nrmac, #define MIN_RSRP_VALUE -141 #define MAX_RSRP_VALUE -43 -#define MAX_NUM_SSB 128 -#define MAX_SSB_SCHED 8 -#define L1_RSRP_HYSTERIS 10 //considering 10 dBm as hysterisis for avoiding frequent SSB Beam Switching. !Fixme provide exact value if any -//#define L1_DIFF_RSRP_STEP_SIZE 2 - -static int ssb_index_sorted[MAX_NUM_SSB] = {0}; -static int ssb_rsrp_sorted[MAX_NUM_SSB] = {0}; //Measured RSRP Values Table 10.1.16.1-1 from 36.133 //Stored all the upper limits[Max RSRP Value of corresponding index] @@ -402,71 +393,6 @@ static void handle_dl_harq(NR_UE_info_t * UE, } } -static int checkTargetSSBInFirst64TCIStates_pdschConfig(int ssb_index_t, NR_UE_info_t *UE) -{ - const NR_PDSCH_Config_t *pdsch_Config = UE->current_DL_BWP.pdsch_Config; - int nb_tci_states = pdsch_Config ? pdsch_Config->tci_StatesToAddModList->list.count : 0; - NR_TCI_State_t *tci =NULL; - - for(int i=0; itci_StatesToAddModList->list.array[i]; - - if(tci != NULL) { - if(tci->qcl_Type1.referenceSignal.present == NR_QCL_Info__referenceSignal_PR_ssb) { - if(tci->qcl_Type1.referenceSignal.choice.ssb == ssb_index_t) - return tci->tci_StateId; // returned TCI state ID - } - // if type2 is configured - else if(tci->qcl_Type2 != NULL && tci->qcl_Type2->referenceSignal.present == NR_QCL_Info__referenceSignal_PR_ssb) { - if(tci->qcl_Type2->referenceSignal.choice.ssb == ssb_index_t) - return tci->tci_StateId; // returned TCI state ID - } else LOG_I(NR_MAC,"SSB index is not found in first 64 TCI states of TCI_statestoAddModList[%d]", i); - } - } - - // tci state not identified in first 64 TCI States of PDSCH Config - return -1; -} - -static int checkTargetSSBInTCIStates_pdcchConfig(int ssb_index_t, NR_UE_info_t *UE) -{ - NR_TCI_State_t *tci =NULL; - NR_TCI_StateId_t *tci_id = NULL; - NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - NR_ControlResourceSet_t *coreset = sched_ctrl->coreset; - int flag = 0; - int tci_stateID = -1; - const NR_PDSCH_Config_t *pdsch_Config = UE->current_DL_BWP.pdsch_Config; - int nb_tci_states = pdsch_Config ? pdsch_Config->tci_StatesToAddModList->list.count : 0; - for(int i=0; itci_StatesToAddModList->list.array[i]; - - if(tci != NULL && tci->qcl_Type1.referenceSignal.present == NR_QCL_Info__referenceSignal_PR_ssb) { - if(tci->qcl_Type1.referenceSignal.choice.ssb == ssb_index_t) { - flag = 1; - tci_stateID = tci->tci_StateId; - break; - } else if(tci->qcl_Type2 != NULL && tci->qcl_Type2->referenceSignal.present == NR_QCL_Info__referenceSignal_PR_ssb) { - flag = 1; - tci_stateID = tci->tci_StateId; - break; - } - } - - if(flag != 0 && tci_stateID != -1 && coreset != NULL) { - for(i=0; i<64 && itci_StatesPDCCH_ToAddList->list.count; i++) { - tci_id = coreset->tci_StatesPDCCH_ToAddList->list.array[i]; - - if(tci_id != NULL && *tci_id == tci_stateID) - return tci_stateID; - } - } - } - - // Need to implement once configuration is received - return -1; -} - //returns the measured RSRP value (upper limit) static bool get_measured_rsrp(uint8_t index, int *rsrp) { @@ -489,181 +415,6 @@ static int get_diff_rsrp(uint8_t index, int strongest_rsrp) return MIN_RSRP_VALUE; } -//identifies the target SSB Beam index -//keeps the required date for PDCCH and PDSCH TCI state activation/deactivation CE consutruction globally -//handles triggering of PDCCH and PDSCH MAC CEs -static void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) -{ - int cqi_idx = 0; - int curr_ssb_beam_index = 0; //ToDo: yet to know how to identify the serving ssb beam index - uint8_t target_ssb_beam_index = curr_ssb_beam_index; - uint8_t is_triggering_ssb_beam_switch =0; - int pdsch_bwp_id = 0; - int ssb_index[MAX_NUM_SSB] = {0}; - int ssb_rsrp[MAX_NUM_SSB] = {0}; - uint8_t idx = 0; - NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP; - NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - - uint8_t nb_of_csi_ssb_report = UE->csi_report_template[cqi_idx].nb_of_csi_ssb_report; - int better_rsrp_reported = -140-(-0); /*minimum_measured_RSRP_value - minimum_differntail_RSRP_value*///considering the minimum RSRP value as better RSRP initially - uint8_t i, j; - - //bwp indicator - int n_dl_bwp = UE->sc_info.n_dl_bwp; - const int bwp_id = dl_bwp->bwp_id; - if (n_dl_bwp < 4) - pdsch_bwp_id = bwp_id; - else - pdsch_bwp_id = bwp_id - 1; // as per table 7.3.1.1.2-1 in 38.212 - - /*Example: - CRI_SSBRI: 1 2 3 4| 5 6 7 8| 9 10 1 2| - nb_of_csi_ssb_report = 3 //3 sets as above - nr_ssbri_cri = 4 //each set has 4 elements - storing ssb indexes in ssb_index array as ssb_index[0] = 1 .. ssb_index[4] = 5 - ssb_rsrp[0] = strongest rsrp in first set, ssb_rsrp[4] = strongest rsrp in second set, .. - idx: resource set index - */ - - int nr_ssbri = sched_ctrl->CSI_report.ssb_rsrp_report.nr_reports; - //extracting the ssb indexes - for (int ssb_idx = 0; ssb_idx < nr_ssbri; ssb_idx++) { - ssb_index[idx * nb_of_csi_ssb_report + ssb_idx] = sched_ctrl->CSI_report.ssb_rsrp_report.resource_id[ssb_idx]; - } - - //if strongest measured RSRP is configured - int strongest_ssb_rsrp = sched_ctrl->CSI_report.ssb_rsrp_report.RSRP[0]; - ssb_rsrp[idx * nb_of_csi_ssb_report] = strongest_ssb_rsrp; - LOG_D(NR_MAC,"ssb_rsrp = %d\n", strongest_ssb_rsrp); - - //if current ssb rsrp is greater than better rsrp - if(ssb_rsrp[idx * nb_of_csi_ssb_report] > better_rsrp_reported) { - better_rsrp_reported = ssb_rsrp[idx * nb_of_csi_ssb_report]; - target_ssb_beam_index = idx * nb_of_csi_ssb_report; - } - - for(int diff_rsrp_idx = 1; diff_rsrp_idx < nr_ssbri; diff_rsrp_idx++) { - ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] = sched_ctrl->CSI_report.ssb_rsrp_report.RSRP[diff_rsrp_idx]; - - //if current reported rsrp is greater than better rsrp - if(ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] > better_rsrp_reported) { - better_rsrp_reported = ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx]; - target_ssb_beam_index = idx * nb_of_csi_ssb_report + diff_rsrp_idx; - } - } - - if(ssb_index[target_ssb_beam_index] != ssb_index[curr_ssb_beam_index] && ssb_rsrp[target_ssb_beam_index] > ssb_rsrp[curr_ssb_beam_index]) { - if( ssb_rsrp[target_ssb_beam_index] - ssb_rsrp[curr_ssb_beam_index] > L1_RSRP_HYSTERIS) { - is_triggering_ssb_beam_switch = 1; - LOG_D(NR_MAC, "Triggering ssb beam switching using tci\n"); - } - } - - if(is_triggering_ssb_beam_switch) { - //filling pdcch tci state activativation mac ce structure fields - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.is_scheduled = 1; - //OAI currently focusing on Non CA usecase hence 0 is considered as serving - //cell id - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.servingCellId = 0; //0 for PCell as 38.331 v15.9.0 page 353 //serving cell id for which this MAC CE applies - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.coresetId = 0; //coreset id for which the TCI State id is being indicated - - /* 38.321 v15.8.0 page 66 - TCI State ID: This field indicates the TCI state identified by TCI-StateId as specified in TS 38.331 [5] applicable - to the Control Resource Set identified by CORESET ID field. - If the field of CORESET ID is set to 0, - this field indicates a TCI-StateId for a TCI state of the first 64 TCI-states configured by tci-States-ToAddModList and tciStates-ToReleaseList in the PDSCH-Config in the active BWP. - If the field of CORESET ID is set to the other value than 0, - this field indicates a TCI-StateId configured by tci-StatesPDCCH-ToAddList and tciStatesPDCCH-ToReleaseList in the controlResourceSet identified by the indicated CORESET ID. - The length of the field is 7 bits - */ - if(sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.coresetId == 0) { - int tci_state_id = checkTargetSSBInFirst64TCIStates_pdschConfig(ssb_index[target_ssb_beam_index], UE); - - if( tci_state_id != -1) - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tciStateId = tci_state_id; - else { - //identify the best beam within first 64 TCI States of PDSCH - //Config TCI-states-to-addModList - int flag = 0; - - for(i =0; ssb_index_sorted[i]!=0; i++) { - tci_state_id = checkTargetSSBInFirst64TCIStates_pdschConfig(ssb_index_sorted[i],UE) ; - - if(tci_state_id != -1 && ssb_rsrp_sorted[i] > ssb_rsrp[curr_ssb_beam_index] && ssb_rsrp_sorted[i] - ssb_rsrp[curr_ssb_beam_index] > L1_RSRP_HYSTERIS) { - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tciStateId = tci_state_id; - flag = 1; - break; - } - } - - if(flag == 0 || ssb_rsrp_sorted[i] < ssb_rsrp[curr_ssb_beam_index] || ssb_rsrp_sorted[i] - ssb_rsrp[curr_ssb_beam_index] < L1_RSRP_HYSTERIS) { - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.is_scheduled = 0; - } - } - } else { - int tci_state_id = checkTargetSSBInTCIStates_pdcchConfig(ssb_index[target_ssb_beam_index], UE); - - if (tci_state_id !=-1) - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tciStateId = tci_state_id; - else { - //identify the best beam within CORESET/PDCCH - ////Config TCI-states-to-addModList - int flag = 0; - - for(i =0; ssb_index_sorted[i]!=0; i++) { - tci_state_id = checkTargetSSBInTCIStates_pdcchConfig(ssb_index_sorted[i], UE); - - if( tci_state_id != -1 && ssb_rsrp_sorted[i] > ssb_rsrp[curr_ssb_beam_index] && ssb_rsrp_sorted[i] - ssb_rsrp[curr_ssb_beam_index] > L1_RSRP_HYSTERIS) { - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tciStateId = tci_state_id; - flag = 1; - break; - } - } - - if(flag == 0 || ssb_rsrp_sorted[i] < ssb_rsrp[curr_ssb_beam_index] || ssb_rsrp_sorted[i] - ssb_rsrp[curr_ssb_beam_index] < L1_RSRP_HYSTERIS) { - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.is_scheduled = 0; - } - } - } - - sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tci_present_inDCI = sched_ctrl->coreset ? - sched_ctrl->coreset->tci_PresentInDCI : NULL; - - //filling pdsch tci state activation deactivation mac ce structure fields - if(sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tci_present_inDCI) { - sched_ctrl->UE_mac_ce_ctrl.pdsch_TCI_States_ActDeact.is_scheduled = 1; - /* - Serving Cell ID: This field indicates the identity of the Serving Cell for which the MAC CE applies - Considering only PCell exists. Serving cell index of PCell is always 0, hence configuring 0 - */ - sched_ctrl->UE_mac_ce_ctrl.pdsch_TCI_States_ActDeact.servingCellId = 0; - /* - BWP ID: This field indicates a DL BWP for which the MAC CE applies as the codepoint of the DCI bandwidth - part indicator field as specified in TS 38.212 - */ - sched_ctrl->UE_mac_ce_ctrl.pdsch_TCI_States_ActDeact.bwpId = pdsch_bwp_id; - - /* - * TODO ssb_rsrp_sort() API yet to code to find 8 best beams, rrc configuration - * is required - */ - for(i = 0; i<8; i++) { - sched_ctrl->UE_mac_ce_ctrl.pdsch_TCI_States_ActDeact.tciStateActDeact[i] = i; - } - - sched_ctrl->UE_mac_ce_ctrl.pdsch_TCI_States_ActDeact.highestTciStateActivated = 8; - - for(i = 0, j =0; iUE_mac_ce_ctrl.pdsch_TCI_States_ActDeact.tciStateActDeact[i]) { - sched_ctrl->UE_mac_ce_ctrl.pdsch_TCI_States_ActDeact.codepoint[j] = i; - j++; - } - } - }//tci_presentInDCI - }//is-triggering_beam_switch -} // tci handling - static uint8_t pickandreverse_bits(uint8_t *payload, uint16_t bitlen, uint8_t start_bit) { uint8_t rev_bits = 0; @@ -1116,8 +867,6 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, if (uci_234->csi_part1.csi_part1_crc != 1) { // API to parse the csi report and store it into sched_ctrl extract_pucch_csi_report(csi_MeasConfig, uci_234, frame, slot, UE, nrmac->common_channels->ServingCellConfigCommon); - // TCI handling function - tci_handling(UE, frame, slot); } free(uci_234->csi_part1.csi_part1_payload); } From dc9a2cf1adf783607580a6fa9db6ebb2573a07a8 Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 17 Sep 2024 15:43:19 +0200 Subject: [PATCH 16/54] simple beam switching procedure based on strongest reported SSB --- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 12 ++++++++++++ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 17 ++++++++++------- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 69671e2a89..0e2f5cb5bf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -3222,6 +3222,18 @@ void reset_beam_status(NR_beam_info_t *beam_info, int frame, int slot, int beam_ } } +void beam_selection_procedures(gNB_MAC_INST *mac, NR_UE_info_t *UE) +{ + RSRP_report_t *rsrp_report = &UE->UE_sched_ctrl.CSI_report.ssb_rsrp_report; + // simple beam switching algorithm -> we select beam with highest RSRP from CSI report + int new_bf_index = get_fapi_beamforming_index(mac, rsrp_report->resource_id[0]); + if (UE->UE_beam_index == new_bf_index) + return; // no beam change needed + + LOG_I(NR_MAC, "Switching to beam with ID %d corresponding to SSB %d\n", new_bf_index, rsrp_report->resource_id[0]); + UE->UE_beam_index = new_bf_index; +} + void send_initial_ul_rrc_message(int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *data) { gNB_MAC_INST *mac = RC.nrmac[0]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 796361f0bc..170c3706fc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -423,7 +423,8 @@ static uint8_t pickandreverse_bits(uint8_t *payload, uint16_t bitlen, uint8_t st return rev_bits; } -static void evaluate_rsrp_report(NR_UE_info_t *UE, +static void evaluate_rsrp_report(gNB_MAC_INST *nrmac, + NR_UE_info_t *UE, NR_UE_sched_ctrl_t *sched_ctrl, uint8_t csi_report_id, uint8_t *payload, @@ -463,6 +464,7 @@ static void evaluate_rsrp_report(NR_UE_info_t *UE, AssertFatal(false, "Invalid RSRP report type\n"); } + rsrp_report->nr_reports = csi_report->CSI_report_bitlen.nb_ssbri_cri; uint16_t curr_payload; for (int i = 0; i < rsrp_report->nr_reports; i++) { int bitlen = csi_report->CSI_report_bitlen.cri_ssbri_bitlen; @@ -613,7 +615,7 @@ static void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig, frame_t frame, slot_t slot, NR_UE_info_t *UE, - NR_ServingCellConfigCommon_t *scc) + gNB_MAC_INST *nrmac) { /** From Table 6.3.1.1.2-3: RI, LI, CQI, and CRI of codebookType=typeI-SinglePanel */ uint8_t *payload = uci_pdu->csi_part1.csi_part1_payload; @@ -643,12 +645,13 @@ static void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig, if ((n_slots_frame*frame + slot - offset)%period == 0) { reportQuantity_type = csi_report->reportQuantity_type; LOG_D(MAC,"SFN/SF:%d/%d reportQuantity type = %d\n",frame,slot,reportQuantity_type); - switch(reportQuantity_type){ + switch(reportQuantity_type) { case NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP: - evaluate_rsrp_report(UE,sched_ctrl,csi_report_id,payload,&cumul_bits,reportQuantity_type); + evaluate_rsrp_report(nrmac, UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); break; case NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP: - evaluate_rsrp_report(UE,sched_ctrl,csi_report_id,payload,&cumul_bits,reportQuantity_type); + evaluate_rsrp_report(nrmac, UE, sched_ctrl, csi_report_id, payload, &cumul_bits, reportQuantity_type); + beam_selection_procedures(nrmac, UE); break; case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI: sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.print_report = true; @@ -818,7 +821,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, gNB_MAC_INST *nrmac = RC.nrmac[mod_id]; NR_SCHED_LOCK(&nrmac->sched_lock); - NR_UE_info_t * UE = find_nr_UE(&nrmac->UE_info, uci_234->rnti); + NR_UE_info_t *UE = find_nr_UE(&nrmac->UE_info, uci_234->rnti); if (!UE) { NR_SCHED_UNLOCK(&nrmac->sched_lock); LOG_E(NR_MAC, "%s(): unknown RNTI %04x in PUCCH UCI\n", __func__, uci_234->rnti); @@ -866,7 +869,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, LOG_D(NR_MAC, "CSI CRC %d\n", uci_234->csi_part1.csi_part1_crc); if (uci_234->csi_part1.csi_part1_crc != 1) { // API to parse the csi report and store it into sched_ctrl - extract_pucch_csi_report(csi_MeasConfig, uci_234, frame, slot, UE, nrmac->common_channels->ServingCellConfigCommon); + extract_pucch_csi_report(csi_MeasConfig, uci_234, frame, slot, UE, nrmac); } free(uci_234->csi_part1.csi_part1_payload); } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 3e9f02d7ff..36c063bd32 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -447,7 +447,7 @@ void fapi_beam_index_allocation(NR_ServingCellConfigCommon_t *scc, gNB_MAC_INST int get_fapi_beamforming_index(gNB_MAC_INST *mac, int ssb_idx); NR_beam_alloc_t beam_allocation_procedure(NR_beam_info_t *beam_info, int frame, int slot, int beam_index, int slots_per_frame); void reset_beam_status(NR_beam_info_t *beam_info, int frame, int slot, int beam_index, int slots_per_frame, bool new_beam); - +void beam_selection_procedures(gNB_MAC_INST *mac, NR_UE_info_t *UE); void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t frameP, sub_frame_t slotP); size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset_rsrp); From 2940ee5edabffcd665fcdeffd248e5b24657d002 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 19 Sep 2024 15:24:15 +0200 Subject: [PATCH 17/54] MAC beam allocation for periodic CSI measurements --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 170c3706fc..1d66c7df7d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -155,9 +155,7 @@ static int get_pucch_index(int frame, int slot, int n_slots_frame, const NR_TDD_ } -void nr_schedule_pucch(gNB_MAC_INST *nrmac, - frame_t frameP, - sub_frame_t slotP) +void nr_schedule_pucch(gNB_MAC_INST *nrmac, frame_t frameP, sub_frame_t slotP) { /* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */ NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock); @@ -198,9 +196,7 @@ void nr_schedule_pucch(gNB_MAC_INST *nrmac, } } -void nr_csi_meas_reporting(int Mod_idP, - frame_t frame, - sub_frame_t slot) +void nr_csi_meas_reporting(int Mod_idP,frame_t frame, sub_frame_t slot) { const int CC_id = 0; gNB_MAC_INST *nrmac = RC.nrmac[Mod_idP]; @@ -270,9 +266,10 @@ void nr_csi_meas_reporting(int Mod_idP, int bwp_start = ul_bwp->BWPStart; // going through the list of PUCCH resources to find the one indexed by resource_id - int beam_idx = 0; // TODO proper beam allocation + NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, sched_frame, sched_slot, UE->UE_beam_index, n_slots_frame); + AssertFatal(beam.idx >= 0, "Cannot allocate CSI measurements on PUCCH in any available beam\n"); const int index = ul_buffer_index(sched_frame, sched_slot, ul_bwp->scs, nrmac->vrb_map_UL_size); - uint16_t *vrb_map_UL = &nrmac->common_channels[0].vrb_map_UL[beam_idx][index * MAX_BWP_SIZE]; + uint16_t *vrb_map_UL = &nrmac->common_channels[0].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; const int m = pucch_Config->resourceToAddModList->list.count; for (int j = 0; j < m; j++) { NR_PUCCH_Resource_t *pucchres = pucch_Config->resourceToAddModList->list.array[j]; From 8de9d006f55ec8fde4df788e9085cc905d00ce69 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 19 Sep 2024 16:00:14 +0200 Subject: [PATCH 18/54] MAC beam allocation for SRS --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c index 945e078e37..e6935db7ae 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c @@ -411,6 +411,7 @@ void nr_srs_ri_computation(const nfapi_nr_srs_normalized_channel_iq_matrix_t *nr } static void nr_configure_srs(nfapi_nr_srs_pdu_t *srs_pdu, + int frame, int slot, int module_id, int CC_id, @@ -469,9 +470,14 @@ static void nr_configure_srs(nfapi_nr_srs_pdu_t *srs_pdu, srs_pdu->beamforming.num_prgs = m_SRS[srs_pdu->config_index]; srs_pdu->beamforming.prg_size = 1; } - - // TODO properly use beam allocation - uint16_t *vrb_map_UL = &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[0][buffer_index * MAX_BWP_SIZE]; + srs_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = UE->UE_beam_index; + NR_beam_alloc_t beam = beam_allocation_procedure(&RC.nrmac[module_id]->beam_info, + frame, + slot, + UE->UE_beam_index, + nr_slots_per_frame[current_BWP->scs]); + AssertFatal(beam.idx >= 0, "Cannot allocate SRS in any available beam\n"); + uint16_t *vrb_map_UL = &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[beam.idx][buffer_index * MAX_BWP_SIZE]; uint64_t mask = SL_to_bitmap(srs_pdu->time_start_position, srs_pdu->num_symbols); for (int i = 0; i < srs_pdu->bwp_size; ++i) vrb_map_UL[i + srs_pdu->bwp_start] |= mask; @@ -497,7 +503,7 @@ static void nr_fill_nfapi_srs(int module_id, memset(srs_pdu, 0, sizeof(nfapi_nr_srs_pdu_t)); future_ul_tti_req->n_pdus += 1; index = ul_buffer_index(frame, slot, UE->current_UL_BWP.scs, RC.nrmac[module_id]->vrb_map_UL_size); - nr_configure_srs(srs_pdu, slot, module_id, CC_id, UE, srs_resource_set, srs_resource, index); + nr_configure_srs(srs_pdu, frame, slot, module_id, CC_id, UE, srs_resource_set, srs_resource, index); } /******************************************************************* From 912fec55efb69aa52d686e57b0a2a91be0398162 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 19 Sep 2024 18:13:29 +0200 Subject: [PATCH 19/54] MAC beam allocation for scheduling request --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 1d66c7df7d..6b1eb4abbb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1145,10 +1145,10 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot) int SR_period; int SR_offset; - find_period_offset_SR(SchedulingRequestResourceConfig,&SR_period,&SR_offset); + find_period_offset_SR(SchedulingRequestResourceConfig, &SR_period, &SR_offset); // convert to int to avoid underflow of uint int sfn_sf = SFN * n_slots_frame + slot; - LOG_D(NR_MAC,"SR_resource_id %d: SR_period %d, SR_offset %d\n",SR_resource_id,SR_period,SR_offset); + LOG_D(NR_MAC,"SR_resource_id %d: SR_period %d, SR_offset %d\n", SR_resource_id, SR_period, SR_offset); if ((sfn_sf - SR_offset) % SR_period != 0) continue; LOG_D(NR_MAC, "%4d.%2d Scheduling Request UE %04x identified\n", SFN, slot, UE->rnti); @@ -1161,7 +1161,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot) if (*pucchresset->resourceList.list.array[i] == *PucchResourceId ) idx = i; } - AssertFatal(idx>-1,"SR resource not found among PUCCH resources"); + AssertFatal(idx > -1, "SR resource not found among PUCCH resources"); const NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; @@ -1169,10 +1169,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot) const int pucch_index = get_pucch_index(SFN, slot, n_slots_frame, tdd, sched_ctrl->sched_pucch_size); NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[pucch_index]; - if (curr_pucch->active && - curr_pucch->frame == SFN && - curr_pucch->ul_slot == slot && - curr_pucch->resource_indicator == idx) + if (curr_pucch->active && curr_pucch->frame == SFN && curr_pucch->ul_slot == slot && curr_pucch->resource_indicator == idx) curr_pucch->sr_flag = true; else if (curr_pucch->active) { LOG_E(NR_MAC, @@ -1185,9 +1182,10 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot) continue; } else { - int beam_idx = 0; // TODO proper beam allocation + NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, SFN, slot, UE->UE_beam_index, n_slots_frame); + AssertFatal(beam.idx >= 0, "Cannot allocate SR in any available beam\n"); const int index = ul_buffer_index(SFN, slot, ul_bwp->scs, nrmac->vrb_map_UL_size); - uint16_t *vrb_map_UL = &nrmac->common_channels[CC_id].vrb_map_UL[beam_idx][index * MAX_BWP_SIZE]; + uint16_t *vrb_map_UL = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; const int bwp_start = ul_bwp->BWPStart; const int bwp_size = ul_bwp->BWPSize; set_pucch_allocation(ul_bwp, -1, bwp_size, curr_pucch); From f235b249bab70f274ab47bb8010bd07439e486ed Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 20 Sep 2024 10:45:41 +0200 Subject: [PATCH 20/54] remove FR1 in preprocessor name --- doc/SW_archi.md | 13 ++++--------- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 6 +++--- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 6 +++--- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 8 ++++---- openair2/LAYER2/NR_MAC_gNB/main.c | 4 ++-- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/doc/SW_archi.md b/doc/SW_archi.md index 6ba78ad8f1..205da81b6b 100644 --- a/doc/SW_archi.md +++ b/doc/SW_archi.md @@ -220,14 +220,10 @@ Calls nr_schedule_ulsch(): It is divided into the "preprocessor" and the "postprocessor": the first makes the scheduling decisions, the second fills nFAPI structures to indicate to the PHY what it is supposed to do. To signal which users have how many resources, the preprocessor populates the -NR_sched_pusch_t (for values changing every TTI, e.g., frequency domain -allocation) and NR_sched_pusch_save_t (for values changing less frequently, at -least in FR1 [to my understanding], e.g., DMRS fields when the time domain -allocation stays between TTIs) structures. Furthermore, the preprocessor is an +NR_sched_pusch_t structures. Furthermore, the preprocessor is an exchangeable module that schedules differently based on a particular -use-case/deployment type, e.g., one user for phytest [in -nr_ul_preprocessor_phytest()], multiple users in FR1 -[nr_fr1_ulsch_preprocessor()], or maybe FR2 [does not exist yet]: +use-case/deployment type, e.g., one user for phytest in +[nr_ul_preprocessor_phytest()], multiple users in [nr_ulsch_preprocessor()]: * calls preprocessor via pre_processor_ul(): the preprocessor is responsible for allocating CCEs (using allocate_nr_CCEs()) and deciding on resource allocation for the UEs including TB size. Note that we do not yet have @@ -258,8 +254,7 @@ NR_UE_sched_ctrl_t structure of affected users. In particular, the field rbSize decides whether a user is to be allocated. Furthermore, the preprocessor is an exchangeable module that schedules differently based on a particular use-case/deployment type, e.g., one user for phytest [in -nr_preprocessor_phytest()], multiple users in FR1 -[nr_fr1_dlsch_preprocessor()], or maybe FR2 [does not exist yet]. +nr_preprocessor_phytest()], multiple users [nr_dlsch_preprocessor()]. * calls preprocessor via pre_processor_dl(): the preprocessor is responsible for allocating CCEs and PUCCH (using allocate_nr_CCEs() and nr_acknack_scheduling()) and deciding on the frequency/time domain diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 730e954f4b..69b06258dd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -861,7 +861,7 @@ static void pf_dl(module_id_t module_id, } } -static void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot) +static void nr_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot) { NR_UEs_t *UE_info = &RC.nrmac[module_id]->UE_info; @@ -889,7 +889,7 @@ static void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_ bw); // we set the whole BW as max number } -nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(int CC_id) { +nr_pp_impl_dl nr_init_dlsch_preprocessor(int CC_id) { /* during initialization: no mutex needed */ /* in the PF algorithm, we have to use the TBsize to compute the coefficient. * This would include the number of DMRS symbols, which in turn depends on @@ -914,7 +914,7 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(int CC_id) { } } - return nr_fr1_dlsch_preprocessor; + return nr_dlsch_preprocessor; } void nr_schedule_ue_spec(module_id_t module_id, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 7f849253da..f754c88040 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -2147,7 +2147,7 @@ static void pf_ul(module_id_t module_id, } } -static bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot) +static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot) { gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; // no UEs @@ -2180,7 +2180,7 @@ static bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_ return true; } -nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(int CC_id) +nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id) { /* during initialization: no mutex needed */ /* in the PF algorithm, we have to use the TBsize to compute the coefficient. @@ -2208,7 +2208,7 @@ nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(int CC_id) >> 3; } } - return nr_fr1_ulsch_preprocessor; + return nr_ulsch_preprocessor; } void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot, nfapi_nr_ul_dci_request_t *ul_dci_req) diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 36c063bd32..d9be5572a7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -82,8 +82,8 @@ void nr_schedule_ue_spec(module_id_t module_id, nfapi_nr_dl_tti_request_t *DL_req, nfapi_nr_tx_data_request_t *TX_req); -/* \brief default FR1 DL preprocessor init routine, returns preprocessor to call */ -nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(int CC_id); +/* \brief default DL preprocessor init routine, returns preprocessor to call */ +nr_pp_impl_dl nr_init_dlsch_preprocessor(int CC_id); void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, @@ -108,8 +108,8 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, * messages, statistics, HARQ handling, ... */ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot, nfapi_nr_ul_dci_request_t *ul_dci_req); -/* \brief default FR1 UL preprocessor init routine, returns preprocessor to call */ -nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(int CC_id); +/* \brief default UL preprocessor init routine, returns preprocessor to call */ +nr_pp_impl_ul nr_init_ulsch_preprocessor(int CC_id); /////// Random Access MAC-PHY interface functions and primitives /////// diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index f8e6d120de..809ab825aa 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -294,8 +294,8 @@ void mac_top_init_gNB(ngran_node_t node_type, RC.nrmac[i]->pre_processor_dl = nr_preprocessor_phytest; RC.nrmac[i]->pre_processor_ul = nr_ul_preprocessor_phytest; } else { - RC.nrmac[i]->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(0); - RC.nrmac[i]->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(0); + RC.nrmac[i]->pre_processor_dl = nr_init_dlsch_preprocessor(0); + RC.nrmac[i]->pre_processor_ul = nr_init_ulsch_preprocessor(0); } if (!IS_SOFTMODEM_NOSTATS_BIT) threadCreate(&RC.nrmac[i]->stats_thread, nrmac_stats_thread, (void*)RC.nrmac[i], "MAC_STATS", -1, sched_get_priority_min(SCHED_OAI)+1 ); From 5e930b0b727c7cfeb6d758fdaca777275b15ea85 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 26 Sep 2024 16:36:08 +0200 Subject: [PATCH 21/54] MAC beam allocation for DLSCH --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 133 +++++++++++------- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 18 +-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 6 +- 3 files changed, 87 insertions(+), 70 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 69b06258dd..ce5bbfe9fd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -427,6 +427,7 @@ static bool allocate_dl_retransmission(module_id_t module_id, sub_frame_t slot, int *n_rb_sched, NR_UE_info_t *UE, + int beam_idx, int current_harq_pid) { @@ -447,7 +448,7 @@ static bool allocate_dl_retransmission(module_id_t module_id, const int coresetid = sched_ctrl->coreset->controlResourceSetId; const int tda = get_dl_tda(nr_mac, scc, slot); - AssertFatal(tda>=0,"Unable to find PDSCH time domain allocation in list\n"); + AssertFatal(tda >= 0,"Unable to find PDSCH time domain allocation in list\n"); /* Check first whether the old TDA can be reused * this helps allocate retransmission when TDA changes (e.g. new nrOfSymbols > old nrOfSymbols) */ @@ -468,8 +469,7 @@ static bool allocate_dl_retransmission(module_id_t module_id, reuse_old_tda ? "reuse" : "do not reuse", layers == retInfo->nrOfLayers ? "same" : "different"); - // TODO assuming beam 0 for now - uint16_t *rballoc_mask = nr_mac->common_channels[CC_id].vrb_map[0]; + uint16_t *rballoc_mask = nr_mac->common_channels[CC_id].vrb_map[beam_idx]; dl_bwp_info_t bwp_info = get_bwp_start_size(nr_mac, UE); int rbStart = bwp_info.bwpStart; @@ -541,16 +541,13 @@ static bool allocate_dl_retransmission(module_id_t module_id, retInfo->tda_info = temp_tda; } - // TODO properly set the beam index (currently only done for RA) - int beam = 0; - /* Find a free CCE */ int CCEIndex = get_cce_index(nr_mac, CC_id, slot, UE->rnti, &sched_ctrl->aggregation_level, - beam, + beam_idx, sched_ctrl->search_space, sched_ctrl->coreset, &sched_ctrl->sched_pdcch, @@ -566,7 +563,7 @@ static bool allocate_dl_retransmission(module_id_t module_id, int alloc = -1; if (!get_FeedbackDisabled(UE->sc_info.downlinkHARQ_FeedbackDisabled_r17, current_harq_pid)) { int r_pucch = nr_get_pucch_resource(sched_ctrl->coreset, ul_bwp->pucch_Config, CCEIndex); - alloc = nr_acknack_scheduling(nr_mac, UE, frame, slot, beam, r_pucch, 0); + alloc = nr_acknack_scheduling(nr_mac, UE, frame, slot, UE->UE_beam_index, r_pucch, 0); if (alloc < 0) { LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not find PUCCH for DL DCI retransmission\n", UE->rnti, frame, slot); return false; @@ -574,12 +571,7 @@ static bool allocate_dl_retransmission(module_id_t module_id, } sched_ctrl->cce_index = CCEIndex; - fill_pdcch_vrb_map(nr_mac, - CC_id, - &sched_ctrl->sched_pdcch, - CCEIndex, - sched_ctrl->aggregation_level, - beam); + fill_pdcch_vrb_map(nr_mac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, beam_idx); /* just reuse from previous scheduling opportunity, set new start RB */ sched_ctrl->sched_pdsch = *retInfo; sched_ctrl->sched_pdsch.rbStart = rbStart - bwp_info.bwpStart; @@ -608,13 +600,16 @@ static void pf_dl(module_id_t module_id, sub_frame_t slot, NR_UE_info_t **UE_list, int max_num_ue, - int n_rb_sched) + int num_beams, + int n_rb_sched[num_beams]) { gNB_MAC_INST *mac = RC.nrmac[module_id]; NR_ServingCellConfigCommon_t *scc=mac->common_channels[0].ServingCellConfigCommon; // UEs that could be scheduled UEsched_t UE_sched[MAX_MOBILES_PER_GNB + 1] = {0}; - int remainUEs = max_num_ue; + int remainUEs[num_beams]; + for (int i = 0; i < num_beams; i++) + remainUEs[i] = max_num_ue; int curUE = 0; int CC_id = 0; @@ -638,23 +633,30 @@ static void pf_dl(module_id_t module_id, const uint32_t b = UE->mac_stats.dl.current_bytes; UE->dl_thr_ue = (1 - a) * UE->dl_thr_ue + a * b; - if (remainUEs == 0) + int total_rem_ues = 0; + for (int i = 0; i < num_beams; i++) + total_rem_ues += remainUEs[i]; + if (total_rem_ues == 0) continue; /* retransmission */ if (sched_pdsch->dl_harq_pid >= 0) { + NR_beam_alloc_t beam = beam_allocation_procedure(&mac->beam_info, + frame, + slot, + UE->UE_beam_index, + nr_slots_per_frame[current_BWP->scs]); + bool sch_ret = beam.idx >= 0; /* Allocate retransmission */ - bool r = allocate_dl_retransmission(module_id, frame, slot, &n_rb_sched, UE, sched_pdsch->dl_harq_pid); - - if (!r) { - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] DL retransmission could not be allocated\n", - UE->rnti, - frame, - slot); + if (sch_ret) + sch_ret = allocate_dl_retransmission(module_id, frame, slot, &n_rb_sched[beam.idx], UE, beam.idx, sched_pdsch->dl_harq_pid); + if (!sch_ret) { + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] DL retransmission could not be allocated\n", UE->rnti, frame, slot); + reset_beam_status(&mac->beam_info, frame, slot, UE->UE_beam_index, nr_slots_per_frame[current_BWP->scs], beam.new_beam); continue; } /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ - remainUEs--; + remainUEs[beam.idx]--; } else { /* skip this UE if there are no free HARQ processes. This can happen e.g. @@ -716,7 +718,7 @@ static void pf_dl(module_id_t module_id, const int min_rbSize = 5; /* Loop UE_sched to find max coeff and allocate transmission */ - while (remainUEs> 0 && n_rb_sched >= min_rbSize && iterator->UE != NULL) { + while (iterator->UE != NULL) { NR_UE_sched_ctrl_t *sched_ctrl = &iterator->UE->UE_sched_ctrl; const uint16_t rnti = iterator->UE->rnti; @@ -732,6 +734,29 @@ static void pf_dl(module_id_t module_id, iterator++; continue; } + + NR_beam_alloc_t beam = beam_allocation_procedure(&mac->beam_info, + frame, + slot, + iterator->UE->UE_beam_index, + nr_slots_per_frame[dl_bwp->scs]); + + if (beam.idx < 0) { + // no available beam + iterator++; + continue; + } + if (remainUEs[beam.idx] == 0 || n_rb_sched[beam.idx] < min_rbSize) { + reset_beam_status(&mac->beam_info, + frame, + slot, + iterator->UE->UE_beam_index, + nr_slots_per_frame[dl_bwp->scs], + beam.new_beam); + iterator++; + continue; + } + NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; sched_pdsch->dl_harq_pid = sched_ctrl->available_dl_harq.head; @@ -754,8 +779,7 @@ static void pf_dl(module_id_t module_id, const uint16_t slbitmap = SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols); - // TODO assuming beam 0 for now - uint16_t *rballoc_mask = mac->common_channels[CC_id].vrb_map[0]; + uint16_t *rballoc_mask = mac->common_channels[CC_id].vrb_map[beam.idx]; dl_bwp_info_t bwp_info = get_bwp_start_size(mac, iterator->UE); int rbStart = 0; // WRT BWP start int rbStop = bwp_info.bwpSize - 1; @@ -782,24 +806,24 @@ static void pf_dl(module_id_t module_id, continue; } - // TODO properly set the beam index (currently only done for RA) - int beam = 0; - int CCEIndex = get_cce_index(mac, CC_id, slot, iterator->UE->rnti, &sched_ctrl->aggregation_level, - beam, + beam.idx, sched_ctrl->search_space, sched_ctrl->coreset, &sched_ctrl->sched_pdcch, false); - if (CCEIndex<0) { - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not find free CCE for DL DCI\n", - rnti, - frame, - slot); + if (CCEIndex < 0) { + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not find free CCE for DL DCI\n", rnti, frame, slot); + reset_beam_status(&mac->beam_info, + frame, + slot, + iterator->UE->UE_beam_index, + nr_slots_per_frame[dl_bwp->scs], + beam.new_beam); iterator++; continue; } @@ -810,19 +834,22 @@ static void pf_dl(module_id_t module_id, int alloc = -1; if (!get_FeedbackDisabled(iterator->UE->sc_info.downlinkHARQ_FeedbackDisabled_r17, sched_pdsch->dl_harq_pid)) { int r_pucch = nr_get_pucch_resource(sched_ctrl->coreset, ul_bwp->pucch_Config, CCEIndex); - alloc = nr_acknack_scheduling(mac, iterator->UE, frame, slot, beam, r_pucch, 0); + alloc = nr_acknack_scheduling(mac, iterator->UE, frame, slot, iterator->UE->UE_beam_index, r_pucch, 0); if (alloc < 0) { - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not find PUCCH for DL DCI\n", - rnti, - frame, - slot); + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not find PUCCH for DL DCI\n", rnti, frame, slot); + reset_beam_status(&mac->beam_info, + frame, + slot, + iterator->UE->UE_beam_index, + nr_slots_per_frame[dl_bwp->scs], + beam.new_beam); iterator++; continue; } } sched_ctrl->cce_index = CCEIndex; - fill_pdcch_vrb_map(mac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, beam); + fill_pdcch_vrb_map(mac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, beam.idx); sched_pdsch->dmrs_parms = get_dl_dmrs_params(scc, dl_bwp, tda_info, sched_pdsch->nrOfLayers); sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, dl_bwp->mcsTableIdx); @@ -851,25 +878,30 @@ static void pf_dl(module_id_t module_id, sched_pdsch->rbStart = rbStart; sched_pdsch->tb_size = TBS; /* transmissions: directly allocate */ - n_rb_sched -= sched_pdsch->rbSize; + n_rb_sched[beam.idx] -= sched_pdsch->rbSize; for (int rb = bwp_start; rb < sched_pdsch->rbSize; rb++) rballoc_mask[rb + sched_pdsch->rbStart] |= slbitmap; - remainUEs--; + remainUEs[beam.idx]--; iterator++; } } static void nr_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot) { - NR_UEs_t *UE_info = &RC.nrmac[module_id]->UE_info; + gNB_MAC_INST *mac = RC.nrmac[module_id]; + NR_UEs_t *UE_info = &mac->UE_info; if (UE_info->list[0] == NULL) return; - NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels[0].ServingCellConfigCommon; + NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon; int bw = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; + int num_beams = mac->beam_info.beam_allocation ? mac->beam_info.beams_per_period : 1; + int n_rb_sched[num_beams]; + for (int i = 0; i < num_beams; i++) + n_rb_sched[i] = bw; /* Retrieve amount of data to send for this UE */ nr_store_dlsch_buffer(module_id, frame, slot); @@ -881,12 +913,7 @@ static void nr_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_fram max_sched_ues = min(max_sched_ues, MAX_DCI_CORESET); /* proportional fair scheduling algorithm */ - pf_dl(module_id, - frame, - slot, - UE_info->list, - max_sched_ues, - bw); // we set the whole BW as max number + pf_dl(module_id, frame, slot, UE_info->list, max_sched_ues, num_beams, n_rb_sched); } nr_pp_impl_dl nr_init_dlsch_preprocessor(int CC_id) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 0e2f5cb5bf..1b6998ed83 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -558,23 +558,13 @@ int get_cce_index(const gNB_MAC_INST *nrmac, const uint32_t Y = is_common ? 0 : get_Y(ss, slot, rnti); uint8_t nr_of_candidates; - for (int i=0; i<5; i++) { + for (int i = 0; i < 5; i++) { // for now taking the lowest value among the available aggregation levels - find_aggregation_candidates(aggregation_level, - &nr_of_candidates, - ss, - 1<0) + find_aggregation_candidates(aggregation_level, &nr_of_candidates, ss, 1 << i); + if(nr_of_candidates > 0) break; } - int CCEIndex = find_pdcch_candidate(nrmac, - CC_id, - *aggregation_level, - nr_of_candidates, - beam_idx, - sched_pdcch, - coreset, - Y); + int CCEIndex = find_pdcch_candidate(nrmac, CC_id, *aggregation_level, nr_of_candidates, beam_idx, sched_pdcch, coreset, Y); return CCEIndex; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 6b1eb4abbb..64def07a9e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -983,7 +983,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, NR_UE_info_t *UE, frame_t frame, sub_frame_t slot, - int beam_index, + int ue_beam, int r_pucch, int is_common) { @@ -1073,7 +1073,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, else { // unoccupied occasion // checking if in ul_slot the resources potentially to be assigned to this PUCCH are available set_pucch_allocation(ul_bwp, r_pucch, bwp_size, curr_pucch); - NR_beam_alloc_t beam = beam_allocation_procedure(&mac->beam_info, pucch_frame, pucch_slot, beam_index, n_slots_frame); + NR_beam_alloc_t beam = beam_allocation_procedure(&mac->beam_info, pucch_frame, pucch_slot, ue_beam, n_slots_frame); if (beam.idx < 0) { LOG_D(NR_MAC, "DL %4d.%2d, UL_ACK %4d.%2d beam resources for this occasion are already occupied, move to the following occasion\n", @@ -1093,7 +1093,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, slot, pucch_frame, pucch_slot); - reset_beam_status(&mac->beam_info, pucch_frame, pucch_slot, beam_index, n_slots_frame, beam.new_beam); + reset_beam_status(&mac->beam_info, pucch_frame, pucch_slot, ue_beam, n_slots_frame, beam.new_beam); continue; } // allocating a new PUCCH structure for this occasion From 0cd0ec7a6727212ebf89b1893376374ab53c7907 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 26 Sep 2024 17:47:39 +0200 Subject: [PATCH 22/54] MAC beam allocation for ULSCH --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 177 ++++++++++++------ 1 file changed, 115 insertions(+), 62 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index f754c88040..b92b83425e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1644,6 +1644,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, sub_frame_t slot, uint16_t *rballoc_mask, int *n_rb_sched, + int dci_beam_idx, NR_UE_info_t* UE, int harq_pid, const NR_ServingCellConfigCommon_t *scc, @@ -1733,7 +1734,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, slot, UE->rnti, &sched_ctrl->aggregation_level, - 0, // TODO use beam index + dci_beam_idx, sched_ctrl->search_space, sched_ctrl->coreset, &sched_ctrl->sched_pdcch, @@ -1744,12 +1745,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, } sched_ctrl->cce_index = CCEIndex; - fill_pdcch_vrb_map(nrmac, - CC_id, - &sched_ctrl->sched_pdcch, - CCEIndex, - sched_ctrl->aggregation_level, - 0); // TODO use beam index when implemented + fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam_idx); retInfo->frame = (frame + (slot + tda_info.k2) / nr_slots_per_frame[ul_bwp->scs]) % MAX_FRAME_NUMBER; retInfo->slot = (slot + tda_info.k2) % nr_slots_per_frame[ul_bwp->scs]; @@ -1793,7 +1789,8 @@ static void pf_ul(module_id_t module_id, int sched_slot, NR_UE_info_t *UE_list[], int max_num_ue, - int n_rb_sched) + int num_beams, + int n_rb_sched[num_beams]) { const int CC_id = 0; gNB_MAC_INST *nrmac = RC.nrmac[module_id]; @@ -1802,7 +1799,9 @@ static void pf_ul(module_id_t module_id, const int min_rb = nrmac->min_grant_prb; // UEs that could be scheduled UEsched_t UE_sched[MAX_MOBILES_PER_GNB + 1] = {0}; - int remainUEs = max_num_ue; + int remainUEs[num_beams]; + for (int i = 0; i < num_beams; i++) + remainUEs[i] = max_num_ue; int curUE = 0; /* Loop UE_list to calculate throughput and coeff */ @@ -1823,42 +1822,66 @@ static void pf_ul(module_id_t module_id, const uint32_t b = stats->current_bytes; UE->ul_thr_ue = (1 - a) * UE->ul_thr_ue + a * b; - if(remainUEs == 0) + int total_rem_ues = 0; + for (int i = 0; i < num_beams; i++) + total_rem_ues += remainUEs[i]; + if (total_rem_ues == 0) continue; + int n_dl = nr_slots_per_frame[UE->current_DL_BWP.scs]; + NR_beam_alloc_t dci_beam = beam_allocation_procedure(&nrmac->beam_info, frame, slot, UE->UE_beam_index, n_dl); + if (dci_beam.idx < 0) { + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] Beam could not be allocated\n", UE->rnti, frame, slot); + continue; + } + + int n = nr_slots_per_frame[current_BWP->scs]; + NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, UE->UE_beam_index, n); + if (beam.idx < 0) { + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] Beam could not be allocated\n", UE->rnti, frame, slot); + reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, n_dl, dci_beam.new_beam); + continue; + } const int index = ul_buffer_index(sched_frame, sched_slot, current_BWP->scs, nrmac->vrb_map_UL_size); - // TODO improve handling of beam in vrb_map (for now just using 0) - uint16_t *rballoc_mask = &nrmac->common_channels[CC_id].vrb_map_UL[0][index * MAX_BWP_SIZE]; + uint16_t *rballoc_mask = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; /* Check if retransmission is necessary */ sched_pusch->ul_harq_pid = sched_ctrl->retrans_ul_harq.head; - LOG_D(NR_MAC,"pf_ul: UE %04x harq_pid %d\n",UE->rnti,sched_pusch->ul_harq_pid); + LOG_D(NR_MAC,"pf_ul: UE %04x harq_pid %d\n", UE->rnti, sched_pusch->ul_harq_pid); if (sched_pusch->ul_harq_pid >= 0) { /* Allocate retransmission*/ const int tda = get_ul_tda(nrmac, scc, sched_frame, sched_slot); - bool r = allocate_ul_retransmission(nrmac, frame, slot, rballoc_mask, &n_rb_sched, UE, sched_pusch->ul_harq_pid, scc, tda); + bool r = allocate_ul_retransmission(nrmac, + frame, + slot, + rballoc_mask, + &n_rb_sched[beam.idx], + dci_beam.idx, + UE, + sched_pusch->ul_harq_pid, + scc, + tda); if (!r) { - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] UL retransmission could not be allocated\n", - UE->rnti, - frame, - slot); + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] UL retransmission could not be allocated\n", UE->rnti, frame, slot); + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, UE->UE_beam_index, n, beam.new_beam); + reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, n_dl, dci_beam.new_beam); continue; } - else LOG_D(NR_MAC,"%4d.%2d UL Retransmission UE RNTI %04x to be allocated, max_num_ue %d\n",frame,slot,UE->rnti,max_num_ue); + else + LOG_D(NR_MAC,"%4d.%2d UL Retransmission UE RNTI %04x to be allocated, max_num_ue %d\n", frame, slot, UE->rnti,max_num_ue); /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ - remainUEs--; + remainUEs[beam.idx]--; continue; - } + } /* skip this UE if there are no free HARQ processes. This can happen e.g. * if the UE disconnected in L2sim, in which case the gNB is not notified * (this can be considered a design flaw) */ if (sched_ctrl->available_ul_harq.head < 0) { - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] has no free UL HARQ process, skipping\n", - UE->rnti, - frame, - slot); + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, UE->UE_beam_index, n, beam.new_beam); + reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, n_dl, dci_beam.new_beam); + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] has no free UL HARQ process, skipping\n", UE->rnti, frame, slot); continue; } @@ -1866,8 +1889,10 @@ static void pf_ul(module_id_t module_id, /* preprocessor computed sched_frame/sched_slot */ const bool do_sched = nr_UE_is_to_be_scheduled(scc, 0, UE, sched_frame, sched_slot, nrmac->ulsch_max_frame_inactivity); - LOG_D(NR_MAC,"pf_ul: do_sched UE %04x => %s\n",UE->rnti,do_sched ? "yes" : "no"); + LOG_D(NR_MAC,"pf_ul: do_sched UE %04x => %s\n", UE->rnti, do_sched ? "yes" : "no"); if ((B == 0 && !do_sched) || nr_timer_is_active(&sched_ctrl->transm_interrupt)) { + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, UE->UE_beam_index, n, beam.new_beam); + reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, n_dl, dci_beam.new_beam); continue; } @@ -1879,7 +1904,7 @@ static void pf_ul(module_id_t module_id, sched_ctrl->ul_bler_stats.mcs = sched_pusch->mcs; } else { sched_pusch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->ul_bler_stats, max_mcs, frame); - LOG_D(NR_MAC,"%d.%d starting mcs %d bleri %f\n",frame,slot,sched_pusch->mcs,sched_ctrl->ul_bler_stats.bler); + LOG_D(NR_MAC,"%d.%d starting mcs %d bleri %f\n", frame, slot, sched_pusch->mcs, sched_ctrl->ul_bler_stats.bler); } /* Schedule UE on SR or UL inactivity and no data (otherwise, will be scheduled * based on data to transmit) */ @@ -1889,16 +1914,15 @@ static void pf_ul(module_id_t module_id, int CCEIndex = get_cce_index(nrmac, CC_id, slot, UE->rnti, &sched_ctrl->aggregation_level, - 0, // TODO use beam index + dci_beam.idx, sched_ctrl->search_space, sched_ctrl->coreset, &sched_ctrl->sched_pdcch, false); - if (CCEIndex<0) { - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] no free CCE for UL DCI (BSR 0)\n", - UE->rnti, - frame, - slot); + if (CCEIndex < 0) { + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] no free CCE for UL DCI (BSR 0)\n", UE->rnti, frame, slot); + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, UE->UE_beam_index, n, beam.new_beam); + reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, n_dl, dci_beam.new_beam); continue; } @@ -1910,10 +1934,7 @@ static void pf_ul(module_id_t module_id, TYPE_C_RNTI_, sched_pusch->time_domain_allocation); AssertFatal(sched_pusch->tda_info.valid_tda, "Invalid TDA from get_ul_tda_info\n"); - sched_pusch->dmrs_info = get_ul_dmrs_params(scc, - current_BWP, - &sched_pusch->tda_info, - sched_pusch->nrOfLayers); + sched_pusch->dmrs_info = get_ul_dmrs_params(scc, current_BWP, &sched_pusch->tda_info, sched_pusch->nrOfLayers); int rbStart = 0; // wrt BWP start LOG_D(NR_MAC, @@ -1935,11 +1956,13 @@ static void pf_ul(module_id_t module_id, rbStart, min_rb, bwpSize); + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, UE->UE_beam_index, n, beam.new_beam); + reset_beam_status(&nrmac->beam_info, frame, slot, UE->UE_beam_index, n_dl, dci_beam.new_beam); continue; } sched_ctrl->cce_index = CCEIndex; - fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, 0); // TODO use beam index + fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam.idx); NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; sched_pusch->mcs = min(nrmac->min_grant_mcs, sched_pusch->mcs); @@ -1977,11 +2000,11 @@ static void pf_ul(module_id_t module_id, sched_pusch->phr_txpower_calc); /* Mark the corresponding RBs as used */ - n_rb_sched -= sched_pusch->rbSize; + n_rb_sched[beam.idx] -= sched_pusch->rbSize; for (int rb = bwpStart; rb < sched_ctrl->sched_pusch.rbSize; rb++) rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] |= slbitmap; - remainUEs--; + remainUEs[beam.idx]--; continue; } @@ -2006,31 +2029,59 @@ static void pf_ul(module_id_t module_id, UEsched_t *iterator=UE_sched; /* Loop UE_sched to find max coeff and allocate transmission */ - while (remainUEs > 0 && n_rb_sched >= min_rb && iterator->UE != NULL) { - + while (iterator->UE != NULL) { + NR_UE_UL_BWP_t *current_BWP = &iterator->UE->current_UL_BWP; + NR_UE_DL_BWP_t *dl_BWP = &iterator->UE->current_DL_BWP; NR_UE_sched_ctrl_t *sched_ctrl = &iterator->UE->UE_sched_ctrl; + NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; + + int n = nr_slots_per_frame[current_BWP->scs]; + NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, + sched_pusch->frame, + sched_pusch->slot, + iterator->UE->UE_beam_index, + n); + if (beam.idx < 0) { + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] Beam could not be allocated\n", iterator->UE->rnti, frame, slot); + iterator++; + continue; + } + + if (remainUEs[beam.idx] == 0 || n_rb_sched[beam.idx] < min_rb) { + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, iterator->UE->UE_beam_index, n, beam.new_beam); + iterator++; + continue; + } + + int n_dl = nr_slots_per_frame[dl_BWP->scs]; + NR_beam_alloc_t dci_beam = beam_allocation_procedure(&nrmac->beam_info, frame, slot, iterator->UE->UE_beam_index, n_dl); + if (dci_beam.idx < 0) { + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] Beam could not be allocated\n", iterator->UE->rnti, frame, slot); + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, iterator->UE->UE_beam_index, n, beam.new_beam); + iterator++; + continue; + } + int CCEIndex = get_cce_index(nrmac, CC_id, slot, iterator->UE->rnti, &sched_ctrl->aggregation_level, - 0, // TODO use beam index + dci_beam.idx, sched_ctrl->search_space, sched_ctrl->coreset, &sched_ctrl->sched_pdcch, false); - if (CCEIndex<0) { - LOG_D(NR_MAC, "[UE %04x][%4d.%2d] no free CCE for UL DCI\n", - iterator->UE->rnti, - frame, - slot); + if (CCEIndex < 0) { + reset_beam_status(&nrmac->beam_info, frame, slot, iterator->UE->UE_beam_index, n_dl, dci_beam.new_beam); + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, iterator->UE->UE_beam_index, n, beam.new_beam); + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] no free CCE for UL DCI\n", iterator->UE->rnti, frame, slot); iterator++; continue; } - else LOG_D(NR_MAC, "%4d.%2d free CCE for UL DCI UE %04x\n",frame,slot, iterator->UE->rnti); + else + LOG_D(NR_MAC, "%4d.%2d free CCE for UL DCI UE %04x\n", frame, slot, iterator->UE->rnti); - NR_UE_UL_BWP_t *current_BWP = &iterator->UE->current_UL_BWP; - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; sched_pusch->nrOfLayers = sched_ctrl->srs_feedback.ul_ri + 1; sched_pusch->time_domain_allocation = get_ul_tda(nrmac, scc, sched_frame, sched_slot); @@ -2040,14 +2091,10 @@ static void pf_ul(module_id_t module_id, TYPE_C_RNTI_, sched_pusch->time_domain_allocation); AssertFatal(sched_pusch->tda_info.valid_tda, "Invalid TDA from get_ul_tda_info\n"); - sched_pusch->dmrs_info = get_ul_dmrs_params(scc, - current_BWP, - &sched_pusch->tda_info, - sched_pusch->nrOfLayers); + sched_pusch->dmrs_info = get_ul_dmrs_params(scc, current_BWP, &sched_pusch->tda_info, sched_pusch->nrOfLayers); const int index = ul_buffer_index(sched_frame, sched_slot, current_BWP->scs, nrmac->vrb_map_UL_size); - // TODO improve handling of beam in vrb_map (for now just using 0) - uint16_t *rballoc_mask = &nrmac->common_channels[CC_id].vrb_map_UL[0][index * MAX_BWP_SIZE]; + uint16_t *rballoc_mask = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE]; int rbStart = 0; const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols); @@ -2061,6 +2108,8 @@ static void pf_ul(module_id_t module_id, max_rbSize++; if (rbStart + min_rb >= bwpSize || max_rbSize < min_rb) { + reset_beam_status(&nrmac->beam_info, frame, slot, iterator->UE->UE_beam_index, n_dl, dci_beam.new_beam); + reset_beam_status(&nrmac->beam_info, sched_pusch->frame, sched_pusch->slot, iterator->UE->UE_beam_index, n, beam.new_beam); LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not allocate UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", iterator->UE->rnti, frame, @@ -2135,14 +2184,14 @@ static void pf_ul(module_id_t module_id, /* Mark the corresponding RBs as used */ sched_ctrl->cce_index = CCEIndex; - fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, 0); // TODO use beam index + fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam.idx); - n_rb_sched -= sched_pusch->rbSize; + n_rb_sched[beam.idx] -= sched_pusch->rbSize; for (int rb = bwpStart; rb < sched_ctrl->sched_pusch.rbSize; rb++) rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] |= slbitmap; /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ - remainUEs--; + remainUEs[beam.idx]--; iterator++; } } @@ -2167,8 +2216,12 @@ static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_fram if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[sched_slot / 64], sched_slot)) return false; + int num_beams = nr_mac->beam_info.beam_allocation ? nr_mac->beam_info.beams_per_period : 1; int bw = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; - + int len[num_beams]; + for (int i = 0; i < num_beams; i++) + len[i] = bw; + int average_agg_level = 4; // TODO find a better estimation int max_sched_ues = bw / (average_agg_level * NR_NB_REG_PER_CCE); @@ -2176,7 +2229,7 @@ static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_fram max_sched_ues = min(max_sched_ues, MAX_DCI_CORESET); /* proportional fair scheduling algorithm */ - pf_ul(module_id, frame, slot, sched_frame, sched_slot, nr_mac->UE_info.list, max_sched_ues, bw); + pf_ul(module_id, frame, slot, sched_frame, sched_slot, nr_mac->UE_info.list, max_sched_ues, num_beams, len); return true; } From a9c72222dd7bf2e833ed833eef6216c2c92126ae Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 3 Oct 2024 12:25:13 +0200 Subject: [PATCH 23/54] minor: adding two logs for debugging --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 1 + openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index bcd5cfb26c..80bb00cfac 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -116,6 +116,7 @@ void clear_beam_information(NR_beam_info_t *beam_info, int frame, int slot, int idx_to_clear = (idx_to_clear + beam_info->beam_allocation_size - 1) % beam_info->beam_allocation_size; if (slot % beam_info->beam_duration == 0) { // resetting previous period allocation + LOG_D(NR_MAC, "%d.%d Clear beam information for index %d\n", frame, slot, idx_to_clear); for (int i = 0; i < beam_info->beams_per_period; i++) beam_info->beam_allocation[i][idx_to_clear] = -1; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 1b6998ed83..004a0394f6 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -3194,8 +3194,10 @@ NR_beam_alloc_t beam_allocation_procedure(NR_beam_info_t *beam_info, int frame, beam_struct.new_beam = true; *beam = beam_index; } - if (*beam == beam_index) + if (*beam == beam_index) { + LOG_D(NR_MAC, "%d.%d Using beam structure with index %d for beam %d (%s)\n", frame, slot, beam_struct.idx, beam_index, beam_struct.new_beam ? "new beam" : "old beam"); return beam_struct; + } } return (NR_beam_alloc_t) {.new_beam = false, .idx = -1}; @@ -3220,7 +3222,7 @@ void beam_selection_procedures(gNB_MAC_INST *mac, NR_UE_info_t *UE) if (UE->UE_beam_index == new_bf_index) return; // no beam change needed - LOG_I(NR_MAC, "Switching to beam with ID %d corresponding to SSB %d\n", new_bf_index, rsrp_report->resource_id[0]); + LOG_I(NR_MAC, "[UE %x] Switching to beam with ID %d (SSB number %d)\n", UE->rnti, new_bf_index, rsrp_report->resource_id[0]); UE->UE_beam_index = new_bf_index; } From 75162adf6868031057a83b0b7215d42edf1a4087 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Thu, 19 Dec 2024 07:55:27 +0100 Subject: [PATCH 24/54] Improve assert in completed_task_ans() This assert checks if the structure is correctly initialized. The structure is one-time use so the assert is valid, but the value of the atomic was added to the output to improve debugging. --- common/utils/threadPool/task_ans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/utils/threadPool/task_ans.c b/common/utils/threadPool/task_ans.c index 5a1a2c8764..f7e876568f 100644 --- a/common/utils/threadPool/task_ans.c +++ b/common/utils/threadPool/task_ans.c @@ -31,8 +31,8 @@ void completed_task_ans(task_ans_t* task) { DevAssert(task != NULL); - if (atomic_load_explicit(&task->status, memory_order_acquire) != 0) - AssertFatal(0, "Task already finished?"); + int status = atomic_load_explicit(&task->status, memory_order_acquire); + AssertFatal(status == 0, "Task not expected to be finished here. Status = %d\n", status); atomic_store_explicit(&task->status, 1, memory_order_release); } From 88cde50d4cf87eac076b729443a321af3820e054 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Thu, 19 Dec 2024 07:57:49 +0100 Subject: [PATCH 25/54] Refactor PUSCH per-symbol threadpool utilization A small refactor for PUSCH per-symbol processing. This fixes a possible issue in case num_pusch_symbols_per_thread is not 1 --- openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index 43f6417c10..8c8b8212a2 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -1481,15 +1481,16 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, start_meas(&gNB->rx_pusch_symbol_processing_stats); int numSymbols = gNB->num_pusch_symbols_per_thread; int total_res = 0; - int const loop_iter = rel15_ul->nr_of_symbols / numSymbols; + int const loop_iter = CEILIDIV(rel15_ul->nr_of_symbols, numSymbols); puschSymbolProc_t arr[loop_iter]; task_ans_t arr_ans[loop_iter]; - memset(arr_ans, 0, loop_iter * sizeof(task_ans_t)); + memset(arr_ans, 0, sizeof(arr_ans)); int sz_arr = 0; - for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < end_symbol; symbol += numSymbols) { + for(uint8_t task_index = 0; task_index < loop_iter; task_index++) { + int symbol = task_index * numSymbols + rel15_ul->start_symbol_index; int res_per_task = 0; - for (int s = 0; s < numSymbols; s++) { + for (int s = 0; s < numSymbols && s + symbol < end_symbol; s++) { pusch_vars->ul_valid_re_per_slot[symbol+s] = get_nb_re_pusch(frame_parms,rel15_ul,symbol+s); pusch_vars->llr_offset[symbol+s] = ((symbol+s) == rel15_ul->start_symbol_index) ? 0 : @@ -1507,7 +1508,8 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, rdata->rel15_ul = rel15_ul; rdata->slot = slot; rdata->startSymbol = symbol; - rdata->numSymbols = numSymbols; + // Last task processes remainder symbols + rdata->numSymbols = task_index == loop_iter - 1 ? rel15_ul->nr_of_symbols - (loop_iter - 1) * numSymbols : numSymbols; rdata->ulsch_id = ulsch_id; rdata->llr = pusch_vars->llr; rdata->llr_layers = pusch_vars->llr_layers; From 70933edd19b47e215dc9f2a4b9cb5f322eec4f34 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 3 Jan 2025 09:40:59 +0100 Subject: [PATCH 26/54] fix(docker): typo on BUILD_OPTIONS Signed-off-by: Raphael Defosseux --- docker/Dockerfile.build.fhi72.ubuntu22 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile.build.fhi72.ubuntu22 b/docker/Dockerfile.build.fhi72.ubuntu22 index e40bff5c48..f4a4ab6de7 100644 --- a/docker/Dockerfile.build.fhi72.ubuntu22 +++ b/docker/Dockerfile.build.fhi72.ubuntu22 @@ -71,7 +71,7 @@ RUN /bin/sh oaienv && \ --gNB \ --build-lib "telnetsrv enbscope uescope nrscope" \ -t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \ - --build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION && \ + --build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \ $BUILD_OPTION && \ # Mainly to see if the sanitize option was perfectly executed ldd ran_build/build/nr-softmodem && \ From 1b9fcc98587eb6a22886a2fc6a0fccbd737f9658 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 3 Jan 2025 09:42:49 +0100 Subject: [PATCH 27/54] fix(ci): adding leading lines and increasing visibility for building errors Signed-off-by: Raphael Defosseux --- cmake_targets/tools/build_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 45357d2277..5fee5ac48d 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -226,7 +226,7 @@ compilations() { ret=$? } > $dlog/$logfile 2>&1 # Print the errors and warnings for CI purposes - grep -E -A3 "warning:|error:" $dlog/$logfile || true + grep -E -A5 -B5 "warning:|error:| Error " $dlog/$logfile || true check_warnings "$dlog/$logfile" if [[ $ret -eq 0 ]]; then echo_success "$targets compiled" From 7bb585cc0ebb2f0b3a4c38a98bfafde5d426799a Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 12 Dec 2024 10:54:50 +0100 Subject: [PATCH 28/54] further cleanup of PRACH config file parameters in GENERIC-LTE-EPC --- targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf | 2 +- .../CONF/gnb.band257.tm1.32PRB.usrpn300.conf | 4 ++-- .../CONF/gnb.band257.tm1.32PRB.usrpx300.conf | 4 ++-- .../CONF/gnb.band257.tm1.66PRB.usrpn300.conf | 2 +- .../CONF/gnb.band261.tm1.32PRB.usrpn300.conf | 4 ++-- .../CONF/gnb.band66.tm1.106PRB.usrpn300.conf | 2 +- .../CONF/gnb.band66.tm1.106PRB.usrpx300.conf | 2 +- .../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf | 2 +- .../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf | 2 +- .../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf | 2 +- .../CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf | 2 +- .../GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf | 2 +- targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf | 6 +++--- .../CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf | 2 +- .../CONF/gnb.band78.tm1.106PRB.usrpb210.conf | 6 +++--- .../CONF/gnb.band78.tm1.106PRB.usrpn300.conf | 2 +- .../CONF/gnb.band78.tm1.106PRB.usrpx300.conf | 2 +- .../CONF/gnb.band78.tm1.217PRB.usrpn300.conf | 2 +- .../CONF/gnb.band78.tm1.217PRB.usrpx300.conf | 2 +- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf | 2 +- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf | 2 +- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf | 2 +- .../CONF/gnb.band78.tm1.273PRB.usrpn300.conf | 2 +- .../GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf | 2 +- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf index e849eb3f6c..ef39165e42 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf @@ -91,7 +91,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf index 060c9a2564..f44a412b3c 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf @@ -87,8 +87,8 @@ gNBs = ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 7; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf index 31ddcc4e75..3c0feb2ddc 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf @@ -87,8 +87,8 @@ gNBs = ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 7; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf index 587e77e839..fa2dca082f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf index 08d78c2e4e..8ded185653 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf @@ -87,8 +87,8 @@ gNBs = ra_ResponseWindow = 7; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 7; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf index 32b0eb9658..260c844b25 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf @@ -89,7 +89,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf index ff860ad7a1..67ea04255c 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf @@ -90,7 +90,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf index 18cceef18b..ea1e70fa87 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf @@ -90,7 +90,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf index efdad8ef4f..58adeb991e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpn300.conf @@ -90,7 +90,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf index 886b213c19..227f06bd8b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf @@ -90,7 +90,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf index d0b023b828..d863f36409 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf index 174a54fb7e..0dcd0b95e4 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf index cb76b23ed0..ef95a53a7d 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf @@ -85,9 +85,9 @@ gNBs = #1,2,4,8,10,20,40,80 ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#0=oneeighth,1=onefourth,2=half,3=one,4=two,5=four,6=eight,7=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf index 142fb423a7..554b886010 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; - #oneHalf (0..15) 4,8,12,16,...60,64 + #one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf index 28130500d8..b3d3775208 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf @@ -85,9 +85,9 @@ gNBs = #1,2,4,8,10,20,40,80 ra_ResponseWindow = 4; #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#0=oneeighth,1=onefourth,2=half,3=one,4=two,5=four,6=eight,7=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; -#oneHalf (0..15) 4,8,12,16,...60,64 +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf index 0de8ba8c09..dd9b571b33 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf index babe3f5d47..49108d242b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf index 00325d43cd..1246e44b2b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf @@ -87,7 +87,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf index c12d4f5997..e4f2fb8699 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf index 4aa5eb633c..7dfbb5ee95 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf index 4dbaf377df..ad610601a0 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf index 490b735f09..8107c5ffc6 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf index 49d7eb7565..167ad9b802 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf index 733d806eef..6e71635924 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf @@ -88,7 +88,7 @@ gNBs = #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 +#one (0..15) 4,8,12,16,...60,64 ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; #ra_ContentionResolutionTimer #(0..7) 8,16,24,32,40,48,56,64 From d718e6779780ac3b00b1016681dc67091148e951 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 6 Jan 2025 09:32:03 +0100 Subject: [PATCH 29/54] automatic determination of DCI mask size at the UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 8a46ad9a25..038d699836 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -3011,10 +3011,10 @@ void nr_ue_send_sdu(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_info, in // Fixme: Intel Endianess only procedure static inline int readBits(const uint8_t *dci, int *start, int length) { - const int mask[] = {0, 1, 3, 7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff}; + uint32_t mask = (1U << length) - 1; uint64_t *tmp = (uint64_t *)dci; *start -= length; - return *tmp >> *start & mask[length]; + return *tmp >> *start & mask; } static void extract_10_ra_rnti(dci_pdu_rel15_t *dci_pdu_rel15, const uint8_t *dci_pdu, int pos, const int N_RB) From 4dd69427d827f30054fd31a4d9691014260d617a Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 26 Nov 2024 18:49:38 +0100 Subject: [PATCH 30/54] set MSG3 TPC based on preamble power indicated from L1 --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 29 +++++++++++++------ openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 19 ++++++------ openair2/NR_PHY_INTERFACE/NR_IF_Module.c | 3 +- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index edf0f8c25e..cae614d90e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -676,14 +676,25 @@ static NR_RA_t *find_free_nr_RA(NR_RA_t *ra_base, int ra_count, uint16_t preambl return NULL; } +static uint8_t nr_get_msg3_tpc(uint32_t preamble_power) +{ + // TODO not sure how to implement TPC for MSG3 to be sent in RAR + // maybe using preambleReceivedTargetPower as a term of comparison + // in any case OAI L1 sets this as invalid + // and Aerial report doesn't seem to be reliable (not matching preambleReceivedTargetPower) + // so for now we feedback 0dB TPC + return 3; // it means 0dB +} + void nr_initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, - sub_frame_t slotP, + int slotP, uint16_t preamble_index, uint8_t freq_index, uint8_t symbol, - int16_t timing_offset) + int16_t timing_offset, + uint32_t preamble_power) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1); @@ -714,6 +725,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, ra->preamble_slot = slotP; ra->preamble_index = preamble_index; ra->timing_offset = timing_offset; + ra->msg3_TPC = nr_get_msg3_tpc(preamble_power); uint8_t ul_carrier_id = 0; // 0 for NUL 1 for SUL ra->RA_rnti = nr_get_ra_rnti(symbol, slotP, freq_index, ul_carrier_id); @@ -2336,9 +2348,7 @@ static void nr_fill_rar(uint8_t Mod_idP, NR_RA_t *ra, uint8_t *dlsch_buffer, nfa NR_RA_HEADER_BI *rarbi = (NR_RA_HEADER_BI *) dlsch_buffer; NR_RA_HEADER_RAPID *rarh = (NR_RA_HEADER_RAPID *) (dlsch_buffer + 1); NR_MAC_RAR *rar = (NR_MAC_RAR *) (dlsch_buffer + 2); - unsigned char csi_req = 0, tpc_command; - - tpc_command = 3; // This is 0 dB in RAR UL grant + unsigned char csi_req = 0; /// E/T/R/R/BI subheader /// // E = 1, MAC PDU includes another MAC sub-PDU (RAPID) @@ -2370,8 +2380,6 @@ static void nr_fill_rar(uint8_t Mod_idP, NR_RA_t *ra, uint8_t *dlsch_buffer, nfa // UL grant - ra->msg3_TPC = 1; // This is 0 dB in UL DCI - if (pusch_pdu->frequency_hopping) AssertFatal(1==0,"PUSCH with frequency hopping currently not supported"); @@ -2380,7 +2388,7 @@ static void nr_fill_rar(uint8_t Mod_idP, NR_RA_t *ra, uint8_t *dlsch_buffer, nfa int valid_bits = 14; int f_alloc = prb_alloc & ((1 << valid_bits) - 1); - uint32_t ul_grant = csi_req | (tpc_command << 1) | (pusch_pdu->mcs_index << 4) | (ra->Msg3_tda_id << 8) | (f_alloc << 12) | (pusch_pdu->frequency_hopping << 26); + uint32_t ul_grant = csi_req | (ra->msg3_TPC << 1) | (pusch_pdu->mcs_index << 4) | (ra->Msg3_tda_id << 8) | (f_alloc << 12) | (pusch_pdu->frequency_hopping << 26); rar->UL_GRANT_1 = (uint8_t) (ul_grant >> 24) & 0x07; rar->UL_GRANT_2 = (uint8_t) (ul_grant >> 16) & 0xff; @@ -2410,9 +2418,12 @@ static void nr_fill_rar(uint8_t Mod_idP, NR_RA_t *ra, uint8_t *dlsch_buffer, nfa rar->TA2 + (rar->TA1 << 5), rar->UL_GRANT_4 >> 4, rar->UL_GRANT_1 >> 2, - tpc_command, + ra->msg3_TPC, csi_req, rar->TCRNTI_2 + (rar->TCRNTI_1 << 8)); + + // resetting msg3 TPC to 0dB for possible retransmissions + ra->msg3_TPC = 1; } void nr_schedule_RA(module_id_t module_idP, diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 3e9f02d7ff..8022ff3e2f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -120,16 +120,15 @@ void nr_schedule_RA(module_id_t module_idP, nfapi_nr_dl_tti_request_t *DL_req, nfapi_nr_tx_data_request_t *TX_req); -/* \brief Function to indicate a received preamble on PRACH. It initiates the RA procedure. -@param module_idP Instance ID of gNB -@param preamble_index index of the received RA request -@param slotP Slot number on which to act -@param timing_offset Offset in samples of the received PRACH w.r.t. eNB timing. This is used to -@param rnti RA rnti corresponding to this PRACH preamble -@param rach_resource type (0=non BL/CE,1 CE level 0,2 CE level 1, 3 CE level 2,4 CE level 3) -*/ -void nr_initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, - uint16_t preamble_index, uint8_t freq_index, uint8_t symbol, int16_t timing_offset); +void nr_initiate_ra_proc(module_id_t module_idP, + int CC_id, + frame_t frameP, + int slotP, + uint16_t preamble_index, + uint8_t freq_index, + uint8_t symbol, + int16_t timing_offset, + uint32_t preamble_power); void nr_clear_ra_proc(NR_RA_t *ra); diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c index 507e4191d0..f833061a27 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c @@ -94,7 +94,8 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) UL_info->rach_ind.pdu_list[i].preamble_list[0].preamble_index, UL_info->rach_ind.pdu_list[i].freq_index, UL_info->rach_ind.pdu_list[i].symbol_index, - UL_info->rach_ind.pdu_list[i].preamble_list[0].timing_advance); + UL_info->rach_ind.pdu_list[i].preamble_list[0].timing_advance, + UL_info->rach_ind.pdu_list[i].preamble_list[0].preamble_pwr); } } } From d6f678ffc13277c50d42d36a4c6d925e74053cce Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 26 Nov 2024 19:00:27 +0100 Subject: [PATCH 31/54] set TPC for MSG3 retransmissions --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 7f849253da..251b1d859c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -987,9 +987,12 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, if (ra->ra_state != nrRA_WAIT_Msg3) continue; - if( (frameP!=ra->Msg3_frame) || (slotP!=ra->Msg3_slot)) + if((frameP!=ra->Msg3_frame) || (slotP!=ra->Msg3_slot)) continue; + if (ul_cqi != 0xff) + ra->msg3_TPC = nr_get_tpc(target_snrx10, ul_cqi, 30, 0); + handle_msg3_failed_rx(ra, i, gNB_mac->ul_bler.harq_round_max); } } From a7b9a856409974fe3387ac553b8319b82ba1b068 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 6 Jan 2025 12:06:40 +0100 Subject: [PATCH 32/54] move temporary code to process type0 as type1 when the RB allocation is contiguous to L1 --- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 20 ++++++++++++++++++++ openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 18 ------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 4ab9167c0a..c6a477a8ee 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -287,6 +287,26 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0, NR_UE_MAC_INST_t *mac, int rnti) { + // Temporary code to process type0 as type1 when the RB allocation is contiguous + if (dlsch_config_pdu->resource_alloc == 0) { + dlsch_config_pdu->number_rbs = count_bits(dlsch_config_pdu->rb_bitmap, sizeofArray(dlsch_config_pdu->rb_bitmap)); + int state = 0; + for (int i = 0; i < sizeof(dlsch_config_pdu->rb_bitmap) * 8; i++) { + int allocated = dlsch_config_pdu->rb_bitmap[i / 8] & (1 << (i % 8)); + if (allocated) { + if (state == 0) { + dlsch_config_pdu->start_rb = i; + state = 1; + } else + AssertFatal(state == 1, "non-contiguous RB allocation in RB allocation type 0 not implemented"); + } else { + if (state == 1) { + state = 2; + } + } + } + } + const uint8_t current_harq_pid = dlsch_config_pdu->harq_process_nbr; dlsch0->active = true; dlsch0->rnti = rnti; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 038d699836..272d2b93bd 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -390,24 +390,6 @@ int8_t nr_ue_process_dci_freq_dom_resource_assignment(nfapi_nr_ue_pusch_pdu_t *p const int tmp=(start_DLBWP + n_RB_DLBWP) % P; int last_RBG = tmp ? tmp : P; writeBit(rb_bitmap, currentBit, last_bit_rbg, last_RBG); - - dlsch_config_pdu->number_rbs = count_bits(dlsch_config_pdu->rb_bitmap, sizeofArray(dlsch_config_pdu->rb_bitmap)); - // Temporary code to process type0 as type1 when the RB allocation is contiguous - int state = 0; - for (int i = 0; i < sizeof(dlsch_config_pdu->rb_bitmap) * 8; i++) { - int allocated = dlsch_config_pdu->rb_bitmap[i / 8] & (1 << (i % 8)); - if (allocated) { - if (state == 0) { - dlsch_config_pdu->start_rb = i; - state = 1; - } else - AssertFatal(state == 1, "non-contiguous RB allocation in RB allocation type 0 not implemented"); - } else { - if (state == 1) { - state = 2; - } - } - } } else if (pdsch_Config && pdsch_Config->resourceAllocation == NR_PDSCH_Config__resourceAllocation_dynamicSwitch) From 9c0d90a014a68e32e5256d372bce76848e5b28a1 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 13 Nov 2024 19:06:35 +0100 Subject: [PATCH 33/54] Introduce UE RCC to MAC ITTI queue Reduce race conditions through a itti queue, such that RRC-initiated MAC memory modifications happen at the same time as MAC thread writes. However, it doesn't resolve the problem of exact slot we should apply the new cell configurtion. --- executables/nr-ue.c | 20 +++++++- openair2/COMMON/as_message.h | 15 +++++- openair2/COMMON/rrc_messages_def.h | 6 +++ openair2/COMMON/rrc_messages_types.h | 7 ++- openair2/LAYER2/NR_MAC_UE/config_ue.c | 14 +++--- openair2/LAYER2/NR_MAC_UE/mac_proto.h | 6 +-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 8 +++ .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 10 +++- openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c | 7 ++- openair2/RRC/NR_UE/L2_interface_ue.c | 25 ++++++++++ openair2/RRC/NR_UE/L2_interface_ue.h | 1 + openair2/RRC/NR_UE/rrc_UE.c | 49 +++++++++++++------ 12 files changed, 133 insertions(+), 35 deletions(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 78abb7b081..fe072a7275 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -631,6 +631,14 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, if (UE->sl_mode == 2) fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params; + // process what RRC thread sent to MAC + MessageDef *msg = NULL; + do { + itti_poll_msg(TASK_MAC_UE, &msg); + if (msg) + process_msg_rcc_to_mac(msg); + } while (msg); + if (IS_SOFTMODEM_NOS1 || IS_SA_MODE(get_softmodem_params())) { /* send tick to RLC and PDCP every ms */ if (proc->nr_slot_rx % fp->slots_per_subframe == 0) { @@ -875,10 +883,18 @@ void *UE_thread(void *arg) syncRunning = false; if (UE->is_synchronized) { UE->synch_request.received_synch_request = 0; - if (UE->sl_mode == 2) + if (UE->sl_mode == SL_MODE2_SUPPORTED) decoded_frame_rx = UE->SL_UE_PHY_PARAMS.sync_params.DFN; - else + else { + // We must wait the RRC layer decoded the MIB and sent us the frame number + MessageDef *msg = NULL; + itti_receive_msg(TASK_MAC_UE, &msg); + if (msg) + process_msg_rcc_to_mac(msg); + else + LOG_E(PHY, "It seems we arbort while trying to sync\n"); decoded_frame_rx = mac->mib_frame; + } LOG_A(PHY, "UE synchronized! decoded_frame_rx=%d UE->init_sync_frame=%d trashed_frames=%d\n", decoded_frame_rx, diff --git a/openair2/COMMON/as_message.h b/openair2/COMMON/as_message.h index e4061f5c3d..af927f6dab 100644 --- a/openair2/COMMON/as_message.h +++ b/openair2/COMMON/as_message.h @@ -43,7 +43,6 @@ Description Defines the messages supported by the Access Stratum sublayer #include "commonDef.h" #include "networkDef.h" - /****************************************************************************/ /********************* G L O B A L C O N S T A N T S *******************/ /****************************************************************************/ @@ -582,6 +581,20 @@ typedef struct as_message_s { } __attribute__((__packed__)) msg; } as_message_t; +typedef struct { + NR_ReestablishmentCause_t cause; +} nr_mac_rrc_config_reset_t; +typedef struct { + NR_CellGroupConfig_t* cellGroupConfig; + NR_UE_NR_Capability_t* UE_NR_Capability; +} nr_mac_rrc_config_cg_t; +typedef struct { + NR_BCCH_BCH_Message_t* bcch; + int get_sib; +} nr_mac_rrc_config_mib_t; +typedef struct { + NR_SIB1_t* sib1; +} nr_mac_rrc_config_sib1_t; /****************************************************************************/ /******************** G L O B A L V A R I A B L E S ********************/ /****************************************************************************/ diff --git a/openair2/COMMON/rrc_messages_def.h b/openair2/COMMON/rrc_messages_def.h index fb94aeb29e..81359f8a64 100644 --- a/openair2/COMMON/rrc_messages_def.h +++ b/openair2/COMMON/rrc_messages_def.h @@ -82,6 +82,12 @@ MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, dl_info_transfer_ind_t, MESSAGE_DEF(RRC_SUBFRAME_PROCESS, MESSAGE_PRIORITY_MED, RrcSubframeProcess, rrc_subframe_process) MESSAGE_DEF(NRRRC_FRAME_PROCESS, MESSAGE_PRIORITY_MED, NRRrcFrameProcess, nr_rrc_frame_process) +// UE: RRC -> MAC messages +MESSAGE_DEF(NR_MAC_RRC_CONFIG_RESET, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_reset_t, nr_mac_rrc_config_reset) +MESSAGE_DEF(NR_MAC_RRC_CONFIG_CG, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_cg_t, nr_mac_rrc_config_cg) +MESSAGE_DEF(NR_MAC_RRC_CONFIG_MIB, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_mib_t, nr_mac_rrc_config_mib) +MESSAGE_DEF(NR_MAC_RRC_CONFIG_SIB1, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_sib1_t, nr_mac_rrc_config_sib1) + // eNB: RLC -> RRC messages MESSAGE_DEF(RLC_SDU_INDICATION, MESSAGE_PRIORITY_MED, RlcSduIndication, rlc_sdu_indication) MESSAGE_DEF(NAS_PDU_SESSION_REQ, MESSAGE_PRIORITY_MED, nas_pdu_session_req_t, nas_pdu_session_req) diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 0e57120ee4..3c1c710260 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -96,12 +96,15 @@ #define NAS_OAI_TUN_NSA(mSGpTR) (mSGpTR)->ittiMsg.nas_oai_tun_nsa #define NAS_PDU_SESSION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_pdu_session_req +#define NR_MAC_RRC_CONFIG_RESET(mSGpTR) (mSGpTR)->ittiMsg.nr_mac_rrc_config_reset +#define NR_MAC_RRC_CONFIG_CG(mSGpTR) (mSGpTR)->ittiMsg.nr_mac_rrc_config_cg +#define NR_MAC_RRC_CONFIG_MIB(mSGpTR) (mSGpTR)->ittiMsg.nr_mac_rrc_config_mib +#define NR_MAC_RRC_CONFIG_SIB1(mSGpTR) (mSGpTR)->ittiMsg.nr_mac_rrc_config_sib1 #define NR_RRC_RLC_MAXRTX(mSGpTR) (mSGpTR)->ittiMsg.nr_rlc_maxrtx_indication -//-------------------------------------------------------------------------------------------// typedef struct RrcStateInd_s { - Rrc_State_t state; + Rrc_State_t state; Rrc_Sub_State_t sub_state; } RrcStateInd; diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index a4161dbd61..c557cd36f3 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -1704,17 +1704,19 @@ static void configure_si_schedulingInfo(NR_UE_MAC_INST_t *mac, } } -void nr_rrc_mac_config_req_sib1(module_id_t module_id, - int cc_idP, - NR_SI_SchedulingInfo_t *si_SchedulingInfo, - NR_SI_SchedulingInfo_v1700_t *si_SchedulingInfo_v1700, - NR_ServingCellConfigCommonSIB_t *scc) +void nr_rrc_mac_config_req_sib1(module_id_t module_id, int cc_idP, NR_SIB1_t *sib1) { NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); int ret = pthread_mutex_lock(&mac->if_mutex); AssertFatal(!ret, "mutex failed %d\n", ret); + NR_SI_SchedulingInfo_t *si_SchedulingInfo = sib1->si_SchedulingInfo; + NR_SI_SchedulingInfo_v1700_t *si_SchedulingInfo_v1700 = NULL; + if (sib1->nonCriticalExtension && sib1->nonCriticalExtension->nonCriticalExtension + && sib1->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension) { + si_SchedulingInfo_v1700 = sib1->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->si_SchedulingInfo_v1700; + } + NR_ServingCellConfigCommonSIB_t *scc = sib1->servingCellConfigCommon; AssertFatal(scc, "SIB1 SCC should not be NULL\n"); - UPDATE_IE(mac->tdd_UL_DL_ConfigurationCommon, scc->tdd_UL_DL_ConfigurationCommon, NR_TDD_UL_DL_ConfigCommon_t); configure_si_schedulingInfo(mac, si_SchedulingInfo, si_SchedulingInfo_v1700); mac->n_ta_offset = get_ta_offset(scc->n_TimingAdvanceOffset); diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index 6558370479..e217192d82 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -85,11 +85,7 @@ void nr_rrc_mac_config_req_mib(module_id_t module_id, NR_MIB_t *mibP, int sched_sib1); -void nr_rrc_mac_config_req_sib1(module_id_t module_id, - int cc_idP, - NR_SI_SchedulingInfo_t *si_SchedulingInfo, - NR_SI_SchedulingInfo_v1700_t *si_SchedulingInfo_v1700, - NR_ServingCellConfigCommonSIB_t *scc); +void nr_rrc_mac_config_req_sib1(module_id_t module_id, int cc_idP, NR_SIB1_t *sib1); struct position; /* forward declaration */ void nr_rrc_mac_config_req_sib19_r17(module_id_t module_id, const struct position *pos, NR_SIB19_r17_t *sib19_r17); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 8a46ad9a25..7c1efd129e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -615,6 +615,14 @@ static int nr_ue_process_dci_ul_01(NR_UE_MAC_INST_t *mac, dci_ind->rnti, dci_ind->ss_type, NR_UL_DCI_FORMAT_0_1); + LOG_D(NR_MAC_DCI, + "add ul dci harq %d for %d.%d %d.%d round %d\n", + pdu->pusch_config_pdu.pusch_data.harq_process_id, + frame, + slot, + frame_tx, + slot_tx, + 0); if (ret != 0) remove_ul_config_last_item(pdu); release_ul_config(pdu, false); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 7f849253da..ac2d966f1d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -2573,7 +2573,15 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot, n dci_pdu_rel15_t uldci_payload; memset(&uldci_payload, 0, sizeof(uldci_payload)); - + if (current_BWP->dci_format == NR_UL_DCI_FORMAT_0_1) + LOG_D(NR_MAC_DCI, + "add ul dci harq %d for %d.%d %d.%d round %d\n", + harq_id, + frame, + slot, + sched_pusch->frame, + sched_pusch->slot, + sched_ctrl->ul_harq_processes[harq_id].round); config_uldci(&UE->sc_info, pusch_pdu, &uldci_payload, diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 44118704a4..9bd5d16fc1 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -1206,11 +1206,10 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info) return 0; } -static uint32_t nr_ue_dl_processing(nr_downlink_indication_t *dl_info) +static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_info) { uint32_t ret_mask = 0x0; - DevAssert(dl_info != NULL); - NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id); + DevAssert(mac != NULL && dl_info != NULL); // DL indication after reception of DCI or DL PDU if (dl_info->dci_ind && dl_info->dci_ind->number_of_dcis) { @@ -1322,7 +1321,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info) nr_ue_dl_scheduler(mac, dl_info); else // DL indication to process data channels - ret2 = nr_ue_dl_processing(dl_info); + ret2 = nr_ue_dl_processing(mac, dl_info); ret = pthread_mutex_unlock(&mac->if_mutex); AssertFatal(!ret, "mutex failed %d\n", ret); return ret2; diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index b2b4914c22..81b857df0b 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -121,6 +121,31 @@ void nr_mac_rrc_data_ind_ue(const module_id_t module_id, } } +void process_msg_rcc_to_mac(MessageDef *msg) +{ + instance_t ue_id = ITTI_MSG_DESTINATION_INSTANCE(msg); + switch (ITTI_MSG_ID(msg)) { + case NR_MAC_RRC_CONFIG_RESET: + nr_rrc_mac_config_req_reset(ue_id, NR_MAC_RRC_CONFIG_RESET(msg).cause); + break; + case NR_MAC_RRC_CONFIG_CG: + nr_rrc_mac_config_req_cg(ue_id, 0, NR_MAC_RRC_CONFIG_CG(msg).cellGroupConfig, NR_MAC_RRC_CONFIG_CG(msg).UE_NR_Capability); + asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, NR_MAC_RRC_CONFIG_CG(msg).cellGroupConfig); + break; + case NR_MAC_RRC_CONFIG_MIB: + nr_rrc_mac_config_req_mib(ue_id, 0, NR_MAC_RRC_CONFIG_MIB(msg).bcch->message.choice.mib, NR_MAC_RRC_CONFIG_MIB(msg).get_sib); + ASN_STRUCT_FREE(asn_DEF_NR_BCCH_BCH_Message, NR_MAC_RRC_CONFIG_MIB(msg).bcch); + break; + case NR_MAC_RRC_CONFIG_SIB1: { + NR_SIB1_t *sib1 = NR_MAC_RRC_CONFIG_SIB1(msg).sib1; + nr_rrc_mac_config_req_sib1(ue_id, 0, sib1); + SEQUENCE_free(&asn_DEF_NR_SIB1, NR_MAC_RRC_CONFIG_SIB1(msg).sib1, ASFM_FREE_EVERYTHING); + } break; + default: + LOG_E(NR_MAC, "Unexpected msg from RRC: %d\n", ITTI_MSG_ID(msg)); + } +} + void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id) { MessageDef *message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_INAC_IND); diff --git a/openair2/RRC/NR_UE/L2_interface_ue.h b/openair2/RRC/NR_UE/L2_interface_ue.h index 708633b413..05888cbc0e 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.h +++ b/openair2/RRC/NR_UE/L2_interface_ue.h @@ -41,5 +41,6 @@ void nr_mac_rrc_msg3_ind(const module_id_t mod_id, const int rnti, int gnb_id); void nr_ue_rrc_timer_trigger(int instance, int frame, int gnb_id); void nr_mac_rrc_ra_ind(const module_id_t mod_id, int frame, bool success); void nsa_sendmsg_to_lte_ue(const void *message, size_t msg_len, Rrc_Msg_Type_t msg_type); +void process_msg_rcc_to_mac(MessageDef *msg); #endif diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index b59067430d..bba75ffa67 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -335,8 +335,9 @@ static void nr_rrc_process_sib1(NR_UE_RRC_INST_t *rrc, NR_UE_RRC_SI_INFO *SI_inf nr_rrc_set_sib1_timers_and_constants(&rrc->timers_and_constants, sib1); // RRC storage of SIB1 timers and constants (eg needed in re-establishment) UPDATE_IE(rrc->timers_and_constants.sib1_TimersAndConstants, sib1->ue_TimersAndConstants, NR_UE_TimersAndConstants_t); - - nr_rrc_mac_config_req_sib1(rrc->ue_id, 0, sib1->si_SchedulingInfo, si_SchedInfo_v1700, sib1->servingCellConfigCommon); + MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_SIB1); + NR_MAC_RRC_CONFIG_SIB1(msg).sib1 = sib1; + itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg); } static void nr_rrc_process_reconfiguration_v1530(NR_UE_RRC_INST_t *rrc, NR_RRCReconfiguration_v1530_IEs_t *rec_1530, int gNB_index) @@ -378,6 +379,7 @@ static void nr_rrc_process_reconfiguration_v1530(NR_UE_RRC_INST_t *rrc, NR_RRCRe LOG_E(NR_RRC, "dedicatedSIB1-Delivery decode error\n"); SEQUENCE_free(&asn_DEF_NR_SIB1, sib1, 1); } else { + // mac layer will free sib1 nr_rrc_process_sib1(rrc, SI_info, sib1); } } @@ -474,8 +476,12 @@ static void nr_rrc_ue_process_rrcReconfiguration(NR_UE_RRC_INST_t *rrc, int gNB_ nr_rrc_cellgroup_configuration(rrc, cellGroupConfig); AssertFatal(!IS_SA_MODE(get_softmodem_params()), "secondaryCellGroup only used in NSA for now\n"); - nr_rrc_mac_config_req_cg(rrc->ue_id, 0, cellGroupConfig, rrc->UECap.UE_NR_Capability); - asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, cellGroupConfig); + MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_CG); + // cellGroupConfig will be managed by MAC + NR_MAC_RRC_CONFIG_CG(msg).cellGroupConfig = cellGroupConfig; + // UE_NR_Capability remain a race condition between this rrc thread and mac thread + NR_MAC_RRC_CONFIG_CG(msg).UE_NR_Capability = rrc->UECap.UE_NR_Capability; + itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg); } if (ie->measConfig) { LOG_I(NR_RRC, "RRCReconfiguration includes Measurement Configuration\n"); @@ -807,11 +813,16 @@ static void nr_rrc_ue_decode_NR_BCCH_BCH_Message(NR_UE_RRC_INST_t *rrc, // to schedule MAC to get SI if required get_sib = check_si_status(SI_info); } - if (bcch_message->message.present == NR_BCCH_BCH_MessageType_PR_mib) - nr_rrc_mac_config_req_mib(rrc->ue_id, 0, bcch_message->message.choice.mib, get_sib); - else + if (bcch_message->message.present == NR_BCCH_BCH_MessageType_PR_mib) { + MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_MIB); + // mac will manage the pointer + NR_MAC_RRC_CONFIG_MIB(msg).bcch = bcch_message; + NR_MAC_RRC_CONFIG_MIB(msg).get_sib = get_sib; + itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg); + } else { LOG_E(NR_RRC, "RRC-received BCCH message is not a MIB\n"); - ASN_STRUCT_FREE(asn_DEF_NR_BCCH_BCH_Message, bcch_message); + ASN_STRUCT_FREE(asn_DEF_NR_BCCH_BCH_Message, bcch_message); + } return; } @@ -900,6 +911,8 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc, switch (bcch_message->message.choice.c1->present) { case NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1: nr_rrc_process_sib1(rrc, SI_info, bcch_message->message.choice.c1->choice.systemInformationBlockType1); + // mac layer will free after usage the sib1 + bcch_message->message.choice.c1->choice.systemInformationBlockType1 = NULL; break; case NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformation: LOG_I(NR_RRC, "[UE %ld] Decoding SI\n", rrc->ue_id); @@ -1036,9 +1049,11 @@ static void nr_rrc_ue_process_masterCellGroup(NR_UE_RRC_INST_t *rrc, nr_rrc_cellgroup_configuration(rrc, cellGroupConfig); - LOG_D(RRC,"Sending CellGroupConfig to MAC\n"); - nr_rrc_mac_config_req_cg(rrc->ue_id, 0, cellGroupConfig, rrc->UECap.UE_NR_Capability); - asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, cellGroupConfig); + LOG_D(RRC, "Sending CellGroupConfig to MAC the pointer will be managed by mac\n"); + MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_CG); + NR_MAC_RRC_CONFIG_CG(msg).cellGroupConfig = cellGroupConfig; + NR_MAC_RRC_CONFIG_CG(msg).UE_NR_Capability = rrc->UECap.UE_NR_Capability; + itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg); } static void rrc_ue_generate_RRCSetupComplete(const NR_UE_RRC_INST_t *rrc, const uint8_t Transaction_id) @@ -2126,7 +2141,9 @@ static void nr_rrc_initiate_rrcReestablishment(NR_UE_RRC_INST_t *rrc, NR_Reestab // reset MAC // release spCellConfig, if configured // perform cell selection in accordance with the cell selection process - nr_rrc_mac_config_req_reset(rrc->ue_id, RE_ESTABLISHMENT); + MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_RESET); + NR_MAC_RRC_CONFIG_RESET(msg).cause = RE_ESTABLISHMENT; + itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg); } static void nr_rrc_ue_generate_rrcReestablishmentComplete(const NR_UE_RRC_INST_t *rrc, @@ -2495,7 +2512,9 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc, // reset MAC NR_UE_MAC_reset_cause_t cause = (rrc->nrRrcState == RRC_STATE_DETACH_NR) ? DETACH : GO_TO_IDLE; - nr_rrc_mac_config_req_reset(rrc->ue_id, cause); + MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_RESET); + NR_MAC_RRC_CONFIG_RESET(msg).cause = cause; + itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg); // enter RRC_IDLE LOG_I(NR_RRC, "RRC moved into IDLE state\n"); @@ -2517,7 +2536,9 @@ void handle_t300_expiry(NR_UE_RRC_INST_t *rrc) // reset MAC, release the MAC configuration NR_UE_MAC_reset_cause_t cause = T300_EXPIRY; - nr_rrc_mac_config_req_reset(rrc->ue_id, cause); + MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_RESET); + NR_MAC_RRC_CONFIG_RESET(msg).cause = cause; + itti_send_msg_to_task(TASK_MAC_UE, rrc->ue_id, msg); // TODO handle connEstFailureControl // TODO inform upper layers about the failure to establish the RRC connection } From 966a3a72640592a21fb71b068d1fa17cb2761953 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 2 Dec 2024 17:19:27 +0100 Subject: [PATCH 34/54] Move UE RRC msg defs to rrc_messages_types.h --- openair2/COMMON/as_message.h | 14 -------------- openair2/COMMON/rrc_messages_types.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/openair2/COMMON/as_message.h b/openair2/COMMON/as_message.h index af927f6dab..cdf6792151 100644 --- a/openair2/COMMON/as_message.h +++ b/openair2/COMMON/as_message.h @@ -581,20 +581,6 @@ typedef struct as_message_s { } __attribute__((__packed__)) msg; } as_message_t; -typedef struct { - NR_ReestablishmentCause_t cause; -} nr_mac_rrc_config_reset_t; -typedef struct { - NR_CellGroupConfig_t* cellGroupConfig; - NR_UE_NR_Capability_t* UE_NR_Capability; -} nr_mac_rrc_config_cg_t; -typedef struct { - NR_BCCH_BCH_Message_t* bcch; - int get_sib; -} nr_mac_rrc_config_mib_t; -typedef struct { - NR_SIB1_t* sib1; -} nr_mac_rrc_config_sib1_t; /****************************************************************************/ /******************** G L O B A L V A R I A B L E S ********************/ /****************************************************************************/ diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 3c1c710260..6343cd998f 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -462,4 +462,20 @@ typedef struct { int ue_id; } RlcMaxRtxIndication; +#include "openair2/RRC/NR_UE/rrc_defs.h" +typedef struct { + NR_ReestablishmentCause_t cause; +} nr_mac_rrc_config_reset_t; +typedef struct { + NR_CellGroupConfig_t *cellGroupConfig; + NR_UE_NR_Capability_t *UE_NR_Capability; +} nr_mac_rrc_config_cg_t; +typedef struct { + NR_BCCH_BCH_Message_t *bcch; + int get_sib; +} nr_mac_rrc_config_mib_t; +typedef struct { + NR_SIB1_t *sib1; +} nr_mac_rrc_config_sib1_t; + #endif /* RRC_MESSAGES_TYPES_H_ */ From 766619aa26910dfd0e5ab334a6a72bc498e62658 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 5 Dec 2024 14:38:15 +0100 Subject: [PATCH 35/54] add process RRC input in do-ra mode (was a race cond) --- executables/nr-uesoftmodem.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 158cc293ef..68d2efcd48 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -52,6 +52,7 @@ #include "PHY_INTERFACE/phy_interface_vars.h" #include "NR_IF_Module.h" #include "openair1/SIMULATION/TOOLS/sim.h" +#include "openair2/RRC/NR_UE/L2_interface_ue.h" #ifdef SMBV #include "PHY/TOOLS/smbv.h" @@ -488,6 +489,12 @@ int main(int argc, char **argv) get_softmodem_params()->numerology, nr_band); } else { + MessageDef *msg = NULL; + do { + itti_poll_msg(TASK_MAC_UE, &msg); + if (msg) + process_msg_rcc_to_mac(msg); + } while (msg); fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config; nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config, mac->nr_band); } From 35e9d1e0c246b43cb2cad20123678d839e7f3bae Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 13 Dec 2024 09:26:45 +0100 Subject: [PATCH 36/54] tentative fix for double sib1 decoding --- openair2/RRC/NR_UE/rrc_UE.c | 156 +++++++++++------- openair2/RRC/NR_UE/rrc_defs.h | 48 +++--- openair2/RRC/NR_UE/rrc_timers_and_constants.c | 100 +++-------- 3 files changed, 151 insertions(+), 153 deletions(-) diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index bba75ffa67..072317e95d 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -187,59 +187,59 @@ static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si, LOG_I(NR_RRC, "Found SIB%d\n", typeandinfo->present + 1); switch(typeandinfo->present) { case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib2: - SI_info->sib2_validity = true; + SI_info->sib2_validity = SIB_VALID; nr_timer_start(&SI_info->sib2_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib3: - SI_info->sib3_validity = true; + SI_info->sib3_validity = SIB_VALID; nr_timer_start(&SI_info->sib3_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib4: - SI_info->sib4_validity = true; + SI_info->sib4_validity = SIB_VALID; nr_timer_start(&SI_info->sib4_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib5: - SI_info->sib5_validity = true; + SI_info->sib5_validity = SIB_VALID; nr_timer_start(&SI_info->sib5_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib6: - SI_info->sib6_validity = true; + SI_info->sib6_validity = SIB_VALID; nr_timer_start(&SI_info->sib6_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib7: - SI_info->sib7_validity = true; + SI_info->sib7_validity = SIB_VALID; nr_timer_start(&SI_info->sib7_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib8: - SI_info->sib8_validity = true; + SI_info->sib8_validity = SIB_VALID; nr_timer_start(&SI_info->sib8_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib9: - SI_info->sib9_validity = true; + SI_info->sib9_validity = SIB_VALID; nr_timer_start(&SI_info->sib9_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib10_v1610: - SI_info->sib10_validity = true; + SI_info->sib10_validity = SIB_VALID; nr_timer_start(&SI_info->sib10_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib11_v1610: - SI_info->sib11_validity = true; + SI_info->sib11_validity = SIB_VALID; nr_timer_start(&SI_info->sib11_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib12_v1610: - SI_info->sib12_validity = true; + SI_info->sib12_validity = SIB_VALID; nr_timer_start(&SI_info->sib12_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib13_v1610: - SI_info->sib13_validity = true; + SI_info->sib13_validity = SIB_VALID; nr_timer_start(&SI_info->sib13_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib14_v1610: - SI_info->sib14_validity = true; + SI_info->sib14_validity = SIB_VALID; nr_timer_start(&SI_info->sib14_timer); break; case NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib19_v1700: - SI_info->SInfo_r17.sib19_validity = true; + SI_info->SInfo_r17.sib19_validity = SIB_VALID; if (g_log->log_component[NR_RRC].level >= OAILOG_DEBUG) xer_fprint(stdout, &asn_DEF_NR_SIB19_r17, (const void *)typeandinfo->choice.sib19_v1700); @@ -315,7 +315,7 @@ static void nr_rrc_process_sib1(NR_UE_RRC_INST_t *rrc, NR_UE_RRC_SI_INFO *SI_inf xer_fprint(stdout, &asn_DEF_NR_SIB1, (const void *) sib1); LOG_A(NR_RRC, "SIB1 decoded\n"); nr_timer_start(&SI_info->sib1_timer); - SI_info->sib1_validity = true; + SI_info->sib1_validity = SIB_VALID; if (rrc->nrRrcState == RRC_STATE_IDLE_NR) { rrc->ra_trigger = RRC_CONNECTION_SETUP; // preparing RRC setup request payload in advance @@ -627,56 +627,82 @@ bool check_si_validity(NR_UE_RRC_SI_INFO *SI_info, int si_type) { switch (si_type) { case NR_SIB_TypeInfo__type_sibType2: - if (!SI_info->sib2_validity) + if (SI_info->sib2_validity == SIB_NOT_VALID) { + SI_info->sib2_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType3: - if (!SI_info->sib3_validity) + if (SI_info->sib3_validity == SIB_NOT_VALID) { + SI_info->sib3_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType4: - if (!SI_info->sib4_validity) + if (SI_info->sib4_validity == SIB_NOT_VALID) { + SI_info->sib4_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType5: - if (!SI_info->sib5_validity) + if (SI_info->sib5_validity == SIB_NOT_VALID) { + SI_info->sib5_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType6: - if (!SI_info->sib6_validity) + if (SI_info->sib6_validity == SIB_NOT_VALID) { + SI_info->sib6_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType7: - if (!SI_info->sib7_validity) + if (SI_info->sib7_validity == SIB_NOT_VALID) { + SI_info->sib7_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType8: - if (!SI_info->sib8_validity) + if (SI_info->sib8_validity == SIB_NOT_VALID) { + SI_info->sib8_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType9: - if (!SI_info->sib9_validity) + if (SI_info->sib9_validity == SIB_NOT_VALID) { + SI_info->sib9_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType10_v1610: - if (!SI_info->sib10_validity) + if (SI_info->sib10_validity == SIB_NOT_VALID) { + SI_info->sib10_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType11_v1610: - if (!SI_info->sib11_validity) + if (SI_info->sib11_validity == SIB_NOT_VALID) { + SI_info->sib11_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType12_v1610: - if (!SI_info->sib12_validity) + if (SI_info->sib12_validity == SIB_NOT_VALID) { + SI_info->sib12_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType13_v1610: - if (!SI_info->sib13_validity) + if (SI_info->sib13_validity == SIB_NOT_VALID) { + SI_info->sib13_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo__type_sibType14_v1610: - if (!SI_info->sib14_validity) + if (SI_info->sib14_validity == SIB_NOT_VALID) { + SI_info->sib14_validity = SIB_REQUESTED; return false; + } break; default : AssertFatal(false, "Invalid SIB type %d\n", si_type); @@ -688,32 +714,46 @@ bool check_si_validity_r17(NR_UE_RRC_SI_INFO_r17 *SI_info, int si_type) { switch (si_type) { case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType15: - if (!SI_info->sib15_validity) + if (SI_info->sib15_validity == SIB_NOT_VALID) { + SI_info->sib15_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType16: - if (!SI_info->sib16_validity) + if (SI_info->sib16_validity == SIB_NOT_VALID) { + SI_info->sib16_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType17: - if (!SI_info->sib17_validity) + if (SI_info->sib17_validity == SIB_NOT_VALID) { + SI_info->sib17_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType18: - if (!SI_info->sib18_validity) + if (SI_info->sib18_validity == SIB_NOT_VALID) { + SI_info->sib18_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType19: - if (!SI_info->sib19_validity) + if (SI_info->sib19_validity == SIB_NOT_VALID) { + SI_info->sib19_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType20: - if (!SI_info->sib20_validity) + if (SI_info->sib20_validity == SIB_NOT_VALID) { + SI_info->sib20_validity = SIB_REQUESTED; return false; + } break; case NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType21: - if (!SI_info->sib21_validity) + if (SI_info->sib21_validity == SIB_NOT_VALID) { + SI_info->sib21_validity = SIB_REQUESTED; return false; + } break; default : AssertFatal(false, "Invalid SIB r17 type %d\n", si_type); @@ -724,8 +764,10 @@ bool check_si_validity_r17(NR_UE_RRC_SI_INFO_r17 *SI_info, int si_type) int check_si_status(NR_UE_RRC_SI_INFO *SI_info) { // schedule reception of SIB1 if RRC doesn't have it - if (!SI_info->sib1_validity) + if (SI_info->sib1_validity == SIB_NOT_VALID) { + SI_info->sib1_validity = SIB_REQUESTED; return 1; + } else { if (SI_info->default_otherSI_map) { // Check if RRC has configured default SI @@ -2482,27 +2524,27 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc, rrcPerNB_t *nb = &rrc->perNB[i]; NR_UE_RRC_SI_INFO *SI_info = &nb->SInfo; init_SI_timers(SI_info); - SI_info->sib1_validity = false; - SI_info->sib2_validity = false; - SI_info->sib3_validity = false; - SI_info->sib4_validity = false; - SI_info->sib5_validity = false; - SI_info->sib6_validity = false; - SI_info->sib7_validity = false; - SI_info->sib8_validity = false; - SI_info->sib9_validity = false; - SI_info->sib10_validity = false; - SI_info->sib11_validity = false; - SI_info->sib12_validity = false; - SI_info->sib13_validity = false; - SI_info->sib14_validity = false; - SI_info->SInfo_r17.sib15_validity = false; - SI_info->SInfo_r17.sib16_validity = false; - SI_info->SInfo_r17.sib17_validity = false; - SI_info->SInfo_r17.sib18_validity = false; - SI_info->SInfo_r17.sib19_validity = false; - SI_info->SInfo_r17.sib20_validity = false; - SI_info->SInfo_r17.sib21_validity = false; + SI_info->sib1_validity = SIB_NOT_VALID; + SI_info->sib2_validity = SIB_NOT_VALID; + SI_info->sib3_validity = SIB_NOT_VALID; + SI_info->sib4_validity = SIB_NOT_VALID; + SI_info->sib5_validity = SIB_NOT_VALID; + SI_info->sib6_validity = SIB_NOT_VALID; + SI_info->sib7_validity = SIB_NOT_VALID; + SI_info->sib8_validity = SIB_NOT_VALID; + SI_info->sib9_validity = SIB_NOT_VALID; + SI_info->sib10_validity = SIB_NOT_VALID; + SI_info->sib11_validity = SIB_NOT_VALID; + SI_info->sib12_validity = SIB_NOT_VALID; + SI_info->sib13_validity = SIB_NOT_VALID; + SI_info->sib14_validity = SIB_NOT_VALID; + SI_info->SInfo_r17.sib15_validity = SIB_NOT_VALID; + SI_info->SInfo_r17.sib16_validity = SIB_NOT_VALID; + SI_info->SInfo_r17.sib17_validity = SIB_NOT_VALID; + SI_info->SInfo_r17.sib18_validity = SIB_NOT_VALID; + SI_info->SInfo_r17.sib19_validity = SIB_NOT_VALID; + SI_info->SInfo_r17.sib20_validity = SIB_NOT_VALID; + SI_info->SInfo_r17.sib21_validity = SIB_NOT_VALID; } if (rrc->nrRrcState == RRC_STATE_DETACH_NR) { diff --git a/openair2/RRC/NR_UE/rrc_defs.h b/openair2/RRC/NR_UE/rrc_defs.h index 6d22e4ad6c..7cf9593313 100644 --- a/openair2/RRC/NR_UE/rrc_defs.h +++ b/openair2/RRC/NR_UE/rrc_defs.h @@ -104,53 +104,59 @@ typedef enum RA_trigger_e { BEAM_FAILURE_RECOVERY, } RA_trigger_t; +typedef enum { + SIB_NOT_VALID, + SIB_VALID, + SIB_REQUESTED, +} SIB_validity_t; + typedef struct UE_RRC_SI_INFO_NR_r17_s { uint32_t default_otherSI_map_r17; - bool sib15_validity; + SIB_validity_t sib15_validity; NR_timer_t sib15_timer; - bool sib16_validity; + SIB_validity_t sib16_validity; NR_timer_t sib16_timer; - bool sib17_validity; + SIB_validity_t sib17_validity; NR_timer_t sib17_timer; - bool sib18_validity; + SIB_validity_t sib18_validity; NR_timer_t sib18_timer; - bool sib19_validity; + SIB_validity_t sib19_validity; NR_timer_t sib19_timer; - bool sib20_validity; + SIB_validity_t sib20_validity; NR_timer_t sib20_timer; - bool sib21_validity; + SIB_validity_t sib21_validity; NR_timer_t sib21_timer; } NR_UE_RRC_SI_INFO_r17; typedef struct UE_RRC_SI_INFO_NR_s { uint32_t default_otherSI_map; - bool sib1_validity; + SIB_validity_t sib1_validity; NR_timer_t sib1_timer; - bool sib2_validity; + SIB_validity_t sib2_validity; NR_timer_t sib2_timer; - bool sib3_validity; + SIB_validity_t sib3_validity; NR_timer_t sib3_timer; - bool sib4_validity; + SIB_validity_t sib4_validity; NR_timer_t sib4_timer; - bool sib5_validity; + SIB_validity_t sib5_validity; NR_timer_t sib5_timer; - bool sib6_validity; + SIB_validity_t sib6_validity; NR_timer_t sib6_timer; - bool sib7_validity; + SIB_validity_t sib7_validity; NR_timer_t sib7_timer; - bool sib8_validity; + SIB_validity_t sib8_validity; NR_timer_t sib8_timer; - bool sib9_validity; + SIB_validity_t sib9_validity; NR_timer_t sib9_timer; - bool sib10_validity; + SIB_validity_t sib10_validity; NR_timer_t sib10_timer; - bool sib11_validity; + SIB_validity_t sib11_validity; NR_timer_t sib11_timer; - bool sib12_validity; + SIB_validity_t sib12_validity; NR_timer_t sib12_timer; - bool sib13_validity; + SIB_validity_t sib13_validity; NR_timer_t sib13_timer; - bool sib14_validity; + SIB_validity_t sib14_validity; NR_timer_t sib14_timer; NR_UE_RRC_SI_INFO_r17 SInfo_r17; } NR_UE_RRC_SI_INFO; diff --git a/openair2/RRC/NR_UE/rrc_timers_and_constants.c b/openair2/RRC/NR_UE/rrc_timers_and_constants.c index 6629055b3a..39e73fa5a4 100644 --- a/openair2/RRC/NR_UE/rrc_timers_and_constants.c +++ b/openair2/RRC/NR_UE/rrc_timers_and_constants.c @@ -43,83 +43,33 @@ void init_SI_timers(NR_UE_RRC_SI_INFO *SInfo) nr_timer_setup(&SInfo->SInfo_r17.sib19_timer, 10800000, 10); } +static SIB_validity_t check_sib_timer_validity(SIB_validity_t sib_validity, NR_timer_t *sib_timer) +{ + if (sib_validity == SIB_VALID) { + bool sib_expired = nr_timer_tick(sib_timer); + if (sib_expired) + return SIB_NOT_VALID; + } + return sib_validity; +} + void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo) { - if (SInfo->sib1_validity) { - bool sib1_expired = nr_timer_tick(&SInfo->sib1_timer); - if (sib1_expired) - SInfo->sib1_validity = false; - } - if (SInfo->sib2_validity) { - bool sib2_expired = nr_timer_tick(&SInfo->sib2_timer); - if (sib2_expired) - SInfo->sib2_validity = false; - } - if (SInfo->sib3_validity) { - bool sib3_expired = nr_timer_tick(&SInfo->sib3_timer); - if (sib3_expired) - SInfo->sib3_validity = false; - } - if (SInfo->sib4_validity) { - bool sib4_expired = nr_timer_tick(&SInfo->sib4_timer); - if (sib4_expired) - SInfo->sib4_validity = false; - } - if (SInfo->sib5_validity) { - bool sib5_expired = nr_timer_tick(&SInfo->sib5_timer); - if (sib5_expired) - SInfo->sib5_validity = false; - } - if (SInfo->sib6_validity) { - bool sib6_expired = nr_timer_tick(&SInfo->sib6_timer); - if (sib6_expired) - SInfo->sib6_validity = false; - } - if (SInfo->sib7_validity) { - bool sib7_expired = nr_timer_tick(&SInfo->sib7_timer); - if (sib7_expired) - SInfo->sib7_validity = false; - } - if (SInfo->sib8_validity) { - bool sib8_expired = nr_timer_tick(&SInfo->sib8_timer); - if (sib8_expired) - SInfo->sib8_validity = false; - } - if (SInfo->sib9_validity) { - bool sib9_expired = nr_timer_tick(&SInfo->sib9_timer); - if (sib9_expired) - SInfo->sib9_validity = false; - } - if (SInfo->sib10_validity) { - bool sib10_expired = nr_timer_tick(&SInfo->sib10_timer); - if (sib10_expired) - SInfo->sib10_validity = false; - } - if (SInfo->sib11_validity) { - bool sib11_expired = nr_timer_tick(&SInfo->sib11_timer); - if (sib11_expired) - SInfo->sib11_validity = false; - } - if (SInfo->sib12_validity) { - bool sib12_expired = nr_timer_tick(&SInfo->sib12_timer); - if (sib12_expired) - SInfo->sib12_validity = false; - } - if (SInfo->sib13_validity) { - bool sib13_expired = nr_timer_tick(&SInfo->sib13_timer); - if (sib13_expired) - SInfo->sib13_validity = false; - } - if (SInfo->sib14_validity) { - bool sib14_expired = nr_timer_tick(&SInfo->sib14_timer); - if (sib14_expired) - SInfo->sib14_validity = false; - } - if (SInfo->SInfo_r17.sib19_validity) { - bool sib19_expired = nr_timer_tick(&SInfo->SInfo_r17.sib19_timer); - if (sib19_expired) - SInfo->SInfo_r17.sib19_validity = false; - } + SInfo->sib1_validity = check_sib_timer_validity(SInfo->sib1_validity, &SInfo->sib1_timer); + SInfo->sib2_validity = check_sib_timer_validity(SInfo->sib2_validity, &SInfo->sib2_timer); + SInfo->sib3_validity = check_sib_timer_validity(SInfo->sib3_validity, &SInfo->sib3_timer); + SInfo->sib4_validity = check_sib_timer_validity(SInfo->sib4_validity, &SInfo->sib4_timer); + SInfo->sib5_validity = check_sib_timer_validity(SInfo->sib5_validity, &SInfo->sib5_timer); + SInfo->sib6_validity = check_sib_timer_validity(SInfo->sib6_validity, &SInfo->sib6_timer); + SInfo->sib7_validity = check_sib_timer_validity(SInfo->sib7_validity, &SInfo->sib7_timer); + SInfo->sib8_validity = check_sib_timer_validity(SInfo->sib8_validity, &SInfo->sib8_timer); + SInfo->sib9_validity = check_sib_timer_validity(SInfo->sib9_validity, &SInfo->sib9_timer); + SInfo->sib10_validity = check_sib_timer_validity(SInfo->sib10_validity, &SInfo->sib10_timer); + SInfo->sib11_validity = check_sib_timer_validity(SInfo->sib11_validity, &SInfo->sib11_timer); + SInfo->sib12_validity = check_sib_timer_validity(SInfo->sib12_validity, &SInfo->sib12_timer); + SInfo->sib13_validity = check_sib_timer_validity(SInfo->sib13_validity, &SInfo->sib13_timer); + SInfo->sib14_validity = check_sib_timer_validity(SInfo->sib14_validity, &SInfo->sib14_timer); + SInfo->SInfo_r17.sib19_validity = check_sib_timer_validity(SInfo->SInfo_r17.sib19_validity, &SInfo->SInfo_r17.sib19_timer); } void nr_rrc_handle_timers(NR_UE_RRC_INST_t *rrc) From 244355a3d22b9079b7e2e6e5b89b6456946a6bf2 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Wed, 18 Dec 2024 14:27:46 +0000 Subject: [PATCH 37/54] fix(nrLDPC_coding_segment): move rate matching, interleaving and their counterparts to segment coding implementation --- CMakeLists.txt | 6 +- openair1/PHY/CODING/coding_defs.h | 186 +++---- .../nrLDPC_coding_segment/CMakeLists.txt | 1 + .../nrLDPC_coding_segment_decoder.c | 1 + .../nrLDPC_coding_segment_encoder.c | 1 + .../nrLDPC_coding_segment}/nr_rate_matching.c | 467 ++++++++---------- .../nrLDPC_coding_segment/nr_rate_matching.h | 97 ++++ .../nrLDPC_coding_xdma/CMakeLists.txt | 2 + .../nrLDPC_coding_xdma/nrLDPC_coding_xdma.c | 1 + openair1/PHY/CODING/nrLDPC_load.c | 4 +- openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c | 71 ++- 11 files changed, 444 insertions(+), 393 deletions(-) rename openair1/PHY/CODING/{ => nrLDPC_coding/nrLDPC_coding_segment}/nr_rate_matching.c (69%) create mode 100644 openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 9907b9ff42..3a3bca4ab7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -807,8 +807,6 @@ set(PHY_SRC_COMMON ${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_mbsfn.c ${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_ul_ref.c ${OPENAIR1_DIR}/PHY/CODING/lte_segmentation.c - ${OPENAIR1_DIR}/PHY/CODING/nr_segmentation.c - ${OPENAIR1_DIR}/PHY/CODING/nr_rate_matching.c ${OPENAIR1_DIR}/PHY/CODING/ccoding_byte.c ${OPENAIR1_DIR}/PHY/CODING/ccoding_byte_lte.c ${OPENAIR1_DIR}/PHY/CODING/3gpplte_sse.c @@ -919,6 +917,8 @@ set(PHY_SRC_UE ) set(PHY_NR_SRC_COMMON + ${OPENAIR1_DIR}/PHY/CODING/nr_segmentation.c + ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_tbs_tools.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c ${OPENAIR1_DIR}/PHY/nr_phy_common/src/nr_phy_common_csirs.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_scrambling.c @@ -942,7 +942,6 @@ set(PHY_SRC_UE ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dlsch_coding.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_decoding.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch.c - ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_tbs_tools.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_sch_dmrs.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c @@ -990,7 +989,6 @@ set(PHY_SRC_UE ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c - ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_tbs_tools.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_sch_dmrs.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/ diff --git a/openair1/PHY/CODING/coding_defs.h b/openair1/PHY/CODING/coding_defs.h index efc81620af..7da151fea9 100644 --- a/openair1/PHY/CODING/coding_defs.h +++ b/openair1/PHY/CODING/coding_defs.h @@ -41,7 +41,6 @@ #define MAX_LDPC_ITERATIONS_MBSFN 4 #define LTE_NULL 2 -#define NR_NULL 2 typedef struct { unsigned short nb_bits; unsigned short f1; @@ -60,10 +59,9 @@ typedef struct interleaver_codebook { extern t_interleaver_codebook *f1f2mat; extern short *il_tb; - /** @addtogroup _PHY_CODING_BLOCKS_ * @{ -*/ + */ /** \fn lte_segmentation(uint8_t *input_buffer, uint8_t **output_buffers, @@ -95,8 +93,6 @@ int32_t lte_segmentation(uint8_t *input_buffer, uint32_t *Kminus, uint32_t *F); - - /** \fn uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w) \brief This is the subblock interleaving algorithm from 36-212 (Release 8, 8.6 2009-03), pages 15-16. This function takes the d-sequence and generates the w-sequence. The nu-sequence from 36-212 is implicit. @@ -105,18 +101,17 @@ This function takes the d-sequence and generates the w-sequence. The nu-sequenc \param w Pointer to output (w-sequence, interleaver output) \returns Interleaving matrix cardinality (\f$K_{\pi}\f$ from 36-212) */ -uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w); +uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d, uint8_t *w); /** \fn uint32_t sub_block_interleaving_cc(uint32_t D, uint8_t *d,uint8_t *w) -\brief This is the subblock interleaving algorithm for convolutionally coded blocks from 36-212 (Release 8, 8.6 2009-03), pages 15-16. -This function takes the d-sequence and generates the w-sequence. The nu-sequence from 36-212 is implicit. +\brief This is the subblock interleaving algorithm for convolutionally coded blocks from 36-212 (Release 8, 8.6 2009-03), +pages 15-16. This function takes the d-sequence and generates the w-sequence. The nu-sequence from 36-212 is implicit. \param D Number of input bits \param d Pointer to input (d-sequence, convolutional code output) \param w Pointer to output (w-sequence, interleaver output) \returns Interleaving matrix cardinality (\f$K_{\pi}\f$ from 36-212) */ -uint32_t sub_block_interleaving_cc(uint32_t D, uint8_t *d,uint8_t *w); - +uint32_t sub_block_interleaving_cc(uint32_t D, uint8_t *d, uint8_t *w); /** \fn void sub_block_deinterleaving_turbo(uint32_t D, int16_t *d,int16_t *w) \brief This is the subblock deinterleaving algorithm from 36-212 (Release 8, 8.6 2009-03), pages 15-16. @@ -125,16 +120,16 @@ This function takes the w-sequence and generates the d-sequence. The nu-sequenc \param d Pointer to output (d-sequence, turbo code output) \param w Pointer to input (w-sequence, interleaver output) */ -void sub_block_deinterleaving_turbo(uint32_t D, int16_t *d,int16_t *w); +void sub_block_deinterleaving_turbo(uint32_t D, int16_t *d, int16_t *w); /** \fn void sub_block_deinterleaving_cc(uint32_t D, int8_t *d,int8_t *w) -\brief This is the subblock deinterleaving algorithm for convolutionally-coded data from 36-212 (Release 8, 8.6 2009-03), pages 15-16. -This function takes the w-sequence and generates the d-sequence. The nu-sequence from 36-212 is implicit. +\brief This is the subblock deinterleaving algorithm for convolutionally-coded data from 36-212 (Release 8, 8.6 2009-03), +pages 15-16. This function takes the w-sequence and generates the d-sequence. The nu-sequence from 36-212 is implicit. \param D Number of input bits \param d Pointer to output (d-sequence, turbo code output) \param w Pointer to input (w-sequence, interleaver output) */ -void sub_block_deinterleaving_cc(uint32_t D,int8_t *d,int8_t *w); +void sub_block_deinterleaving_cc(uint32_t D, int8_t *d, int8_t *w); /** \fn generate_dummy_w(uint32_t D, uint8_t *w,uint8_t F) \brief This function generates a dummy interleaved sequence (first row) for receiver, in order to identify @@ -148,7 +143,8 @@ the NULL positions used to make the matrix complete. uint32_t generate_dummy_w(uint32_t D, uint8_t *w, uint8_t F); /** \fn generate_dummy_w_cc(uint32_t D, uint8_t *w) -\brief This function generates a dummy interleaved sequence (first row) for receiver (convolutionally-coded data), in order to identify the NULL positions used to make the matrix complete. +\brief This function generates a dummy interleaved sequence (first row) for receiver (convolutionally-coded data), +in order to identify the NULL positions used to make the matrix complete. \param D Number of systematic bits plus 4 (plus 4 for termination) \param w This is the dummy sequence (first row), it will contain zeros and at most 31 "LTE_NULL" values \returns Interleaving matrix cardinality (\f$K_{\pi}\f$ from 36-212) @@ -168,7 +164,8 @@ uint32_t generate_dummy_w_cc(uint32_t D, uint8_t *w); uint8_t Nl, uint8_t r) -\brief This is the LTE rate matching algorithm for Turbo-coded channels (e.g. DLSCH,ULSCH). It is taken directly from 36-212 (Rel 8 8.6, 2009-03), pages 16-18 ) +\brief This is the LTE rate matching algorithm for Turbo-coded channels (e.g. DLSCH,ULSCH). +It is taken directly from 36-212 (Rel 8 8.6, 2009-03), pages 16-18 ) \param RTC R^TC_subblock from subblock interleaver (number of rows in interleaving matrix) for up to 8 segments \param G This the number of coded transport bits allocated in sub-frame \param w This is a pointer to the w-sequence (second interleaver output) @@ -184,7 +181,6 @@ uint32_t generate_dummy_w_cc(uint32_t D, uint8_t *w); \param nb_rb Number of PRBs \returns \f$E\f$, the number of coded bits per segment */ - uint32_t lte_rate_matching_turbo(uint32_t RTC, uint32_t G, uint8_t *w, @@ -200,20 +196,19 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC, uint8_t nb_rb); /** -\brief This is the LTE rate matching algorithm for Convolutionally-coded channels (e.g. BCH,DCI,UCI). It is taken directly from 36-212 (Rel 8 8.6, 2009-03), pages 16-18 ) +\brief This is the LTE rate matching algorithm for Convolutionally-coded channels (e.g. BCH,DCI,UCI). +It is taken directly from 36-212 (Rel 8 8.6, 2009-03), pages 16-18 ) \param RCC R^CC_subblock from subblock interleaver (number of rows in interleaving matrix) for up to 8 segments \param E Number of coded channel bits \param w This is a pointer to the w-sequence (second interleaver output) \param e This is a pointer to the e-sequence (rate matching output, channel input/output bits) \returns \f$E\f$, the number of coded bits per segment */ -uint32_t lte_rate_matching_cc(uint32_t RCC, - uint16_t E, - uint8_t *w, - uint8_t *e); +uint32_t lte_rate_matching_cc(uint32_t RCC, uint16_t E, uint8_t *w, uint8_t *e); /** -\brief This is the LTE rate matching algorithm for Turbo-coded channels (e.g. DLSCH,ULSCH). It is taken directly from 36-212 (Rel 8 8.6, 2009-03), pages 16-18 ) +\brief This is the LTE rate matching algorithm for Turbo-coded channels (e.g. DLSCH,ULSCH). +It is taken directly from 36-212 (Rel 8 8.6, 2009-03), pages 16-18 ) \param RTC R^TC_subblock from subblock interleaver (number of rows in interleaving matrix) \param G This the number of coded transport bits allocated in sub-frame \param w This is a pointer to the soft w-sequence (second interleaver output) with soft-combined outputs from successive HARQ rounds @@ -265,7 +260,8 @@ uint32_t lte_rate_matching_turbo_rx_abs(uint32_t RTC, uint32_t *E_out); /** -\brief This is the LTE rate matching algorithm for Convolutionally-coded channels (e.g. BCH,DCI,UCI). It is taken directly from 36-212 (Rel 8 8.6, 2009-03), pages 16-18 ) +\brief This is the LTE rate matching algorithm for Convolutionally-coded channels (e.g. BCH,DCI,UCI). +It is taken directly from 36-212 (Rel 8 8.6, 2009-03), pages 16-18 ) \param RCC R^CC_subblock from subblock interleaver (number of rows in interleaving matrix) \param E This the number of coded bits allocated for channel \param w This is a pointer to the soft w-sequence (second interleaver output) with soft-combined outputs from successive HARQ rounds @@ -273,11 +269,7 @@ uint32_t lte_rate_matching_turbo_rx_abs(uint32_t RTC, \param soft_input This is a pointer to the soft channel output \returns \f$E\f$, the number of coded bits per segment */ -void lte_rate_matching_cc_rx(uint32_t RCC, - uint16_t E, - int8_t *w, - uint8_t *dummy_w, - int8_t *soft_input); +void lte_rate_matching_cc_rx(uint32_t RCC, uint16_t E, int8_t *w, uint8_t *dummy_w, int8_t *soft_input); /** \fn void ccodedot11_encode(uint32_t numbytes,uint8_t *inPtr,uint8_t *outPtr,uint8_t puncturing) \brief This function implements a rate 1/2 constraint length 7 convolutional code. @@ -286,10 +278,7 @@ void lte_rate_matching_cc_rx(uint32_t RCC, @param outPtr Pointer to output buffer @param puncturing Puncturing pattern (Not used at present, to be removed) */ -void ccodedot11_encode (uint32_t numbytes, - uint8_t *inPtr, - uint8_t *outPtr, - uint8_t puncturing); +void ccodedot11_encode(uint32_t numbytes, uint8_t *inPtr, uint8_t *outPtr, uint8_t puncturing); /*!\fn void ccodedot11_init(void) \brief This function initializes the generator polynomials for an 802.11 convolutional code.*/ @@ -299,11 +288,6 @@ void ccodedot11_init(void); \brief This function initializes the trellis structure for decoding an 802.11 convolutional code.*/ void ccodedot11_init_inv(void); - - - - - /** \fn void ccodelte_encode(int32_t numbits,uint8_t add_crc, uint8_t *inPtr,uint8_t *outPtr,uint16_t rnti) \brief This function implements the LTE convolutional code of rate 1/3 with a constraint length of 7 bits. The inputs are bit packed in octets @@ -314,12 +298,7 @@ void ccodedot11_init_inv(void); @param outPtr Pointer to output buffer @param rnti RNTI for CRC scrambling */ -void -ccodelte_encode (int32_t numbits, - uint8_t add_crc, - uint8_t *inPtr, - uint8_t *outPtr, - uint16_t rnti); +void ccodelte_encode(int32_t numbits, uint8_t add_crc, uint8_t *inPtr, uint8_t *outPtr, uint16_t rnti); /*!\fn void ccodelte_init(void) \brief This function initializes the generator polynomials for an LTE convolutional code.*/ @@ -337,13 +316,9 @@ void ccodedab_init(void); \brief This function initializes the trellis structure for decoding an DAB convolutional code (first 3 bits).*/ void ccodedab_init_inv(void); - - /*!\fn void crcTableInit(void) \brief This function initializes the different crc tables.*/ -void crcTableInit (void); - - +void crcTableInit(void); /*!\fn uint32_t crc24a(uint8_t *inPtr, int32_t bitlen) \brief This computes a 24-bit crc ('a' variant for overall transport block) @@ -351,7 +326,7 @@ based on 3GPP UMTS/LTE specifications. @param inPtr Pointer to input byte stream @param bitlen length of inputs in bits */ -unsigned int crc24a (unsigned char * inptr, int bitlen); +unsigned int crc24a(unsigned char *inptr, int bitlen); /*!\fn uint32_t crc24b(uint8_t *inPtr, int32_t bitlen) \brief This computes a 24-bit crc ('b' variant for transport-block segments) @@ -359,7 +334,7 @@ based on 3GPP UMTS/LTE specifications. @param inPtr Pointer to input byte stream @param bitlen length of inputs in bits */ -uint32_t crc24b (uint8_t *inPtr, int32_t bitlen); +uint32_t crc24b(uint8_t *inPtr, int32_t bitlen); /*!\fn uint32_t crc24c(uint8_t *inPtr, int32_t bitlen) \brief This computes a 24-bit crc ('c' variant for transport-block segments) @@ -367,68 +342,67 @@ based on 3GPP Rel 15 specifications. @param inPtr Pointer to input byte stream @param bitlen length of inputs in bits */ -uint32_t crc24c (uint8_t *inPtr, int32_t bitlen); +uint32_t crc24c(uint8_t *inPtr, int32_t bitlen); /*!\fn uint32_t crc16(uint8_t *inPtr, int32_t bitlen) \brief This computes a 16-bit crc based on 3GPP UMTS specifications. @param inPtr Pointer to input byte stream @param bitlen length of inputs in bits*/ -unsigned int crc16 (unsigned char * inptr, int bitlen); +unsigned int crc16(unsigned char *inptr, int bitlen); /*!\fn uint32_t crc12(uint8_t *inPtr, int32_t bitlen) \brief This computes a 12-bit crc based on 3GPP UMTS specifications. @param inPtr Pointer to input byte stream @param bitlen length of inputs in bits*/ -unsigned int crc12 (unsigned char * inptr, int bitlen); +unsigned int crc12(unsigned char *inptr, int bitlen); /*!\fn uint32_t crc12(uint8_t *inPtr, int32_t bitlen) \brief This computes an 11-bit crc based on 3GPP NR specifications. @param inPtr Pointer to input byte stream @param bitlen length of inputs in bits*/ -unsigned int crc11 (unsigned char * inptr, int bitlen); +unsigned int crc11(unsigned char *inptr, int bitlen); /*!\fn uint32_t crc8(uint8_t *inPtr, int32_t bitlen) \brief This computes a 8-bit crc based on 3GPP UMTS specifications. @param inPtr Pointer to input byte stream @param bitlen length of inputs in bits*/ -unsigned int crc8 (unsigned char * inptr, int bitlen); +unsigned int crc8(unsigned char *inptr, int bitlen); /*!\fn uint32_t crc8(uint8_t *inPtr, int32_t bitlen) \brief This computes a 6-bit crc based on 3GPP NR specifications. @param inPtr Pointer to input byte stream @param bitlen length of inputs in bits*/ -unsigned int crc6 (unsigned char * inptr, int bitlen); +unsigned int crc6(unsigned char *inptr, int bitlen); int check_crc(uint8_t *decoded_bytes, uint32_t n, uint8_t crc_type); /*!\fn void phy_viterbi_dot11_sse2(int8_t *y, uint8_t *decoded_bytes, uint16_t n,int offset,int traceback) -\brief This routine performs a SIMD optmized Viterbi decoder for the 802.11 64-state convolutional code. It can be -run in segments with final trace back after last segment. +\brief This routine performs a SIMD optmized Viterbi decoder for the 802.11 64-state convolutional code. +It can be run in segments with final trace back after last segment. @param y Pointer to soft input (coded on 8-bits but should be limited to 4-bit precision to avoid overflow) @param decoded_bytes Pointer to decoded output @param n Length of input/trellis depth in bits for this run @param offset offset in receive buffer for segment on which to operate @param traceback flag to indicate that traceback should be performed*/ -void phy_viterbi_dot11_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n); +void phy_viterbi_dot11_sse2(int8_t *y, uint8_t *decoded_bytes, uint16_t n); /*!\fn void phy_viterbi_lte_sse2(int8_t *y, uint8_t *decoded_bytes, uint16_t n) \brief This routine performs a SIMD optmized Viterbi decoder for the LTE 64-state tail-biting convolutional code. @param y Pointer to soft input (coded on 8-bits but should be limited to 4-bit precision to avoid overflow) @param decoded_bytes Pointer to decoded output @param n Length of input/trellis depth in bits*/ -//void phy_viterbi_lte_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n); -void phy_viterbi_lte_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n); +// void phy_viterbi_lte_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n); +void phy_viterbi_lte_sse2(int8_t *y, uint8_t *decoded_bytes, uint16_t n); /*!\fn void phy_generate_viterbi_tables(void) \brief This routine initializes metric tables for the optimized Viterbi decoder. */ -void phy_generate_viterbi_tables( void ); +void phy_generate_viterbi_tables(void); /*!\fn void phy_generate_viterbi_tables_lte(void) \brief This routine initializes metric tables for the optimized LTE Viterbi decoder. */ -void phy_generate_viterbi_tables_lte( void ); - +void phy_generate_viterbi_tables_lte(void); /*!\fn int32_t rate_matching(uint32_t N_coded, uint32_t N_input, @@ -443,63 +417,43 @@ void phy_generate_viterbi_tables_lte( void ); @param off Offset for seed */ -int32_t rate_matching(uint32_t N_coded, - uint32_t N_input, - uint8_t *inPtr, - uint8_t N_bps, - uint32_t off); +int32_t rate_matching(uint32_t N_coded, uint32_t N_input, uint8_t *inPtr, uint8_t N_bps, uint32_t off); -int32_t rate_matching_lte(uint32_t N_coded, - uint32_t N_input, - uint8_t *inPtr, - uint32_t off); +int32_t rate_matching_lte(uint32_t N_coded, uint32_t N_input, uint8_t *inPtr, uint32_t off); -unsigned int crcbit (unsigned char * inputptr, int octetlen, unsigned int poly); +unsigned int crcbit(unsigned char *inputptr, int octetlen, unsigned int poly); -void phy_viterbi_dot11(int8_t *,uint8_t *,uint16_t); +void phy_viterbi_dot11(int8_t *, uint8_t *, uint16_t); +/** + * \brief perform segmentation of a Transport Block (TB) into segments + * \param input_buffer buffer containing the TB data to be segmented, can be NULL + * \param output_buffer buffer containing the TB data after segmentation, can be NULL + * \param B size of the TB in bits + * \param C pointer to write the number of segments + * \param K pointer to write the payload size per segment + * \param Zout pointer to write the lifting size per segment + * \param F pointer to write the number of filler bits per segment + */ int32_t nr_segmentation(unsigned char *input_buffer, - unsigned char **output_buffers, - unsigned int B, - unsigned int *C, - unsigned int *K, - unsigned int *Zout, - unsigned int *F, - uint8_t BG); + unsigned char **output_buffers, + unsigned int B, + unsigned int *C, + unsigned int *K, + unsigned int *Zout, + unsigned int *F, + uint8_t BG); -void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e,uint8_t *f); - -void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e,int16_t *f); - -int nr_get_R_ldpc_decoder(int rvidx, - int E, - int BG, - int Z, - int *llrLen, - int round); - -int nr_rate_matching_ldpc(uint32_t Tbslbrm, - uint8_t BG, - uint16_t Z, - uint8_t *w, - uint8_t *e, - uint8_t C, - uint32_t F, - uint32_t Foffset, - uint8_t rvidx, - uint32_t E); - -int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm, - uint8_t BG, - uint16_t Z, - int16_t *w, - int16_t *soft_input, - uint8_t C, - uint8_t rvidx, - uint8_t clear, - uint32_t E, - uint32_t F, - uint32_t Foffset); +/** + * \brief compute parameter R for NR LDPC decoder + * \param rvidx redundancy version index + * \param E size of the code segment in bits + * \param BG LDPC base graph number + * \param Z lifting size + * \param llrlen pointer to the size in bits of input llrs + * \round HARQ round index + */ +int nr_get_R_ldpc_decoder(int rvidx, int E, int BG, int Z, int *llrLen, int round); decoder_if_t phy_threegpplte_turbo_decoder; decoder_if_t phy_threegpplte_turbo_decoder8; diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt index ca8ff03700..52de22b05f 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt @@ -2,6 +2,7 @@ add_library(ldpc MODULE nrLDPC_coding_segment_decoder.c nrLDPC_coding_segment_encoder.c ${PHY_NR_CODINGIF} + nr_rate_matching.c ) set_target_properties(ldpc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c index e1fec76e23..77a726511d 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c @@ -25,6 +25,7 @@ // [from gNB coding] +#include "nr_rate_matching.h" #include "PHY/defs_gNB.h" #include "PHY/CODING/coding_extern.h" #include "PHY/CODING/coding_defs.h" diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c index 6c66edeb82..5b51fa1f00 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c @@ -23,6 +23,7 @@ * \brief Top-level routines for implementing LDPC encoding of transport channels */ +#include "nr_rate_matching.h" #include "PHY/defs_gNB.h" #include "PHY/CODING/coding_extern.h" #include "PHY/CODING/coding_defs.h" diff --git a/openair1/PHY/CODING/nr_rate_matching.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c similarity index 69% rename from openair1/PHY/CODING/nr_rate_matching.c rename to openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c index 1ed520cf12..a25b6d4b57 100644 --- a/openair1/PHY/CODING/nr_rate_matching.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c @@ -19,29 +19,24 @@ * contact@openairinterface.org */ -/* file: nr_rate_matching.c - purpose: Procedures for rate matching/interleaving for NR LDPC - author: hongzhi.wang@tcl.com -*/ - -#include "PHY/defs_gNB.h" -#include "PHY/defs_nr_UE.h" -#include "PHY/CODING/coding_defs.h" +#include "PHY/defs_common.h" #include "PHY/sse_intrin.h" -//#define RM_DEBUG 1 +#include "nr_rate_matching.h" + +// #define RM_DEBUG 1 static const uint8_t index_k0[2][4] = {{0, 17, 33, 56}, {0, 13, 25, 43}}; -void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e,uint8_t *f) +void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e, uint8_t *f) { uint32_t EQm; - EQm = E/Qm; - memset(f,0,E*sizeof(uint8_t)); - uint8_t *e0,*e1,*e2,*e3,*e4,*e5,*e6,*e7; + EQm = E / Qm; + memset(f, 0, E * sizeof(uint8_t)); + uint8_t *e0, *e1, *e2, *e3, *e4, *e5, *e6, *e7; uint8_t *fp; -#if 0 //def __WASAVX2__ +#if 0 // def __WASAVX2__ simde__m256i tmp0,tmp1,tmp2,tmp0b,tmp1b,tmp3,tmp4,tmp5; simde__m256i *e0_256,*e1_256,*e2_256,*e3_256,*e4_256,*e5_256,*e6_256,*e7_256; @@ -228,148 +223,137 @@ void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e,uint8_t *f) } #else - //original unoptimized loops - /* - for (int j = 0; j< EQm; j++,j2+=2){ - for (int i = 0; i< Qm; i++){ - f[(i+j*Qm)] = e[(i*EQm + j)]; - } - } - */ + // original unoptimized loops + /* + for (int j = 0; j< EQm; j++,j2+=2){ + for (int i = 0; i< Qm; i++){ + f[(i+j*Qm)] = e[(i*EQm + j)]; + } + } + */ - fp=f; + fp = f; switch (Qm) { - case 2: - e0=e; - e1=e0+EQm; - for (int j = 0, j2 = 0; j< EQm; j++,j2+=2){ - fp=&f[j2]; - fp[0] = e0[j]; - fp[1] = e1[j]; - } - break; - case 4: - e0=e; - e1=e0+EQm; - e2=e1+EQm; - e3=e2+EQm; - for (int j = 0, j2 = 0; j< EQm; j++,j2+=4){ - fp=&f[j2]; - fp[0] = e0[j]; - fp[1] = e1[j]; - fp[2] = e2[j]; - fp[3] = e3[j]; - } - break; - case 6: - e0=e; - e1=e0+EQm; - e2=e1+EQm; - e3=e2+EQm; - e4=e3+EQm; - e5=e4+EQm; - fp = f; - for (int j = 0; j< EQm; j++){ - *fp++ = e0[j]; - *fp++ = e1[j]; - *fp++ = e2[j]; - *fp++ = e3[j]; - *fp++ = e4[j]; - *fp++ = e5[j]; - } - break; - case 8: - e0=e; - e1=e0+EQm; - e2=e1+EQm; - e3=e2+EQm; - e4=e3+EQm; - e5=e4+EQm; - e6=e5+EQm; - e7=e6+EQm; - for (int j = 0, j2 = 0; j< EQm; j++,j2+=8){ - fp=&f[j2]; - fp[0] = e0[j]; - fp[1] = e1[j]; - fp[2] = e2[j]; - fp[3] = e3[j]; - fp[4] = e4[j]; - fp[5] = e5[j]; - fp[6] = e6[j]; - fp[7] = e7[j]; - } - break; - default: AssertFatal(1==0,"Should never be here!\n"); + case 2: + e0 = e; + e1 = e0 + EQm; + for (int j = 0, j2 = 0; j < EQm; j++, j2 += 2) { + fp = &f[j2]; + fp[0] = e0[j]; + fp[1] = e1[j]; + } + break; + case 4: + e0 = e; + e1 = e0 + EQm; + e2 = e1 + EQm; + e3 = e2 + EQm; + for (int j = 0, j2 = 0; j < EQm; j++, j2 += 4) { + fp = &f[j2]; + fp[0] = e0[j]; + fp[1] = e1[j]; + fp[2] = e2[j]; + fp[3] = e3[j]; + } + break; + case 6: + e0 = e; + e1 = e0 + EQm; + e2 = e1 + EQm; + e3 = e2 + EQm; + e4 = e3 + EQm; + e5 = e4 + EQm; + fp = f; + for (int j = 0; j < EQm; j++) { + *fp++ = e0[j]; + *fp++ = e1[j]; + *fp++ = e2[j]; + *fp++ = e3[j]; + *fp++ = e4[j]; + *fp++ = e5[j]; + } + break; + case 8: + e0 = e; + e1 = e0 + EQm; + e2 = e1 + EQm; + e3 = e2 + EQm; + e4 = e3 + EQm; + e5 = e4 + EQm; + e6 = e5 + EQm; + e7 = e6 + EQm; + for (int j = 0, j2 = 0; j < EQm; j++, j2 += 8) { + fp = &f[j2]; + fp[0] = e0[j]; + fp[1] = e1[j]; + fp[2] = e2[j]; + fp[3] = e3[j]; + fp[4] = e4[j]; + fp[5] = e5[j]; + fp[6] = e6[j]; + fp[7] = e7[j]; + } + break; + default: + AssertFatal(1 == 0, "Should never be here!\n"); } #endif } - - - -void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e,int16_t *f) -{ - - - switch(Qm) { - case 2: - { - AssertFatal(E%2==0,""); - int16_t *e1=e+(E/2); - int16_t *end=f+E-1; - while( f Ncb) infoBits = Ncb; - if (infoBits > *llrLen) *llrLen = infoBits; - - int sysBits = (BG==1)?(22*Z):(10*Z); - float decoderR = (float)sysBits/(infoBits + 2*Z); - - if (BG == 2) - if (decoderR < 0.3333) - return 15; - else if (decoderR < 0.6667) - return 13; - else - return 23; - else - if (decoderR < 0.6667) - return 13; - else if (decoderR < 0.8889) - return 23; - else - return 89; } int nr_rate_matching_ldpc(uint32_t Tbslbrm, uint8_t BG, uint16_t Z, - uint8_t *w, + uint8_t *d, uint8_t *e, uint8_t C, - uint32_t F, - uint32_t Foffset, + uint32_t F, + uint32_t Foffset, uint8_t rvidx, uint32_t E) { - uint32_t Ncb,ind,k=0,Nref,N; + uint32_t Ncb, ind, k = 0, Nref, N; - if (C==0) { - LOG_E(PHY,"nr_rate_matching: invalid parameters (C %d\n",C); + if (C == 0) { + LOG_E(PHY, "nr_rate_matching: invalid parameters (C %d\n", C); return -1; } - //Bit selection - N = (BG==1)?(66*Z):(50*Z); + // Bit selection + N = (BG == 1) ? (66 * Z) : (50 * Z); if (Tbslbrm == 0) - Ncb = N; + Ncb = N; else { - Nref = 3*Tbslbrm/(2*C); //R_LBRM = 2/3 - Ncb = min(N, Nref); + Nref = 3 * Tbslbrm / (2 * C); // R_LBRM = 2/3 + Ncb = min(N, Nref); } - ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z; + ind = (index_k0[BG - 1][rvidx] * Ncb / N) * Z; #ifdef RM_DEBUG - printf("nr_rate_matching_ldpc: E %u, F %u, Foffset %u, k0 %u, Ncb %u, rvidx %d, Tbslbrm %u\n", E, F, Foffset, ind, Ncb, rvidx, Tbslbrm); + printf("nr_rate_matching_ldpc: E %u, F %u, Foffset %u, k0 %u, Ncb %u, rvidx %d, Tbslbrm %u\n", + E, + F, + Foffset, + ind, + Ncb, + rvidx, + Tbslbrm); #endif if (Foffset > E) { - LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > E %d) F %d, k0 %d, Ncb %d, rvidx %d, Tbslbrm %d\n",Foffset,E,F, ind, Ncb, rvidx, Tbslbrm); + LOG_E(PHY, + "nr_rate_matching: invalid parameters (Foffset %d > E %d) F %d, k0 %d, Ncb %d, rvidx %d, Tbslbrm %d\n", + Foffset, + E, + F, + ind, + Ncb, + rvidx, + Tbslbrm); return -1; } if (Foffset > Ncb) { - LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > Ncb %d)\n",Foffset,Ncb); + LOG_E(PHY, "nr_rate_matching: invalid parameters (Foffset %d > Ncb %d)\n", Foffset, Ncb); return -1; } - if (ind >= Foffset && ind < (F+Foffset)) ind = F+Foffset; + if (ind >= Foffset && ind < (F + Foffset)) + ind = F + Foffset; if (ind < Foffset) { // case where we have some bits before the filler and the rest after - memcpy((void*)e,(void*)(w+ind),Foffset-ind); + memcpy((void *)e, (void *)(d + ind), Foffset - ind); - if (E + F <= Ncb-ind) { // E+F doesn't contain all coded bits - memcpy((void*)(e+Foffset-ind),(void*)(w+Foffset+F),E-Foffset+ind); - k=E; + if (E + F <= Ncb - ind) { // E+F doesn't contain all coded bits + memcpy((void *)(e + Foffset - ind), (void *)(d + Foffset + F), E - Foffset + ind); + k = E; + } else { + memcpy((void *)(e + Foffset - ind), (void *)(d + Foffset + F), Ncb - Foffset - F); + k = Ncb - F - ind; } - else { - memcpy((void*)(e+Foffset-ind),(void*)(w+Foffset+F),Ncb-Foffset-F); - k=Ncb-F-ind; - } - } - else { - if (E <= Ncb-ind) { //E+F doesn't contain all coded bits - memcpy((void*)(e),(void*)(w+ind),E); - k=E; - } - else { - memcpy((void*)(e),(void*)(w+ind),Ncb-ind); - k=Ncb-ind; + } else { + if (E <= Ncb - ind) { // E+F doesn't contain all coded bits + memcpy((void *)(e), (void *)(d + ind), E); + k = E; + } else { + memcpy((void *)(e), (void *)(d + ind), Ncb - ind); + k = Ncb - ind; } } - while(k E) { - LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > E %d)\n",Foffset,E); + LOG_E(PHY, "nr_rate_matching: invalid parameters (Foffset %d > E %d)\n", Foffset, E); return -1; } if (Foffset > Ncb) { - LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > Ncb %d)\n",Foffset,Ncb); + LOG_E(PHY, "nr_rate_matching: invalid parameters (Foffset %d > Ncb %d)\n", Foffset, Ncb); return -1; } #ifdef RM_DEBUG - printf("nr_rate_matching_ldpc_rx: Clear %d, E %u, Foffset %u, k0 %u, Ncb %u, rvidx %d, Tbslbrm %u\n", clear, E, Foffset, ind, Ncb, rvidx, Tbslbrm); + printf("nr_rate_matching_ldpc_rx: Clear %d, E %u, Foffset %u, k0 %u, Ncb %u, rvidx %d, Tbslbrm %u\n", + clear, + E, + Foffset, + ind, + Ncb, + rvidx, + Tbslbrm); #endif if (clear == 1) - memset(w, 0, Ncb * sizeof(int16_t)); + memset(d, 0, Ncb * sizeof(int16_t)); - k=0; + k = 0; if (ind < Foffset) - for (; (ind",k,ind,w[ind],soft_input[k]); + printf("RM_RX k%u Ind %u(before filler): %d (%d)=>", k, ind, d[ind], soft_input[k]); #endif - w[ind]+=soft_input[k++]; + d[ind] += soft_input[k++]; #ifdef RM_DEBUG - printf("%d\n",w[ind]); + printf("%d\n", d[ind]); #endif } - if (ind >= Foffset && ind < Foffset+F) ind=Foffset+F; + if (ind >= Foffset && ind < Foffset + F) + ind = Foffset + F; - for (; (ind",k,ind,w[ind],soft_input[k]); + printf("RM_RX k%u Ind %u(after filler) %d (%d)=>", k, ind, d[ind], soft_input[k]); #endif - w[ind] += soft_input[k++]; + d[ind] += soft_input[k++]; #ifdef RM_DEBUG - printf("%d\n",w[ind]); + printf("%d\n", d[ind]); #endif } - while(k",k,ind,w[ind],soft_input[k]); + printf("RM_RX k%u Ind %u(before filler) %d(%d)=>", k, ind, d[ind], soft_input[k]); #endif - w[ind]+=soft_input[k++]; + d[ind] += soft_input[k++]; #ifdef RM_DEBUG - printf("%d\n",w[ind]); + printf("%d\n", d[ind]); #endif } - for (ind=Foffset+F; (ind",k,ind,w[ind],soft_input[k]); + printf("RM_RX (after filler) k%u Ind: %u (%d)(soft in %d)=>", k, ind, d[ind], soft_input[k]); #endif - w[ind] += soft_input[k++]; + d[ind] += soft_input[k++]; #ifdef RM_DEBUG - printf("%d\n",w[ind]); + printf("%d\n", d[ind]); #endif } } return 0; } - diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.h b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.h new file mode 100644 index 0000000000..ac6a496801 --- /dev/null +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.h @@ -0,0 +1,97 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +#ifndef __NR_RATE_MATCHING__H__ +#define __NR_RATE_MATCHING__H__ + +#include + +#define NR_NULL 2 + +/** + * \brief interleave a code segment after encoding and rate matching + * \param E size of the code segment in bits + * \param Qm modulation order + * \param e input rate matched segment + * \param f output interleaved segment + */ +void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e, uint8_t *f); + +/** + * \brief deinterleave a code segment before RX rate matching and decoding + * \param E size of the code segment in bits + * \param Qm modulation order + * \param e output deinterleaved segment + * \param f input llr segment + */ +void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e, int16_t *f); + +/** + * \brief rate match a code segment after encoding + * \Tbslbrm Transport Block size LBRM + * \param BG LDPC base graph number + * \param Z segment lifting size + * \param d input encoded segment + * \param e output rate matched segment + * \param C number of segments in the Transport Block + * \param F number of filler bits in the segment + * \param Foffset offset of the filler bits in the segment + * \param rvidx redundancy version index + * \param E size of the code segment in bits + */ +int nr_rate_matching_ldpc(uint32_t Tbslbrm, + uint8_t BG, + uint16_t Z, + uint8_t *d, + uint8_t *e, + uint8_t C, + uint32_t F, + uint32_t Foffset, + uint8_t rvidx, + uint32_t E); + +/** + * \brief rate match a code segment before decoding + * \Tbslbrm Transport Block size LBRM + * \param BG LDPC base graph number + * \param Z segment lifting size + * \param d output rate matched segment + * \param soft_input input deinterleaved segment + * \param C number of segments in the Transport Block + * \param rvidx redundancy version index + * \param clear flag to clear d on the first round of a new HARQ process + * \param E size of the code segment in bits + * \param F number of filler bits in the segment + * \param Foffset offset of the filler bits in the segment + */ +int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm, + uint8_t BG, + uint16_t Z, + int16_t *d, + int16_t *soft_input, + uint8_t C, + uint8_t rvidx, + uint8_t clear, + uint32_t E, + uint32_t F, + uint32_t Foffset); + +#endif diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt index 4e7d79f6d7..8c357c75d4 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt @@ -12,7 +12,9 @@ if (ENABLE_LDPC_XDMA) nrLDPC_coding_xdma.c ../nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c ../../nrLDPC_load.c + ../nrLDPC_coding_segment/nr_rate_matching.c ) + target_include_directories(ldpc_xdma PRIVATE ../nrLDPC_coding_segment) set_target_properties(ldpc_xdma PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_dependencies(nr-softmodem ldpc_xdma) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c index 057fb58f6a..6422eaba0c 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c @@ -27,6 +27,7 @@ // [from gNB coding] #include +#include #include "PHY/CODING/coding_defs.h" #include "PHY/CODING/coding_extern.h" #include "PHY/CODING/lte_interleaver_inline.h" diff --git a/openair1/PHY/CODING/nrLDPC_load.c b/openair1/PHY/CODING/nrLDPC_load.c index b80887c327..0316ebadc5 100644 --- a/openair1/PHY/CODING/nrLDPC_load.c +++ b/openair1/PHY/CODING/nrLDPC_load.c @@ -29,7 +29,7 @@ * \note * \warning */ -#define _GNU_SOURCE +#define _GNU_SOURCE #include #include #include @@ -41,7 +41,7 @@ /* arguments used when called from phy simulators exec's which do not use the config module */ /* arg is used to initialize the config module so that the loader works as expected */ -char *arg[64]={"ldpctest",NULL}; +char *arg[64] = {"ldpctest", NULL}; int load_LDPClib(char *version, ldpc_interface_t *itf) { diff --git a/openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c b/openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c index b882828cd6..378dca796c 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c +++ b/openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c @@ -20,45 +20,74 @@ */ /*! \file PHY/NR_TRANSPORT/nr_tbs_tools.c -* \brief Top-level routines for implementing LDPC-coded (DLSCH) transport channels from 38-212, 15.2 -* \author H.Wang -* \date 2018 -* \version 0.1 -* \company Eurecom -* \email: -* \note -* \warning -*/ + * \brief Top-level routines for implementing LDPC-coded (DLSCH) transport channels from 38-212, 15.2 + * \author H.Wang + * \date 2018 + * \version 0.1 + * \company Eurecom + * \email: + * \note + * \warning + */ #include "nr_transport_common_proto.h" #include "PHY/CODING/coding_defs.h" #include "PHY/defs_nr_common.h" -uint32_t nr_get_G(uint16_t nb_rb, - uint16_t nb_symb_sch, - uint8_t nb_re_dmrs, - uint16_t length_dmrs, - uint32_t unav_res, - uint8_t Qm, - uint8_t Nl) +uint32_t +nr_get_G(uint16_t nb_rb, uint16_t nb_symb_sch, uint8_t nb_re_dmrs, uint16_t length_dmrs, uint32_t unav_res, uint8_t Qm, uint8_t Nl) { uint32_t G = ((NR_NB_SC_PER_RB * nb_symb_sch) - (nb_re_dmrs * length_dmrs)) * nb_rb * Qm * Nl; G -= unav_res * Qm * Nl; - return(G); + return (G); } uint32_t nr_get_E(uint32_t G, uint8_t C, uint8_t Qm, uint8_t Nl, uint8_t r) { uint32_t E; - uint8_t Cprime = C; //assume CBGTI not present + uint8_t Cprime = C; // assume CBGTI not present AssertFatal(Nl > 0, "Nl is 0\n"); AssertFatal(Qm > 0, "Qm is 0\n"); if (r <= Cprime - ((G / (Nl * Qm)) % Cprime) - 1) - E = Nl * Qm * (G / (Nl * Qm * Cprime)); + E = Nl * Qm * (G / (Nl * Qm * Cprime)); else - E = Nl * Qm * ((G / (Nl * Qm * Cprime)) + 1); + E = Nl * Qm * ((G / (Nl * Qm * Cprime)) + 1); - LOG_D(PHY,"nr_get_E : (G %d, C %d, Qm %d, Nl %d, r %d), E %d\n",G, C, Qm, Nl, r, E); + LOG_D(PHY, "nr_get_E : (G %d, C %d, Qm %d, Nl %d, r %d), E %d\n", G, C, Qm, Nl, r, E); return E; } + +static const uint8_t index_k0[2][4] = {{0, 17, 33, 56}, {0, 13, 25, 43}}; + +int nr_get_R_ldpc_decoder(int rvidx, int E, int BG, int Z, int *llrLen, int round) +{ + AssertFatal(BG == 1 || BG == 2, "Unknown BG %d\n", BG); + + int Ncb = (BG == 1) ? (66 * Z) : (50 * Z); + int infoBits = (index_k0[BG - 1][rvidx] * Z + E); + + if (round == 0) + *llrLen = infoBits; + if (infoBits > Ncb) + infoBits = Ncb; + if (infoBits > *llrLen) + *llrLen = infoBits; + + int sysBits = (BG == 1) ? (22 * Z) : (10 * Z); + float decoderR = (float)sysBits / (infoBits + 2 * Z); + + if (BG == 2) + if (decoderR < 0.3333) + return 15; + else if (decoderR < 0.6667) + return 13; + else + return 23; + else if (decoderR < 0.6667) + return 13; + else if (decoderR < 0.8889) + return 23; + else + return 89; +} From 61cb2bcc5ae7e667f173b6945a504a95fad32c86 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 19 Dec 2024 14:35:48 +0000 Subject: [PATCH 38/54] fix(nrLDPC_coding_segment): Reorganize segment and xdma CMakeFiles.txt to avoid redundant compilation --- CMakeLists.txt | 7 +------ .../nrLDPC_coding_segment/CMakeLists.txt | 21 +++++++++++++++---- .../nrLDPC_coding_segment}/nrLDPC_load.c | 0 .../nrLDPC_coding_xdma/CMakeLists.txt | 8 ++++--- 4 files changed, 23 insertions(+), 13 deletions(-) rename openair1/PHY/CODING/{ => nrLDPC_coding/nrLDPC_coding_segment}/nrLDPC_load.c (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a3bca4ab7..15e79dcd72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -772,10 +772,6 @@ set(PHY_TURBOIF ${OPENAIR1_DIR}/PHY/CODING/coding_load.c ) -set(PHY_NR_CODINGIF - ${OPENAIR1_DIR}/PHY/CODING/nrLDPC_load.c -) - set(PHY_NRLDPC_CODINGIF ${OPENAIR1_DIR}/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface_load.c ) @@ -2058,12 +2054,11 @@ target_link_libraries(smallblocktest PRIVATE add_executable(ldpctest - ${PHY_NR_CODINGIF} ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c ) target_link_libraries(ldpctest PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON -Wl,--end-group - m pthread dl shlib_loader ${T_LIB} + m pthread dl shlib_loader ${T_LIB} nr_coding_segment_utils ) add_executable(nr_dlschsim diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt index 52de22b05f..99ac2279eb 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt @@ -1,9 +1,22 @@ -add_library(ldpc MODULE - nrLDPC_coding_segment_decoder.c - nrLDPC_coding_segment_encoder.c - ${PHY_NR_CODINGIF} +add_library(nr_coding_segment_utils OBJECT + nrLDPC_load.c nr_rate_matching.c ) + +add_library(nr_coding_segment_decoder OBJECT + nrLDPC_coding_segment_decoder.c +) + +add_library(nr_coding_segment_encoder OBJECT + nrLDPC_coding_segment_encoder.c +) + +add_library(ldpc MODULE) +target_link_libraries(ldpc PRIVATE + nr_coding_segment_decoder + nr_coding_segment_encoder + nr_coding_segment_utils +) set_target_properties(ldpc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_dependencies(nr-softmodem ldpc) diff --git a/openair1/PHY/CODING/nrLDPC_load.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_load.c similarity index 100% rename from openair1/PHY/CODING/nrLDPC_load.c rename to openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_load.c diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt index 8c357c75d4..4cc6421e3f 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt @@ -10,11 +10,13 @@ if (ENABLE_LDPC_XDMA) add_library(ldpc_xdma MODULE nrLDPC_coding_xdma_offload.c nrLDPC_coding_xdma.c - ../nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c - ../../nrLDPC_load.c - ../nrLDPC_coding_segment/nr_rate_matching.c ) target_include_directories(ldpc_xdma PRIVATE ../nrLDPC_coding_segment) + + target_link_libraries(ldpc_xdma PRIVATE + nr_coding_segment_encoder + nr_coding_segment_utils + ) set_target_properties(ldpc_xdma PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_dependencies(nr-softmodem ldpc_xdma) From fc2bd367887f42eef0a2bfe14ebace986bbb2b4a Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 2 Jan 2025 10:40:44 +0000 Subject: [PATCH 39/54] fix(nrLDPC_coding_segment): missing dependency of nr_coding_segment_decoder, nr_coding_segment_encoder, nr_coding_segment_utils and nr_coding_xdma_decoder on generate_T --- .../nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt | 7 +++++++ .../CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt index 99ac2279eb..ed8de90594 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt @@ -11,6 +11,13 @@ add_library(nr_coding_segment_encoder OBJECT nrLDPC_coding_segment_encoder.c ) +#ensure that the T header files are generated before targets depending on them +if (${T_TRACER}) + add_dependencies(nr_coding_segment_utils generate_T) + add_dependencies(nr_coding_segment_decoder generate_T) + add_dependencies(nr_coding_segment_encoder generate_T) +endif (${T_TRACER}) + add_library(ldpc MODULE) target_link_libraries(ldpc PRIVATE nr_coding_segment_decoder diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt index 4cc6421e3f..f51eb9d8ca 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt @@ -13,6 +13,11 @@ if (ENABLE_LDPC_XDMA) ) target_include_directories(ldpc_xdma PRIVATE ../nrLDPC_coding_segment) + #ensure that the T header files are generated before targets depending on them + if (${T_TRACER}) + add_dependencies(ldpc_xdma generate_T) + endif (${T_TRACER}) + target_link_libraries(ldpc_xdma PRIVATE nr_coding_segment_encoder nr_coding_segment_utils From cb6eaa1deb6434b157d00a38234c4757f9dca28b Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 2 Jan 2025 14:00:04 +0100 Subject: [PATCH 40/54] documentation for analog beamforming implementation --- doc/MAC/mac-usage.md | 6 +++--- doc/README.md | 1 + doc/analog_beamforming.md | 30 ++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 doc/analog_beamforming.md diff --git a/doc/MAC/mac-usage.md b/doc/MAC/mac-usage.md index 4c7bf4df8e..cf69f7cd71 100644 --- a/doc/MAC/mac-usage.md +++ b/doc/MAC/mac-usage.md @@ -192,10 +192,10 @@ In the `MACRLCs` section of the gNB/DU configuration file: * `identity_precoding_matrix` (default 0=false): flag to enable to use only the identity precoding matrix in DL precoding * `set_analog_beamforming` (default 0=false): flag to enable analog - beamforming -* `beam_duration`: duration/number of consecutive slots for a given set of + beamforming (for more information [`analog_beamforming.md`](../analog_beamforming.md)) +* `beam_duration` (default 1): duration/number of consecutive slots for a given set of beams, depending on hardware switching performance -* `beams_per_period`: set of beams that can be simultaneously allocated in a +* `beams_per_period` (default 1): set of beams that can be simultaneously allocated in a period (`beam_duration`) In the `gNBs` section of the gNB/DU configuration file: some of the parameters diff --git a/doc/README.md b/doc/README.md index b703397e3a..c4b24f39ec 100644 --- a/doc/README.md +++ b/doc/README.md @@ -84,6 +84,7 @@ Legacy unmaintained files: - [L1 threads in NR-UE](./nr-ue-design.md) - [Information on gNB MAC](./MAC/mac-usage.md) - [Information on gNB RRC](./RRC/rrc-usage.md) +- [Information on analog beamforming implementation](./analog_beamforming.md) Legacy unmaintained files: - [`5Gnas.md`](./5Gnas.md) diff --git a/doc/analog_beamforming.md b/doc/analog_beamforming.md new file mode 100644 index 0000000000..6d9e5bf71c --- /dev/null +++ b/doc/analog_beamforming.md @@ -0,0 +1,30 @@ +This document explains the implementation of analog beamforming in OAI codebase. + +[[_TOC_]] + +# Introduction to analog beamforming + +Beamforming is a technique applied to antenna arrays to create a directional radiation pattern. This often consists in providing a different phase shift to each element of the array such that signals with a different angle of arrival/departure experience a change in radiation pattern because of constructive or destructive interference. + +There are three main beamforming techinques: analog, digital and hybrid. The names refer to the phase shift application before or after the digital to analog conversion (or analog to digital in reception). When we speak about analog beamforming we generally refer to a techinique where the phase shifts that produce the beam stearing are applied by the radio unit (RU) choosing from a finite set of steering directions. The advantage of analog beamforming is a simplified analog circuitry and therefore reduced costs. + +The presence of a limited number of predefined beams at RU poses constraints to the scheduler at gNB. As a matter of fact, the scheduler can serve only a limited number of beams, depending on the RU characteristics (possibly only 1), in a given time scale, that also depends on the RU characteristics (e.g. 1 slot or 1 symbol). This limitation doesn't exist for digital beamforming. + +# Configuration file fields for analog beamforming + +A set of parameters in configuration files controls the implementation of analog beamforming and instructs the scheduler on how to behave in such scenarios. Since most notably this technique in 5G is employed in FR2, the configuration file example currently available is a RFsim one for band 261. [Config file example](../ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf) + +In the `MACRLC` section of configuration files, there are three new parameters: `set_analog_beamforming`, `beam_duration` and `beams_per_period`. The explanation of these parameters is here provided: +- `set_analog_beamforming` can be set to 1 or 0 to activate or desactivate analog beamforming (default value is 0) +- `beam_duration` is the number of slots (currently minimum duration of a beam) the scheduler is tied to a beam (default value is 1) +- `beams_per_period` is the number of concurrent beams the RU can handle in the beam duration (default value is 1) + +In the `gNBs` section of the configuration file, under the phyisical parameters, a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. This field is called `beam_weights`. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted. + +# Implementation in OAI scheduler + +A new MAC structure `NR_beam_info_t` controls the behavior of the scheduler in presence of analog beamforming. Besides the already mentioned parameters `beam_duration` and `beams_per_period`, the structure also holds a matrix `beam_allocation[i][j]`, whose indices `i` and `j` stands respectively for the number of beams in the period and the slot index (the size of the latter depends on the frame characteristics). +This matrix contains the beams already allocated in a given slot, to flag the scheduler to use one of these to schedule a UE in one of these beams. If the matrix is full (all the beams in the given period, e.g. slot) are already allocated, the scheduler can't allocate a UE in a new beam. +To this goal, we extended the virtual resource block (VRB) map by one dimension to also contain information per allocated beam. As said, the scheduler can independently schedule users in a number of beams up to `beams_per_period` concurrently. + +It is important to note that in current implementation, there are several periodical channels, e.g. PRACH or PUCCH for CSI et cetera, that have the precendence in being assigned a beam, that is because the scheduling is automatic, set in RRC configuration, and not up to the scheduler. For these instances, we assume the beam is available (if not there are assertions to stop the process). For data channels, the currently implemented PF scheduler is used. The only modification is that a UE can be served only if there is a free beam available or the one of the beams already in use correspond to that UE beam. From e0ca70c36dd61c4eefb512362a82dac51c12e98a Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Fri, 29 Nov 2024 12:57:32 +0100 Subject: [PATCH 41/54] replace a set of #define by a C bit array, remove duplicated extern global variable declaration --- common/ran_context.h | 8 ++- common/utils/telnetsrv/telnetsrv.c | 6 +- common/utils/websrv/websrv.c | 2 +- common/utils/websrv/websrv_scope.c | 20 +++--- executables/lte-enb.c | 15 +--- executables/lte-ru.c | 3 - executables/lte-softmodem.c | 11 +-- executables/lte-softmodem.h | 4 -- executables/lte-ue.c | 3 - executables/lte-uesoftmodem.c | 11 +-- executables/main_ru.c | 3 +- executables/nr-gnb.c | 14 +--- executables/nr-ru.c | 2 - executables/nr-softmodem-common.h | 1 - executables/nr-softmodem.c | 4 +- executables/nr-ue.c | 2 +- executables/nr-uesoftmodem.c | 4 +- executables/ru_control.c | 6 -- executables/softmodem-bits.h | 61 ---------------- executables/softmodem-common.c | 63 ++++++----------- executables/softmodem-common.h | 70 +++++++++++-------- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 4 +- openair1/PHY/LTE_TRANSPORT/dlsch_coding.c | 2 - openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 2 - openair1/PHY/TOOLS/calibration_test.c | 2 +- openair1/PHY/TOOLS/imscope/imscope.cpp | 10 ++- openair1/PHY/TOOLS/nr_phy_scope.c | 4 +- openair1/PHY/defs_common.h | 4 +- openair1/SCHED/phy_procedures_lte_eNb.c | 2 - openair1/SCHED_NR/nr_ru_procedures.c | 5 -- openair1/SIMULATION/LTE_PHY/dlsim.c | 8 ++- openair1/SIMULATION/LTE_PHY/ulsim.c | 8 +-- openair1/SIMULATION/NR_PHY/dlschsim.c | 2 - openair1/SIMULATION/NR_PHY/dlsim.c | 3 +- openair1/SIMULATION/NR_PHY/pbchsim.c | 2 - openair1/SIMULATION/NR_PHY/prachsim.c | 1 - openair1/SIMULATION/NR_PHY/pucchsim.c | 4 +- openair1/SIMULATION/NR_PHY/ulschsim.c | 1 - openair2/LAYER2/MAC/main.c | 1 - openair2/LAYER2/NR_MAC_UE/main_ue_nr.c | 1 - .../tests/test_nr_ue_power_procedures.cpp | 4 -- .../tests/test_nr_ue_ra_procedures.cpp | 5 +- openair2/LAYER2/NR_MAC_gNB/main.c | 9 ++- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 4 -- openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c | 8 +-- openair2/RRC/NR/rrc_gNB.c | 4 +- radio/COMMON/common_lib.c | 4 +- radio/ETHERNET/eth_udp.c | 2 - 48 files changed, 135 insertions(+), 284 deletions(-) delete mode 100644 executables/softmodem-bits.h diff --git a/common/ran_context.h b/common/ran_context.h index 244e6fd30d..e009d0987f 100644 --- a/common/ran_context.h +++ b/common/ran_context.h @@ -32,7 +32,9 @@ #ifndef __RAN_CONTEXT_H__ #define __RAN_CONTEXT_H__ - +#ifdef __cplusplus +extern "C" { +#endif #include #include @@ -111,6 +113,8 @@ typedef struct { } RAN_CONTEXT_t; extern RAN_CONTEXT_t RC; - #define NB_eNB_INST RC.nb_inst +#ifdef __cplusplus +} +#endif #endif diff --git a/common/utils/telnetsrv/telnetsrv.c b/common/utils/telnetsrv/telnetsrv.c index 3da25380dd..64d67e13d1 100644 --- a/common/utils/telnetsrv/telnetsrv.c +++ b/common/utils/telnetsrv/telnetsrv.c @@ -657,7 +657,7 @@ void run_telnetsrv(void) { fprintf(stderr,"[TELNETSRV] Error %s on listen call\n",strerror(errno)); using_history(); - int plen=sprintf(prompt,"%s_%s> ",TELNET_PROMPT_PREFIX,get_softmodem_function(NULL)); + int plen = sprintf(prompt, "%s_%s> ", TELNET_PROMPT_PREFIX, get_softmodem_function()); TELNET_LOG("\nInitializing telnet server...\n"); while( (telnetparams.new_socket = accept(sock, &cli_addr, &cli_len)) ) { @@ -746,7 +746,7 @@ void run_telnetclt(void) { pthread_setname_np(pthread_self(), "telnetclt"); set_sched(pthread_self(),0,telnetparams.priority); char prompt[sizeof(TELNET_PROMPT_PREFIX)+10]; - sprintf(prompt,"%s_%s> ",TELNET_PROMPT_PREFIX,get_softmodem_function(NULL)); + sprintf(prompt, "%s_%s> ", TELNET_PROMPT_PREFIX, get_softmodem_function()); name.sin_family = AF_INET; struct in_addr addr; inet_aton("127.0.0.1", &addr) ; @@ -883,7 +883,7 @@ int telnetsrv_autoinit(void) { memset(&telnetparams,0,sizeof(telnetparams)); config_get(config_get_if(), telnetoptions, sizeofArray(telnetoptions), "telnetsrv"); /* possibly load a exec specific shared lib */ - char *execfunc=get_softmodem_function(NULL); + char *execfunc = get_softmodem_function(); char libname[64]; sprintf(libname,"telnetsrv_%s",execfunc); load_module_shlib(libname,NULL,0,NULL); diff --git a/common/utils/websrv/websrv.c b/common/utils/websrv/websrv.c index f6fb898104..4c8bea0c31 100644 --- a/common/utils/websrv/websrv.c +++ b/common/utils/websrv/websrv.c @@ -736,7 +736,7 @@ int websrv_callback_get_softmodemstatus(const struct _u_request *request, struct inet_ntop(AF_INET, &(websrvparams.instance.bind_address->sin_addr), ipstr, INET_ADDRSTRLEN); else sprintf(ipstr, "%s", "0.0.0.0"); - snprintf(srvinfo, sizeof(srvinfo) - 1, "%s:%hu %s", ipstr, websrvparams.instance.port, get_softmodem_function(NULL)); + snprintf(srvinfo, sizeof(srvinfo) - 1, "%s:%hu %s", ipstr, websrvparams.instance.port, get_softmodem_function()); json_t *modemvars = json_array(); websrv_add_modeminfo(modemvars, "connected to", srvinfo, "string"); websrv_add_modeminfo(modemvars, "config_file", CONFIG_GETCONFFILE, "configfile"); diff --git a/common/utils/websrv/websrv_scope.c b/common/utils/websrv/websrv_scope.c index 63e3c27b7c..8e3d9e4740 100644 --- a/common/utils/websrv/websrv_scope.c +++ b/common/utils/websrv/websrv_scope.c @@ -107,10 +107,10 @@ int websrv_scope_manager(uint64_t lcount, websrv_params_t *websrvparams) websrv_websocket_send_scopemessage(SCOPEMSG_TYPE_TIME, strtime, websrvparams_ptr->wm); } if ((lcount % scope_params.refrate) == 0) { - if (IS_SOFTMODEM_GNB_BIT && (scope_params.statusmask & SCOPE_STATUSMASK_STARTED)) { + if (IS_SOFTMODEM_GNB && (scope_params.statusmask & SCOPE_STATUSMASK_STARTED)) { phy_scope_gNB(scope_params.scopeform, scope_params.scopedata, scope_params.selectedTarget + 1 /* ue id, +1 as used in loop < limit */); } - if (IS_SOFTMODEM_5GUE_BIT && (scope_params.statusmask & SCOPE_STATUSMASK_STARTED)) { + if (IS_SOFTMODEM_5GUE && (scope_params.statusmask & SCOPE_STATUSMASK_STARTED)) { phy_scope_nrUE(((scopeData_t *)((PHY_VARS_NR_UE *)(scope_params.scopedata))->scopeData)->liveData, scope_params.scopeform, (PHY_VARS_NR_UE *)scope_params.scopedata, @@ -124,7 +124,7 @@ int websrv_scope_manager(uint64_t lcount, websrv_params_t *websrvparams) /* free scope resources, as websrv scope interface can be stopped and started */ void websrv_scope_stop(void) { - clear_softmodem_optmask(SOFTMODEM_DOSCOPE_BIT); + IS_SOFTMODEM_DOSCOPE = false; scope_params.statusmask &= ~SCOPE_STATUSMASK_STARTED; OAI_phy_scope_t *sp = (OAI_phy_scope_t *)scope_params.scopeform; if (sp != NULL) @@ -138,7 +138,7 @@ void websrv_scope_stop(void) char *websrv_scope_initdata(void) { scope_params.num_datamsg_max = 200; - if (IS_SOFTMODEM_GNB_BIT) { + if (IS_SOFTMODEM_GNB) { scopeParms_t p; p.ru = RC.ru[0]; p.gNB = RC.gNB[0]; @@ -147,7 +147,7 @@ char *websrv_scope_initdata(void) scope_params.scopeform = create_phy_scope_gnb(); scope_params.statusmask |= SCOPE_STATUSMASK_AVAILABLE; return "gNB"; - } else if (IS_SOFTMODEM_5GUE_BIT) { + } else if (IS_SOFTMODEM_5GUE) { scope_params.scopedata = PHY_vars_UE_g[0][0]; nrUEinitScope(PHY_vars_UE_g[0][0]); scope_params.scopeform = create_phy_scope_nrue(scope_params.selectedTarget); @@ -188,12 +188,12 @@ int websrv_scope_callback_set_params(const struct _u_request *request, struct _u websrv_scope_initdata(); scope_params.statusmask |= SCOPE_STATUSMASK_STARTED; scope_params.selectedTarget = 1; // 1 UE to be received from GUI (for xNB scope's - set_softmodem_optmask(SOFTMODEM_DOSCOPE_BIT); // to trigger data copy in scope buffers + IS_SOFTMODEM_DOSCOPE = true; // to trigger data copy in scope buffers } httpstatus = 200; } else if (strcmp(vval, "stop") == 0) { scope_params.statusmask &= ~SCOPE_STATUSMASK_STARTED; - clear_softmodem_optmask(SOFTMODEM_DOSCOPE_BIT); + IS_SOFTMODEM_DOSCOPE = false; httpstatus = 200; } else { LOG_W(UTIL, "invalid startstop command value: %s\n", vval); @@ -232,11 +232,11 @@ int websrv_scope_callback_set_params(const struct _u_request *request, struct _u httpstatus = 200; } else if (strcmp(vname, "TargetSelect") == 0) { scope_params.selectedTarget = strtol(vval, NULL, 10); - if (IS_SOFTMODEM_GNB_BIT && scope_params.selectedTarget > NUMBER_OF_UE_MAX) { + if (IS_SOFTMODEM_GNB && scope_params.selectedTarget > NUMBER_OF_UE_MAX) { snprintf(errmsg, sizeof(errmsg) - 1, "max UE index is %d for this gNB", NUMBER_OF_UE_MAX); httpstatus = 500; scope_params.selectedTarget = 1; - } else if (IS_SOFTMODEM_5GUE_BIT && scope_params.selectedTarget > 0) { + } else if (IS_SOFTMODEM_5GUE && scope_params.selectedTarget > 0) { snprintf(errmsg, sizeof(errmsg) - 1, "UE currently supports only one gNB"); httpstatus = 500; scope_params.selectedTarget = 0; @@ -276,7 +276,7 @@ int websrv_scope_callback_get_desc(const struct _u_request *request, struct _u_r char stitle[64]; websrv_scope_stop(); // in case it's not the first connection - if (IS_SOFTMODEM_DOSCOPE | IS_SOFTMODEM_ENB_BIT | IS_SOFTMODEM_4GUE_BIT) { + if (IS_SOFTMODEM_DOSCOPE | IS_SOFTMODEM_ENB | IS_SOFTMODEM_4GUE) { strcpy(stitle, "none"); } else { strcpy(stitle, websrv_scope_initdata()); diff --git a/executables/lte-enb.c b/executables/lte-enb.c index 42c97e8913..477ff5cd68 100644 --- a/executables/lte-enb.c +++ b/executables/lte-enb.c @@ -44,28 +44,17 @@ #define _GNU_SOURCE #include - - -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all - #include "assertions.h" - #include "PHY/types.h" - #include "PHY/INIT/phy_init.h" #include "PHY/defs_eNB.h" #include "SCHED/sched_eNB.h" #include "PHY/LTE_TRANSPORT/transport_proto.h" #include "nfapi/oai_integration/vendor_ext.h" -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include "radio/COMMON/common_lib.h" -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" @@ -102,8 +91,6 @@ struct timing_info_t { // Fix per CC openair rf/if device update -extern int oai_exit; - extern int transmission_mode; #include "executables/thread-common.h" @@ -927,7 +914,7 @@ void init_eNB_proc(int inst) { if (cpu_meas_enabled) threadCreate(&proc->process_stats_thread, process_stats_thread, (void *)eNB, "opp stats", -1, sched_get_priority_min(SCHED_OAI)); - if (!IS_SOFTMODEM_NOSTATS_BIT) + if (!IS_SOFTMODEM_NOSTATS) threadCreate(&proc->L1_stats_thread, L1_stats_thread, (void *)eNB, "L1 stats", -1, sched_get_priority_min(SCHED_OAI)); } diff --git a/executables/lte-ru.c b/executables/lte-ru.c index aadf1ca9b0..326e55b288 100644 --- a/executables/lte-ru.c +++ b/executables/lte-ru.c @@ -45,8 +45,6 @@ #include #include -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all - #include "assertions.h" #include "PHY/defs_common.h" #include "PHY/types.h" @@ -78,7 +76,6 @@ static int DEFRUTPCORES[] = {2,4,6,8}; #define MBMS_EXPERIMENTAL -extern int oai_exit; extern clock_source_t clock_source; #include "executables/thread-common.h" //extern PARALLEL_CONF_t get_thread_parallel_conf(void); diff --git a/executables/lte-softmodem.c b/executables/lte-softmodem.c index 3511ae0a04..2a0b73c019 100644 --- a/executables/lte-softmodem.c +++ b/executables/lte-softmodem.c @@ -33,9 +33,6 @@ #define _GNU_SOURCE /* See feature_test_macros(7) */ #include - -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all - #include "assertions.h" #include "common/oai_version.h" @@ -45,14 +42,9 @@ #include "common/ran_context.h" #include "common/config/config_userapi.h" #include "common/utils/load_module_shlib.h" -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include "radio/COMMON/common_lib.h" #include "radio/ETHERNET/if_defs.h" -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include #include "PHY/phy_vars.h" @@ -297,7 +289,8 @@ void exit_function(const char *file, const char *function, const int line, const static void get_options(configmodule_interface_t *cfg) { CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP); - get_common_options(cfg, SOFTMODEM_ENB_BIT); + IS_SOFTMODEM_ENB = true; + get_common_options(cfg); CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP); if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) { diff --git a/executables/lte-softmodem.h b/executables/lte-softmodem.h index 8a1149d581..8c55f0dc65 100644 --- a/executables/lte-softmodem.h +++ b/executables/lte-softmodem.h @@ -20,7 +20,6 @@ #include #include #include "radio/COMMON/common_lib.h" -//#undef MALLOC #include "assertions.h" #include "PHY/types.h" #include "PHY/defs_eNB.h" @@ -121,9 +120,6 @@ extern uint64_t downlink_frequency[MAX_NUM_CCs][4]; extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; extern int rx_input_level_dBm; - -extern int oai_exit; - extern openair0_config_t openair0_cfg[MAX_CARDS]; extern pthread_cond_t sync_cond; extern pthread_mutex_t sync_mutex; diff --git a/executables/lte-ue.c b/executables/lte-ue.c index 8e05aae489..74a2fa240b 100644 --- a/executables/lte-ue.c +++ b/executables/lte-ue.c @@ -41,9 +41,6 @@ #include "PHY/MODULATION/modulation_UE.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include "PHY/phy_extern_ue.h" #include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_proto.h" diff --git a/executables/lte-uesoftmodem.c b/executables/lte-uesoftmodem.c index 35fb4d4246..f039bc4479 100644 --- a/executables/lte-uesoftmodem.c +++ b/executables/lte-uesoftmodem.c @@ -33,9 +33,6 @@ #define _GNU_SOURCE /* See feature_test_macros(7) */ #include - -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all - #include "assertions.h" #include "PHY/types.h" @@ -46,14 +43,9 @@ #include "common/ran_context.h" #include "common/config/config_userapi.h" #include "common/utils/load_module_shlib.h" -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include "radio/COMMON/common_lib.h" #include "radio/ETHERNET/if_defs.h" -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include "PHY/phy_vars_ue.h" #include "PHY/LTE_TRANSPORT/transport_vars.h" @@ -274,7 +266,8 @@ static void get_options(configmodule_interface_t *cfg) CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP); /* unknown parameters on command line will be checked in main after all init have been performed */ - get_common_options(cfg, SOFTMODEM_4GUE_BIT); + IS_SOFTMODEM_4GUE = true; + get_common_options(cfg); paramdef_t cmdline_uemodeparams[] =CMDLINE_UEMODEPARAMS_DESC; paramdef_t cmdline_ueparams[] =CMDLINE_UEPARAMS_DESC; config_process_cmdline(cfg, cmdline_uemodeparams, sizeofArray(cmdline_uemodeparams), NULL); diff --git a/executables/main_ru.c b/executables/main_ru.c index 68a3e49a0e..92db896cc3 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -119,7 +119,8 @@ void exit_function(const char *file, const char *function, const int line, const static void get_options(configmodule_interface_t *cfg) { CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP); - get_common_options(cfg, SOFTMODEM_ENB_BIT); + IS_SOFTMODEM_ENB = true; + get_common_options(cfg); CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP); // RCConfig(); diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 8098b75a56..e5f2a13664 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -33,8 +33,6 @@ #define _GNU_SOURCE #include -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all - #include "assertions.h" #include #include @@ -54,13 +52,7 @@ #include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h" #include "LAYER2/NR_MAC_gNB/mac_proto.h" -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include "radio/COMMON/common_lib.h" - -//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all - #include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/phy_extern.h" @@ -376,9 +368,9 @@ void init_gNB_Tpool(int inst) { // this will be removed when the msgDataTx is not necessary anymore gNB->msgDataTx = msgDataTx; - if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS_BIT) && (NFAPI_MODE!=NFAPI_MODE_VNF) && (NFAPI_MODE != NFAPI_MODE_AERIAL)) - threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW); - + if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS) && (NFAPI_MODE != NFAPI_MODE_VNF) + && (NFAPI_MODE != NFAPI_MODE_AERIAL)) + threadCreate(&proc->L1_stats_thread, nrL1_stats_thread, (void *)gNB, "L1_stats", -1, OAI_PRIORITY_RT_LOW); } void term_gNB_Tpool(int inst) { diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 37e520431c..6d0a2044ba 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -29,8 +29,6 @@ #include #include -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all - #include "common/utils/nr/nr_common.h" #include "common/utils/assertions.h" #include "common/utils/system.h" diff --git a/executables/nr-softmodem-common.h b/executables/nr-softmodem-common.h index 9bec61f2a0..b7fc576845 100644 --- a/executables/nr-softmodem-common.h +++ b/executables/nr-softmodem-common.h @@ -25,7 +25,6 @@ #include #include "radio/COMMON/common_lib.h" -#undef MALLOC #include "assertions.h" #include "PHY/types.h" diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 96527fb303..a200b1e8a4 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -82,7 +82,6 @@ unsigned short config_frames[4] = {2,9,11,13}; #include "radio/COMMON/common_lib.h" #include "s1ap_eNB.h" #include "sctp_eNB_task.h" -#include "softmodem-bits.h" #include "system.h" #include "time_meas.h" #include "utils.h" @@ -350,7 +349,8 @@ static void get_options(configmodule_interface_t *cfg) { paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ; CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP); - get_common_options(cfg, SOFTMODEM_GNB_BIT); + IS_SOFTMODEM_GNB = true; + get_common_options(cfg); config_process_cmdline(cfg, cmdline_params, sizeofArray(cmdline_params), NULL); CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP); } diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 78abb7b081..c18a6647dd 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -1133,7 +1133,7 @@ void init_NR_UE_threads(PHY_VARS_NR_UE *UE) { char thread_name[16]; sprintf(thread_name, "UEthread_%d", UE->Mod_id); threadCreate(&thread, UE_thread, (void *)UE, thread_name, -1, OAI_PRIORITY_RT_MAX); - if (!IS_SOFTMODEM_NOSTATS_BIT) { + if (!IS_SOFTMODEM_NOSTATS) { pthread_t stat_pthread; sprintf(thread_name, "L1_UE_stats_%d", UE->Mod_id); threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, thread_name, -1, OAI_PRIORITY_RT_LOW); diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 158cc293ef..503fcc0a76 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -403,8 +403,8 @@ int main(int argc, char **argv) // get options and fill parameters from configuration file get_options(uniqCfg); // Command-line options specific for NRUE - - get_common_options(uniqCfg, SOFTMODEM_5GUE_BIT); + IS_SOFTMODEM_5GUE = true; + get_common_options(uniqCfg); CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP); softmodem_verify_mode(get_softmodem_params()); diff --git a/executables/ru_control.c b/executables/ru_control.c index 2136e5ff53..8345007f0b 100644 --- a/executables/ru_control.c +++ b/executables/ru_control.c @@ -43,16 +43,11 @@ #include #include -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all - #include "assertions.h" #include "PHY/types.h" #include "PHY/defs_common.h" -#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all - - #include "radio/COMMON/common_lib.h" #include "radio/ETHERNET/ethernet_lib.h" @@ -79,7 +74,6 @@ const char rru_format_options[4][20] = {"OAI_IF5_only","OAI_IF4p5_only","OAI_IF5 const char rru_formats[3][20] = {"OAI_IF5","MBP_IF5","OAI_IF4p5"}; const char ru_if_formats[4][20] = {"LOCAL_RF","REMOTE_OAI_IF5","REMOTE_MBP_IF5","REMOTE_OAI_IF4p5"}; -extern int oai_exit; extern void wait_eNBs(void); int send_tick(RU_t *ru) diff --git a/executables/softmodem-bits.h b/executables/softmodem-bits.h deleted file mode 100644 index 6d527148cd..0000000000 --- a/executables/softmodem-bits.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -#ifndef SOFTMODEM_BITS_H -#define SOFTMODEM_BITS_H - -// clang-format off -#define BIT_0 (1 << 0) -#define BIT_1 (1 << 1) -#define BIT_2 (1 << 2) -#define BIT_10 (1 << 10) -#define BIT_12 (1 << 12) -#define BIT_13 (1 << 13) -#define BIT_15 (1 << 15) -#define BIT_16 (1 << 16) -#define BIT_17 (1 << 17) -#define BIT_18 (1 << 18) -#define BIT_20 (1 << 20) -#define BIT_21 (1 << 21) -#define BIT_22 (1 << 22) -#define BIT_23 (1 << 23) -#define BIT_24 (1 << 24) -#define BIT_25 (1 << 25) - -#define SOFTMODEM_NOS1_BIT BIT_0 -#define SOFTMODEM_NOKRNMOD_BIT BIT_1 -#define SOFTMODEM_NONBIOT_BIT BIT_2 -#define SOFTMODEM_RFSIM_BIT BIT_10 -#define SOFTMODEM_SIML1_BIT BIT_12 -#define SOFTMODEM_DLSIM_BIT BIT_13 -#define SOFTMODEM_DOSCOPE_BIT BIT_15 -#define SOFTMODEM_RECPLAY_BIT BIT_16 -#define SOFTMODEM_TELNETCLT_BIT BIT_17 -#define SOFTMODEM_RECRECORD_BIT BIT_18 -#define SOFTMODEM_ENB_BIT BIT_20 -#define SOFTMODEM_GNB_BIT BIT_21 -#define SOFTMODEM_4GUE_BIT BIT_22 -#define SOFTMODEM_5GUE_BIT BIT_23 -#define SOFTMODEM_NOSTATS_BIT BIT_24 -#define SOFTMODEM_IMSCOPE_BIT BIT_25 -// clang-format on - -#endif // SOFTMODEM_BITS_H diff --git a/executables/softmodem-common.c b/executables/softmodem-common.c index 2fed359d82..92c913c88e 100644 --- a/executables/softmodem-common.c +++ b/executables/softmodem-common.c @@ -41,55 +41,33 @@ #include "softmodem-common.h" #include "nfapi/oai_integration/vendor_ext.h" - -static softmodem_params_t softmodem_params; char *parallel_config=NULL; char *worker_config=NULL; int usrp_tx_thread = 0; uint8_t nfapi_mode=0; -static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS; static struct timespec start; -uint64_t get_softmodem_optmask(void) { - return softmodem_params.optmask; -} - -uint64_t set_softmodem_optmask(uint64_t bitmask) { - softmodem_params.optmask = softmodem_params.optmask | bitmask; - return softmodem_params.optmask; -} - -uint64_t clear_softmodem_optmask(uint64_t bitmask) -{ - softmodem_params.optmask = softmodem_params.optmask & (~bitmask); - return softmodem_params.optmask; -} - +static softmodem_params_t softmodem_params; softmodem_params_t *get_softmodem_params(void) { return &softmodem_params; } -int32_t check_execmask(uint64_t execmask) { - char *softmodemfunc=map_int_to_str(softmodem_funcs, execmask); - if (softmodemfunc != NULL) { - set_softmodem_optmask(execmask); - return 0; - } - return -1; -} -char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) { - uint64_t fmask=(get_softmodem_optmask()&SOFTMODEM_FUNC_BITS); - char *softmodemfunc=map_int_to_str(softmodem_funcs, fmask); - if (sofmodemfunc_mask_ptr != NULL) - *sofmodemfunc_mask_ptr=fmask; - if (softmodemfunc != NULL) { - return softmodemfunc; - } +char *get_softmodem_function(void) +{ + optmask_t fmask = *get_softmodem_optmask(); + if (fmask.bit.SOFTMODEM_ENB_BIT) + return "enb"; + if (fmask.bit.SOFTMODEM_GNB_BIT) + return "gnb"; + if (fmask.bit.SOFTMODEM_4GUE_BIT) + return "4Gue"; + if (fmask.bit.SOFTMODEM_5GUE_BIT) + return "5Gue"; return "???"; } -void get_common_options(configmodule_interface_t *cfg, uint32_t execmask) +void get_common_options(configmodule_interface_t *cfg) { int32_t stats_disabled = 0; uint32_t online_log_messages=0; @@ -101,7 +79,6 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask) uint32_t enable_imscope = 0; int nfapi_index = 0; char *logmem_filename = NULL; - check_execmask(execmask); paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC; checkedparam_t cmdline_CheckParams[] = CMDLINE_PARAMS_CHECK_DESC; @@ -136,7 +113,7 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask) } if (start_telnetclt) { - set_softmodem_optmask(SOFTMODEM_TELNETCLT_BIT); + IS_SOFTMODEM_TELNETCLT = true; } if (logmem_filename != NULL && strlen(logmem_filename) > 0) { @@ -145,23 +122,23 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask) } if (noS1) { - set_softmodem_optmask(SOFTMODEM_NOS1_BIT); + IS_SOFTMODEM_NOS1 = true; } if (nonbiot) { - set_softmodem_optmask(SOFTMODEM_NONBIOT_BIT); + IS_SOFTMODEM_NONBIOT = true; } if (rfsim) { - set_softmodem_optmask(SOFTMODEM_RFSIM_BIT); + IS_SOFTMODEM_RFSIM = true; } if (do_forms) { - set_softmodem_optmask(SOFTMODEM_DOSCOPE_BIT); + IS_SOFTMODEM_DOSCOPE = true; } if (enable_imscope) { - set_softmodem_optmask(SOFTMODEM_IMSCOPE_BIT); + IS_SOFTMODEM_IMSCOPE_ENABLED = true; } if (start_websrv) { @@ -173,7 +150,7 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask) if(worker_config != NULL) set_worker_conf(worker_config); nfapi_setmode(nfapi_mode); if (stats_disabled) - set_softmodem_optmask(SOFTMODEM_NOSTATS_BIT); + IS_SOFTMODEM_NOSTATS = true; } void softmodem_verify_mode(const softmodem_params_t *p) diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h index dfeded92ba..19d2f4f76f 100644 --- a/executables/softmodem-common.h +++ b/executables/softmodem-common.h @@ -32,7 +32,6 @@ #ifndef SOFTMODEM_COMMON_H #define SOFTMODEM_COMMON_H #include "openair1/PHY/defs_common.h" -#include "softmodem-bits.h" #ifdef __cplusplus extern "C" { @@ -268,28 +267,46 @@ extern int usrp_tx_thread; /***************************************************************************************************************************************/ -#define SOFTMODEM_FUNC_BITS (SOFTMODEM_ENB_BIT | SOFTMODEM_GNB_BIT | SOFTMODEM_5GUE_BIT | SOFTMODEM_4GUE_BIT) -#define MAPPING_SOFTMODEM_FUNCTIONS {{"enb",SOFTMODEM_ENB_BIT},{"gnb",SOFTMODEM_GNB_BIT},{"4Gue",SOFTMODEM_4GUE_BIT},{"5Gue",SOFTMODEM_5GUE_BIT}} - - -#define IS_SOFTMODEM_NOS1 ( get_softmodem_optmask() & SOFTMODEM_NOS1_BIT) -#define IS_SOFTMODEM_NONBIOT ( get_softmodem_optmask() & SOFTMODEM_NONBIOT_BIT) -#define IS_SOFTMODEM_RFSIM ( get_softmodem_optmask() & SOFTMODEM_RFSIM_BIT) -#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT) -#define IS_SOFTMODEM_DLSIM ( get_softmodem_optmask() & SOFTMODEM_DLSIM_BIT) -#define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT) -#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT) -#define IS_SOFTMODEM_IQRECORDER ( get_softmodem_optmask() & SOFTMODEM_RECRECORD_BIT) -#define IS_SOFTMODEM_TELNETCLT_BIT ( get_softmodem_optmask() & SOFTMODEM_TELNETCLT_BIT) -#define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT) -#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT) -#define IS_SOFTMODEM_4GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_4GUE_BIT) -#define IS_SOFTMODEM_5GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_5GUE_BIT) -#define IS_SOFTMODEM_NOSTATS_BIT ( get_softmodem_optmask() & SOFTMODEM_NOSTATS_BIT) -#define IS_SOFTMODEM_IMSCOPE_ENABLED ( get_softmodem_optmask() & SOFTMODEM_IMSCOPE_BIT) - +#define IS_SOFTMODEM_NOS1 (get_softmodem_optmask()->bit.SOFTMODEM_NOS1_BIT) +#define IS_SOFTMODEM_NONBIOT (get_softmodem_optmask()->bit.SOFTMODEM_NONBIOT_BIT) +#define IS_SOFTMODEM_RFSIM (get_softmodem_optmask()->bit.SOFTMODEM_RFSIM_BIT) +#define IS_SOFTMODEM_SIML1 (get_softmodem_optmask()->bit.SOFTMODEM_SIML1_BIT) +#define IS_SOFTMODEM_DLSIM (get_softmodem_optmask()->bit.SOFTMODEM_DLSIM_BIT) +#define IS_SOFTMODEM_DOSCOPE (get_softmodem_optmask()->bit.SOFTMODEM_DOSCOPE_BIT) +#define IS_SOFTMODEM_IQPLAYER (get_softmodem_optmask()->bit.SOFTMODEM_RECPLAY_BIT) +#define IS_SOFTMODEM_IQRECORDER (get_softmodem_optmask()->bit.SOFTMODEM_RECRECORD_BIT) +#define IS_SOFTMODEM_TELNETCLT (get_softmodem_optmask()->bit.SOFTMODEM_TELNETCLT_BIT) +#define IS_SOFTMODEM_ENB (get_softmodem_optmask()->bit.SOFTMODEM_ENB_BIT) +#define IS_SOFTMODEM_GNB (get_softmodem_optmask()->bit.SOFTMODEM_GNB_BIT) +#define IS_SOFTMODEM_4GUE (get_softmodem_optmask()->bit.SOFTMODEM_4GUE_BIT) +#define IS_SOFTMODEM_5GUE (get_softmodem_optmask()->bit.SOFTMODEM_5GUE_BIT) +#define IS_SOFTMODEM_NOSTATS (get_softmodem_optmask()->bit.SOFTMODEM_NOSTATS_BIT) +#define IS_SOFTMODEM_IMSCOPE_ENABLED (get_softmodem_optmask()->bit.SOFTMODEM_IMSCOPE_BIT) +typedef struct optmask_s { + union { + struct { + uint64_t SOFTMODEM_NOS1_BIT: 1; + uint64_t SOFTMODEM_NOKRNMOD_BIT: 1; + uint64_t SOFTMODEM_NONBIOT_BIT: 1; + uint64_t SOFTMODEM_RFSIM_BIT: 1; + uint64_t SOFTMODEM_SIML1_BIT: 1; + uint64_t SOFTMODEM_DLSIM_BIT: 1; + uint64_t SOFTMODEM_DOSCOPE_BIT: 1; + uint64_t SOFTMODEM_RECPLAY_BIT: 1; + uint64_t SOFTMODEM_TELNETCLT_BIT: 1; + uint64_t SOFTMODEM_RECRECORD_BIT: 1; + uint64_t SOFTMODEM_ENB_BIT: 1; + uint64_t SOFTMODEM_GNB_BIT: 1; + uint64_t SOFTMODEM_4GUE_BIT: 1; + uint64_t SOFTMODEM_5GUE_BIT: 1; + uint64_t SOFTMODEM_NOSTATS_BIT: 1; + uint64_t SOFTMODEM_IMSCOPE_BIT: 1; + } bit; + uint64_t v; // allow to export entire bit set, force to 64 bit processor atomic size + }; +} optmask_t; typedef struct { - uint64_t optmask; + optmask_t optmask; //THREAD_STRUCT thread_struct; char *rf_config_file; char *threadPoolConfig; @@ -323,12 +340,10 @@ typedef struct { #define IS_SA_MODE(sM_params) (!(sM_params)->phy_test && !(sM_params)->do_ra && !(sM_params)->nsa) void softmodem_verify_mode(const softmodem_params_t *p); -uint64_t get_softmodem_optmask(void); -uint64_t set_softmodem_optmask(uint64_t bitmask); -uint64_t clear_softmodem_optmask(uint64_t bitmask); +#define get_softmodem_optmask() (&(get_softmodem_params()->optmask)) softmodem_params_t *get_softmodem_params(void); -void get_common_options(configmodule_interface_t *cfg, uint32_t execmask); -char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr); +void get_common_options(configmodule_interface_t *cfg); +char *get_softmodem_function(void); #define SOFTMODEM_RTSIGNAL (SIGRTMIN+1) void set_softmodem_sighandler(void); extern uint64_t downlink_frequency[MAX_NUM_CCs][4]; @@ -336,7 +351,6 @@ extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; extern int usrp_tx_thread; extern uint16_t sl_ahead; extern uint16_t sf_ahead; -extern int oai_exit; void ru_tx_func(void *param); void configure_ru(void *, void *arg); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 5210dbec6d..14d0e9fb2d 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -295,12 +295,12 @@ static inline void nr_polar_deinterleaver(uint8_t *input, uint8_t *output, uint1 static inline void nr_polar_rm_deinterleaving_lut(uint16_t *out, const uint E) { int16_t in[E]; - for (int i = 0; i < E; i++) + for (uint i = 0; i < E; i++) in[i] = i; int T = ceil((sqrt(8 * E + 1) - 1) / 2); int v_tab[T][T]; memset(v_tab, 0, sizeof(v_tab)); - int k = 0; + uint k = 0; for (int i = 0; i < T; i++) { for (int j = 0; j < T - i; j++) { if (k < E) { diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index dc3c98c4f1..52905cfaf9 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -58,8 +58,6 @@ uint64_t deadline, uint64_t period);*/ -extern int oai_exit; - void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) { int i, r, aa, layer; diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index be998beb44..9755455762 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -42,8 +42,6 @@ #include "PHY_INTERFACE/phy_interface.h" #include "transport_proto.h" -extern int oai_exit; - static const int8_t wACK_RX[5][4] = {{-1, -1, -1, -1}, {-1, 1, -1, 1}, {-1, -1, 1, 1}, {-1, 1, 1, -1}, {1, 1, 1, 1}}; void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) { diff --git a/openair1/PHY/TOOLS/calibration_test.c b/openair1/PHY/TOOLS/calibration_test.c index f3c1e8fef3..f69e468e7b 100644 --- a/openair1/PHY/TOOLS/calibration_test.c +++ b/openair1/PHY/TOOLS/calibration_test.c @@ -41,7 +41,7 @@ int main(int argc, char **argv) { paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ; CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP); - get_common_options(uniqCfg, SOFTMODEM_GNB_BIT); + get_common_options(uniqCfg); config_process_cmdline(uniqCfg, cmdline_params, sizeofArray(cmdline_params), NULL); CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP); lock_memory_to_ram(); diff --git a/openair1/PHY/TOOLS/imscope/imscope.cpp b/openair1/PHY/TOOLS/imscope/imscope.cpp index 84ae7d85f4..9b025a8843 100644 --- a/openair1/PHY/TOOLS/imscope/imscope.cpp +++ b/openair1/PHY/TOOLS/imscope/imscope.cpp @@ -33,7 +33,7 @@ #include "openair1/PHY/defs_nr_UE.h" extern "C" { #include "openair1/PHY/TOOLS/phy_scope_interface.h" -uint64_t get_softmodem_optmask(void); +#include "executables/softmodem-common.h" } #include #include @@ -42,7 +42,6 @@ uint64_t get_softmodem_optmask(void); #include #include #include -#include "executables/softmodem-bits.h" #define MAX_OFFSETS 14 #define NR_MAX_RB 273 @@ -678,7 +677,7 @@ void *imscope_thread(void *data_void_ptr) static double last_frame_time = glfwGetTime(); static int target_fps = 24; - bool is_ue = (get_softmodem_optmask() & SOFTMODEM_5GUE_BIT) > 0; + bool is_ue = IS_SOFTMODEM_5GUE; bool close_window = false; while (!glfwWindowShouldClose(window) && close_window == false) { // Poll and handle events (inputs, window resize, etc.) @@ -795,8 +794,7 @@ void *imscope_thread(void *data_void_ptr) extern "C" void imscope_autoinit(void *dataptr) { - AssertFatal((get_softmodem_optmask() & SOFTMODEM_5GUE_BIT) || (get_softmodem_optmask() & SOFTMODEM_GNB_BIT), - "Scope cannot find NRUE or GNB context"); + AssertFatal(IS_SOFTMODEM_5GUE || IS_SOFTMODEM_GNB, "Scope cannot find NRUE or GNB context"); for (auto i = 0U; i < EXTRA_SCOPE_TYPES; i++) { scope_array[i].is_data_ready = false; @@ -804,7 +802,7 @@ extern "C" void imscope_autoinit(void *dataptr) scope_array[i].meta = {-1, -1}; } - if (SOFTMODEM_GNB_BIT & get_softmodem_optmask()) { + if (IS_SOFTMODEM_GNB) { scopeParms_t *scope_params = (scopeParms_t *)dataptr; scopeData_t *scope = (scopeData_t *)calloc(1, sizeof(scopeData_t)); scope->copyData = copyDataThreadSafe; diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index a661fb892b..da89b41960 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -1165,9 +1165,9 @@ STATICFORXSCOPE void nrUEinitScope(PHY_VARS_NR_UE *ue) } void nrscope_autoinit(void *dataptr) { - AssertFatal( (IS_SOFTMODEM_GNB_BIT||IS_SOFTMODEM_5GUE_BIT),"Scope cannot find NRUE or GNB context"); + AssertFatal((IS_SOFTMODEM_GNB || IS_SOFTMODEM_5GUE), "Scope cannot find NRUE or GNB context"); - if (IS_SOFTMODEM_GNB_BIT) + if (IS_SOFTMODEM_GNB) gNBinitScope(dataptr); else nrUEinitScope(dataptr); diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index cd3202eeb9..02eff79320 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -60,6 +60,8 @@ //#include #include "time_meas.h" #include "common/platform_types.h" +#include "common/ran_context.h" +#include "nr-softmodem-common.h" #define MAX_NUM_RU_PER_eNB 64 #include @@ -1048,8 +1050,6 @@ typedef uint8_t(encoder_if_t)(uint8_t *input, uint8_t *output, uint8_t F); -extern int oai_exit; - static inline void wait_sync(char *thread_name) { int rc; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index db68730c33..2bde391979 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1429,8 +1429,6 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { stop_meas(&eNB->ulsch_decoding_stats); } -extern int oai_exit; - void fill_rx_indication(PHY_VARS_eNB *eNB, int ULSCH_id, int frame, diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index 7a0b21ace7..b385a1b540 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -45,12 +45,7 @@ #include - // RU OFDM Modulator gNodeB - - -extern int oai_exit; - // OFDM modulation core routine, generates a first_symbol to first_symbol+num_symbols on a particular slot and TX antenna port void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa) { diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 75a8028df7..40d35c4a00 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -56,6 +56,7 @@ #include "dummy_functions.c" #include "executables/thread-common.h" #include "common/ran_context.h" +#include "executables/softmodem-common.h" void feptx_ofdm(RU_t *ru, int frame, int subframe); void feptx_prec(RU_t *ru, int frame, int subframe); @@ -2121,7 +2122,8 @@ int main(int argc, char **argv) { else return(0); } -/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */ -uint64_t get_softmodem_optmask(void) { - return 0; +static softmodem_params_t softmodem_params; +softmodem_params_t *get_softmodem_params(void) +{ + return &softmodem_params; } diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index e9b7d99e5c..14e3c69696 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -1518,8 +1518,8 @@ int main(int argc, char **argv) { return(0); } - -/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */ -uint64_t get_softmodem_optmask(void) { - return 0; +static softmodem_params_t softmodem_params; +softmodem_params_t *get_softmodem_params(void) +{ + return &softmodem_params; } diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index cac4c6604a..1730c91816 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -72,8 +72,6 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; PHY_VARS_NR_UE *PHY_vars_UE_g[1][1] = { { NULL } }; uint16_t n_rnti = 0x1234; openair0_config_t openair0_cfg[MAX_CARDS]; - -uint64_t get_softmodem_optmask(void) {return 0;} static softmodem_params_t softmodem_params; softmodem_params_t *get_softmodem_params(void) { return &softmodem_params; diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 99ab0c82b1..b34042a771 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -88,7 +88,6 @@ #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/SIMULATION/TOOLS/sim.h" #include "openair2/RRC/LTE/rrc_vars.h" -#include "softmodem-bits.h" #include "thread-pool.h" #include "time_meas.h" #include "utils.h" @@ -623,7 +622,7 @@ int main(int argc, char **argv) get_softmodem_params()->phy_test = 1; get_softmodem_params()->usim_test = 1; get_softmodem_params()->do_ra = 0; - set_softmodem_optmask(SOFTMODEM_DLSIM_BIT); + IS_SOFTMODEM_DLSIM = true; if (snr1set==0) snr1 = snr0+10; diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 4489c3e7bb..b6d92b9b81 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -77,8 +77,6 @@ void deref_sched_response(int _) LOG_E(PHY, "fatal\n"); exit(1); } - -uint64_t get_softmodem_optmask(void) {return 0;} static softmodem_params_t softmodem_params; softmodem_params_t *get_softmodem_params(void) { return &softmodem_params; diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index de69fb6c16..b61de2082e 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -91,7 +91,6 @@ nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; } void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) { } /* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */ -uint64_t get_softmodem_optmask(void) {return 0;} static softmodem_params_t softmodem_params; softmodem_params_t *get_softmodem_params(void) { return &softmodem_params; diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 45bc2aaa42..81d6fff9b3 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -65,9 +65,7 @@ uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1}; const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; // needed for some functions -PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={{NULL}}; - -uint64_t get_softmodem_optmask(void) {return 0;} +PHY_VARS_NR_UE *PHY_vars_UE_g[1][1] = {{NULL}}; static softmodem_params_t softmodem_params; softmodem_params_t *get_softmodem_params(void) { return &softmodem_params; diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index e2802feffd..a353d1f90c 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -59,7 +59,6 @@ RAN_CONTEXT_t RC; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; uint64_t downlink_frequency[MAX_NUM_CCs][4]; -uint64_t get_softmodem_optmask(void) {return 0;} static softmodem_params_t softmodem_params; softmodem_params_t *get_softmodem_params(void) { return &softmodem_params; diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index 71366105fc..9fdf0cb75a 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -44,7 +44,6 @@ #include "common/utils/system.h" extern RAN_CONTEXT_t RC; -extern int oai_exit; void lte_dump_mac_stats(eNB_MAC_INST *mac, FILE *fd) { diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index 10d982442f..4e9acbf355 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -33,7 +33,6 @@ //#include "defs.h" #include "mac_proto.h" #include "radio/COMMON/common_lib.h" -//#undef MALLOC #include "assertions.h" #include "executables/nr-uesoftmodem.h" #include "nr_rlc/nr_rlc_oai_api.h" diff --git a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_power_procedures.cpp b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_power_procedures.cpp index 760de0df3d..ac7ed2f73a 100644 --- a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_power_procedures.cpp +++ b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_power_procedures.cpp @@ -23,10 +23,6 @@ extern "C" { #include "openair2/LAYER2/NR_MAC_UE/mac_proto.h" #include "executables/softmodem-common.h" -uint64_t get_softmodem_optmask(void) -{ - return 0; -} static softmodem_params_t softmodem_params; softmodem_params_t* get_softmodem_params(void) { diff --git a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp index 12502b9065..af8e140824 100644 --- a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp +++ b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp @@ -23,10 +23,7 @@ extern "C" { #include "openair2/LAYER2/NR_MAC_UE/mac_proto.h" #include "executables/softmodem-common.h" -uint64_t get_softmodem_optmask(void) -{ - return 0; -} + static softmodem_params_t softmodem_params; softmodem_params_t *get_softmodem_params(void) { diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index f8e6d120de..fad97ac2cb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -297,8 +297,13 @@ void mac_top_init_gNB(ngran_node_t node_type, RC.nrmac[i]->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(0); RC.nrmac[i]->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(0); } - if (!IS_SOFTMODEM_NOSTATS_BIT) - threadCreate(&RC.nrmac[i]->stats_thread, nrmac_stats_thread, (void*)RC.nrmac[i], "MAC_STATS", -1, sched_get_priority_min(SCHED_OAI)+1 ); + if (!IS_SOFTMODEM_NOSTATS) + threadCreate(&RC.nrmac[i]->stats_thread, + nrmac_stats_thread, + (void *)RC.nrmac[i], + "MAC_STATS", + -1, + sched_get_priority_min(SCHED_OAI) + 1); mac_rrc_init(RC.nrmac[i], node_type); }//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++) diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index e8042abd80..3c3ef5367f 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -129,10 +129,6 @@ static sdu_size_t pdcp_output_sdu_bytes_to_write; notifiedFIFO_t pdcp_sdu_list; pdcp_enb_t pdcp_enb[MAX_NUM_CCs]; - - -extern int oai_exit; - pthread_t pdcp_stats_thread_desc; /*! \fn bool pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, * uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode) \brief Function for RRC to diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 44118704a4..9cf81fbbe3 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -844,7 +844,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea { case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST: { - nfapi_nr_dl_tti_request_t *dl_tti_request = MALLOC(sizeof(*dl_tti_request)); + nfapi_nr_dl_tti_request_t *dl_tti_request = malloc16(sizeof(*dl_tti_request)); if (nfapi_nr_p7_message_unpack(buffer, len, dl_tti_request, sizeof(*dl_tti_request), NULL) < 0) { @@ -868,7 +868,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST: { - nfapi_nr_tx_data_request_t *tx_data_request = MALLOC(sizeof(*tx_data_request)); + nfapi_nr_tx_data_request_t *tx_data_request = malloc16(sizeof(*tx_data_request)); if (nfapi_nr_p7_message_unpack(buffer, len, tx_data_request, sizeof(*tx_data_request), NULL) < 0) { @@ -888,7 +888,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST: { - nfapi_nr_ul_dci_request_t *ul_dci_request = MALLOC(sizeof(*ul_dci_request)); + nfapi_nr_ul_dci_request_t *ul_dci_request = malloc16(sizeof(*ul_dci_request)); if (nfapi_nr_p7_message_unpack(buffer, len, ul_dci_request, sizeof(*ul_dci_request), NULL) < 0) { @@ -908,7 +908,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST: { - nfapi_nr_ul_tti_request_t *ul_tti_request = MALLOC(sizeof(*ul_tti_request)); + nfapi_nr_ul_tti_request_t *ul_tti_request = malloc16(sizeof(*ul_tti_request)); if (nfapi_nr_p7_message_unpack(buffer, len, ul_tti_request, sizeof(*ul_tti_request), NULL) < 0) { diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 9e552eaa2f..2456a851de 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -2477,11 +2477,11 @@ void *rrc_gnb_task(void *args_p) { int result; long stats_timer_id = 1; - if (!IS_SOFTMODEM_NOSTATS_BIT) { + if (!IS_SOFTMODEM_NOSTATS) { /* timer to write stats to file */ timer_setup(1, 0, TASK_RRC_GNB, 0, TIMER_PERIODIC, NULL, &stats_timer_id); } - + itti_mark_task_ready(TASK_RRC_GNB); LOG_I(NR_RRC,"Entering main loop of NR_RRC message task\n"); diff --git a/radio/COMMON/common_lib.c b/radio/COMMON/common_lib.c index a386d3a9bd..87bae83f62 100644 --- a/radio/COMMON/common_lib.c +++ b/radio/COMMON/common_lib.c @@ -101,12 +101,12 @@ int load_lib(openair0_device *device, openair0_cfg->recplay_mode = read_recplayconfig(&(openair0_cfg->recplay_conf),&(device->recplay_state)); if (openair0_cfg->recplay_mode == RECPLAY_RECORDMODE) { - set_softmodem_optmask(SOFTMODEM_RECRECORD_BIT); // softmodem has to know we use the iqrecorder to workaround randomized algorithms + IS_SOFTMODEM_IQRECORDER = true; // softmodem has to know we use the iqrecorder to workaround randomized algorithms } if (openair0_cfg->recplay_mode == RECPLAY_REPLAYMODE) { deflibname=OAI_IQPLAYER_LIBNAME; shlib_fdesc[0].fname="device_init"; - set_softmodem_optmask(SOFTMODEM_RECPLAY_BIT); // softmodem has to know we use the iqplayer to workaround randomized algorithms + IS_SOFTMODEM_IQPLAYER = true; // softmodem has to know we use the iqplayer to workaround randomized algorithms } else if (IS_SOFTMODEM_RFSIM && flag == RAU_LOCAL_RADIO_HEAD) { deflibname=OAI_RFSIM_LIBNAME; shlib_fdesc[0].fname="device_init"; diff --git a/radio/ETHERNET/eth_udp.c b/radio/ETHERNET/eth_udp.c index 2f937eaabf..ea290f21cb 100644 --- a/radio/ETHERNET/eth_udp.c +++ b/radio/ETHERNET/eth_udp.c @@ -404,8 +404,6 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi (unsigned long long)timestamp,nsamps,nant,udptxelem->buff[0],udptxelem->buff[1]); return(0); } -extern int oai_exit; - void *udp_write_thread(void *arg) { udp_ctx_t *utx = (udp_ctx_t *)arg; From e2a3cde4b7c062e95c12560966aef7117c80672b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 8 Jan 2025 10:27:03 +0100 Subject: [PATCH 42/54] Further cleanup: define oai_exit for 4G The parent commit cleans up and groups oai_exit in one place, nr-softmodem-common.h. Therefore, this 5G file is included in the 4G defs_common.h (at least it's mostly 4G), which is not nice. Instead, define oai_exit also in 4G softmodem-common.h, and include this in defs_common.h. Remove the cyclic inclusion of defs_common.h in softmodem-common.h, and resolve all subsequent errors around unknown types and extern definition mismatches. --- common/utils/telnetsrv/telnetsrv.c | 1 + executables/lte-ue.c | 2 +- executables/lte-uesoftmodem.c | 3 +-- executables/main_ru.c | 2 +- executables/nr-ru.c | 2 +- executables/nr-uesoftmodem.c | 2 +- executables/softmodem-common.h | 10 +++++++--- nfapi/oai_integration/aerial/fapi_vnf_p5.c | 5 ++--- nfapi/oai_integration/nfapi_pnf.c | 2 +- nfapi/oai_integration/nfapi_vnf.c | 2 +- nfapi/open-nFAPI/pnf/src/pnf_p7.c | 4 +--- openair1/PHY/defs_common.h | 3 +-- openair1/SCHED/nfapi_lte_dummy.c | 2 +- openair1/SCHED/nfapi_nr_dummy.c | 2 +- openair1/SIMULATION/NR_PHY/dlsim.c | 2 +- openair1/SIMULATION/NR_PHY/prachsim.c | 2 +- openair1/SIMULATION/NR_PHY/ulsim.c | 4 ++-- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 1 - openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 1 - openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- openair2/PHY_INTERFACE/phy_stub_UE.c | 2 +- radio/ETHERNET/benetel/4g/benetel.c | 2 +- radio/ETHERNET/benetel/5g/benetel.c | 2 +- radio/fhi_72/oran_isolate.c | 2 +- 24 files changed, 30 insertions(+), 32 deletions(-) diff --git a/common/utils/telnetsrv/telnetsrv.c b/common/utils/telnetsrv/telnetsrv.c index 64d67e13d1..de1c26d2e1 100644 --- a/common/utils/telnetsrv/telnetsrv.c +++ b/common/utils/telnetsrv/telnetsrv.c @@ -54,6 +54,7 @@ #include "common/utils/load_module_shlib.h" #include "common/config/config_userapi.h" #include "executables/softmodem-common.h" +#include "common/utils/threadPool/notified_fifo.h" #include #include "common/oai_version.h" diff --git a/executables/lte-ue.c b/executables/lte-ue.c index 74a2fa240b..41ce61f384 100644 --- a/executables/lte-ue.c +++ b/executables/lte-ue.c @@ -79,7 +79,7 @@ void *UE_thread(void *arg); int init_timer_thread(void); int tx_req_num_elems; -extern uint16_t sf_ahead; +extern int sf_ahead; //extern int tx_req_UE_MAC1(); void ue_stub_rx_handler(unsigned int, char *); diff --git a/executables/lte-uesoftmodem.c b/executables/lte-uesoftmodem.c index f039bc4479..0a4a4e8d0e 100644 --- a/executables/lte-uesoftmodem.c +++ b/executables/lte-uesoftmodem.c @@ -73,8 +73,7 @@ pthread_cond_t nfapi_sync_cond; pthread_mutex_t nfapi_sync_mutex; int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex - -uint16_t sf_ahead=4; +int sf_ahead = 4; int tddflag; char *emul_iface; diff --git a/executables/main_ru.c b/executables/main_ru.c index 92db896cc3..86a26f9ac3 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -75,7 +75,7 @@ int sync_var=-1; //!< protected by mutex \ref sync_mutex. int config_sync_var=-1; int oai_exit = 0; -uint16_t sf_ahead = 4; +int sf_ahead = 4; RU_t ru_m; diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 6d0a2044ba..90d7e235de 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -69,7 +69,7 @@ static int DEFRUTPCORES[] = {-1,-1,-1,-1}; #include #include "executables/nr-softmodem-common.h" -uint16_t sl_ahead; +int sl_ahead; static void NRRCconfig_RU(configmodule_interface_t *cfg); /*************************************************************/ diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 503fcc0a76..0d29c3d576 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -98,7 +98,7 @@ nrUE_params_t nrUE_params = {0}; pthread_cond_t nfapi_sync_cond; pthread_mutex_t nfapi_sync_mutex; int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex -uint16_t sf_ahead=6; //??? value ??? +int sf_ahead = 6; //??? value ??? pthread_cond_t sync_cond; pthread_mutex_t sync_mutex; int sync_var=-1; //!< protected by mutex \ref sync_mutex. diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h index 19d2f4f76f..e593a78210 100644 --- a/executables/softmodem-common.h +++ b/executables/softmodem-common.h @@ -31,11 +31,14 @@ */ #ifndef SOFTMODEM_COMMON_H #define SOFTMODEM_COMMON_H -#include "openair1/PHY/defs_common.h" #ifdef __cplusplus extern "C" { #endif + +#include +#include "common/config/config_load_configmodule.h" + /* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */ #define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n" #define CONFIG_HLP_SPLIT73 "Split 7.3 (below rate matching) option: ::\n" @@ -349,8 +352,9 @@ void set_softmodem_sighandler(void); extern uint64_t downlink_frequency[MAX_NUM_CCs][4]; extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; extern int usrp_tx_thread; -extern uint16_t sl_ahead; -extern uint16_t sf_ahead; +extern int sl_ahead; +extern int sf_ahead; +extern int oai_exit; void ru_tx_func(void *param); void configure_ru(void *, void *arg); diff --git a/nfapi/oai_integration/aerial/fapi_vnf_p5.c b/nfapi/oai_integration/aerial/fapi_vnf_p5.c index 1128559b1d..26c59c8301 100644 --- a/nfapi/oai_integration/aerial/fapi_vnf_p5.c +++ b/nfapi/oai_integration/aerial/fapi_vnf_p5.c @@ -38,9 +38,8 @@ extern RAN_CONTEXT_t RC; extern UL_RCC_IND_t UL_RCC_INFO; -extern uint16_t sf_ahead; -extern uint16_t slot_ahead; - +extern int sf_ahead; +extern int slot_ahead; void *aerial_vnf_nr_p7_config_init(void *ptr) { diff --git a/nfapi/oai_integration/nfapi_pnf.c b/nfapi/oai_integration/nfapi_pnf.c index c0a4622aa4..8880a5f315 100644 --- a/nfapi/oai_integration/nfapi_pnf.c +++ b/nfapi/oai_integration/nfapi_pnf.c @@ -2435,7 +2435,7 @@ void handle_nr_slot_ind(uint16_t sfn, uint16_t slot) { //send VNF slot indication, which is aligned with TX thread, so that it can call the scheduler nfapi_nr_slot_indication_scf_t *ind; ind = (nfapi_nr_slot_indication_scf_t *) malloc(sizeof(nfapi_nr_slot_indication_scf_t)); - uint8_t slot_ahead = 6; + int slot_ahead = 6; uint32_t sfn_slot_tx = sfnslot_add_slot(sfn, slot, slot_ahead); uint16_t sfn_tx = NFAPI_SFNSLOT2SFN(sfn_slot_tx); uint8_t slot_tx = NFAPI_SFNSLOT2SLOT(sfn_slot_tx); diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index 76542d3587..9bc3c37452 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -230,7 +230,7 @@ int vnf_nr_unpack_vendor_extension_tlv(nfapi_tl_t *tl, } void install_nr_schedule_handlers(NR_IF_Module_t *if_inst); void install_schedule_handlers(IF_Module_t *if_inst); -extern uint16_t sf_ahead; +extern int sf_ahead; void oai_create_enb(void) { int bodge_counter=0; diff --git a/nfapi/open-nFAPI/pnf/src/pnf_p7.c b/nfapi/open-nFAPI/pnf/src/pnf_p7.c index a7f0385d9e..4232bb27de 100644 --- a/nfapi/open-nFAPI/pnf/src/pnf_p7.c +++ b/nfapi/open-nFAPI/pnf/src/pnf_p7.c @@ -31,9 +31,7 @@ #define FAPI2_IP_DSCP 0 -extern uint16_t sf_ahead; - -//uint16_t sf_ahead=4; +extern int sf_ahead; void add_slot(uint16_t *frameP, uint16_t *slotP, int offset) { diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index 02eff79320..b0b447e087 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -60,8 +60,7 @@ //#include #include "time_meas.h" #include "common/platform_types.h" -#include "common/ran_context.h" -#include "nr-softmodem-common.h" +#include "softmodem-common.h" #define MAX_NUM_RU_PER_eNB 64 #include diff --git a/openair1/SCHED/nfapi_lte_dummy.c b/openair1/SCHED/nfapi_lte_dummy.c index 14b4f514be..6856d85806 100644 --- a/openair1/SCHED/nfapi_lte_dummy.c +++ b/openair1/SCHED/nfapi_lte_dummy.c @@ -22,7 +22,7 @@ void handle_nfapi_nr_csirs_pdu(processingData_L1tx_t *msgTx, } int l1_north_init_gNB(void){return 0;} -uint8_t slot_ahead=6; +int slot_ahead = 6; //uint8_t nfapi_mode=0; NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return NULL;} diff --git a/openair1/SCHED/nfapi_nr_dummy.c b/openair1/SCHED/nfapi_nr_dummy.c index ce10797fea..9c9ecea443 100644 --- a/openair1/SCHED/nfapi_nr_dummy.c +++ b/openair1/SCHED/nfapi_nr_dummy.c @@ -22,7 +22,7 @@ void handle_nfapi_nr_csirs_pdu(processingData_L1tx_t *msgTx, } int l1_north_init_gNB(void){return 0;} -uint8_t slot_ahead=6; +int slot_ahead = 6; //uint8_t nfapi_mode=0; NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return NULL;} diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index b34042a771..95a5b9ea64 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -107,7 +107,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; double cpuf; char *uecap_file; -uint16_t sl_ahead=0; +int sl_ahead = 0; //uint8_t nfapi_mode = 0; uint64_t downlink_frequency[MAX_NUM_CCs][4]; THREAD_STRUCT thread_struct; diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index b61de2082e..5eab1c6974 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -83,7 +83,7 @@ openair0_config_t openair0_cfg[MAX_CARDS]; //uint8_t nfapi_mode=0; uint64_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -uint16_t sl_ahead = 0; +int sl_ahead = 0; uint32_t N_RB_DL = 106; NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); } diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index bdeab5a139..a778795aa4 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -106,9 +106,9 @@ RAN_CONTEXT_t RC; char *uecap_file; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -uint16_t sf_ahead=4 ; +int sf_ahead = 4; int slot_ahead=6 ; -uint16_t sl_ahead=0; +int sl_ahead = 0; double cpuf; //uint8_t nfapi_mode = 0; uint64_t downlink_frequency[MAX_NUM_CCs][4]; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 7b1e7ec4f9..45a9fdb484 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -52,7 +52,6 @@ #ifdef PHY_TX_THREAD extern volatile int16_t phy_tx_txdataF_end; - extern int oai_exit; #endif extern uint16_t sfnsf_add_subframe(uint16_t frameP, uint16_t subframeP, int offset); extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index edf0f8c25e..74eb045be1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -48,7 +48,6 @@ #include extern RAN_CONTEXT_t RC; extern const uint8_t nr_slots_per_frame[5]; -extern uint16_t sl_ahead; // forward declaration of functions used in this file static void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 2c51ee5f21..f9fb502338 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -3021,7 +3021,7 @@ int nr_mac_get_reconfig_delay_slots(NR_SubcarrierSpacing_t scs) /* we previously assumed a specific "slot ahead" value for the PHY processing * time. However, we cannot always know it (e.g., third-party PHY), so simply * assume a tentative worst-case slot processing time */ - const uint16_t sl_ahead = 10; + const int sl_ahead = 10; /* 16ms seems to be the most common: See 38.331 Tab 12.1-1 */ int delay_ms = NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS; return (delay_ms << scs) + sl_ahead; diff --git a/openair2/PHY_INTERFACE/phy_stub_UE.c b/openair2/PHY_INTERFACE/phy_stub_UE.c index af82d6093d..3c0640cd5e 100644 --- a/openair2/PHY_INTERFACE/phy_stub_UE.c +++ b/openair2/PHY_INTERFACE/phy_stub_UE.c @@ -74,7 +74,7 @@ extern nfapi_tx_request_pdu_t* tx_request_pdu[1023][NUM_NFAPI_SUBFRAME][10]; //T //extern int timer_frame; extern UE_RRC_INST *UE_rrc_inst; -extern uint16_t sf_ahead; +extern int sf_ahead; static eth_params_t stub_eth_params; void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id); diff --git a/radio/ETHERNET/benetel/4g/benetel.c b/radio/ETHERNET/benetel/4g/benetel.c index 410a643089..8e221fe929 100644 --- a/radio/ETHERNET/benetel/4g/benetel.c +++ b/radio/ETHERNET/benetel/4g/benetel.c @@ -243,7 +243,7 @@ next: //printf("BENETEL: %s (f.sf %d.%d)\n", __FUNCTION__, *frame, *subframe); RU_proc_t *proc = &ru->proc; - extern uint16_t sf_ahead; + extern int sf_ahead; int f = *frame; int sf = *subframe; diff --git a/radio/ETHERNET/benetel/5g/benetel.c b/radio/ETHERNET/benetel/5g/benetel.c index 79a9109868..90fce2e206 100644 --- a/radio/ETHERNET/benetel/5g/benetel.c +++ b/radio/ETHERNET/benetel/5g/benetel.c @@ -257,7 +257,7 @@ printf("rxdata in benetel_fh_if4p5_south_in %p\n", &ru->common.rxdataF[antenna][ //printf("BENETEL: %s (f.sf %d.%d)\n", __FUNCTION__, *frame, *slot); RU_proc_t *proc = &ru->proc; - extern uint16_t sl_ahead; + extern int sl_ahead; int f = *frame; int sl = *slot; diff --git a/radio/fhi_72/oran_isolate.c b/radio/fhi_72/oran_isolate.c index cb48569989..f922df40bb 100644 --- a/radio/fhi_72/oran_isolate.c +++ b/radio/fhi_72/oran_isolate.c @@ -203,7 +203,7 @@ void oran_fh_if4p5_south_in(RU_t *ru, int *frame, int *slot) ru_info.prach_buf = ru->prach_rxsigF[0]; // index: [prach_oca][ant_id] RU_proc_t *proc = &ru->proc; - extern uint16_t sl_ahead; + extern int sl_ahead; int f, sl; LOG_D(PHY, "Read rxdataF %p,%p\n", ru_info.rxdataF[0], ru_info.rxdataF[1]); start_meas(&ru->rx_fhaul); From 63abc04a458c30cb2a5a42b1424dd2be5e667592 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 9 Jan 2025 21:33:53 +0000 Subject: [PATCH 43/54] Fix yaml example config file amf_ip_address is decoded as a paramlist_def_t and not as a paramdef_t, so in the config file it should be a list of ip addresses --- .../GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml index 10ae7e92e0..e527531725 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml @@ -140,7 +140,7 @@ gNBs: # AMF parameters: amf_ip_address: - ipv4: 192.168.70.132 + - ipv4: 192.168.70.132 NETWORK_INTERFACES: From dcc33d393184fa56c5ef70c6027fe064426b3ab1 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Sat, 21 Dec 2024 16:26:25 +0100 Subject: [PATCH 44/54] Add RSSI threshold-based power control for PUSCH and PUCCH - Introduced new configuration parameters `pusch_RSSI_Threshold` and `pucch_RSSI_Threshold` (MACRLC section) - Added `nr_limit_tpc` function in `gNB_scheduler_primitives.c` to limit TPC based on RSSI threshold. - Integrated `nr_limit_tpc` in PUCCH and PUSCH power control Example Configuration puxch_RSSI_Threshold takes value between -1280 and 0 and is mapped to range -128.0 dBm/dBFS to 0.0 dBm/dBFS in 0.1 dB increments. Unit depends on RSSI reporting config. pucch_RSSI_Threshold = -500; # Set the PUSCH RSSI threshold to -50.0dBm/-50dBFS pucch_RSSI_Threshold = -600; # Set the PUCCH RSSI threshold to -60.0dBm/-60dBFS --- doc/MAC/mac-usage.md | 5 +++ openair2/GNB_APP/MACRLC_nr_paramdef.h | 12 ++++++ openair2/GNB_APP/gnb_config.c | 2 + .../NR_MAC_gNB/gNB_scheduler_primitives.c | 38 +++++++++++++++++++ .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 4 ++ .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 3 ++ openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 1 + openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 4 ++ 8 files changed, 69 insertions(+) diff --git a/doc/MAC/mac-usage.md b/doc/MAC/mac-usage.md index 4c7bf4df8e..4056ffa2b7 100644 --- a/doc/MAC/mac-usage.md +++ b/doc/MAC/mac-usage.md @@ -197,6 +197,11 @@ In the `MACRLCs` section of the gNB/DU configuration file: beams, depending on hardware switching performance * `beams_per_period`: set of beams that can be simultaneously allocated in a period (`beam_duration`) +* `pusch_RSSI_Threshold`: Value between -1280 and 0 which maps to range + from -128.0 dBm/dBFS to 0.0 dBm/dBFS. This limits PUSCH TPC commands in + case RSSI reaches the threshold and prevents ADC railing. Unit depends on + RSSI reporting config. +* `pucch_RSSI_Threshold`: Same as above but for PUCCH In the `gNBs` section of the gNB/DU configuration file: some of the parameters affect RRC configuration (CellGroupConfig) of a UE, and are therefore listed diff --git a/openair2/GNB_APP/MACRLC_nr_paramdef.h b/openair2/GNB_APP/MACRLC_nr_paramdef.h index b9b62ec39f..a1d860c86c 100644 --- a/openair2/GNB_APP/MACRLC_nr_paramdef.h +++ b/openair2/GNB_APP/MACRLC_nr_paramdef.h @@ -75,6 +75,8 @@ #define CONFIG_STRING_MACRLC_ANALOG_BEAMFORMING "set_analog_beamforming" #define CONFIG_STRING_MACRLC_BEAM_DURATION "beam_duration" #define CONFIG_STRING_MACRLC_BEAMS_PERIOD "beams_per_period" +#define CONFIG_STRING_MACRLC_PUSCH_RSSI_THRESHOLD "pusch_RSSI_Threshold" +#define CONFIG_STRING_MACRLC_PUCCH_RSSI_THRESHOLD "pucch_RSSI_Threshold" #define HLP_MACRLC_UL_PRBBLACK "SNR threshold to decide whether a PRB will be blacklisted or not" #define HLP_MACRLC_DL_BLER_UP "Upper threshold of BLER to decrease DL MCS" @@ -91,6 +93,8 @@ #define HLP_MACRLC_AB "Flag to enable analog beamforming" #define HLP_MACRLC_BEAM_DURATION "number of consecutive slots for a given set of beams" #define HLP_MACRLC_BEAMS_PERIOD "set of beams that can be simultaneously allocated in a period" +#define HLP_MACRLC_PUSCH_RSSI_THRESHOLD "Limits PUSCH TPC commands based on RSSI to prevent ADC railing. Value range [-1280, 0], unit 0.1 dBm/dBFS" +#define HLP_MACRLC_PUCCH_RSSI_THRESHOLD "Limits PUCCH TPC commands based on RSSI to prevent ADC railing. Value range [-1280, 0], unit 0.1 dBm/dBFS" /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* MacRLC configuration parameters */ @@ -136,6 +140,10 @@ {CONFIG_STRING_MACRLC_ANALOG_BEAMFORMING, HLP_MACRLC_AB, PARAMFLAG_BOOL, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_BEAM_DURATION, HLP_MACRLC_BEAM_DURATION, 0, .u8ptr=NULL, .defintval=1, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_BEAMS_PERIOD, HLP_MACRLC_BEAMS_PERIOD, 0, .u8ptr=NULL, .defintval=1, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_PUSCH_RSSI_THRESHOLD, HLP_MACRLC_PUSCH_RSSI_THRESHOLD, \ + 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_PUCCH_RSSI_THRESHOLD, HLP_MACRLC_PUCCH_RSSI_THRESHOLD, \ + 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ } // clang-format off @@ -177,6 +185,8 @@ #define MACRLC_ANALOG_BEAMFORMING_IDX 35 #define MACRLC_ANALOG_BEAM_DURATION_IDX 36 #define MACRLC_ANALOG_BEAMS_PERIOD_IDX 37 +#define MACRLC_PUSCH_RSSI_THRES_IDX 38 +#define MACRLC_PUCCH_RSSI_THRES_IDX 39 #define MACRLCPARAMS_CHECK { \ { .s5 = { NULL } }, \ @@ -217,6 +227,8 @@ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ + { .s2 = { config_check_intrange, {-1280, 0}} }, /* PUSCH RSSI threshold range */ \ + { .s2 = { config_check_intrange, {-1280, 0}} }, /* PUCCH RSSI threshold range */ \ } /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 3b8981353d..baeca1aa72 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1417,6 +1417,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) for (j = 0; j < RC.nb_nr_macrlc_inst; j++) { RC.nb_nr_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr); RC.nrmac[j]->pusch_target_snrx10 = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCHTARGETSNRX10_IDX].iptr); + RC.nrmac[j]->pusch_rssi_threshold = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH_RSSI_THRES_IDX].iptr); + RC.nrmac[j]->pucch_rssi_threshold = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH_RSSI_THRES_IDX].iptr); RC.nrmac[j]->pucch_target_snrx10 = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCHTARGETSNRX10_IDX].iptr); RC.nrmac[j]->ul_prbblack_SNR_threshold = *(MacRLC_ParamList.paramarray[j][MACRLC_UL_PRBBLACK_SNR_THRESHOLD_IDX].iptr); RC.nrmac[j]->pucch_failure_thres = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCHFAILURETHRES_IDX].iptr); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 2c51ee5f21..98c51326c1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -2703,6 +2703,44 @@ uint8_t nr_get_tpc(int target, uint8_t cqi, int incr, int tx_power) return 1; // no change } +/** + * @brief Limits the power control commands (TPC) in NR by checking the RSSI threshold. + * + * This function evaluates the received signal strength indicator (RSSI) and adjusts the + * transmit power control (TPC) commands accordingly to ensure they remain within acceptable + * limits. It helps in maintaining the signal quality and preventing excessive power usage. + * + * @param rssi The received signal strength indicator value, as defined in FAPI specifications. + * @param tpc The transmit power control command to be limited. + * @param rssi_threshold RSSI threshold in 0.1 dBm/dBFS, range -1280 to 0 + * @return The adjusted TPC command after applying the RSSI threshold check. + */ +uint8_t nr_limit_tpc(int tpc, int rssi, int rssi_threshold) +{ + if (rssi == 0xFFFF) { + // RSSI not available, keep tpc + return tpc; + } + // Convert RSSI threshold to FAPI scale + const int fapi_rssi_0dBm_or_0dBFS = 1280; + int rssi_fapi_threshold = fapi_rssi_0dBm_or_0dBFS + rssi_threshold; + // Further limit TPC if above or near RSSI threshold + int tpc_to_db[] = {-1, 0, 1, 3}; + if (rssi > rssi_fapi_threshold) { + // RSSI above theshold, reduce power + return 0; + } else if (rssi + tpc_to_db[tpc] * 10 > rssi_fapi_threshold) { + // Cannot apply required TPC, check 1 dB increment + if (rssi + 10 > rssi_fapi_threshold) { + // Still cannot apply required TPC, keep power + return 1; + } else { + // Can apply 1dB increment, but 3 was requested + return 2; + } + } + return tpc; +} int get_pdsch_to_harq_feedback(NR_PUCCH_Config_t *pucch_Config, nr_dci_format_t dci_format, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 39f5e2453a..fb1d165a86 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1017,6 +1017,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, const nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_01) { gNB_MAC_INST *nrmac = RC.nrmac[mod_id]; + int rssi_threshold = nrmac->pucch_rssi_threshold; NR_SCHED_LOCK(&nrmac->sched_lock); NR_UE_info_t * UE = find_nr_UE(&nrmac->UE_info, uci_01->rnti); if (!UE) { @@ -1052,6 +1053,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, sched_ctrl->tpc1 = nr_get_tpc(nrmac->pucch_target_snrx10, uci_01->ul_cqi, 30, 0); } else sched_ctrl->tpc1 = 1; + sched_ctrl->tpc1 = nr_limit_tpc(sched_ctrl->tpc1, uci_01->rssi, rssi_threshold); } // check scheduling request result, confidence_level == 0 is good @@ -1073,6 +1075,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, { gNB_MAC_INST *nrmac = RC.nrmac[mod_id]; NR_SCHED_LOCK(&nrmac->sched_lock); + int rssi_threshold = nrmac->pucch_rssi_threshold; NR_UE_info_t * UE = find_nr_UE(&nrmac->UE_info, uci_234->rnti); if (!UE) { @@ -1093,6 +1096,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, if (uci_234->ul_cqi != 0xff) { sched_ctrl->pucch_snrx10 = uci_234->ul_cqi * 5 - 640; sched_ctrl->tpc1 = nr_get_tpc(nrmac->pucch_target_snrx10, uci_234->ul_cqi, 30, 0); + sched_ctrl->tpc1 = nr_limit_tpc(sched_ctrl->tpc1, uci_234->rssi, rssi_threshold); } // TODO: handle SR diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 7f849253da..bfa261d805 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -708,6 +708,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, const int current_rnti = rntiP; LOG_D(NR_MAC, "rx_sdu for rnti %04x\n", current_rnti); const int target_snrx10 = gNB_mac->pusch_target_snrx10; + const int rssi_threshold = gNB_mac->pusch_rssi_threshold; const int pusch_failure_thres = gNB_mac->pusch_failure_thres; NR_UE_info_t *UE = find_nr_UE(&gNB_mac->UE_info, current_rnti); @@ -749,6 +750,8 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, if (UE_scheduling_control->ph < 0 && UE_scheduling_control->tpc0 > 1) UE_scheduling_control->tpc0 = 1; + UE_scheduling_control->tpc0 = nr_limit_tpc(UE_scheduling_control->tpc0, rssi, rssi_threshold); + if (timing_advance != 0xffff) UE_scheduling_control->ta_update = timing_advance; UE_scheduling_control->raw_rssi = rssi; diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 3e9f02d7ff..b775ce7f0b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -296,6 +296,7 @@ NR_pusch_dmrs_t get_ul_dmrs_params(const NR_ServingCellConfigCommon_t *scc, const int Layers); uint8_t nr_get_tpc(int target, uint8_t cqi, int incr, int tx_power); +uint8_t nr_limit_tpc(int tpc, int rssi, int rssi_threshold); int get_spf(nfapi_nr_config_request_scf_t *cfg); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 54be4358a7..70ff613d94 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -833,8 +833,12 @@ typedef struct gNB_MAC_INST_s { pthread_t stats_thread; /// Pusch target SNR int pusch_target_snrx10; + /// RSSI threshold for power control. Limits power control commands when RSSI reaches threshold. + int pusch_rssi_threshold; /// Pucch target SNR int pucch_target_snrx10; + /// RSSI threshold for PUCCH power control. Limits power control commands when RSSI reaches threshold. + int pucch_rssi_threshold; /// SNR threshold needed to put or not a PRB in the black list int ul_prbblack_SNR_threshold; /// PUCCH Failure threshold (compared to consecutive PUCCH DTX) From 9586db6bfd3626e71b76752498190d40b9fd88c7 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Fri, 3 Jan 2025 13:11:46 +0000 Subject: [PATCH 45/54] fix(nrLDPC_decoder): Rename E in Kprime in segment decoder parameters to comply with standard naming --- openair1/PHY/CODING/TESTBENCH/ldpctest.c | 2 +- .../nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c | 2 +- openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c | 2 +- openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h | 2 +- openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index 1dad28c95e..1d0bdfb16b 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -323,7 +323,7 @@ one_measurement_t test_ldpc(short max_iterations, decParams[j].R = code_rate_vec[R_ind]; // 13; decParams[j].numMaxIter = max_iterations; decParams[j].outMode = nrLDPC_outMode_BIT; - decParams[j].E = block_length; + decParams[j].Kprime = block_length; ldpc_toCompare.LDPCinit(); } for (int j = 0; j < n_segments; j++) { diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c index e1fec76e23..29d155e95c 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c @@ -193,7 +193,7 @@ static void nr_process_decode_segment(void *arg) memset(rdata->c, 0, Kr_bytes); p_decoderParms->crc_type = crcType(rdata->C, A); - p_decoderParms->E = lenWithCrc(rdata->C, A); + p_decoderParms->Kprime = lenWithCrc(rdata->C, A); // set first 2*Z_c bits to zeros diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c index 4ac8f4799e..fcee71c151 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c @@ -855,7 +855,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, nrLDPC_llr2bitPacked(p_out, p_llrOut, numLLR); else // if (outMode == nrLDPC_outMode_BITINT8) nrLDPC_llr2bit(p_out, p_llrOut, numLLR); - if (p_decParams->check_crc((uint8_t*)p_out, p_decParams->E, p_decParams->crc_type)) { + if (p_decParams->check_crc((uint8_t*)p_out, p_decParams->Kprime, p_decParams->crc_type)) { LOG_D(PHY, "Segment CRC OK, exiting LDPC decoder\n"); break; } diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h index 25e78a542a..57701ce7df 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h @@ -86,7 +86,7 @@ typedef struct nrLDPC_dec_params { uint16_t Z; /**< Lifting size */ uint8_t R; /**< Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */ uint8_t numMaxIter; /**< Maximum number of iterations */ - int E; + int Kprime; /**< Size of the payload bits and CRC bits in the code block */ e_nrLDPC_outMode outMode; /**< Output format */ int crc_type; int (*check_crc)(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type); diff --git a/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu b/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu index ee08e9287c..aa85716947 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu +++ b/openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu @@ -518,7 +518,7 @@ extern "C" int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, init_LLR_DMA(p_decParams, p_llr, p_out); uint16_t Zc = p_decParams->Z; uint8_t BG = p_decParams->BG; - int block_length = p_decParams->E; + int block_length = p_decParams->Kprime; uint8_t row, col; if (BG == 1) { row = 46; From 15fc29843c255ea7cf75230d03eb90ee9be33b80 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Fri, 3 Jan 2025 14:43:26 +0000 Subject: [PATCH 46/54] fix(nrLDPC_coding): cleanup the naming of the K, Kprime and Zc variables to comply with the standard 38.212-5.2.2 --- openair1/PHY/CODING/TESTBENCH/ldpctest.c | 2 +- .../nrLDPC_coding/nrLDPC_coding_interface.h | 2 +- .../nrLDPC_coding_segment_decoder.c | 24 ++++----- .../nrLDPC_coding_segment_encoder.c | 6 +-- .../nrLDPC_coding_xdma/nrLDPC_coding_xdma.c | 51 +++++++++---------- openair1/PHY/CODING/nrLDPC_defs.h | 50 +++++++++++------- 6 files changed, 74 insertions(+), 61 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index 1d0bdfb16b..71c2f1af27 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -259,7 +259,7 @@ one_measurement_t test_ldpc(short max_iterations, printf("To: %d\n", (Kb + nrows - no_punctured_columns) * Zc - removed_bit); printf("number of undecoded bits: %d\n", (Kb + nrows - no_punctured_columns - 2) * Zc - removed_bit); - encoder_implemparams_t impp = {.Zc = Zc, .Kb = Kb, .BG = BG, .Kr = block_length, .K = block_length}; + encoder_implemparams_t impp = {.Zc = Zc, .Kb = Kb, .BG = BG, .K = block_length}; impp.gen_code = 2; if (ntrials==0) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h index 6492131df3..7544f8cf55 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h @@ -173,7 +173,7 @@ typedef struct nrLDPC_segment_encoding_parameters_s{ * \var G Available radio resource bits * \var tbslbrm Transport block size LBRM * \var A Transport block size (This is A from 38.212 V15.4.0 section 5.1) - * \var Kb Code block size divided by lifting size + * \var Kb Number of time the lifting size needed to fit the payload of a code block * \var K Code block size at input of encoder * \var Z lifting size * \var F filler bits size diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c index 29d155e95c..df7ba73aed 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c @@ -64,7 +64,8 @@ * \brief decoding parameter of transport blocks * \var decoderParms decoder parameters * \var Qm modulation order - * \var Kc size of base graph input + * \var Kc ratio between the number of columns in the parity check matrix and the lifting size + * it is fixed for a given base graph while the lifting size is chosen to have a sufficient number of columns * \var rv_index * \var max_number_iterations maximum number of LDPC iterations * \var abort_decode pointer to decode abort flag @@ -127,14 +128,13 @@ static void nr_process_decode_segment(void *arg) { nrLDPC_decoding_parameters_t *rdata = (nrLDPC_decoding_parameters_t *)arg; t_nrLDPC_dec_params *p_decoderParms = &rdata->decoderParms; - const int Kr = rdata->K; - const int Kr_bytes = Kr >> 3; - const int K_bits_F = Kr - rdata->F; + const int K = rdata->K; + const int Kprime = K - rdata->F; const int A = rdata->A; const int E = rdata->E; const int Qm = rdata->Qm; const int rv_index = rdata->rv_index; - const uint8_t kc = rdata->Kc; + const uint8_t Kc = rdata->Kc; short *ulsch_llr = rdata->llr; int8_t llrProcBuf[OAI_LDPC_DECODER_MAX_NUM_LLR] __attribute__((aligned(32))); @@ -177,7 +177,7 @@ static void nr_process_decode_segment(void *arg) *rdata->d_to_be_cleared, E, rdata->F, - Kr - rdata->F - 2 * (p_decoderParms->Z)) + K - rdata->F - 2 * (p_decoderParms->Z)) == -1) { stop_meas(rdata->p_ts_rate_unmatch); @@ -191,7 +191,7 @@ static void nr_process_decode_segment(void *arg) *rdata->d_to_be_cleared = false; - memset(rdata->c, 0, Kr_bytes); + memset(rdata->c, 0, K >> 3); p_decoderParms->crc_type = crcType(rdata->C, A); p_decoderParms->Kprime = lenWithCrc(rdata->C, A); @@ -203,16 +203,16 @@ static void nr_process_decode_segment(void *arg) memset(z, 0, 2 * rdata->Z * sizeof(*z)); // set Filler bits - memset(z + K_bits_F, 127, rdata->F * sizeof(*z)); + memset(z + Kprime, 127, rdata->F * sizeof(*z)); // Move coded bits before filler bits - memcpy(z + 2 * rdata->Z, rdata->d, (K_bits_F - 2 * rdata->Z) * sizeof(*z)); + memcpy(z + 2 * rdata->Z, rdata->d, (Kprime - 2 * rdata->Z) * sizeof(*z)); // skip filler bits - memcpy(z + Kr, rdata->d + (Kr - 2 * rdata->Z), (kc * rdata->Z - Kr) * sizeof(*z)); + memcpy(z + K, rdata->d + (K - 2 * rdata->Z), (Kc * rdata->Z - K) * sizeof(*z)); // Saturate coded bits before decoding into 8 bits values simde__m128i *pv = (simde__m128i *)&z; int8_t l[68 * 384 + 16] __attribute__((aligned(16))); simde__m128i *pl = (simde__m128i *)&l; - for (int i = 0, j = 0; j < ((kc * rdata->Z) >> 4) + 1; i += 2, j++) { + for (int i = 0, j = 0; j < ((Kc * rdata->Z) >> 4) + 1; i += 2, j++) { pl[j] = simde_mm_packs_epi16(pv[i], pv[i + 1]); } ////////////////////////////////////////////////////////////////////////////////////////// @@ -226,7 +226,7 @@ static void nr_process_decode_segment(void *arg) ldpc_interface_segment.LDPCdecoder(p_decoderParms, 0, 0, 0, l, llrProcBuf, p_procTime, rdata->abort_decode); if (decodeIterations <= p_decoderParms->numMaxIter) { - memcpy(rdata->c,llrProcBuf, Kr>>3); + memcpy(rdata->c,llrProcBuf, K>>3); *rdata->decodeSuccess = true; } else { *rdata->decodeSuccess = false; diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c index 6c66edeb82..8a3291eeae 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c @@ -61,7 +61,7 @@ static void ldpc8blocks_coding_segment(void *p) uint32_t A = nrLDPC_TB_encoding_parameters->A; unsigned int G = nrLDPC_TB_encoding_parameters->G; - LOG_D(PHY,"dlsch coding A %d Kr %d G %d (nb_rb %d, mod_order %d)\n", + LOG_D(PHY,"dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)\n", A,impp->K,G, nb_rb,(int)mod_order); // nrLDPC_encoder output is in "d" @@ -123,7 +123,7 @@ static void ldpc8blocks_coding_segment(void *p) stop_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_rate_match); if (impp->K - impp->F - 2 * impp->Zc > E) { LOG_E(PHY, - "dlsch coding A %d Kr %d G %d (nb_rb %d, mod_order %d)\n", + "dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)\n", A, impp->K, G, @@ -131,7 +131,7 @@ static void ldpc8blocks_coding_segment(void *p) (int)mod_order); LOG_E(NR_PHY, - "Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Kr %d, Filler bits %d, Filler offset %d mod_order %d, " + "Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, K %d, Filler bits %d, Filler offset %d mod_order %d, " "nb_rb %d)...\n", rr, impp->n_segments, diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c index 057fb58f6a..11fcd31424 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c @@ -83,8 +83,8 @@ typedef struct args_fpga_decode_prepare_s { uint32_t r_span; /*!< number of blocks to be prepared within this function */ int r_offset; /*!< r index expressed in bits */ int input_CBoffset; /*!< */ - int kc; /*!< */ - int K_bits_F; /*!< */ + int Kc; /*!< ratio between the number of columns in the parity check graph and the lifting size */ + int Kprime; /*!< size of payload and CRC bits in a code block */ task_ans_t *ans; /*!< pointer to the answer that is used by thread pool to detect job completion */ } args_fpga_decode_prepare_t; @@ -143,11 +143,10 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, int slot_rx, tpool_t *ldpc_threadPool) { - const uint32_t Kr = TB_params->K; - const uint32_t Kr_bytes = Kr >> 3; - const int kc = TB_params->BG == 2 ? 52 : 68; + const uint32_t K = TB_params->K; + const int Kc = TB_params->BG == 2 ? 52 : 68; int r_offset = 0, offset = 0; - int K_bits_F = Kr - TB_params->F; + int Kprime = K - TB_params->F; // FPGA parameter preprocessing static uint8_t multi_indata[27000 * 25]; // FPGA input data @@ -156,7 +155,7 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, int bg_len = TB_params->BG == 1 ? 22 : 10; // Calc input CB offset - int input_CBoffset = TB_params->Z * kc * 8; + int input_CBoffset = TB_params->Z * Kc * 8; if ((input_CBoffset & 0x7F) == 0) input_CBoffset = input_CBoffset / 8; else @@ -168,7 +167,7 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, dec_conf.max_iter = TB_params->max_ldpc_iterations; dec_conf.numCB = TB_params->C; // input soft bits length, Zc x 66 - length of filler bits - dec_conf.numChannelLls = (K_bits_F - 2 * TB_params->Z) + (kc * TB_params->Z - Kr); + dec_conf.numChannelLls = (Kprime - 2 * TB_params->Z) + (Kc * TB_params->Z - K); // filler bits length dec_conf.numFillerBits = TB_params->F; dec_conf.max_schedule = 0; @@ -196,11 +195,11 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, printf("TB_params->F: %d\n", TB_params->F); printf("numChannelLls:\t %d = (%d - 2 * %d) + (%d * %d - %d)\n", dec_conf.numChannelLls, - K_bits_F, + Kprime, TB_params->Z, - kc, + Kc, TB_params->Z, - Kr); + K); printf("numFillerBits:\t %d\n", TB_params->F); printf("------------------------\n"); // =================================== @@ -265,8 +264,8 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, args->r_span = r_span; args->r_offset = r_offset; args->input_CBoffset = input_CBoffset; - args->kc = kc; - args->K_bits_F = K_bits_F; + args->Kc = Kc; + args->Kprime = Kprime; r_remaining = r_span; @@ -276,7 +275,7 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, LOG_D(PHY, "Added %d block(s) to prepare for decoding, in pipe: %d to %d\n", r_span, r, r + r_span - 1); } r_offset += segment_params->E; - offset += (Kr_bytes - (TB_params->F >> 3) - ((TB_params->C > 1) ? 3 : 0)); + offset += ((K >> 3) - (TB_params->F >> 3) - ((TB_params->C > 1) ? 3 : 0)); r_remaining -= 1; } @@ -353,7 +352,7 @@ void nr_ulsch_FPGA_decoding_prepare_blocks(void *args) uint8_t max_ldpc_iterations = TB_params->max_ldpc_iterations; uint32_t tbslbrm = TB_params->tbslbrm; - uint32_t Kr = TB_params->K; + uint32_t K = TB_params->K; uint32_t Z = TB_params->Z; uint32_t F = TB_params->F; @@ -369,8 +368,8 @@ void nr_ulsch_FPGA_decoding_prepare_blocks(void *args) uint32_t r_span = arguments->r_span; int r_offset = arguments->r_offset; int input_CBoffset = arguments->input_CBoffset; - int kc = arguments->kc; - int K_bits_F = arguments->K_bits_F; + int Kc = arguments->Kc; + int Kprime = arguments->Kprime; int16_t z[68 * 384 + 16] __attribute__((aligned(16))); simde__m128i *pv = (simde__m128i *)&z; @@ -405,7 +404,7 @@ void nr_ulsch_FPGA_decoding_prepare_blocks(void *args) *segment_params->d_to_be_cleared, segment_params->E, F, - Kr - F - 2 * Z) + K - F - 2 * Z) == -1) { stop_meas(&segment_params->ts_rate_unmatch); LOG_E(PHY, "ulsch_decoding.c: Problem in rate_matching\n"); @@ -418,33 +417,33 @@ void nr_ulsch_FPGA_decoding_prepare_blocks(void *args) *segment_params->d_to_be_cleared = false; - memset(segment_params->c, 0, Kr >> 3); + memset(segment_params->c, 0, K >> 3); // set first 2*Z_c bits to zeros memset(&z[0], 0, 2 * Z * sizeof(int16_t)); // set Filler bits - memset((&z[0] + K_bits_F), 127, F * sizeof(int16_t)); + memset((&z[0] + Kprime), 127, F * sizeof(int16_t)); // Move coded bits before filler bits - memcpy((&z[0] + 2 * Z), segment_params->d, (K_bits_F - 2 * Z) * sizeof(int16_t)); + memcpy((&z[0] + 2 * Z), segment_params->d, (Kprime - 2 * Z) * sizeof(int16_t)); // skip filler bits - memcpy((&z[0] + Kr), segment_params->d + (Kr - 2 * Z), (kc * Z - Kr) * sizeof(int16_t)); + memcpy((&z[0] + K), segment_params->d + (K - 2 * Z), (Kc * Z - K) * sizeof(int16_t)); // Saturate coded bits before decoding into 8 bits values - for (int i = 0, j = 0; j < ((kc * Z) >> 4); i += 2, j++) { + for (int i = 0, j = 0; j < ((Kc * Z) >> 4); i += 2, j++) { temp_multi_indata[j] = simde_mm_xor_si128(simde_mm_packs_epi16(pv[i], pv[i + 1]), simde_mm_cmpeq_epi32(ones, ones)); // Perform NOT operation and write the result to temp_multi_indata[j] } - // the last bytes before reaching "kc * harq_process->Z" should not be written 128 bits at a time to avoid overwritting the + // the last bytes before reaching "Kc * harq_process->Z" should not be written 128 bits at a time to avoid overwritting the // following block in multi_indata simde__m128i tmp = - simde_mm_xor_si128(simde_mm_packs_epi16(pv[2 * ((kc * Z) >> 4)], pv[2 * ((kc * Z) >> 4) + 1]), + simde_mm_xor_si128(simde_mm_packs_epi16(pv[2 * ((Kc * Z) >> 4)], pv[2 * ((Kc * Z) >> 4) + 1]), simde_mm_cmpeq_epi32(ones, ones)); // Perform NOT operation and write the result to temp_multi_indata[j] uint8_t *tmp_p = (uint8_t *)&tmp; - for (int i = 0, j = ((kc * Z) & 0xfffffff0); j < kc * Z; i++, j++) { + for (int i = 0, j = ((Kc * Z) & 0xfffffff0); j < Kc * Z; i++, j++) { multi_indata[r * input_CBoffset + j] = tmp_p[i]; } diff --git a/openair1/PHY/CODING/nrLDPC_defs.h b/openair1/PHY/CODING/nrLDPC_defs.h index 471498be74..fe386ce6d7 100644 --- a/openair1/PHY/CODING/nrLDPC_defs.h +++ b/openair1/PHY/CODING/nrLDPC_defs.h @@ -26,37 +26,51 @@ #include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h" /** - \brief LDPC encoder - \param 1 input - \param 2 channel_input - \param 3 int Zc - \param 4 int Kb - \param 5 short block_length - \param 6 short BG - \param 7 int n_segment - \param 8 unsigned int macro_num - \param 9-12 time_stats_t *tinput,*tprep, *tparity,*toutput + \brief LDPC encoder parameter structure + \var n_segments number of segments in the transport block + \var macro_num index of the subset of segments to encode + within the transport block + \var gen_code flag to generate parity check code + 0 -> encoding + 1 -> generate parity check code with AVX2 + 2 -> generate parity check code without AVX2 + \var tinput time statistics for data input in the encoder + \var tprep time statistics for data preparation in the encoder + \var tparity time statistics for adding parity bits + \var toutput time statistics for data output from the encoder + \var K size of the complete code segment before encoding + including payload, CRC bits and filler bit + (also known as Kr, see 38.212-5.2.2) + \var Kb number of lifting sizes to fit the payload (see 38.212-5.2.2) + \var Zc lifting size (see 38.212-5.2.2) + \var F number of filler bits (see 38.212-5.2.2) + \var harq pointer to the HARQ process structure + \var BG base graph index + \var output output buffer after INTERLEAVING + \var ans pointer to the task answer + to notify thread pool about completion of the task */ typedef struct { - unsigned int n_segments; // optim8seg - unsigned int macro_num; // optim8segmulti - unsigned char gen_code; //orig + unsigned int n_segments; // optim8seg + unsigned int macro_num; // optim8segmulti + unsigned char gen_code; //orig time_stats_t *tinput; time_stats_t *tprep; time_stats_t *tparity; time_stats_t *toutput; - int Kr; + /// Size in bits of the code segments + uint32_t K; + /// Number of lifting sizes to fit the payload uint32_t Kb; + /// Lifting size uint32_t Zc; + /// Number of "Filler" bits + uint32_t F; void *harq; /// Encoder BG uint8_t BG; /// Interleaver outputs unsigned char *output; - /// Number of bits in "small" code segments - uint32_t K; - /// Number of "Filler" bits - uint32_t F; task_ans_t *ans; } encoder_implemparams_t; From c959f41987be3a07788258a6d45066d5637a0ae5 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Mon, 6 Jan 2025 08:13:01 +0000 Subject: [PATCH 47/54] fix(nrLDPC_coding): remove T2 legacy setCombIn from segment decoder parameters --- .../nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c | 1 - openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c index df7ba73aed..8ac20841b9 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c @@ -257,7 +257,6 @@ int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_de t_info->len += 1; decParams.R = nrLDPC_TB_decoding_parameters->segments[r].R; - decParams.setCombIn = !nrLDPC_TB_decoding_parameters->segments[r].d_to_be_cleared; rdata->decoderParms = decParams; rdata->llr = nrLDPC_TB_decoding_parameters->segments[r].llr; rdata->Kc = decParams.BG == 2 ? 52 : 68; diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h index 57701ce7df..abe5d38a50 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h @@ -88,9 +88,8 @@ typedef struct nrLDPC_dec_params { uint8_t numMaxIter; /**< Maximum number of iterations */ int Kprime; /**< Size of the payload bits and CRC bits in the code block */ e_nrLDPC_outMode outMode; /**< Output format */ - int crc_type; - int (*check_crc)(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type); - uint8_t setCombIn; + int crc_type; /**< Size and type of the parity check bits (16, 24A or 24B) */ + int (*check_crc)(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type); /**< Parity check function */ } t_nrLDPC_dec_params; /** From 6eb0913de930f2510c3a0d86257ca12809aa7303 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Wed, 8 Jan 2025 09:27:01 +0000 Subject: [PATCH 48/54] fix(documentation): typos and strengthen the explanation of the adaptation layer between slot coding and segment coding --- openair1/PHY/CODING/DOC/LDPCImplementation.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/CODING/DOC/LDPCImplementation.md b/openair1/PHY/CODING/DOC/LDPCImplementation.md index f5260e4d0a..cf5fb506c8 100644 --- a/openair1/PHY/CODING/DOC/LDPCImplementation.md +++ b/openair1/PHY/CODING/DOC/LDPCImplementation.md @@ -114,9 +114,11 @@ Libraries implementing the slotwise LDPC coding must be named `libldpc<_version> The interface of the library is defined in [nrLDPC_defs.h](file://../nrLDPC_defs.h). The code loading the LDPC library is in [nrLDPC_load.c](file://../nrLDPC_load.c), in function `load_nrLDPClib`, which must be called at init time. +*Note: LDPC segment coding libraries are not loaded directly by OAI but by the intermediate library `libldpc.so` which is implementing the LDPC slot coding interface using a LDPC segment coding library.* + ### Selecting the LDPC library at run time -By default the function `int load_nrLDPClib(void)` looks for `libldpc.so`, this default behavior can be changed using the oai loader configuration options in the configuration file or from the command line as shown below: +By default the function `int load_nrLDPClib(void)` looks for `libldpc_optim8segmulti.so`, this default behavior can be changed using the oai loader configuration options in the configuration file or from the command line as shown below: #### Examples of ldpc shared lib selection when running nr softmodem's: @@ -133,7 +135,7 @@ loading `libldpc_optim8seg.so` instead of `libldpc_optim8segmulti.so`: ........................ ``` -loading `libldpc_cl.so` instead of `libldpc.so`: +loading `libldpc_cl.so` instead of `libldpc_optim8segmulti.so`: `make ldpc_cl` From c54e7a70351c5f8678e59467f1aed8b1d732543d Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 9 Jan 2025 07:57:41 +0000 Subject: [PATCH 49/54] fix(nrLDPC_coding): in segment decoder, move useless memset on decoder output c to the oly case where it is useful --- .../nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c index 8ac20841b9..bccf9619b3 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c @@ -191,7 +191,6 @@ static void nr_process_decode_segment(void *arg) *rdata->d_to_be_cleared = false; - memset(rdata->c, 0, K >> 3); p_decoderParms->crc_type = crcType(rdata->C, A); p_decoderParms->Kprime = lenWithCrc(rdata->C, A); @@ -229,6 +228,7 @@ static void nr_process_decode_segment(void *arg) memcpy(rdata->c,llrProcBuf, K>>3); *rdata->decodeSuccess = true; } else { + memset(rdata->c, 0, K >> 3); *rdata->decodeSuccess = false; } stop_meas(rdata->p_ts_ldpc_decode); From f9c7057ed1b0dda3ec4306cad54c764b1e1a5509 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 9 Jan 2025 07:59:37 +0000 Subject: [PATCH 50/54] fix(nrLDPC_coding): Apply clang-format to segment coding code --- .../nrLDPC_coding_segment_decoder.c | 45 +++++-------- .../nrLDPC_coding_segment_encoder.c | 66 ++++++++----------- .../nrLDPC_coding_xdma/nrLDPC_coding_xdma.c | 30 ++++----- 3 files changed, 57 insertions(+), 84 deletions(-) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c index bccf9619b3..f14e09f8b4 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c @@ -20,9 +20,8 @@ */ /*! \file PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c -* \brief Top-level routines for decoding LDPC transport channels -*/ - + * \brief Top-level routines for decoding LDPC transport channels + */ // [from gNB coding] #include "PHY/defs_gNB.h" @@ -45,10 +44,10 @@ #include #include #include -//#define gNB_DEBUG_TRACE +// #define gNB_DEBUG_TRACE -#define OAI_LDPC_DECODER_MAX_NUM_LLR 27000 //26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX = 68*384 -//#define DEBUG_CRC +#define OAI_LDPC_DECODER_MAX_NUM_LLR 27000 // 26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX = 68*384 +// #define DEBUG_CRC #ifdef DEBUG_CRC #define PRINT_CRC_CHECK(a) a #else @@ -76,7 +75,7 @@ * \var F filler bits size * \var r segment index in TB * \var E input llr segment size - * \var C number of segments + * \var C number of segments * \var llr input llr segment array * \var d Pointers to code blocks before LDPC decoding (38.212 V15.4.0 section 5.3.2) * \var d_to_be_cleared @@ -89,8 +88,7 @@ * \var p_ts_rate_unmatch pointer to rate unmatching time stats * \var p_ts_ldpc_decode pointer to decoding time stats */ -typedef struct nrLDPC_decoding_parameters_s{ - +typedef struct nrLDPC_decoding_parameters_s { t_nrLDPC_dec_params decoderParms; uint8_t Qm; @@ -166,7 +164,6 @@ static void nr_process_decode_segment(void *arg) ///////////////////////// ulsch_harq->e =====> ulsch_harq->d ///////////////////////// - if (nr_rate_matching_ldpc_rx(rdata->tbslbrm, p_decoderParms->BG, p_decoderParms->Z, @@ -179,7 +176,6 @@ static void nr_process_decode_segment(void *arg) rdata->F, K - rdata->F - 2 * (p_decoderParms->Z)) == -1) { - stop_meas(rdata->p_ts_rate_unmatch); LOG_E(PHY, "nrLDPC_coding_segment_decoder.c: Problem in rate_matching\n"); @@ -225,7 +221,7 @@ static void nr_process_decode_segment(void *arg) ldpc_interface_segment.LDPCdecoder(p_decoderParms, 0, 0, 0, l, llrProcBuf, p_procTime, rdata->abort_decode); if (decodeIterations <= p_decoderParms->numMaxIter) { - memcpy(rdata->c,llrProcBuf, K>>3); + memcpy(rdata->c, llrProcBuf, K >> 3); *rdata->decodeSuccess = true; } else { memset(rdata->c, 0, K >> 3); @@ -237,9 +233,10 @@ static void nr_process_decode_segment(void *arg) completed_task_ans(rdata->ans); } -int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters, int pusch_id, thread_info_tm_t *t_info) +int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters, + int pusch_id, + thread_info_tm_t *t_info) { - nrLDPC_TB_decoding_parameters_t *nrLDPC_TB_decoding_parameters = &nrLDPC_slot_decoding_parameters->TBs[pusch_id]; *nrLDPC_TB_decoding_parameters->processedSegments = 0; @@ -250,7 +247,6 @@ int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_de decParams.outMode = 0; for (int r = 0; r < nrLDPC_TB_decoding_parameters->C; r++) { - nrLDPC_decoding_parameters_t *rdata = &((nrLDPC_decoding_parameters_t *)t_info->buf)[t_info->len]; DevAssert(t_info->len < t_info->cap); rdata->ans = &t_info->ans[t_info->len]; @@ -286,29 +282,26 @@ int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_de return nrLDPC_TB_decoding_parameters->C; } -int32_t nrLDPC_coding_init(void){ - +int32_t nrLDPC_coding_init(void) +{ char *segment_shlibversion = NULL; paramdef_t LoaderParams[] = { - {"segment_shlibversion", NULL, 0, .strptr = &segment_shlibversion, .defstrval = "_optim8segmulti", TYPE_STRING, 0, NULL} - }; + {"segment_shlibversion", NULL, 0, .strptr = &segment_shlibversion, .defstrval = "_optim8segmulti", TYPE_STRING, 0, NULL}}; config_get(config_get_if(), LoaderParams, sizeofArray(LoaderParams), "nrLDPC_coding_segment"); load_LDPClib(segment_shlibversion, &ldpc_interface_segment); return 0; - } -int32_t nrLDPC_coding_shutdown(void){ - +int32_t nrLDPC_coding_shutdown(void) +{ free_LDPClib(&ldpc_interface_segment); return 0; - } -int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters){ - +int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters) +{ int nbSegments = 0; for (int pusch_id = 0; pusch_id < nrLDPC_slot_decoding_parameters->nb_TBs; pusch_id++) { nrLDPC_TB_decoding_parameters_t *nrLDPC_TB_decoding_parameters = &nrLDPC_slot_decoding_parameters->TBs[pusch_id]; @@ -338,6 +331,4 @@ int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_dec } } return 0; - } - diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c index 8a3291eeae..c096e1967a 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c @@ -20,8 +20,8 @@ */ /*! \file PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c -* \brief Top-level routines for implementing LDPC encoding of transport channels -*/ + * \brief Top-level routines for implementing LDPC encoding of transport channels + */ #include "PHY/defs_gNB.h" #include "PHY/CODING/coding_extern.h" @@ -40,8 +40,8 @@ #include -//#define DEBUG_LDPC_ENCODING -//#define DEBUG_LDPC_ENCODING_FREE 1 +// #define DEBUG_LDPC_ENCODING +// #define DEBUG_LDPC_ENCODING_FREE 1 extern ldpc_interface_t ldpc_interface_segment; @@ -61,35 +61,34 @@ static void ldpc8blocks_coding_segment(void *p) uint32_t A = nrLDPC_TB_encoding_parameters->A; unsigned int G = nrLDPC_TB_encoding_parameters->G; - LOG_D(PHY,"dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)\n", - A,impp->K,G, nb_rb,(int)mod_order); + LOG_D(PHY, "dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)\n", A, impp->K, G, nb_rb, (int)mod_order); // nrLDPC_encoder output is in "d" // let's make this interface happy! - uint8_t tmp[8][68 * 384]__attribute__((aligned(32))); + uint8_t tmp[8][68 * 384] __attribute__((aligned(32))); uint8_t *d[impp->n_segments]; - for (int rr=impp->macro_num*8, i=0; rr < impp->n_segments && rr < (impp->macro_num+1)*8; rr++,i++ ) + for (int rr = impp->macro_num * 8, i = 0; rr < impp->n_segments && rr < (impp->macro_num + 1) * 8; rr++, i++) d[rr] = tmp[i]; uint8_t *c[nrLDPC_TB_encoding_parameters->C]; for (int r = 0; r < nrLDPC_TB_encoding_parameters->C; r++) - c[r]=nrLDPC_TB_encoding_parameters->segments[r].c; - start_meas(&nrLDPC_TB_encoding_parameters->segments[impp->macro_num*8].ts_ldpc_encode); + c[r] = nrLDPC_TB_encoding_parameters->segments[r].c; + start_meas(&nrLDPC_TB_encoding_parameters->segments[impp->macro_num * 8].ts_ldpc_encode); ldpc_interface_segment.LDPCencoder(c, d, impp); - stop_meas(&nrLDPC_TB_encoding_parameters->segments[impp->macro_num*8].ts_ldpc_encode); + stop_meas(&nrLDPC_TB_encoding_parameters->segments[impp->macro_num * 8].ts_ldpc_encode); // Compute where to place in output buffer that is concatenation of all segments - uint32_t r_offset=0; - for (int i=0; i < impp->macro_num*8; i++ ) - r_offset+=nrLDPC_TB_encoding_parameters->segments[i].E; - for (int rr=impp->macro_num*8; rr < impp->n_segments && rr < (impp->macro_num+1)*8; rr++ ) { - if (impp->F>0) { + uint32_t r_offset = 0; + for (int i = 0; i < impp->macro_num * 8; i++) + r_offset += nrLDPC_TB_encoding_parameters->segments[i].E; + for (int rr = impp->macro_num * 8; rr < impp->n_segments && rr < (impp->macro_num + 1) * 8; rr++) { + if (impp->F > 0) { // writing into positions d[r][k-2Zc] as in clause 5.3.2 step 2) in 38.212 memset(&d[rr][impp->K - impp->F - 2 * impp->Zc], NR_NULL, impp->F); } #ifdef DEBUG_LDPC_ENCODING - LOG_D(PHY,"rvidx in encoding = %d\n", rel15->rvIndex[0]); + LOG_D(PHY, "rvidx in encoding = %d\n", rel15->rvIndex[0]); #endif uint32_t E = nrLDPC_TB_encoding_parameters->segments[rr].E; LOG_D(NR_PHY, @@ -108,7 +107,7 @@ static void ldpc8blocks_coding_segment(void *p) uint32_t Tbslbrm = nrLDPC_TB_encoding_parameters->tbslbrm; uint8_t e[E]; - bzero (e, E); + bzero(e, E); start_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_rate_match); nr_rate_matching_ldpc(Tbslbrm, impp->BG, @@ -122,13 +121,7 @@ static void ldpc8blocks_coding_segment(void *p) E); stop_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_rate_match); if (impp->K - impp->F - 2 * impp->Zc > E) { - LOG_E(PHY, - "dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)\n", - A, - impp->K, - G, - nb_rb, - (int)mod_order); + LOG_E(PHY, "dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)\n", A, impp->K, G, nb_rb, (int)mod_order); LOG_E(NR_PHY, "Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, K %d, Filler bits %d, Filler offset %d mod_order %d, " @@ -145,23 +138,20 @@ static void ldpc8blocks_coding_segment(void *p) } #ifdef DEBUG_LDPC_ENCODING - for (int i =0; i<16; i++) - printf("output ratematching e[%d]= %d r_offset %u\n", i,e[i], r_offset); + for (int i = 0; i < 16; i++) + printf("output ratematching e[%d]= %d r_offset %u\n", i, e[i], r_offset); #endif start_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_interleave); - nr_interleaving_ldpc(E, - mod_order, - e, - impp->output+r_offset); + nr_interleaving_ldpc(E, mod_order, e, impp->output + r_offset); stop_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_interleave); #ifdef DEBUG_LDPC_ENCODING - for (int i =0; i<16; i++) - printf("output interleaving f[%d]= %d r_offset %u\n", i,impp->output[i+r_offset], r_offset); + for (int i = 0; i < 16; i++) + printf("output interleaving f[%d]= %d r_offset %u\n", i, impp->output[i + r_offset], r_offset); - if (r==impp->n_segments-1) - write_output("enc_output.m","enc",impp->output,G,1,4); + if (r == impp->n_segments - 1) + write_output("enc_output.m", "enc", impp->output, G, 1, 4); #endif r_offset += E; @@ -171,7 +161,9 @@ static void ldpc8blocks_coding_segment(void *p) completed_task_ans(impp->ans); } -static int nrLDPC_prepare_TB_encoding(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters, int dlsch_id, thread_info_tm_t *t_info) +static int nrLDPC_prepare_TB_encoding(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters, + int dlsch_id, + thread_info_tm_t *t_info) { nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id]; @@ -211,7 +203,6 @@ static int nrLDPC_prepare_TB_encoding(nrLDPC_slot_encoding_parameters_t *nrLDPC_ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters) { - int nbTasks = 0; for (int dlsch_id = 0; dlsch_id < nrLDPC_slot_encoding_parameters->nb_TBs; dlsch_id++) { nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id]; @@ -234,5 +225,4 @@ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encodin join_task_ans(ans, nbEncode); return 0; - } diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c index 11fcd31424..67e26e2aff 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c @@ -92,24 +92,20 @@ int32_t nrLDPC_coding_init(void); int32_t nrLDPC_coding_shutdown(void); int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *slot_params, int frame_rx, int slot_rx); // int32_t nrLDPC_coding_encoder(void); -int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, - int frame_rx, - int slot_rx, - tpool_t *ldpc_threadPool); +int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, int frame_rx, int slot_rx, tpool_t *ldpc_threadPool); void nr_ulsch_FPGA_decoding_prepare_blocks(void *args); int32_t nrLDPC_coding_init(void) { char *encoder_shlibversion = NULL; paramdef_t LoaderParams[] = { - {"num_threads_prepare", NULL, 0, .iptr = &num_threads_prepare_max, .defintval = 0, TYPE_INT, 0, NULL}, - {"encoder_shlibversion", NULL, 0, .strptr = &encoder_shlibversion, .defstrval = "_optim8segmulti", TYPE_STRING, 0, NULL}, - {"user_device", NULL, 0, .strptr = &user_device, .defstrval = DEVICE_NAME_DEFAULT_USER, TYPE_STRING, 0, NULL}, - {"enc_read_device", NULL, 0, .strptr = &enc_read_device, .defstrval = DEVICE_NAME_DEFAULT_ENC_READ, TYPE_STRING, 0, NULL}, - {"enc_write_device", NULL, 0, .strptr = &enc_write_device, .defstrval = DEVICE_NAME_DEFAULT_ENC_WRITE, TYPE_STRING, 0, NULL}, - {"dec_read_device", NULL, 0, .strptr = &dec_read_device, .defstrval = DEVICE_NAME_DEFAULT_DEC_READ, TYPE_STRING, 0, NULL}, - {"dec_write_device", NULL, 0, .strptr = &dec_write_device, .defstrval = DEVICE_NAME_DEFAULT_DEC_WRITE, TYPE_STRING, 0, NULL} - }; + {"num_threads_prepare", NULL, 0, .iptr = &num_threads_prepare_max, .defintval = 0, TYPE_INT, 0, NULL}, + {"encoder_shlibversion", NULL, 0, .strptr = &encoder_shlibversion, .defstrval = "_optim8segmulti", TYPE_STRING, 0, NULL}, + {"user_device", NULL, 0, .strptr = &user_device, .defstrval = DEVICE_NAME_DEFAULT_USER, TYPE_STRING, 0, NULL}, + {"enc_read_device", NULL, 0, .strptr = &enc_read_device, .defstrval = DEVICE_NAME_DEFAULT_ENC_READ, TYPE_STRING, 0, NULL}, + {"enc_write_device", NULL, 0, .strptr = &enc_write_device, .defstrval = DEVICE_NAME_DEFAULT_ENC_WRITE, TYPE_STRING, 0, NULL}, + {"dec_read_device", NULL, 0, .strptr = &dec_read_device, .defstrval = DEVICE_NAME_DEFAULT_DEC_READ, TYPE_STRING, 0, NULL}, + {"dec_write_device", NULL, 0, .strptr = &dec_write_device, .defstrval = DEVICE_NAME_DEFAULT_DEC_WRITE, TYPE_STRING, 0, NULL}}; config_get(config_get_if(), LoaderParams, sizeofArray(LoaderParams), "nrLDPC_coding_xdma"); AssertFatal(num_threads_prepare_max != 0, "nrLDPC_coding_xdma.num_threads_prepare was not provided"); @@ -138,10 +134,7 @@ int32_t nrLDPC_coding_encoder(void) } */ -int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, - int frame_rx, - int slot_rx, - tpool_t *ldpc_threadPool) +int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, int frame_rx, int slot_rx, tpool_t *ldpc_threadPool) { const uint32_t K = TB_params->K; const int Kc = TB_params->BG == 2 ? 52 : 68; @@ -220,10 +213,9 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, // calculate required number of jobs uint32_t r_while = 0; while (r_while < TB_params->C) { - // calculate number of segments processed in the new job uint32_t modulus = (TB_params->C - r_while) % (num_threads_prepare_max - num_threads_prepare); - uint32_t quotient = (TB_params->C - r_while) / (num_threads_prepare_max - num_threads_prepare); + uint32_t quotient = (TB_params->C - r_while) / (num_threads_prepare_max - num_threads_prepare); uint32_t r_span_max = modulus == 0 ? quotient : quotient + 1; // saturate to be sure to not go above C @@ -257,7 +249,7 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params, args->r_first = r; uint32_t modulus = (TB_params->C - r) % (num_threads_prepare_max - num_threads_prepare); - uint32_t quotient = (TB_params->C - r) / (num_threads_prepare_max - num_threads_prepare); + uint32_t quotient = (TB_params->C - r) / (num_threads_prepare_max - num_threads_prepare); uint32_t r_span_max = modulus == 0 ? quotient : quotient + 1; uint32_t r_span = TB_params->C - r < r_span_max ? TB_params->C - r : r_span_max; From df03c02a845e50f8fb92f7bfaa32f0d05888470d Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Thu, 2 Jan 2025 15:42:52 +0100 Subject: [PATCH 51/54] fhi_72: allow to provide dpdk_iova_mode to xran In DPDK, IO Virtual Addresses (IOVA) refers to the memory addressing scheme used for IO operations. The two IOVA modes supported by DPDK are: - IOVA as Physical Address (PA): IO memory addresses correspond directly to physical addresses, no address translation required. - IOVA as Virtual Address (VA): IO memory addresses align with user-space virtual addresses, requiring IOMMU to remap physical memory. Previously, this was hardcoded to 0, to use IOVA as PA mode, with xRAN's DPDK EAL initialization using the "--iova-mode=pa" flag. This commit introduces a gNB configuration option to allow users to select the desired IOVA mode. The default remains PA mode to ensure backward compatibility. Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN capability in the docker container. --- doc/ORAN_FHI7.2_Tutorial.md | 11 +++++++++++ doc/tuning_and_security.md | 3 +++ radio/fhi_72/oran-config.c | 8 +++++++- radio/fhi_72/oran-params.h | 21 +++++++++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/doc/ORAN_FHI7.2_Tutorial.md b/doc/ORAN_FHI7.2_Tutorial.md index 199f910b1c..84ae6b2064 100644 --- a/doc/ORAN_FHI7.2_Tutorial.md +++ b/doc/ORAN_FHI7.2_Tutorial.md @@ -917,6 +917,17 @@ Edit the sample OAI gNB configuration file and check following parameters: cannot preallocate memory on NUMA nodes other than 0; in this case, set this to 0 (no pre-allocation) and so that DPDK will allocate it on-demand on the right NUMA node. + * `dpdk_iova_mode`: Specifies DPDK IO Virtual Address (IOVA) mode: + * `PA`: IOVA as Physical Address (PA) mode, where DPDK IOVA memory layout + corresponds directly to the physical memory layout. + * `VA`: IOVA as Virtual Address (VA) mode, where DPDK IOVA addresses do not + follow the physical memory layout. Uses IOMMU to remap physical memory. + Requires kernel support and IOMMU for address translation. + * If not specified, default value of "PA" is used (for backwards compabilibity; + it was hardcoded to PA in the past). However, we recommend using "VA" mode + as it offers several benefits. For a detailed explanation of DPDK IOVA, + including the advantages and disadvantages of each mode, refer to + [Memory in DPDK](https://www.dpdk.org/memory-in-dpdk-part-2-deep-dive-into-iova/) * `owdm_enable`: used for eCPRI One-Way Delay Measurements; it depends if the RU supports it; if not set to 1 (enabled), default value is 0 (disabled) * `fh_config`: parameters that need to match RU parameters * timing parameters (starting with `T`) depend on the RU: `Tadv_cp_dl` is a diff --git a/doc/tuning_and_security.md b/doc/tuning_and_security.md index 94b6ceb07c..7e415e783d 100644 --- a/doc/tuning_and_security.md +++ b/doc/tuning_and_security.md @@ -146,6 +146,9 @@ on DPDK: - `IPC_LOCK` (becomes mandatory with DPDK) - `SYS_RESOURCE` - `NET_RAW` +- `SYS_ADMIN`: This is required by DPDK when using IOVA PA (Physical Address) + mode to read `/proc/self/pagemaps`. However, if DPDK EAL is configured to use + IOVA VA (Virtual Address) mode, this capability is no longer required. ## Capabilities with UHD diff --git a/radio/fhi_72/oran-config.c b/radio/fhi_72/oran-config.c index ea6d158f86..34da6f5890 100644 --- a/radio/fhi_72/oran-config.c +++ b/radio/fhi_72/oran-config.c @@ -472,7 +472,9 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in } io_cfg->bbdev_dev[0] = NULL; // BBDev dev name; max devices = 1 io_cfg->bbdev_mode = XRAN_BBDEV_NOT_USED; // DPDK for BBDev - io_cfg->dpdkIoVaMode = 0; // IOVA mode + int dpdk_iova_mode_idx = config_paramidx_fromname((paramdef_t *)fhip, nump, ORAN_CONFIG_DPDK_IOVA_MODE); + AssertFatal(dpdk_iova_mode_idx >= 0,"Index for dpdk_iova_mode config option not found!"); + io_cfg->dpdkIoVaMode = config_get_processedint(config_get_if(), (paramdef_t *)&fhip[dpdk_iova_mode_idx]); // IOVA mode io_cfg->dpdkMemorySize = *gpd(fhip, nump, ORAN_CONFIG_DPDK_MEM_SIZE)->uptr; // DPDK max memory allocation /* the following core assignment is needed for rte_eal_init() function within xran library; @@ -586,7 +588,11 @@ static bool set_fh_init(struct xran_fh_init *fh_init, enum xran_category xran_ca } paramdef_t fhip[] = ORAN_GLOBALPARAMS_DESC; + checkedparam_t fhip_CheckParams[] = ORAN_GLOBALPARAMS_CHECK_DESC; + static_assert(sizeofArray(fhip) == sizeofArray(fhip_CheckParams), + "fhip and fhip_CheckParams should have the same size"); int nump = sizeofArray(fhip); + config_set_checkfunctions(fhip, fhip_CheckParams, nump); int ret = config_get(config_get_if(), fhip, nump, CONFIG_STRING_ORAN); if (ret <= 0) { printf("problem reading section \"%s\"\n", CONFIG_STRING_ORAN); diff --git a/radio/fhi_72/oran-params.h b/radio/fhi_72/oran-params.h index d7eaf47a3b..20c3d71634 100644 --- a/radio/fhi_72/oran-params.h +++ b/radio/fhi_72/oran-params.h @@ -37,6 +37,7 @@ #define ORAN_CONFIG_NETHPERPORT "eth_lines" #define ORAN_CONFIG_NETHSPEED "eth_speed" #define ORAN_CONFIG_DPDK_MEM_SIZE "dpdk_mem_size" +#define ORAN_CONFIG_DPDK_IOVA_MODE "dpdk_iova_mode" #define ORAN_CONFIG_ECPRI_OWDM "owdm_enable" // clang-format off @@ -53,8 +54,28 @@ {ORAN_CONFIG_NETHPERPORT, "number of links per port\n", 0, .uptr=NULL, .defuintval=1, TYPE_UINT, 0}, \ {ORAN_CONFIG_NETHSPEED, "ethernet speed link\n", 0, .uptr=NULL, .defuintval=10, TYPE_UINT, 0}, \ {ORAN_CONFIG_DPDK_MEM_SIZE, "DPDK huge page pre-allocation in MiB\n", 0, .uptr=NULL, .defuintval=8192, TYPE_UINT, 0}, \ + {ORAN_CONFIG_DPDK_IOVA_MODE, "DPDK IOVA mode\n", 0, .strptr=NULL, .defstrval="PA", TYPE_STRING, 0}, \ {ORAN_CONFIG_ECPRI_OWDM, "eCPRI One-Way Delay Measurements\n", PARAMFLAG_BOOL, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } + +// clang-format off +#define ORAN_GLOBALPARAMS_CHECK_DESC { \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s3a = { config_checkstr_assign_integer, \ + {"PA", "VA"}, {0, 1}, 2} }, \ + { .s5 = { NULL } }, \ +} + + // clang-format on #define CONFIG_STRING_ORAN_FH "fh_config" From acd8f0730bf995ed3e54430afe0cf90b0a98f9a1 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Thu, 2 Jan 2025 16:19:49 +0100 Subject: [PATCH 52/54] CI: use IOVA VA mode in FHI7.2 pipeline Switching to IOVA VA mode in the FHI7.2 pipeline reduces the required capabilities for the Docker container. This change allows the removal of the SYS_ADMIN capability. --- .../conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf | 1 + .../yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/docker-compose.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf index b2f0c2ac14..4e7042c2e4 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.273prb.fhi72.4x4.2L-metanoia.conf @@ -235,6 +235,7 @@ log_config : fhi_72 = { dpdk_devices = ("0000:c3:11.0", "0000:c3:11.1"); + dpdk_iova_mode = "VA"; system_core = 0; io_core = 1; worker_cores = (2); diff --git a/ci-scripts/yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/docker-compose.yml index f0f6cb7691..0dd0a6c99d 100644 --- a/ci-scripts/yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/docker-compose.yml @@ -2,7 +2,6 @@ services: oai-gnb: image: ${REGISTRY:-oaisoftwarealliance}/oai-gnb-fhi72:${TAG:-develop} cap_add: - - SYS_ADMIN - IPC_LOCK - SYS_NICE cap_drop: From b4bc7c96bad8ddc5fef3416d2820706f539b4137 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 29 Oct 2024 14:42:38 +0100 Subject: [PATCH 53/54] Move UL_INFO structure allocation local to a rx slot processing Use UL_INFO on the stack, to simplify the code. move in the same struct the associated rach, pdu, crc, srs arrays that where pointed from directly in gNB structure Keep in nfapi the existing logic that make malloc for theses rach, pdu, crc, srs array lists Pass only relevant fields, where appropriate. Co-authored-by: Robert Schmidt --- executables/nr-gnb.c | 22 +-- nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c | 33 ++-- openair1/PHY/INIT/nr_init.c | 4 - openair1/PHY/defs_gNB.h | 20 +-- openair1/SCHED_NR/fapi_nr_l1.h | 11 +- openair1/SCHED_NR/nr_prach_procedures.c | 22 +-- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 176 +++++++++----------- openair1/SCHED_NR/sched_nr.h | 4 +- openair1/SIMULATION/NR_PHY/ulschsim.c | 1 - openair1/SIMULATION/NR_PHY/ulsim.c | 18 +- openair2/NR_PHY_INTERFACE/NR_IF_Module.c | 73 ++++---- openair2/NR_PHY_INTERFACE/NR_IF_Module.h | 17 +- 12 files changed, 184 insertions(+), 217 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 8098b75a56..5734efc5d0 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -220,10 +220,10 @@ static void rx_func(processingData_L1_t *info) LOG_D(NR_PHY, "%d.%d Starting RX processing\n", frame_rx, slot_rx); // UE-specific RX processing for subframe n - // TODO: check if this is correct for PARALLEL_RU_L1_TRX_SPLIT - + NR_UL_IND_t UL_INFO = {.frame = frame_rx, .slot = slot_rx, .module_id = gNB->Mod_id, .CC_id = gNB->CC_id}; // Do PRACH RU processing - L1_nr_prach_procedures(gNB,frame_rx,slot_rx); + UL_INFO.rach_ind.pdu_list = UL_INFO.prach_pdu_indication_list; + L1_nr_prach_procedures(gNB, frame_rx, slot_rx, &UL_INFO.rach_ind); //WA: comment rotation in tx/rx if (gNB->phase_comp) { @@ -242,15 +242,11 @@ static void rx_func(processingData_L1_t *info) } } } - phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx); + phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx, &UL_INFO); // Call the scheduler start_meas(&gNB->ul_indication_stats); - gNB->UL_INFO.frame = frame_rx; - gNB->UL_INFO.slot = slot_rx; - gNB->UL_INFO.module_id = gNB->Mod_id; - gNB->UL_INFO.CC_id = gNB->CC_id; - gNB->if_inst->NR_UL_indication(&gNB->UL_INFO); + gNB->if_inst->NR_UL_indication(&UL_INFO); stop_meas(&gNB->ul_indication_stats); #ifndef OAI_FHI72 @@ -462,17 +458,11 @@ void init_gNB() // Register MAC interface module AssertFatal((gNB->if_inst = NR_IF_Module_init(inst)) != NULL, "Cannot register interface"); - LOG_I(NR_PHY, "Registered with MAC interface module (%p)\n", gNB->if_inst); - // Set function pointers in MAC IF module + LOG_I(NR_PHY, "Registered with MAC interface module (%p)\n", gNB->if_inst); gNB->if_inst->NR_Schedule_response = nr_schedule_response; gNB->if_inst->NR_PHY_config_req = nr_phy_config_request; - // Clear UL_INFO and set rx/crc indication lists - memset((void *)&gNB->UL_INFO, 0, sizeof(gNB->UL_INFO)); - gNB->UL_INFO.rx_ind.pdu_list = gNB->rx_pdu_list; - gNB->UL_INFO.crc_ind.crc_list = gNB->crc_pdu_list; - gNB->prach_energy_counter = 0; gNB->chest_time = get_softmodem_params()->chest_time; gNB->chest_freq = get_softmodem_params()->chest_freq; diff --git a/nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c b/nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c index 6bba112c50..a883ccf4a2 100644 --- a/nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c +++ b/nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c @@ -182,24 +182,25 @@ int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t* config) NFAPI_TRACE(NFAPI_TRACE_DEBUG, "This is the slot_ind queue size %ld in %s():%d\n", gnb_slot_ind_queue.num_items, __FUNCTION__, __LINE__); if (slot_ind) { - gNB->UL_INFO.frame = slot_ind->sfn; - gNB->UL_INFO.slot = slot_ind->slot; + NR_UL_IND_t UL_INFO = {.frame = slot_ind->sfn, .slot = slot_ind->slot}; - NFAPI_TRACE(NFAPI_TRACE_DEBUG, "gNB->UL_INFO.frame = %d and slot %d, prev_slot = %d\n", - gNB->UL_INFO.frame, gNB->UL_INFO.slot, prev_slot); - if (setup_done && prev_slot != gNB->UL_INFO.slot) { //Give the VNF sufficient time to setup before starting scheduling && prev_slot != gNB->UL_INFO.slot + NFAPI_TRACE(NFAPI_TRACE_DEBUG, "UL_INFO.frame = %d and slot %d, prev_slot = %d\n", UL_INFO.frame, UL_INFO.slot, prev_slot); + if (setup_done && prev_slot != UL_INFO.slot) { // Give the VNF sufficient time to setup before starting scheduling && + // prev_slot != UL_INFO.slot - //Call the scheduler - gNB->UL_INFO.module_id = gNB->Mod_id; - gNB->UL_INFO.CC_id = gNB->CC_id; - NFAPI_TRACE(NFAPI_TRACE_DEBUG, "Calling NR_UL_indication for gNB->UL_INFO.frame = %d and slot %d\n", - gNB->UL_INFO.frame, gNB->UL_INFO.slot); - gNB->if_inst->NR_UL_indication(&gNB->UL_INFO); - prev_slot = gNB->UL_INFO.slot; - } - free(slot_ind); - slot_ind = NULL; - } + // Call the scheduler + UL_INFO.module_id = gNB->Mod_id; + UL_INFO.CC_id = gNB->CC_id; + NFAPI_TRACE(NFAPI_TRACE_DEBUG, + "Calling NR_UL_indication for UL_INFO.frame = %d and slot %d\n", + UL_INFO.frame, + UL_INFO.slot); + gNB->if_inst->NR_UL_indication(&UL_INFO); + prev_slot = UL_INFO.slot; + } + free(slot_ind); + slot_ind = NULL; + } selectRetval = pselect(maxSock+1, &rfds, NULL, NULL, &pselect_timeout, NULL); diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index 07cdca7692..ca14ca99be 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -136,8 +136,6 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB) int ret_loader = load_nrLDPC_coding_interface(NULL, &gNB->nrLDPC_coding_interface); AssertFatal(ret_loader == 0, "error loading LDPC library\n"); - pthread_mutex_init(&gNB->UL_INFO.crc_rx_mutex, NULL); - gNB->max_nb_pdsch = MAX_MOBILES_PER_GNB; init_delay_table(fp->ofdm_symbol_size, MAX_DELAY_COMP, NR_MAX_OFDM_SYMBOL_SIZE, fp->delay_table); @@ -231,8 +229,6 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB) const int max_ul_mimo_layers = 4; // taken from phy_init_nr_gNB() const int n_buf = Prx * max_ul_mimo_layers; - pthread_mutex_destroy(&gNB->UL_INFO.crc_rx_mutex); - PHY_MEASUREMENTS_gNB *meas = &gNB->measurements; free_and_zero(meas->n0_subband_power); free_and_zero(meas->n0_subband_power_dB); diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index e8fdfd4dda..154cc7a989 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -45,6 +45,7 @@ #include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h" #include "executables/rt_profiling.h" #include "nfapi_nr_interface_scf.h" +#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" #define MAX_NUM_RU_PER_gNB 8 #define MAX_PUCCH0_NID 8 @@ -415,10 +416,6 @@ typedef struct { int prach_I0; } PHY_MEASUREMENTS_gNB; - -#define MAX_NUM_NR_RX_RACH_PDUS 4 -#define MAX_UL_PDUS_PER_SLOT 8 -#define MAX_NUM_NR_SRS_PDUS 8 // the current RRC resource allocation is that each UE gets its // "own" PUCCH resource (for F0) in a dedicated PRB in each slot // therefore, we can have up to "number of UE" UCI PDUs @@ -443,22 +440,9 @@ typedef struct PHY_VARS_gNB_s { NR_DL_FRAME_PARMS frame_parms; PHY_MEASUREMENTS_gNB measurements; NR_IF_Module_t *if_inst; - NR_UL_IND_t UL_INFO; - - /// NFAPI RX ULSCH information - nfapi_nr_rx_data_pdu_t rx_pdu_list[MAX_UL_PDUS_PER_SLOT]; - /// NFAPI RX ULSCH CRC information - nfapi_nr_crc_t crc_pdu_list[MAX_UL_PDUS_PER_SLOT]; - /// NFAPI SRS information - nfapi_nr_srs_indication_pdu_t srs_pdu_list[MAX_NUM_NR_SRS_PDUS]; - /// NFAPI UCI information - nfapi_nr_uci_t uci_pdu_list[MAX_NUM_NR_UCI_PDUS]; - /// NFAPI PRACH information - nfapi_nr_prach_indication_pdu_t prach_pdu_indication_list[MAX_NUM_NR_RX_RACH_PDUS]; nfapi_nr_ul_tti_request_t UL_tti_req; - nfapi_nr_uci_indication_t uci_indication; - + int max_nb_pucch; int max_nb_srs; int max_nb_pdsch; diff --git a/openair1/SCHED_NR/fapi_nr_l1.h b/openair1/SCHED_NR/fapi_nr_l1.h index 28a6d84b9f..59df4fb30d 100644 --- a/openair1/SCHED_NR/fapi_nr_l1.h +++ b/openair1/SCHED_NR/fapi_nr_l1.h @@ -53,8 +53,15 @@ void handle_nr_nfapi_pdsch_pdu(processingData_L1tx_t *msgTx, nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu, uint8_t *sdu); - -void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int UE_id, uint8_t harq_pid, uint8_t crc_flag,int dtx_flag); +void nr_fill_indication(PHY_VARS_gNB *gNB, + int frame, + int slot_rx, + int UE_id, + uint8_t harq_pid, + uint8_t crc_flag, + int dtx_flag, + nfapi_nr_crc_t *crc, + nfapi_nr_rx_data_pdu_t *pdu); //added void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB, diff --git a/openair1/SCHED_NR/nr_prach_procedures.c b/openair1/SCHED_NR/nr_prach_procedures.c index 280a39c371..75c8ae56c9 100644 --- a/openair1/SCHED_NR/nr_prach_procedures.c +++ b/openair1/SCHED_NR/nr_prach_procedures.c @@ -98,22 +98,19 @@ uint8_t get_nr_prach_duration(uint8_t prach_format){ } } -void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) { - +void L1_nr_prach_procedures(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_rach_indication_t *rach_ind) +{ uint16_t max_preamble[4]={0},max_preamble_energy[4]={0},max_preamble_delay[4]={0}; - - uint8_t pdu_index = 0; RU_t *ru; int aa=0; int ru_aa; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,1); - gNB->UL_INFO.rach_ind.sfn = frame; - gNB->UL_INFO.rach_ind.slot = slot; - gNB->UL_INFO.rach_ind.pdu_list = gNB->prach_pdu_indication_list; - gNB->UL_INFO.rach_ind.number_of_pdus = 0; + rach_ind->sfn = frame; + rach_ind->slot = slot; + rach_ind->number_of_pdus = 0; ru=gNB->RU_list[0]; @@ -152,7 +149,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) { gNB->prach_energy_counter); if ((gNB->prach_energy_counter == 100) && (max_preamble_energy[0] > gNB->measurements.prach_I0 + gNB->prach_thres) - && (pdu_index < MAX_NUM_NR_RX_RACH_PDUS)) { + && (rach_ind->number_of_pdus < MAX_NUM_NR_RX_RACH_PDUS)) { LOG_A(NR_PHY, "[RAPROC] %d.%d Initiating RA procedure with preamble %d, energy %d.%d dB (I0 %d, thres %d), delay %d start symbol " "%u freq index %u\n", @@ -175,9 +172,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) { T_INT(max_preamble_energy[0]), T_INT(max_preamble_delay[0])); - gNB->UL_INFO.rach_ind.number_of_pdus += 1; - - nfapi_nr_prach_indication_pdu_t *ind = &gNB->prach_pdu_indication_list[pdu_index]; + nfapi_nr_prach_indication_pdu_t *ind = rach_ind->pdu_list + rach_ind->number_of_pdus; ind->phy_cell_id = gNB->gNB_config.cell_config.phy_cell_id.value; ind->symbol_index = prachStartSymbol; ind->slot_index = slot; @@ -189,7 +184,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) { ind->preamble_list[0].preamble_index = max_preamble[0]; ind->preamble_list[0].timing_advance = max_preamble_delay[0]; ind->preamble_list[0].preamble_pwr = 0xffffffff; - pdu_index++; + rach_ind->number_of_pdus++; } gNB->measurements.prach_I0 = ((gNB->measurements.prach_I0*900)>>10) + ((max_preamble_energy[0]*124)>>10); if (frame==0) LOG_I(PHY,"prach_I0 = %d.%d dB\n",gNB->measurements.prach_I0/10,gNB->measurements.prach_I0%10); @@ -198,4 +193,3 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) { } //for NUMBER_OF_NR_PRACH_OCCASION_MAX VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,0); } - diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 26251506c7..8b78cd579b 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -305,7 +305,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX + gNB->CC_id, 0); } -static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, bool *ulsch_to_decode) +static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, bool *ulsch_to_decode, NR_UL_IND_t *UL_INFO) { NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; @@ -374,8 +374,7 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo //--------------------- ULSCH decoding --------------------- //---------------------------------------------------------- - int ret_nr_ulsch_decoding = - nr_ulsch_decoding(gNB, frame_parms, frame_rx, slot_rx, G, ULSCH_ids, nb_pusch); + int ret_nr_ulsch_decoding = nr_ulsch_decoding(gNB, frame_parms, frame_rx, slot_rx, G, ULSCH_ids, nb_pusch); // CRC check per uplink shared channel for (pusch_id = 0; pusch_id < nb_pusch; pusch_id++) { @@ -398,6 +397,8 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo } } + nfapi_nr_crc_t *crc = &UL_INFO->crc_ind.crc_list[UL_INFO->crc_ind.number_crcs++]; + nfapi_nr_rx_data_pdu_t *pdu = &UL_INFO->rx_ind.pdu_list[UL_INFO->rx_ind.number_of_pdus++]; if (crc_valid && !check_abort(&ulsch_harq->abort_decode) && !pusch->DTX) { LOG_D(NR_PHY, "[gNB %d] ULSCH %d: Setting ACK for SFN/SF %d.%d (rnti %x, pid %d, ndi %d, status %d, round %d, TBS %d, Max interation " @@ -413,7 +414,7 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo ulsch_harq->round, ulsch_harq->TBS, ulsch->max_ldpc_iterations); - nr_fill_indication(gNB, ulsch->frame, ulsch->slot, ULSCH_id, ulsch->harq_pid, 0, 0); + nr_fill_indication(gNB, ulsch->frame, ulsch->slot, ULSCH_id, ulsch->harq_pid, 0, 0, crc, pdu); LOG_D(PHY, "ULSCH received ok \n"); ulsch->active = false; ulsch_harq->round = 0; @@ -433,7 +434,7 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo ulsch_harq->ulsch_pdu.rb_start, ulsch_harq->ulsch_pdu.rb_size, ulsch_harq->TBS); - nr_fill_indication(gNB, ulsch->frame, ulsch->slot, ULSCH_id, ulsch->harq_pid, 1, 0); + nr_fill_indication(gNB, ulsch->frame, ulsch->slot, ULSCH_id, ulsch->harq_pid, 1, 0, crc, pdu); ulsch->handled = 1; LOG_D(PHY, "ULSCH %d in error\n",ULSCH_id); ulsch->last_iteration_cnt = ulsch->max_ldpc_iterations + 1; // Setting to max_ldpc_iterations + 1 is sufficient given that this variable is only used for checking for failure @@ -443,7 +444,15 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo return ret_nr_ulsch_decoding; } -void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id, uint8_t harq_pid, uint8_t crc_flag, int dtx_flag) +void nr_fill_indication(PHY_VARS_gNB *gNB, + int frame, + int slot_rx, + int ULSCH_id, + uint8_t harq_pid, + uint8_t crc_flag, + int dtx_flag, + nfapi_nr_crc_t *crc, + nfapi_nr_rx_data_pdu_t *pdu) { NR_gNB_ULSCH_t *ulsch = &gNB->ulsch[ULSCH_id]; NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_process; @@ -499,54 +508,29 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id, else if (SNRtimes10 > 635) cqi=255; else cqi=(640+SNRtimes10)/5; - // multiple threads might call this function at the same time, or while the - // L2 reads the messages. Hence, if not protected, crc and rx indications - // might not appear pairwise (in the same order) in the same slot, or even in - // separate slots. The L2 does not support this; hence, use the crc_rx_mutex - // to ensure that messages are pairwise. - int rc = pthread_mutex_lock(&gNB->UL_INFO.crc_rx_mutex); - DevAssert(rc == 0); - - // crc indication - uint16_t num_crc = gNB->UL_INFO.crc_ind.number_crcs; - gNB->UL_INFO.crc_ind.crc_list = &gNB->crc_pdu_list[0]; - gNB->UL_INFO.crc_ind.sfn = frame; - gNB->UL_INFO.crc_ind.slot = slot_rx; - - gNB->crc_pdu_list[num_crc].handle = pusch_pdu->handle; - gNB->crc_pdu_list[num_crc].rnti = pusch_pdu->rnti; - gNB->crc_pdu_list[num_crc].harq_id = harq_pid; - gNB->crc_pdu_list[num_crc].tb_crc_status = crc_flag; - gNB->crc_pdu_list[num_crc].num_cb = pusch_pdu->pusch_data.num_cb; - gNB->crc_pdu_list[num_crc].ul_cqi = cqi; - gNB->crc_pdu_list[num_crc].timing_advance = timing_advance_update; + crc->handle = pusch_pdu->handle; + crc->rnti = pusch_pdu->rnti; + crc->harq_id = harq_pid; + crc->tb_crc_status = crc_flag; + crc->num_cb = pusch_pdu->pusch_data.num_cb; + crc->ul_cqi = cqi; + crc->timing_advance = timing_advance_update; // in terms of dBFS range -128 to 0 with 0.1 step - gNB->crc_pdu_list[num_crc].rssi = + crc->rssi = (dtx_flag == 0) ? 1280 - (10 * dB_fixed(32767 * 32767) - dB_fixed_times10(gNB->pusch_vars[ULSCH_id].ulsch_power[0])) : 0; - gNB->UL_INFO.crc_ind.number_crcs++; - - // rx indication - uint16_t num_rx = gNB->UL_INFO.rx_ind.number_of_pdus; - gNB->UL_INFO.rx_ind.pdu_list = &gNB->rx_pdu_list[0]; - gNB->UL_INFO.rx_ind.sfn = frame; - gNB->UL_INFO.rx_ind.slot = slot_rx; - gNB->rx_pdu_list[num_rx].handle = pusch_pdu->handle; - gNB->rx_pdu_list[num_rx].rnti = pusch_pdu->rnti; - gNB->rx_pdu_list[num_rx].harq_id = harq_pid; - gNB->rx_pdu_list[num_rx].ul_cqi = cqi; - gNB->rx_pdu_list[num_rx].timing_advance = timing_advance_update; - gNB->rx_pdu_list[num_rx].rssi = gNB->crc_pdu_list[num_crc].rssi; + pdu->handle = pusch_pdu->handle; + pdu->rnti = pusch_pdu->rnti; + pdu->harq_id = harq_pid; + pdu->ul_cqi = cqi; + pdu->timing_advance = timing_advance_update; + pdu->rssi = crc->rssi; if (crc_flag) - gNB->rx_pdu_list[num_rx].pdu_length = 0; + pdu->pdu_length = 0; else { - gNB->rx_pdu_list[num_rx].pdu_length = harq_process->TBS; - gNB->rx_pdu_list[num_rx].pdu = harq_process->b; + pdu->pdu_length = harq_process->TBS; + pdu->pdu = harq_process->b; } - gNB->UL_INFO.rx_ind.number_of_pdus++; - - rc = pthread_mutex_unlock(&gNB->UL_INFO.crc_rx_mutex); - DevAssert(rc == 0); } // Function to fill UL RB mask to be used for N0 measurements @@ -715,7 +699,7 @@ int check_srs_pdu(const nfapi_nr_srs_pdu_t *srs_pdu, nfapi_nr_srs_pdu_t *saved_s return 0; } -int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) +int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, NR_UL_IND_t *UL_INFO) { /* those variables to log T_GNB_PHY_PUCCH_PUSCH_IQ only when we try to decode */ int pucch_decode_done = 0; @@ -752,51 +736,55 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) c16_t **rxdataF = gNB->common_vars.rxdataF[pucch->beam_nb]; pucch_decode_done = 1; nfapi_nr_pucch_pdu_t *pucch_pdu = &pucch->pucch_pdu; - uint16_t num_ucis; + UL_INFO->uci_ind.uci_list = UL_INFO->uci_pdu_list; + nfapi_nr_uci_t *uci = UL_INFO->uci_ind.uci_list + UL_INFO->uci_ind.num_ucis; switch (pucch_pdu->format_type) { - case 0: - num_ucis = gNB->UL_INFO.uci_ind.num_ucis; - gNB->UL_INFO.uci_ind.uci_list = &gNB->uci_pdu_list[0]; - gNB->UL_INFO.uci_ind.sfn = frame_rx; - gNB->UL_INFO.uci_ind.slot = slot_rx; - gNB->uci_pdu_list[num_ucis].pdu_type = NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE; - gNB->uci_pdu_list[num_ucis].pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_0_1_t); - nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu_format0 = &gNB->uci_pdu_list[num_ucis].pucch_pdu_format_0_1; + case 0: + UL_INFO->uci_ind.sfn = frame_rx; + UL_INFO->uci_ind.slot = slot_rx; + uci->pdu_type = NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE; + uci->pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_0_1_t); + nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu_format0 = &uci->pucch_pdu_format_0_1; - int offset = pucch_pdu->start_symbol_index*gNB->frame_parms.ofdm_symbol_size + (gNB->frame_parms.first_carrier_offset+pucch_pdu->prb_start*12); - LOG_D(NR_PHY, - "frame %d, slot %d: PUCCH signal energy %d\n", - frame_rx, - slot_rx, - signal_energy_nodc(&rxdataF[0][soffset + offset], 12)); + int offset = pucch_pdu->start_symbol_index * gNB->frame_parms.ofdm_symbol_size + + (gNB->frame_parms.first_carrier_offset + pucch_pdu->prb_start * 12); + LOG_D(NR_PHY, + "frame %d, slot %d: PUCCH signal energy %d\n", + frame_rx, + slot_rx, + signal_energy_nodc(&rxdataF[0][soffset + offset], 12)); - nr_decode_pucch0(gNB, rxdataF, frame_rx, slot_rx, uci_pdu_format0, pucch_pdu); + nr_decode_pucch0(gNB, rxdataF, frame_rx, slot_rx, uci_pdu_format0, pucch_pdu); - gNB->UL_INFO.uci_ind.num_ucis += 1; - pucch->active = false; - break; - case 2: - num_ucis = gNB->UL_INFO.uci_ind.num_ucis; - gNB->UL_INFO.uci_ind.uci_list = &gNB->uci_pdu_list[0]; - gNB->UL_INFO.uci_ind.sfn = frame_rx; - gNB->UL_INFO.uci_ind.slot = slot_rx; - gNB->uci_pdu_list[num_ucis].pdu_type = NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE; - gNB->uci_pdu_list[num_ucis].pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_2_3_4_t); - nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu_format2 = &gNB->uci_pdu_list[num_ucis].pucch_pdu_format_2_3_4; + UL_INFO->uci_ind.num_ucis += 1; + pucch->active = false; + break; + case 2: + UL_INFO->uci_ind.sfn = frame_rx; + UL_INFO->uci_ind.slot = slot_rx; + uci->pdu_type = NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE; + uci->pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_2_3_4_t); + nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu_format2 = &uci->pucch_pdu_format_2_3_4; - LOG_D(PHY, "%d.%d Calling nr_decode_pucch2\n", frame_rx, slot_rx); - nr_decode_pucch2(gNB, rxdataF, frame_rx, slot_rx, uci_pdu_format2, pucch_pdu); + LOG_D(PHY, "%d.%d Calling nr_decode_pucch2\n", frame_rx, slot_rx); + nr_decode_pucch2(gNB, rxdataF, frame_rx, slot_rx, uci_pdu_format2, pucch_pdu); - gNB->UL_INFO.uci_ind.num_ucis += 1; - pucch->active = false; - break; - default: - AssertFatal(1 == 0, "Only PUCCH formats 0 and 2 are currently supported\n"); + UL_INFO->uci_ind.num_ucis += 1; + pucch->active = false; + break; + default: + AssertFatal(1 == 0, "Only PUCCH formats 0 and 2 are currently supported\n"); } } } } + UL_INFO->crc_ind.sfn = frame_rx; + UL_INFO->crc_ind.slot = slot_rx; + UL_INFO->crc_ind.crc_list = UL_INFO->crc_pdu_list; + UL_INFO->rx_ind.sfn = frame_rx; + UL_INFO->rx_ind.slot = slot_rx; + UL_INFO->rx_ind.pdu_list = UL_INFO->rx_pdu_list; bool ulsch_to_decode[gNB->max_nb_pusch]; bzero((void *)ulsch_to_decode, sizeof(ulsch_to_decode)); for (int ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) { @@ -875,7 +863,9 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) if (!get_softmodem_params()->phy_test) { /* in case of phy_test mode, we still want to decode to measure execution time. Therefore, we don't yet call nr_fill_indication, it will be called later */ - nr_fill_indication(gNB, frame_rx, slot_rx, ULSCH_id, ulsch->harq_pid, 1, 1); + nfapi_nr_crc_t *crc = &UL_INFO->crc_ind.crc_list[UL_INFO->crc_ind.number_crcs++]; + nfapi_nr_rx_data_pdu_t *pdu = &UL_INFO->rx_ind.pdu_list[UL_INFO->rx_ind.number_of_pdus++]; + nr_fill_indication(gNB, frame_rx, slot_rx, ULSCH_id, ulsch->harq_pid, 1, 1, crc, pdu); pusch_DTX++; continue; } @@ -905,7 +895,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) if (gNB->max_nb_pusch == 1) start_meas(&gNB->ulsch_decoding_stats); - int const ret_nr_ulsch_procedures = nr_ulsch_procedures(gNB, frame_rx, slot_rx, ulsch_to_decode); + int const ret_nr_ulsch_procedures = nr_ulsch_procedures(gNB, frame_rx, slot_rx, ulsch_to_decode, UL_INFO); if (ret_nr_ulsch_procedures != 0) { LOG_E(PHY,"Error in nr_ulsch_procedures, returned %d\n",ret_nr_ulsch_procedures); } @@ -980,11 +970,12 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) T_INT(0), T_BUFFER(srs_estimated_channel_time_shifted[0][0], frame_parms->ofdm_symbol_size * sizeof(int32_t))); - gNB->UL_INFO.srs_ind.pdu_list = &gNB->srs_pdu_list[0]; - gNB->UL_INFO.srs_ind.sfn = frame_rx; - gNB->UL_INFO.srs_ind.slot = slot_rx; + UL_INFO->srs_ind.sfn = frame_rx; + UL_INFO->srs_ind.slot = slot_rx; - nfapi_nr_srs_indication_pdu_t *srs_indication = &gNB->srs_pdu_list[gNB->UL_INFO.srs_ind.number_of_pdus]; + // data model difficult to understand, nfapi do malloc for this pointer + UL_INFO->srs_ind.pdu_list = UL_INFO->srs_pdu_list; + nfapi_nr_srs_indication_pdu_t *srs_indication = UL_INFO->srs_pdu_list + UL_INFO->srs_ind.number_of_pdus++; srs_indication->handle = srs_pdu->handle; srs_indication->rnti = srs_pdu->rnti; start_meas(&gNB->srs_timing_advance_stats); @@ -1013,8 +1004,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) srs_indication->report_type = srs_pdu->srs_parameters_v4.report_type[0]; #ifdef SRS_IND_DEBUG - LOG_I(NR_PHY, "gNB->UL_INFO.srs_ind.sfn = %i\n", gNB->UL_INFO.srs_ind.sfn); - LOG_I(NR_PHY, "gNB->UL_INFO.srs_ind.slot = %i\n", gNB->UL_INFO.srs_ind.slot); + LOG_I(NR_PHY, "UL_INFO->srs_ind.sfn = %i\n", UL_INFO->srs_ind.sfn); + LOG_I(NR_PHY, "UL_INFO->srs_ind.slot = %i\n", UL_INFO->srs_ind.slot); LOG_I(NR_PHY, "srs_indication->rnti = %04x\n", srs_indication->rnti); LOG_I(NR_PHY, "srs_indication->timing_advance = %i\n", srs_indication->timing_advance_offset); LOG_I(NR_PHY, "srs_indication->timing_advance_offset_nsec = %i\n", srs_indication->timing_advance_offset_nsec); @@ -1124,10 +1115,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) LOG_I(NR_PHY, "value[%i] = 0x%02x\n", b, value[b] & 0xFF); } #endif - - gNB->UL_INFO.srs_ind.number_of_pdus += 1; srs->active = false; - stop_meas(&gNB->rx_srs_stats); } } diff --git a/openair1/SCHED_NR/sched_nr.h b/openair1/SCHED_NR/sched_nr.h index 20028cea9f..bf5a1eda3f 100644 --- a/openair1/SCHED_NR/sched_nr.h +++ b/openair1/SCHED_NR/sched_nr.h @@ -34,8 +34,8 @@ void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME_PARMS *fp); void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, int frame_tx, int slot_tx, int do_meas); -int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); -void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot); +int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, NR_UL_IND_t *UL_INFO); +void L1_nr_prach_procedures(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_rach_indication_t *rach_ind); void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu); void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx); void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa); diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index e2802feffd..3c717a68c4 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -575,7 +575,6 @@ int main(int argc, char **argv) printf("\n"); exit(-1); #endif - nr_ulsch_decoding(gNB, frame_parms, frame, subframe, &G, &UE_id, 1); bool crc_valid = check_crc(harq_process_gNB->b, lenWithCrc(1, (harq_process_gNB->TBS) << 3), crcType(1, (harq_process_gNB->TBS) << 3)); if (!crc_valid) { diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index bdeab5a139..c704e26fb6 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -602,11 +602,11 @@ int main(int argc, char *argv[]) gNB->msgDataTx = msgDataTx; //gNB_config = &gNB->gNB_config; - //memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO)); - gNB->UL_INFO.rx_ind.pdu_list = (nfapi_nr_rx_data_pdu_t *)malloc(NB_UE_INST*sizeof(nfapi_nr_rx_data_pdu_t)); - gNB->UL_INFO.crc_ind.crc_list = (nfapi_nr_crc_t *)malloc(NB_UE_INST*sizeof(nfapi_nr_crc_t)); - gNB->UL_INFO.rx_ind.number_of_pdus = 0; - gNB->UL_INFO.crc_ind.number_crcs = 0; + NR_UL_IND_t UL_INFO = {0}; + UL_INFO.crc_ind.crc_list = UL_INFO.crc_pdu_list; + UL_INFO.rx_ind.pdu_list = UL_INFO.rx_pdu_list; + UL_INFO.rx_ind.number_of_pdus = 0; + UL_INFO.crc_ind.number_crcs = 0; gNB->max_ldpc_iterations = max_ldpc_iterations; gNB->pusch_thres = -20; frame_parms = &gNB->frame_parms; //to be initialized I suppose (maybe not necessary for PBCH) @@ -1256,9 +1256,9 @@ int main(int argc, char *argv[]) //---------------------------------------------------------- //------------------- gNB phy procedures ------------------- //---------------------------------------------------------- - gNB->UL_INFO.rx_ind.number_of_pdus = 0; - gNB->UL_INFO.crc_ind.number_crcs = 0; - gNB->UL_INFO.srs_ind.number_of_pdus = 0; + UL_INFO.rx_ind.number_of_pdus = 0; + UL_INFO.crc_ind.number_crcs = 0; + UL_INFO.srs_ind.number_of_pdus = 0; for(uint8_t symbol = 0; symbol < (gNB->frame_parms.Ncp == EXTENDED ? 12 : 14); symbol++) { for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) @@ -1281,7 +1281,7 @@ int main(int argc, char *argv[]) gNB->frame_parms.Ncp == EXTENDED ? 12 : 14); } - ul_proc_error = phy_procedures_gNB_uespec_RX(gNB, frame, slot); + ul_proc_error = phy_procedures_gNB_uespec_RX(gNB, frame, slot, &UL_INFO); if (n_trials == 1 && round == 0) { LOG_M("rxsig0.m", "rx0", &rxdata[0][slot_offset], slot_length, 1, 1); diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c index 507e4191d0..19d1bb37ec 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c @@ -62,8 +62,7 @@ extern int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind); extern int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind); extern uint8_t nfapi_mode; - -void handle_nr_rach(NR_UL_IND_t *UL_info) +static void handle_nr_rach(NR_UL_IND_t *UL_info) { if (NFAPI_MODE == NFAPI_MODE_PNF) { if (UL_info->rach_ind.number_of_pdus > 0) { @@ -73,34 +72,39 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) } return; } + if (UL_info->rach_ind.number_of_pdus) { + int frame_diff = UL_info->frame - UL_info->rach_ind.sfn; + if (frame_diff < 0) { + frame_diff += 1024; + } + bool in_timewindow = frame_diff == 0 || (frame_diff == 1 && UL_info->slot < 7); - int frame_diff = UL_info->frame - UL_info->rach_ind.sfn; - if (frame_diff < 0) { - frame_diff += 1024; - } - bool in_timewindow = frame_diff == 0 || (frame_diff == 1 && UL_info->slot < 7); - - if (UL_info->rach_ind.number_of_pdus > 0 && in_timewindow) { - LOG_D(MAC,"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n", - UL_info->frame, UL_info->slot, UL_info->rach_ind.sfn, UL_info->rach_ind.slot); - for (int i = 0; i < UL_info->rach_ind.number_of_pdus; i++) { - if (UL_info->rach_ind.pdu_list[i].num_preamble > 1) { - LOG_E(MAC, "Not more than 1 preamble per RACH PDU supported, ignoring the rest\n"); + if (in_timewindow) { + LOG_D(MAC, + "UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n", + UL_info->frame, + UL_info->slot, + UL_info->rach_ind.sfn, + UL_info->rach_ind.slot); + for (int i = 0; i < UL_info->rach_ind.number_of_pdus; i++) { + nfapi_nr_prach_indication_pdu_t *rach = UL_info->rach_ind.pdu_list + i; + if (rach->num_preamble > 1) { + LOG_E(MAC, "Not more than 1 preamble per RACH PDU supported, ignoring the rest\n"); + } + nr_initiate_ra_proc(UL_info->module_id, + UL_info->CC_id, + UL_info->rach_ind.sfn, + UL_info->rach_ind.slot, + rach->preamble_list[0].preamble_index, + rach->freq_index, + rach->symbol_index, + rach->preamble_list[0].timing_advance); } - nr_initiate_ra_proc(UL_info->module_id, - UL_info->CC_id, - UL_info->rach_ind.sfn, - UL_info->rach_ind.slot, - UL_info->rach_ind.pdu_list[i].preamble_list[0].preamble_index, - UL_info->rach_ind.pdu_list[i].freq_index, - UL_info->rach_ind.pdu_list[i].symbol_index, - UL_info->rach_ind.pdu_list[i].preamble_list[0].timing_advance); } } } - -void handle_nr_uci(NR_UL_IND_t *UL_info) +static void handle_nr_uci(NR_UL_IND_t *UL_info) { if(NFAPI_MODE == NFAPI_MODE_PNF) { if (UL_info->uci_ind.num_ucis > 0) { @@ -161,7 +165,7 @@ static bool crc_sfn_slot_matcher(void *wanted, void *candidate) return false; } -void handle_nr_ulsch(NR_UL_IND_t *UL_info) +static void handle_nr_ulsch(NR_UL_IND_t *UL_info) { if(NFAPI_MODE == NFAPI_MODE_PNF) { if (UL_info->crc_ind.number_crcs > 0) { @@ -179,9 +183,6 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info) } if (UL_info->rx_ind.number_of_pdus > 0 && UL_info->crc_ind.number_crcs > 0) { - // see nr_fill_indication about why this mutex is necessary - int rc = pthread_mutex_lock(&UL_info->crc_rx_mutex); - DevAssert(rc == 0); AssertFatal(UL_info->rx_ind.number_of_pdus == UL_info->crc_ind.number_crcs, "number_of_pdus %d, number_crcs %d\n", UL_info->rx_ind.number_of_pdus, UL_info->crc_ind.number_crcs); @@ -191,12 +192,12 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info) LOG_D(NR_PHY, "UL_info->crc_ind.pdu_list[%d].rnti:%04x " "UL_info->rx_ind.pdu_list[%d].rnti:%04x\n", i, crc->rnti, i, rx->rnti); + AssertFatal(crc->rnti == rx->rnti, "mis-match between CRC RNTI %04x and RX RNTI %04x\n", crc->rnti, rx->rnti); - AssertFatal(crc->rnti == rx->rnti, "mis-match between CRC RNTI %04x and RX RNTI %04x\n", - crc->rnti, rx->rnti); - - AssertFatal(crc->harq_id == rx->harq_id, "mis-match between CRC HARQ ID %04x and RX HARQ ID %04x\n", - crc->harq_id, rx->harq_id); + AssertFatal(crc->harq_id == rx->harq_id, + "mis-match between CRC HARQ ID %04x and RX HARQ ID %04x\n", + crc->harq_id, + rx->harq_id); LOG_D(NR_MAC, "%4d.%2d Calling rx_sdu (CRC %s/tb_crc_status %d)\n", @@ -221,13 +222,11 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info) } UL_info->rx_ind.number_of_pdus = 0; UL_info->crc_ind.number_crcs = 0; - rc = pthread_mutex_unlock(&UL_info->crc_rx_mutex); - DevAssert(rc == 0); } } -void handle_nr_srs(NR_UL_IND_t *UL_info) { - +static void handle_nr_srs(NR_UL_IND_t *UL_info) +{ if(NFAPI_MODE == NFAPI_MODE_PNF) { if (UL_info->srs_ind.number_of_pdus > 0) { LOG_D(PHY,"PNF Sending UL_info->srs_ind.number_of_pdus: %d, SFN/SF:%d.%d \n", diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.h b/openair2/NR_PHY_INTERFACE/NR_IF_Module.h index 261ead1ba0..ce6acffc2c 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.h +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.h @@ -37,6 +37,9 @@ #include #include "assertions.h" #include "nfapi_nr_interface_scf.h" +#include "common/platform_constants.h" +#include "common/platform_types.h" +#include "common/openairinterface5g_limits.h" #define MAX_NUM_DL_PDU 100 #define MAX_NUM_UL_PDU 100 @@ -50,6 +53,10 @@ #define MAX_NUM_RACH_IND 100 #define MAX_NUM_SRS_IND 100 +#define MAX_NUM_NR_RX_RACH_PDUS 4 +#define MAX_UL_PDUS_PER_SLOT 8 +#define MAX_NUM_NR_SRS_PDUS 8 +#define MAX_NUM_NR_UCI_PDUS MAX_MOBILES_PER_GNB typedef struct { /// Module ID module_id_t module_id; @@ -64,10 +71,6 @@ typedef struct { nfapi_nr_crc_indication_t crc_ind; /// RX indication nfapi_nr_rx_data_indication_t rx_ind; - /// mutex to protect concurrent access to crc_ind and rx_ind, which the L2 - /// needs to be pairwise - pthread_mutex_t crc_rx_mutex; - /// RACH indication list nfapi_nr_rach_indication_t rach_ind; @@ -76,6 +79,12 @@ typedef struct { /// UCI indication nfapi_nr_uci_indication_t uci_ind; + nfapi_nr_crc_t crc_pdu_list[MAX_UL_PDUS_PER_SLOT]; + nfapi_nr_rx_data_pdu_t rx_pdu_list[MAX_UL_PDUS_PER_SLOT]; + nfapi_nr_srs_indication_pdu_t srs_pdu_list[MAX_NUM_NR_SRS_PDUS]; + nfapi_nr_uci_t uci_pdu_list[MAX_NUM_NR_UCI_PDUS]; + /// NFAPI PRACH information + nfapi_nr_prach_indication_pdu_t prach_pdu_indication_list[MAX_NUM_NR_RX_RACH_PDUS]; } NR_UL_IND_t; From 9d9902d8837d5dd35b409910e1d70e848e4098d9 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 6 Jan 2025 15:21:48 +0100 Subject: [PATCH 54/54] apply ITTI queue to SIB19 --- .../SIMULATION/NR_PHY/nr_dummy_functions.c | 4 +- openair2/COMMON/rrc_messages_def.h | 1 + openair2/COMMON/rrc_messages_types.h | 4 ++ openair2/LAYER2/NR_MAC_UE/config_ue.c | 58 ++++++++++--------- openair2/LAYER2/NR_MAC_UE/mac_proto.h | 2 +- openair2/RRC/NR_UE/L2_interface_ue.c | 3 + openair2/RRC/NR_UE/rrc_UE.c | 23 ++++---- openair2/RRC/NR_UE/rrc_defs.h | 5 -- 8 files changed, 54 insertions(+), 46 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c index 2d64de91e0..ba5c2bf025 100644 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c +++ b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c @@ -3,7 +3,7 @@ #include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" #include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h" #include "openair1/PHY/defs_nr_UE.h" - +#include "position_interface.h" int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return (0); } int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) { return (0); } @@ -19,7 +19,7 @@ int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; } int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; } int unpack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; } - +void get_position_coordinates(int Mod_id, position_t *position) {} int32_t get_uldl_offset(int nr_bandP) { return (0); } void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) {} diff --git a/openair2/COMMON/rrc_messages_def.h b/openair2/COMMON/rrc_messages_def.h index 81359f8a64..cb4805ff5e 100644 --- a/openair2/COMMON/rrc_messages_def.h +++ b/openair2/COMMON/rrc_messages_def.h @@ -87,6 +87,7 @@ MESSAGE_DEF(NR_MAC_RRC_CONFIG_RESET, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_res MESSAGE_DEF(NR_MAC_RRC_CONFIG_CG, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_cg_t, nr_mac_rrc_config_cg) MESSAGE_DEF(NR_MAC_RRC_CONFIG_MIB, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_mib_t, nr_mac_rrc_config_mib) MESSAGE_DEF(NR_MAC_RRC_CONFIG_SIB1, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_sib1_t, nr_mac_rrc_config_sib1) +MESSAGE_DEF(NR_MAC_RRC_CONFIG_OTHER_SIB, MESSAGE_PRIORITY_MED, nr_mac_rrc_config_other_sib_t, nr_mac_rrc_config_other_sib) // eNB: RLC -> RRC messages MESSAGE_DEF(RLC_SDU_INDICATION, MESSAGE_PRIORITY_MED, RlcSduIndication, rlc_sdu_indication) diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 6343cd998f..7eba8f3467 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -100,6 +100,7 @@ #define NR_MAC_RRC_CONFIG_CG(mSGpTR) (mSGpTR)->ittiMsg.nr_mac_rrc_config_cg #define NR_MAC_RRC_CONFIG_MIB(mSGpTR) (mSGpTR)->ittiMsg.nr_mac_rrc_config_mib #define NR_MAC_RRC_CONFIG_SIB1(mSGpTR) (mSGpTR)->ittiMsg.nr_mac_rrc_config_sib1 +#define NR_MAC_RRC_CONFIG_OTHER_SIB(mSGpTR) (mSGpTR)->ittiMsg.nr_mac_rrc_config_other_sib #define NR_RRC_RLC_MAXRTX(mSGpTR) (mSGpTR)->ittiMsg.nr_rlc_maxrtx_indication @@ -477,5 +478,8 @@ typedef struct { typedef struct { NR_SIB1_t *sib1; } nr_mac_rrc_config_sib1_t; +typedef struct { + NR_SIB19_r17_t *sib19; +} nr_mac_rrc_config_other_sib_t; #endif /* RRC_MESSAGES_TYPES_H_ */ diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index c557cd36f3..ee81d2a95d 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -1751,7 +1751,7 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id, int cc_idP, NR_SIB1_t *si } // computes delay between ue and sat based on SIB19 ephemeris data -static double calculate_ue_sat_ta(const position_t *position_params, struct NR_PositionVelocity_r17 *sat_pos) +static double calculate_ue_sat_ta(const position_t *position_params, NR_PositionVelocity_r17_t *sat_pos) { // get UE position coordinates double posx = position_params->positionX; @@ -1770,39 +1770,45 @@ static double calculate_ue_sat_ta(const position_t *position_params, struct NR_P return ta_ms; } -void nr_rrc_mac_config_req_sib19_r17(module_id_t module_id, const position_t *pos, NR_SIB19_r17_t *sib19_r17) +void nr_rrc_mac_config_other_sib(module_id_t module_id, NR_SIB19_r17_t *sib19) { NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); int ret = pthread_mutex_lock(&mac->if_mutex); AssertFatal(!ret, "mutex failed %d\n", ret); - // update ntn_Config_r17 with received values - struct NR_NTN_Config_r17 *ntn_Config_r17 = mac->sc_info.ntn_Config_r17; - UPDATE_IE(ntn_Config_r17, sib19_r17->ntn_Config_r17, NR_NTN_Config_r17_t); + if (sib19) { + // update ntn_Config_r17 with received values + NR_NTN_Config_r17_t *ntn_Config_r17 = mac->sc_info.ntn_Config_r17; + UPDATE_IE(ntn_Config_r17, sib19->ntn_Config_r17, NR_NTN_Config_r17_t); - // populate ntn_ta structure from mac - // if ephemerisInfo_r17 present in SIB19 - struct NR_EphemerisInfo_r17 *ephemeris_info = ntn_Config_r17->ephemerisInfo_r17; - if (ephemeris_info) { - struct NR_PositionVelocity_r17 *position_velocity = ephemeris_info->choice.positionVelocity_r17; - if (position_velocity - && (position_velocity->positionX_r17 != 0 || position_velocity->positionY_r17 != 0 - || position_velocity->positionZ_r17 != 0)) { - mac->ntn_ta.N_UE_TA_adj = calculate_ue_sat_ta(pos, position_velocity); + position_t position_params = {0}; + get_position_coordinates(module_id, &position_params); + + // populate ntn_ta structure from mac + // if ephemerisInfo_r17 present in SIB19 + NR_EphemerisInfo_r17_t *ephemeris_info = ntn_Config_r17->ephemerisInfo_r17; + if (ephemeris_info) { + NR_PositionVelocity_r17_t *position_velocity = ephemeris_info->choice.positionVelocity_r17; + if (position_velocity + && (position_velocity->positionX_r17 != 0 + || position_velocity->positionY_r17 != 0 + || position_velocity->positionZ_r17 != 0)) { + mac->ntn_ta.N_UE_TA_adj = calculate_ue_sat_ta(&position_params, position_velocity); + } } + // if cellSpecificKoffset_r17 is present + if (ntn_Config_r17->cellSpecificKoffset_r17) { + mac->ntn_ta.cell_specific_k_offset = *ntn_Config_r17->cellSpecificKoffset_r17; + } + // Check if ta_Info_r17 is present and convert directly ta_Common_r17 (is in units of 4.072e-3 µs) + if (ntn_Config_r17->ta_Info_r17) { + mac->ntn_ta.N_common_ta_adj = ntn_Config_r17->ta_Info_r17->ta_Common_r17 * 4.072e-6; + // ta_CommonDrift_r17 (is in units of 0.2e-3 µs/s) + if (ntn_Config_r17->ta_Info_r17->ta_CommonDrift_r17) + mac->ntn_ta.ntn_ta_commondrift = *ntn_Config_r17->ta_Info_r17->ta_CommonDrift_r17 * 0.2e-3; + } + mac->ntn_ta.ntn_params_changed = true; } - // if cellSpecificKoffset_r17 is present - if (ntn_Config_r17->cellSpecificKoffset_r17) { - mac->ntn_ta.cell_specific_k_offset = *ntn_Config_r17->cellSpecificKoffset_r17; - } - // Check if ta_Info_r17 is present and convert directly ta_Common_r17 (is in units of 4.072e-3 µs) - if (ntn_Config_r17->ta_Info_r17) { - mac->ntn_ta.N_common_ta_adj = ntn_Config_r17->ta_Info_r17->ta_Common_r17 * 4.072e-6; - // ta_CommonDrift_r17 (is in units of 0.2e-3 µs/s) - if (ntn_Config_r17->ta_Info_r17->ta_CommonDrift_r17) - mac->ntn_ta.ntn_ta_commondrift = *ntn_Config_r17->ta_Info_r17->ta_CommonDrift_r17 * 0.2e-3; - } - mac->ntn_ta.ntn_params_changed = true; ret = pthread_mutex_unlock(&mac->if_mutex); AssertFatal(!ret, "mutex failed %d\n", ret); } diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index e217192d82..dfda03e011 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -88,7 +88,7 @@ void nr_rrc_mac_config_req_mib(module_id_t module_id, void nr_rrc_mac_config_req_sib1(module_id_t module_id, int cc_idP, NR_SIB1_t *sib1); struct position; /* forward declaration */ -void nr_rrc_mac_config_req_sib19_r17(module_id_t module_id, const struct position *pos, NR_SIB19_r17_t *sib19_r17); +void nr_rrc_mac_config_other_sib(module_id_t module_id, NR_SIB19_r17_t *sib19_r17); void nr_rrc_mac_config_req_reset(module_id_t module_id, NR_UE_MAC_reset_cause_t cause); diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index 81b857df0b..cc97b448b5 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -141,6 +141,9 @@ void process_msg_rcc_to_mac(MessageDef *msg) nr_rrc_mac_config_req_sib1(ue_id, 0, sib1); SEQUENCE_free(&asn_DEF_NR_SIB1, NR_MAC_RRC_CONFIG_SIB1(msg).sib1, ASFM_FREE_EVERYTHING); } break; + case NR_MAC_RRC_CONFIG_OTHER_SIB: + nr_rrc_mac_config_other_sib(ue_id, NR_MAC_RRC_CONFIG_OTHER_SIB(msg).sib19); + break; default: LOG_E(NR_MAC, "Unexpected msg from RRC: %d\n", ITTI_MSG_ID(msg)); } diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 072317e95d..88b781723b 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -62,7 +62,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" -#include "executables/position_interface.h" #ifndef CELLULAR #include "RRC/NR/MESSAGES/asn1_msg.h" @@ -166,7 +165,7 @@ static void set_DRB_status(NR_UE_RRC_INST_t *rrc, NR_DRB_Identity_t drb_id, NR_R rrc->status_DRBs[drb_id - 1] = status; } -static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si, instance_t ue_id, position_t *position) +static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si, instance_t ue_id) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_IN); @@ -181,6 +180,7 @@ static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si, return; } + NR_SIB19_r17_t *sib19 = NULL; for (int i = 0; i < si->criticalExtensions.choice.systemInformation->sib_TypeAndInfo.list.count; i++) { SystemInformation_IEs__sib_TypeAndInfo__Member *typeandinfo; typeandinfo = si->criticalExtensions.choice.systemInformation->sib_TypeAndInfo.list.array[i]; @@ -242,20 +242,19 @@ static void nr_decode_SI(NR_UE_RRC_SI_INFO *SI_info, NR_SystemInformation_t *si, SI_info->SInfo_r17.sib19_validity = SIB_VALID; if (g_log->log_component[NR_RRC].level >= OAILOG_DEBUG) xer_fprint(stdout, &asn_DEF_NR_SIB19_r17, (const void *)typeandinfo->choice.sib19_v1700); - - // allocate memory for position coordinates - if (!position) - position = CALLOC(1, sizeof(*position)); - // populate position with position from config file - get_position_coordinates(ue_id, position); - - nr_rrc_mac_config_req_sib19_r17(ue_id, position, typeandinfo->choice.sib19_v1700); + sib19 = typeandinfo->choice.sib19_v1700; nr_timer_start(&SI_info->SInfo_r17.sib19_timer); break; default: break; } } + + if (sib19) { + MessageDef *msg = itti_alloc_new_message(TASK_RRC_NRUE, 0, NR_MAC_RRC_CONFIG_OTHER_SIB); + asn_copy(&asn_DEF_NR_SIB19_r17, (void **)&NR_MAC_RRC_CONFIG_OTHER_SIB(msg).sib19, sib19); + itti_send_msg_to_task(TASK_MAC_UE, ue_id, msg); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_OUT); } @@ -397,7 +396,7 @@ static void nr_rrc_process_reconfiguration_v1530(NR_UE_RRC_INST_t *rrc, NR_RRCRe SEQUENCE_free(&asn_DEF_NR_SystemInformation, si, 1); } else { LOG_I(NR_RRC, "[UE %ld] Decoding dedicatedSystemInformationDelivery\n", rrc->ue_id); - nr_decode_SI(SI_info, si, rrc->ue_id, rrc->position_coordinates); + nr_decode_SI(SI_info, si, rrc->ue_id); } } if (rec_1530->otherConfig) { @@ -959,7 +958,7 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc, case NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformation: LOG_I(NR_RRC, "[UE %ld] Decoding SI\n", rrc->ue_id); NR_SystemInformation_t *si = bcch_message->message.choice.c1->choice.systemInformation; - nr_decode_SI(SI_info, si, rrc->ue_id, rrc->position_coordinates); + nr_decode_SI(SI_info, si, rrc->ue_id); break; case NR_BCCH_DL_SCH_MessageType__c1_PR_NOTHING: default: diff --git a/openair2/RRC/NR_UE/rrc_defs.h b/openair2/RRC/NR_UE/rrc_defs.h index 7cf9593313..fb320853e2 100644 --- a/openair2/RRC/NR_UE/rrc_defs.h +++ b/openair2/RRC/NR_UE/rrc_defs.h @@ -202,8 +202,6 @@ typedef struct rrcPerNB { NR_RSRP_Range_t s_measure; } rrcPerNB_t; -/* forward declaration */ -struct position; typedef struct NR_UE_RRC_INST_s { instance_t ue_id; rrcPerNB_t perNB[NB_CNX_UE]; @@ -243,9 +241,6 @@ typedef struct NR_UE_RRC_INST_s { bool reconfig_after_reestab; //Sidelink params NR_SL_PreconfigurationNR_r16_t *sl_preconfig; - - struct position *position_coordinates; - } NR_UE_RRC_INST_t; #endif