Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IMS D7214C ANSI C toolset compile problem

19 views
Skip to first unread message

Mike B.

unread,
Nov 29, 2011, 11:19:08 AM11/29/11
to
Hi!

I’m trying to generate a small test program with a buffer which should
be placed into internal memory. I’ve placed the global buffer
(256byte) in a separate module and specify the IMS_linkage("") pragma.
In the .lnk file for the ilink I’ve placed a #section directive.

Every attempt places the buffer behind the code and will not be placed
as required.

Has somebody any practical experiences with IMS_linkage & #section?

My versions are:

icc : INMOS toolset C compiler
INMOS C compiler Version 2.01.10 (built at 01:08:56 Jun 25 1991)

ilink : INMOS toolset linker tool
Transputer Version 2.00.04, Feb 27 1991

icollect : INMOS toolset collector
Toolset Version 2.0.26 Feb 27 1991 21:39:57

-Mike

Mike B.

unread,
Dec 18, 2011, 4:58:14 AM12/18/11
to
If someone has a similar problem – this is my workaround:

The linkage statement only works with code, not with data!

Therefore I’ve created a function which is build with the __asm and
byte directive and use it as data buffer. As the transputer has no
memory protection this approach is possible.

#pragma IMS_linkage("internal%memory")

void Z( void ) {

__asm {
byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
….
}
}

.lnk

#mainentry C.ENTRY
#reference information%module
#section internal%memory
centry.lib
libc.lib

With such a buffer you can significant faster clear memory blocks
(perhaps the 5 cycle BOZO vram) as with every other approach I’ve
tried. This includes also some foolhardy specifics.

It looks that the transputer can’t overlap internal reads and external
writes (which can be realized with a simple write buffer). So you
still lose one cycle for the internal read for every word but this is
even better than a full 5 cycle for an external read which is used by
the memset() or overlapped move implementation.

Merry Christmas and a happy New Year!
Mike
0 new messages