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
alex037yang
OpenXG-RAN
Commits
77159002
Commit
77159002
authored
Nov 24, 2016
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more bugfixes (old and introcuded by merge) plus ability too use phy-test for tm7
parent
f216bacb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
33 deletions
+61
-33
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+9
-1
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
+13
-21
openair1/PHY/MODULATION/beamforming.c
openair1/PHY/MODULATION/beamforming.c
+4
-5
openair1/SCHED/phy_mac_stub.c
openair1/SCHED/phy_mac_stub.c
+2
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
...PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
+2
-2
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+13
-2
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+18
-2
No files found.
openair1/PHY/INIT/lte_init.c
View file @
77159002
...
...
@@ -1251,9 +1251,17 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
common_vars
->
beam_weights
[
eNB_id
][
i
]
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_tx
*
sizeof
(
int32_t
*
));
for
(
j
=
0
;
j
<
fp
->
nb_antennas_tx
;
j
++
)
{
common_vars
->
beam_weights
[
eNB_id
][
i
][
j
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
if
(((
i
<=
4
)
&&
(
i
==
j
))
||
(
i
>=
5
))
// antenna ports 0-3 are mapped on antennas 0-3
// antenna port 4 is mapped on antenna 0
// antenna ports 5-14 are mapped on all antennas
if
(((
i
<
4
)
&&
(
i
==
j
))
||
((
i
==
4
)
&&
(
j
==
0
)))
{
for
(
re
=
0
;
re
<
fp
->
ofdm_symbol_size
;
re
++
)
common_vars
->
beam_weights
[
eNB_id
][
i
][
j
][
re
]
=
0x00007fff
;
}
else
if
(
i
>
4
)
{
for
(
re
=
0
;
re
<
fp
->
ofdm_symbol_size
;
re
++
)
common_vars
->
beam_weights
[
eNB_id
][
i
][
j
][
re
]
=
0x00007fff
/
fp
->
nb_antennas_tx
;
}
#ifdef DEBUG_PHY
msg
(
"[openair][LTE_PHY][INIT] lte_common_vars->beam_weights[%d][%d][%d] = %p (%d bytes)
\n
"
,
eNB_id
,
i
,
j
,
common_vars
->
beam_weights
[
eNB_id
][
i
][
j
],
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
View file @
77159002
...
...
@@ -678,15 +678,11 @@ x0[1+*jj]);
case
2
:
//QPSK
// printf("re %d %d(%d) : %d,%d => ",re,tti_offset,*jj,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
0
]
+=
(
x0
[
*
jj
]
==
1
)
?
(
-
gain_lin_QPSK
)
:
gain_lin_QPSK
;
//I //b_i
}
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
0
]
+=
(
x0
[
*
jj
]
==
1
)
?
(
-
gain_lin_QPSK
)
:
gain_lin_QPSK
;
//I //b_i
*
jj
=
*
jj
+
1
;
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
+=
(
x0
[
*
jj
]
==
1
)
?
(
-
gain_lin_QPSK
)
:
gain_lin_QPSK
;
//Q //b_{i+1}
}
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
1
]
+=
(
x0
[
*
jj
]
==
1
)
?
(
-
gain_lin_QPSK
)
:
gain_lin_QPSK
;
//Q //b_{i+1}
*
jj
=
*
jj
+
1
;
...
...
@@ -719,12 +715,10 @@ x0[1+*jj]);
*
jj
=*
jj
+
1
;
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
0
]
+=
qam_table_s0
[
qam16_table_offset_re
];
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
+=
qam_table_s0
[
qam16_table_offset_im
];
// ((int16_t *)&txdataF[aa][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
// ((int16_t *)&txdataF[aa][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
}
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
0
]
+=
qam_table_s0
[
qam16_table_offset_re
];
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
1
]
+=
qam_table_s0
[
qam16_table_offset_im
];
// ((int16_t *)&txdataF[aa][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
// ((int16_t *)&txdataF[aa][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
break
;
...
...
@@ -764,10 +758,8 @@ x0[1+*jj]);
*
jj
=*
jj
+
1
;
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
0
]
+=
qam_table_s0
[
qam64_table_offset_re
];
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
+=
qam_table_s0
[
qam64_table_offset_im
];
}
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
0
]
+=
qam_table_s0
[
qam64_table_offset_re
];
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
1
]
+=
qam_table_s0
[
qam64_table_offset_im
];
break
;
...
...
@@ -970,7 +962,7 @@ x0[1+*jj]);
*
re_allocated
=
*
re_allocated
+
1
;
if
(
frame_parms
->
nb_antenna
s_tx
==
2
)
{
if
(
frame_parms
->
nb_antenna
_ports_eNB
==
2
)
{
switch
(
mod_order0
)
{
default:
LOG_E
(
PHY
,
"Unknown mod_order0 %d
\n
"
,
mod_order0
);
...
...
@@ -1186,7 +1178,7 @@ x0[1+*jj]);
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
0
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
0
]
*
ONE_OVER_SQRT2_Q15
)
>>
15
);
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
1
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
1
]
*
ONE_OVER_SQRT2_Q15
)
>>
15
);
if
(
frame_parms
->
nb_antenna
s_tx
==
2
)
{
if
(
frame_parms
->
nb_antenna
_ports_eNB
==
2
)
{
layer1prec2A
(
&
tmp_sample1
,
&
tmp_sample2
,
precoder_index
);
((
int16_t
*
)
&
txdataF
[
1
][
tti_offset
])[
0
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample2
)[
0
]
*
ONE_OVER_SQRT2_Q15
)
>>
15
);
((
int16_t
*
)
&
txdataF
[
1
][
tti_offset
])[
1
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample2
)[
1
]
*
ONE_OVER_SQRT2_Q15
)
>>
15
);
...
...
@@ -1226,7 +1218,7 @@ x0[1+*jj]);
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
0
]
+=
((
int16_t
*
)
&
tmp_sample1
)[
0
];
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
1
]
+=
((
int16_t
*
)
&
tmp_sample1
)[
1
];
if
(
frame_parms
->
nb_antenna
s_tx
==
2
)
{
if
(
frame_parms
->
nb_antenna
_ports_eNB
==
2
)
{
layer1prec2A
(
&
tmp_sample1
,
&
tmp_sample2
,
precoder_index
);
((
int16_t
*
)
&
txdataF
[
1
][
tti_offset
])[
0
]
+=
((
int16_t
*
)
&
tmp_sample2
)[
0
];
((
int16_t
*
)
&
txdataF
[
1
][
tti_offset
])[
1
]
+=
((
int16_t
*
)
&
tmp_sample2
)[
1
];
...
...
@@ -1276,7 +1268,7 @@ x0[1+*jj]);
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
0
]
+=
((
int16_t
*
)
&
tmp_sample1
)[
0
];
((
int16_t
*
)
&
txdataF
[
0
][
tti_offset
])[
1
]
+=
((
int16_t
*
)
&
tmp_sample1
)[
1
];
if
(
frame_parms
->
nb_antenna
s_tx
==
2
)
{
if
(
frame_parms
->
nb_antenna
_ports_eNB
==
2
)
{
layer1prec2A
(
&
tmp_sample1
,
&
tmp_sample2
,
precoder_index
);
((
int16_t
*
)
&
txdataF
[
1
][
tti_offset
])[
0
]
+=
((
int16_t
*
)
&
tmp_sample2
)[
0
];
((
int16_t
*
)
&
txdataF
[
1
][
tti_offset
])[
1
]
+=
((
int16_t
*
)
&
tmp_sample2
)[
1
];
...
...
@@ -1284,7 +1276,7 @@ x0[1+*jj]);
break
;
}
}
}
if
(
mimo_mode
==
ALAMOUTI
)
{
...
...
openair1/PHY/MODULATION/beamforming.c
View file @
77159002
...
...
@@ -84,14 +84,13 @@ int beam_precoding(int32_t **txdataF,
((int16_t*)&txdataF_BF[aa][re])[1]);
*/
}
}
}
if
(
txdataF
[
5
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
]
!=
0
)
{
//that means this RE is actually using TM7
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
0
]
=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
5
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
0
]
*
((
int16_t
*
)
&
beam_weights
[
5
][
aa
][
re
])[
0
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
0
]
+
=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
5
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
0
]
*
((
int16_t
*
)
&
beam_weights
[
5
][
aa
][
re
])[
0
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
0
]
-=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
5
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
1
]
*
((
int16_t
*
)
&
beam_weights
[
5
][
aa
][
re
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
1
]
=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
5
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
0
]
*
((
int16_t
*
)
&
beam_weights
[
5
][
aa
][
re
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
1
]
+
=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
5
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
0
]
*
((
int16_t
*
)
&
beam_weights
[
5
][
aa
][
re
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
1
]
+=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
5
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
1
]
*
((
int16_t
*
)
&
beam_weights
[
5
][
aa
][
re
])[
0
])
>>
15
);
/* printf("beamforming.c:txdata[5][%d]=%d+j%d, beam_weights[5][%d][%d]=%d+j%d,txdata_BF[%d][%d]=%d+j%d\n",
...
...
@@ -112,9 +111,9 @@ int beam_precoding(int32_t **txdataF,
for
(
p
=
7
;
p
<
15
;
p
++
)
{
if
(
txdataF
[
p
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
]
!=
0
)
{
//that means this RE is actually allocated
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
0
]
=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
p
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
0
]
*
((
int16_t
*
)
&
beam_weights
[
p
][
aa
][
re
])[
0
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
0
]
+
=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
p
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
0
]
*
((
int16_t
*
)
&
beam_weights
[
p
][
aa
][
re
])[
0
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
0
]
-=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
p
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
1
]
*
((
int16_t
*
)
&
beam_weights
[
p
][
aa
][
re
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
1
]
=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
p
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
0
]
*
((
int16_t
*
)
&
beam_weights
[
p
][
aa
][
re
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
1
]
+
=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
p
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
0
]
*
((
int16_t
*
)
&
beam_weights
[
p
][
aa
][
re
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF_BF
[
aa
][
re
])[
1
]
+=
(
int16_t
)((((
int16_t
*
)
&
txdataF
[
p
][
slot_offset_F
+
symbol
*
frame_parms
->
ofdm_symbol_size
+
re
])[
1
]
*
((
int16_t
*
)
&
beam_weights
[
p
][
aa
][
re
])[
0
])
>>
15
);
}
}
...
...
openair1/SCHED/phy_mac_stub.c
View file @
77159002
...
...
@@ -63,6 +63,8 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
uint32_t
bcch_pdu
;
uint64_t
dlsch_pdu
;
LOG_I
(
PHY
,
"frame %d, subframe %d, transmission_mode %d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
,
transmission_mode
);
DCI_pdu
->
Num_common_dci
=
0
;
DCI_pdu
->
Num_ue_spec_dci
=
0
;
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
View file @
77159002
...
...
@@ -37,8 +37,8 @@ eNBs =
N_RB_DL
=
25
;
Nid_cell_mbsfn
=
0
;
nb_antenna_ports
=
1
;
nb_antennas_tx
=
1
;
nb_antennas_rx
=
1
;
nb_antennas_tx
=
2
;
nb_antennas_rx
=
2
;
tx_gain
=
90
;
rx_gain
=
125
;
prach_root
=
0
;
...
...
targets/RT/USER/lte-enb.c
View file @
77159002
...
...
@@ -128,6 +128,8 @@ extern pthread_cond_t sync_cond;
extern
pthread_mutex_t
sync_mutex
;
extern
int
sync_var
;
extern
transmission_mode
;
//pthread_t main_eNB_thread;
time_stats_t
softmodem_stats_mt
;
// main thread
...
...
@@ -467,8 +469,17 @@ void proc_tx_full(PHY_VARS_eNB *eNB,
// if TX fronthaul go ahead
if
(
eNB
->
tx_fh
)
eNB
->
tx_fh
(
eNB
,
proc
);
/*
if (proc->frame_tx>1000) {
write_output("/tmp/txsig0.m","txs0", &eNB->common_vars.txdata[eNB->Mod_id][0][0], eNB->frame_parms.samples_per_tti*10,1,1);
write_output("/tmp/txsigF0.m","txsF0", &eNB->common_vars.txdataF[eNB->Mod_id][0][0],eNB->frame_parms.symbols_per_tti*eNB->frame_parms.ofdm_symbol_size*10,1,1);
write_output("/tmp/txsig1.m","txs1", &eNB->common_vars.txdata[eNB->Mod_id][1][0], eNB->frame_parms.samples_per_tti*10,1,1);
write_output("/tmp/txsigF1.m","txsF1", &eNB->common_vars.txdataF[eNB->Mod_id][1][0],eNB->frame_parms.symbols_per_tti*eNB->frame_parms.ofdm_symbol_size*10,1,1);
if (transmission_mode == 7)
write_output("/tmp/txsigF5.m","txsF5", &eNB->common_vars.txdataF[eNB->Mod_id][5][0],eNB->frame_parms.symbols_per_tti*eNB->frame_parms.ofdm_symbol_size*10,1,1);
exit_fun("");
}
*/
}
void
proc_tx_rru_if4p5
(
PHY_VARS_eNB
*
eNB
,
...
...
targets/RT/USER/lte-softmodem.c
View file @
77159002
...
...
@@ -234,7 +234,7 @@ uint64_t num_missed_slots=0; // counter for the number of missed slots
extern
void
reset_opp_meas
(
void
);
extern
void
print_opp_meas
(
void
);
//
int transmission_mode=1;
int
transmission_mode
=
1
;
int16_t
glog_level
=
LOG_INFO
;
int16_t
glog_verbosity
=
LOG_MED
;
...
...
@@ -1189,8 +1189,13 @@ static void get_options (int argc, char **argv)
printf
(
"Downlink frequency/ uplink offset of CC_id %d set to %ju/%d
\n
"
,
CC_id
,
enb_properties
->
properties
[
i
]
->
downlink_frequency
[
CC_id
],
enb_properties
->
properties
[
i
]
->
uplink_frequency_offset
[
CC_id
]);
}
// CC_id
}
// i
//this is needed for phy-test option
transmission_mode
=
enb_properties
->
properties
[
0
]
->
ue_TransmissionMode
[
0
]
+
1
;
}
else
if
(
UE_flag
==
1
)
{
if
(
conf_config_file_name
!=
NULL
)
{
...
...
@@ -1363,7 +1368,7 @@ void init_openair0() {
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
aa
;
int
i
,
j
,
k
,
aa
,
re
;
#if defined (XFORMS)
void
*
status
;
#endif
...
...
@@ -1606,6 +1611,17 @@ int main( int argc, char **argv )
PHY_vars_eNB_g
[
0
][
CC_id
]
->
ue_ul_nb_rb
=
6
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
target_ue_ul_mcs
=
target_ul_mcs
;
// initialization for phy-test
for
(
k
=
0
;
k
<
NUMBER_OF_UE_MAX
;
k
++
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
->
transmission_mode
[
k
]
=
transmission_mode
;
if
(
transmission_mode
==
7
)
lte_gold_ue_spec_port5
(
PHY_vars_eNB_g
[
0
][
CC_id
]
->
lte_gold_uespec_port5_table
[
k
],
frame_parms
[
CC_id
]
->
Nid_cell
,
0x1235
+
k
);
}
if
((
transmission_mode
==
1
)
||
(
transmission_mode
==
7
))
{
for
(
j
=
0
;
j
<
frame_parms
[
CC_id
]
->
nb_antennas_tx
;
j
++
)
for
(
re
=
0
;
re
<
frame_parms
[
CC_id
]
->
ofdm_symbol_size
;
re
++
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
common_vars
.
beam_weights
[
0
][
0
][
j
][
re
]
=
0x00007fff
/
frame_parms
[
CC_id
]
->
nb_antennas_tx
;
}
if
(
phy_test
==
1
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
mac_enabled
=
0
;
else
PHY_vars_eNB_g
[
0
][
CC_id
]
->
mac_enabled
=
1
;
...
...
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