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
6df0e462
Commit
6df0e462
authored
Dec 04, 2015
by
lukashov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in lte_ue_measurements.c for subband pmi calculation
parent
55c1f581
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
26 deletions
+37
-26
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
+1
-0
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+7
-5
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+12
-6
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
+3
-1
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+14
-14
No files found.
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
View file @
6df0e462
...
...
@@ -614,6 +614,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue,
// For each RE in subband perform ch0 * conj(ch1)
// multiply by conjugated channel
#if defined(__x86_64__) || defined(__i386__)
mmtmpPMI0
=
_mm_madd_epi16
(
dl_ch0_128
[
0
],
dl_ch1_128
[
0
]);
mmtmpPMI1
=
_mm_shufflelo_epi16
(
dl_ch1_128
[
0
],
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
//_MM_SHUFFLE(2,3,0,1)
mmtmpPMI1
=
_mm_shufflehi_epi16
(
mmtmpPMI1
,
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpPMI1
=
_mm_sign_epi16
(
mmtmpPMI1
,
*
(
__m128i
*
)
&
conjugate
[
0
]);
...
...
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
6df0e462
...
...
@@ -5786,7 +5786,7 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb)
int
i
,
aarx
;
uint16_t
pmiq
=
0
;
uint32_t
pmivect
=
0
;
// work with tyoe
uint32_t
pmivect
=
0
;
uint8_t
rank
=
meas
->
rank
[
eNB_id
];
int
pmi_re
,
pmi_im
;
int
nb_subbands
=
0
;
...
...
@@ -5841,21 +5841,23 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb)
pmi_re
+=
meas
->
subband_pmi_re
[
eNB_id
][
i
][
aarx
];
pmi_im
+=
meas
->
subband_pmi_im
[
eNB_id
][
i
][
aarx
];
}
if
(
pmi_re
>
pmi_im
)
if
(
pmi_re
>
=
pmi_im
)
pmiq
=
PMI_2A_R1_11
;
else
//if (pmi_re < pmi_im)
pmiq
=
PMI_2A_R1_1j
;
printf
(
"subband %d, pmi_re %d, pmi_in %d, pmiq %d
\n
"
,
i
,
pmi_re
,
pmi_im
,
pmiq
);
// printf("subband %d, pmi_re %d, pmi_im %d, pmiq %d \n",i,pmi_re,pmi_im,pmiq);
// printf("subband %d, pmi%d \n",i,pmiq);
//According to Section 7.2.4 of 36.213
pmivect
|=
((
pmiq
-
1
)
<<
(
i
));
//shift 1 since only one bit
}
else
{
LOG_E
(
PHY
,
"PMI feedback for rank>1 not supported!
\n
"
);
pmivect
=
0
;
}
}
}
//printf( "pmivect %d \n", pmivect);
printf
(
"subband %d pmivect %d
\n
"
,
i
,
pmivect
);
return
(
pmivect
);
}
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
View file @
6df0e462
...
...
@@ -203,7 +203,10 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
frame_parms
,
dlsch0_harq
->
mimo_mode
);
//#ifdef DEBUG_DLSCH_MOD
printf
(
"dlsch: using pmi %lx, rb_alloc %x, pmi_ext %x
\n
"
,
pmi2hex_2Ar1
(
dlsch0_harq
->
pmi_alloc
),
*
rballoc
,
*
lte_ue_pdsch_vars
[
eNB_id
]
->
pmi_ext
);
/* printf("dlsch: using pmi %lx, rb_alloc %x, pmi_ext ",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),*rballoc);
for (rb=0;rb<nb_rb;rb++)
printf("%d",lte_ue_pdsch_vars[eNB_id]->pmi_ext[rb]);
printf("\n");*/
//#endif
if
(
rx_type
==
rx_IC_single_stream
)
{
...
...
@@ -4137,12 +4140,14 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
rxF
=
&
rxdataF
[
aarx
][
prb_off2
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
))];
}
/*
if (mimo_mode <= PUSCH_PRECODING1)
*pmi_loc = (pmi>>((prb>>2)<<1))&3;
else
*
pmi_loc
=
(
pmi
>>
prb
)
&
1
;
*pmi_loc=(pmi>>prb)&1;*/
*
pmi_loc
=
get_pmi
(
frame_parms
->
N_RB_DL
,
mimo_mode
,
pmi
,
prb
);
pmi_loc
++
;
...
...
@@ -4279,12 +4284,13 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
#ifdef DEBUG_DLSCH_DEMOD
printf
(
"symbol %d / rb %d: alloc %d skip_half %d (rxF %p, rxF_ext %p) prb_off (%d,%d)
\n
"
,
symbol
,
prb
,
rb_alloc_ind
,
skip_half
,
rxF
,
rxF_ext
,
prb_off
,
prb_off2
);
#endif
if
(
mimo_mode
<=
PUSCH_PRECODING1
)
/*
if (mimo_mode <= PUSCH_PRECODING1)
*pmi_loc = (pmi>>((prb>>2)<<1))&3;
else
*pmi_loc=(pmi>>prb)&1;
// printf("symbol_mod %d (pilots %d) rb %d, sb %d, pmi %d (pmi_loc %p,rxF %p, ch00 %p, ch01 %p, rxF_ext %p dl_ch0_ext %p dl_ch1_ext %p)\n",symbol_mod,pilots,prb,prb>>2,*pmi_loc,pmi_loc,rxF,dl_ch0, dl_ch1, rxF_ext,dl_ch0_ext,dl_ch1_ext);
*/
*
pmi_loc
=
get_pmi
(
frame_parms
->
N_RB_DL
,
mimo_mode
,
pmi
,
prb
);
pmi_loc
++
;
if
(
prb
!=
(
frame_parms
->
N_RB_DL
>>
1
))
{
// This PRB is not around DC
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
View file @
6df0e462
...
...
@@ -242,6 +242,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
first_re
=
6
;
for
(
re
=
first_re
;
re
<
last_re
;
re
++
)
{
// printf("element %d precoder_index for allocation %d\n",re, precoder_index );
if
((
skip_dc
==
1
)
&&
(
re
==
6
))
...
...
@@ -1268,7 +1270,7 @@ uint8_t get_pmi(uint8_t N_RB_DL,MIMO_mode_t mode, uint32_t pmi_alloc,uint16_t rb
if
(
mode
<=
PUSCH_PRECODING1
)
return
((
pmi_alloc
>>
((
rb
>>
2
)
<<
1
))
&
3
);
else
{
//
printf("Getting pmi for RB %d => %d\n",rb,((pmi_alloc>>(rb>>2))&1));
//
printf("Getting pmi for RB %d => %d\n",rb,((pmi_alloc>>(rb>>2))&1));
return
((
pmi_alloc
>>
(
rb
>>
2
))
&
1
);
}
break
;
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
6df0e462
...
...
@@ -1651,18 +1651,18 @@ n(tikz_fname,"w");
case
6
:
dci_length
=
sizeof_DCI2_1_5MHz_2A_TDD_t
;
dci_length_bytes
=
sizeof
(
DCI2_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_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
harq_pid
=
0
;
((
DCI2_1_5MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
mcs1
=
mcs1
;
((
DCI2_1_5MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
ndi1
=
1
;
((
DCI2_1_5MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
rv1
=
0
;
((
DCI2_1_5MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
mcs2
=
mcs2
;
((
DCI2_1_5MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
ndi2
=
1
;
((
DCI2_1_5MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
rv2
=
0
;
((
DCI2_1_5MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
tb_swap
=
0
;
((
DCI2_1_5MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
tpmi
=
2
;
break
;
case
25
:
dci_length
=
sizeof_DCI2_5MHz_2A_TDD_t
;
...
...
@@ -1697,7 +1697,7 @@ n(tikz_fname,"w");
((
DCI2_10MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
ndi2
=
1
;
((
DCI2_10MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
rv2
=
0
;
((
DCI2_10MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
tb_swap
=
0
;
((
DCI2_10MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
tpmi
=
1
;
((
DCI2_10MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
tpmi
=
2
;
break
;
case
100
:
...
...
@@ -1713,7 +1713,7 @@ n(tikz_fname,"w");
((
DCI2_20MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
ndi2
=
1
;
((
DCI2_20MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
rv2
=
0
;
((
DCI2_20MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
tb_swap
=
0
;
((
DCI2_20MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
tpmi
=
1
;
((
DCI2_20MHz_2A_TDD_t
*
)
&
DLSCH_alloc_pdu_1
[
k
])
->
tpmi
=
2
;
dci_length
=
sizeof_DCI2_20MHz_2A_TDD_t
;
dci_length_bytes
=
sizeof
(
DCI2_20MHz_2A_TDD_t
);
break
;
...
...
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