Main Page | Class List | File List | Class Members | File Members

rcpcc_hg16.h

Go to the documentation of this file.
00001 /* RCPCC_HG16.H */
00002 
00003 #include <string.h>
00004 #include <stdio.h>
00005 #include <math.h>
00006 /* #include <floatingpoint.h> */
00007 #include <memory.h>
00008 
00009 /**********************************************************************/
00010 /* The following constants and variables describe the rcpcc code      */
00011 /*                                                                    */
00012 /* 16 state rate 1/4 Rate Compatible Punctured Convolutional Code     */
00013 /* g1(x)= 11001(MSB), g2(x)=10111  g3(x)= 11101  g4(x)= 11011         */
00014 /*                                                                    */
00015 /* puncturing patterns,         free distance    ACG                  */
00016 /*     To be filled in when we have time                              */
00017 /*  From Hagenhauer paper RCPC Codes and their Apps., in IEEE Trans.  */
00018 /*   on Comm., April 1988, pp. 389                                    */
00019 /**********************************************************************/
00020 
00021 #define RCPCCDIM 4
00022 #define CONSTRAINTLENGTH 5
00023 #define RATETYPES  25
00024 #define MAXPUNCTUREPERIOD 8
00025 #define TAILBITS 4
00026 
00027 static int gx[CONSTRAINTLENGTH][RCPCCDIM] = 
00028                 {{1,1,1,1},{1,0,1,1},{0,1,1,0},{0,1,0,1},{1,1,1,1}};
00029 
00030 static int px[RATETYPES][MAXPUNCTUREPERIOD][RCPCCDIM] =
00031 {
00032   {{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1}},
00033   {{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,0}},
00034   {{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,0},{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,0}},
00035   {{1,1,1,1},{1,1,1,1},{1,1,1,1},{1,1,1,0},{1,1,1,1},{1,1,1,0},{1,1,1,1},{1,1,1,0}},
00036   {{1,1,1,1},{1,1,1,0},{1,1,1,1},{1,1,1,0},{1,1,1,1},{1,1,1,0},{1,1,1,1},{1,1,1,0}},
00037   {{1,1,1,1},{1,1,1,0},{1,1,1,1},{1,1,1,0},{1,1,1,1},{1,1,1,0},{1,1,1,0},{1,1,1,0}},
00038   {{1,1,1,1},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,1},{1,1,1,0},{1,1,1,0},{1,1,1,0}},
00039   {{1,1,1,1},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0}},
00040   {{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0}},
00041   {{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,0,0}},
00042   {{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,0,0},{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,0,0}},
00043   {{1,1,1,0},{1,1,1,0},{1,1,1,0},{1,1,0,0},{1,1,1,0},{1,1,1,0},{1,1,0,0},{1,1,0,0}},
00044   {{1,1,1,0},{1,1,1,0},{1,1,0,0},{1,1,0,0},{1,1,1,0},{1,1,1,0},{1,1,0,0},{1,1,0,0}},
00045   {{1,1,1,0},{1,1,1,0},{1,1,0,0},{1,1,0,0},{1,1,1,0},{1,1,0,0},{1,1,0,0},{1,1,0,0}},
00046   {{1,1,1,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,1,0},{1,1,0,0},{1,1,0,0},{1,1,0,0}},
00047   {{1,1,1,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0}},
00048   {{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0}},
00049   {{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,0,0,0}},
00050   {{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,0,0,0},{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,0,0,0}},
00051   {{1,1,0,0},{1,1,0,0},{1,1,0,0},{1,0,0,0},{1,1,0,0},{1,0,0,0},{1,1,0,0},{1,0,0,0}},
00052   {{1,1,0,0},{1,0,0,0},{1,1,0,0},{1,0,0,0},{1,1,0,0},{1,0,0,0},{1,1,0,0},{1,0,0,0}},
00053   {{1,1,0,0},{1,0,0,0},{1,1,0,0},{1,0,0,0},{1,1,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0}},
00054   {{1,1,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,1,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0}},
00055   {{1,1,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0}},
00056   {{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0},{1,0,0,0}}
00057 };
00058 
00059 #define puncturePeriod 8
00060 
00061 /* End of rcpcc description */
00062 
00063 /* Trellis Description */
00064 
00065 #define STATES 16
00066 #define INPUTS 2
00067 #define OUTPUTS 16
00068 #define BRANCHES INPUTS
00069 #define TL 1000
00070 #define LARGENUMBER 1E10
00071 
00072 static int prevState[STATES][BRANCHES] =
00073 {{0,8},{0,8},{1,9},{1,9},{2,10},{2,10},{3,11},{3,11},
00074 {4,12},{4,12},{5,13},{5,13},{6,14},{6,14},{7,15},{7,15}
00075 };
00076 
00077 static int prevOutput[STATES][BRANCHES] =
00078 {{0,15},{15,0},{11,4},{4,11},{6,9},{9,6},{13,2},{2,13},
00079 {5,10},{10,5},{14,1},{1,14},{3,12},{12,3},{8,7},{7,8}
00080 };
00081 
00082 static double dsignal[OUTPUTS][RCPCCDIM] = 
00083 {
00084   {-1,-1,-1,-1},{-1,-1,-1,1},{-1,-1, 1,-1},{-1,-1, 1,1},{-1, 1,-1,-1},{-1, 1,-1,1},{-1, 1,1,-1},{-1,1,1,1},
00085   {1,-1,-1,-1},{1,-1,-1,1},{1,-1, 1,-1},{1,-1, 1,1},{1, 1,-1,-1},{1, 1,-1,1},{1, 1,1,-1},{1,1,1,1}
00086 };
00087 
00088 /* End of Trellis Description */
00089 

Generated on Sun Jul 16 16:27:45 2006 by  doxygen 1.3.9.1