free5GRAN  V1.0
phy Class Reference

#include <phy.h>

Collaboration diagram for phy:

Public Member Functions

 phy (rf *rf_dev, double ssb_period, int fft_size, int scs, free5GRAN::band band_obj)
 
void reconfigure (int fft_size)
 
 phy ()
 
int cell_synchronization (float &received_power)
 
int extract_pbch ()
 
void search_pdcch (bool &validated)
 
void print_cell_info ()
 
void parse_dci_1_0_si_rnti (int *dci_bits, int freq_domain_ra_size, free5GRAN::dci_1_0_si_rnti &dci)
 
void print_dci_info ()
 
void extract_pdsch ()
 
BCCH_DL_SCH_Message_t * getSib ()
 
void print_sib1 ()
 
int getSIB1RV ()
 

Private Attributes

rfrf_device
 
int common_cp_length
 
int pci
 
int i_b_ssb
 
int n_id_1
 
int n_id_2
 
int * mib_bits
 
int scs
 
int is_extended_cp
 
int i_ssb
 
int l_max
 
int index_first_pss
 
int n_size_bwp
 
int num_slots_per_frame
 
int mu
 
int frame_size
 
double ssb_period
 
int fft_size
 
bool cell_confirmed
 
bool crc_validated
 
float freq_offset
 
float max_snr
 
std::vector< std::complex< float > > frame_data
 
free5GRAN::mib mib_object
 
free5GRAN::band band_object
 
free5GRAN::dci_1_0_si_rnti dci_1_0_si_rnti
 
free5GRAN::pdcch_t0ss_monitoring_occasions pdcch_ss_mon_occ
 
std::chrono::time_point< std::chrono::high_resolution_clock > time_first_pss
 
std::vector< std::complex< float > > buff
 
BCCH_DL_SCH_Message_t * sib1 =0
 
free5GRAN::ss_power_indicator ss_pwr ={}
 

Detailed Description

Definition at line 27 of file phy.h.

Constructor & Destructor Documentation

◆ phy() [1/2]

phy::phy ( rf rf_dev,
double  ssb_period,
int  fft_size,
int  scs,
free5GRAN::band  band_obj 
)
Parameters
[in]rf_devRF device. (Only USRP B210 is currently supported)
[in]ssb_periodSSB periodicity. Default value is 0.02 (20 ms)
[in]fft_sizeFFT/iFFT size. Represents the total number of os subcarriers to be decoded
[in]scsSubcarrier spacing
[in]band_objBand object for getting Lmax value

Definition at line 41 of file phy.cpp.

◆ phy() [2/2]

phy::phy ( )

Definition at line 472 of file phy.cpp.

Member Function Documentation

◆ cell_synchronization()

int phy::cell_synchronization ( float &  received_power)

Perform time synchronization

  • PSS cross-correlation to retrieve N_ID_2
  • SSS correlation to retrieve N_ID_1
  • PCI computation based on N_ID_1 and N_ID_2
Parameters
[in]received_powerPSS received power. Used for power ramping.

Definition at line 60 of file phy.cpp.

◆ extract_pbch()

int phy::extract_pbch ( )

Time resynchronization, frequency synchronization, PBCH extraction and decoding.

  • Getting 3ms signal from RF device
  • PSS cross-correlation to retrieve N_ID_2
  • SSS correlation to retrieve N_ID_1
  • PCI computation based on N_ID_1 and N_ID_2
  • Function ends if recomputed PCI differs from to initially computed one
  • Fine frequency synchronization by correlating cyclic prefixes and corresponding symbol part
  • Signal extraction and FFT
  • Resource element de-mapper
  • Channel estimation based on different values of i_ssb
  • Channel equalization based on best SNR value
  • PBCH decoding
  • BCH decoding
  • MIB parsing

Definition at line 188 of file phy.cpp.

◆ extract_pdsch()

void phy::extract_pdsch ( )

PDSCH extraction, PDSCH decoding, DL-SCH decoding and SIB1 parsing

  • Parameters extraction from DCI and standard
  • Phase de-compensation. Looping over different possible phase compensation:
    1. Signal extraction, FFT and resource element de-mapper
    2. Channel estimation & equalization
    3. PDSCH decoding
    4. DL-SCH decoding
    5. If CRC is validated, phase de-compensation is validated and functions continues. Otherwise, another phase de-compensation is tried.
  • SIB1 parsing using ASN1C

Definition at line 894 of file phy.cpp.

◆ getSib()

BCCH_DL_SCH_Message_t * phy::getSib ( )

Definition at line 1095 of file phy.cpp.

◆ getSIB1RV()

int phy::getSIB1RV ( )

Definition at line 1103 of file phy.cpp.

◆ parse_dci_1_0_si_rnti()

void phy::parse_dci_1_0_si_rnti ( int *  dci_bits,
int  freq_domain_ra_size,
free5GRAN::dci_1_0_si_rnti dci 
)

