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
lizhongxiao
OpenXG-RAN
Commits
a898811b
Commit
a898811b
authored
Apr 15, 2022
by
lfq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add cal_amp
parent
a086d943
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
openair1/PHY/MODULATION/nr_modulation.h
openair1/PHY/MODULATION/nr_modulation.h
+1
-1
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+19
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+15
-1
No files found.
openair1/PHY/MODULATION/nr_modulation.h
View file @
a898811b
...
@@ -81,7 +81,7 @@ void nr_ue_layer_mapping(NR_UE_ULSCH_t **ulsch_ue,
...
@@ -81,7 +81,7 @@ void nr_ue_layer_mapping(NR_UE_ULSCH_t **ulsch_ue,
\param Ns Slot number (0..19)
\param Ns Slot number (0..19)
\param sample_offset offset within rxdata (points to beginning of subframe)
\param sample_offset offset within rxdata (points to beginning of subframe)
*/
*/
uint
cal_amp
(
int16_t
*
dataIn
,
int
len
);
int
nr_slot_fep_ul
(
NR_DL_FRAME_PARMS
*
frame_parms
,
int
nr_slot_fep_ul
(
NR_DL_FRAME_PARMS
*
frame_parms
,
int32_t
*
rxdata
,
int32_t
*
rxdata
,
int32_t
*
rxdataF
,
int32_t
*
rxdataF
,
...
...
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
a898811b
...
@@ -33,6 +33,21 @@
...
@@ -33,6 +33,21 @@
#undef LOG_I
#undef LOG_I
#define LOG_I(A,B...) printf(A)
#define LOG_I(A,B...) printf(A)
#endif*/
#endif*/
uint
g_ul_time_amp
[
14
]
=
{
0
};
uint
g_ul_freq_amp
[
14
]
=
{
0
};
uint
cal_amp
(
int16_t
*
dataIn
,
int
len
)
{
int
i
;
uint
sumA
=
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
sumA
+=
abs
(
dataIn
[
i
]);
}
sumA
=
sumA
/
len
;
return
sumA
;
}
dft_size_idx_t
get_dft_size_idx
(
uint16_t
ofdm_symbol_size
)
dft_size_idx_t
get_dft_size_idx
(
uint16_t
ofdm_symbol_size
)
{
{
...
@@ -334,7 +349,10 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -334,7 +349,10 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
rxdata_ptr
,
rxdata_ptr
,
(
int16_t
*
)
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
(
int16_t
*
)
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
1
);
1
);
#if 0
g_ul_time_amp[symbol] = cal_amp(rxdata_ptr, 512);
g_ul_freq_amp[symbol] = cal_amp((int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 512);
#endif
return
0
;
return
0
;
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
a898811b
...
@@ -1164,7 +1164,8 @@ void nr_ulsch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -1164,7 +1164,8 @@ void nr_ulsch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms,
_m_empty
();
_m_empty
();
#endif
#endif
}
}
extern
uint
g_ul_time_amp
[
14
];
extern
uint
g_ul_freq_amp
[
14
];
int
nr_rx_pusch
(
PHY_VARS_gNB
*
gNB
,
int
nr_rx_pusch
(
PHY_VARS_gNB
*
gNB
,
uint8_t
ulsch_id
,
uint8_t
ulsch_id
,
uint32_t
frame
,
uint32_t
frame
,
...
@@ -1380,6 +1381,19 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1380,6 +1381,19 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
rel15_ul
->
qam_mod_order
);
rel15_ul
->
qam_mod_order
);
stop_meas
(
&
gNB
->
ulsch_llr_stats
);
stop_meas
(
&
gNB
->
ulsch_llr_stats
);
rxdataF_ext_offset
+=
gNB
->
pusch_vars
[
ulsch_id
]
->
ul_valid_re_per_slot
[
symbol
];
rxdataF_ext_offset
+=
gNB
->
pusch_vars
[
ulsch_id
]
->
ul_valid_re_per_slot
[
symbol
];
uint
pusch_amp
;
if
(
symbol
==
(
rel15_ul
->
start_symbol_index
+
rel15_ul
->
nr_of_symbols
-
1
))
{
static
int
cnt
=
0
;
if
(
cnt
<
10
)
{
pusch_amp
=
cal_amp
(
&
gNB
->
pusch_vars
[
ulsch_id
]
->
rxdataF_ext
[
0
][
symbol
*
nb_re_pusch
],
nb_re_pusch
);
//LOG_I(PHY, "UL AMP frame %d %d, symbol %d, rbs %d, res %d, time %d, freq %d \n", frame, slot, symbol, nb_re_pusch/12, nb_re_pusch, g_ul_time_amp[symbol], g_ul_freq_amp[symbol], pusch_amp);
LOG_I
(
PHY
,
"UL AMP frame %d %d, symbol %d, rbs %d, res %d, pusch amp %d
\n
"
,
frame
,
slot
,
symbol
,
nb_re_pusch
/
12
,
nb_re_pusch
,
pusch_amp
);
cnt
++
;
}
}
}
}
}
// symbol loop
}
// symbol loop
...
...
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