Commit a7e87a4f authored by Hongzhi Wang's avatar Hongzhi Wang

Adding CRC16 for BG2 at NR UE

parent cc7db496
...@@ -346,7 +346,11 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -346,7 +346,11 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
if (harq_process->round == 0) { if (harq_process->round == 0) {
// This is a new packet, so compute quantities regarding segmentation // This is a new packet, so compute quantities regarding segmentation
harq_process->B = A+24; if (A > 3824)
harq_process->B = A+24;
else
harq_process->B = A+16;
nr_segmentation(NULL, nr_segmentation(NULL,
NULL, NULL,
harq_process->B, harq_process->B,
...@@ -495,8 +499,13 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -495,8 +499,13 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
// printf("done\n"); // printf("done\n");
if (harq_process->C == 1){ if (harq_process->C == 1){
crc_type = CRC24_A; if (A > 3824)
length_dec = harq_process->B; crc_type = CRC24_A;
else
crc_type = CRC16;
length_dec = harq_process->B;
} }
else{ else{
crc_type = CRC24_B; crc_type = CRC24_B;
...@@ -852,7 +861,11 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -852,7 +861,11 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
if (harq_process->round == 0) { if (harq_process->round == 0) {
// This is a new packet, so compute quantities regarding segmentation // This is a new packet, so compute quantities regarding segmentation
harq_process->B = A+24; if (A > 3824)
harq_process->B = A+24;
else
harq_process->B = A+16;
nr_segmentation(NULL, nr_segmentation(NULL,
NULL, NULL,
harq_process->B, harq_process->B,
...@@ -1038,7 +1051,11 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -1038,7 +1051,11 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
// printf("done\n"); // printf("done\n");
if (harq_process->C == 1){ if (harq_process->C == 1){
crc_type = CRC24_A; if (A > 3824)
crc_type = CRC24_A;
else
crc_type = CRC16;
length_dec = harq_process->B; length_dec = harq_process->B;
} }
else{ else{
...@@ -1405,7 +1422,10 @@ void *nr_dlsch_decoding_process(void *arg) ...@@ -1405,7 +1422,10 @@ void *nr_dlsch_decoding_process(void *arg)
if (harq_process->round == 0) { if (harq_process->round == 0) {
// This is a new packet, so compute quantities regarding segmentation // This is a new packet, so compute quantities regarding segmentation
harq_process->B = A+24; if (A > 3824)
harq_process->B = A+24;
else
harq_process->B = A+16;
nr_segmentation(NULL, nr_segmentation(NULL,
NULL, NULL,
...@@ -1561,7 +1581,11 @@ void *nr_dlsch_decoding_process(void *arg) ...@@ -1561,7 +1581,11 @@ void *nr_dlsch_decoding_process(void *arg)
memset(harq_process->c[r],0,Kr_bytes); memset(harq_process->c[r],0,Kr_bytes);
if (harq_process->C == 1){ if (harq_process->C == 1){
crc_type = CRC24_A; if (A > 3824)
crc_type = CRC24_A;
else
crc_type = CRC16;
length_dec = harq_process->B; length_dec = harq_process->B;
} }
else{ else{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment