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
4f9aa865
Commit
4f9aa865
authored
1 year ago
by
Sagar Parsawar
Committed by
francescomani
1 year ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile error fix
parent
386881c3
Branches unavailable
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
v2.1.0
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+10
-10
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
4f9aa865
...
@@ -188,7 +188,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -188,7 +188,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
8
);
8
);
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
(
c16_t
*
)
rxF
)
-
squaredMod
(
*
(
c16_t
*
)
noiseFig
))
-
10
*
log10
(
squaredMod
(
*
(
c16_t
*
)
noiseFig
));
snr
+=
10
*
log10
(
squaredMod
(
*
(
c16_t
*
)
rxF
)
-
squaredMod
(
*
(
c16_t
*
)
noiseFig
))
-
10
*
log10
(
squaredMod
(
*
(
c16_t
*
)
noiseFig
));
...
@@ -220,7 +220,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -220,7 +220,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
}
}
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
(
c16_t
*
)
rxF
)
-
squaredMod
(
*
(
c16_t
*
)
noiseFig
))
-
10
*
log10
(
squaredMod
(
*
(
c16_t
*
)
noiseFig
));
snr
+=
10
*
log10
(
squaredMod
(
*
(
c16_t
*
)
rxF
)
-
squaredMod
(
*
(
c16_t
*
)
noiseFig
))
-
10
*
log10
(
squaredMod
(
*
(
c16_t
*
)
noiseFig
));
...
@@ -249,7 +249,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -249,7 +249,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
}
}
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
...
@@ -271,7 +271,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -271,7 +271,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
8
);
8
);
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
...
@@ -334,7 +334,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -334,7 +334,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
16
);
16
);
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
...
@@ -353,7 +353,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -353,7 +353,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
16
);
16
);
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
...
@@ -376,7 +376,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -376,7 +376,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
16
);
16
);
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
...
@@ -398,7 +398,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -398,7 +398,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
16
);
16
);
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
...
@@ -417,7 +417,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -417,7 +417,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
16
);
16
);
//SNR & RSRP estimation
//SNR & RSRP estimation
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
);
rsrp
+=
squaredMod
(
*
((
c16_t
*
)
rxF
)
)
;
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
0
]
=
rxF
[
0
]
-
(
int16_t
)(((
int32_t
)
ch
[
0
]
*
pil
[
0
]
-
(
int32_t
)
ch
[
1
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
noiseFig
[
1
]
=
rxF
[
1
]
-
(
int16_t
)(((
int32_t
)
ch
[
1
]
*
pil
[
0
]
+
(
int32_t
)
ch
[
0
]
*
pil
[
1
])
>>
15
);
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
snr
+=
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
rxF
))
-
squaredMod
(
*
((
c16_t
*
)
noiseFig
)))
-
10
*
log10
(
squaredMod
(
*
((
c16_t
*
)
noiseFig
)));
...
@@ -549,7 +549,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -549,7 +549,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
(
int16_t
*
)
&
chT_interpol
[
rxAnt
][
0
],
1
);
(
int16_t
*
)
&
chT_interpol
[
rxAnt
][
0
],
1
);
// peak estimator
// peak estimator
mean_val
=
abs32
((
int32_t
)
ch_tmp
[(
prs_cfg
->
NumRB
*
12
)
]);
mean_val
=
squaredMod
(((
c16_t
*
)
ch_tmp
)[(
prs_cfg
->
NumRB
*
12
)
>>
1
]);
peak_estimator
(
&
chT_interpol
[
rxAnt
][
0
],
peak_estimator
(
&
chT_interpol
[
rxAnt
][
0
],
NR_PRS_IDFT_OVERSAMP_FACTOR
*
frame_params
->
ofdm_symbol_size
,
NR_PRS_IDFT_OVERSAMP_FACTOR
*
frame_params
->
ofdm_symbol_size
,
&
prs_toa
,
&
prs_toa
,
...
...
This diff is collapsed.
Click to expand it.
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