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
22d2e9a3
Commit
22d2e9a3
authored
Feb 23, 2022
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warnings and race cond in polar codec
parent
11441023
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
34 additions
and
58 deletions
+34
-58
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+3
-3
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+2
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
+3
-3
openair1/PHY/CODING/nr_polar_init.c
openair1/PHY/CODING/nr_polar_init.c
+1
-1
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+1
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+0
-7
openair2/RRC/NR/nr_rrc_proto.h
openair2/RRC/NR/nr_rrc_proto.h
+21
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+1
-0
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+1
-21
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+1
-21
No files found.
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
22d2e9a3
...
...
@@ -64,7 +64,7 @@ int8_t polar_decoder(double *input,
uint8_t
aggregation_level
)
{
const
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
true
);
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
true
);
//Assumes no a priori knowledge.
uint8_t
bit
[
polarParams
->
N
][
polarParams
->
n
+
1
][
2
*
listSize
];
memset
(
bit
,
0
,
sizeof
bit
);
...
...
@@ -312,7 +312,7 @@ int8_t polar_decoder_dci(double *input,
int8_t
messageType
,
uint16_t
messageLength
,
uint8_t
aggregation_level
)
{
const
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
true
);
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
true
);
uint8_t
bit
[
polarParams
->
N
][
polarParams
->
n
+
1
][
2
*
listSize
];
memset
(
bit
,
0
,
sizeof
bit
);
...
...
@@ -610,7 +610,7 @@ uint32_t polar_decoder_int16(int16_t *input,
uint16_t
messageLength
,
uint8_t
aggregation_level
)
{
const
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
true
);
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
true
);
int16_t
d_tilde
[
polarParams
->
N
];
// = malloc(sizeof(double) * polarParams->N);
nr_polar_rate_matching_int16
(
input
,
d_tilde
,
polarParams
->
rate_matching_pattern
,
polarParams
->
K
,
polarParams
->
N
,
polarParams
->
encoderLength
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
22d2e9a3
...
...
@@ -346,9 +346,10 @@ static inline void nr_polar_deinterleaver(uint8_t *input,
}
void
delete_decoder_tree
(
t_nrPolar_params
*
);
extern
pthread_mutex_t
PolarListMutex
;
#define polarReturn \
pthread_mutex_lock(&PolarListMutex); \
currentPtr
->busy=false; \
polarParams
->busy=false; \
pthread_mutex_unlock(&PolarListMutex); \
return
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
View file @
22d2e9a3
...
...
@@ -46,7 +46,7 @@ void polar_encoder(uint32_t *in,
int8_t
messageType
,
uint16_t
messageLength
,
uint8_t
aggregation_level
)
{
const
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
false
);
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
false
);
if
(
1
)
{
//polarParams->idx == 0 || polarParams->idx == 1) { //PBCH or PDCCH
/*
uint64_t B = (((uint64_t)*in)&((((uint64_t)1)<<32)-1)) | (((uint64_t)crc24c((uint8_t*)in,polarParams->payloadBits)>>8)<<polarParams->payloadBits);
...
...
@@ -164,7 +164,7 @@ void polar_encoder_dci(uint32_t *in,
int8_t
messageType
,
uint16_t
messageLength
,
uint8_t
aggregation_level
)
{
const
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
false
);
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
false
);
#ifdef DEBUG_POLAR_ENCODER_DCI
printf
(
"[polar_encoder_dci] in: [0]->0x%08x
\t
[1]->0x%08x
\t
[2]->0x%08x
\t
[3]->0x%08x
\n
"
,
in
[
0
],
in
[
1
],
in
[
2
],
in
[
3
]);
...
...
@@ -433,7 +433,7 @@ void polar_encoder_fast(uint64_t *A,
uint16_t
messageLength
,
uint8_t
aggregation_level
)
{
const
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
false
);
t_nrPolar_params
*
polarParams
=
nr_polar_params
(
messageType
,
messageLength
,
aggregation_level
,
false
);
// AssertFatal(polarParams->K > 32, "K = %d < 33, is not supported yet\n",polarParams->K);
AssertFatal
(
polarParams
->
K
<
129
,
"K = %d > 128, is not supported yet
\n
"
,
polarParams
->
K
);
AssertFatal
(
polarParams
->
payloadBits
<
65
,
"payload bits = %d > 64, is not supported yet
\n
"
,
polarParams
->
payloadBits
);
...
...
openair1/PHY/CODING/nr_polar_init.c
View file @
22d2e9a3
...
...
@@ -35,7 +35,7 @@
#define PolarKey ((messageType<<24)|(messageLength<<8)|aggregation_level)
static
t_nrPolar_params
*
PolarList
=
NULL
;
static
pthread_mutex_t
PolarListMutex
=
PTHREAD_MUTEX_INITIALIZER
;
pthread_mutex_t
PolarListMutex
=
PTHREAD_MUTEX_INITIALIZER
;
static
int
intcmp
(
const
void
*
p1
,
const
void
*
p2
)
{
return
(
*
(
int16_t
*
)
p1
>
*
(
int16_t
*
)
p2
);
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
22d2e9a3
...
...
@@ -147,7 +147,7 @@ void do_OFDM_mod_l(int32_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_
}
void
DL_channel
(
RU_t
*
ru
,
PHY_VARS_UE
*
UE
,
uint
subframe
,
int
awgn_flag
,
double
SNR
,
int
tx_lev
,
int
hold_channel
,
int
abstx
,
int
num_rounds
,
int
trials
,
int
round
,
channel_desc_t
*
eNB2UE
[
4
],
double
*
s_re
[
NB_ANTENNAS_TX
],
double
*
s_im
[
[
NB_ANTENNAS_TX
],
double
*
r_re
[
NB_ANTENNAS_RX
],
double
*
r_im
[
NB_ANTENNAS_RX
],
FILE
*
csv_fd
)
{
double
*
s_re
[
NB_ANTENNAS_TX
],
double
*
s_im
[
NB_ANTENNAS_TX
],
double
*
r_re
[
NB_ANTENNAS_RX
],
double
*
r_im
[
NB_ANTENNAS_RX
],
FILE
*
csv_fd
)
{
int
i
,
u
;
int
aa
,
aarx
,
aatx
;
double
channelx
,
channely
;
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
22d2e9a3
...
...
@@ -101,13 +101,6 @@ typedef struct {
static
rlc_data_req_queue
q
;
extern
rlc_op_status_t
nr_rrc_rlc_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
NR_SRB_ToAddModList_t
*
const
srb2add_listP
,
const
NR_DRB_ToAddModList_t
*
const
drb2add_listP
,
const
NR_DRB_ToReleaseList_t
*
const
drb2release_listP
,
const
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
);
static
void
*
rlc_data_req_thread
(
void
*
_
)
{
int
i
;
...
...
openair2/RRC/NR/nr_rrc_proto.h
View file @
22d2e9a3
...
...
@@ -208,3 +208,24 @@ void
rrc_gNB_generate_dedicatedRRCReconfiguration
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
ue_context_pP
);
rlc_op_status_t
nr_rrc_rlc_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
NR_SRB_ToAddModList_t
*
const
srb2add_listP
,
const
NR_DRB_ToAddModList_t
*
const
drb2add_listP
,
const
NR_DRB_ToReleaseList_t
*
const
drb2release_listP
,
const
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
);
boolean_t
nr_rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
NR_SRB_ToAddModList_t
*
const
srb2add_list
,
NR_DRB_ToAddModList_t
*
const
drb2add_list
,
NR_DRB_ToReleaseList_t
*
const
drb2release_list
,
const
uint8_t
security_modeP
,
uint8_t
*
const
kRRCenc
,
uint8_t
*
const
kRRCint
,
uint8_t
*
const
kUPenc
,
uint8_t
*
const
kUPint
,
LTE_PMCH_InfoList_r9_t
*
pmch_InfoList_r9
,
rb_id_t
*
const
defaultDRB
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
);
openair2/RRC/NR/rrc_gNB.c
View file @
22d2e9a3
...
...
@@ -98,6 +98,7 @@
#include <openair2/RRC/NR/rrc_gNB_UE_context.h>
#include <openair2/X2AP/x2ap_eNB.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#include <openair2/RRC/NR/nr_rrc_proto.h>
#include "BIT_STRING.h"
#include "assertions.h"
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
22d2e9a3
...
...
@@ -42,27 +42,7 @@
#include <openair2/RRC/NR/rrc_gNB_UE_context.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "UTIL/OSA/osa_defs.h"
extern
boolean_t
nr_rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
NR_SRB_ToAddModList_t
*
const
srb2add_list
,
NR_DRB_ToAddModList_t
*
const
drb2add_list
,
NR_DRB_ToReleaseList_t
*
const
drb2release_list
,
const
uint8_t
security_modeP
,
uint8_t
*
const
kRRCenc
,
uint8_t
*
const
kRRCint
,
uint8_t
*
const
kUPenc
,
uint8_t
*
const
kUPint
,
LTE_PMCH_InfoList_r9_t
*
pmch_InfoList_r9
,
rb_id_t
*
const
defaultDRB
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
);
extern
rlc_op_status_t
nr_rrc_rlc_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
NR_SRB_ToAddModList_t
*
const
srb2add_listP
,
const
NR_DRB_ToAddModList_t
*
const
drb2add_listP
,
const
NR_DRB_ToReleaseList_t
*
const
drb2release_listP
,
const
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
);
#include <openair2/RRC/NR/nr_rrc_proto.h>
void
rrc_parse_ue_capabilities
(
gNB_RRC_INST
*
rrc
,
NR_UE_CapabilityRAT_ContainerList_t
*
UE_CapabilityRAT_ContainerList
,
x2ap_ENDC_sgnb_addition_req_t
*
m
,
NR_CG_ConfigInfo_IEs_t
*
cg_config_info
)
{
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
22d2e9a3
...
...
@@ -72,6 +72,7 @@
#include <executables/softmodem-common.h>
#include "nr_nas_msg_sim.h"
#include <openair2/RRC/NR/nr_rrc_proto.h>
NR_UE_RRC_INST_t
*
NR_UE_rrc_inst
;
/* NAS Attach request with IMSI */
...
...
@@ -178,27 +179,6 @@ static int nr_rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_NR_t subS
return
(
0
);
}
extern
boolean_t
nr_rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
NR_SRB_ToAddModList_t
*
const
srb2add_list
,
NR_DRB_ToAddModList_t
*
const
drb2add_list
,
NR_DRB_ToReleaseList_t
*
const
drb2release_list
,
const
uint8_t
security_modeP
,
uint8_t
*
const
kRRCenc
,
uint8_t
*
const
kRRCint
,
uint8_t
*
const
kUPenc
,
uint8_t
*
const
kUPint
,
LTE_PMCH_InfoList_r9_t
*
pmch_InfoList_r9
,
rb_id_t
*
const
defaultDRB
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
);
extern
rlc_op_status_t
nr_rrc_rlc_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
NR_SRB_ToAddModList_t
*
const
srb2add_listP
,
const
NR_DRB_ToAddModList_t
*
const
drb2add_listP
,
const
NR_DRB_ToReleaseList_t
*
const
drb2release_listP
,
const
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
);
// from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (encoded)
int8_t
nr_rrc_ue_decode_secondary_cellgroup_config
(
const
module_id_t
module_id
,
const
uint8_t
*
buffer
,
...
...
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