@@ -53,8 +53,8 @@ class ul_prach_context
5353 ul_prach_context () = default ;
5454
5555 // / Constructs an uplink PRACH context with the given PRACH buffer and PRACH buffer context.
56- ul_prach_context (const prach_buffer_context& context_, prach_buffer& buffer_) :
57- context (context_), buffer(&buffer_), nof_symbols(get_preamble_duration(context.format))
56+ ul_prach_context (const prach_buffer_context& context_, prach_buffer& buffer_, unsigned nof_ports_ ) :
57+ context (context_), buffer(&buffer_), nof_symbols(get_preamble_duration(context.format)), nof_ports(nof_ports_)
5858 {
5959 srsran_assert (context.nof_fd_occasions == 1 , " Only supporting one frequency domain occasion" );
6060 srsran_assert (context.nof_td_occasions == 1 , " Only supporting one time domain occasion" );
@@ -72,7 +72,7 @@ class ul_prach_context
7272 }
7373 // Initialize statistic.
7474 buffer_stats.buffer_nof_re = (preamble_info.sequence_length * nof_symbols);
75- buffer_stats.re_written = static_vector<unsigned , MAX_NOF_SUPPORTED_EAXC>(buffer-> get_max_nof_ports () , 0 );
75+ buffer_stats.re_written = static_vector<unsigned , MAX_NOF_SUPPORTED_EAXC>(nof_ports , 0 );
7676 }
7777
7878 // / Returns true if this context is empty, otherwise false.
@@ -84,6 +84,9 @@ class ul_prach_context
8484 // / Returns the number of symbols used by the PRACH associated with the stored context.
8585 unsigned get_prach_nof_symbols () const { return empty () ? 0U : nof_symbols; }
8686
87+ // / Gets the maximum number of ports supported in PRACH buffer.
88+ unsigned get_max_nof_ports () const { return empty () ? 0U : nof_ports; }
89+
8790 // / Writes the given IQ buffer corresponding to the given symbol and port and notifies that an uplink PRACH buffer is
8891 // / ready when all the PRBs for all the symbols and ports have been written in the buffer.
8992 bool update_buffer_and_notify (unsigned port,
@@ -133,6 +136,8 @@ class ul_prach_context
133136 prach_frequency_mapping_information freq_mapping_info;
134137 // / Number of OFDM symbols used by the stored PRACH.
135138 unsigned nof_symbols;
139+ // / Number of PRACH ports.
140+ unsigned nof_ports;
136141};
137142
138143// / Uplink slot context.
0 commit comments