From: DSP Hotline

Subject: 320C40 HLL Debugger Bug List

-------------------------------------------------------------------------------
* RELEASE 2.20 BUGLIST                                                        *
* Update - 11/18/94                                                           *
*                                                                             *
* This file contains a list of bugs in the release 2.20 of the 320C40         *
* HLL Debugger                                                                *
*                                                                             *
* All bugs will be fixed in the next production release unless othwerwise     *
* indicated. There will sometimes be references to internal versions in       *
* this list. For that reason you must always refer to the release status      *
* information (published every two weeks) to verify the availability of a     *
* specific revision.                                                          *
*                                                                             *
-------------------------------------------------------------------------------


				Part 1

HLL
-------------------------------------------------------------------------------

4832     V2.01  will fix next release
  NOTE: This is a problem under OS/2 in full screen mode only!!
There is a problem when using 43 line mode in the emulator when operating
in full screen mode under OS/2.  If you change video mode from 25 line
to 43 line mode, then only the first 25 lines will be shown.  If you switch
from 50 line mode to 43 line mode, then the last 7 lines of the 50 line
mode are left behind unchanged.


Workaround:
1. Run in OS/2 window
2. Run in either 25 or 50 line mode.


5113     V2.01  will fix in V2.02
  If you have a structure defined and you use the eval command to assign
a value to a particular structure member using the following syntax:


       struct _stag{
              int a,b,c,d;
        } test_stru;


       command:  eval (( test_stru *)0x89)->a = 2
           eval (( test_stru *)0x89)->d = 5

The debugger issues a message - structure member not found.


5522     V(current)  will fix next release
  The Sun versions of the debuggers, emulators and simulators, do not support    
the "system", "cd" or "dir" commands.


5577     V2.30  will fix next release
  An alias command with a string longer than 76 characters causes problems.
For example the following take file:

? pc=0
alias l,"echo This is simply a very, very, very long alias nf more than 76 
 characters."
echo Error here.
? pc=1
alias
 
produces the following in the command window :
 
         0x00000000
        Error here.
        Invalid argument
          Alias          Command
        --------         -------
        L            --> echo This is simply a very, very, very long alias of m
ore than 76 chara
         --- Emulator Memory error
 
***There are two bugs:  first, alias command doesn't get the entire
line, only 80 characters, and yet doesn't complain.  And second, once this
"bad" alias occurs you can no longer use E, eval, ?, reset, nor access memory
with the debugger.  Thus ? pc=1 gives an "Invalid argument" error and then
when the take file is complete and the debugger tries to update the screen,
" --- Emulator memory error".  This second problem, at least, goes away if you
use an alias of less than 77 characters.


5634     V2.20  will fix next release
  The additional feature on page 13-5 of the C40 C Source
Debugger User's Guide is not working.  Using the watch
command to watch variable in another file (FILENAME.VARIABLE)
and it does not work unless the static variable is also a 
global. Using XDS ver. 2.2.

***Verified that the problem occurs in the simulator
   and the XDS debugger.  Plans are to fix by the 
   next release.


XDS
-------------------------------------------------------------------------------

4488     V2.01  will fix next release
  A symbol lenght of greater than 20 chars may cause your system to crash.


5713     V2.20  will fix next release
  The screen colors do not appear to be able to be saved
in a config file. SCONFIG seems to hang the system.

Process:
Debugger>>> SSAVE INIT.CLR         /* Saves screen configuration  */
Debugger>>> QUIT                   /* Exits the debugger          */
DOS     >>> EMU4x                  /* Restarts the debugger       */
           /* The screen configuration is not the one just saved. */

***Contrary to what the C Source Debugger User's Guide says, the following
   instance does not save the init.clr file to the current directory:  if 
   there is no init.clr in the current directory, but one does exist in 
   the D_DIR path.  This is a bug in the executable.

   If the executable is changed to comply with the documentation the
   following two problems become non-existant:  1) if the init.clr only
   exists in D_DIR with write protect, no error message is given when
   SSAVE is unsuccessful; 2) if the init.clr only exists in D_DIR without
   write protect, the write does not take place in the current directory
   but does in the D_DIR directory without notification/permission.

   NOTE:  THIS HAS BEEN CORRECTED IN VERSION 2.30!

   WORK AROUND/SOLUTION: 
   =====================
   As a work around on versions not corrected, specify the exact path
   were the init.clr file is to be written (i.e. "ssave ./init.clr" for 
   current path).

