Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
openairinterface5G
Commits
b481bfd9
Commit
b481bfd9
authored
Oct 10, 2016
by
Rohit Gupta
Browse files
Merge branch 'develop' into feature-131-new-license
parents
6277038d
c51edecd
Changes
48
Expand all
Hide whitespace changes
Inline
Side-by-side
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
b481bfd9
...
...
@@ -885,27 +885,28 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
task_EPC
=
task_EPC
+
' ) > '
+
logfile_task_EPC_out
+
' 2>&1 '
write_file
(
logfile_task_EPC
,
task_EPC
,
mode
=
"w"
)
#first we compile all the programs
thread_EPC
=
oaiThread
(
1
,
"EPC_thread"
,
EPCMachine
,
user
,
password
,
task_EPC_compile
,
False
,
timeout_thread
)
thread_eNB
=
oaiThread
(
2
,
"eNB_thread"
,
eNBMachine
,
user
,
password
,
task_eNB_compile
,
False
,
timeout_thread
)
thread_UE
=
oaiThread
(
3
,
"UE_thread"
,
UEMachine
,
user
,
password
,
task_UE_compile
,
False
,
timeout_thread
)
if
RRHMachine
!=
''
:
thread_RRH
=
oaiThread
(
4
,
"RRH_thread"
,
RRHMachine
,
user
,
password
,
task_RRH_compile
,
False
,
timeout_thread
)
threads
=
[]
threads
.
append
(
thread_eNB
)
threads
.
append
(
thread_UE
)
threads
.
append
(
thread_EPC
)
if
RRHMachine
!=
''
:
threads
.
append
(
thread_RRH
)
# Start new Threads
thread_eNB
.
start
()
thread_UE
.
start
()
thread_EPC
.
start
()
if
RRHMachine
!=
''
:
thread_RRH
.
start
()
#Wait for all the compile threads to complete
for
t
in
threads
:
t
.
join
()
#first we compile all the programs but only for run_0
if
run
==
0
:
thread_EPC
=
oaiThread
(
1
,
"EPC_thread"
,
EPCMachine
,
user
,
password
,
task_EPC_compile
,
False
,
timeout_thread
)
thread_eNB
=
oaiThread
(
2
,
"eNB_thread"
,
eNBMachine
,
user
,
password
,
task_eNB_compile
,
False
,
timeout_thread
)
thread_UE
=
oaiThread
(
3
,
"UE_thread"
,
UEMachine
,
user
,
password
,
task_UE_compile
,
False
,
timeout_thread
)
if
RRHMachine
!=
''
:
thread_RRH
=
oaiThread
(
4
,
"RRH_thread"
,
RRHMachine
,
user
,
password
,
task_RRH_compile
,
False
,
timeout_thread
)
threads
=
[]
threads
.
append
(
thread_eNB
)
threads
.
append
(
thread_UE
)
threads
.
append
(
thread_EPC
)
if
RRHMachine
!=
''
:
threads
.
append
(
thread_RRH
)
# Start new Threads
thread_eNB
.
start
()
thread_UE
.
start
()
thread_EPC
.
start
()
if
RRHMachine
!=
''
:
thread_RRH
.
start
()
#Wait for all the compile threads to complete
for
t
in
threads
:
t
.
join
()
#Now we execute all the threads
thread_EPC
=
oaiThread
(
1
,
"EPC_thread"
,
EPCMachine
,
user
,
password
,
task_EPC
,
False
,
timeout_thread
)
...
...
cmake_targets/build_oai
View file @
b481bfd9
...
...
@@ -74,7 +74,7 @@ Options
--install-optional-packages
Install useful but not mandatory packages such as valgrind
-g | --run-with-gdb
Add debugging symbols to compilation directives. It also disables any compiler optimization.
Add debugging symbols to compilation directives. It also disables any compiler optimization.
Only for debugging. Do not use in normal operation!
-h | --help
Print this help
--eNB
...
...
@@ -128,9 +128,9 @@ Options
--disable-hardware-dependency
Disable HW dependency during installation
Usage (first build):
oaisim (eNB + UE): ./build_oai -I
-g
--oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I
-g
--eNB -x --install-system-files
NI/ETTUS B201 + COTS UE : ./build_oai -I
-g
--eNB -x --install-system-files -w USRP
oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
NI/ETTUS B201 + COTS UE : ./build_oai -I --eNB -x --install-system-files -w USRP
Usage (Regular):
oaisim : ./build_oai --oaisim -x
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
...
...
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
View file @
b481bfd9
...
...
@@ -486,6 +486,11 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho
#endif
if
(
frame_length
>
6143
)
{
LOG_E
(
PHY
,
"compute_beta: frame_length %d
\n
"
,
frame_length
);
return
;
}
// we are supposed to run compute_alpha just before compute_beta
// so the initial states of backward computation can be set from last value of alpha states (forward computation)
...
...
@@ -505,9 +510,11 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho
beta_ptr
[
6
]
=
alpha128
[
6
+
(
frame_length
>>
1
)];
beta_ptr
[
7
]
=
alpha128
[
7
+
(
frame_length
>>
1
)];
int
overlap
=
(
frame_length
>>
4
)
>
L
?
(
frame_length
>>
4
)
-
L
:
0
;
for
(
rerun_flag
=
0
,
loopval
=
0
;
rerun_flag
<
2
;
loopval
=
(
frame_length
>>
4
)
-
L
,
rerun_flag
++
)
{
loopval
=
overlap
,
rerun_flag
++
)
{
if
(
offset8_flag
==
0
)
{
// FIXME! beta0-beta7 are used uninitialized. FIXME!
...
...
openair1/PHY/LTE_TRANSPORT/dci.c
View file @
b481bfd9
...
...
@@ -2857,6 +2857,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
}
}
LOG_D
(
PHY
,
"DCI decoding CRNTI [format_c: %d, nCCE[subframe: %d]: %d ]
\n
"
,
format_c
,
subframe
,
pdcch_vars
[
eNB_id
]
->
nCCE
[
subframe
]);
// memcpy(&dci_alloc[*dci_cnt].dci_pdu[0],dci_decoded_output,sizeof_bytes);
...
...
openair1/PHY/LTE_TRANSPORT/if5_tools.c
View file @
b481bfd9
...
...
@@ -97,8 +97,8 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
__m128i
t0
,
t1
;
tx_buffer
=
memalign
(
16
,
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
db_fulllength
*
sizeof
(
int16_t
));
IF5_mobipass_header_t
*
header
=
(
IF5_mobipass_header_t
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
);
data_block_head
=
(
__m128i
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
4
);
IF5_mobipass_header_t
*
header
=
(
IF5_mobipass_header_t
*
)(
(
uint8_t
*
)
tx_buffer
+
MAC_HEADER_SIZE_BYTES
);
data_block_head
=
(
__m128i
*
)(
(
uint8_t
*
)
tx_buffer
+
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
4
);
header
->
flags
=
0
;
header
->
fifo_status
=
0
;
...
...
@@ -109,11 +109,11 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
txp
[
0
]
=
(
void
*
)
&
eNB
->
common_vars
.
txdata
[
0
][
0
][
subframe
*
eNB
->
frame_parms
.
samples_per_tti
];
txp128
=
(
__m128i
*
)
txp
[
0
];
for
(
packet_id
=
0
;
packet_id
<
(
fp
->
samples_per_tti
*
2
)
/
db_fulllength
;
packet_id
++
)
{
header
->
time_stamp
=
proc_timestamp
+
packet_id
*
db_fulllength
;
for
(
packet_id
=
0
;
packet_id
<
fp
->
samples_per_tti
/
db_fulllength
;
packet_id
++
)
{
header
->
time_stamp
=
(
uint32_t
)(
proc_timestamp
+
packet_id
*
db_fulllength
)
;
data_block
=
data_block_head
;
for
(
i
=
0
;
i
<
db_fulllength
>>
3
;
i
+=
2
)
{
for
(
i
=
0
;
i
<
db_fulllength
>>
2
;
i
+=
2
)
{
t0
=
_mm_srai_epi16
(
*
txp128
++
,
4
);
t1
=
_mm_srai_epi16
(
*
txp128
++
,
4
);
...
...
openair1/PHY/LTE_TRANSPORT/phich.c
View file @
b481bfd9
...
...
@@ -427,9 +427,10 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
if
(
HI
>
0
)
HI
=
1
;
// c = (1-(2*HI))*SSS_AMP;
// x1 is set in lte_gold_generic
x2
=
(((
subframe
+
1
)
*
(
frame_parms
->
Nid_cell
+
1
))
<<
9
)
+
frame_parms
->
Nid_cell
;
x2
=
(((
subframe
+
1
)
*
(
(
frame_parms
->
Nid_cell
<<
1
)
+
1
))
<<
9
)
+
frame_parms
->
Nid_cell
;
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
...
...
@@ -1111,7 +1112,7 @@ void rx_phich(PHY_VARS_UE *ue,
phich_d_ptr
=
phich_d
;
// x1 is set in lte_gold_generic
x2
=
(((
subframe
+
1
)
*
(
frame_parms
->
Nid_cell
+
1
))
<<
9
)
+
frame_parms
->
Nid_cell
;
x2
=
(((
subframe
+
1
)
*
(
(
frame_parms
->
Nid_cell
<<
1
)
+
1
))
<<
9
)
+
frame_parms
->
Nid_cell
;
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
...
...
openair1/PHY/LTE_TRANSPORT/prach.c
View file @
b481bfd9
...
...
@@ -810,11 +810,14 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
break
;
case
75
:
memset
((
void
*
)
prachF
,
0
,
4
*
1
9
432
);
memset
((
void
*
)
prachF
,
0
,
4
*
1
8
432
);
break
;
case
100
:
memset
((
void
*
)
prachF
,
0
,
4
*
24576
);
if
(
ue
->
frame_parms
.
threequarter_fs
==
0
)
memset
((
void
*
)
prachF
,
0
,
4
*
24576
);
else
memset
((
void
*
)
prachF
,
0
,
4
*
18432
);
break
;
}
...
...
@@ -878,6 +881,9 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
break
;
}
if
(
ue
->
frame_parms
.
threequarter_fs
==
1
)
Ncp
=
(
Ncp
*
3
)
>>
2
;
prach2
=
prach
+
(
Ncp
<<
1
);
// do IDFT
...
...
@@ -978,20 +984,39 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
break
;
case
100
:
if
(
prach_fmt
==
4
)
{
idft4096
(
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
8192
,
Ncp
<<
2
);
prach_len
=
4096
+
Ncp
;
}
else
{
idft24576
(
prachF
,
prach2
);
memmove
(
prach
,
prach
+
49152
,
Ncp
<<
2
);
prach_len
=
24576
+
Ncp
;
if
(
prach_fmt
>
1
)
{
memmove
(
prach2
+
49152
,
prach2
,
98304
);
prach_len
=
2
*
24576
+
Ncp
;
if
(
ue
->
frame_parms
.
threequarter_fs
==
0
)
{
if
(
prach_fmt
==
4
)
{
idft4096
(
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
8192
,
Ncp
<<
2
);
prach_len
=
4096
+
Ncp
;
}
else
{
idft24576
(
prachF
,
prach2
);
memmove
(
prach
,
prach
+
49152
,
Ncp
<<
2
);
prach_len
=
24576
+
Ncp
;
if
(
prach_fmt
>
1
)
{
memmove
(
prach2
+
49152
,
prach2
,
98304
);
prach_len
=
2
*
24576
+
Ncp
;
}
}
}
else
{
if
(
prach_fmt
==
4
)
{
idft3072
(
prachF
,
prach2
);
//TODO: account for repeated format in dft output
memmove
(
prach
,
prach
+
6144
,
Ncp
<<
2
);
prach_len
=
3072
+
Ncp
;
}
else
{
idft18432
(
prachF
,
prach2
);
memmove
(
prach
,
prach
+
36864
,
Ncp
<<
2
);
prach_len
=
18432
+
Ncp
;
printf
(
"Generated prach for 100 PRB, 3/4 sampling
\n
"
);
if
(
prach_fmt
>
1
)
{
memmove
(
prach2
+
36834
,
prach2
,
73728
);
prach_len
=
2
*
18432
+
Ncp
;
}
}
}
break
;
}
...
...
@@ -1018,18 +1043,18 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
((
int16_t
*
)
ue
->
common_vars
.
txdata
[
0
])[
2
*
i
+
1
]
=
prach
[
2
*
j
+
1
]
<<
4
;
}
#if defined(EXMIMO)
// handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on
for
(
k
=
prach_start
-
(
ue
->
frame_parms
.
samples_per_tti
>>
1
)
;
k
<
prach_start
;
k
++
)
{
if
(
k
<
0
)
ue
->
common_vars
.
txdata
[
0
][
k
+
ue
->
frame_parms
.
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
]
&=
0xFFFEFFFE
;
else
if
(
k
>
(
ue
->
frame_parms
.
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
))
ue
->
common_vars
.
txdata
[
0
][
k
-
ue
->
frame_parms
.
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
]
&=
0xFFFEFFFE
;
else
ue
->
common_vars
.
txdata
[
0
][
k
]
&=
0xFFFEFFFE
;
}
// handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on
for
(
k
=
prach_start
-
(
ue
->
frame_parms
.
samples_per_tti
>>
1
)
;
k
<
prach_start
;
k
++
)
{
if
(
k
<
0
)
ue
->
common_vars
.
txdata
[
0
][
k
+
ue
->
frame_parms
.
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
]
&=
0xFFFEFFFE
;
else
if
(
k
>
(
ue
->
frame_parms
.
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
))
ue
->
common_vars
.
txdata
[
0
][
k
-
ue
->
frame_parms
.
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
]
&=
0xFFFEFFFE
;
else
ue
->
common_vars
.
txdata
[
0
][
k
]
&=
0xFFFEFFFE
;
}
#endif
#else
for
(
i
=
0
;
i
<
prach_len
;
i
++
)
{
((
int16_t
*
)(
&
ue
->
common_vars
.
txdata
[
0
][
prach_start
]))[
2
*
i
]
=
prach
[
2
*
i
];
((
int16_t
*
)(
&
ue
->
common_vars
.
txdata
[
0
][
prach_start
]))[
2
*
i
+
1
]
=
prach
[
2
*
i
+
1
];
...
...
@@ -1488,7 +1513,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
#ifdef PRACH_DEBUG
if
(
en
>
40
)
{
//
if (en>40) {
k
=
(
12
*
n_ra_prb
)
-
6
*
eNB
->
frame_parms
.
N_RB_UL
;
if
(
k
<
0
)
...
...
@@ -1502,7 +1527,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
write_output
(
"prach_rxF_comp0.m"
,
"prach_rxF_comp0"
,
prachF
,
1024
,
1
,
1
);
write_output
(
"prach_ifft0.m"
,
"prach_t0"
,
prach_ifft
[
0
],
1024
,
1
,
1
);
exit
(
-
1
);
}
//
}
#endif
}
// new dft
...
...
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
b481bfd9
...
...
@@ -146,6 +146,9 @@ void generate_pucch1x(int32_t **txdataF,
uint8_t
Ncs1
=
frame_parms
->
pucch_config_common
.
nCS_AN
;
uint8_t
Ncs1_div_deltaPUCCH_Shift
=
Ncs1
/
deltaPUCCH_Shift
;
LOG_D
(
PHY
,
"generate_pucch Start [deltaPUCCH_Shift %d, NRB2 %d, Ncs1_div_deltaPUCCH_Shift %d, n1_pucch %d]
\n
"
,
deltaPUCCH_Shift
,
NRB2
,
Ncs1_div_deltaPUCCH_Shift
,
n1_pucch
);
uint32_t
u0
=
(
frame_parms
->
Nid_cell
+
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
subframe
<<
1
])
%
30
;
uint32_t
u1
=
(
frame_parms
->
Nid_cell
+
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
1
+
(
subframe
<<
1
)])
%
30
;
uint32_t
v0
=
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
subframe
<<
1
];
...
...
@@ -170,6 +173,11 @@ void generate_pucch1x(int32_t **txdataF,
printf
(
"[PHY] PUCCH: cNcs1/deltaPUCCH_Shift %d, Nprime %d, n1_pucch %d
\n
"
,
thres
,
Nprime
,
n1_pucch
);
#endif
LOG_D
(
PHY
,
"[PHY] PUCCH: n1_pucch %d, thres %d Ncs1_div_deltaPUCCH_Shift %d (12/deltaPUCCH_Shift) %d Nprime_div_deltaPUCCH_Shift %d
\n
"
,
n1_pucch
,
thres
,
Ncs1_div_deltaPUCCH_Shift
,
(
int
)(
12
/
deltaPUCCH_Shift
),
Nprime_div_deltaPUCCH_Shift
);
LOG_D
(
PHY
,
"[PHY] PUCCH: deltaPUCCH_Shift %d, Nprime %d
\n
"
,
deltaPUCCH_Shift
,
Nprime
);
N_UL_symb
=
(
frame_parms
->
Ncp
==
0
)
?
7
:
6
;
if
(
n1_pucch
<
thres
)
...
...
@@ -182,6 +190,9 @@ void generate_pucch1x(int32_t **txdataF,
else
{
d
=
(
frame_parms
->
Ncp
==
0
)
?
2
:
0
;
h
=
(
nprime0
+
d
)
%
(
c
*
Nprime_div_deltaPUCCH_Shift
);
#ifdef DEBUG_PUCCH_TX
printf
(
"[PHY] PUCCH: h %d, d %d
\n
"
,
h
,
d
);
#endif
nprime1
=
(
h
/
c
)
+
(
h
%
c
)
*
Nprime_div_deltaPUCCH_Shift
;
}
...
...
@@ -200,7 +211,7 @@ void generate_pucch1x(int32_t **txdataF,
n_oc1
<<=
1
;
#ifdef DEBUG_PUCCH_TX
printf
(
"[PHY] PUCCH: noc0 %d noc1
1
%d
\n
"
,
n_oc0
,
n_oc1
);
printf
(
"[PHY] PUCCH: noc0 %d noc1 %d
\n
"
,
n_oc0
,
n_oc1
);
#endif
nprime
=
nprime0
;
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
b481bfd9
...
...
@@ -1192,6 +1192,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
y[i2] = c*ulsch_llr[i++];
i2=(i2+(Cmux<<2)-3);
*/
// slightly more optimized version (equivalent to above) for 16QAM to improve computational performance
*
(
__m64
*
)
&
y
[
i2
]
=
_mm_sign_pi16
(
*
(
__m64
*
)
&
ulsch_llr
[
i
],
*
(
__m64
*
)
&
cseq
[
i
]);
i
+=
4
;
i2
+=
(
Cmux
<<
2
);
...
...
@@ -1523,6 +1524,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
// RI
// rank 1
if
((
ulsch_harq
->
O_RI
==
1
)
&&
(
Qprime_RI
>
0
))
{
ulsch_harq
->
o_RI
[
0
]
=
((
ulsch_harq
->
q_RI
[
0
]
+
ulsch_harq
->
q_RI
[
Q_m
/
2
])
>
0
)
?
0
:
1
;
}
...
...
openair1/PHY/MODULATION/slot_fep_mbsfn.c
View file @
b481bfd9
...
...
@@ -31,7 +31,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
int
sample_offset
,
int
no_prefix
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
LTE_UE_COMMON
*
common_vars
=
&
ue
->
common_vars
;
uint8_t
eNB_id
=
0
;
//ue_common_vars->eNb_id;
...
...
@@ -108,10 +108,8 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
sample_offset
);
#endif
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
memset
(
&
common_vars
->
rxdataF
[
aa
][
2
*
frame_parms
->
ofdm_symbol_size
*
l
],
0
,
2
*
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
memset
(
&
common_vars
->
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
l
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
if
(
l
==
0
)
{
start_meas
(
&
ue
->
rx_dft_stats
);
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
sample_offset
+
...
...
@@ -139,9 +137,10 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
(
int16_t
*
)
&
common_vars
->
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
l
],
1
);
stop_meas
(
&
ue
->
rx_dft_stats
);
}
}
//if ((l==0) || (l==(4-frame_parms->Ncp))) {
// changed to invoke MBSFN channel estimation in symbols 2,6,10
if
((
l
==
2
)
||
(
l
==
6
)
||
(
l
==
10
))
{
...
...
openair1/PHY/TOOLS/lte_dfts.c
View file @
b481bfd9
...
...
@@ -5222,7 +5222,7 @@ void dft8192(int16_t *x,int16_t *y,int scale)
xtmpp = xtmp;
for (i=0; i<
32
; i++) {
for (i=0; i<
16
; i++) {
transpose4_ooff_simd256(x256 ,xtmpp,512);
transpose4_ooff_simd256(x256+2,xtmpp+1,512);
transpose4_ooff_simd256(x256+4,xtmpp+2,512);
...
...
@@ -5260,7 +5260,7 @@ void dft8192(int16_t *x,int16_t *y,int scale)
}
dft4096((int16_t*)(xtmp),(int16_t*)ytmp,1);
dft4096((int16_t*)(xtmp+
1024
),(int16_t*)(ytmp+512),1);
dft4096((int16_t*)(xtmp+
512
),(int16_t*)(ytmp+512),1);
for (i=0; i<512; i++) {
...
...
@@ -5312,7 +5312,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
xtmpp = xtmp;
for (i=0; i<
32
; i++) {
for (i=0; i<
16
; i++) {
transpose4_ooff_simd256(x256 ,xtmpp,512);
transpose4_ooff_simd256(x256+2,xtmpp+1,512);
transpose4_ooff_simd256(x256+4,xtmpp+2,512);
...
...
@@ -5350,7 +5350,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
}
idft4096((int16_t*)(xtmp),(int16_t*)ytmp,1);
idft4096((int16_t*)(xtmp+
1024
),(int16_t*)(ytmp+512),1);
idft4096((int16_t*)(xtmp+
512
),(int16_t*)(ytmp+512),1);
for (i=0; i<512; i++) {
...
...
@@ -5673,15 +5673,58 @@ void idft12288(int16_t *input, int16_t *output)
// write_output("out.m","out",output,6144,1,1);
}
#include "twiddle18432.h"
// 6144 x 3
void dft18432(int16_t *input, int16_t *output)
{
void dft18432(int16_t *input, int16_t *output) {
int i,i2,j;
uint32_t tmp[3][6144] __attribute__((aligned(32)));
uint32_t tmpo[3][6144] __attribute__((aligned(32)));
for (i=0,j=0; i<6144; i++) {
tmp[0][i] = ((uint32_t *)input)[j++];
tmp[1][i] = ((uint32_t *)input)[j++];
tmp[2][i] = ((uint32_t *)input)[j++];
}
dft6144((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]));
dft6144((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]));
dft6144((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]));
for (i=0,i2=0; i<12288; i+=8,i2+=4) {
bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+12288+i),(simd_q15_t*)(output+24576+i),
(simd_q15_t*)(twa18432+i),(simd_q15_t*)(twb18432+i));
}
_mm_empty();
_m_empty();
}
void idft18432(int16_t *input, int16_t *output)
{
void idft18432(int16_t *input, int16_t *output) {
int i,i2,j;
uint32_t tmp[3][6144] __attribute__((aligned(32)));
uint32_t tmpo[3][6144] __attribute__((aligned(32)));
for (i=0,j=0; i<6144; i++) {
tmp[0][i] = ((uint32_t *)input)[j++];
tmp[1][i] = ((uint32_t *)input)[j++];
tmp[2][i] = ((uint32_t *)input)[j++];
}
idft6144((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]));
idft6144((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]));
idft6144((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]));
for (i=0,i2=0; i<12288; i+=8,i2+=4) {
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+12288+i),(simd_q15_t*)(output+24576+i),
(simd_q15_t*)(twa18432+i),(simd_q15_t*)(twb18432+i));
}
_mm_empty();
_m_empty();
}
#include "twiddle24576.h"
...
...
@@ -5726,8 +5769,8 @@ void dft24576(int16_t *input, int16_t *output)
void idft24576(int16_t *input, int16_t *output)
{
int i,i2,j;
uint32_t tmp[3][
16384
] __attribute__((aligned(32)));
uint32_t tmpo[3][
16384
] __attribute__((aligned(32)));
uint32_t tmp[3][
8192
] __attribute__((aligned(32)));
uint32_t tmpo[3][
8192
] __attribute__((aligned(32)));
for (i=0,j=0; i<8192; i++) {
tmp[0][i] = ((uint32_t *)input)[j++];
...
...
@@ -5739,13 +5782,6 @@ void idft24576(int16_t *input, int16_t *output)
idft8192((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
idft8192((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
/*
for (i=1; i<8192; i++) {
tmpo[0][i] = tmpo[0][i<<1];
tmpo[1][i] = tmpo[1][i<<1];
tmpo[2][i] = tmpo[2][i<<1];
}*/
/*
write_output("in.m","in",input,24576,1,1);
write_output("out0.m","o0",tmpo[0],8192,1,1);
...
...
@@ -19122,6 +19158,55 @@ int main(int argc, char**argv)
write_output("y2048.m","y2048",y,2048,1,1);
write_output("x2048.m","x2048",x,2048,1,1);
memset((void*)x,0,2048*sizeof(int32_t));
for (i=2;i<2402;i++) {
if ((taus() & 1)==0)
((int16_t*)x)[i] = 364;
else
((int16_t*)x)[i] = -364;
}
for (i=2*(4096-1200);i<8192;i++) {
if ((taus() & 1)==0)
((int16_t*)x)[i] = 364;
else
((int16_t*)x)[i] = -364;
}
reset_meas(&ts);
for (i=0; i<10000; i++) {
start_meas(&ts);
idft4096((int16_t *)x,(int16_t *)y,1);
stop_meas(&ts);
}
printf("\n\n4096-point(%f cycles)\n",(double)ts.diff/(double)ts.trials);
write_output("y4096.m","y4096",y,4096,1,1);
write_output("x4096.m","x4096",x,4096,1,1);
memset((void*)x,0,8192*sizeof(int32_t));
for (i=2;i<4802;i++) {
if ((taus() & 1)==0)
((int16_t*)x)[i] = 364;
else
((int16_t*)x)[i] = -364;
}
for (i=2*(4096-1200);i<8192;i++) {
if ((taus() & 1)==0)
((int16_t*)x)[i] = 364;
else
((int16_t*)x)[i] = -364;
}
reset_meas(&ts);
for (i=0; i<10000; i++) {
start_meas(&ts);
idft8192((int16_t *)x,(int16_t *)y,1);
stop_meas(&ts);
}
printf("\n\n8192-point(%f cycles)\n",(double)ts.diff/(double)ts.trials);
write_output("y8192.m","y8192",y,8192,1,1);
write_output("x8192.m","x8192",x,8192,1,1);
return(0);
}
openair1/PHY/TOOLS/twiddle12288.h
View file @
b481bfd9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
openair1/PHY/TOOLS/twiddle18432.h
0 → 100644
View file @
b481bfd9
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/twiddle24576.h
View file @
b481bfd9
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/twiddle6144.h
View file @
b481bfd9
This diff is collapsed.
Click to expand it.
openair1/PHY/defs.h
View file @
b481bfd9
...
...
@@ -226,6 +226,8 @@ typedef struct eNB_proc_t_s {
int
thread_index
;
/// timestamp received from HW
openair0_timestamp
timestamp_rx
;
/// timestamp to send to "slave rru"
openair0_timestamp
timestamp_tx
;
/// subframe to act upon for reception
int
subframe_rx
;
/// subframe to act upon for PRACH
...
...
openair1/SCHED/defs.h
View file @
b481bfd9
...
...
@@ -426,7 +426,7 @@ UE_MODE_t get_ue_mode(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
@param pucch_fmt Format of PUCCH that is being transmitted
@returns Transmit power
*/
int8_t
pucch_power_cntl
(
PHY_VARS_UE
*
phy_vars_
ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
PUCCH_FMT_t
pucch_fmt
);
int8_t
pucch_power_cntl
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
subframe
,
uint8_t
eNB_id
,
PUCCH_FMT_t
pucch_fmt
);
/*! \brief This function implements the power control mechanism for PUCCH from 36.213.
@param phy_vars_ue PHY variables
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
b481bfd9
...
...
@@ -327,7 +327,7 @@ void process_timing_advance_rar(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint16_t ti
#ifdef DEBUG_PHY_PROC
LOG_I
(
PHY
,
"[UE %d] Frame %d, received (rar) timing_advance %d, HW timing advance %d
\n
"
,
ue
->
Mod_id
,
proc
->
frame_rx
,
ue
->
timing_advance
);
LOG_I
(
PHY
,
"[UE %d]
AbsoluteSub
Frame
%d.
%d, received (rar) timing_advance %d, HW timing advance %d
\n
"
,
ue
->
Mod_id
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
ue
->
timing_advance
);
#endif
}
...
...
@@ -739,11 +739,12 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
prach_resources
[
eNB_id
]
->
ra_PreambleIndex
=
19
;
}
LOG_I
(
PHY
,
"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d
\n
"
,
LOG_I
(
PHY
,
"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d,
P0_PRACH %d,
TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d
\n
"
,
ue
->
Mod_id
,
frame_tx
,
subframe_tx
,
ue
->
prach_resources
[
eNB_id
]
->
ra_PreambleIndex
,
ue
->
tx_power_dBm
[
subframe_tx
],
ue
->
prach_resources
[
eNB_id
]
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
,
ue
->
prach_resources
[
eNB_id
]
->
ra_TDD_map_index
,
ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
);
...
...
@@ -1041,7 +1042,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue
->
tx_total_RE
[
subframe_tx
]
=
nb_rb
*
12
;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
tx_amp
=
get_tx_amp
(
ue
->
tx_power_dBm
,
tx_amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
]
,
ue
->
tx_power_max_dBm
,
ue
->
frame_parms
.
N_RB_UL
,
nb_rb
);
...
...
@@ -1148,7 +1149,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
SR_payload
);