Commit 2aff83fe authored by Ahmed's avatar Ahmed Committed by Thomas Schlichter

indentation + some comments

parent 2ea546fb
......@@ -453,7 +453,7 @@ int32_t nr_segmentation(unsigned char *input_buffer,
unsigned int B,
unsigned int *C,
unsigned int *K,
unsigned int *Zout,
unsigned int *Zout,
unsigned int *F);
uint32_t nr_compute_tbs(uint8_t mcs,
......
......@@ -34,7 +34,7 @@ int32_t nr_segmentation(unsigned char *input_buffer,
unsigned int B,
unsigned int *C,
unsigned int *K,
unsigned int *Zout,
unsigned int *Zout, // [hna] Zout is Zc
unsigned int *F)
{
......
......@@ -195,6 +195,9 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(unsigned char Kmimo,
if (abstraction_flag==0) {
for (r=0; r<MAX_NUM_NR_DLSCH_SEGMENTS/bw_scaling; r++) {
// account for filler in first segment and CRCs for multiple segment case
// [hna] 8448 is the maximum CB size in NR
// 68*348 = 68*(maximum size of Zc)
// In section 5.3.2 in 38.212, the for loop is up to N + 2*Zc (maximum size of N is 66*Zc, therefore 68*Zc)
dlsch->harq_processes[i]->c[r] = (uint8_t*)malloc16(8448);
dlsch->harq_processes[i]->d[r] = (uint8_t*)malloc16(68*384); //max size for coded output
if (dlsch->harq_processes[i]->c[r]) {
......@@ -337,7 +340,7 @@ int nr_dlsch_encoding(unsigned char *a,
dlsch->harq_processes[harq_pid]->B,
&dlsch->harq_processes[harq_pid]->C,
&dlsch->harq_processes[harq_pid]->K,
pz,
pz, // [hna] pz is Zc
&dlsch->harq_processes[harq_pid]->F);
F = dlsch->harq_processes[harq_pid]->F;
......
......@@ -42,8 +42,6 @@
void free_nr_ue_ulsch(NR_UE_ULSCH_t *ulsch)
{
int i;
......@@ -88,6 +86,8 @@ void free_nr_ue_ulsch(NR_UE_ULSCH_t *ulsch)
}
NR_UE_ULSCH_t *new_nr_ue_ulsch(unsigned char N_RB_UL, int number_of_harq_pids, uint8_t abstraction_flag)
{
......
......@@ -404,7 +404,7 @@ int main(int argc, char **argv) {
r_im[i] = malloc(frame_length_complex_samples * sizeof(double));
bzero(r_im[i], frame_length_complex_samples * sizeof(double));
txdata[i] = malloc(frame_length_complex_samples * sizeof(int));
bzero(r_re[i], frame_length_complex_samples * sizeof(int));
bzero(r_re[i], frame_length_complex_samples * sizeof(int)); // [hna] r_re should be txdata
}
if (pbch_file_fd != NULL) {
......@@ -480,7 +480,7 @@ int main(int argc, char **argv) {
rel15->nb_layers = Nl;
rel15->nb_re_dmrs = nb_re_dmrs;
rel15->transport_block_size = TBS;
double *modulated_input = malloc16(sizeof(double) * 16 * 68 * 384);
double *modulated_input = malloc16(sizeof(double) * 16 * 68 * 384); // [hna] 16 segments, 68*Zc
short *channel_output_fixed = malloc16(sizeof(short) * 16 * 68 * 384);
short *channel_output_uncoded = malloc16(sizeof(unsigned short) * 16 * 68 * 384);
double errors_bit_uncoded = 0;
......
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