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

Reading from link 0-3 input memory locations.

5 views
Skip to first unread message

Gavin Crate

unread,
Oct 1, 2009, 3:29:54 PM10/1/09
to
Hi!

As most of you are aware the lower memory locations 80000000 to
8000001C are used by the Transputer to provide access to the external
links, using the various channel input and output instructions (e.g.
out, outword, outbyte and in).

Recently (whilst debugging a Minix OS on the T414 transputer emulator)
I came across some code which was performing a read from the address
80000010 (i.e. link 0 Input). I can't find any reference to this in
any Transputer documents. Does anyone know what will happen by reading
from the link 0 input address?

Gavin

Alec Cawley

unread,
Oct 1, 2009, 6:08:24 PM10/1/09
to

My guess would be that this location stored the identity of the thread
doing the appropriate input. You could therefore use it to detect if any
thread was inputting on that link (thread identity) or not (NotProcess.p).

Mike B.

unread,
Oct 2, 2009, 8:56:49 AM10/2/09
to
Hi!

I think the lower memory locations are simple memory cells. But
certain instructions will modify their content, so you should not
alter them extraordinary. If a process executes an out instruction to
#80000000 it will write his Wdesc (Wptr+Pri) into this location +
setup the link registers for link0 + deschedule himself. After the
transfer has completed, the process will be scheduled again and this
location will be set (IIRC) to MINT.

-Mike

Gavin Crate

unread,
Oct 2, 2009, 10:06:53 AM10/2/09
to

Hi Mike!

The question was concerning what data would returned if a read from
location 80000010 happened?

Gavin

Mike B.

unread,
Oct 2, 2009, 11:03:31 AM10/2/09
to
Hi Gavin!

> The question was concerning what data would returned if a read from
> location 80000010 happened?

The same content as a third process will read from an internal channel
(= word in memory) between two other processes.
A Wdesc or MINT, it depends on the point in time when the third
process read from this location (or probably write, which is not
recommendable :-)

If you read with "ldnl" nothing curious will happens. You read the
content of a memory cell. Only an "in" instruction against #80000010
will trigger some micro-ops which interact with real link hardware and
also update this memory cell with the Wdesc.

It's only memory, not a device port or something else - so feel free
to read every memory location in the internal memory!

Please note: Maybe I'm totally wrong, but for me only this mechanism
make sense.

-Mike

Gavin Crate

unread,
Oct 2, 2009, 11:15:30 AM10/2/09
to
> The same content as a third process will read from an internal channel
> (= word in memory) between two other processes.
> A Wdesc or MINT, it depends on the point in time when the third
> process read from this location (or probably write, which is not
> recommendable :-)
>
> If you read with "ldnl" nothing curious will happens. You read the
> content of a memory cell. Only an "in" instruction against #80000010
> will trigger some micro-ops which interact with real link hardware and
> also update this memory cell with the Wdesc.

So are you sort of agreeing with Alec's answer, in that for most of
the time reading 80000010 will return Wdesc (when link in use by 'in'
instruction), otherwise MINT when the link is unused (i.e. no 'in'
instruction executed)?

Gavin

Mike B.

unread,
Oct 2, 2009, 2:00:18 PM10/2/09
to
Hi!

> So are you sort of agreeing with Alec's answer, in that for most of
> the time reading 80000010 will return Wdesc (when link in use by 'in'
> instruction), otherwise MINT when the link is unused (i.e. no 'in'
> instruction executed)?

Yes, but the phrasing of "in use by 'in'" and "no 'in' instruction
executed" is for me misleading because the 'in' instruction maybe long
gone or the process has been rescheduled.

To recapitulate: The ADDRESS VALUES #80000000 to #8000001C are used to
provide access to the link hardware with in and out* instructions. The
MEMORY LOCATIONS #80000000 to #8000001C are used for the link channel
control words which holds the Wdesc if the link is in use or
NotProcess.p if not.

See Transputer Instruction Set - 10.4.2 External communication - Input
from an external channel

The only thing which sounds strange to me is the circumstance that the
Wdesc is stored twice (in the link hardware and in the channel control
word). As described you can also WRITE ANYTHING into the channel
control word without troubles - "quod sit demonstrandum"

-Mike

0 new messages