Parse DCI informations

Parameters
[in]dci_bitsDCI decoded bits
[in]freq_domain_ra_sizeNumber of bits used for frequency allocation in DCI
[out]dciFilled DCI object

Definition at line 861 of file phy.cpp.

◆ print_cell_info()

void phy::print_cell_info ( )

Print cells global informations and MIB.

Definition at line 476 of file phy.cpp.

◆ print_dci_info()

void phy::print_dci_info ( )

Print DCI decoded informations

Definition at line 841 of file phy.cpp.

◆ print_sib1()

void phy::print_sib1 ( )

Definition at line 1099 of file phy.cpp.

◆ reconfigure()

void phy::reconfigure ( int  fft_size)

Definition at line 511 of file phy.cpp.

◆ search_pdcch()

void phy::search_pdcch ( bool &  validated)

PDCCH config extraction, PDCCH blind search and DCI decoding

3GPP standard: TS 38.213 13

  • Read PDCCH config from MIB
  • Detect frame beginning
  • Select frame containing PDCCH and PDSCH based of SFN
  • Frequency calibration to retrieve center on CORESET0
  • Compute CCE to REG mapping
  • Blind search DCI decoding over different candidates:
    1. Select a candidate
    2. Perform resource element de-mapping and FFT
    3. Channel estimation & equalization
    4. PDCCH decoding
    5. DCI decoding
    6. If CRC is validated, candidate is selected and function ends
    7. Otherwise, function continues with another candidates
Parameters
[out]dci_foundreturns true if blind decode succeeds.

Definition at line 515 of file phy.cpp.

Member Data Documentation

◆ band_object

free5GRAN::band phy::band_object
private

Definition at line 39 of file phy.h.

◆ buff

std::vector<std::complex<float> > phy::buff
private

Definition at line 43 of file phy.h.

◆ cell_confirmed

bool phy::cell_confirmed
private

Definition at line 35 of file phy.h.

◆ common_cp_length

int phy::common_cp_length
private

Definition at line 32 of file phy.h.

◆ crc_validated

bool phy::crc_validated
private

Definition at line 35 of file phy.h.

◆ dci_1_0_si_rnti

free5GRAN::dci_1_0_si_rnti phy::dci_1_0_si_rnti
private

Definition at line 40 of file phy.h.

◆ fft_size

int phy::fft_size
private

Definition at line 34 of file phy.h.

◆ frame_data

std::vector<std::complex<float> > phy::frame_data
private

Definition at line 37 of file phy.h.

◆ frame_size

int phy::frame_size
private

Definition at line 32 of file phy.h.

◆ freq_offset

float phy::freq_offset
private

Definition at line 36 of file phy.h.

◆ i_b_ssb

int phy::i_b_ssb
private

Definition at line 32 of file phy.h.

◆ i_ssb

int phy::i_ssb
private

Definition at line 32 of file phy.h.

◆ index_first_pss

int phy::index_first_pss
private

Definition at line 32 of file phy.h.

◆ is_extended_cp

int phy::is_extended_cp
private

Definition at line 32 of file phy.h.

◆ l_max

int phy::l_max
private

Definition at line 32 of file phy.h.

◆ max_snr

float phy::max_snr
private

Definition at line 36 of file phy.h.

◆ mib_bits

int * phy::mib_bits
private

Definition at line 32 of file phy.h.

◆ mib_object

free5GRAN::mib phy::mib_object
private

Definition at line 38 of file phy.h.

◆ mu

int phy::mu
private

Definition at line 32 of file phy.h.

◆ n_id_1

int phy::n_id_1
private

Definition at line 32 of file phy.h.

◆ n_id_2

int phy::n_id_2
private

Definition at line 32 of file phy.h.

◆ n_size_bwp

int phy::n_size_bwp
private

Definition at line 32 of file phy.h.

◆ num_slots_per_frame

int phy::num_slots_per_frame
private

Definition at line 32 of file phy.h.

◆ pci

int phy::pci
private

Definition at line 32 of file phy.h.

◆ pdcch_ss_mon_occ

free5GRAN::pdcch_t0ss_monitoring_occasions phy::pdcch_ss_mon_occ
private

Definition at line 41 of file phy.h.

◆ rf_device

rf* phy::rf_device
private

Definition at line 31 of file phy.h.

◆ scs

int phy::scs
private

Definition at line 32 of file phy.h.

◆ sib1

BCCH_DL_SCH_Message_t* phy::sib1 =0
private

Definition at line 44 of file phy.h.

◆ ss_pwr

free5GRAN::ss_power_indicator phy::ss_pwr ={}
private

Definition at line 45 of file phy.h.

◆ ssb_period

double phy::ssb_period
private

Definition at line 33 of file phy.h.

◆ time_first_pss

std::chrono::time_point<std::chrono::high_resolution_clock> phy::time_first_pss
private

Definition at line 42 of file phy.h.


The documentation for this class was generated from the following files: