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
ZhouShuya
OpenXG-RAN
Commits
80222525
Commit
80222525
authored
Sep 09, 2020
by
Rakesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function to check for ssb from rrc configuration
parent
ec51d54f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
openair1/SCHED_NR_UE/defs.h
openair1/SCHED_NR_UE/defs.h
+1
-0
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+65
-0
No files found.
openair1/SCHED_NR_UE/defs.h
View file @
80222525
...
...
@@ -387,6 +387,7 @@ void set_tx_harq_id(NR_UE_ULSCH_t *ulsch, int harq_pid, int slot_tx);
int
get_tx_harq_id
(
NR_UE_ULSCH_t
*
ulsch
,
int
slot_tx
);
int
is_pbch_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
);
int
is_ssb_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
);
/*@}*/
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
80222525
...
...
@@ -2501,6 +2501,16 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
}
else
{
LOG_E
(
PHY
,
"[UE %d] frame %d, nr_tti_rx %d, Error decoding PBCH!
\n
"
,
ue
->
Mod_id
,
frame_rx
,
nr_tti_rx
);
/*FILE *fd;
if ((fd = fopen("rxsig_frame0.dat","w")) != NULL) {
fwrite((void *)&ue->common_vars.rxdata[0][0],
sizeof(int32_t),
ue->frame_parms.samples_per_frame,
fd);
LOG_I(PHY,"Dummping Frame ... bye bye \n");
fclose(fd);
exit(0);
}*/
/*
write_output("rxsig0.m","rxs0", ue->common_vars.rxdata[0],ue->frame_parms.samples_per_subframe,1,1);
...
...
@@ -4006,6 +4016,59 @@ void *UE_thread_slot1_dl_processing(void *arg) {
}
#endif
int
is_ssb_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
mu
=
fp
->
numerology_index
;
//uint8_t half_frame_index = fp->half_frame_bit;
//uint8_t i_ssb = fp->ssb_index;
uint8_t
Lmax
=
fp
->
Lmax
;
if
(
!
(
frame
%
(
1
<<
(
config
->
ssb_table
.
ssb_period
-
1
)))){
if
(
Lmax
<=
8
)
{
if
(
slot
<=
3
&&
(((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
2
*
slot
)
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
(
2
*
slot
+
1
))
&
0x80000000
)
==
0x80000000
))
return
1
;
else
return
0
;
}
else
if
(
Lmax
==
64
)
{
if
(
mu
==
NR_MU_3
){
if
(
slot
>=
0
&&
slot
<=
7
){
if
(((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
2
*
slot
)
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
(
2
*
slot
+
1
))
&
0x80000000
)
==
0x80000000
)
return
1
;
else
return
0
;
}
else
if
(
slot
>=
10
&&
slot
<=
17
){
if
(((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
2
*
(
slot
-
2
))
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
(
2
*
(
slot
-
2
)
+
1
))
&
0x80000000
)
==
0x80000000
)
return
1
;
else
return
0
;
}
else
if
(
slot
>=
20
&&
slot
<=
27
){
if
(((
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
<<
2
*
(
slot
-
20
))
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
<<
(
2
*
(
slot
-
20
)
+
1
))
&
0x80000000
)
==
0x80000000
)
return
1
;
else
return
0
;
}
else
if
(
slot
>=
30
&&
slot
<=
37
){
if
(((
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
<<
2
*
(
slot
-
22
))
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
<<
(
2
*
(
slot
-
22
)
+
1
))
&
0x80000000
)
==
0x80000000
)
return
1
;
else
return
0
;
}
else
return
0
;
}
else
if
(
mu
==
NR_MU_4
)
{
AssertFatal
(
0
==
1
,
"not implemented for mu = %d yet
\n
"
,
mu
);
}
else
AssertFatal
(
0
==
1
,
"Invalid numerology index %d for the synchronization block
\n
"
,
mu
);
}
else
AssertFatal
(
0
==
1
,
"Invalid Lmax %d for the synchronization block
\n
"
,
Lmax
);
}
else
return
0
;
}
int
is_pbch_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
)
{
...
...
@@ -4037,6 +4100,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
int
frame_rx
=
proc
->
frame_rx
;
int
nr_tti_rx
=
proc
->
nr_tti_rx
;
int
slot_pbch
;
int
slot_ssb
;
NR_UE_PDCCH
*
pdcch_vars
=
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
nr_tti_rx
]][
0
];
fapi_nr_config_request_t
*
cfg
=
&
ue
->
nrUE_config
;
...
...
@@ -4059,6 +4123,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
get_coreset_rballoc
(
pdcch_vars
->
pdcch_config
[
0
].
coreset
.
frequency_domain_resource
,
&
coreset_nb_rb
,
&
coreset_start_rb
);
slot_pbch
=
is_pbch_in_slot
(
cfg
,
frame_rx
,
nr_tti_rx
,
fp
);
slot_ssb
=
is_ssb_in_slot
(
cfg
,
frame_rx
,
nr_tti_rx
,
fp
);
// looking for pbch only in slot where it is supposed to be
if
((
ue
->
decode_MIB
==
1
)
&&
slot_pbch
)
...
...
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