Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
常顺宇
OpenXG-RAN
Commits
cfd30ec3
Commit
cfd30ec3
authored
Aug 18, 2014
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5730
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
c31e2330
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
29 deletions
+32
-29
targets/ARCH/EXMIMO/USERSPACE/OCTAVE/txsig.m
targets/ARCH/EXMIMO/USERSPACE/OCTAVE/txsig.m
+32
-29
No files found.
targets/ARCH/EXMIMO/USERSPACE/OCTAVE/txsig.m
View file @
cfd30ec3
%fc = 266
0000000;
fc
=
268
0000000
;
%fc = 1907600000;
%fc = 1907600000;
%fc = 859.5e6;
%fc = 859.5e6;
fc
=
[
2051800000
2051800000
1551800000
2000000000
];
rxgain
=
0
;
rxgain
=
0
;
txgain
=
20
;
txgain
=
20
;
...
@@ -11,7 +10,7 @@ active_rf = [1 0 0 0];
...
@@ -11,7 +10,7 @@ active_rf = [1 0 0 0];
autocal
=
[
1
1
1
1
];
autocal
=
[
1
1
1
1
];
resampling_factor
=
[
0
0
0
0
];
resampling_factor
=
[
0
0
0
0
];
limeparms
;
limeparms
;
rf_mode
=
(
RXEN
+
TXEN
+
TXLPFNORM
+
TXLPFEN
+
TXLPF
25
+
RXLPFNORM
+
RXLPFEN
+
RXLPF25
+
LNA1ON
+
LNAMax
+
RFBBNORM
)
*
active_rf
;
rf_mode
=
(
RXEN
+
TXEN
+
TXLPFNORM
+
TXLPFEN
+
TXLPF
10
+
RXLPFNORM
+
RXLPFEN
+
RXLPF10
+
LNA1ON
+
LNAMax
+
RFBBNORM
)
*
active_rf
;
rf_mode
=
rf_mode
+
(
DMAMODE_RX
+
DMAMODE_TX
)
*
active_rf
;
rf_mode
=
rf_mode
+
(
DMAMODE_RX
+
DMAMODE_TX
)
*
active_rf
;
%rf_mode = rf_mode + (DMAMODE_TX)*active_rf + DMAMODE_RX*active_rf;
%rf_mode = rf_mode + (DMAMODE_TX)*active_rf + DMAMODE_RX*active_rf;
%rf_mode = RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAByp+RFBBLNA1;
%rf_mode = RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAByp+RFBBLNA1;
...
@@ -25,11 +24,12 @@ rf_rxdc = rf_rxdc * active_rf;
...
@@ -25,11 +24,12 @@ rf_rxdc = rf_rxdc * active_rf;
rf_vcocal
=
rf_vcocal_19G
*
active_rf
;
rf_vcocal
=
rf_vcocal_19G
*
active_rf
;
%rf_vcocal = rf_vcocal_26G_eNB * chan_sel;
%rf_vcocal = rf_vcocal_26G_eNB * chan_sel;
rxgain
=
rxgain
*
active_rf
;
rxgain
=
rxgain
*
active_rf
;
txgain
=
txgain
*
[
2
2
1
1
]
;
txgain
=
txgain
*
active_rf
;
freq_tx
=
fc
.*
active_rf
;
freq_tx
=
fc
.*
active_rf
;
freq_rx
=
freq_tx
;
freq_rx
=
freq_tx
;
%freq_rx = freq_tx-120000000*chan_sel;
%freq_rx = freq_tx-120000000*chan_sel;
%freq_tx = freq_rx+1920000;
%freq_tx = freq_rx+1920000;
%tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
tdd_config
=
DUPLEXMODE_FDD
+
TXRXSWITCH_TESTTX
;
tdd_config
=
DUPLEXMODE_FDD
+
TXRXSWITCH_TESTTX
;
syncmode
=
SYNCMODE_FREE
;
syncmode
=
SYNCMODE_FREE
;
rffe_rxg_low
=
61
*
[
1
1
1
1
];
rffe_rxg_low
=
61
*
[
1
1
1
1
];
...
@@ -40,23 +40,25 @@ oarf_config_exmimo(card, freq_rx,freq_tx,tdd_config,syncmode,rxgain,txgain,eNB_f
...
@@ -40,23 +40,25 @@ oarf_config_exmimo(card, freq_rx,freq_tx,tdd_config,syncmode,rxgain,txgain,eNB_f
amp
=
pow2
(
14
)
-
1
;
amp
=
pow2
(
14
)
-
1
;
n_bit
=
16
;
n_bit
=
16
;
s
=
zeros
(
76800
,
4
);
length
=
pow2
(
2
-
resampling_factor
(
1
)
);
select
=
0
;
s
=
zeros
(
length
,
4
);
select
=
6
;
switch
(
select
)
switch
(
select
)
case
0
case
0
s
(:,
1
)
=
amp
*
ones
(
1
,
76800
);
s
(:,
1
)
=
amp
*
ones
(
1
,
length
);
s
(:,
2
)
=
amp
*
ones
(
1
,
76800
);
s
(:,
2
)
=
amp
*
ones
(
1
,
length
);
s
(:,
3
)
=
amp
*
OFDM_TX_FRAME
(
512
,
199
,
128
,
120
,
1
)
.'
;
s
(:,
3
)
=
amp
*
ones
(
1
,
length
)
;
s
(:,
4
)
=
amp
*
ones
(
1
,
76800
);
s
(:,
4
)
=
amp
*
ones
(
1
,
length
);
case
1
case
1
s
(:,
1
)
=
floor
(
amp
*
(
exp
(
1
i
*
2
*
pi
*
(
0
:((
76800
*
4
)
-
1
))/
4
)));
s
(:,
1
)
=
floor
(
amp
*
(
exp
(
1
i
*
2
*
pi
*
(
0
:((
length
*
4
)
-
1
))/
4
)));
s
(:,
2
)
=
floor
(
amp
*
(
exp
(
1
i
*
2
*
pi
*
(
0
:((
76800
*
4
)
-
1
))/
4
)));
s
(:,
2
)
=
floor
(
amp
*
(
exp
(
1
i
*
2
*
pi
*
(
0
:((
length
*
4
)
-
1
))/
4
)));
s
(:,
3
)
=
floor
(
amp
*
(
exp
(
1
i
*
2
*
pi
*
(
0
:((
76800
*
4
)
-
1
))/
4
)));
s
(:,
3
)
=
floor
(
amp
*
(
exp
(
1
i
*
2
*
pi
*
(
0
:((
length
*
4
)
-
1
))/
4
)));
s
(:,
4
)
=
floor
(
amp
*
(
exp
(
1
i
*
2
*
pi
*
(
0
:((
76800
*
4
)
-
1
))/
4
)));
s
(:,
4
)
=
floor
(
amp
*
(
exp
(
1
i
*
2
*
pi
*
(
0
:((
length
*
4
)
-
1
))/
4
)));
case
2
case
2
s
(
38400
+
128
,
1
)
=
80
-
1
j
*
40
;
s
(
38400
+
128
,
1
)
=
80
-
1
j
*
40
;
...
@@ -85,38 +87,39 @@ case 4
...
@@ -85,38 +87,39 @@ case 4
s
(
38400
+
(
1
:
length
(
pss0_t_fp_re
)),
2
)
=
2
*
floor
(
pss0_t_fp_re
)
+
2
*
sqrt
(
-
1
)
*
floor
(
pss0_t_fp_im
);
s
(
38400
+
(
1
:
length
(
pss0_t_fp_re
)),
2
)
=
2
*
floor
(
pss0_t_fp_re
)
+
2
*
sqrt
(
-
1
)
*
floor
(
pss0_t_fp_im
);
s
(
38400
+
(
1
:
length
(
pss0_t_fp_re
)),
3
)
=
2
*
floor
(
pss0_t_fp_re
)
+
2
*
sqrt
(
-
1
)
*
floor
(
pss0_t_fp_im
);
s
(
38400
+
(
1
:
length
(
pss0_t_fp_re
)),
3
)
=
2
*
floor
(
pss0_t_fp_re
)
+
2
*
sqrt
(
-
1
)
*
floor
(
pss0_t_fp_im
);
s
(
38400
+
(
1
:
length
(
pss0_t_fp_re
)),
4
)
=
2
*
floor
(
pss0_t_fp_re
)
+
2
*
sqrt
(
-
1
)
*
floor
(
pss0_t_fp_im
);
s
(
38400
+
(
1
:
length
(
pss0_t_fp_re
)),
4
)
=
2
*
floor
(
pss0_t_fp_re
)
+
2
*
sqrt
(
-
1
)
*
floor
(
pss0_t_fp_im
);
case
5
case
5
x
=
1
:
76800
;
x
=
1
:
length
;
s
(:,
1
)
=
1
i
*
8
*
(
mod
(
x
-
1
,
4096
));
% + 1i*(8*(mod(x-1,4096)));
s
(:,
1
)
=
1
i
*
8
*
(
mod
(
x
-
1
,
4096
));
% + 1i*(8*(mod(x-1,4096)));
s
(:,
2
)
=
8
*
(
mod
(
x
-
1
,
4096
))
+
1
i
*
(
8
*
(
mod
(
x
-
1
,
4096
)));
s
(:,
2
)
=
8
*
(
mod
(
x
-
1
,
4096
))
+
1
i
*
(
8
*
(
mod
(
x
-
1
,
4096
)));
s
(:,
3
)
=
8
*
(
mod
(
x
-
1
,
4096
))
+
1
i
*
(
8
*
(
mod
(
x
-
1
,
4096
)));
s
(:,
3
)
=
8
*
(
mod
(
x
-
1
,
4096
))
+
1
i
*
(
8
*
(
mod
(
x
-
1
,
4096
)));
s
(:,
4
)
=
8
*
(
mod
(
x
-
1
,
4096
))
+
1
i
*
(
8
*
(
mod
(
x
-
1
,
4096
)));
s
(:,
4
)
=
8
*
(
mod
(
x
-
1
,
4096
))
+
1
i
*
(
8
*
(
mod
(
x
-
1
,
4096
)));
% s(:,4) = 8*(rem(x-1,2048))-2**15 + 1i*(8*(rem(x-1,2048))-2**15);
% s(:,4) = 8*(mod(x-1,4096)) + 1i*8*(mod(x-1,4096));
case
6
%s(:,1) = 8*floor(mod(x-1,76800)/75) + 1i*8*floor(mod(x-1,76800)/75);
nb_rb
=
100
;
%this can be 25, 50, or 100
%s(:,2) = 8*floor(mod(x-1,76800)/75) + 1i*8*floor(mod(x-1,76800)/75);
num_carriers
=
2048
/
100
*
nb_rb
;
%s(:,3) = 8*floor(mod(x-1,76800)/75) + 1i*8*floor(mod(x-1,76800)/75);
num_zeros
=
num_carriers
-
(
12
*
nb_rb
+
1
);
%s(:,4) = 8*floor(mod(x-1,76800)/75) + 1i*8*floor(mod(x-1,76800)/75);
prefix_length
=
num_carriers
/
4
;
%this is extended CP
num_symbols_frame
=
120
;
preamble_length
=
120
;
s
(:,
1
)
=
OFDM_TX_FRAME
(
num_carriers
,
num_zeros
,
prefix_length
,
num_symbols_frame
,
preamble_length
);
s
(:,
1
)
=
floor
(
amp
*
(
s
(:,
1
)
.
/
max
([
real
(
s
(:,
1
));
imag
(
s
(:,
1
))])));
otherwise
otherwise
error
(
'unknown case'
)
error
(
'unknown case'
)
endswitch
endswitch
%s = s*2 - 2**15 -1i*(2**15);
s
=
s
*
2
;
s
=
s
*
2
;
%s(38400:end,1) = (1+1j);
%s(38400:end,2) = (1+1j);
sleep
(
1
)
%keyboard
oarf_send_frame
(
card
,
s
,
n_bit
);
oarf_send_frame
(
card
,
s
,
n_bit
);
%sleep (1)
%r = oarf_get_frame(card);
%r = oarf_get_frame(card);
figure
(
1
)
figure
(
1
)
hold
off
hold
off
plot
(
real
(
s
(:,
1
)),
'r'
)
plot
(
real
(
s
(:,
1
)),
'r'
)
...
...
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