***SCONFIG is a known problem (PTR#5325) and is corrected in version 2.3.


5733     V2.30  will fix next release
  Have custom c40 target system.

Getting problems looking at internal rom - getting
timeout error.  Found that this depends on external
ready, which it should not.


EMULATOR
-------------------------------------------------------------------------------

5325     V2.20  will fix next release
  The "SCONFIG" command hangs the debuggger.                         

Workaround: Create an init.clr file - but switching config on
         the fly is not supported.


5348     V2.20  will fix next release
  If EMU40 is executed twice from one command prompt, the second 
one's mouse fails.

Solution: Install the OS/2 2.0 service pack


5354     V2.20  will fix next release
  On SUN workstation, emu4x using -p 0 fails, attempts to open device at sd4.


Workaround:  Use a different driver other than sd0.


5357     V2.20  will fix next release
  Note: This is a problem on SUN & PC under SunOS and OS/2

The board configuration path and filename specified after the -f option
is limited to 32 characters including the '\0' end-of-string character.
Longer names are truncated.

This is especially a problem when the OS expands names as in ~user.


Workaround: Don't use long names.


5361     V2.20  will fix next release
  ma command lengths are limited to 0x07FFFFFF. Anything larger will cause
problems.


Workaround: Break the range into smaller chunks.


5362     V2.20  will fix next release
  The manual (TMS320C4x C Source Debugger Guide rev A) incorrectly states
that the MA command supports memory type IPORT, OPORT, & IOPORT for
simulator only, but these types are also supported by the debugger.
The I/O Ports simply don't cache under the emulator, as opposed to 
being connected to a file as they are for the simulator.


5363     V2.20  will fix next release
  The debugger may incorrectly calculate the number/size of the packets 
required to perform a transfer across the SCSI bus in the following 
specific circumstances. This problem will affect both the memory save, MS, 
and LOAD commands.  If the length specified in the MS command, or the 
length of the loaded portion of the file given in the LOAD command is such 
that (length%500)%128>116, then the proper number of WORDS will not be 
saved/loaded. 


Workaround: For MS command - 

         1). break the range of memory specified
             into sizes of appropriate lengths.
          That is  (length%500)%128<=116.

         For LOAD command - 
         
            2). Check the link map from the link of the object file,
          for the size of all loaded (UNITIALIZED sections are not
          loaded) sections to make sure that the section lengths 
          are in bounds, i.e. (length%500)%128>116. 
          
          If the section length exceeds this figure then pad the 
          section to the next 128 word boundary. This may be done 
          by altering the link command file Sections directive for the 
          corresponding "bad" section.

          i.e.

          badsec : { *(badsec)
                  .+= "pad length" ;   } ....


5371     V2.20  will fix next release
  The debugger does not correctly disassemble ADDF3, MPYF3, or SUBF3 
type 1 instructions when R8, R9, R10, or R11 are used as operands.


Solution/Workaround:  The incorrect disassembly does not affect
                execution, so it may be effectively ignored.


5372     V2.20  will fix next release
  The emulator has trouble reading the ROM when LRDY0\ is high.

This bug likely exists because we must read the first 8 words twice
when we read ROM to work around a silicon bug.  Therefore, it also 
will not likely be fixed inthe emulator.


Solution/Workaround: Do not tie LRDY0\ high.


5374     V2.20  will fix next release
  The system command hangs the emulator.


Solution/Workaround:     

       1) Don't use the system command. Use a new command prompt instead.
       2) Upgrade to Os/2 2.x.


5375     V2.20  will fix next release
  The system command , when running under Windows, does nothing.


5376     V2.20  will fix next release
  The system command does nothing.


5441     V2.20  will fix next release
  When an attempt is made to read from an empty FIFO and the
emulator is running in RUNF mode, the emulator crashes.


Workaround: Use RUN instead of run free.


5472     V2.20  will fix next release
  The emulator crashes under OS/2 and Windows when given the following
commands :

     ;set up memory map, etc.
     load sample
     ? ((struct xx *)0x2ff800)->a

Under SunOS it returns a value, but under DOS it replies :
"Structure member not found".


5485     V2.20  will fix in V1.12
  The emulator crashes under OS/2 and Windows when given the following 
commands:
     
     ;set up memory map, etc.
     load sample
     ? ((struct xx *) 0x2ff800)->a

Under SunOS it returns a value, but under DOS it replies,  
"Structure member not found".


5487     V2.20  will fix in V2.21
  The debugger comes up, but I can't modify memory or registers, nor run.

    CAUSE : User didn't execute emurst with the correct c?x510ws.out
            since powering-up the XDS510WS, but before invoking the debugger.
 
SOLUTION/WORKAROUND DESCRIPTION :
    Obviously, make sure to execute emurst with the correct c?x510ws.out
    file prior to invoking the debugger, yet after powering-up the XDS510WS.


5491     V2.20  will fix in V2.21
  The XDS510WS hangs if emu4x is executed on it, but it was initialized,
