Newsgroups: comp.parallel
From: adc@threel.co.uk (Alan Culloch)
Subject: Re: Problems with use of TMS320C40's
Organization: 3L Ltd
Date: 11 Sep 1995 15:31:34 GMT
Message-ID: <431kom$2kc@usenet.srv.cis.pitt.edu>

esrlk@eng.warwick.ac.uk (A L Roberts) wrote:

>The problem is due to the fact that the amount of computation we are
>carrying out on each processor is relatively small

Indeed.

>the time taken to transfer data between the processors is
>much greater than the time taken for the computations:

Working on larger blocks of data at once may help,
by giving each processor more to do per communication.

>it appears that running the program on one
>processor the computation time to calculate one value takes 46 clock
>cycles (this time does not include file operations, declaring
>variables, etc). If the program is then split onto two processors the
>computation time on each processor reduces to 27 clock cycles per
>value, but the transfer of data between the two processors takes 192
>clock cycles per value (using the chan_in_message and chan_out_message
>commands does this seem reasonable ?).

Yes.  There is an overhead involved in starting up
a communication.  These numbers seem not unreasonable.
Again, dealing with larger blocks of data may help, by
spreading this (constant) overhead over more data.

>The time taken to calculate all the necessary points actually increases
>when  run on two or more processors.

This is just another way of saying you need to do more
computation for each individual communication.

>It was felt that writing the software in assembly language would
>overcome this problem:

Unlikely.  You need to fix the fundamental problem.

>The C programs where compiled with the -s command so as to produce
>their assembly language listings. When these assembly language
>listings were linked (using the lnk30 command and the c40cfbr.lib
>library file) error comments were produced, "linking files for
>incompatible targets".

As I mentioned above, going to assembler is unlikely to
help.  However, if you do want to experiment, try starting
with a simple program.  The procedure (illustrated
using the hello program) is:

1. Compile:  c40c -s hello
2. Edit the generated assembler.  I changed
   '.byte "hello, world", 10, 0' generated by the compiler
   to '.byte "hello, Alan", 10, 0'.
3. Assemble:  asm30 hello
4. Link and configure:  c40clink hello
   (or c40ctask, c40cstask if this is part of a multi-
   task application).
5. Run:  C>tis hello
         hello, Alan

This worked fine for me.

Alan Culloch,
3L Ltd.,
adc@threeL.co.uk

