bugfix in dci reception, CRC is 24 bits but uint16 was used
This commit is contained in:
@@ -621,7 +621,7 @@ uint32_t polar_decoder_int16(int16_t *input,
|
|||||||
uint8_t ones_flag,
|
uint8_t ones_flag,
|
||||||
int8_t messageType,
|
int8_t messageType,
|
||||||
uint16_t messageLength,
|
uint16_t messageLength,
|
||||||
uint8_t aggregation_level )
|
uint8_t aggregation_level)
|
||||||
{
|
{
|
||||||
t_nrPolar_params *polarParams=nr_polar_params(messageType, messageLength, aggregation_level, true);
|
t_nrPolar_params *polarParams=nr_polar_params(messageType, messageLength, aggregation_level, true);
|
||||||
|
|
||||||
@@ -638,7 +638,13 @@ uint32_t polar_decoder_int16(int16_t *input,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int16_t d_tilde[polarParams->N];
|
int16_t d_tilde[polarParams->N];
|
||||||
nr_polar_rate_matching_int16(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength, polarParams->i_bil);
|
nr_polar_rate_matching_int16(input,
|
||||||
|
d_tilde,
|
||||||
|
polarParams->rate_matching_pattern,
|
||||||
|
polarParams->K,
|
||||||
|
polarParams->N,
|
||||||
|
polarParams->encoderLength,
|
||||||
|
polarParams->i_bil);
|
||||||
|
|
||||||
for (int i=0; i<polarParams->N; i++) {
|
for (int i=0; i<polarParams->N; i++) {
|
||||||
if (d_tilde[i]<-128) d_tilde[i]=-128;
|
if (d_tilde[i]<-128) d_tilde[i]=-128;
|
||||||
@@ -792,13 +798,20 @@ uint32_t polar_decoder_int16(int16_t *input,
|
|||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#ifdef POLAR_CODING_DEBUG
|
||||||
printf("A %llx B %llx|%llx Cprime %llx|%llx (crc %x,rxcrc %llx %d)\n",
|
printf("A %lx B %lx|%lx Cprime %lx|%lx (crc %x,rxcrc %lx, XOR %lx, bits%d)\n",
|
||||||
Ar,
|
Ar,
|
||||||
B[1],B[0],Cprime[1],Cprime[0],crc,
|
B[1],
|
||||||
rxcrc,polarParams->payloadBits);
|
B[0],
|
||||||
|
Cprime[1],
|
||||||
|
Cprime[0],
|
||||||
|
crc,
|
||||||
|
rxcrc,
|
||||||
|
crc^rxcrc,
|
||||||
|
polarParams->payloadBits);
|
||||||
#endif
|
#endif
|
||||||
out[0]=Ar;
|
|
||||||
|
out[0] = Ar;
|
||||||
|
|
||||||
polarReturn crc^rxcrc;
|
polarReturn crc^rxcrc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -728,7 +728,7 @@ void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
|||||||
rel15->coreset.pdcch_dmrs_scrambling_id,
|
rel15->coreset.pdcch_dmrs_scrambling_id,
|
||||||
tmp_e);
|
tmp_e);
|
||||||
|
|
||||||
uint16_t crc = polar_decoder_int16(tmp_e, dci_estimation, 1, NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L);
|
const uint32_t crc = polar_decoder_int16(tmp_e, dci_estimation, 1, NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L);
|
||||||
|
|
||||||
rnti_t n_rnti = rel15->rnti;
|
rnti_t n_rnti = rel15->rnti;
|
||||||
if (crc == n_rnti) {
|
if (crc == n_rnti) {
|
||||||
|
|||||||
Reference in New Issue
Block a user