Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG UE
Commits
896a669f
Commit
896a669f
authored
Dec 13, 2013
by
ghaddab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@4711
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
e300bc1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
19 deletions
+90
-19
targets/ARCH/EXMIMO/USERSPACE/OCTAVE/rx_spec.m
targets/ARCH/EXMIMO/USERSPACE/OCTAVE/rx_spec.m
+90
-19
No files found.
targets/ARCH/EXMIMO/USERSPACE/OCTAVE/rx_spec.m
View file @
896a669f
dual_tx
=
0
;
dual_tx
=
0
;
card
=
0
;
card
=
0
;
limeparms
;
limeparms
;
active_rf
=
[
1
1
0
0
];
active_rf
=
zeros
(
1
,
4
);
active_rf
=
[
1
1
1
1
];
autocal
=
[
1
1
1
1
];
resampling_factor
=
[
2
2
2
2
];
%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)*[1 1 1 1];
rf_mode
=
(
RXEN
+
TXLPFNORM
+
TXLPFEN
+
TXLPF25
+
RXLPFNORM
+
RXLPFEN
+
RXLPF25
+
LNA1ON
+
LNAMax
+
RFBBNORM
)
*
active_rf
;
rf_mode
=
(
RXEN
+
TXLPFNORM
+
TXLPFEN
+
TXLPF25
+
RXLPFNORM
+
RXLPFEN
+
RXLPF25
+
LNA1ON
+
LNAMax
+
RFBBNORM
)
*
active_rf
;
rf_mode
=
rf_mode
+
(
DMAMODE_RX
*
active_rf
);
rf_mode
=
rf_mode
+
(
(
DMAMODE_RX
+
DMAMODE_TX
)
*
active_rf
);
%freq_rx = 2540000000*[1 1 1 1];
%freq_rx = 2540000000*[1 1 1 1];
freq_rx
=
1907600000
*
active_rf
;
freq_rx
=
1907600000
*
active_rf
;
%freq_rx =
19126
00000*active_rf; %+ 2540000000*[0 1 0 0]; % + 859500000*[0 0 1 0];
%freq_rx =
26800
00000*active_rf; %+ 2540000000*[0 1 0 0]; % + 859500000*[0 0 1 0];
%freq_rx = 1912600000*[1 1 1 1];
%freq_rx = 1912600000*[1 1 1 1];
%freq_rx = 859500000*[1 1 1 1];
%freq_rx = 859500000*[1 1 1 1];
freq_tx
=
freq_rx
;
freq_tx
=
freq_rx
-
120000000
*
active_rf
;
tx_gain
=
0
*
[
1
1
1
1
];
tx_gain
=
0
*
active_rf
;
%
[1 1 1 1];
rx_gain
=
0
*
[
1
1
1
1
];
rx_gain
=
0
*
active_rf
;
%
1 1 1 1];
rf_local
=
rf_local
*
[
1
1
1
1
];
rf_local
=
rf_local
*
active_rf
;
%
[1 1 1 1];
rf_rxdc
=
rf_rxdc
*
[
1
1
1
1
];
rf_rxdc
=
rf_rxdc
*
active_rf
;
%
[1 1 1 1];
%rf_vcocal=rf_vcocal_859*[1 1 1 1];
%rf_vcocal=rf_vcocal_859*[1 1 1 1];
rf_vcocal
=
rf_vcocal_19G
*
[
1
1
1
1
];
rf_vcocal
=
rf_vcocal_19G
*
active_rf
;
%
1 1 1 1];
eNBflag
=
0
;
eNBflag
=
0
;
tdd_config
=
DUPLEXMODE_FDD
+
TXRXSWITCH_TESTRX
;
tdd_config
=
DUPLEXMODE_FDD
+
TXRXSWITCH_TESTRX
;
%tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
%tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
syncmode
=
SYNCMODE_FREE
;
syncmode
=
SYNCMODE_FREE
;
rffe_rxg_low
=
63
*
active_rf
;
rffe_rxg_low
=
31
*
active_rf
;
%[1 1 1 1];
rffe_rxg_final
=
31
*
active_rf
;
rffe_rxg_final
=
63
*
active_rf
;
%[1 1 1 1];
rffe_band
=
B19G_TDD
*
active_rf
;
rffe_band
=
B19G_TDD
*
active_rf
;
%[1 1 1 1];
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
,
autocal
,
resampling_factor
)
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
,
autocal
)
gpib_card
=
0
;
% first GPIB PCI card in the computer
gpib_card
=
0
;
% first GPIB PCI card in the computer
gpib_device
=
28
;
% this is configured in the signal generator Utilities->System
gpib_device
=
28
;
% this is configured in the signal generator Utilities->System
...
@@ -39,15 +41,84 @@ power_dBm = -95;
...
@@ -39,15 +41,84 @@ power_dBm = -95;
s
=
oarf_get_frame
(
card
);
s
=
oarf_get_frame
(
card
);
f
=
(
7.68
*
(
0
:
length
(
s
(:,
1
))
-
1
)/(
length
(
s
(:,
1
))))
-
3.84
;
if
(
resampling_factor
(
1
)
==
2
)
f0
=
(
7.68
*
(
0
:
length
(
s
(:,
1
))
-
1
)/(
length
(
s
(:,
1
))))
-
3.84
;
axis
([
-
3.84
,
3.84
,
40
,
200
]);
elseif
(
resampling_factor
(
1
)
==
1
)
f0
=
(
15.36
*
(
0
:
length
(
s
(:,
1
))
-
1
)/(
length
(
s
(:,
1
))))
-
7.68
;
axis
([
-
7.68
,
7.68
,
40
,
200
]);
else
f0
=
(
30.72
*
(
0
:
length
(
s
(:,
1
))
-
1
)/(
length
(
s
(:,
1
))))
-
15.36
;
axis
([
-
15.36
,
15.36
,
40
,
200
]);
endif
if
(
resampling_factor
(
2
)
==
2
)
f1
=
(
7.68
*
(
0
:
length
(
s
(:,
2
))
-
1
)/(
length
(
s
(:,
2
))))
-
3.84
;
axis
([
-
3.84
,
3.84
,
40
,
200
]);
elseif
(
resampling_factor
(
2
)
==
1
)
f1
=
(
15.36
*
(
0
:
length
(
s
(:,
2
))
-
1
)/(
length
(
s
(:,
2
))))
-
7.68
;
axis
([
-
7.68
,
7.68
,
40
,
200
]);
else
f1
=
(
30.72
*
(
0
:
length
(
s
(:,
2
))
-
1
)/(
length
(
s
(:,
2
))))
-
15.36
;
axis
([
-
15.36
,
15.36
,
40
,
200
]);
endif
if
(
resampling_factor
(
3
)
==
2
)
f2
=
(
7.68
*
(
0
:
length
(
s
(:,
3
))
-
1
)/(
length
(
s
(:,
3
))))
-
3.84
;
axis
([
-
3.84
,
3.84
,
40
,
200
]);
elseif
(
resampling_factor
(
3
)
==
1
)
f2
=
(
15.36
*
(
0
:
length
(
s
(:,
3
))
-
1
)/(
length
(
s
(:,
3
))))
-
7.68
;
axis
([
-
7.68
,
7.68
,
40
,
200
]);
else
f2
=
(
30.72
*
(
0
:
length
(
s
(:,
3
))
-
1
)/(
length
(
s
(:,
3
))))
-
15.36
;
axis
([
-
15.36
,
15.36
,
40
,
200
]);
endif
if
(
resampling_factor
(
4
)
==
2
)
f3
=
(
7.68
*
(
0
:
length
(
s
(:,
4
))
-
1
)/(
length
(
s
(:,
4
))))
-
3.84
;
axis
([
-
3.84
,
3.84
,
40
,
200
]);
elseif
(
resampling_factor
(
4
)
==
1
)
f3
=
(
15.36
*
(
0
:
length
(
s
(:,
4
))
-
1
)/(
length
(
s
(:,
4
))))
-
7.68
;
axis
([
-
7.68
,
7.68
,
40
,
200
]);
else
f3
=
(
30.72
*
(
0
:
length
(
s
(:,
4
))
-
1
)/(
length
(
s
(:,
4
))))
-
15.36
;
axis
([
-
15.36
,
15.36
,
40
,
200
]);
endif
spec0
=
20
*
log10
(
abs
(
fftshift
(
fft
(
s
(:,
1
)))));
spec0
=
20
*
log10
(
abs
(
fftshift
(
fft
(
s
(:,
1
)))));
spec1
=
20
*
log10
(
abs
(
fftshift
(
fft
(
s
(:,
2
)))));
spec1
=
20
*
log10
(
abs
(
fftshift
(
fft
(
s
(:,
2
)))));
spec2
=
20
*
log10
(
abs
(
fftshift
(
fft
(
s
(:,
3
)))));
spec2
=
20
*
log10
(
abs
(
fftshift
(
fft
(
s
(:,
3
)))));
spec3
=
20
*
log10
(
abs
(
fftshift
(
fft
(
s
(:,
4
)))));
spec3
=
20
*
log10
(
abs
(
fftshift
(
fft
(
s
(:,
4
)))));
clf
clf
plot
(
f
',spec0,'
r
',f'
,
spec1
,
'b'
,
f
',spec2,'
g
',f'
,
spec3
,
'm'
)
if
(
active_rf
(
1
)
==
1
)
axis
([
-
3.84
,
3.84
,
40
,
160
]);
hold
off
;
plot
(
f0
',spec0,'
r
'
);
endif
%hold on
if
(
active_rf
(
2
)
==
1
)
hold
off
;
figure
;
plot
(
f1
',spec1,'
b
'
);
endif
%hold on
if
(
active_rf
(
3
)
==
1
)
hold
off
;
figure
;
plot
(
f2
',spec2,'
g
'
);
endif
%hold on
if
(
active_rf
(
4
)
==
1
)
hold
off
;
figure
;
plot
(
f3
',spec3,'
m
'
);
endif
%hold on
%hold off
%axis([-3.84,3.84,40,160]);
%gpib_send(gpib_card,gpib_device,'OUTP:STAT OFF'); % activate output
%gpib_send(gpib_card,gpib_device,'OUTP:STAT OFF'); % activate output
legend
(
'Antenna Port 0'
,
'Antenna Port 1'
,
'Antenna Port 2'
,
'Antenna Port 3'
);
%
legend('Antenna Port 0','Antenna Port 1','Antenna Port 2','Antenna Port 3');
grid
grid
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment