initparams.m 1.89 KB
Newer Older
1
2
3
4
# % Author: Mirsad Cirkic
# % Organisation: Eurecom (and Linkoping University)
# % E-mail: mirsad.cirkic@liu.se

5
6
addpath('/homes/kaltenbe/Devel/openair/openair4G/trunk/targets/ARCH/EXMIMO/USERSPACE/OCTAVE');

Cirkic's avatar
Cirkic committed
7
8
9
clear
paramsinitialized=false;
limeparms;
10
rxgain=0;
hu's avatar
hu committed
11
txgain=10;
Cirkic's avatar
Cirkic committed
12
13
14
15
16
eNB_flag = 0;
card = 0;
Ntrx=4;
dual_tx=0;
active_rfA=[1 0 0 0];
17
active_rfB=[0 1 1 0];
Cirkic's avatar
Cirkic committed
18
19
active_rf=active_rfA+active_rfB;

20
21
if(active_rfA*active_rfB'!=0) error("The A and B transceive chains must be orthogonal./n") endif

Cirkic's avatar
Cirkic committed
22
23
24
25
26
27
%fc  = 2660000000;
fc  = 1912600000; %1907600000;
%fc = 859.5e6;


autocal_mode=active_rf;
28
29
30
31
32
%rf_mode=(RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAByp+RFBBLNA1) * active_rf;
%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
33
%tdd_config = DUPLEXMODE_FDD+TXRXSWITCH_LSB; LSBSWITCH_FLAG=true;
Cirkic's avatar
Cirkic committed
34
35
36
37
38
39
40
41
42
43
44
45
syncmode = SYNCMODE_FREE;
rf_local = [8254744   8255063   8257340   8257340]; %eNB2tx 1.9GHz
rf_vcocal=rf_vcocal_19G*active_rf;

rffe_rxg_low = 61*active_rf;
rffe_rxg_final = 61*active_rf;
rffe_band = B19G_TDD*active_rf;

rf_rxdc = rf_rxdc*active_rf;

freq_rx = fc*active_rf; 
freq_tx = freq_rx; %+1.92e6;
46
tx_gain = txgain.*active_rf;
Cirkic's avatar
Cirkic committed
47
48
49
50
51
52
rx_gain = rxgain*active_rf;
oarf_config_exmimo(card, freq_rx,freq_tx,tdd_config,syncmode,rx_gain,tx_gain,eNB_flag,rf_mode,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal_mode);
autocal_mode=0*active_rf; % Autocalibration is only needed the first time we conf. exmimo
amp = pow2(14)-1;
n_bit = 16;
paramsinitialized=true;