您的位置: OpenADSP社区论坛 -> Blackfin专区 -> 新手上路 -> 菜鸟求救
本帖共有617个阅读者
发表帖子 发表投票 回复主题
菜鸟求救
自信勉心(论坛新手)
自信勉心
头衔:社区公民
帮派:无帮无派
帖数:18
金钱:245
积分:25
注册时间:2013/12/27
楼主信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线
菜鸟求救
#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:

这家伙很懒,什么也没有留下!
等级:论坛新手 参考IP地址:*.*.*.*
2014/1/10 18:40:10
尊贵身份标志
andy(论坛版主)
andy
头衔:社区公民
帮派:无帮无派
帖数:2287
金钱:11132
积分:2263
注册时间:2011/6/8
1信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线
不懂汇编,看报错提示像是语法错误,你双击错误提示找到报错行,检查从“:”以后,到“;”之间的描述

这家伙很懒,什么也没有留下!
等级:论坛版主 参考IP地址:*.*.*.*
2014/1/10 21:27:05
自信勉心(论坛新手)
自信勉心
头衔:社区公民
帮派:无帮无派
帖数:18
金钱:245
积分:25
注册时间:2013/12/27
2信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线
可以以前同样的代码别人用的时候是没有报错的??

这家伙很懒,什么也没有留下!
等级:论坛新手 参考IP地址:*.*.*.*
2014/1/12 13:39:14
尊贵身份标志
andy(论坛版主)
andy
头衔:社区公民
帮派:无帮无派
帖数:2287
金钱:11132
积分:2263
注册时间:2011/6/8
3信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线
你看看你和他VDSP软件的版本,更新包版本,以及工程选项中的配置是否都一样

这家伙很懒,什么也没有留下!
等级:论坛版主 参考IP地址:*.*.*.*
2014/1/12 17:46:45
自信勉心(论坛新手)
自信勉心
头衔:社区公民
帮派:无帮无派
帖数:18
金钱:245
积分:25
注册时间:2013/12/27
4信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线
恩恩,谢谢,已经解决

这家伙很懒,什么也没有留下!
等级:论坛新手 参考IP地址:*.*.*.*
2014/1/13 11:06:36
Powered by OpenADSP Copyright © 2010 www.Openadsp.com. All rights reserved.159142 Call, 1 Queries, Processed in 0.031250 second(s),