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
wangjie
OpenXG-RAN
Commits
ae02c9a6
Commit
ae02c9a6
authored
Mar 22, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Plain Diff
conflicts resolved after merge with develop-nr
parents
02d3decd
fe6ff2d8
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
131 additions
and
156 deletions
+131
-156
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
+1
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
+1
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+1
-1
openair1/PHY/CODING/nr_rate_matching.c
openair1/PHY/CODING/nr_rate_matching.c
+2
-0
openair1/PHY/CODING/nr_segmentation.c
openair1/PHY/CODING/nr_segmentation.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+18
-7
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+7
-9
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+48
-47
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+3
-2
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+2
-2
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+25
-41
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+0
-3
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+2
-2
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+1
-1
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+14
-34
No files found.
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
View file @
ae02c9a6
...
@@ -54,7 +54,7 @@ int32_t nrLDPC_decoder(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t*
...
@@ -54,7 +54,7 @@ int32_t nrLDPC_decoder(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t*
t_nrLDPC_lut
lut
;
t_nrLDPC_lut
lut
;
t_nrLDPC_lut
*
p_lut
=
&
lut
;
t_nrLDPC_lut
*
p_lut
=
&
lut
;
printf
(
"p_procBuf->cnProcBuf = %p
\n
"
,
p_procBuf
->
cnProcBuf
);
//
printf("p_procBuf->cnProcBuf = %p\n", p_procBuf->cnProcBuf);
// Initialize decoder core(s) with correct LUTs
// Initialize decoder core(s) with correct LUTs
numLLR
=
nrLDPC_init
(
p_decParams
,
p_lut
);
numLLR
=
nrLDPC_init
(
p_decParams
,
p_lut
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
View file @
ae02c9a6
...
@@ -525,7 +525,7 @@ void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) {
...
@@ -525,7 +525,7 @@ void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) {
}
}
void
generic_polar_decoder
(
t_nrPolar_params
*
pp
,
decoder_node_t
*
node
)
{
void
generic_polar_decoder
(
const
t_nrPolar_params
*
pp
,
decoder_node_t
*
node
)
{
// Apply F to left
// Apply F to left
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
ae02c9a6
...
@@ -184,7 +184,7 @@ int8_t polar_decoder_dci(double *input,
...
@@ -184,7 +184,7 @@ int8_t polar_decoder_dci(double *input,
uint8_t
pathMetricAppr
,
uint8_t
pathMetricAppr
,
uint16_t
n_RNTI
);
uint16_t
n_RNTI
);
void
generic_polar_decoder
(
t_nrPolar_params
*
,
void
generic_polar_decoder
(
const
t_nrPolar_params
*
,
decoder_node_t
*
);
decoder_node_t
*
);
void
build_decoder_tree
(
t_nrPolar_params
*
pp
);
void
build_decoder_tree
(
t_nrPolar_params
*
pp
);
...
...
openair1/PHY/CODING/nr_rate_matching.c
View file @
ae02c9a6
...
@@ -182,6 +182,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
...
@@ -182,6 +182,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
#endif
#endif
}
}
if
(
rvidx
!=
0
){
while
(
k
<
E
)
{
while
(
k
<
E
)
{
for
(
ind
=
0
;
(
ind
<
Ncb
)
&&
(
k
<
E
);
ind
++
)
{
for
(
ind
=
0
;
(
ind
<
Ncb
)
&&
(
k
<
E
);
ind
++
)
{
if
(
soft_input
[
ind
]
!=
NR_NULL
)
{
if
(
soft_input
[
ind
]
!=
NR_NULL
)
{
...
@@ -200,6 +201,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
...
@@ -200,6 +201,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
#endif
#endif
}
}
}
}
}
return
0
;
return
0
;
}
}
openair1/PHY/CODING/nr_segmentation.c
View file @
ae02c9a6
...
@@ -156,7 +156,7 @@ else
...
@@ -156,7 +156,7 @@ else
if
(
*
F
>
0
)
{
if
(
*
F
>
0
)
{
for
(
k
=
Kprime
>>
3
;
k
<
(
*
K
)
>>
3
;
k
++
)
{
for
(
k
=
Kprime
>>
3
;
k
<
(
*
K
)
>>
3
;
k
++
)
{
output_buffers
[
r
][
k
]
=
NR_NULL
;
output_buffers
[
r
][
k
]
=
0
;
//printf("r %d filler bits [%d] = %d Kprime %d \n", r,k, output_buffers[r][k], Kprime);
//printf("r %d filler bits [%d] = %d Kprime %d \n", r,k, output_buffers[r][k], Kprime);
}
}
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
ae02c9a6
...
@@ -277,17 +277,18 @@ int nr_dlsch_encoding(unsigned char *a,
...
@@ -277,17 +277,18 @@ int nr_dlsch_encoding(unsigned char *a,
nfapi_nr_dl_config_dlsch_pdu_rel15_t
rel15
=
dlsch
->
harq_processes
[
harq_pid
]
->
dlsch_pdu
.
dlsch_pdu_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
rel15
=
dlsch
->
harq_processes
[
harq_pid
]
->
dlsch_pdu
.
dlsch_pdu_rel15
;
uint16_t
nb_rb
=
rel15
.
n_prb
;
uint16_t
nb_rb
=
rel15
.
n_prb
;
uint8_t
nb_symb_sch
=
rel15
.
nb_symbols
;
uint8_t
nb_symb_sch
=
rel15
.
nb_symbols
;
uint32_t
A
,
Z
;
uint32_t
A
,
Z
,
F
=
0
;
uint32_t
*
pz
=
&
Z
;
uint32_t
*
pz
=
&
Z
;
uint8_t
mod_order
=
rel15
.
modulation_order
;
uint8_t
mod_order
=
rel15
.
modulation_order
;
uint16_t
Kr
=
0
,
r
,
r_offset
=
0
,
Kr_bytes
;
uint16_t
Kr
=
0
,
r
,
r_offset
=
0
,
Kr_bytes
;
uint8_t
*
d_tmp
[
MAX_NUM_DLSCH_SEGMENTS
];
uint8_t
*
d_tmp
[
MAX_NUM_DLSCH_SEGMENTS
];
uint8_t
kb
,
BG
=
1
;
uint8_t
BG
=
1
;
uint32_t
E
;
uint32_t
E
;
uint8_t
Ilbrm
=
0
;
uint8_t
Ilbrm
=
0
;
uint32_t
Tbslbrm
=
950984
;
//max tbs
uint32_t
Tbslbrm
=
950984
;
//max tbs
uint8_t
nb_re_dmrs
=
rel15
.
nb_re_dmrs
;
uint8_t
nb_re_dmrs
=
rel15
.
nb_re_dmrs
;
uint16_t
length_dmrs
=
1
;
uint16_t
length_dmrs
=
1
;
float
Coderate
=
0
.
0
;
/*
/*
uint8_t *channel_input[MAX_NUM_DLSCH_SEGMENTS]; //unsigned char
uint8_t *channel_input[MAX_NUM_DLSCH_SEGMENTS]; //unsigned char
...
@@ -337,18 +338,20 @@ int nr_dlsch_encoding(unsigned char *a,
...
@@ -337,18 +338,20 @@ int nr_dlsch_encoding(unsigned char *a,
pz
,
pz
,
&
dlsch
->
harq_processes
[
harq_pid
]
->
F
);
&
dlsch
->
harq_processes
[
harq_pid
]
->
F
);
kb
=
dlsch
->
harq_processes
[
harq_pid
]
->
K
/
(
*
pz
);
F
=
dlsch
->
harq_processes
[
harq_pid
]
->
F
;
if
(
kb
==
22
){
Coderate
=
(
float
)
A
/
(
float
)
G
;
BG
=
1
;
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
){
BG
=
2
;
}
}
else
{
else
{
BG
=
2
;
BG
=
1
;
}
}
Kr
=
dlsch
->
harq_processes
[
harq_pid
]
->
K
;
Kr
=
dlsch
->
harq_processes
[
harq_pid
]
->
K
;
Kr_bytes
=
Kr
>>
3
;
Kr_bytes
=
Kr
>>
3
;
//printf("segment Z %d k
b %d k %d Kr %d BG %d\n", *pz,kb
,dlsch->harq_processes[harq_pid]->K,Kr,BG);
//printf("segment Z %d k
%d Kr %d BG %d\n", *pz
,dlsch->harq_processes[harq_pid]->K,Kr,BG);
//start_meas(te_stats);
//start_meas(te_stats);
for
(
r
=
0
;
r
<
dlsch
->
harq_processes
[
harq_pid
]
->
C
;
r
++
)
{
for
(
r
=
0
;
r
<
dlsch
->
harq_processes
[
harq_pid
]
->
C
;
r
++
)
{
...
@@ -393,6 +396,14 @@ int nr_dlsch_encoding(unsigned char *a,
...
@@ -393,6 +396,14 @@ int nr_dlsch_encoding(unsigned char *a,
}
}
for
(
r
=
0
;
r
<
dlsch
->
harq_processes
[
harq_pid
]
->
C
;
r
++
)
{
for
(
r
=
0
;
r
<
dlsch
->
harq_processes
[
harq_pid
]
->
C
;
r
++
)
{
if
(
dlsch
->
harq_processes
[
harq_pid
]
->
F
>
0
)
{
for
(
int
k
=
(
Kr
-
F
-
2
*
(
*
pz
));
k
<
Kr
-
2
*
(
*
pz
);
k
++
)
{
dlsch
->
harq_processes
[
harq_pid
]
->
d
[
r
][
k
]
=
NR_NULL
;
//if (k<(Kr-F+8))
//printf("r %d filler bits [%d] = %d \n", r,k, dlsch->harq_processes[harq_pid]->d[r][k]);
}
}
#ifdef DEBUG_DLSCH_CODING
#ifdef DEBUG_DLSCH_CODING
printf
(
"Rate Matching, Code segment %d (coded bits (G) %d,unpunctured/repeated bits per code segment %d,mod_order %d, nb_rb %d)...
\n
"
,
printf
(
"Rate Matching, Code segment %d (coded bits (G) %d,unpunctured/repeated bits per code segment %d,mod_order %d, nb_rb %d)...
\n
"
,
r
,
r
,
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
ae02c9a6
...
@@ -49,7 +49,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
...
@@ -49,7 +49,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
uint8_t
nushift
;
uint8_t
nushift
;
uint8_t
ssb_index
=
current_ssb
->
i_ssb
;
uint8_t
ssb_index
=
current_ssb
->
i_ssb
;
uint8_t
n_hf
=
current_ssb
->
n_hf
;
uint8_t
n_hf
=
current_ssb
->
n_hf
;
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
;
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
;
nushift
=
ue
->
frame_parms
.
Nid_cell
%
4
;
nushift
=
ue
->
frame_parms
.
Nid_cell
%
4
;
ue
->
frame_parms
.
nushift
=
nushift
;
ue
->
frame_parms
.
nushift
=
nushift
;
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
ae02c9a6
...
@@ -1418,27 +1418,25 @@ void nr_dci_decoding_procedure0(int s,
...
@@ -1418,27 +1418,25 @@ void nr_dci_decoding_procedure0(int s,
*
format_found
=
_format_2_3_found
;
*
format_found
=
_format_2_3_found
;
}
}
#ifdef NR_PDCCH_DCI_DEBUG
#ifdef NR_PDCCH_DCI_DEBUG
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> format_found=%d
\n
"
,
*
format_found
);
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> format_found=%d
\n
"
,
*
format_found
);
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> crc_scrambled=%d
\n
"
,
*
crc_scrambled
);
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> crc_scrambled=%d
\n
"
,
*
crc_scrambled
);
#endif
#endif
if
(
*
format_found
!=
255
)
{
if
(
*
format_found
!=
255
)
{
dci_alloc
[
*
dci_cnt
].
dci_length
=
sizeof_bits
;
dci_alloc
[
*
dci_cnt
].
dci_length
=
sizeof_bits
;
dci_alloc
[
*
dci_cnt
].
rnti
=
crc
;
dci_alloc
[
*
dci_cnt
].
rnti
=
crc
;
dci_alloc
[
*
dci_cnt
].
L
=
L
;
dci_alloc
[
*
dci_cnt
].
L
=
L
;
dci_alloc
[
*
dci_cnt
].
firstCCE
=
CCEind
;
dci_alloc
[
*
dci_cnt
].
firstCCE
=
CCEind
;
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
0
]
=
dci_estimation
[
0
];
memcpy
(
&
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
0
],
dci_estimation
,
8
);
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
1
]
=
dci_estimation
[
1
];
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
2
]
=
dci_estimation
[
2
];
#ifdef NR_PDCCH_DCI_DEBUG
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
3
]
=
dci_estimation
[
3
];
#ifdef NR_PDCCH_DCI_DEBUG
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> rnti matches -> DCI FOUND !!! crc =>0x%x, sizeof_bits %d, sizeof_bytes %d
\n
"
,
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> rnti matches -> DCI FOUND !!! crc =>0x%x, sizeof_bits %d, sizeof_bytes %d
\n
"
,
dci_alloc
[
*
dci_cnt
].
rnti
,
dci_alloc
[
*
dci_cnt
].
dci_length
,
sizeof_bytes
);
dci_alloc
[
*
dci_cnt
].
rnti
,
dci_alloc
[
*
dci_cnt
].
dci_length
,
sizeof_bytes
);
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> dci_cnt %d (format_css %d crc_scrambled %d) L %d, firstCCE %d pdu[0] 0x%lx pdu[1] 0x%lx
\n
"
,
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> dci_cnt %d (format_css %d crc_scrambled %d) L %d, firstCCE %d pdu[0] 0x%lx pdu[1] 0x%lx
\n
"
,
*
dci_cnt
,
format_css
,
*
crc_scrambled
,
dci_alloc
[
*
dci_cnt
].
L
,
dci_alloc
[
*
dci_cnt
].
firstCCE
,
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
0
],
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
1
]);
*
dci_cnt
,
format_css
,
*
crc_scrambled
,
dci_alloc
[
*
dci_cnt
].
L
,
dci_alloc
[
*
dci_cnt
].
firstCCE
,
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
0
],
dci_alloc
[
*
dci_cnt
].
dci_pdu
[
1
]);
#endif
#endif
if
((
format_css
==
cformat0_0_and_1_0
)
||
(
format_uss
==
uformat0_0_and_1_0
))
{
if
((
format_css
==
cformat0_0_and_1_0
)
||
(
format_uss
==
uformat0_0_and_1_0
))
{
if
((
*
crc_scrambled
==
_p_rnti
)
||
(
*
crc_scrambled
==
_si_rnti
)
||
(
*
crc_scrambled
==
_ra_rnti
))
{
if
((
*
crc_scrambled
==
_p_rnti
)
||
(
*
crc_scrambled
==
_si_rnti
)
||
(
*
crc_scrambled
==
_ra_rnti
))
{
dci_alloc
[
*
dci_cnt
].
format
=
format1_0
;
dci_alloc
[
*
dci_cnt
].
format
=
format1_0
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
ae02c9a6
...
@@ -218,8 +218,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -218,8 +218,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
uint32_t
A
,
E
;
uint32_t
A
,
E
;
uint32_t
G
;
uint32_t
G
;
uint32_t
ret
,
offset
;
uint32_t
ret
,
offset
;
int32_t
no_iteration_ldpc
;
int32_t
no_iteration_ldpc
,
length_dec
;
//short dummy_w[MAX_NUM_DLSCH_SEGMENTS][3*(8448+64)];
uint32_t
r
,
r_offset
=
0
,
Kr
=
8424
,
Kr_bytes
,
K_bytes_F
,
err_flag
=
0
;
uint32_t
r
,
r_offset
=
0
,
Kr
=
8424
,
Kr_bytes
,
K_bytes_F
,
err_flag
=
0
;
uint8_t
crc_type
;
uint8_t
crc_type
;
int8_t
llrProcBuf
[
OAI_LDPC_MAX_NUM_LLR
]
__attribute__
((
aligned
(
32
)));
int8_t
llrProcBuf
[
OAI_LDPC_MAX_NUM_LLR
]
__attribute__
((
aligned
(
32
)));
...
@@ -233,17 +232,15 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -233,17 +232,15 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
int8_t
l
[
68
*
384
];
int8_t
l
[
68
*
384
];
//__m128i l;
//__m128i l;
int16_t
inv_d
[
68
*
384
];
int16_t
inv_d
[
68
*
384
];
// int16_t *p_invd =&inv_d;
uint8_t
kc
;
uint8_t
kb
,
kc
;
uint8_t
Ilbrm
=
0
;
uint8_t
Ilbrm
=
0
;
uint32_t
Tbslbrm
=
950984
;
uint32_t
Tbslbrm
=
950984
;
uint16_t
nb_rb
=
30
;
//to update
uint16_t
nb_rb
=
30
;
//to update
//uint16_t nb_symb_sch = 12;
uint8_t
nb_re_dmrs
=
6
;
uint8_t
nb_re_dmrs
=
6
;
uint16_t
length_dmrs
=
1
;
uint16_t
length_dmrs
=
1
;
double
Coderate
=
0
.
0
;
uint32_t
i
,
j
;
uint32_t
i
,
j
;
// uint32_t k;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
...
@@ -322,21 +319,41 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -322,21 +319,41 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
printf
(
"K %d C %d Z %d nl %d
\n
"
,
harq_process
->
K
,
harq_process
->
C
,
p_decParams
->
Z
,
harq_process
->
Nl
);
printf
(
"K %d C %d Z %d nl %d
\n
"
,
harq_process
->
K
,
harq_process
->
C
,
p_decParams
->
Z
,
harq_process
->
Nl
);
#endif
#endif
}
}
Coderate
=
(
float
)
A
/
(
float
)
G
;
kb
=
harq_process
->
K
/
harq_process
->
Z
;
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
){
if
(
kb
==
22
){
p_decParams
->
BG
=
2
;
p_decParams
->
BG
=
1
;
if
(
Coderate
<
0
.
3333
){
p_decParams
->
R
=
13
;
p_decParams
->
R
=
15
;
kc
=
68
;
kc
=
52
;
}
else
if
(
Coderate
<
0
.
6667
){
p_decParams
->
R
=
13
;
kc
=
32
;
}
else
{
p_decParams
->
R
=
23
;
kc
=
17
;
}
}
}
else
{
else
{
p_decParams
->
BG
=
2
;
p_decParams
->
BG
=
1
;
p_decParams
->
R
=
13
;
if
(
Coderate
<
0
.
6667
){
kc
=
52
;
p_decParams
->
R
=
13
;
}
kc
=
68
;
}
else
if
(
Coderate
<
0
.
8889
){
p_decParams
->
R
=
23
;
kc
=
35
;
}
else
{
p_decParams
->
R
=
89
;
kc
=
27
;
}
}
//printf("coderate %f kc %d \n", Coderate, kc);
p_decParams
->
numMaxIter
=
dlsch
->
max_ldpc_iterations
;
p_decParams
->
numMaxIter
=
dlsch
->
max_ldpc_iterations
;
Kr
=
p_decParams
->
Z
*
kb
;
p_decParams
->
outMode
=
0
;
p_decParams
->
outMode
=
0
;
...
@@ -453,54 +470,38 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -453,54 +470,38 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
memset
(
harq_process
->
c
[
r
],
0
,
Kr_bytes
);
memset
(
harq_process
->
c
[
r
],
0
,
Kr_bytes
);
// printf("done\n");
// printf("done\n");
if
(
harq_process
->
C
==
1
)
if
(
harq_process
->
C
==
1
)
{
crc_type
=
CRC24_A
;
crc_type
=
CRC24_A
;
else
length_dec
=
harq_process
->
B
;
}
else
{
crc_type
=
CRC24_B
;
crc_type
=
CRC24_B
;
length_dec
=
(
harq_process
->
B
+
24
*
harq_process
->
C
)
/
harq_process
->
C
;
}
if
(
err_flag
==
0
)
{
if
(
err_flag
==
0
)
{
/*
LOG_I(PHY, "turbo algo Kr=%d cb_cnt=%d C=%d nbRB=%d crc_type %d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d maxIter %d\n",
Kr,r,harq_process->C,harq_process->nb_rb,crc_type,A,harq_process->TBS,
harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round,dlsch->max_ldpc_iterations);
*/
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
start_meas
(
dlsch_turbo_decoding_stats
);
start_meas
(
dlsch_turbo_decoding_stats
);
#endif
#endif
//LOG_E(PHY,"AbsSubframe %d.%d Start
turbo
segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
//LOG_E(PHY,"AbsSubframe %d.%d Start
LDPC
segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
//printf("harq process dr iteration %d\n", p_decParams->numMaxIter);
//printf("harq process dr iteration %d\n", p_decParams->numMaxIter);
for
(
int
cnt
=
0
;
cnt
<
(
kc
-
2
)
*
p_decParams
->
Z
;
cnt
++
){
inv_d
[
cnt
]
=
(
1
)
*
harq_process
->
d
[
r
][
cnt
];
}
/*for (int cnt =0; cnt < 16; cnt++){
memset
(
pv
,
0
,
2
*
harq_process
->
Z
*
sizeof
(
int16_t
));
printf("dr %d inv_d %d \n", harq_process->d[r][cnt], inv_d[cnt]);
}
printf(" \n");
printf("end dr \n");
for (int cnt =(50*p_decParams->Z-16) ; cnt < 50*p_decParams->Z; cnt++){
printf("%d ", harq_process->d[r][cnt]);
}
printf(" \n");*/
memset
(
pv
,
0
,
2
*
harq_process
->
Z
*
sizeof
(
int16_t
));
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
memset
((
pv
+
K_bytes_F
),
127
,
harq_process
->
F
*
sizeof
(
int16_t
));
memset
((
pv
+
K_bytes_F
),
127
,
harq_process
->
F
*
sizeof
(
int16_t
));
for
(
i
=
((
2
*
p_decParams
->
Z
)
>>
3
),
j
=
0
;
i
<
K_bytes_F
+
((
2
*
p_decParams
->
Z
)
>>
3
)
;
i
++
,
j
++
)
for
(
i
=
((
2
*
p_decParams
->
Z
)
>>
3
),
j
=
0
;
i
<
K_bytes_F
;
i
++
,
j
++
)
{
{
pv
[
i
]
=
_mm_loadu_si128
((
__m128i
*
)(
&
inv_d
[
8
*
j
]));
pv
[
i
]
=
_mm_loadu_si128
((
__m128i
*
)(
&
harq_process
->
d
[
r
]
[
8
*
j
]));
}
}
for
(
i
=
Kr_bytes
+
((
2
*
p_decParams
->
Z
)
>>
3
),
j
=
Kr_bytes
;
i
<
((
kc
*
p_decParams
->
Z
)
>>
3
);
i
++
,
j
++
)
for
(
i
=
Kr_bytes
,
j
=
K_bytes_F
-
((
2
*
p_decParams
->
Z
)
>>
3
)
;
i
<
((
kc
*
p_decParams
->
Z
)
>>
3
);
i
++
,
j
++
)
{
{
pv
[
i
]
=
_mm_loadu_si128
((
__m128i
*
)(
&
inv_d
[
8
*
j
]));
pv
[
i
]
=
_mm_loadu_si128
((
__m128i
*
)(
&
harq_process
->
d
[
r
]
[
8
*
j
]));
}
}
for
(
i
=
0
,
j
=
0
;
j
<
((
kc
*
p_decParams
->
Z
)
>>
4
);
i
+=
2
,
j
++
)
for
(
i
=
0
,
j
=
0
;
j
<
((
kc
*
p_decParams
->
Z
)
>>
4
);
i
+=
2
,
j
++
)
...
@@ -517,8 +518,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -517,8 +518,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
p_procTime
);
p_procTime
);
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
harq_process
->
B
,
harq_process
->
F
,
crc_type
))
{
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
harq_process
->
F
,
crc_type
))
{
printf
(
"
CRC OK
\n
"
);
printf
(
"
Segment %d CRC OK
\n
"
,
r
);
ret
=
2
;
ret
=
2
;
}
}
else
{
else
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
ae02c9a6
...
@@ -160,7 +160,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
...
@@ -160,7 +160,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
#endif
#endif
ret
=
nr_rx_pbch
(
ue
,
ret
=
nr_rx_pbch
(
ue
,
&
ue
->
proc
.
proc_rxtx
[
0
]
,
0
,
ue
->
pbch_vars
[
0
],
ue
->
pbch_vars
[
0
],
frame_parms
,
frame_parms
,
0
,
0
,
...
@@ -168,10 +168,11 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
...
@@ -168,10 +168,11 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
SISO
,
SISO
,
ue
->
high_speed_flag
);
ue
->
high_speed_flag
);
temp_ptr
=
temp_ptr
->
next_ssb
;
temp_ptr
=
temp_ptr
->
next_ssb
;
}
}
free_list
(
best_ssb
);
free_list
(
best_ssb
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
ae02c9a6
...
@@ -410,7 +410,7 @@ unsigned char sign(int8_t x) {
...
@@ -410,7 +410,7 @@ unsigned char sign(int8_t x) {
uint8_t
pbch_deinterleaving_pattern
[
32
]
=
{
28
,
0
,
31
,
30
,
7
,
29
,
25
,
27
,
5
,
8
,
24
,
9
,
10
,
11
,
12
,
13
,
1
,
4
,
3
,
14
,
15
,
16
,
17
,
2
,
26
,
18
,
19
,
20
,
21
,
22
,
6
,
23
};
uint8_t
pbch_deinterleaving_pattern
[
32
]
=
{
28
,
0
,
31
,
30
,
7
,
29
,
25
,
27
,
5
,
8
,
24
,
9
,
10
,
11
,
12
,
13
,
1
,
4
,
3
,
14
,
15
,
16
,
17
,
2
,
26
,
18
,
19
,
20
,
21
,
22
,
6
,
23
};
int
nr_rx_pbch
(
PHY_VARS_NR_UE
*
ue
,
int
nr_rx_pbch
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
subframe_rx
,
NR_UE_PBCH
*
nr_ue_pbch_vars
,
NR_UE_PBCH
*
nr_ue_pbch_vars
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
eNB_id
,
uint8_t
eNB_id
,
...
@@ -436,7 +436,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -436,7 +436,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
//time_stats_t path_metric,sorting,update_LLR;
//time_stats_t path_metric,sorting,update_LLR;
memset
(
&
pbch_a
[
0
],
0
,
sizeof
(
uint8_t
)
*
NR_POLAR_PBCH_PAYLOAD_BITS
);
memset
(
&
pbch_a
[
0
],
0
,
sizeof
(
uint8_t
)
*
NR_POLAR_PBCH_PAYLOAD_BITS
);
//printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell);
//printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell);
int
subframe_rx
=
proc
->
subframe_rx
;
pbch_e_rx
=
&
nr_ue_pbch_vars
->
llr
[
0
];
pbch_e_rx
=
&
nr_ue_pbch_vars
->
llr
[
0
];
// clear LLR buffer
// clear LLR buffer
memset
(
nr_ue_pbch_vars
->
llr
,
0
,
NR_POLAR_PBCH_E
);
memset
(
nr_ue_pbch_vars
->
llr
,
0
,
NR_POLAR_PBCH_E
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
ae02c9a6
...
@@ -1118,7 +1118,7 @@ int rx_sss(PHY_VARS_NR_UE *phy_vars_ue,int32_t *tot_metric,uint8_t *flip_max,uin
...
@@ -1118,7 +1118,7 @@ int rx_sss(PHY_VARS_NR_UE *phy_vars_ue,int32_t *tot_metric,uint8_t *flip_max,uin
\returns number of tx antennas or -1 if error
\returns number of tx antennas or -1 if error
*/
*/
int
nr_rx_pbch
(
PHY_VARS_NR_UE
*
ue
,
int
nr_rx_pbch
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
subframe_rx
,
NR_UE_PBCH
*
nr_ue_pbch_vars
,
NR_UE_PBCH
*
nr_ue_pbch_vars
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
eNB_id
,
uint8_t
eNB_id
,
...
@@ -1680,7 +1680,7 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
...
@@ -1680,7 +1680,7 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
uint8_t
eNB_id
,
uint8_t
eNB_id
,
int
frame
,
int
frame
,
uint8_t
nr_tti_rx
,
uint8_t
nr_tti_rx
,
uint
32_t
dci_pdu
[
4
],
uint
64_t
dci_pdu
[
2
],
uint16_t
rnti
,
uint16_t
rnti
,
uint8_t
dci_length
,
uint8_t
dci_length
,
NR_DCI_format_t
dci_format
,
NR_DCI_format_t
dci_format
,
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
ae02c9a6
...
@@ -123,7 +123,7 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
...
@@ -123,7 +123,7 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
uint8_t
eNB_id
,
uint8_t
eNB_id
,
int
frame
,
int
frame
,
uint8_t
nr_tti_rx
,
uint8_t
nr_tti_rx
,
uint
32_t
dci_pdu
[
4
],
uint
64_t
dci_pdu
[
2
],
uint16_t
rnti
,
uint16_t
rnti
,
uint8_t
dci_length
,
uint8_t
dci_length
,
NR_DCI_format_t
dci_format
,
NR_DCI_format_t
dci_format
,
...
@@ -2760,37 +2760,6 @@ void nr_ue_measurement_procedures(
...
@@ -2760,37 +2760,6 @@ void nr_ue_measurement_procedures(
}
}
#endif
#endif
// accumulate and filter timing offset estimation every nr_tti_rx (instead of every frame)
if
((
slot
==
2
)
&&
(
l
==
(
1
-
frame_parms
->
Ncp
)))
{
// AGC
/*
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_IN);
#ifndef OAI_USRP
#ifndef OAI_BLADERF
#ifndef OAI_LMSSDR
#ifndef OAI_ADRV9371_ZC706
phy_adjust_gain (ue,dB_fixed(ue->measurements.rssi),0);
#endif
#endif
#endif
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT);
*/
eNB_id
=
0
;
LOG_D
(
PHY
,
"start adjust sync l = %d slot = %d no timing %d
\n
"
,
l
,
slot
,
ue
->
no_timing_correction
);
if
(
ue
->
no_timing_correction
==
0
)
nr_adjust_synch_ue
(
&
ue
->
frame_parms
,
ue
,
eNB_id
,
nr_tti_rx
,
0
,
16384
);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_MEASUREMENT_PROCEDURES
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_MEASUREMENT_PROCEDURES
,
VCD_FUNCTION_OUT
);
}
}
...
@@ -2969,7 +2938,7 @@ void nr_ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
...
@@ -2969,7 +2938,7 @@ void nr_ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES
,
VCD_FUNCTION_IN
);
//LOG_I(PHY,"[UE %d] Frame %d, Trying PBCH %d (NidCell %d, eNB_id %d)\n",ue->Mod_id,frame_rx,pbch_phase,ue->frame_parms.Nid_cell,eNB_id);
//LOG_I(PHY,"[UE %d] Frame %d, Trying PBCH %d (NidCell %d, eNB_id %d)\n",ue->Mod_id,frame_rx,pbch_phase,ue->frame_parms.Nid_cell,eNB_id);
ret
=
nr_rx_pbch
(
ue
,
proc
,
ret
=
nr_rx_pbch
(
ue
,
proc
->
subframe_rx
,
ue
->
pbch_vars
[
eNB_id
],
ue
->
pbch_vars
[
eNB_id
],
&
ue
->
frame_parms
,
&
ue
->
frame_parms
,
eNB_id
,
eNB_id
,
...
@@ -3086,7 +3055,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
...
@@ -3086,7 +3055,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
uint16_t
p_rnti
=
P_RNTI
;
uint16_t
p_rnti
=
P_RNTI
;
uint16_t
si_rnti
=
SI_RNTI
;
uint16_t
si_rnti
=
SI_RNTI
;
uint16_t
ra_rnti
=
99
;
uint16_t
ra_rnti
=
99
;
uint16_t
sp_csi_rnti
,
sfi_rnti
,
int_rnti
,
tpc_pusch_rnti
,
tpc_pucch_rnti
,
tpc_srs_rnti
;
//FIXME
uint16_t
sp_csi_rnti
=
0
,
sfi_rnti
=
0
,
int_rnti
=
0
,
tpc_pusch_rnti
=
0
,
tpc_pucch_rnti
=
0
,
tpc_srs_rnti
=
0
;
//FIXME
uint16_t
crc_scrambled_values
[
TOTAL_NBR_SCRAMBLED_VALUES
]
=
uint16_t
crc_scrambled_values
[
TOTAL_NBR_SCRAMBLED_VALUES
]
=
{
c_rnti
,
cs_rnti
,
new_rnti
,
tc_rnti
,
p_rnti
,
si_rnti
,
ra_rnti
,
sp_csi_rnti
,
sfi_rnti
,
int_rnti
,
tpc_pusch_rnti
,
tpc_pucch_rnti
,
tpc_srs_rnti
};
{
c_rnti
,
cs_rnti
,
new_rnti
,
tc_rnti
,
p_rnti
,
si_rnti
,
ra_rnti
,
sp_csi_rnti
,
sfi_rnti
,
int_rnti
,
tpc_pusch_rnti
,
tpc_pucch_rnti
,
tpc_srs_rnti
};
#ifdef NR_PDCCH_SCHED_DEBUG
#ifdef NR_PDCCH_SCHED_DEBUG
...
@@ -3365,7 +3334,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
...
@@ -3365,7 +3334,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
}
// end for loop nb_searchspace_active
}
// end for loop nb_searchspace_active
return
(
0
);
return
(
dci_cnt
);
}
}
#endif // NR_PDCCH_SCHED
#endif // NR_PDCCH_SCHED
...
@@ -4970,6 +4939,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
...
@@ -4970,6 +4939,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NR_UE_PDCCH
*
pdcch_vars
=
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
nr_tti_rx
]][
0
];
NR_UE_PDCCH
*
pdcch_vars
=
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
nr_tti_rx
]][
0
];
uint16_t
nb_symb_sch
=
8
;
// to be updated by higher layer
uint16_t
nb_symb_sch
=
8
;
// to be updated by higher layer
uint8_t
nb_symb_pdcch
=
pdcch_vars
->
coreset
[
0
].
duration
;
uint8_t
nb_symb_pdcch
=
pdcch_vars
->
coreset
[
0
].
duration
;
uint8_t
dci_cnt
=
0
;
LOG_D
(
PHY
,
" ****** start RX-Chain for Frame.Slot %d.%d ******
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
LOG_D
(
PHY
,
" ****** start RX-Chain for Frame.Slot %d.%d ******
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
...
@@ -4979,7 +4949,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
...
@@ -4979,7 +4949,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
#ifdef NR_PDCCH_SCHED
#ifdef NR_PDCCH_SCHED
nr_gold_pdcch
(
ue
,
0
,
2
);
nr_gold_pdcch
(
ue
,
0
,
2
);
//if (nr_tti_rx==1){
LOG_D
(
PHY
,
" ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
LOG_D
(
PHY
,
" ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
for
(
uint16_t
l
=
0
;
l
<
nb_symb_pdcch
;
l
++
)
{
for
(
uint16_t
l
=
0
;
l
<
nb_symb_pdcch
;
l
++
)
{
...
@@ -4999,15 +4969,29 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
...
@@ -4999,15 +4969,29 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
#endif
#endif
//printf("phy procedure pdcch start measurement l =%d\n",l);
//printf("phy procedure pdcch start measurement l =%d\n",l);
nr_ue_measurement_procedures
(
l
,
ue
,
proc
,
eNB_id
,(
nr_tti_rx
),
mode
);
//
nr_ue_measurement_procedures(l,ue,proc,eNB_id,(nr_tti_rx),mode);
}
}
if
(
nr_ue_pdcch_procedures
(
eNB_id
,
ue
,
proc
)
==
-
1
)
{
dci_cnt
=
nr_ue_pdcch_procedures
(
eNB_id
,
ue
,
proc
);
LOG_E
(
PHY
,
"[UE %d] Frame %d, nr_tti_rx %d: Error in pdcch procedures
\n
"
,
ue
->
Mod_id
,
frame_rx
,
nr_tti_rx
);
return
(
-
1
);
if
(
dci_cnt
>
0
)
{
LOG_I
(
PHY
,
"[UE %d] Frame %d, nr_tti_rx %d: found %d DCIs
\n
"
,
ue
->
Mod_id
,
frame_rx
,
nr_tti_rx
,
dci_cnt
);
if
(
0
/*ue->no_timing_correction==0*/
)
{
LOG_I
(
PHY
,
"start adjust sync slot = %d no timing %d
\n
"
,
nr_tti_rx
,
ue
->
no_timing_correction
);
nr_adjust_synch_ue
(
&
ue
->
frame_parms
,
ue
,
eNB_id
,
nr_tti_rx
,
0
,
16384
);
}
}
else
{
LOG_D
(
PHY
,
"[UE %d] Frame %d, nr_tti_rx %d: No DCIs found
\n
"
,
ue
->
Mod_id
,
frame_rx
,
nr_tti_rx
);
}
}
//}
#endif //NR_PDCCH_SCHED
#endif //NR_PDCCH_SCHED
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
ae02c9a6
...
@@ -1754,7 +1754,7 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
...
@@ -1754,7 +1754,7 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
dci
->
time_dom_resource_assignment
,
dci
->
time_dom_resource_assignment
,
dlsch_config_pdu_1_0
->
number_symbols
,
dlsch_config_pdu_1_0
->
number_symbols
,
dlsch_config_pdu_1_0
->
start_symbol
);
dlsch_config_pdu_1_0
->
start_symbol
);
printf
(
">>> (nr_ue_procedures.c) vrb_to_prb_mapping=%d
\n
>>> mcs=%d
\n
>>> ndi=%d
\n
>>> rv=%d
\n
>>> harq_process_nbr=%d
\n
>>> dai=%d
\n
>>> scaling_factor_S=%
d
\n
>>> tpc_pucch=%d
\n
>>> pucch_res_ind=%d
\n
>>> pdsch_to_harq_feedback_time_ind=%d
\n
"
,
printf
(
">>> (nr_ue_procedures.c) vrb_to_prb_mapping=%d
\n
>>> mcs=%d
\n
>>> ndi=%d
\n
>>> rv=%d
\n
>>> harq_process_nbr=%d
\n
>>> dai=%d
\n
>>> scaling_factor_S=%
f
\n
>>> tpc_pucch=%d
\n
>>> pucch_res_ind=%d
\n
>>> pdsch_to_harq_feedback_time_ind=%d
\n
"
,
dlsch_config_pdu_1_0
->
vrb_to_prb_mapping
,
dlsch_config_pdu_1_0
->
vrb_to_prb_mapping
,
dlsch_config_pdu_1_0
->
mcs
,
dlsch_config_pdu_1_0
->
mcs
,
dlsch_config_pdu_1_0
->
ndi
,
dlsch_config_pdu_1_0
->
ndi
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
ae02c9a6
...
@@ -396,6 +396,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -396,6 +396,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
NR_gNB_DLSCH_t
*
dlsch
=
RC
.
gNB
[
module_idP
][
CC_id
]
->
dlsch
[
ii
][
0
];
NR_gNB_DLSCH_t
*
dlsch
=
RC
.
gNB
[
module_idP
][
CC_id
]
->
dlsch
[
ii
][
0
];
if
((
dlsch
!=
NULL
)
&&
(
dlsch
->
rnti
==
rnti
)){
if
((
dlsch
!=
NULL
)
&&
(
dlsch
->
rnti
==
rnti
)){
LOG_I
(
MAC
,
"clean_eNb_dlsch UE %x
\n
"
,
rnti
);
LOG_I
(
MAC
,
"clean_eNb_dlsch UE %x
\n
"
,
rnti
);
LOG_E
(
PHY
,
"Calling with wrong paramter type
\n
"
);
clean_eNb_dlsch
(
dlsch
);
clean_eNb_dlsch
(
dlsch
);
}
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
ae02c9a6
...
@@ -462,6 +462,3 @@ int get_symbolsperslot(nfapi_nr_config_request_t *cfg) {
...
@@ -462,6 +462,3 @@ int get_symbolsperslot(nfapi_nr_config_request_t *cfg) {
}
}
int
nr_schedule_dci
()
{
}
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
ae02c9a6
...
@@ -597,10 +597,10 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
...
@@ -597,10 +597,10 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
for
(
int
i
=
0
;
i
<
cc
;
i
++
)
buff_ptrs
.
push_back
(
buff
[
i
]);
for
(
int
i
=
0
;
i
<
cc
;
i
++
)
buff_ptrs
.
push_back
(
buff
[
i
]);
samples_received
=
s
->
rx_stream
->
recv
(
buff_ptrs
,
nsamps
,
s
->
rx_md
);
samples_received
=
s
->
rx_stream
->
recv
(
buff_ptrs
,
nsamps
,
s
->
rx_md
,
1.0
);
}
else
{
}
else
{
// receive a single channel (e.g. from connector RF A)
// receive a single channel (e.g. from connector RF A)
samples_received
=
s
->
rx_stream
->
recv
(
buff
[
0
],
nsamps
,
s
->
rx_md
);
samples_received
=
s
->
rx_stream
->
recv
(
buff
[
0
],
nsamps
,
s
->
rx_md
,
1.0
);
}
}
}
}
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
ae02c9a6
...
@@ -254,7 +254,7 @@ RUs = (
...
@@ -254,7 +254,7 @@ RUs = (
max_pdschReferenceSignalPower
= -
27
;
max_pdschReferenceSignalPower
= -
27
;
max_rxgain
=
114
;
max_rxgain
=
114
;
eNB_instances
= [
0
];
eNB_instances
= [
0
];
sdr_addrs
=
"addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8"
;
sdr_addrs
=
"addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8
,clock_source=external,time_source=external
"
;
}
}
);
);
...
...
targets/RT/USER/nr-ue.c
View file @
ae02c9a6
...
@@ -767,10 +767,6 @@ static void *UE_thread_rxn_txnp4(void *arg) {
...
@@ -767,10 +767,6 @@ static void *UE_thread_rxn_txnp4(void *arg) {
void
readFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
void
readFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
void
*
rxp
[
NB_ANTENNAS_RX
];
void
*
rxp
[
NB_ANTENNAS_RX
];
void
*
dummy_tx
[
UE
->
frame_parms
.
nb_antennas_tx
];
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
dummy_tx
[
i
]
=
malloc16_clear
(
UE
->
frame_parms
.
samples_per_subframe
*
4
);
for
(
int
x
=
0
;
x
<
10
;
x
++
)
{
for
(
int
x
=
0
;
x
<
10
;
x
++
)
{
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
...
@@ -781,37 +777,28 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
...
@@ -781,37 +777,28 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
timestamp
,
timestamp
,
rxp
,
rxp
,
UE
->
frame_parms
.
samples_per_subframe
,
UE
->
frame_parms
.
samples_per_subframe
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
"
readFrame error
"
);
}
}
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
free
(
dummy_tx
[
i
]);
}
}
void
trashFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
void
trashFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
void
*
dummy_tx
[
UE
->
frame_parms
.
nb_antennas_tx
];
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
dummy_tx
[
i
]
=
malloc16_clear
(
UE
->
frame_parms
.
samples_per_subframe
*
4
);
void
*
dummy_rx
[
UE
->
frame_parms
.
nb_antennas_rx
];
void
*
dummy_rx
[
UE
->
frame_parms
.
nb_antennas_rx
];
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
dummy_rx
[
i
]
=
malloc16
(
UE
->
frame_parms
.
samples_per_subframe
*
4
);
dummy_rx
[
i
]
=
malloc16
(
UE
->
frame_parms
.
samples_per_subframe
*
4
);
for
(
int
sf
=
0
;
sf
<
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
sf
++
)
{
for
(
int
sf
=
0
;
sf
<
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
sf
++
)
{
// printf("Reading dummy sf %d\n",sf);
//printf("Reading dummy sf %d\n",sf);
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
AssertFatal
(
UE
->
frame_parms
.
samples_per_subframe
==
timestamp
,
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
dummy_rx
,
timestamp
,
UE
->
frame_parms
.
samples_per_subframe
,
dummy_rx
,
UE
->
frame_parms
.
nb_antennas_rx
);
UE
->
frame_parms
.
samples_per_subframe
,
usleep
(
500
);
// this sleep improves in the case of simulated RF and doesn't harm with true radio
UE
->
frame_parms
.
nb_antennas_rx
),
"trashFrame error"
);
//usleep(500); // this sleep improves in the case of simulated RF and doesn't harm with true radio
}
}
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
free
(
dummy_tx
[
i
]);
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
free
(
dummy_rx
[
i
]);
free
(
dummy_rx
[
i
]);
}
}
...
@@ -819,10 +806,6 @@ void trashFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
...
@@ -819,10 +806,6 @@ void trashFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
void
syncInFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
void
syncInFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
if
(
UE
->
no_timing_correction
==
0
)
{
if
(
UE
->
no_timing_correction
==
0
)
{
LOG_I
(
PHY
,
"Resynchronizing RX by %d samples (mode = %d)
\n
"
,
UE
->
rx_offset
,
UE
->
mode
);
LOG_I
(
PHY
,
"Resynchronizing RX by %d samples (mode = %d)
\n
"
,
UE
->
rx_offset
,
UE
->
mode
);
void
*
dummy_tx
[
UE
->
frame_parms
.
nb_antennas_tx
];
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
dummy_tx
[
i
]
=
malloc16_clear
(
UE
->
frame_parms
.
samples_per_subframe
*
4
);
for
(
int
size
=
UE
->
rx_offset
;
size
>
0
;
size
-=
UE
->
frame_parms
.
samples_per_subframe
)
{
for
(
int
size
=
UE
->
rx_offset
;
size
>
0
;
size
-=
UE
->
frame_parms
.
samples_per_subframe
)
{
int
unitTransfer
=
size
>
UE
->
frame_parms
.
samples_per_subframe
?
UE
->
frame_parms
.
samples_per_subframe
:
size
;
int
unitTransfer
=
size
>
UE
->
frame_parms
.
samples_per_subframe
?
UE
->
frame_parms
.
samples_per_subframe
:
size
;
...
@@ -831,11 +814,8 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
...
@@ -831,11 +814,8 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
timestamp
,
timestamp
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
unitTransfer
,
unitTransfer
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
"
syncInFrame error
"
);
}
}
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
free
(
dummy_tx
[
i
]);
}
}
}
}
...
@@ -963,7 +943,7 @@ void *UE_thread(void *arg) {
...
@@ -963,7 +943,7 @@ void *UE_thread(void *arg) {
&
timestamp
,
&
timestamp
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
,
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
"
first symbol read error
"
);
//write_output("txdata_sym.m", "txdata_sym", UE->common_vars.rxdata[0], (UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0), 1, 1);
//write_output("txdata_sym.m", "txdata_sym", UE->common_vars.rxdata[0], (UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0), 1, 1);
//nr_slot_fep(UE,0, 0, 0, 1, NR_PDCCH_EST);
//nr_slot_fep(UE,0, 0, 0, 1, NR_PDCCH_EST);
}
//UE->mode != loop_through_memory
}
//UE->mode != loop_through_memory
...
@@ -1042,7 +1022,7 @@ void *UE_thread(void *arg) {
...
@@ -1042,7 +1022,7 @@ void *UE_thread(void *arg) {
&
timestamp
,
&
timestamp
,
rxp
,
rxp
,
readBlockSize
,
readBlockSize
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
"
read error
"
);
AssertFatal
(
writeBlockSize
==
AssertFatal
(
writeBlockSize
==
UE
->
rfdevice
.
trx_write_func
(
&
UE
->
rfdevice
,
UE
->
rfdevice
.
trx_write_func
(
&
UE
->
rfdevice
,
timestamp
+
timestamp
+
...
@@ -1052,7 +1032,7 @@ void *UE_thread(void *arg) {
...
@@ -1052,7 +1032,7 @@ void *UE_thread(void *arg) {
txp
,
txp
,
writeBlockSize
,
writeBlockSize
,
UE
->
frame_parms
.
nb_antennas_tx
,
UE
->
frame_parms
.
nb_antennas_tx
,
1
),
""
);
1
),
"
write error
"
);
if
(
slot_nr
==
(
nb_slot_frame
-
1
))
{
if
(
slot_nr
==
(
nb_slot_frame
-
1
))
{
// read in first symbol of next frame and adjust for timing drift
// read in first symbol of next frame and adjust for timing drift
...
@@ -1064,7 +1044,7 @@ void *UE_thread(void *arg) {
...
@@ -1064,7 +1044,7 @@ void *UE_thread(void *arg) {
&
timestamp
,
&
timestamp
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
first_symbols
,
first_symbols
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
"
first symbols read error
"
);
else
else
LOG_E
(
PHY
,
"can't compensate: diff =%d
\n
"
,
first_symbols
);
LOG_E
(
PHY
,
"can't compensate: diff =%d
\n
"
,
first_symbols
);
}
}
...
...
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