|
RENEWLab
1.1.0
RENEW project
|
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) |
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
---------------------------------------------------------------------
| 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 
| def sample_offset_cal.cleanup | ( | sdrs, | |
| frame_len, | |||
| m_rxStream, | |||
| s_rxStream | |||
| ) |

| 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 
| def sample_offset_cal.main | ( | ) |
Main #.

| 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.


| tuple sample_offset_cal.FPGA_IRIS30_DECR_TIME = (1 << 3) |
| tuple sample_offset_cal.FPGA_IRIS30_INCR_TIME = (1 << 2) |
| int sample_offset_cal.FPGA_IRIS30_TRIGGERS = 44 |
| int sample_offset_cal.RF_RST_REG = 48 |
Registers #
TDD Register Set
| int sample_offset_cal.SCH_ADDR_REG = 136 |
| int sample_offset_cal.SCH_MODE_REG = 140 |
| int sample_offset_cal.TDD_CONF_REG = 120 |
| int sample_offset_cal.TX_GAIN_CTRL = 88 |