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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
ea208693
Commit
ea208693
authored
Jun 19, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing nr_pbchsim
parent
a16829e9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+7
-7
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+2
-0
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+3
-4
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
ea208693
...
...
@@ -566,8 +566,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
}
uint32_t
payload
=
0
;
uint8_t
xtra_byte
=
0
;
xtra_byte
=
(
out
>>
24
)
&
0xff
;
//
uint8_t xtra_byte = 0;
nr_ue_pbch_vars
->
xtra_byte
=
(
out
>>
24
)
&
0xff
;
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_PAYLOAD_BITS
;
i
++
)
payload
|=
((
out
>>
i
)
&
1
)
<<
(
NR_POLAR_PBCH_PAYLOAD_BITS
-
i
-
1
);
...
...
@@ -575,18 +575,18 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
for
(
int
i
=
0
;
i
<
3
;
i
++
)
decoded_output
[
i
]
=
(
uint8_t
)((
payload
>>
((
3
-
i
)
<<
3
))
&
0xff
);
n_hf
=
((
xtra_byte
>>
4
)
&
0x01
);
// computing the half frame index from the extra byte
n_hf
=
((
nr_ue_pbch_vars
->
xtra_byte
>>
4
)
&
0x01
);
// computing the half frame index from the extra byte
ssb_index
=
i_ssb
;
// ssb index corresponds to i_ssb for Lmax = 4,8
if
(
Lmax
==
64
)
{
// for Lmax = 64 ssb index 4th,5th and 6th bits are in extra byte
for
(
int
i
=
0
;
i
<
3
;
i
++
)
ssb_index
+=
(((
xtra_byte
>>
(
7
-
i
))
&
0x01
)
<<
(
3
+
i
));
ssb_index
+=
(((
nr_ue_pbch_vars
->
xtra_byte
>>
(
7
-
i
))
&
0x01
)
<<
(
3
+
i
));
}
ue
->
symbol_offset
=
nr_get_ssb_start_symbol
(
frame_parms
,
ssb_index
,
n_hf
);
#ifdef DEBUG_PBCH
printf
(
"xtra_byte %x payload %x
\n
"
,
xtra_byte
,
payload
);
printf
(
"xtra_byte %x payload %x
\n
"
,
nr_ue_pbch_vars
->
xtra_byte
,
payload
);
for
(
int
i
=
0
;
i
<
(
NR_POLAR_PBCH_PAYLOAD_BITS
>>
3
);
i
++
)
{
// printf("unscrambling pbch_a[%d] = %x \n", i,pbch_a[i]);
...
...
@@ -604,8 +604,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
dl_indication
.
cc_id
=
proc
->
CC_id
;
rx_ind
.
rx_indication_body
[
0
].
pdu_type
=
FAPI_NR_RX_PDU_TYPE_MIB
;
rx_ind
.
rx_indication_body
[
0
].
mib_pdu
.
pdu
=
&
decoded_output
[
0
];
rx_ind
.
rx_indication_body
[
0
].
mib_pdu
.
additional_bits
=
xtra_byte
;
rx_ind
.
rx_indication_body
[
0
].
mib_pdu
.
pdu
=
&
decoded_output
[
0
];
//not good as it is pointing to a memory that can change
rx_ind
.
rx_indication_body
[
0
].
mib_pdu
.
additional_bits
=
nr_ue_pbch_vars
->
xtra_byte
;
rx_ind
.
rx_indication_body
[
0
].
mib_pdu
.
ssb_index
=
i_ssb
;
// confirm with TCL
rx_ind
.
rx_indication_body
[
0
].
mib_pdu
.
ssb_length
=
Lmax
;
// confirm with TCL
rx_ind
.
rx_indication_body
[
0
].
mib_pdu
.
cell_id
=
frame_parms
->
Nid_cell
;
// confirm with TCL
...
...
openair1/PHY/defs_nr_UE.h
View file @
ea208693
...
...
@@ -817,6 +817,8 @@ typedef struct {
/// \brief Pointer to PBCH decoded output.
/// - first index: ? [0..63] (hard coded)
uint8_t
*
decoded_output
;
/// \brief PBCH additional bits
uint8_t
xtra_byte
;
/// \brief Total number of PDU errors.
uint32_t
pdu_errors
;
/// \brief Total number of PDU errors 128 frames ago.
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
ea208693
...
...
@@ -638,9 +638,9 @@ int main(int argc, char **argv)
for
(
int
i
=
0
;
i
<
8
;
i
++
)
gNB_xtra_byte
|=
((
gNB
->
pbch
.
pbch_a
>>
(
31
-
i
))
&
1
)
<<
(
7
-
i
);
payload_ret
=
(
UE
->
rx_ind
.
rx_indication_body
->
mib_pdu
.
additional_bits
==
gNB_xtra_byte
);
payload_ret
=
(
UE
->
pbch_vars
[
0
]
->
xtra_byte
==
gNB_xtra_byte
);
for
(
i
=
0
;
i
<
3
;
i
++
){
payload_ret
+=
(
UE
->
rx_ind
.
rx_indication_body
->
mib_pdu
.
pdu
[
i
]
==
gNB
->
pbch_pdu
[
2
-
i
]);
payload_ret
+=
(
UE
->
pbch_vars
[
0
]
->
decoded_output
[
i
]
==
gNB
->
pbch_pdu
[
2
-
i
]);
//printf("pdu byte %d gNB: 0x%02x UE: 0x%02x\n",i,gNB->pbch_pdu[i], UE->rx_ind.rx_indication_body->mib_pdu.pdu[i]);
}
//printf("xtra byte gNB: 0x%02x UE: 0x%02x\n",gNB_xtra_byte, UE->rx_ind.rx_indication_body->mib_pdu.additional_bits);
...
...
@@ -656,7 +656,6 @@ int main(int argc, char **argv)
if
(((
float
)
n_errors
/
(
float
)
n_trials
<=
target_error_rate
)
&&
(
n_errors_payload
==
0
))
{
printf
(
"PBCH test OK
\n
"
);
printf
(
"Synchronization obtained for i_ssb = %d
\n
"
,
UE
->
rx_ind
.
rx_indication_body
[
0
].
mib_pdu
.
ssb_index
);
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