Commit c2c2ae54 authored by Florian Kaltenberger's avatar Florian Kaltenberger
Browse files

fix for get_frame for reciprocity measurements & other updates


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4071 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e27c3f3f
......@@ -133,10 +133,14 @@ DEFUN_DLD (oarf_get_frame, args, nargout,"Get frame")
ComplexMatrix dx (FRAME_LENGTH_COMPLEX_SAMPLES, numant);
/*
// set the tx buffer to 0x00010001 to put switch in rx mode
for (aa=0; aa<numant; aa++)
for (i=0; i<FRAME_LENGTH_COMPLEX_SAMPLES; i++)
((int*)(openair0_exmimo_pci[card].adc_head[aa]))[i] = 0x00010001;
((int*)(openair0_exmimo_pci[card].dac_head[aa]))[i] = 0x00010001;
*/
if ((openair0_exmimo_pci[card].exmimo_config_ptr->framing.tdd_config & TXRXSWITCH_MASK) != TXRXSWITCH_TESTRX)
printf("Warning: tdd_config is not set to TXRXSWITCH_TESTRX! You better know what you are doing! :)\n");
// assign userspace pointers
for (i=0; i<numant; i++)
......
......@@ -92,6 +92,10 @@ DEFUN_DLD (oarf_send_frame, args, nargout,"Send frame")
return octave_value_list();
}
if ((openair0_exmimo_pci[card].exmimo_config_ptr->framing.tdd_config & TXRXSWITCH_MASK) != TXRXSWITCH_TESTTX)
printf("Warning: tdd_config is not set to TXRXSWITCH_TESTTX! You better know what you are doing! :)\n");
nbits = args(2).scalar_value();
for (aa=0;aa<numcols;aa++)
......
dual_tx=0;
card=0;
limeparms;
active_rf = [0 1 0 0];
active_rf = [1 1 1 1];
%rf_mode = (RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAMax+RFBBNORM)*[1 1 1 1];
rf_mode = (RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAMax+RFBBNORM)*active_rf;
rf_mode = rf_mode+((DMAMODE_RX)*[0 1 0 0]);
rf_mode = rf_mode+(DMAMODE_RX*active_rf);
%freq_rx = 2540000000*[1 1 1 1];
%freq_rx = 1907600000*[1 1 1 0];
freq_rx = 1912600000*active_rf; %+ 2540000000*[0 1 0 0]; % + 859500000*[0 0 1 0];
......@@ -23,11 +23,12 @@ eNBflag = 0;
tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_TESTRX;
%tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
syncmode = SYNCMODE_FREE;
rffe_rxg_low = 61*[1 1 1 1];
rffe_rxg_final = 61*[1 1 1 1];
rffe_band = B19G_TDD*[1 1 1 1];
rffe_rxg_low = 61*active_rf;
rffe_rxg_final = 61*active_rf;
rffe_band = B19G_TDD*active_rf;
autocal = [1 1 1 1];
oarf_config_exmimo(card,freq_rx,freq_tx,tdd_config,syncmode,rx_gain,tx_gain,eNBflag,rf_mode,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band)
oarf_config_exmimo(card,freq_rx,freq_tx,tdd_config,syncmode,rx_gain,tx_gain,eNBflag,rf_mode,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal)
gpib_card=0; % first GPIB PCI card in the computer
gpib_device=28; % this is configured in the signal generator Utilities->System
......
......@@ -8,8 +8,8 @@ eNB_flag = 0;
card = 0;
limeparms;
rf_mode = (RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAMax+RFBBNORM) * [1 1 0 0 ];
rf_mode = rf_mode + (DMAMODE_TX)*[1 0 0 0];
rf_mode = (RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAMax+RFBBNORM) * [1 1 1 1];
rf_mode = rf_mode + (DMAMODE_TX)*[1 1 1 1];
%rf_mode = RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAByp+RFBBLNA1;
%rf_local= [8253704 8253704 8257340 8257340]; %eNB2tx %850MHz
%rf_local= [8255004 8253440 8257340 8257340]; % ex2 700 MHz
......@@ -31,20 +31,23 @@ syncmode = SYNCMODE_FREE;
rffe_rxg_low = 61*[1 1 1 1];
rffe_rxg_final = 61*[1 1 1 1];
rffe_band = B19G_TDD*[1 1 1 1];
autocal = [1 1 1 1];
oarf_config_exmimo(card, freq_rx,freq_tx,tdd_config,syncmode,rxgain,txgain,eNB_flag,rf_mode,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band);
oarf_config_exmimo(card, freq_rx,freq_tx,tdd_config,syncmode,rxgain,txgain,eNB_flag,rf_mode,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal);
amp = pow2(14)-1;
n_bit = 16;
s = zeros(76800,2);
s = zeros(76800,4);
select = 1;
switch(select)
case 1
s(:,1) = floor(amp * real(exp(sqrt(-1)*.5*pi*(0:((76800)-1)))));
s(:,2) = floor(amp * imag(exp(sqrt(-1)*.5*pi*(0:((76800)-1)))));
s(:,1) = floor(amp * (exp(sqrt(-1)*.5*pi*(0:((76800)-1)))));
s(:,2) = floor(amp * (exp(sqrt(-1)*.5*pi*(0:((76800)-1)))));
s(:,3) = floor(amp * (exp(sqrt(-1)*.5*pi*(0:((76800)-1)))));
s(:,4) = floor(amp * (exp(sqrt(-1)*.5*pi*(0:((76800)-1)))));
case 2
s(38400+128,1)= 80-1j*40;
......
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