![Texas Instruments TMS320C80 User Manual Download Page 56](http://html.mh-extra.com/html/texas-instruments/tms320c80/tms320c80_user-manual_1094755056.webp)
Prototyping Code Using Linker Command Files
3-16
TMS320C80 to TMS320C82 Software Compatibility User’s Guide
3.4.6.2 Global and Local Ports in the ’C80 and ’C82
In the ’C82, each PP’s data is local to that PP; however, on the
’C80, each PP uses data RAMs from another PP to emulate
DRAM1. Since the borrowed RAM is not local to each PP, any ac-
cess to that RAM will be forced over the PP’s global port, regard-
less of whether the local port or global port was specified in the
code.
If the PP’s DRAM1 is accessed using the PP’s local port, and a
global port access is made in parallel, the instruction would stall
for one cycle. This would cause the execution time on the ’C80
to be longer than the execution time on the ’C82.
Example 3–8 is a C PP example that calls a PP assembly lan-
guage function to calculate the dot product of two vectors, A and
B. Example 3–9 is the assembly language function called by the
C program. These two examples together perform the same
function as example.c, the sample program used in the previous
example.
This example illustrates how to use the PP’s address units so that
’C82 code that is prototyped on the ’C80 can equivalent in terms
of timing and functionality. In other words, the most important
consideration in this case is to write the assembly code to avoid
different execution times for each processor.
In the example, A is accessed (loaded) using the local port, since
it is specifically linked to a portion of memory that is local to the
PP that is executing the code. B, on the other hand, is accessed
using the global port, since it is linked to a RAM that is global
when it runs on the ’C80 (but not when it runs on the ’C82).
In the code, the access to vector B takes place through the global
port. The following assembly language line shows how the port
is specified using a ppca (register allocator/compactor) directive:
Ga_B_ptr
.reg
ga
The access to vector A is specified as taking place through the
local port. The following line of assembly language code shows
how the port was specified using a ppca directive:
La_A_ptr
.reg
la
The following lines of assembly language code show how the ac-
cesses to A and B are specified in parallel:
|| B =h *G+
; load next B element
|| A =h *L+
; load next A element
In your code, you can avoid timing differences by using the tech-
nique shown in the example: use the global port when accessing
RAM that is global to a ’C80 PP, and use the local port when
accessing RAM that is local to a ’C80 PP.
Summary of Contents for TMS320C80
Page 2: ...SPRU154 Printed in U S A November 1995 M418017 9741 revision ...
Page 8: ...vi TMS320C80 to TMS320C82 Software Compatibility User s Guide ...
Page 16: ...xiv TMS320C80 to TMS320C82 Software Compatibility User s Guide ...
Page 30: ...1 14 TMS320C80 to TMS320C82 Software Compatibility User s Guide ...
Page 40: ...2 10 TMS320C80 to TMS320C82 Software Compatibility User s Guide ...
Page 64: ...A 6 TMS320C80 to TMS320C82 Software Compatibility User s Guide ...