diff --git a/test/phy/CMakeLists.txt b/test/phy/CMakeLists.txt index 5644bffb2..3edbc0afc 100644 --- a/test/phy/CMakeLists.txt +++ b/test/phy/CMakeLists.txt @@ -93,9 +93,10 @@ if (RF_FOUND AND ENABLE_SRSUE AND ENABLE_SRSENB) --ue.phy.nof_threads=${NR_PHY_TEST_UE_NOF_THREADS} ) + # Test PRACH transmission and detection add_nr_test(nr_phy_test_${NR_PHY_TEST_BW}_prach nr_phy_test --reference=carrier=${NR_PHY_TEST_BW} - --duration=1000 # 100 slots + --duration=1000 # 1000 slots --gnb.stack.pdsch.slots=none # No PDSCH --gnb.stack.pusch.slots=none # No PUSCH --gnb.phy.nof_threads=${NR_PHY_TEST_GNB_NOF_THREADS} @@ -103,5 +104,27 @@ if (RF_FOUND AND ENABLE_SRSUE AND ENABLE_SRSENB) --ue.stack.prach.preamble=10 # Use preamble 10 --ue.phy.nof_threads=${NR_PHY_TEST_UE_NOF_THREADS} ) + + # Test scheduling request + add_nr_test(nr_phy_test_${NR_PHY_TEST_BW}_sr nr_phy_test + --reference=carrier=${NR_PHY_TEST_BW} + --duration=1000 # 1000 slots + --gnb.stack.pdsch.slots=none # No PDSCH + --gnb.stack.pusch.slots=none # No PUSCH + --gnb.phy.nof_threads=${NR_PHY_TEST_GNB_NOF_THREADS} + --ue.stack.sr.period=4 # Transmit SR every 4 opportunities + --ue.phy.nof_threads=${NR_PHY_TEST_UE_NOF_THREADS} + ) + + # Test scheduling request multiplexed with HARQ ACK feedback + add_nr_test(nr_phy_test_${NR_PHY_TEST_BW}_sr_harq nr_phy_test + --reference=carrier=${NR_PHY_TEST_BW} + --duration=1000 # 1000 slots + --gnb.stack.pdsch.slots=all # All PDSCH + --gnb.stack.pusch.slots=none # No PUSCH + --gnb.phy.nof_threads=${NR_PHY_TEST_GNB_NOF_THREADS} + --ue.stack.sr.period=4 # Transmit SR every 4 opportunities + --ue.phy.nof_threads=${NR_PHY_TEST_UE_NOF_THREADS} + ) endforeach () endif () diff --git a/test/phy/nr_phy_test.cc b/test/phy/nr_phy_test.cc index 618c85d6b..ce5b97f40 100644 --- a/test/phy/nr_phy_test.cc +++ b/test/phy/nr_phy_test.cc @@ -264,11 +264,14 @@ int main(int argc, char** argv) // Print SR if (metrics.ue_stack.sr_count > 0) { srsran::console("SR:\n"); - srsran::console(" +------------+------------+\n"); - srsran::console(" | %10s | %10s |\n", "Transmit'd", "Received"); - srsran::console(" +------------+------------+\n"); - srsran::console(" | %10d | %10d |\n", metrics.ue_stack.sr_count, metrics.gnb_stack.sr_count); - srsran::console(" +------------+------------+\n"); + srsran::console(" +------------+------------+------------+\n"); + srsran::console(" | %10s | %10s | %10s |\n", "Transmit'd", "Received", "Detection"); + srsran::console(" +------------+------------+------------+\n"); + srsran::console(" | %10d | %10d | %10.5f |\n", + metrics.ue_stack.sr_count, + metrics.gnb_stack.sr_count, + (double)metrics.gnb_stack.sr_count / (double)metrics.ue_stack.sr_count); + srsran::console(" +------------+------------+------------+\n"); } // Assert metrics