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
11441023
Commit
11441023
authored
Feb 23, 2022
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix polar race condition
parent
ae803b53
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
157 additions
and
137 deletions
+157
-137
cmake_targets/install_external_packages.ubuntu20
cmake_targets/install_external_packages.ubuntu20
+1
-0
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+8
-5
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+8
-0
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
+11
-4
openair1/PHY/CODING/nr_polar_init.c
openair1/PHY/CODING/nr_polar_init.c
+122
-122
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+1
-1
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+4
-4
openair3/NAS/COMMON/API/NETWORK/nas_message.c
openair3/NAS/COMMON/API/NETWORK/nas_message.c
+2
-1
No files found.
cmake_targets/install_external_packages.ubuntu20
View file @
11441023
...
...
@@ -86,6 +86,7 @@ check_supported_distribution() {
"ubuntu20.04"
)
return
0
;;
"ubuntu20.10"
)
return
0
;;
"ubuntu21.04"
)
return
0
;;
"ubuntu21.10"
)
return
0
;;
esac
return
1
}
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
11441023
...
...
@@ -268,7 +268,7 @@ int8_t polar_decoder(double *input,
if
(
decoderIterationCheck
==
0
)
{
//perror("[SCL polar decoder] All list entries have failed the CRC checks.");
r
eturn
(
-
1
);
polarR
eturn
(
-
1
);
}
nonFrozenBit
++
;
...
...
@@ -301,7 +301,8 @@ int8_t polar_decoder(double *input,
* Return bits.
*/
nr_byte2bit_uint8_32
(
polarParams
->
nr_polar_A
,
polarParams
->
payloadBits
,
out
);
return
(
0
);
polarReturn
0
;
}
int8_t
polar_decoder_dci
(
double
*
input
,
...
...
@@ -532,7 +533,7 @@ int8_t polar_decoder_dci(double *input,
if
(
decoderIterationCheck
==
0
)
{
//perror("[SCL polar decoder] All list entries have failed the CRC checks.");
return
(
-
1
)
;
polarReturn
-
1
;
}
nonFrozenBit
++
;
...
...
@@ -565,7 +566,8 @@ int8_t polar_decoder_dci(double *input,
* Return bits.
*/
nr_byte2bit_uint8_32
(
polarParams
->
nr_polar_A
,
polarParams
->
payloadBits
,
out
);
return
(
0
);
polarReturn
0
;
}
void
init_polar_deinterleaver_table
(
t_nrPolar_params
*
polarParams
)
{
...
...
@@ -705,5 +707,6 @@ uint32_t polar_decoder_int16(int16_t *input,
rxcrc,polarParams->payloadBits);
#endif
out
[
0
]
=
Ar
;
return
(
crc
^
rxcrc
);
polarReturn
crc
^
rxcrc
;
}
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
11441023
...
...
@@ -81,6 +81,7 @@ struct nrPolar_params {
//messageType: 0=PBCH, 1=DCI, -1=UCI
struct
nrPolar_params
*
nextPtr
__attribute__
((
aligned
(
16
)));
bool
busy
;
uint32_t
idx
;
uint8_t
n_max
;
uint8_t
i_il
;
...
...
@@ -344,4 +345,11 @@ static inline void nr_polar_deinterleaver(uint8_t *input,
for
(
int
i
=
0
;
i
<
size
;
i
++
)
output
[
pattern
[
i
]]
=
input
[
i
];
}
void
delete_decoder_tree
(
t_nrPolar_params
*
);
#define polarReturn \
pthread_mutex_lock(&PolarListMutex); \
currentPtr->busy=false; \
pthread_mutex_unlock(&PolarListMutex); \
return
#endif
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
View file @
11441023
...
...
@@ -60,10 +60,10 @@ void polar_encoder(uint32_t *in,
*/
//Calculate CRC.
nr_matrix_multiplication_uint8_1D_uint8_2D
(
polarParams
->
nr_polar_A
,
polarParams
->
crc_generator_matrix
,
polarParams
->
nr_polar_crc
,
polarParams
->
payloadBits
,
polarParams
->
crcParityBits
);
polarParams
->
crc_generator_matrix
,
polarParams
->
nr_polar_crc
,
polarParams
->
payloadBits
,
polarParams
->
crcParityBits
);
for
(
uint8_t
i
=
0
;
i
<
polarParams
->
crcParityBits
;
i
++
)
polarParams
->
nr_polar_crc
[
i
]
=
(
polarParams
->
nr_polar_crc
[
i
]
%
2
);
...
...
@@ -153,6 +153,9 @@ void polar_encoder(uint32_t *in,
#endif
nr_byte2bit_uint8_32
(
polarParams
->
nr_polar_E
,
polarParams
->
encoderLength
,
out
);
polarReturn
;
}
void
polar_encoder_dci
(
uint32_t
*
in
,
...
...
@@ -256,6 +259,7 @@ void polar_encoder_dci(uint32_t *in,
printf
(
"
\n
[polar_encoder_dci] out: "
);
for
(
int
i
=
0
;
i
<
outputInd
;
i
++
)
printf
(
"[%d]->0x%08x
\t
"
,
i
,
out
[
i
]);
#endif
polarReturn
;
}
static
inline
void
polar_rate_matching
(
const
t_nrPolar_params
*
polarParams
,
void
*
in
,
void
*
out
)
__attribute__
((
always_inline
));
...
...
@@ -698,4 +702,7 @@ void polar_encoder_fast(uint64_t *A,
}
memset
((
void
*
)
out
,
0
,
polarParams
->
encoderLength
>>
3
);
polar_rate_matching
(
polarParams
,(
void
*
)
D
,
out
);
polarReturn
;
}
openair1/PHY/CODING/nr_polar_init.c
View file @
11441023
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
11441023
...
...
@@ -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
[
2
],
double
*
s_im
[
2
],
double
*
r_re
[
2
],
double
*
r_im
[
2
],
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
;
...
...
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
11441023
...
...
@@ -340,10 +340,10 @@ int main(int argc, char **argv) {
double
s_re1
[
30720
],
s_im1
[
30720
],
r_re1
[
30720
],
r_im1
[
30720
];
double
r_re2
[
30720
],
r_im2
[
30720
];
double
r_re3
[
30720
],
r_im3
[
30720
];
double
*
s_re
[
2
]
=
{
s_re0
,
s_re1
};
double
*
s_im
[
2
]
=
{
s_im0
,
s_im1
};
double
*
r_re
[
4
]
=
{
r_re0
,
r_re1
,
r_re2
,
r_re3
};
double
*
r_im
[
4
]
=
{
r_im0
,
r_im1
,
r_im2
,
r_im3
};
double
*
s_re
[
NB_ANTENNAS_TX
]
=
{
s_re0
,
s_re1
,
NULL
,
NULL
};
double
*
s_im
[
NB_ANTENNAS_TX
]
=
{
s_im0
,
s_im1
,
NULL
,
NULL
};
double
*
r_re
[
NB_ANTENNAS_RX
]
=
{
r_re0
,
r_re1
,
r_re2
,
r_re3
};
double
*
r_im
[
NB_ANTENNAS_RX
]
=
{
r_im0
,
r_im1
,
r_im2
,
r_im3
};
double
forgetting_factor
=
0
.
0
;
//in [0,1] 0 means a new channel every time, 1 means keep the same channel
double
iqim
=
0
.
0
;
int
cqi_error
,
cqi_errors
,
ack_errors
,
cqi_crc_falsepositives
,
cqi_crc_falsenegatives
;
...
...
openair3/NAS/COMMON/API/NETWORK/nas_message.c
View file @
11441023
...
...
@@ -1096,7 +1096,8 @@ static int _nas_message_decrypt(
"Unknown security header type %u"
,
security_header_type
);
LOG_FUNC_RETURN
(
0
);
};
LOG_FUNC_RETURN
(
0
);
}
/****************************************************************************
...
...
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