via emurst, with a file other than c4x510ws.out, such as c5x510ws.out.

SOLUTION/WORKAROUND DESCRIPTION: 
    Cycle the power on the XDS510WS and re-emurst with the correct
    c?x510ws.out file or simply have enough sense not to execute a
    debugger on an XDS510WS that is not set up for that device.


5499     V2.20  will fix in V2.21
  The commands Branch Conditionally Delayed and Annul If False/True are
disassembled as "BcondDAF src" and "BcondDAT src", respectively.  They,
instead, should be disassembled as "BcondAF src" and "BcondAT src",
respectively.


5561     V2.30  will fix next release
  Runb on workstation is incorrect above 0x4000 cycles approximately.

XDS-WS debugging a C40 that is running out of local memory, with not external controlling
logic. Using runb on a piece of deterministic code, there measurement vary by 20x
run1 - 20,000 cycles
run2 - 400,000 cycles
reset, set 2 breakpoint, run to the first, and runb to the second
This is not a problem on the PC version.

Workaround
==========

Benchmark short segments of code less than 16,384 cycles.


5575     V2.30  will fix next release
  The emulator returns strange cycle counts in the pseudo-register "clk"
when benchmarking more than about 16,000 cycles using the "runb" command.  
This is not a problem on the PC version.

WORKAROUND
==========
Benchmark fewer than 16,000 cycles.


5605     V2.30  will fix next release
  Bug with the XDS510WS software when running under SunOS 5.3(ie Solaris 2.3).
The Software fails to function properly unless executed by the "root" user.

WORKAROUND
==========
1.  Execute as the root user.   

OR

2.  Copy emurst, emuload, and emu4x into the /etc directory. As root,
    execute the following command:  

     chmod 6755 /etc/emu*

    Add /etc to your path.


5631     V2.30  will fix next release
  emurst.exe failing in version 2.30 of C Source
Debugger for the XDS510WS.  The emurst gives the
message that .\board.dat can not be found.

PROBLEM:
Both the Sparc version of emurst and the DOS version of emuload.exe
fail to recognize the "-f filename", "-n devicename", and the  
"-i pathname" options correctly, instead they attempt to use the 
"filename", "devicename", and "pathname" as the name of file that 
they are to load.  This can be especially a problem if these options 
are used in the D_OPTIONS environment variable where they are passed 
to these programs without the user realizing it.

WORKAROUND:
===========
Replace the "-f filename" option with "-ffilename", no space; the
"-n devicename" option with "-ndevicename", no space; and the  
"-i pathname" option with "-ipathname, no space.


5679     V2.30  will fix next release
  The emurst executible should use the D_DIR environment variable to help
find the *.out file to download to the XDS510WS, but doesn't.


5681     V2.30  will fix next release
  When using the analysis module to count clocks( including runb)
and the count is 0x(Y)fff it will be displayed as 0x(Y+1)fff.
This seems to be a bug in the silicon.
           
SOLUTION/WORKAROUND DESCRIPTION : (OPTIONAL)
=================================
Create an alias new_clk to view clk
alias new_clk,"? ((clk&0xfff==0xfff)&&(evtselt==3))? clk-0x1000 : clk"
or watch like this
wa new_clk,((clk&0xfff==0xfff)&&(evtselt==3))? clk-0x1000 : clk,x
      
***Will be fixed in the next production release.


5682     V2.30  will fix next release
  After the recomended fix to get the emulator working unde SunOS 5.3 from
PTR #5605, ms, dlog, and ssave create files owned by root and not the user.


5688     V2.30  will fix next release
  R11 isn't correctly set immediately following an LAJ, LAJcond, nor
a LAT command when it is stepped.

WORK AROUND:
============
Work around the problem by running instead of stepping.
***This is a pipeline issue within the silion.


5691     V2.30  will fix next release
      Executing a parallel operation(step,run,halt,etc.) including a device
    on a subpath of an SPL with at least one empty subpath causes a crash
    in the emulator that is listed first in the PDM group that the parallel
    instruction was executed for.
 
SOLUTION/WORKAROUND DESCRIPTION : (OPTIONAL)
 
    In the board.cfg for your system, replace all empty subpaths with paths
    containing only a single, uniquely-named BYPASS01 device.  Since in the
    modified board.cfg file the only device listed in the truely empty subpath
    is a BYPASS## device, that subpath will still never be accessed.


5692     V2.01  will fix next release
  Stepping through a "NOP" instruction preceeded by an "RPTS 01H" instruction
produces the message "processor access time-out addr=0xaaaababe".  This is
only supposted to happen after a one second wait and it shouldn't/couldn't
have taken more than one second.


5697     V2.30  will fix next release
  Executing a parallel operation(step,run,halt,etc.) including a device
on a subpath of an SPL with at least one empty subpath causes a crash
in the emulator that is listed first in the PDM group that the parallel
instruction was executed for.

Note:  This problem occurs on all JTAG device emulators supporting
       SPL's. Versions 2.20 and 2.30 have the problem.

SOLUTION/WORKAROUND DESCRIPTION: (OPTIONAL)
================================
In the board.cfg for your system, replace all empty subpaths with paths
containing only a single, uniquely-named BYPASS01 device.  Since in the
modified board.cfg file the only device listed in the truely empty subpath
is a BYPASS## device, that subpath will still never be accessed.


5698     V2.30  will fix next release
  The debugger fails to display the PC indicator in the DISASSEMBLY window
after a "processor access error " is produced even though the PC is within
the range of the DISASSEMBLY window.  The PC indicator should ALWAYS be
displayed when it is in the range displayed within the DISASSEMBLY window.

SOLUTION/WORKAROUND DESCRIPTION: (OPTIONAL)
================================
     Don't worry about it.


5699     V2.30  will fix next release
      The debugger doesn't release ownership of the EMU lines after it is run
    when it's analysis is enabled for external counts.  This means that other
    debuggers cannot gain access to the EMU lines to perform runb's, etc.
 
 
SOLUTION/WORKAROUND DESCRIPTION : (OPTIONAL)
 
    Disable analysis and/or external count on the first debugger and run for
    some amount before trying to run with external count on the second.
 
    Don't run with external count when you can use runb, which works.


5717     V2.30  will fix next release
      The pdm command "prunf" fails to start all of the processors running
    when the processors are in a subpath of an SPL.  The pdm command
    "send runf" succeeds as does entering "runf" in each of the debugger
    windows.  The pdm command "prunf" succeeds on systems without SPL's.
 
    Although only observed on C4x systems, I believe that this is probably
    true for all devices which support parallel commands from pdm.
 
 
SOLUTION/WORKAROUND DESCRIPTION : (OPTIONAL)
 
    Unless it is necessary to simultaneously start devices, avoid using the
    parallel instructions, replace them with their send ... counterparts.


5741     V(current)  will fix next release
  Using versiob 4.5 of Assembler and the following instruction                   
produces the error: address required.

   LHU0  80h, R0

Why?


WORK AROUND/SOLUTION:
=====================
Immediate mode, in some C4x instructions, has been incorporated into the
C4x UG 1993.  These instructions need to be supported by our assembler and
processed correctly by the simulator.

The instructions affected are: LBb/LbUb/LHw/LHUw/LWLct/LWRct
                               MBct/MHct/RCPF/RSQRF/TOIEEE

***The the immeditate value can be placed into a memory location, or
   register, and then accessed directly or indirectly.


5774     V2.01  will fix next release
  Using the DOS emu40.exe program.  There are problems with
the "system" command.  After running "system dir", for example, 
several times, the next call to system results in an 
error message:

     Memory allocation error
     Cannot start COMMAND, exiting

This is a "memory leak" problem.  Apparently emu40 is using memory each
time "system" is called, but not freeing it, so after a few calls
you have to exit emu40 and restart it.


5829     V2.01  Fixed in V2.02 
  PG 3 silicon is recognized by the emulator and displayed via the "version"
command as "Silicon Revision 2".  The information in the silicon that we
use to determin revision isn't changed for each PG.


SOLUTION/WORKAROUND DESCRIPTION

Get PG from the chip label, whenever you need to know whether it is 2 or 3.

Version 2.40 and beyond will display this information as "Silicon ID #"
Documentation will need to reflect this at the next revision of UG.


PDM
-------------------------------------------------------------------------------

5382     V1.00  will fix next release
  loop/endloop commands do not function correctly in pdm take files that are
not in pc style format on a pc.  PC format uses cr/lf for a new line.
Unix uses just lf.



Workaound: Convert command files to pc format.


5462     V1.00  will fix next release
  PDM doesn't support the "dlog" command as described in the documentation.      
Always returns the error "Cannot open Log file".


PORTING KIT
-------------------------------------------------------------------------------

5370     V2.20  will fix next release
  The files pdm and pdm.exe were inadvertently left out of V2.20 C4x
Emulation Porting Kit.


Workaround: Files have been placed on the BBS . These files
         are currently password protected to insure that
         only registered customers will have access.
         Please contact software tools group.


5689     V2.20  will fix next release
  In ld_api.c, the mem_fill() function sets cmd.trg_buf to buffer, i.e.
cmd.trg_buf = buffer;
but cmd_trg_buf should be set to the address of buffer, i.e.
cmd.trg_buf = &buffer;

This is also believe true on the C3x and C5x.


-------------------------------------------------------------------------------
