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.

Why does the results not behave as what I expect?

Hi,

I debug a C55 routine, see below please.

218           ;max_diff(AC0, AC1, AC2, AC1) ;Compare AC0, AC1
219           ;||*AR4(T0) = lo(AC2), ;Store New_metric(0)&(8)
220           ; *AR4+ = hi(AC2)
210           MAXDIFF AC0, AC1, AC2, AC1
211           || MOV AC2, *mnew_ptr(m_index), *mnew_ptr+

Before executing line 211, the register and memory contents are:

I am thinking about "MOV AC2, *AR5(T0), *AR5+".

AR5=0X0010, T0=0X0008, AC2=0X000032004E

The address AR5(T0)=0x0018, memory at 0x0018 is: 036B

After I step, the contents is:

I do not see memory 036B changed. Why am I wrong?

A new question about the parallism of the MOV and MAXDIFF. As the AC2 reading, I think that it should use AC2 value before MAXDIFF executing, right?

The code I cite is from an application note downloaded from TI. I attach it here.

Regards,

6237.spra776a.zip

  • You are writing to a memory-mapped register.  You will get bizarre results if you attempt to read and write from that area of memory as if it were plain memory.  You should not place data there.  You need to modify your linker command file to place mnew_ptr somewhere else.

  • Actually, from looking at your executable file, you don't have any data allocated there.  This means that mnew_ptr is a stray or uninitialized pointer.  Please check that it has the correct value before executing this instruction.  This may be the result of stack overflow.  You may want to try increasing your stack size.

  • Hi,

    I do not understand why you mention "mnew_ptr", as it does not show in the pictures. I have increased stack size to 0x5000. The console window messages are uploaded in a txt file for reference. From the Viterbi_dec.asm file, mold_ptr and mnew_ptr are circular pointers, which are alias of AR4 and AR5.

    .asg AR0, m_ptr ;circular pointer base
    .asg AR1, sd_ptr ;linear pointer
    .asg AR2, trans_ptr ;linear pointer
    .asg AR3, output_ptr ;linear pointer
    .asg AR4, mold_ptr ;circular pointer
    .asg AR5, mnew_ptr ;circular pointer

    I do not see any big difference from stack size modification before. (I have increased stack size to 0xa000, the build will be error then). Do you think the stack size is OK now? Thanks.

  • I am new to C55. Is this DSP so different from C6000? I want to understand the algorithm in C55 first. Later I would like to write the algo in other DSP core.

    Thanks.

  • Hi,

    I increase stack size to 0x5000, see the picture below:

    Why can I see the stack size is much smaller in the memory subwindow:

    They are not the same thing?

    Second question, the beginning address of stack is 0x000274? It is not the end address? Thanks.

  • This is the building message output in the console window. I forgot to upload it in previous post. Thanks.

    **** Build of configuration Debug for project viterbi_C55 ****
    
    C:\ti\ccsv5\utils\bin\gmake -k all 
    'Building file: J:/C55_Viterbi/Viterbi_t.c'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -g --include_path="C:/ti/ccsv5/tools/compiler/c5500/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.1/C5500/csl/include" --define="_DEBUG" --quiet --display_error_number --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" --preproc_with_compile --preproc_dependency="Viterbi_t.pp"  "J:/C55_Viterbi/Viterbi_t.c"
    'Finished building: J:/C55_Viterbi/Viterbi_t.c'
    ' '
    'Building file: J:/C55_Viterbi/viterbi_dec.asm'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -g --include_path="C:/ti/ccsv5/tools/compiler/c5500/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.1/C5500/csl/include" --define="_DEBUG" --quiet --display_error_number --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" --preproc_with_compile --preproc_dependency="viterbi_dec.pp"  "J:/C55_Viterbi/viterbi_dec.asm"
    "J:\C55_Viterbi\viterbi_dec.asm", REMARK   at line 118: [R5601] MMR writes to
                                                                    ST0 and ST2 are
                                                                    not pipeline
                                                                    protected
                                                                    against
                                                                    interrupts (see
                                                                    the C55x
                                                                    silicon
                                                                    exceptions
                                                                    errata;
                                                                    Advisory
                                                                    CPU_75)
    	     MOV #0, mmap(ST0_55)			;All fields cleared (OVx, C, TCx).
    
    "J:\C55_Viterbi\viterbi_dec.asm", REMARK   at line 155: [R5601] MMR writes to
                                                                    ST0 and ST2 are
                                                                    not pipeline
                                                                    protected
                                                                    against
                                                                    interrupts (see
                                                                    the C55x
                                                                    silicon
                                                                    exceptions
                                                                    errata;
                                                                    Advisory
                                                                    CPU_75)
    		OR	#ST2mask, mmap(ST2_55)	;config circ/linear pointers)	                   
    
    "J:\C55_Viterbi\viterbi_dec.asm", REMARK   at line 357: [R5601] MMR writes to
                                                                    ST0 and ST2 are
                                                                    not pipeline
                                                                    protected
                                                                    against
                                                                    interrupts (see
                                                                    the C55x
                                                                    silicon
                                                                    exceptions
                                                                    errata;
                                                                    Advisory
                                                                    CPU_75)
    	    AND	#0FF00h, mmap(ST2_55)	    
    
    "J:\C55_Viterbi\viterbi_dec.asm", REMARK   at line 385: [R5688] A localrepeat
                                                                    may be
                                                                    corrupted when
                                                                    C54CM == 1 (see
                                                                    the C55x
                                                                    silicon
                                                                    exceptions
                                                                    errata;
                                                                    Advisory
                                                                    CPU_85)
    	 ||    RPTBLOCAL outer_loop; port of ||RPTBLOCAL outer_loop
    
    "J:\C55_Viterbi\viterbi_dec.asm", REMARK   at line 388: [R5688] A localrepeat
                                                                    may be
                                                                    corrupted when
                                                                    C54CM == 1 (see
                                                                    the C55x
                                                                    silicon
                                                                    exceptions
                                                                    errata;
                                                                    Advisory
                                                                    CPU_85)
    	        RPTBLOCAL inner_loop; port of RPTBLOCAL inner_loop
    
    "J:\C55_Viterbi\viterbi_dec.asm", REMARK   at line 411: [R5682] This outer loop
                                                                    contains a
                                                                    nested
                                                                    localrepeat
                                                                    that may cause
                                                                    execution to
                                                                    terminate if an
                                                                    iteration of
                                                                    the nested
                                                                    localrepeat is
                                                                    interrupted;
                                                                    (see the C55x
                                                                    silicon
                                                                    exceptions
                                                                    errata;
                                                                    Advisory
                                                                    CPU_116)
    		}
    
    "J:\C55_Viterbi\viterbi_dec.asm", REMARK   at line 419: [R5601] MMR writes to
                                                                    ST0 and ST2 are
                                                                    not pipeline
                                                                    protected
                                                                    against
                                                                    interrupts (see
                                                                    the C55x
                                                                    silicon
                                                                    exceptions
                                                                    errata;
                                                                    Advisory
                                                                    CPU_75)
    		AND	#0FE00h, mmap(ST2_55)	;clear CDPLC and AR[7-0]LC
    
    'Finished building: J:/C55_Viterbi/viterbi_dec.asm'
    ' '
    'Building file: J:/C55_Viterbi/viterbi_enc.asm'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -g --include_path="C:/ti/ccsv5/tools/compiler/c5500/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.1/C5500/csl/include" --define="_DEBUG" --quiet --display_error_number --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" --preproc_with_compile --preproc_dependency="viterbi_enc.pp"  "J:/C55_Viterbi/viterbi_enc.asm"
    "J:\C55_Viterbi\viterbi_enc.asm", REMARK   at line 86: [R5688] A localrepeat may
                                                                   be corrupted
                                                                   when C54CM == 1
                                                                   (see the C55x
                                                                   silicon
                                                                   exceptions
                                                                   errata; Advisory
                                                                   CPU_85)
    	           rptblocal encode_end									; port of rptblocal encode_end                  
    
    'Finished building: J:/C55_Viterbi/viterbi_enc.asm'
    ' '
    'Building file: J:/C55_Viterbi/viterbi_upck.asm'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -g --include_path="C:/ti/ccsv5/tools/compiler/c5500/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.1/C5500/csl/include" --define="_DEBUG" --quiet --display_error_number --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" --preproc_with_compile --preproc_dependency="viterbi_upck.pp"  "J:/C55_Viterbi/viterbi_upck.asm"
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 99: [R5688] A localrepeat
                                                                    may be
                                                                    corrupted when
                                                                    C54CM == 1 (see
                                                                    the C55x
                                                                    silicon
                                                                    exceptions
                                                                    errata;
                                                                    Advisory
                                                                    CPU_85)
    	 ||      rptblocal frame_loop; port of ||rptblocal frame_loop
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 103: [R5688] A localrepeat
                                                                     may be
                                                                     corrupted when
                                                                     C54CM == 1
                                                                     (see the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_85)
    	 ||	       rptblocal wordg0_loop; port of || rptblocal wordg0_loop
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 111: [R5671] If an interrupt
                                                                     is asserted
                                                                     between this
                                                                     conditional
                                                                     execute
                                                                     instruction
                                                                     and the next
                                                                     instruction
                                                                     (to be
                                                                     executed based
                                                                     on the
                                                                     conditional's
                                                                     result), the
                                                                     next
                                                                     instruction
                                                                     may get
                                                                     executed
                                                                     regardless of
                                                                     the result of
                                                                     the
                                                                     conditional in
                                                                     this
                                                                     instruction;
                                                                     be sure that
                                                                     interrupts are
                                                                     not active or
                                                                     conditionalize
                                                                     in the
                                                                     AD_unit; (see
                                                                     the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_93)
    	           XCCPART check2, ac1 != #0
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 117: [R5573] Any BKxx and
                                                                     BSAxx updates
                                                                     are not
                                                                     pipline
                                                                     protected
                                                                     against MAR
                                                                     operations
                                                                     within 5
                                                                     cycles (see
                                                                     line 112) (see
                                                                     the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_43)
    					 ||amar *(g0_ptr+t0)
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 121: [R5688] A localrepeat
                                                                     may be
                                                                     corrupted when
                                                                     C54CM == 1
                                                                     (see the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_85)
    	 ||	       rptblocal wordg1_loop; port of || rptblocal wordg1_loop
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 129: [R5671] If an interrupt
                                                                     is asserted
                                                                     between this
                                                                     conditional
                                                                     execute
                                                                     instruction
                                                                     and the next
                                                                     instruction
                                                                     (to be
                                                                     executed based
                                                                     on the
                                                                     conditional's
                                                                     result), the
                                                                     next
                                                                     instruction
                                                                     may get
                                                                     executed
                                                                     regardless of
                                                                     the result of
                                                                     the
                                                                     conditional in
                                                                     this
                                                                     instruction;
                                                                     be sure that
                                                                     interrupts are
                                                                     not active or
                                                                     conditionalize
                                                                     in the
                                                                     AD_unit; (see
                                                                     the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_93)
    	           XCCPART check4, ac1!= #0
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 133: [R5573] Any BKxx and
                                                                     BSAxx updates
                                                                     are not
                                                                     pipline
                                                                     protected
                                                                     against MAR
                                                                     operations
                                                                     within 5
                                                                     cycles (see
                                                                     line 130) (see
                                                                     the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_43)
    				  ||amar *(g1_ptr+t0)
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 134: [R5682] This outer loop
                                                                     contains a
                                                                     nested
                                                                     localrepeat
                                                                     that may cause
                                                                     execution to
                                                                     terminate if
                                                                     an iteration
                                                                     of the nested
                                                                     localrepeat is
                                                                     interrupted;
                                                                     (see the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_116)
    		}
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 143: [R5688] A localrepeat
                                                                     may be
                                                                     corrupted when
                                                                     C54CM == 1
                                                                     (see the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_85)
    		     rptblocal last_wordg0_loop; port of rptblocal last_wordg0_loop
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 151: [R5671] If an interrupt
                                                                     is asserted
                                                                     between this
                                                                     conditional
                                                                     execute
                                                                     instruction
                                                                     and the next
                                                                     instruction
                                                                     (to be
                                                                     executed based
                                                                     on the
                                                                     conditional's
                                                                     result), the
                                                                     next
                                                                     instruction
                                                                     may get
                                                                     executed
                                                                     regardless of
                                                                     the result of
                                                                     the
                                                                     conditional in
                                                                     this
                                                                     instruction;
                                                                     be sure that
                                                                     interrupts are
                                                                     not active or
                                                                     conditionalize
                                                                     in the
                                                                     AD_unit; (see
                                                                     the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_93)
    	           XCCPART check6, ac1 != #0
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 156: [R5573] Any BKxx and
                                                                     BSAxx updates
                                                                     are not
                                                                     pipline
                                                                     protected
                                                                     against MAR
                                                                     operations
                                                                     within 5
                                                                     cycles (see
                                                                     line 153) (see
                                                                     the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_43)
    					 ||amar *(g0_ptr+t0)
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 160: [R5688] A localrepeat
                                                                     may be
                                                                     corrupted when
                                                                     C54CM == 1
                                                                     (see the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_85)
    		     rptblocal last_wordg1_loop; port of rptblocal last_wordg1_loop
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 168: [R5671] If an interrupt
                                                                     is asserted
                                                                     between this
                                                                     conditional
                                                                     execute
                                                                     instruction
                                                                     and the next
                                                                     instruction
                                                                     (to be
                                                                     executed based
                                                                     on the
                                                                     conditional's
                                                                     result), the
                                                                     next
                                                                     instruction
                                                                     may get
                                                                     executed
                                                                     regardless of
                                                                     the result of
                                                                     the
                                                                     conditional in
                                                                     this
                                                                     instruction;
                                                                     be sure that
                                                                     interrupts are
                                                                     not active or
                                                                     conditionalize
                                                                     in the
                                                                     AD_unit; (see
                                                                     the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_93)
    	           XCCPART check8, ac1 != #0
    
    "J:\C55_Viterbi\viterbi_upck.asm", REMARK   at line 173: [R5573] Any BKxx and
                                                                     BSAxx updates
                                                                     are not
                                                                     pipline
                                                                     protected
                                                                     against MAR
                                                                     operations
                                                                     within 5
                                                                     cycles (see
                                                                     line 170) (see
                                                                     the C55x
                                                                     silicon
                                                                     exceptions
                                                                     errata;
                                                                     Advisory
                                                                     CPU_43)
    	                  ||amar *(g1_ptr+t0)
    
    'Finished building: J:/C55_Viterbi/viterbi_upck.asm'
    ' '
    'Building target: J:/C55_Viterbi/viterbi_C55/viterbi_C55/../../viterbi_C55/Debug/viterbi_C55.out'
    'Invoking: C5500 Linker'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -g --define="_DEBUG" --quiet --display_error_number --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" -z -m"viterbi_C55.map" --stack_size=5000 -i"C:/ti/ccsv5/tools/compiler/c5500/lib" -i"C:/ti/ccsv5/tools/compiler/c5500/include" -i"J:/C55_Viterbi/viterbi_C55/viterbi_C55" -i"J:/C55_Viterbi/viterbi_C55/viterbi_C55/../../viterbi_C55" -i"C:/CCSTUD~1.1/C5500/csl/lib" --reread_libs --display_error_number --warn_sections --rom_model -o "J:/C55_Viterbi/viterbi_C55/viterbi_C55/../../viterbi_C55/Debug/viterbi_C55.out"  "C:/temp_XP/C55_Viterbi/viterbi_C55/Debug/viterbi_upck.obj" "C:/temp_XP/C55_Viterbi/viterbi_C55/Debug/viterbi_enc.obj" "C:/temp_XP/C55_Viterbi/viterbi_C55/Debug/viterbi_dec.obj" "C:/temp_XP/C55_Viterbi/viterbi_C55/Debug/Viterbi_t.obj" -l"rts55.lib" "J:/C55_Viterbi/55x.cmd" 
    warning #10210-D: creating ".sysstack" section with default size of 0x3e8; use
       the -sysstack option to change the default size
    'Finished building target: J:/C55_Viterbi/viterbi_C55/viterbi_C55/../../viterbi_C55/Debug/viterbi_C55.out'
    ' '
    
    **** Build Finished ****

  • Yes, it is very different.

  • Somehow, circular buffering is not being set up correctly.  I suspect that the control registers (BKxx, BSAxx, etc) are not being written correctly before this code starts.  My evidence for this is the fact that your screenshot shows address 0x18 being written, which is a plausible result of BSAxx not being set properly, or for circular mode not being turned on.

    The silicon advisory remarks in your log file are alarming.  Some of them directly reference BKxx and BSAxx.  Perhaps you are running afoul of a silicon exception?  You need to read and understand the silicon advisory for each of the remarks you are getting.

  • Hi,

    Thanks for the valuable reply.

    I see a stack definition in the 55x.cmd file. I just feel bizarre. It sets so small stack(0x200). It is a typo? I also attach 55x.cmd file in this post. 


    -stack 0x200

    MEMORY
    {
    PAGE 0:

    MMR : origin = 0000000h, length = 00000c0h
    SPRAM : origin = 00000c0h, length = 0000040

  • Hi,

    I do not know why the file does not upload in last post. I do it again now.

    2821.55x.zip

  • The silicon advisory remarks in your log file are alarming.  Some of them directly reference BKxx and BSAxx.  Perhaps you are running afoul of a silicon exception?  You need to read and understand the silicon advisory for each of the remarks you are getting.


    Perhaps you are running afoul of a silicon exception?

    What I get is all in the 8156.pip.txt file.


    How should BKxx and BSAxx be used? Is there an example?

    Thanks.


  • As far as examples, I don't know.  For documentation, see:

    Guidelines before posting http://e2e.ti.com/support/dsp/tms320c5000_power-efficient_dsps/f/109/t/85335.aspx

    C55x v3.x CPU Reference Guide http://www.ti.com/lit/ug/swpu073e/swpu073e.pdf (especially section 2.6 "Registers Used to Address Data Space and I/O Space")

    Also see the appropriate silicon errata for the specific device you are using.

  • Hi,

    I find that the warning is because the device setting is not correct. Now, I set it to C5515. The build messages at console is attached for check.

    **** Clean-only build of configuration Debug for project viterbi_C55 ****
    
    C:\ti\ccsv5\utils\bin\gmake -k clean 
    DEL /F  "J:\C55_Viterbi\viterbi_C55\Debug\viterbi_C55.out"
    Could Not Find J:\C55_Viterbi\viterbi_C55\Debug\viterbi_C55.out
    DEL /F "Viterbi_t.pp" 
    Could Not Find J:\C55_Viterbi\viterbi_C55\viterbi_C55\Debug\Viterbi_t.pp
    DEL /F "C:\temp_XP\C55_Viterbi\viterbi_C55\Debug\Viterbi_t.obj" "C:\temp_XP\C55_Viterbi\viterbi_C55\Debug\viterbi_dec.obj" "C:\temp_XP\C55_Viterbi\viterbi_C55\Debug\viterbi_enc.obj" "C:\temp_XP\C55_Viterbi\viterbi_C55\Debug\viterbi_upck.obj" 
    Could Not Find C:\temp_XP\C55_Viterbi\viterbi_C55\Debug\Viterbi_t.obj
    DEL /F "viterbi_dec.pp" "viterbi_enc.pp" "viterbi_upck.pp" 
    Could Not Find J:\C55_Viterbi\viterbi_C55\viterbi_C55\Debug\viterbi_dec.pp
    'Finished clean'
    ' '
    
    **** Build Finished ****
    
    **** Build of configuration Debug for project viterbi_C55 ****
    
    C:\ti\ccsv5\utils\bin\gmake -k all 
    'Building file: J:/C55_Viterbi/Viterbi_t.c'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -v5515 --memory_model=large -g --include_path="C:/ti/ccsv5/tools/compiler/c5500/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.1/C5500/csl/include" --define="_DEBUG" --define=c5515 --quiet --display_error_number --ptrdiff_size=16 --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" --preproc_with_compile --preproc_dependency="Viterbi_t.pp"  "J:/C55_Viterbi/Viterbi_t.c"
    'Finished building: J:/C55_Viterbi/Viterbi_t.c'
    ' '
    'Building file: J:/C55_Viterbi/viterbi_dec.asm'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -v5515 --memory_model=large -g --include_path="C:/ti/ccsv5/tools/compiler/c5500/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.1/C5500/csl/include" --define="_DEBUG" --define=c5515 --quiet --display_error_number --ptrdiff_size=16 --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" --preproc_with_compile --preproc_dependency="viterbi_dec.pp"  "J:/C55_Viterbi/viterbi_dec.asm"
    'Finished building: J:/C55_Viterbi/viterbi_dec.asm'
    ' '
    'Building file: J:/C55_Viterbi/viterbi_enc.asm'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -v5515 --memory_model=large -g --include_path="C:/ti/ccsv5/tools/compiler/c5500/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.1/C5500/csl/include" --define="_DEBUG" --define=c5515 --quiet --display_error_number --ptrdiff_size=16 --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" --preproc_with_compile --preproc_dependency="viterbi_enc.pp"  "J:/C55_Viterbi/viterbi_enc.asm"
    'Finished building: J:/C55_Viterbi/viterbi_enc.asm'
    ' '
    'Building file: J:/C55_Viterbi/viterbi_upck.asm'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -v5515 --memory_model=large -g --include_path="C:/ti/ccsv5/tools/compiler/c5500/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.1/C5500/csl/include" --define="_DEBUG" --define=c5515 --quiet --display_error_number --ptrdiff_size=16 --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" --preproc_with_compile --preproc_dependency="viterbi_upck.pp"  "J:/C55_Viterbi/viterbi_upck.asm"
    'Finished building: J:/C55_Viterbi/viterbi_upck.asm'
    ' '
    'Building target: J:/C55_Viterbi/viterbi_C55/viterbi_C55/../../viterbi_C55/Debug/viterbi_C55.out'
    'Invoking: C5500 Linker'
    "C:/ti/ccsv5/tools/compiler/c5500/bin/cl55" -v5515 --memory_model=large -g --define="_DEBUG" --define=c5515 --quiet --display_error_number --ptrdiff_size=16 --obj_directory="C:/temp_XP/C55_Viterbi/viterbi_C55/Debug" -z -m"viterbi_C55.map" --stack_size=0x200 --heap_size=0x400 -i"C:/ti/ccsv5/tools/compiler/c5500/lib" -i"C:/ti/ccsv5/tools/compiler/c5500/include" -i"J:/C55_Viterbi/viterbi_C55/viterbi_C55" -i"J:/C55_Viterbi/viterbi_C55/viterbi_C55/../../viterbi_C55" -i"C:/CCSTUD~1.1/C5500/csl/lib" --reread_libs --display_error_number --warn_sections --rom_model --sys_stacksize=0x200 -o "J:/C55_Viterbi/viterbi_C55/viterbi_C55/../../viterbi_C55/Debug/viterbi_C55.out"  "C:/temp_XP/C55_Viterbi/viterbi_C55/Debug/viterbi_upck.obj" "C:/temp_XP/C55_Viterbi/viterbi_C55/Debug/viterbi_enc.obj" "C:/temp_XP/C55_Viterbi/viterbi_C55/Debug/viterbi_dec.obj" "C:/temp_XP/C55_Viterbi/viterbi_C55/Debug/Viterbi_t.obj" -l"libc.a" "J:/C55_Viterbi/55x.cmd" 
    'Finished building target: J:/C55_Viterbi/viterbi_C55/viterbi_C55/../../viterbi_C55/Debug/viterbi_C55.out'
    ' '
    
    **** Build Finished ****

    Although the build has no error, the result is not correct yet.

    After the same line in viterbi_dec.asm, memory 0x18 is still modified. Do you think it is wrong or not?

    Thanks again.

  • I looked at this for a while and I suspect that the problem isn't what we though it was.  You have the memory view open to address 0, expecting to see the results of the algorithm write to that location, based on the contents of XAR5 and T0, which are both relatively close to zero.  However, that is bogus.  Because XAR5 is being used in a circular fashion, the value of the BSA45 register is added to the address.  Please set the memory view to the address contained in BSA45 at the point of the MAXDIFF instruction and try again.  I believe you will see the block of 32 values at address 0x1e01 change.

  • Thank you for the analysis. I have the beginning memory contents at: 0x4000

    I am not sure 0x1e01 is the content I got:

    Regards,

  • Well, my guess about the exact address was wrong, but based on the value of BSA45, XAR5, and T0, that result is correct.

    So, what problem are you experiencing?

  • The result is still not I expected. However, there is no exception error or some obvious problems now. I debug the algo step by step.

    Thanks.