Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
# Conflicts:
#	include/srsran/phy/upper/signal_processors/dmrs_pucch_processor.h
#	lib/phy/upper/equalization/equalize_zf_3x4.h
#	lib/phy/upper/equalization/equalize_zf_4x4.h
#	tests/unittests/phy/generic_functions/transform_precoding/transform_precoder_test_data.tar.gz
#	tests/unittests/phy/upper/channel_processors/pusch/pusch_demodulator_test_data.tar.gz
#	tests/unittests/phy/upper/signal_processors/dmrs_pucch_processor_test_data.h
#	tests/unittests/phy/upper/signal_processors/dmrs_pucch_processor_test_doubles.h
  • Loading branch information
codebot committed Nov 12, 2024
2 parents 366744f + a77e99f commit 6f0f948
Show file tree
Hide file tree
Showing 103 changed files with 2,321 additions and 703 deletions.
16 changes: 0 additions & 16 deletions .gitlab/ci-shared/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ variables:
builder.sh -m "-j${KUBERNETES_CPU_REQUEST} ${target}" ${BUILD_CMD} "$@" ${SRSRANDIR}
{ set +x; } 2>/dev/null
}
- |
build_plugin() {
target="$1"
shift
set -x
builder.sh -m "-j${KUBERNETES_CPU_REQUEST} ${target}" ${BUILD_CMD} "$@" ${CI_PROJECT_DIR}
{ set +x; } 2>/dev/null
}
- |
launch_tests_srsran() {
cd ${SRSRANDIR}/build
Expand All @@ -133,11 +125,3 @@ variables:
ctest -j${KUBERNETES_CPU_REQUEST} --schedule-random --output-on-failure --output-junit xunit.xml "$@"
{ set +x; } 2>/dev/null
}
- |
launch_tests_plugin() {
cd ${CI_PROJECT_DIR}/build
echo "Using LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
set -x
ctest -j${KUBERNETES_CPU_REQUEST} --schedule-random --output-on-failure --output-junit xunit.xml "$@"
{ set +x; } 2>/dev/null
}
2 changes: 1 addition & 1 deletion .gitlab/ci/e2e/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb
RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina
RETINA_VERSION=0.54.12
RETINA_VERSION=0.54.13
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
Expand Down
3 changes: 3 additions & 0 deletions apps/units/cu_up/cu_up_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ cu_up_unit srsran::build_cu_up(const cu_up_unit_config& unit_cfg, const cu_up_un

for (auto& qos_ : config.qos) {
qos_.second.pdcp_custom_cfg.metrics_notifier = pdcp_metric_notifier;
if (!pdcp_metric_notifier) { // Disable PDCP metrics if E2 is not enabled since there is no consumer.
qos_.second.pdcp_custom_cfg.metrics_period = std::chrono::milliseconds(0);
}
}

wrapper.unit =
Expand Down
3 changes: 3 additions & 0 deletions include/srsran/cu_cp/cu_cp_metrics_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "srsran/ran/nr_cgi.h"
#include "srsran/ran/pci.h"
#include "srsran/ran/rnti.h"
#include "srsran/rrc/rrc_ue.h"
#include <chrono>
#include <memory>

Expand All @@ -41,6 +42,8 @@ struct metrics_report {
gnb_du_id_t du_id;
/// PCI of the UE's PCell.
pci_t pci;
/// RRC connection state of the UE.
rrc_state rrc_connection_state;
};
struct cell_info {
nr_cell_global_id_t cgi;
Expand Down
4 changes: 0 additions & 4 deletions include/srsran/du/du_high/du_manager/du_manager.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@

#pragma once

#include "srsran/adt/byte_buffer.h"
#include "srsran/du/du_high/du_manager/du_configurator.h"
#include "srsran/f1ap/du/f1ap_du.h"
#include "srsran/ran/du_types.h"
#include "srsran/ran/logical_channel/lcid.h"
#include "srsran/ran/rnti.h"
#include "srsran/support/async/async_task.h"
#include <string>

namespace srsran {

Expand Down
1 change: 1 addition & 0 deletions include/srsran/mac/mac_ue_configurator.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ struct mac_ue_create_request {
physical_cell_group_config phy_cell_group_cfg;
bool initial_fallback = true;
const byte_buffer* ul_ccch_msg = nullptr;
std::optional<slot_point> ul_ccch_slot_rx;

// Scheduler-only params.
sched_ue_config_request sched_cfg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ class transform_precoder
/// \remark An assertion is triggered if the number of RB to deprecode is invalid.
/// \remark An assertion is triggered if the number of RB exceeds the maximum initialized number of RB.
virtual void deprecode_ofdm_symbol(span<cf_t> out, span<const cf_t> in) = 0;

/// \brief Calculates the resultant noise variance after reverting the transform precoding operation.
///
/// Noise variances that are NaN, infinite or negative are not taken into account neither for the calculation of mean
/// nor overwriting.
/// \param[out] out Resultant noise variance.
/// \param[in] in Input noise variance for each resource element.
virtual void deprecode_ofdm_symbol_noise(span<float> out, span<const float> in) = 0;
};

} // namespace srsran
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class pusch_processor
unsigned n_id;
/// Number of transmission layers as per TS38.211 Section 6.3.1.3.
unsigned nof_tx_layers;
/// Port indexes the PUSCH reception is mapped to.
/// Port indices the PUSCH reception is mapped to.
static_vector<uint8_t, MAX_PORTS> rx_ports;
/// Indicates which symbol in the slot transmit DMRS.
symbol_slot_mask dmrs_symbol_mask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#pragma once

#include "srsran/adt/bounded_integer.h"
#include "srsran/phy/generic_functions/transform_precoding/transform_precoder.h"
#include "srsran/phy/support/mask_types.h"
#include "srsran/phy/support/resource_grid_reader.h"
#include "srsran/phy/upper/equalization/modular_ch_est_list.h"
#include "srsran/ran/pucch/pucch_constants.h"

Expand All @@ -39,7 +41,7 @@ namespace srsran {
/// set to \c false otherwise.
/// \param[in] additional_dmrs Whether \e additionalDMRS parameter is set for the PUCCH resource.
/// \returns The symbol mask for symbols containing DM-RS for that configuration, as per TS38.211 Table 6.4.1.3.3.2-1.
inline symbol_slot_mask get_pucch_formats_3_4_dmrs_symbol_mask(
inline symbol_slot_mask get_pucch_formats3_4_dmrs_symbol_mask(
bounded_integer<unsigned, pucch_constants::FORMAT3_MIN_NSYMB, pucch_constants::FORMAT3_MAX_NSYMB> nof_symbols,
bool frequency_hopping,
bool additional_dmrs)
Expand Down
12 changes: 7 additions & 5 deletions include/srsran/phy/upper/pucch_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ class pucch_helper
}

/// Computes the NR-PUCCH group sequence (TS 38.211 clause 6.3.2.2.1 Group and sequence hopping).
void compute_group_sequence(pucch_group_hopping group_hopping, unsigned n_id, unsigned& u, unsigned& v)
/// \param[in] group_hopping Group hopping configuration.
/// \param[in] n_id Scrambling identifier.
/// \return A pair of sequence group u and sequence number v.
static std::pair<unsigned, unsigned> compute_group_sequence(pucch_group_hopping group_hopping, unsigned n_id)
{
unsigned f_gh = 0;
unsigned f_ss = 0;
Expand All @@ -57,14 +60,13 @@ class pucch_helper
break;
case pucch_group_hopping::ENABLE:
srsran_terminate("Group hopping is not implemented");
return;
case pucch_group_hopping::DISABLE:
srsran_terminate("Hopping is not implemented");
return;
}

u = (f_gh + f_ss) % low_papr_sequence_collection::NOF_GROUPS;
v = 0;
unsigned u = (f_gh + f_ss) % low_papr_sequence_collection::NOF_GROUPS;
unsigned v = 0;
return {u, v};
}

/// \brief Computes the NR alpha index (1-NRE) (TS 38.211 clause 6.3.2.2.2 Cyclic shift hopping)
Expand Down
1 change: 1 addition & 0 deletions include/srsran/phy/upper/pucch_orthogonal_sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "srsran/adt/complex.h"
#include "srsran/adt/span.h"
#include "srsran/phy/constants.h"
#include "srsran/ran/pucch/pucch_constants.h"
#include "srsran/support/math/math_utils.h"
#include "srsran/support/srsran_assert.h"
Expand Down
143 changes: 143 additions & 0 deletions include/srsran/phy/upper/signal_processors/dmrs_pucch_estimator.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
*
* Copyright 2021-2024 Software Radio Systems Limited
*
* This file is part of srsRAN.
*
* srsRAN is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* srsRAN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* A copy of the GNU Affero General Public License can be found in
* the LICENSE file in the top-level directory of this distribution
* and at http://www.gnu.org/licenses/.
*
*/

#pragma once

#include "srsran/adt/static_vector.h"
#include "srsran/phy/upper/channel_estimation.h"
#include "srsran/phy/upper/dmrs_mapping.h"
#include "srsran/ran/cyclic_prefix.h"
#include "srsran/ran/pucch/pucch_mapping.h"
#include "srsran/ran/slot_point.h"

namespace srsran {

class resource_grid_reader;

/// Describes a DM-RS for PUCCH estimator interface.
class dmrs_pucch_estimator
{
public:
/// Collects common parameters for all PUCCH Formats.
struct common_configuration {
/// Slot timing and numerology.
slot_point slot;
/// Cyclic Prefix.
cyclic_prefix cp;
/// Group and sequence hopping configuration.
pucch_group_hopping group_hopping;
/// Start symbol index, see TS38.331 PUCCH-Resource IE.
unsigned start_symbol_index;
/// Number of symbols, see TS38.331 PUCCH-Resource IE.
unsigned nof_symbols;
/// Start PRB index, see TS38.331 PUCCH-Resource IE.
unsigned starting_prb;
/// \brief Index of first PRB of the second hop if intra-slot frequency hopping is enabled, empty otherwise.
/// \remark see PUCCH-Resource IE in TS38.331.
std::optional<unsigned> second_hop_prb;
/// \brief Parameter \f$n_{ID}\f$ in TS38.211 Section 6.3.2.2.2.
///
/// Higher layer parameter \e hoppingID if configured (Cell-specific scrambling ID for group hopping and sequence
/// hopping), otherwise the physical cell identifier.
unsigned n_id;
/// Port indices the PUCCH transmission is mapped onto.
static_vector<uint8_t, DMRS_MAX_NPORTS> ports;
};

/// Collects specific PUCCH Format 1 parameters.
struct format1_configuration : common_configuration {
/// Initial cyclic shift, as defined in TS38.211 Section 6.3.2.2.2.
unsigned initial_cyclic_shift;
/// Orthogonal Cover Code Index.
unsigned time_domain_occ;
};

/// Collects specific PUCCH Format 2 parameters.
struct format2_configuration : common_configuration {
/// Number of PRBs, see PUCCH-Resource IE in TS38.331.
unsigned nof_prb;
/// \brief DM-RS scrambling identity, defined in TS38.211 Section 6.4.1.3.2.1.
///
/// Higher layer parameter \e scramblingID0 in \e DM-RS-UplinkConfig if it is given, otherwise the physical cell
/// identifier.
unsigned n_id_0;
};

/// Collects specific PUCCH Format 3 parameters.
struct format3_configuration : common_configuration {
/// Number of PRBs.
unsigned nof_prb;
/// \brief Additional DM-RS flag (true if enabled), indicating two DM-RS symbols per hop.
/// \remark See PUCCH-Format-Config IE in TS38.331.
bool additional_dmrs;
};

/// Collects specific PUCCH Format 4 parameters.
struct format4_configuration : common_configuration {
/// \brief Additional DM-RS flag (true if enabled), indicating two DM-RS symbols per hop.
/// \remark See PUCCH-Format-Config IE in TS38.331.
bool additional_dmrs;
/// Orthogonal Cover Code Index.
unsigned occ_index;
};

/// Default destructor.
virtual ~dmrs_pucch_estimator() = default;

/// \brief Estimates the propagation channel for PUCCH Format 1.
///
/// \param[out] estimate Channel estimation results.
/// \param[in] grid Received resource grid.
/// \param[in] config PUCCH Format 1 configuration.
/// \note The \c estimate dimensions must be consistent with the \grid dimensions.
virtual void
estimate(channel_estimate& estimate, const resource_grid_reader& grid, const format1_configuration& config) = 0;

/// \brief Estimates the propagation channel for PUCCH Format 2.
///
/// \param[out] estimate Channel estimation results.
/// \param[in] grid Received resource grid.
/// \param[in] config PUCCH Format 2 configuration.
/// \note The \c estimate dimensions must be consistent with the \grid dimensions.
virtual void
estimate(channel_estimate& estimate, const resource_grid_reader& grid, const format2_configuration& config) = 0;

/// \brief Estimates the propagation channel for PUCCH Format 3.
///
/// \param[out] estimate Channel estimation results.
/// \param[in] grid Received resource grid.
/// \param[in] config PUCCH Format 3 configuration.
/// \note The \c estimate dimensions must be consistent with the \grid dimensions.
virtual void
estimate(channel_estimate& estimate, const resource_grid_reader& grid, const format3_configuration& config) = 0;

/// \brief Estimates the propagation channel for PUCCH Format 4.
///
/// \param[out] estimate Channel estimation results.
/// \param[in] grid Received resource grid.
/// \param[in] config PUCCH Format 4 configuration.
/// \note The \c estimate dimensions must be consistent with the \grid dimensions.
virtual void
estimate(channel_estimate& estimate, const resource_grid_reader& grid, const format4_configuration& config) = 0;
};

} // namespace srsran
Loading

0 comments on commit 6f0f948

Please sign in to comment.