#include<stdio.h>
#include "tqpsk.h"
void _qpsk(int n, char I[], short table[], char Q[], char in[]);
int error_flag = 0;
void (*f1)();
int cycle_count[10];
void main(int argc, char *argv[])
{
int i,j,n;
f1 = _qpsk;
// Test case 1:
n = 6;
cycle_count[0] = Compute_Cycle_Count(n,I,table,Q,in);
//This function inturn calls qpsk()
for( i = 0 ; i <24 ; i++)
{
if((I[i]!=I_exp[i]) || (Q[i]!=Q_exp[i]))
error_flag = error_flag | 1;
}
#ifdef PRINTF_SUPPORT
if(error_flag & 1)
printf("Test Case 1 failed\n");
else
printf("Test Case 1 passed\n");
#endif
printf("cycle_count[0]=%d\n",cycle_count[0]);
}
代码编译提示下面警告:
[Error ea5004] ".\dqpsk.asm":173 Syntax Error in :
_dqpsk.end;
syntax error is at or near text ';'.
Attempting error recovery by ignoring text until the ';'
[Informational ea1056] ".\dqpsk.asm":210 Preg read after write which requires 4 extra cycles
[Informational ea1056] ".\dqpsk.asm":221 Preg read after write which requires 4 extra cycles
Previous errors prevent assembly
Assembler totals: 1 error(s) and 0 warning(s)
Tool failed with exit/exception code: 1.
Build was unsuccessful.
不知道什么错误,下面是dqpsk.asm中报错位置的代码:
in_loop_start:
R1 = R0&R3; //Mask R0 to obtain the last two bits that form a
// symbol
R1 = R1 << 1 || R7.L = W[P1];
//Load the Constellation point from the table
R1 = R1+R2;
P1 = R1;
R7 = R7 >> 8 || B[P4++] = R7;
//Store the I component
in_loop_end:R0 = R0 >> 2 || B[P5++] = R7;
//Store the Q component
R0 = W[P2++] (Z); //Load the next word in the bitstream from mem.
R7.L = W[P1]; //Load the IQ components from the table
R7 = R7 >> 8 || B[P4++] = R7;
//Shift R7 so that the Q part is in last 8 bits ||
//Store the I component
out_loop_end: