Merge remote-tracking branch 'origin/beams-to-rf-board' into integration_2025_w52 (!3656)

Rfsimulator beam reception/transmission

A simplified beam switching simulation for rfsimulator. This works
mainly in 1 gNB - N UEs scenarios. This is not a real beamformer with
antenna, channel and propagation model. The way it works is that the
peers inform each other about the beams they transmit in, and on
reception before channel modelling, the beam data is combined based on
preconfigured rx_beam/tx_beam gain matrix.

Usage:

- Add --rfsimulator.enable_beams to enable beam simulation

- Add --rfsimulator.beam_gains .

    Example list: 0,-5,-10

    Resulting matrix:

    [[0, -5, -10] [-5, 0, -5]] [-10, -5, 0]]

- Add --telnetsrv if you want to control the beams manually. The command
  in telnet is "rfsimu setbeam <beam_map>", where beam_map is a uint64_t
  controling the reception beam and transmission beam. If the
  application is switching the beams automatically the beams will be
  overwritten as soon as the application chooses to switch beams.

Supports up to 64 concurrent TX and RX beams.
This commit is contained in:
Robert Schmidt
2025-12-24 10:53:04 +01:00
21 changed files with 1054 additions and 407 deletions
+25
View File
@@ -548,6 +548,18 @@ static int vrtsim_write(openair0_device *device, openair0_timestamp timestamp, v
: vrtsim_write_internal(vrtsim_state, timestamp, (c16_t *)samplesVoid[0], nsamps, 0, flags, 0);
}
static int vrtsim_write_beams(openair0_device *device,
openair0_timestamp timestamp,
void ***buff,
int nsamps,
int nb_antennas_tx,
int num_beams,
int flags)
{
vrtsim_write(device, timestamp, (void **)buff[0], nsamps, nb_antennas_tx, flags);
return nsamps;
}
static int vrtsim_read(openair0_device *device, openair0_timestamp *ptimestamp, void **samplesVoid, int nsamps, int nbAnt)
{
vrtsim_state_t *vrtsim_state = (vrtsim_state_t *)device->priv;
@@ -657,6 +669,16 @@ static int vrtsim_set_freq(openair0_device *device, openair0_config_t *openair0_
return 0;
}
static int vrtsim_set_beams(openair0_device *device, uint64_t beam_map, openair0_timestamp timestamp)
{
return 0;
}
static int vrtsim_set_beams2(openair0_device *device, int *beam_ids, int num_beams, openair0_timestamp timestamp)
{
return 0;
}
__attribute__((__visibility__("default"))) int device_init(openair0_device *device, openair0_config_t *openair0_cfg)
{
randominit();
@@ -673,6 +695,9 @@ __attribute__((__visibility__("default"))) int device_init(openair0_device *devi
device->trx_set_gains_func = vrtsim_stub2;
device->trx_write_func = vrtsim_write;
device->trx_read_func = vrtsim_read;
device->trx_write_beams_func = vrtsim_write_beams;
device->trx_set_beams = vrtsim_set_beams;
device->trx_set_beams2 = vrtsim_set_beams2;
device->type = RFSIMULATOR;
device->openair0_cfg = &openair0_cfg[0];