Commit b91caeab authored by Florian Kaltenberger's avatar Florian Kaltenberger

update of tdd reciprocity measurement scripts


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4069 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 4c603564
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
clear clear
paramsinitialized=false; paramsinitialized=false;
limeparms; limeparms;
rxgain=30; rxgain=0;
txgain=25; txgain=5;
eNB_flag = 0; eNB_flag = 0;
card = 0; card = 0;
Ntrx=4; Ntrx=4;
dual_tx=0; dual_tx=0;
active_rfA=[1 0 0 0]; active_rfA=[1 0 0 0];
active_rfB=[0 1 0 0]; active_rfB=[0 1 1 0];
active_rf=active_rfA+active_rfB; active_rf=active_rfA+active_rfB;
if(active_rfA*active_rfB'!=0) error("The A and B transceive chains must be orthogonal./n") endif if(active_rfA*active_rfB'!=0) error("The A and B transceive chains must be orthogonal./n") endif
...@@ -22,10 +22,12 @@ fc = 1912600000; %1907600000; ...@@ -22,10 +22,12 @@ fc = 1912600000; %1907600000;
%fc = 859.5e6; %fc = 859.5e6;
%rf_mode=(RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAByp+RFBBLNA1) * active_rf;
autocal_mode=active_rf; autocal_mode=active_rf;
rf_mode=(TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAMax+RFBBNORM) * active_rf; %rf_mode=(RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAByp+RFBBLNA1) * active_rf;
tdd_config = DUPLEXMODE_FDD+TXRXSWITCH_TESTTX; LSBSWITCH_FLAG=false; %rf_mode=(TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAMax+RFBBNORM) * active_rf;
% we have to enable both DMA transfers so that the switching signal in the LSB of the TX buffer gets set
rf_mode=(TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAMax+RFBBNORM+DMAMODE_TX+TXEN+DMAMODE_RX+RXEN) * active_rf;
tdd_config = DUPLEXMODE_FDD+TXRXSWITCH_LSB; LSBSWITCH_FLAG=false; %we also need the LSB switching for the woduplex script, otherwise we don't receive anything
%tdd_config = DUPLEXMODE_FDD+TXRXSWITCH_LSB; LSBSWITCH_FLAG=true; %tdd_config = DUPLEXMODE_FDD+TXRXSWITCH_LSB; LSBSWITCH_FLAG=true;
syncmode = SYNCMODE_FREE; syncmode = SYNCMODE_FREE;
rf_local = [8254744 8255063 8257340 8257340]; %eNB2tx 1.9GHz rf_local = [8254744 8255063 8257340 8257340]; %eNB2tx 1.9GHz
......
...@@ -28,30 +28,34 @@ if(paramsinitialized && ~LSBSWITCH_FLAG) ...@@ -28,30 +28,34 @@ if(paramsinitialized && ~LSBSWITCH_FLAG)
for i=1:4 for i=1:4
if(indA(ia)==i) if(indA(ia)==i)
[Da2b_T, tmps]=genrandpskseq(N,M,amp); [Da2b_T, tmps]=genrandpskseq(N,M,amp);
signalA2B(:,i)=tmps; signalA2B(:,i)=tmps*2; %make sure LSB is 0 (switch=tx)
signalB2A(:,i)=repmat(1+1j,76800,1); %make sure LSB is 1 (switch=rx)
if(length(indA)> ia) ia=ia+1; endif if(length(indA)> ia) ia=ia+1; endif
endif endif
if(indB(ib)==i) if(indB(ib)==i)
% This part could be improved by creating fully orthogonal sequences % This part could be improved by creating fully orthogonal sequences
[tmpd, tmps]=genrandpskseq(N,M,amp); [tmpd, tmps]=genrandpskseq(N,M,amp);
signalB2A(:,i)=tmps; signalB2A(:,i)=tmps*2;
signalA2B(:,i)=repmat(1+1j,76800,1);
Db2a_T=[Db2a_T tmpd]; Db2a_T=[Db2a_T tmpd];
if(length(indB)> ib) ib=ib+1; endif if(length(indB)> ib) ib=ib+1; endif
endif endif
endfor endfor
# %% ------- Node A to B transmission ------- %% # %% ------- Node A to B transmission ------- %%
rf_mode_current = rf_mode + (DMAMODE_TX+TXEN)*active_rfA +(DMAMODE_RX+RXEN)*active_rfB; rf_mode_current = rf_mode; % + (DMAMODE_TX+TXEN)*active_rfA +(DMAMODE_RX+RXEN)*active_rfB;
oarf_config_exmimo(card, freq_rx,freq_tx,tdd_config,syncmode,rx_gain,tx_gain,eNB_flag,rf_mode_current,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal_mode); oarf_config_exmimo(card,freq_rx,freq_tx,tdd_config,syncmode,rx_gain,tx_gain,eNB_flag,rf_mode_current,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal_mode);
oarf_send_frame(card,signalA2B,n_bit); oarf_send_frame(card,signalA2B,n_bit);
%keyboard
receivedA2B=oarf_get_frame(card); receivedA2B=oarf_get_frame(card);
oarf_stop(card); oarf_stop(card);
# %% ------- Node B to A transmission ------- %% # %% ------- Node B to A transmission ------- %%
rf_mode_current = rf_mode + (DMAMODE_TX+TXEN)*active_rfB +(DMAMODE_RX+RXEN)*active_rfA; rf_mode_current = rf_mode; % + (DMAMODE_TX+TXEN)*active_rfB +(DMAMODE_RX+RXEN)*active_rfA;
oarf_config_exmimo(card, freq_rx,freq_tx,tdd_config,syncmode,rx_gain,tx_gain,eNB_flag,rf_mode_current,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal_mode); oarf_config_exmimo(card,freq_rx,freq_tx,tdd_config,syncmode,rx_gain,tx_gain,eNB_flag,rf_mode_current,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal_mode);
oarf_send_frame(card,signalB2A,n_bit); oarf_send_frame(card,signalB2A,n_bit);
%keyboard
receivedB2A=oarf_get_frame(card); receivedB2A=oarf_get_frame(card);
oarf_stop(card); oarf_stop(card);
......
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