Commit ae2549b9 authored by Francesco Mani's avatar Francesco Mani

encoded length as uint32_t

parent 5a0b2fc0
......@@ -24,7 +24,7 @@
extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT];
void nr_modulation(uint32_t *in,
uint16_t length,
uint32_t length,
uint16_t mod_order,
int16_t *out)
{
......
......@@ -37,7 +37,7 @@
*/
void nr_modulation(uint32_t *in,
uint16_t length,
uint32_t length,
uint16_t mod_order,
int16_t *out);
......@@ -93,4 +93,4 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
*/
void nr_dft(int32_t *z,int32_t *d, uint32_t Msc_PUSCH);
#endif
\ No newline at end of file
#endif
......@@ -130,7 +130,7 @@ uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format,
}
void nr_pdcch_scrambling(uint32_t *in,
uint16_t size,
uint32_t size,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t *out) {
......@@ -187,9 +187,9 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
dci_idx = 0;
LOG_D(PHY, "Coreset starting subcarrier %d on symbol %d (%d symbols)\n", cset_start_sc, cset_start_symb, cset_nsymb);
// DMRS length is per OFDM symbol
uint16_t dmrs_length = (pdcch_params.precoder_granularity == NFAPI_NR_CSET_ALL_CONTIGUOUS_RBS)?
uint32_t dmrs_length = (pdcch_params.precoder_granularity == NFAPI_NR_CSET_ALL_CONTIGUOUS_RBS)?
(pdcch_params.n_rb*6) : (dci_alloc.L*36/cset_nsymb); //2(QPSK)*3(per RB)*6(REG per CCE)
uint16_t encoded_length = dci_alloc.L*108; //2(QPSK)*9(per RB)*6(REG per CCE)
uint32_t encoded_length = dci_alloc.L*108; //2(QPSK)*9(per RB)*6(REG per CCE)
LOG_D(PHY, "DMRS length per symbol %d\t DCI encoded length %d\n", dmrs_length, encoded_length);
dmrs_length += pdcch_params.rb_offset*6; // To accommodate more DMRS symbols in case of rb offset
......
......@@ -38,7 +38,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
nfapi_nr_config_request_t config);
void nr_pdcch_scrambling(uint32_t *in,
uint16_t size,
uint32_t size,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t *out);
......
......@@ -39,11 +39,11 @@
//#define DEBUG_DLSCH_MAPPING
void nr_pdsch_codeword_scrambling(uint8_t *in,
uint16_t size,
uint8_t q,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t* out) {
uint32_t size,
uint8_t q,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t* out) {
uint8_t reset, b_idx;
uint32_t x1, x2, s=0;
......@@ -88,7 +88,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
int8_t Wf[2], Wt[2], l0, l_prime[2], delta;
uint16_t nb_symbols = rel15->nb_mod_symbols;
uint8_t Qm = rel15->modulation_order;
uint16_t encoded_length = nb_symbols*Qm;
uint32_t encoded_length = nb_symbols*Qm;
/// CRC, coding, interleaving and rate matching
AssertFatal(harq->pdu!=NULL,"harq->pdu is null\n");
......@@ -121,11 +121,12 @@ printf("\n");
pdcch_params.scrambling_id : config->sch_config.physical_cell_id.value;
for (int q=0; q<rel15->nb_codewords; q++)
nr_pdsch_codeword_scrambling(harq->f,
encoded_length,
q,
Nid,
n_RNTI,
scrambled_output[q]);
encoded_length,
q,
Nid,
n_RNTI,
scrambled_output[q]);
stop_meas(dlsch_scrambling_stats);
#ifdef DEBUG_DLSCH
printf("PDSCH scrambling:\n");
......
......@@ -54,11 +54,11 @@ void nr_get_rbg_list(uint32_t bitmap, uint8_t n_rbg, uint8_t* rbg_list);
void nr_get_PRG_parms(NR_BWP_PARMS* bwp, NR_gNB_DCI_ALLOC_t dci_alloc, uint8_t prb_bundling_type);
void nr_pdsch_codeword_scrambling(uint8_t *in,
uint16_t size,
uint8_t q,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t* out);
uint32_t size,
uint8_t q,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t* out);
void nr_fill_dlsch(PHY_VARS_gNB *gNB,
int frame,
......
......@@ -1064,7 +1064,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
*/
void nr_pusch_codeword_scrambling(uint8_t *in,
uint16_t size,
uint32_t size,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t* out);
......
......@@ -46,7 +46,7 @@
//#define DEBUG_PUSCH_MAPPING
void nr_pusch_codeword_scrambling(uint8_t *in,
uint16_t size,
uint32_t size,
uint32_t Nid,
uint32_t n_RNTI,
uint32_t* out) {
......@@ -90,7 +90,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
uint8_t thread_id,
int gNB_id) {
unsigned int available_bits;
uint32_t available_bits;
uint8_t mod_order, cwd_index, num_of_codewords;
uint32_t scrambled_output[NR_MAX_NB_CODEWORDS][NR_MAX_PDSCH_ENCODED_LENGTH>>5];
uint32_t ***pusch_dmrs;
......
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