RENEWLab  1.1.0
RENEW project
sample_offset_cal Namespace Reference

Functions

def txrx_app (serials, ref_node_idx, hub_serial, rate, freq, txgain, rxgain, numSamps, prefix_pad, postfix_pad, debug)
 Functions #. More...
 
def find_corr_idx (waveRxA, waveRxB)
 
def calibrate (corr_idx_vec, ssdr)
 
def cleanup (sdrs, frame_len, m_rxStream, s_rxStream)
 
def main ()
 Main #. More...
 

Variables

int RF_RST_REG = 48
 
int TDD_CONF_REG = 120
 
int SCH_ADDR_REG = 136
 
int SCH_MODE_REG = 140
 
int TX_GAIN_CTRL = 88
 
int FPGA_IRIS30_TRIGGERS = 44
 
tuple FPGA_IRIS30_INCR_TIME = (1 << 2)
 
tuple FPGA_IRIS30_DECR_TIME = (1 << 3)
 

Detailed Description

sample_offset_cal_prototype.py

** NOTE **
This script is used to test sample offset and calibration.

One-time calibration procedure to align samples from all radios in the base station

Example:
    python3 sample_offset_cal_prototype.py --filename="./data_in/calibrate_bs_radios.txt"

---------------------------------------------------------------------
 Copyright © 2018-2019. Rice University.
 RENEW OPEN SOURCE LICENSE: http://renew-wireless.org/license
---------------------------------------------------------------------

Function Documentation

◆ calibrate()

def sample_offset_cal.calibrate (   corr_idx_vec,
  ssdr 
)
Calibrate

Find correction factor between reference board and the rest:

Input:
    corr_idx_vec - vector of absolute correlation indexes for all boards
    ssdr         - sdr objects

Output:
    cal_coeff    - vector of sample index offsets from reference board
Here is the caller graph for this function:

◆ cleanup()

def sample_offset_cal.cleanup (   sdrs,
  frame_len,
  m_rxStream,
  s_rxStream 
)
Here is the caller graph for this function:

◆ find_corr_idx()

def sample_offset_cal.find_corr_idx (   waveRxA,
  waveRxB 
)
Find correlation indexes
Input:
    waveRxA - vector of IQ samples from RF chain A
    waveRxB - vector of IQ samples from RF chain B

Output:
    idx_mat - matrix with correlation indexes at all boards
Here is the caller graph for this function:

◆ main()

def sample_offset_cal.main ( )

Main #.

Here is the call graph for this function:

◆ txrx_app()

def sample_offset_cal.txrx_app (   serials,
  ref_node_idx,
  hub_serial,
  rate,
  freq,
  txgain,
  rxgain,
  numSamps,
  prefix_pad,
  postfix_pad,
  debug 
)

Functions #.

Function to configure Iris boards, generate pilot to be transmitted,
write pilots to RAM, set up schedule (frame), transmit, and receive.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ FPGA_IRIS30_DECR_TIME

tuple sample_offset_cal.FPGA_IRIS30_DECR_TIME = (1 << 3)

◆ FPGA_IRIS30_INCR_TIME

tuple sample_offset_cal.FPGA_IRIS30_INCR_TIME = (1 << 2)

◆ FPGA_IRIS30_TRIGGERS

int sample_offset_cal.FPGA_IRIS30_TRIGGERS = 44

◆ RF_RST_REG

int sample_offset_cal.RF_RST_REG = 48
           Registers              #

TDD Register Set

◆ SCH_ADDR_REG

int sample_offset_cal.SCH_ADDR_REG = 136

◆ SCH_MODE_REG

int sample_offset_cal.SCH_MODE_REG = 140

◆ TDD_CONF_REG

int sample_offset_cal.TDD_CONF_REG = 120

◆ TX_GAIN_CTRL

int sample_offset_cal.TX_GAIN_CTRL = 88