Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
d50a3610
Commit
d50a3610
authored
Apr 12, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calling dlsch detection in initial sync for sib1
parent
158e0836
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
130 additions
and
80 deletions
+130
-80
executables/nr-ue.c
executables/nr-ue.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+5
-5
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+41
-3
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+2
-1
openair1/SCHED_NR_UE/defs.h
openair1/SCHED_NR_UE/defs.h
+14
-0
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+66
-69
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+1
-1
No files found.
executables/nr-ue.c
View file @
d50a3610
...
...
@@ -215,7 +215,7 @@ static void UE_synch(void *arg) {
double
rx_gain_off
=
0
;
nr_get_carrier_frequencies
(
&
UE
->
frame_parms
,
&
dl_carrier
,
&
ul_carrier
);
if
(
nr_initial_sync
(
&
syncD
->
proc
,
UE
,
2
,
get_softmodem_params
()
->
sa
)
==
0
)
{
if
(
nr_initial_sync
(
&
syncD
->
proc
,
UE
,
2
,
get_softmodem_params
()
->
sa
,
get_nrUE_params
()
->
nr_dlsch_parallel
)
==
0
)
{
freq_offset
=
UE
->
common_vars
.
freq_offset
;
// frequency offset computed with pss in initial sync
hw_slot_offset
=
((
UE
->
rx_offset
<<
1
)
/
UE
->
frame_parms
.
samples_per_subframe
*
UE
->
frame_parms
.
slots_per_subframe
)
+
round
((
float
)((
UE
->
rx_offset
<<
1
)
%
UE
->
frame_parms
.
samples_per_subframe
)
/
UE
->
frame_parms
.
samples_per_slot0
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
d50a3610
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
d50a3610
...
...
@@ -202,7 +202,10 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
char
duplex_string
[
2
][
4
]
=
{
"FDD"
,
"TDD"
};
char
prefix_string
[
2
][
9
]
=
{
"NORMAL"
,
"EXTENDED"
};
int
nr_initial_sync
(
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
ue
,
int
n_frames
,
int
sa
)
int
nr_initial_sync
(
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
ue
,
int
n_frames
,
int
sa
,
int
dlsch_parallel
)
{
int32_t
sync_pos
,
sync_pos_frame
;
// k_ssb, N_ssb_crb, sync_pos2,
...
...
@@ -482,11 +485,12 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames, i
// if stand alone and sync on ssb do sib1 detection as part of initial sync
if
(
sa
==
1
&&
ret
==
0
)
{
NR_UE_PDCCH
*
pdcch_vars
=
ue
->
pdcch_vars
[
proc
->
thread_id
][
0
];
uint8_t
nb_symb_pdcch
=
pdcch_vars
->
nb_search_space
>
0
?
pdcch_vars
->
pdcch_config
[
0
].
coreset
.
duration
:
0
;
int
gnb_id
=
0
;
//FIXME
int
coreset_nb_rb
=
0
;
int
coreset_start_rb
=
0
;
for
(
int
n_ss
=
0
;
n_ss
<
pdcch_vars
->
nb_search_space
;
n_ss
++
)
{
uint8_t
nb_symb_pdcch
=
pdcch_vars
->
pdcch_config
[
n_ss
].
coreset
.
duration
:
0
;
get_coreset_rballoc
(
pdcch_vars
->
pdcch_config
[
n_ss
].
coreset
.
frequency_domain_resource
,
&
coreset_nb_rb
,
&
coreset_start_rb
);
for
(
uint16_t
l
=
0
;
l
<
nb_symb_pdcch
;
l
++
)
{
...
...
@@ -506,8 +510,42 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames, i
coreset_nb_rb
);
}
int
dci_cnt
=
nr_ue_pdcch_procedures
(
0
,
ue
,
proc
,
n_ss
);
//gNB_id set to 0
int
dci_cnt
=
nr_ue_pdcch_procedures
(
gnb_id
,
ue
,
proc
,
n_ss
);
if
(
dci_cnt
>
0
){
NR_UE_DLSCH_t
*
dlsch
=
ue
->
dlsch_SI
[
gnb_id
];
if
(
dlsch
&&
(
dlsch
->
active
==
1
))
{
uint8_t
harq_pid
=
dlsch
->
current_harq_pid
;
NR_DL_UE_HARQ_t
*
dlsch0_harq
=
dlsch
->
harq_processes
[
harq_pid
];
uint16_t
nb_symb_sch
=
dlsch0_harq
->
nb_symbols
;
uint16_t
start_symb_sch
=
dlsch0_harq
->
start_symbol
;
for
(
uint16_t
m
=
start_symb_sch
;
m
<
(
nb_symb_sch
+
start_symb_sch
)
;
m
++
){
nr_slot_fep_init_sync
(
ue
,
proc
,
m
,
pdcch_vars
->
slot
,
// same slot and offset as pdcch
pdcch_vars
->
sfn
*
fp
->
samples_per_frame
+
ue
->
rx_offset
);
}
int
ret
=
nr_ue_pdsch_procedures
(
ue
,
proc
,
gnb_id
,
SI_PDSCH
,
ue
->
dlsch_SI
[
gnb_id
],
NULL
);
if
(
ret
>=
0
)
nr_ue_dlsch_procedures
(
ue
,
proc
,
gnb_id
,
SI_PDSCH
,
ue
->
dlsch_SI
[
gnb_id
],
NULL
,
&
ue
->
dlsch_SI_errors
[
gnb_id
],
dlsch_parallel
);
// deactivate dlsch once dlsch proc is done
ue
->
dlsch_SI
[
gnb_id
]
->
active
=
0
;
}
break
;
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
d50a3610
...
...
@@ -1458,7 +1458,8 @@ void generate_RIV_tables(void);
int
nr_initial_sync
(
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
phy_vars_ue
,
int
n_frames
,
int
sa
);
int
sa
,
int
dlsch_parallel
);
/*!
\brief This function gets the carrier frequencies either from FP or command-line-set global variables, depending on the availability of the latter
...
...
openair1/SCHED_NR_UE/defs.h
View file @
d50a3610
...
...
@@ -416,6 +416,20 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
NR_UE_DLSCH_t
*
dlsch0
,
uint16_t
n_pdus
);
void
nr_ue_dlsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
gNB_id
,
PDSCH_t
pdsch
,
NR_UE_DLSCH_t
*
dlsch0
,
NR_UE_DLSCH_t
*
dlsch1
,
int
*
dlsch_errors
,
uint8_t
dlsch_parallel
);
int
nr_ue_pdsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
eNB_id
,
PDSCH_t
pdsch
,
NR_UE_DLSCH_t
*
dlsch0
,
NR_UE_DLSCH_t
*
dlsch1
);
int
nr_ue_pdcch_procedures
(
uint8_t
gNB_id
,
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
d50a3610
...
...
@@ -872,7 +872,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
void
nr_ue_dlsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
e
NB_id
,
int
g
NB_id
,
PDSCH_t
pdsch
,
NR_UE_DLSCH_t
*
dlsch0
,
NR_UE_DLSCH_t
*
dlsch1
,
...
...
@@ -892,7 +892,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
fapi_nr_rx_indication_t
rx_ind
;
uint16_t
number_pdus
=
1
;
// params for UL time alignment procedure
NR_UL_TIME_ALIGNMENT_t
*
ul_time_alignment
=
&
ue
->
ul_time_alignment
[
e
NB_id
];
NR_UL_TIME_ALIGNMENT_t
*
ul_time_alignment
=
&
ue
->
ul_time_alignment
[
g
NB_id
];
uint8_t
is_cw0_active
=
dlsch0
->
harq_processes
[
harq_pid
]
->
status
;
uint16_t
nb_symb_sch
=
dlsch0
->
harq_processes
[
harq_pid
]
->
nb_symbols
;
...
...
@@ -929,7 +929,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
case
RA_PDSCH
:
case
P_PDSCH
:
case
PDSCH
:
pdsch_vars
=
ue
->
pdsch_vars
[
proc
->
thread_id
][
e
NB_id
];
pdsch_vars
=
ue
->
pdsch_vars
[
proc
->
thread_id
][
g
NB_id
];
break
;
case
PMCH
:
case
PDSCH1
:
...
...
@@ -947,8 +947,8 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
*
dlsch_errors
=
0
;
if
(
pdsch
==
RA_PDSCH
)
{
if
(
ue
->
prach_resources
[
e
NB_id
]
!=
NULL
)
dlsch0
->
rnti
=
ue
->
prach_resources
[
e
NB_id
]
->
ra_RNTI
;
if
(
ue
->
prach_resources
[
g
NB_id
]
!=
NULL
)
dlsch0
->
rnti
=
ue
->
prach_resources
[
g
NB_id
]
->
ra_RNTI
;
else
{
LOG_E
(
PHY
,
"[UE %d] Frame %d, nr_slot_rx %d: FATAL, prach_resources is NULL
\n
"
,
ue
->
Mod_id
,
frame_rx
,
nr_slot_rx
);
//mac_xface->macphy_exit("prach_resources is NULL");
...
...
@@ -989,7 +989,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Nl);
LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch0->harq_processes[harq_pid]->G);
LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch0->Kmimo);
LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][
e
NB_id]->num_pdcch_symbols);
LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][
g
NB_id]->num_pdcch_symbols);
#endif
#if UE_TIMING_TRACE
...
...
@@ -1000,7 +1000,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
{
ret
=
nr_dlsch_decoding_mthread
(
ue
,
proc
,
e
NB_id
,
g
NB_id
,
pdsch_vars
->
llr
[
0
],
&
ue
->
frame_parms
,
dlsch0
,
...
...
@@ -1017,7 +1017,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
{
ret
=
nr_dlsch_decoding
(
ue
,
proc
,
e
NB_id
,
g
NB_id
,
pdsch_vars
->
llr
[
0
],
&
ue
->
frame_parms
,
dlsch0
,
...
...
@@ -1075,18 +1075,17 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Nl);
LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch1->harq_processes[harq_pid]->G);
LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch1->Kmimo);
LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][
e
NB_id]->num_pdcch_symbols);
LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][
g
NB_id]->num_pdcch_symbols);
#endif
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
#endif
if
(
dlsch_parallel
)
{
if
(
dlsch_parallel
)
{
ret1
=
nr_dlsch_decoding_mthread
(
ue
,
proc
,
e
NB_id
,
g
NB_id
,
pdsch_vars
->
llr
[
1
],
&
ue
->
frame_parms
,
dlsch1
,
...
...
@@ -1099,11 +1098,10 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"CW dlsch decoding is parallelized, ret1 = %d
\n
"
,
ret1
);
}
else
{
else
{
ret1
=
nr_dlsch_decoding
(
ue
,
proc
,
e
NB_id
,
g
NB_id
,
pdsch_vars
->
llr
[
1
],
&
ue
->
frame_parms
,
dlsch1
,
...
...
@@ -1137,7 +1135,6 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
LOG_D
(
PHY
,
"harq_pid: %d, TBS expected dlsch1: %d
\n
"
,
harq_pid
,
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
);
}
LOG_D
(
PHY
,
" ------ end ldpc decoder for AbsSubframe %d.%d ------
\n
"
,
frame_rx
,
nr_slot_rx
);
LOG_D
(
PHY
,
"harq_pid: %d, TBS expected dlsch0: %d
\n
"
,
harq_pid
,
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
);
...
...
@@ -1145,18 +1142,18 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
switch
(
pdsch
)
{
case
RA_PDSCH
:
nr_fill_dl_indication
(
&
dl_indication
,
NULL
,
&
rx_ind
,
proc
,
ue
,
e
NB_id
);
nr_fill_rx_indication
(
&
rx_ind
,
FAPI_NR_RX_PDU_TYPE_RAR
,
e
NB_id
,
ue
,
dlsch0
,
number_pdus
);
nr_fill_dl_indication
(
&
dl_indication
,
NULL
,
&
rx_ind
,
proc
,
ue
,
g
NB_id
);
nr_fill_rx_indication
(
&
rx_ind
,
FAPI_NR_RX_PDU_TYPE_RAR
,
g
NB_id
,
ue
,
dlsch0
,
number_pdus
);
ue
->
UE_mode
[
e
NB_id
]
=
RA_RESPONSE
;
ue
->
UE_mode
[
g
NB_id
]
=
RA_RESPONSE
;
break
;
case
PDSCH
:
nr_fill_dl_indication
(
&
dl_indication
,
NULL
,
&
rx_ind
,
proc
,
ue
,
e
NB_id
);
nr_fill_rx_indication
(
&
rx_ind
,
FAPI_NR_RX_PDU_TYPE_DLSCH
,
e
NB_id
,
ue
,
dlsch0
,
number_pdus
);
nr_fill_dl_indication
(
&
dl_indication
,
NULL
,
&
rx_ind
,
proc
,
ue
,
g
NB_id
);
nr_fill_rx_indication
(
&
rx_ind
,
FAPI_NR_RX_PDU_TYPE_DLSCH
,
g
NB_id
,
ue
,
dlsch0
,
number_pdus
);
break
;
case
SI_PDSCH
:
nr_fill_dl_indication
(
&
dl_indication
,
NULL
,
&
rx_ind
,
proc
,
ue
,
e
NB_id
);
nr_fill_rx_indication
(
&
rx_ind
,
FAPI_NR_RX_PDU_TYPE_SIB
,
e
NB_id
,
ue
,
dlsch0
,
number_pdus
);
nr_fill_dl_indication
(
&
dl_indication
,
NULL
,
&
rx_ind
,
proc
,
ue
,
g
NB_id
);
nr_fill_rx_indication
(
&
rx_ind
,
FAPI_NR_RX_PDU_TYPE_SIB
,
g
NB_id
,
ue
,
dlsch0
,
number_pdus
);
break
;
default:
break
;
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
d50a3610
...
...
@@ -682,7 +682,7 @@ int main(int argc, char **argv)
}
if
(
UE
->
is_synchronized
==
0
)
{
UE_nr_rxtx_proc_t
proc
=
{
0
};
ret
=
nr_initial_sync
(
&
proc
,
UE
,
1
,
0
);
ret
=
nr_initial_sync
(
&
proc
,
UE
,
1
,
0
,
0
);
printf
(
"nr_initial_sync1 returns %d
\n
"
,
ret
);
if
(
ret
<
0
)
n_errors
++
;
}
...
...
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