Commit 7350475d authored by yilmazt's avatar yilmazt

DCI debug

parent 5b42e83d
...@@ -32,6 +32,8 @@ int main(int argc, char *argv[]) { ...@@ -32,6 +32,8 @@ int main(int argc, char *argv[]) {
double timeEncoderCumulative = 0, timeDecoderCumulative = 0; double timeEncoderCumulative = 0, timeDecoderCumulative = 0;
uint8_t aggregation_level; uint8_t aggregation_level;
uint32_t dci_pdu[4];
while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:")) != -1) while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:")) != -1)
switch (arguments) switch (arguments)
{ {
...@@ -105,8 +107,10 @@ int main(int argc, char *argv[]) { ...@@ -105,8 +107,10 @@ int main(int argc, char *argv[]) {
} }
fprintf(logFile,",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]\n"); fprintf(logFile,",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]\n");
uint8_t *testInput = malloc(sizeof(uint8_t) * testLength); //generate randomly //uint8_t *testInput = malloc(sizeof(uint8_t) * testLength); //generate randomly
uint8_t *encoderOutput = malloc(sizeof(uint8_t) * coderLength); //uint8_t *encoderOutput = malloc(sizeof(uint8_t) * coderLength);
uint32_t testInput[4], encoderOutput[4];
double *modulatedInput = malloc (sizeof(double) * coderLength); //channel input double *modulatedInput = malloc (sizeof(double) * coderLength); //channel input
double *channelOutput = malloc (sizeof(double) * coderLength); //add noise double *channelOutput = malloc (sizeof(double) * coderLength); //add noise
......
...@@ -142,6 +142,7 @@ printf("frequency_domain_assignment = %05d = %#010x\n" ...@@ -142,6 +142,7 @@ printf("frequency_domain_assignment = %05d = %#010x\n"
#endif #endif
// Freq domain assignment // Freq domain assignment
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) ); fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
printf("N_RB=%d & fsize=%d\n\n",N_RB,fsize);
for (int i=0; i<fsize; i++) for (int i=0; i<fsize; i++)
*dci_pdu |= ((pdu_rel15->frequency_domain_assignment>>(fsize-i-1))&1)<<pos++; *dci_pdu |= ((pdu_rel15->frequency_domain_assignment>>(fsize-i-1))&1)<<pos++;
// Time domain assignment // Time domain assignment
......
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