#ifndef _CDEPUNCTURING_H #define _CDEPUNCTURING_H #define MAXPSEQ 20 //MAXIMUM LENGTH OF PUNCTURING SEQUENCE /*Values for punct_rate parameter: Indicate the relation between bits input/bits output*/ //CC CODING RATE=1/2 #define RATE1R1 1.0 //PUNCTURING RATE=1 #define RATE4R3 4.0/3.0 //PUNCTURING RATE=4/3 #define RATE3R2 3.0/2.0 //PUNCTURING RATE=3/2 #define RATE5R3 5.0/3.0 //PUNCTURING RATE=5/3 //CONTROL PUNCTURING //////////////////////////////////////////////////////////////////////////////// ///////////////////////DATA CONTROL///////////////////////////////////////////// /*Define the module control parameters*/ typedef struct //Defined according the control out needs// { int ninputdata; //Number of input data bytes// int noutputdata; //Number of output data bytes// //Num Output Bytes=(Num Input Bytes - tail)*(coderate)// float punct_rate; //Puncturing rate: (input bits)/(output bits) int pseqlength; //Puncturing sequence length int puncseq[MAXPSEQ]; //Define puncturing sequence: //zero indicate punctured data //one indicate non punctured data }CData_depuncture; //COntrol puncturing// //////////////////////////////////////////////////////////////////////////////// ///////////////////////EXECUTION CONTROL//////////////////////////////////////// /*Define the execution control parameters*/ #define NONACTIVE 0 #define ACTIVE 1 /*Defines a module as active*/ #define TEST_FLOW 2 /*Test flows: Bypass data flow mode*/ #define TEST_PROCESS 3 /*Test Module Process*/ typedef struct //Defined according the control out needs { int status; //Define the status int timeslot; //Define the timeslot to produce the change }CExec_depuncture; //////////////////////////////////////////////////////////////////////////////// ///////////////////////CONTROL TYPE///////////////////////////////////////////// typedef struct //Defined according the control out needs { CData_depuncture CData; CExec_depuncture CExec; }CDepuncture; //Control Puncturing functionality #endif