Commit 956dba6b authored by rdoost's avatar rdoost

working with 25 RBs and slowed down sample rate (1.25MHz)

parent d34583e5
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "UTIL/LOG/log_extern.h" #include "UTIL/LOG/log_extern.h"
#include "common_lib.h" #include "common_lib.h"
#define SAMPLE_RATE_DOWN 4
/*! \brief Iris Configuration */ /*! \brief Iris Configuration */
typedef struct typedef struct
...@@ -117,7 +118,7 @@ static int trx_iris_write(openair0_device *device, openair0_timestamp timestamp, ...@@ -117,7 +118,7 @@ static int trx_iris_write(openair0_device *device, openair0_timestamp timestamp,
if (flags) if (flags)
flag |= SOAPY_SDR_HAS_TIME; flag |= SOAPY_SDR_HAS_TIME;
long long timeNs = SoapySDR::ticksToTimeNs(timestamp, s->sample_rate); long long timeNs = SoapySDR::ticksToTimeNs(timestamp, s->sample_rate/SAMPLE_RATE_DOWN);
int samples_sent = 0; int samples_sent = 0;
uint32_t **samps = (uint32_t **)buff; uint32_t **samps = (uint32_t **)buff;
while (samples_sent < nsamps) while (samples_sent < nsamps)
...@@ -148,7 +149,7 @@ static int trx_iris_write(openair0_device *device, openair0_timestamp timestamp, ...@@ -148,7 +149,7 @@ static int trx_iris_write(openair0_device *device, openair0_timestamp timestamp,
printf("[xmit] Timeout occured!\n"); printf("[xmit] Timeout occured!\n");
else if (ret == SOAPY_SDR_STREAM_ERROR) else if (ret == SOAPY_SDR_STREAM_ERROR)
printf("[xmit] Stream (tx) error occured!\n"); printf("[xmit] Stream (tx) error occured!\n");
*/ */
return nsamps; return nsamps;
} }
...@@ -204,7 +205,7 @@ static int trx_iris_read(openair0_device *device, openair0_timestamp *ptimestamp ...@@ -204,7 +205,7 @@ static int trx_iris_read(openair0_device *device, openair0_timestamp *ptimestamp
{ {
if (flags & SOAPY_SDR_HAS_TIME) if (flags & SOAPY_SDR_HAS_TIME)
{ {
s->rx_timestamp = SoapySDR::timeNsToTicks(timeNs, s->sample_rate); s->rx_timestamp = SoapySDR::timeNsToTicks(timeNs, s->sample_rate/SAMPLE_RATE_DOWN);
*ptimestamp = s->rx_timestamp; *ptimestamp = s->rx_timestamp;
nextTime = timeNs; nextTime = timeNs;
nextTimeValid = true; nextTimeValid = true;
...@@ -223,11 +224,11 @@ static int trx_iris_read(openair0_device *device, openair0_timestamp *ptimestamp ...@@ -223,11 +224,11 @@ static int trx_iris_read(openair0_device *device, openair0_timestamp *ptimestamp
{ {
if (!time_set) if (!time_set)
{ {
s->rx_timestamp = SoapySDR::timeNsToTicks(nextTime, s->sample_rate); s->rx_timestamp = SoapySDR::timeNsToTicks(nextTime, s->sample_rate/SAMPLE_RATE_DOWN);
*ptimestamp = s->rx_timestamp; *ptimestamp = s->rx_timestamp;
//printf("2) time set %llu, nextTime will be %llu \n", *ptimestamp, nextTime); //printf("2) time set %llu, nextTime will be %llu \n", *ptimestamp, nextTime);
} }
nextTime += SoapySDR::ticksToTimeNs(samples_received, s->sample_rate); nextTime += SoapySDR::ticksToTimeNs(samples_received, s->sample_rate/SAMPLE_RATE_DOWN);
} }
return samples_received; return samples_received;
...@@ -326,7 +327,7 @@ int trx_iris_stop(openair0_device* device) { ...@@ -326,7 +327,7 @@ int trx_iris_stop(openair0_device* device) {
/*! \brief Iris RX calibration table */ /*! \brief Iris RX calibration table */
rx_gain_calib_table_t calib_table_iris[] = { rx_gain_calib_table_t calib_table_iris[] = {
{3500000000.0,24}, {3500000000.0,24},
{2660000000.0,9}, {2660000000.0,70},
{2300000000.0,8}, {2300000000.0,8},
{1880000000.0,11}, {1880000000.0,11},
{816000000.0,4}, {816000000.0,4},
...@@ -422,7 +423,7 @@ extern "C" { ...@@ -422,7 +423,7 @@ extern "C" {
device->openair0_cfg = openair0_cfg; device->openair0_cfg = openair0_cfg;
char* remote_addr = device->openair0_cfg->remote_addr; char* remote_addr = device->openair0_cfg->remote_addr;
LOG_I(HW,"Attempting to open Iris device: %s\n", remote_addr); LOG_I(HW,"Attempting to open Iris device: %s\n", remote_addr);
std::string args = "driver=remote,serial="+std::string(remote_addr); std::string args = "driver=remote,serial="+std::string(remote_addr)+",remote:format=CS16";
s->iris = SoapySDR::Device::make(args); s->iris = SoapySDR::Device::make(args);
device->type=IRIS_DEV; device->type=IRIS_DEV;
...@@ -433,32 +434,32 @@ extern "C" { ...@@ -433,32 +434,32 @@ extern "C" {
case 30720000: case 30720000:
//openair0_cfg[0].samples_per_packet = 1024; //openair0_cfg[0].samples_per_packet = 1024;
//openair0_cfg[0].tx_sample_advance = 115; //openair0_cfg[0].tx_sample_advance = 115;
openair0_cfg[0].tx_bw = 30e6; openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 30e6; openair0_cfg[0].rx_bw = 20e6;
break; break;
case 23040000: case 23040000:
//openair0_cfg[0].samples_per_packet = 1024; //openair0_cfg[0].samples_per_packet = 1024;
//openair0_cfg[0].tx_sample_advance = 113; //openair0_cfg[0].tx_sample_advance = 113;
openair0_cfg[0].tx_bw = 30e6; openair0_cfg[0].tx_bw = 15e6;
openair0_cfg[0].rx_bw = 30e6; openair0_cfg[0].rx_bw = 15e6;
break; break;
case 15360000: case 15360000:
//openair0_cfg[0].samples_per_packet = 1024; //openair0_cfg[0].samples_per_packet = 1024;
//openair0_cfg[0].tx_sample_advance = 103; //openair0_cfg[0].tx_sample_advance = 103;
openair0_cfg[0].tx_bw = 30e6; openair0_cfg[0].tx_bw = 10e6;
openair0_cfg[0].rx_bw = 30e6; openair0_cfg[0].rx_bw = 10e6;
break; break;
case 7680000: case 7680000:
//openair0_cfg[0].samples_per_packet = 1024; //openair0_cfg[0].samples_per_packet = 1024;
//openair0_cfg[0].tx_sample_advance = 80; //openair0_cfg[0].tx_sample_advance = 80;
openair0_cfg[0].tx_bw = 30e6; openair0_cfg[0].tx_bw = 5e6;
openair0_cfg[0].rx_bw = 30e6; openair0_cfg[0].rx_bw = 5e6;
break; break;
case 1920000: case 1920000:
//openair0_cfg[0].samples_per_packet = 1024; //openair0_cfg[0].samples_per_packet = 1024;
//openair0_cfg[0].tx_sample_advance = 40; //openair0_cfg[0].tx_sample_advance = 40;
openair0_cfg[0].tx_bw = 30e6; openair0_cfg[0].tx_bw = 5e6;
openair0_cfg[0].rx_bw = 30e6; openair0_cfg[0].rx_bw = 5e6;
break; break;
default: default:
printf("Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); printf("Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate);
...@@ -469,7 +470,7 @@ extern "C" { ...@@ -469,7 +470,7 @@ extern "C" {
for(i=0; i < s->iris->getNumChannels(SOAPY_SDR_RX); i++) { for(i=0; i < s->iris->getNumChannels(SOAPY_SDR_RX); i++) {
if (i < openair0_cfg[0].rx_num_channels) { if (i < openair0_cfg[0].rx_num_channels) {
s->iris->setSampleRate(SOAPY_SDR_RX, i, openair0_cfg[0].sample_rate); s->iris->setSampleRate(SOAPY_SDR_RX, i, openair0_cfg[0].sample_rate/SAMPLE_RATE_DOWN);
s->iris->setFrequency(SOAPY_SDR_RX, i, "RF", openair0_cfg[0].rx_freq[i]); s->iris->setFrequency(SOAPY_SDR_RX, i, "RF", openair0_cfg[0].rx_freq[i]);
set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust);
...@@ -481,7 +482,7 @@ extern "C" { ...@@ -481,7 +482,7 @@ extern "C" {
} }
for(i=0; i < s->iris->getNumChannels(SOAPY_SDR_TX); i++) { for(i=0; i < s->iris->getNumChannels(SOAPY_SDR_TX); i++) {
if (i < openair0_cfg[0].tx_num_channels) { if (i < openair0_cfg[0].tx_num_channels) {
s->iris->setSampleRate(SOAPY_SDR_TX, i, openair0_cfg[0].sample_rate); s->iris->setSampleRate(SOAPY_SDR_TX, i, openair0_cfg[0].sample_rate/SAMPLE_RATE_DOWN);
s->iris->setFrequency(SOAPY_SDR_TX, i, "RF", openair0_cfg[0].tx_freq[i]); s->iris->setFrequency(SOAPY_SDR_TX, i, "RF", openair0_cfg[0].tx_freq[i]);
s->iris->setGain(SOAPY_SDR_TX, i, openair0_cfg[0].tx_gain[i]); s->iris->setGain(SOAPY_SDR_TX, i, openair0_cfg[0].tx_gain[i]);
} }
......
...@@ -33,14 +33,14 @@ eNBs = ...@@ -33,14 +33,14 @@ eNBs =
eutra_band = 7; eutra_band = 7;
downlink_frequency = 2660000000L; downlink_frequency = 2660000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 57; Nid_cell = 10;
N_RB_DL = 6; N_RB_DL = 25;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antenna_ports = 1; nb_antenna_ports = 1;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 40; tx_gain = 52;
rx_gain = 10; rx_gain = 100;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
...@@ -50,7 +50,7 @@ eNBs = ...@@ -50,7 +50,7 @@ eNBs =
pucch_nRB_CQI = 1; pucch_nRB_CQI = 1;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -24; pdsch_referenceSignalPower = -27;
pdsch_p_b = 0; pdsch_p_b = 0;
pusch_n_SB = 1; pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE"; pusch_enable64QAM = "DISABLE";
...@@ -70,7 +70,7 @@ eNBs = ...@@ -70,7 +70,7 @@ eNBs =
pusch_p0_Nominal = -90; pusch_p0_Nominal = -90;
pusch_alpha = "AL1"; pusch_alpha = "AL1";
pucch_p0_Nominal = -96; pucch_p0_Nominal = -108;
msg3_delta_Preamble = 6; msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2"; pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3"; pucch_deltaF_Format1b = "deltaF3";
...@@ -86,7 +86,7 @@ eNBs = ...@@ -86,7 +86,7 @@ eNBs =
rach_messagePowerOffsetGroupB = ; rach_messagePowerOffsetGroupB = ;
*/ */
rach_powerRampingStep = 4; rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -104; rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10; rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10; rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48; rach_macContentionResolutionTimer = 48;
...@@ -144,11 +144,10 @@ eNBs = ...@@ -144,11 +144,10 @@ eNBs =
} }
); );
rrh_gw_config = ( rrh_gw_config = ({
{
local_if_name = "eth0"; local_if_name = "eth0";
remote_address = "0127"; remote_address = "0106";
local_address = "10.224.20.21"; local_address = "10.224.20.47";
local_port = 50000; #for raw option local port must be the same to remote local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000; remote_port = 50000;
rrh_gw_active = "yes"; rrh_gw_active = "yes";
...@@ -158,8 +157,7 @@ rrh_gw_config = ( ...@@ -158,8 +157,7 @@ rrh_gw_config = (
tx_sample_advance = 60; tx_sample_advance = 60;
tx_scheduling_advance = 9; tx_scheduling_advance = 9;
} });
);
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment