0% found this document useful (0 votes)
14 views

Cce and Aggregation Level Function

This C program calculates the control channel element (CCE) count and aggregation level for a given system bandwidth, physical control format indicator channel (PCFICH) value, and number of antenna ports. It defines functions to calculate the CCE count based on these parameters, and to calculate the aggregation level based on the maximum number of users and available CCEs. The main function gets input from the user, calls the defined functions to calculate CCE count and aggregation level, and prints the results.

Uploaded by

abdul Razzak
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Cce and Aggregation Level Function

This C program calculates the control channel element (CCE) count and aggregation level for a given system bandwidth, physical control format indicator channel (PCFICH) value, and number of antenna ports. It defines functions to calculate the CCE count based on these parameters, and to calculate the aggregation level based on the maximum number of users and available CCEs. The main function gets input from the user, calls the defined functions to calculate CCE count and aggregation level, and prints the results.

Uploaded by

abdul Razzak
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

*/

#include<stdio.h>
#include<math.h>
int calc_cce(int, int, int);
int calc_agg_level(int,int);
void main(void) {
int cce_count,user,aggregationlevel;
int system_bw,pcfich,Ng;
printf("enter the maximum n o of users");
scanf("%d",&user);
printf("enter system bandwidth");
scanf("%d",&system_bw);
printf("enter pcfich value");
scanf("%d",&pcfich);
printf("enter the value NG coming from MIB");
scanf("%d",&Ng);
cce_count=calc_cce(system_bw,pcfich,Ng);
aggregationlevel=calc_agg_level(user,cce_count);
printf("the total number of cce avilable are %d for system bw %d ",
cce_count,system_bw);
printf("the aggregation level is %d for max users %d",
aggregationlevel,user);

}
int calc_agg_level(int user,int nb_cce)
{
int agg_level;
int new_nb_cce;
if(nb_cce<4)
return -1;
else
{
new_nb_cce=nb_cce-4; //removing 4 cce for SIB
agg_level=new_nb_cce/(2*user);
if(agg_level>8)
agg_level=8;
if(agg_level>4 && agg_level<8)
agg_level=4;
if(agg_level>2 && agg_level<4)
agg_level=2;
if(agg_level<1)
{
new_nb_cce=nb_cce+4;
agg_level=new_nb_cce/(2*user);
}
return agg_level;
}

int calc_cce(int dl_bw_rb,int pcfich,int Ng)


{
int total_re,nb_reg,phich_grp,nb_cce;
total_re= dl_bw_rb * 12* pcfich;
if(pcfich == 1)
{
nb_reg = nb_re/6;
}
else if(pcfich == 2)
{
nb_reg = nb_re/6 + nb_re/4;
}
else if(pcfich== 3)
{
nb_reg = nb_re/6 + nb_re/4 + nb_re/4;
}
//remove reg for pcfich
nb_reg=nb_reg-4;
//number of phich groups
phich_group=ceil(Ng*(dl_bw_rb/8));
//remove reg for phich
nb_reg=nb_reg-3*phich_grp;
nb_cce=nb_reg/9;
return nb_cce;

You might also like