This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IQmathTables问题



1.请问在程序出现的_IQsinPU,_IQcosPU,_IQcos(A),_IQsin(A)这些IQ函数,是从IQmathTables查表吗?

2.cmd文件中,IQmathTables     : > IQTABLES,   PAGE = 0, TYPE = NOLOAD,

   IQmathTables是在boot ROM中的,如果我用下面这样表示

    IQmathTables : LOAD =IQTABLES,
                              RUN = RAML0,
                              LOAD_START(_ IQmathTablesLoadStart),
                              LOAD_END(_ IQmathTablesLoadEnd),
                              RUN_START(_ IQmathTablesRunStart),
                              LOAD_SIZE(_ IQmathTablesLoadSize),
                              PAGE = 0

   拷贝到RAM 中也可以吧,而且查表更快吧,上面这段话语法没问题吧?

  • 请看红色回答部分:


    1.请问在程序出现的_IQsinPU,_IQcosPU,_IQcos(A),_IQsin(A)这些IQ函数,是从IQmathTables查表吗?

    是的,从IQmatch库中得到。

    2.cmd文件中,IQmathTables     : > IQTABLES,   PAGE = 0, TYPE = NOLOAD,

       IQmathTables是在boot ROM中的,如果我用下面这样表示

        IQmathTables : LOAD =IQTABLES,
                                  RUN = RAML0,
                                  LOAD_START(_ IQmathTablesLoadStart),
                                  LOAD_END(_ IQmathTablesLoadEnd),
                                  RUN_START(_ IQmathTablesRunStart),
                                  LOAD_SIZE(_ IQmathTablesLoadSize),
                                  PAGE = 0

       拷贝到RAM 中也可以吧,而且查表更快吧,上面这段话语法没问题吧?

    一般如以下方式copy到RAM中运行。: 

    ramfuncs : LOAD = FLASHD,
    RUN = RAML3,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    PAGE = 0
    {
    --library=Solar_Lib_IQ.lib<CNTL_2P2Z_IQ_ASM.obj>
    --library=Solar_Lib_IQ.lib<CNTL_3P3Z_IQ_ASM.obj>
    --library=Solar_Lib_IQ.lib<NOTCH_FLTR_IQ_ASM.obj>
    --library=IQmath.lib<IQ24div.obj>
    --library=IQmath.lib<IQ23sin.obj>
    --library=IQmath.lib<IQ23cos.obj>
    --library=IQmath.lib<IQ15rsmpy.obj>
    --library=IQmath.lib<IQ15rmpy.obj>
    --library=IQmath.lib<IQ15div.obj>
    --library=IQmath.lib<IQ4div.obj>
    --library=IQmath.lib<IQ15sqrt.obj>
    --library=IQmath.lib<IQ15isqrt.obj>
    }

    因为IQmath库很大,所以全部copy到RAM中会导致RAM不够,只需要用以上的方法copy你用到的函数就可以了。

  • 您好,我看IQmath文档介绍中有如下的话

    是说,IQmath.lib中,也包含了所有查的表,也就说即使有的芯片bootbom里没有look-up tables,也可以从IQmath.lib中查到表是吧?