|
10 | 10 |
|
11 | 11 | #pragma once |
12 | 12 |
|
| 13 | +#include "srsran/phy/support/prach_buffer.h" |
| 14 | +#include "srsran/phy/support/prach_buffer_context.h" |
13 | 15 | #include "srsran/phy/support/resource_grid_reader.h" |
14 | 16 | #include "srsran/phy/support/shared_resource_grid.h" |
| 17 | +#include "srsran/phy/upper/upper_phy_rx_symbol_handler.h" |
| 18 | +#include "srsran/ran/cyclic_prefix.h" |
| 19 | +#include "srsran/ran/prach/prach_constants.h" |
| 20 | +#include "srsran/ran/prach/prach_preamble_information.h" |
15 | 21 | #include "srsran/srsvec/conversion.h" |
16 | | -#include "srsran/support/error_handling.h" |
17 | 22 | #include "srsran/support/executors/task_worker.h" |
18 | 23 | #include <fstream> |
19 | 24 |
|
@@ -101,7 +106,15 @@ class upper_phy_rx_symbol_handler_printer_decorator : public upper_phy_rx_symbol |
101 | 106 |
|
102 | 107 | // Queue write request. |
103 | 108 | if (print_prach && !worker.push_task([this, context, &buffer]() { |
104 | | - unsigned nof_replicas = buffer.get_max_nof_symbols(); |
| 109 | + // Retrieve preamble information. |
| 110 | + prach_preamble_information prach_info; |
| 111 | + if (is_long_preamble(context.format)) { |
| 112 | + prach_info = get_prach_preamble_long_info(context.format); |
| 113 | + } else { |
| 114 | + prach_info = get_prach_preamble_short_info( |
| 115 | + context.format, to_ra_subcarrier_spacing(context.pusch_scs), /*last_occasion=*/false); |
| 116 | + } |
| 117 | + unsigned nof_replicas = prach_info.nof_symbols; |
105 | 118 | unsigned prach_start = 0; |
106 | 119 | unsigned prach_stop = buffer.get_max_nof_ports(); |
107 | 120 | for (unsigned i_port = prach_start; i_port != prach_stop; ++i_port) { |
|
0 commit comments