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.

Purepath IDE

A customer wrote their own sine gen in the Purepath IDE.  However, he's having some trouble with the purepath IDE compiling into something the GDE can use.  Specifically, he's having trouble instantiating an .asmx file into a .asm file he can simulate and build into a graphical block.  It seems to ignore %%define blocks as required in the manual. Any help is appreciated.

Thx,

Mark

  • The template instantiator will not ignore the %%define(prop,val) as long as they are defined before the property is dereferenced.

    Please provide further details.

  • Can you provide a example,please!

    I try to debug "add.asmx" in the IDE and add to "%%define(prop, val)" in the top of code, but Output Window appear to the following error.

    why???

    Saving file..
    Error: D:\Program Files\Texas Instruments Inc\PurePath Studio\ComponentCache\Add_TI_v2\Add.asmx(1) : undefined property : 'InstanceId'
    Summary: 1 Error(s)

    --Absolute Value %%prop(InstanceId) DSP Assembly Code
    --Copyright(c) Texas Instruments Incorporated, 2006-2009
    --PurePath Studio TAS3xxx Graphical Development Environment
    --Last Update: $Date: 2009/05/28 19:39:57 $ by $Author: dabuan $
    ##Texas Instruments CVS Revision $Revision: 2.1 $
    %%define(InstanceId, 1)
    --%%prop(InstanceId) Resource Requirements
    -- DSP Data RAM Used      = 2
    -- DSP Coef RAM Used      = 0
    -- DSP Program RAM Used   = 5
    -- DSP Cycle Count        = 5

    --Declare Input Ports for %%prop(InstanceId)
    .port %%prop(InstanceId).Ch1_In %%prop(InstanceId)_In            ##Channel 1 Input Port
    .data %%prop(InstanceId)_In


    --Declare Output Ports for %%prop(InstanceId)
    .port %%prop(InstanceId).Ch1_Out %%prop(InstanceId)_Out          ##Channel 1 Output Port
    .data %%prop(InstanceId)_Out

    -- Coefficients
    .coef %%prop(InstanceId)_Addend =%%prop(Addend)F                 ##Coefficient Value to Add
     

    --%%prop(InstanceId) DSP Assembly Processing Code Start
    NOP|         CLRACC|                 LD(%%prop(InstanceId)_In,L)|    NOP|                                NOP
    THRU(L)|     NOP|                    NOP|                            LD(%%prop(InstanceId)_Addend,L)|    NOP
    THRU(L)|     ADD(ACC,LR,NONE,ACC)|   NOP|                            NOP|                                NOP
    NOP|         ADD(ACC,LR,NONE,B)|     NOP|                            NOP|                                NOP
    NOP|         NOP|                    NOP|                            NOP|                                ST(B,DATA,%%prop(InstanceId)_Out)
    NOP|         NOP|                    NOP|                            NOP|                                NOP

    --End of [Component Name] %%prop(InstanceId) DSP Assembly Code

  • Anybody help me?

    please!!!

  • Mark,

         This is simple. As you can see in line 1 of the code (I added lines for reference) there is a %%prop(InstanceId) definition in the comments. The IDE tries to instantiate -any- thing with the %%prop() definition, including comments.

         What you are seeing is simply an error message generated by the IDE saying that the property 'InstanceId' is not defined when the instantiator reaches the %%prop() definition in Line 1 of the code.

        Simply moving Line 6 in front of Line 1 will resolve this issue, and in general, property definitions should be done as the very first lines in the assembly code templates.

    [Line 1]   --Absolute Value %%prop(InstanceId) DSP Assembly Code
    [Line 2]   --Copyright(c) Texas Instruments Incorporated, 2006-2009
    [Line 3]-   -PurePath Studio TAS3xxx Graphical Development Environment
    [Line 4]   --Last Update: $Date: 2009/05/28 19:39:57 $ by $Author: dabuan $
    [Line 5]   ##Texas Instruments CVS Revision $Revision: 2.1 $
    [Line 6]   %%define(InstanceId, Tone)
    [Line 7]   --%%prop(InstanceId) Resource Requirements
    [Line 8]   -- DSP Data RAM Used      = 2
    [Line 9]   -- DSP Coef RAM Used      = 0
    [Line 10] -- DSP Program RAM Used   = 5
    [Line 11] -- DSP Cycle Count        = 5