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
zzha zzha
OpenXG-RAN
Commits
61df6257
Commit
61df6257
authored
Aug 09, 2018
by
ISIP CS/NCTU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace beamforming.c
parent
191d3670
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
openair1/PHY/MODULATION/beamforming.c
openair1/PHY/MODULATION/beamforming.c
+60
-0
No files found.
openair1/PHY/MODULATION/beamforming.c
View file @
61df6257
...
...
@@ -89,3 +89,63 @@ int beam_precoding(int32_t **txdataF,
}
return
0
;
}
// fdragon
int
beam_precoding_one_eNB
(
int32_t
**
txdataF
,
int32_t
**
txdataF_BF
,
int32_t
***
beam_weights
,
int
subframe
,
int
nb_antenna_ports
,
int
nb_tx
,
// total physical antenna
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
int
p
,
re
,
symbol
,
aa
;
// loop index
int
re_offset
;
int
ofdm_symbol_size
=
frame_parms
->
ofdm_symbol_size
;
int
symbols_per_tti
=
frame_parms
->
symbols_per_tti
;
int
nb_antenna_ports_eNB
=
frame_parms
->
nb_antenna_ports_eNB
;
// logic antenna ports
re_offset
=
ofdm_symbol_size
*
symbols_per_tti
*
subframe
;
// txdataF_BF[aa][re] = sum(beam_weghts[p][aa][re]*txdataF[p][re]), p=0~nb_antenna_ports-1
// real part and image part need to compute separately
for
(
aa
=
0
;
aa
<
nb_tx
;
aa
++
)
{
memset
(
txdataF_BF
[
aa
],
0
,
sizeof
(
int32_t
)
*
(
ofdm_symbol_size
*
symbols_per_tti
));
for
(
p
=
0
;
p
<
nb_antenna_ports
;
p
++
){
if
(
p
<
nb_antenna_ports_eNB
||
p
==
5
){
for
(
symbol
=
0
;
symbol
<
symbols_per_tti
;
symbol
++
){
multadd_cpx_vector
((
int16_t
*
)
&
txdataF
[
p
][
symbol
*
ofdm_symbol_size
+
re_offset
],
(
int16_t
*
)
beam_weights
[
p
][
aa
],
(
int16_t
*
)
&
txdataF_BF
[
aa
][
symbol
*
ofdm_symbol_size
],
0
,
ofdm_symbol_size
,
15
);
/*
for (re=0; re<ofdm_symbol_size; re++){
// direct
((int16_t*)&txdataF_BF[aa][re])[0] += (int16_t)((((int16_t*)&txdataF[p][re+symbol*ofdm_symbol_size+re_offset])[0]*((int16_t*)&beam_weights[p][aa][re])[0])>>15);
((int16_t*)&txdataF_BF[aa][re])[0] -= (int16_t)((((int16_t*)&txdataF[p][re+symbol*ofdm_symbol_size+re_offset])[1]*((int16_t*)&beam_weights[p][aa][re])[1])>>15);
((int16_t*)&txdataF_BF[aa][re])[1] += (int16_t)((((int16_t*)&txdataF[p][re+symbol*ofdm_symbol_size+re_offset])[0]*((int16_t*)&beam_weights[p][aa][re])[1])>>15);
((int16_t*)&txdataF_BF[aa][re])[1] += (int16_t)((((int16_t*)&txdataF[p][re+symbol*ofdm_symbol_size+re_offset])[1]*((int16_t*)&beam_weights[p][aa][re])[0])>>15);
}
*/
}
}
}
}
return
0
;
}
\ No newline at end of file
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