Get and store CORESET start RB

This commit is contained in:
luis_pereira87
2025-05-15 16:13:30 +01:00
parent f9e1657840
commit 3dea00b006
2 changed files with 15 additions and 6 deletions
@@ -497,13 +497,21 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac,
pdcch.ShiftIndex = 0;
}
int N_rb = 0; // nb of rbs of coreset per symbol
for (int i=0;i<6;i++) {
for (int t=0;t<8;t++) {
N_rb+=((coreset->frequencyDomainResources.buf[i]>>t)&1);
uint16_t N_rb = 0; // nb of rbs of coreset per symbol
uint16_t rb_start = 0;
for (int i = 0; i < 6; i++) {
for (int t = 0; t < 8; t++) {
if (coreset->frequencyDomainResources.buf[i] >> (7 - t) & 1) {
if (N_rb == 0) {
rb_start = 48 * i + t * 6;
}
N_rb++;
}
}
}
pdcch.n_rb = N_rb*=6; // each bit of frequencyDomainResources represents 6 PRBs
pdcch.rb_start = rb_start;
pdcch.n_rb = N_rb *= 6; // each bit of frequencyDomainResources represents 6 PRBs
return pdcch;
}
+2 -1
View File
@@ -198,7 +198,8 @@ typedef struct NR_sched_pdcch {
uint8_t InterleaverSize;
uint16_t ShiftIndex;
uint8_t DurationSymbols;
int n_rb;
uint16_t n_rb;
uint16_t rb_start;
} NR_sched_pdcch_t;
/*! \brief gNB template for the Random access information */