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
Michael Black
OpenXG-RAN
Commits
cd07961a
Commit
cd07961a
authored
Nov 21, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intermediate commit
parent
00fc815c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
24 deletions
+33
-24
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_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_encoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
+2
-1
openair1/PHY/CODING/nr_polar_init.c
openair1/PHY/CODING/nr_polar_init.c
+5
-3
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+13
-12
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+3
-3
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+1
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+5
-1
No files found.
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
cd07961a
...
@@ -1055,7 +1055,7 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
...
@@ -1055,7 +1055,7 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
else
numbits
=
residue
;
else
numbits
=
residue
;
for
(
int
i
=
0
;
i
<
numbits
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numbits
;
i
++
)
{
ip
=
polarParams
->
interleaving_pattern
[(
8
*
byte
)
+
i
];
ip
=
polarParams
->
interleaving_pattern
[(
8
*
byte
)
+
i
];
#if
1
#if
0
printf("byte %d, i %d => ip %d\n",byte,i,ip);
printf("byte %d, i %d => ip %d\n",byte,i,ip);
#endif
#endif
ipmod64
=
ip
&
63
;
ipmod64
=
ip
&
63
;
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
View file @
cd07961a
...
@@ -219,8 +219,8 @@ decoder_node_t *add_nodes(int level,int first_leaf_index,t_nrPolar_params *pp) {
...
@@ -219,8 +219,8 @@ decoder_node_t *add_nodes(int level,int first_leaf_index,t_nrPolar_params *pp) {
decoder_node_t
*
new_node
=
new_decoder_node
(
first_leaf_index
,
level
);
decoder_node_t
*
new_node
=
new_decoder_node
(
first_leaf_index
,
level
);
#ifdef DEBUG_NEW_IMPL
#ifdef DEBUG_NEW_IMPL
printf
(
"New node %d order %d, level %d
\n
"
,
pp
->
tree
.
num_nodes
,
Nv
,
level
);
printf
(
"New node %d order %d, level %d
\n
"
,
pp
->
tree
.
num_nodes
,
Nv
,
level
);
pp
->
tree
.
num_nodes
++
;
#endif
#endif
pp
->
tree
.
num_nodes
++
;
if
(
level
==
0
)
{
if
(
level
==
0
)
{
#ifdef DEBUG_NEW_IMPL
#ifdef DEBUG_NEW_IMPL
printf
(
"leaf %d (%s)
\n
"
,
first_leaf_index
,
pp
->
information_bit_pattern
[
first_leaf_index
]
==
1
?
"information or crc"
:
"frozen"
);
printf
(
"leaf %d (%s)
\n
"
,
first_leaf_index
,
pp
->
information_bit_pattern
[
first_leaf_index
]
==
1
?
"information or crc"
:
"frozen"
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
View file @
cd07961a
...
@@ -317,7 +317,6 @@ void build_polar_tables(t_nrPolar_paramsPtr polarParams) {
...
@@ -317,7 +317,6 @@ void build_polar_tables(t_nrPolar_paramsPtr polarParams) {
polarParams
->
cprime_tab1
[
byte
][
val
]
=
0
;
polarParams
->
cprime_tab1
[
byte
][
val
]
=
0
;
for
(
int
i
=
0
;
i
<
numbits
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numbits
;
i
++
)
{
ip
=
polarParams
->
deinterleaving_pattern
[(
8
*
byte
)
+
i
];
ip
=
polarParams
->
deinterleaving_pattern
[(
8
*
byte
)
+
i
];
if
(
val
==
0
)
printf
(
"%d => %d
\n
"
,(
8
*
byte
)
+
i
,
ip
);
AssertFatal
(
ip
<
128
,
"ip = %d
\n
"
,
ip
);
AssertFatal
(
ip
<
128
,
"ip = %d
\n
"
,
ip
);
bit_i
=
(
val
>>
i
)
&
1
;
bit_i
=
(
val
>>
i
)
&
1
;
if
(
ip
<
64
)
polarParams
->
cprime_tab0
[
byte
][
val
]
|=
(((
uint64_t
)
bit_i
)
<<
ip
);
if
(
ip
<
64
)
polarParams
->
cprime_tab0
[
byte
][
val
]
|=
(((
uint64_t
)
bit_i
)
<<
ip
);
...
@@ -361,9 +360,11 @@ void build_polar_tables(t_nrPolar_paramsPtr polarParams) {
...
@@ -361,9 +360,11 @@ void build_polar_tables(t_nrPolar_paramsPtr polarParams) {
if
((
ip
-
iplast
)
==
1
)
ccnt
++
;
if
((
ip
-
iplast
)
==
1
)
ccnt
++
;
else
{
else
{
groupcnt
++
;
groupcnt
++
;
#ifdef DEBUG_POLAR_ENCODER
printf
(
"group %d (size %d): (%d:%d) => (%d:%d)
\n
"
,
groupcnt
,
ccnt
+
1
,
printf
(
"group %d (size %d): (%d:%d) => (%d:%d)
\n
"
,
groupcnt
,
ccnt
+
1
,
firstingroup_in
,
firstingroup_in
+
ccnt
,
firstingroup_in
,
firstingroup_in
+
ccnt
,
firstingroup_out
,
firstingroup_out
+
ccnt
);
firstingroup_out
,
firstingroup_out
+
ccnt
);
#endif
if
((
ccnt
+
1
)
<
mingroupsize
)
mingroupsize
=
ccnt
+
1
;
if
((
ccnt
+
1
)
<
mingroupsize
)
mingroupsize
=
ccnt
+
1
;
ccnt
=
0
;
ccnt
=
0
;
firstingroup_out
=
outpos
;
firstingroup_out
=
outpos
;
...
...
openair1/PHY/CODING/nr_polar_init.c
View file @
cd07961a
...
@@ -42,9 +42,9 @@ static int intcmp(const void *p1,const void *p2) {
...
@@ -42,9 +42,9 @@ static int intcmp(const void *p1,const void *p2) {
}
}
void
nr_polar_init
(
t_nrPolar_paramsPtr
*
polarParams
,
void
nr_polar_init
(
t_nrPolar_paramsPtr
*
polarParams
,
int8_t
messageType
,
int8_t
messageType
,
uint16_t
messageLength
,
uint16_t
messageLength
,
uint8_t
aggregation_level
)
uint8_t
aggregation_level
)
{
{
t_nrPolar_paramsPtr
currentPtr
=
*
polarParams
;
t_nrPolar_paramsPtr
currentPtr
=
*
polarParams
;
uint16_t
aggregation_prime
=
nr_polar_aggregation_prime
(
aggregation_level
);
uint16_t
aggregation_prime
=
nr_polar_aggregation_prime
(
aggregation_level
);
...
@@ -75,6 +75,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams,
...
@@ -75,6 +75,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams,
newPolarInitNode
->
encoderLength
=
NR_POLAR_PBCH_E
;
newPolarInitNode
->
encoderLength
=
NR_POLAR_PBCH_E
;
newPolarInitNode
->
crcCorrectionBits
=
NR_POLAR_PBCH_CRC_ERROR_CORRECTION_BITS
;
newPolarInitNode
->
crcCorrectionBits
=
NR_POLAR_PBCH_CRC_ERROR_CORRECTION_BITS
;
newPolarInitNode
->
crc_generator_matrix
=
crc24c_generator_matrix
(
newPolarInitNode
->
payloadBits
);
//G_P
newPolarInitNode
->
crc_generator_matrix
=
crc24c_generator_matrix
(
newPolarInitNode
->
payloadBits
);
//G_P
printf
(
"Initializing polar parameters for PBCH (K %d, E %d)
\n
"
,
newPolarInitNode
->
payloadBits
,
newPolarInitNode
->
encoderLength
);
}
else
if
(
messageType
==
1
)
{
//DCI
}
else
if
(
messageType
==
1
)
{
//DCI
newPolarInitNode
->
n_max
=
NR_POLAR_DCI_N_MAX
;
newPolarInitNode
->
n_max
=
NR_POLAR_DCI_N_MAX
;
newPolarInitNode
->
i_il
=
NR_POLAR_DCI_I_IL
;
newPolarInitNode
->
i_il
=
NR_POLAR_DCI_I_IL
;
...
@@ -87,6 +88,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams,
...
@@ -87,6 +88,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams,
newPolarInitNode
->
encoderLength
=
aggregation_level
*
108
;
newPolarInitNode
->
encoderLength
=
aggregation_level
*
108
;
newPolarInitNode
->
crcCorrectionBits
=
NR_POLAR_DCI_CRC_ERROR_CORRECTION_BITS
;
newPolarInitNode
->
crcCorrectionBits
=
NR_POLAR_DCI_CRC_ERROR_CORRECTION_BITS
;
newPolarInitNode
->
crc_generator_matrix
=
crc24c_generator_matrix
(
newPolarInitNode
->
payloadBits
+
newPolarInitNode
->
crcParityBits
);
//G_P
newPolarInitNode
->
crc_generator_matrix
=
crc24c_generator_matrix
(
newPolarInitNode
->
payloadBits
+
newPolarInitNode
->
crcParityBits
);
//G_P
printf
(
"Initializing polar parameters for DCI (K %d, E %d, L %d)
\n
"
,
newPolarInitNode
->
payloadBits
,
newPolarInitNode
->
encoderLength
,
aggregation_level
);
}
else
if
(
messageType
==
-
1
)
{
//UCI
}
else
if
(
messageType
==
-
1
)
{
//UCI
}
else
{
}
else
{
...
...
openair1/PHY/INIT/nr_init.c
View file @
cd07961a
...
@@ -124,10 +124,11 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
...
@@ -124,10 +124,11 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
// PBCH DMRS gold sequences generation
// PBCH DMRS gold sequences generation
nr_init_pbch_dmrs
(
gNB
);
nr_init_pbch_dmrs
(
gNB
);
// Polar encoder init for PBCH
// Polar encoder init for PBCH
nr_polar_init
(
&
gNB
->
nrPolar_params
,
nr_polar_init
(
&
gNB
->
nrPolar_params
,
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
);
NR_POLAR_PBCH_AGGREGATION_LEVEL
);
//PDCCH DMRS init
//PDCCH DMRS init
gNB
->
nr_gold_pdcch_dmrs
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
gNB
->
nr_gold_pdcch_dmrs
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
...
@@ -436,15 +437,15 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config)
...
@@ -436,15 +437,15 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config)
fp
->
threequarter_fs
=
0
;
fp
->
threequarter_fs
=
0
;
LOG_I
(
PHY
,
"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,gNB_tx_antenna_ports %d,DL freq %u)
\n
"
,
LOG_I
(
PHY
,
"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,gNB_tx_antenna_ports %d,DL freq %u)
\n
"
,
Mod_id
,
Mod_id
,
CC_id
,
CC_id
,
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
],
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
],
gNB_config
->
rf_config
.
dl_carrier_bandwidth
.
value
,
gNB_config
->
rf_config
.
dl_carrier_bandwidth
.
value
,
gNB_config
->
rf_config
.
ul_carrier_bandwidth
.
value
,
gNB_config
->
rf_config
.
ul_carrier_bandwidth
.
value
,
gNB_config
->
sch_config
.
physical_cell_id
.
value
,
gNB_config
->
sch_config
.
physical_cell_id
.
value
,
gNB_config
->
rf_config
.
tx_antenna_ports
.
value
,
gNB_config
->
rf_config
.
tx_antenna_ports
.
value
,
fp
->
dl_CarrierFreq
);
fp
->
dl_CarrierFreq
);
nr_init_frame_parms
(
gNB_config
,
fp
);
nr_init_frame_parms
(
gNB_config
,
fp
);
if
(
RC
.
gNB
[
Mod_id
][
CC_id
]
->
configured
==
1
){
if
(
RC
.
gNB
[
Mod_id
][
CC_id
]
->
configured
==
1
){
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
cd07961a
...
@@ -955,7 +955,7 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue)
...
@@ -955,7 +955,7 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue)
generate_ul_reference_signal_sequences
(
SHRT_MAX
);
generate_ul_reference_signal_sequences
(
SHRT_MAX
);
// Polar encoder init for PBCH
// Polar encoder init for PBCH
ue
->
nrPolar_params
=
NULL
;
ue
->
nrPolar_params
=
NULL
;
nr_polar_init
(
&
ue
->
nrPolar_params
,
nr_polar_init
(
&
ue
->
nrPolar_params
,
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_MESSAGE_TYPE
,
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
cd07961a
...
@@ -1426,9 +1426,9 @@ void nr_dci_decoding_procedure0(int s,
...
@@ -1426,9 +1426,9 @@ void nr_dci_decoding_procedure0(int s,
uint32_t
dci_estimation
[
4
]
=
{
0
};
uint32_t
dci_estimation
[
4
]
=
{
0
};
t_nrPolar_paramsPtr
nrPolar_params
=
NULL
;
t_nrPolar_paramsPtr
nrPolar_params
=
pdcch_vars
[
eNB_id
]
->
nrPolar_params
;
nr_polar_init
(
&
nrPolar_params
,
1
,
41
,
8
);
nr_polar_init
(
&
nrPolar_params
,
1
,
sizeof_bits
,
L2
);
t_nrPolar_paramsPtr
currentPtrDCI
=
nr_polar_params
(
nrPolar_params
,
1
,
41
,
8
);
t_nrPolar_paramsPtr
currentPtrDCI
=
nr_polar_params
(
nrPolar_params
,
1
,
sizeof_bits
,
L2
);
decoderState
=
polar_decoder_int16
((
int16_t
*
)
&
pdcch_vars
[
eNB_id
]
->
e_rx
[
CCEind
*
9
*
6
*
2
],
decoderState
=
polar_decoder_int16
((
int16_t
*
)
&
pdcch_vars
[
eNB_id
]
->
e_rx
[
CCEind
*
9
*
6
*
2
],
dci_estimation
,
dci_estimation
,
currentPtrDCI
);
currentPtrDCI
);
...
...
openair1/PHY/defs_nr_UE.h
View file @
cd07961a
...
@@ -893,6 +893,7 @@ typedef struct {
...
@@ -893,6 +893,7 @@ typedef struct {
//Check for specific DCIFormat and AgregationLevel
//Check for specific DCIFormat and AgregationLevel
uint8_t
dciFormat
;
uint8_t
dciFormat
;
uint8_t
agregationLevel
;
uint8_t
agregationLevel
;
t_nrPolar_paramsPtr
nrPolar_params
;
#ifdef NR_PDCCH_DEFS_NR_UE
#ifdef NR_PDCCH_DEFS_NR_UE
int
nb_searchSpaces
;
int
nb_searchSpaces
;
// CORESET structure, where maximum number of CORESETs to be handled is 3 (according to 38.331 V15.1.0)
// CORESET structure, where maximum number of CORESETs to be handled is 3 (according to 38.331 V15.1.0)
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
cd07961a
...
@@ -183,7 +183,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
...
@@ -183,7 +183,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
num_dci
=
gNB
->
pdcch_vars
.
num_dci
;
num_dci
=
gNB
->
pdcch_vars
.
num_dci
;
if
(
num_dci
)
{
if
(
num_dci
)
{
LOG_
D
(
PHY
,
"[gNB %d] Frame %d subframe %d \
LOG_
I
(
PHY
,
"[gNB %d] Frame %d subframe %d \
Calling nr_generate_dci_top (number of DCI %d)
\n
"
,
gNB
->
Mod_id
,
frame
,
subframe
,
num_dci
);
Calling nr_generate_dci_top (number of DCI %d)
\n
"
,
gNB
->
Mod_id
,
frame
,
subframe
,
num_dci
);
uint8_t
slot_idx
=
gNB
->
pdcch_vars
.
dci_alloc
[
0
].
pdcch_params
.
first_slot
;
uint8_t
slot_idx
=
gNB
->
pdcch_vars
.
dci_alloc
[
0
].
pdcch_params
.
first_slot
;
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
cd07961a
...
@@ -375,6 +375,8 @@ int main(int argc, char **argv)
...
@@ -375,6 +375,8 @@ int main(int argc, char **argv)
RC
.
gNB
=
(
PHY_VARS_gNB
***
)
malloc
(
sizeof
(
PHY_VARS_gNB
**
));
RC
.
gNB
=
(
PHY_VARS_gNB
***
)
malloc
(
sizeof
(
PHY_VARS_gNB
**
));
RC
.
gNB
[
0
]
=
(
PHY_VARS_gNB
**
)
malloc
(
sizeof
(
PHY_VARS_gNB
*
));
RC
.
gNB
[
0
]
=
(
PHY_VARS_gNB
**
)
malloc
(
sizeof
(
PHY_VARS_gNB
*
));
RC
.
gNB
[
0
][
0
]
=
malloc
(
sizeof
(
PHY_VARS_gNB
));
RC
.
gNB
[
0
][
0
]
=
malloc
(
sizeof
(
PHY_VARS_gNB
));
memset
(
RC
.
gNB
[
0
][
0
],
0
,
sizeof
(
PHY_VARS_gNB
));
gNB
=
RC
.
gNB
[
0
][
0
];
gNB
=
RC
.
gNB
[
0
][
0
];
gNB_config
=
&
gNB
->
gNB_config
;
gNB_config
=
&
gNB
->
gNB_config
;
frame_parms
=
&
gNB
->
frame_parms
;
//to be initialized I suppose (maybe not necessary for PBCH)
frame_parms
=
&
gNB
->
frame_parms
;
//to be initialized I suppose (maybe not necessary for PBCH)
...
@@ -454,11 +456,12 @@ int main(int argc, char **argv)
...
@@ -454,11 +456,12 @@ int main(int argc, char **argv)
//configure UE
//configure UE
UE
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
UE
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
memset
((
void
*
)
UE
,
0
,
sizeof
(
PHY_VARS_NR_UE
));
PHY_vars_UE_g
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
**
));
PHY_vars_UE_g
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
**
));
PHY_vars_UE_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
*
));
PHY_vars_UE_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_NR_UE
*
));
PHY_vars_UE_g
[
0
][
0
]
=
UE
;
PHY_vars_UE_g
[
0
][
0
]
=
UE
;
memcpy
(
&
UE
->
frame_parms
,
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
memcpy
(
&
UE
->
frame_parms
,
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
phy_init_nr_top
(
UE
);
if
(
run_initial_sync
==
1
)
UE
->
is_synchronized
=
0
;
if
(
run_initial_sync
==
1
)
UE
->
is_synchronized
=
0
;
else
UE
->
is_synchronized
=
1
;
else
UE
->
is_synchronized
=
1
;
...
@@ -562,6 +565,7 @@ int main(int argc, char **argv)
...
@@ -562,6 +565,7 @@ int main(int argc, char **argv)
}
}
}
}
//Configure UE
//Configure UE
fapi_nr_dl_config_request_t
dl_config
;
fapi_nr_dl_config_request_t
dl_config
;
// Type0 PDCCH search space
// Type0 PDCCH search space
...
...
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