Newsgroups: comp.sys.transputer
From: andyr@wizzy.com (Andy Rabagliati)
Subject: Re: Memory-Mapped Interfaces; PORTs vs PLACEd variables
Organization: W.Z.I.
Date: Mon, 20 Jun 1994 15:25:40 GMT
Message-ID: <CrpC6s.4rL@wizzy.com>

In article <PHIL.94Jun20172212@tweety.mrad.com.au>,
Phil Nitschke <phil@tweety.mrad.com.au> wrote:
>
>I am seeking people's opinions on the following two methods of
>addressing the memory-mapped hardware:
>
>        (a)     Using normal variables which are PLACE'd at the desired
>                location and written-to/read-from by variable
>                assignment;
>
>        (b)     Using PORTs which are PLACE'd at the desired location
>                and addressed as primitive channels.
>
>I want to know if there are any performance (or other) advantages that
>could be obtained by using one method in preference to the other?

I think (as you noted) PORTs are semantically cleaner, and send the
right messages to Usage checkers, optimisers, et cetera.

However, I think that the Inmos occam compiler, for backward
compatibility, does all the right things anyway. It certainly could,
though I am not sure it still does, run-time usage check PLACEd
variables. Very impressive.

PLACEd variables are definitely more convenient, because you can embed
them in expressions. There is a danger though, of the compiler, or you,
accidently double referencing things like FIFO output ports, which can
be unforgiving.

One of the most important advantages of using occam is that it cleans
up your thinking of the problem.

For this reason alone, I would recommend PORTs.

Cheers,     Andy.

--
The birds have vanished into the sky,	     Andy Rabagliati  andyr@wizzy.com 
   and now the last cloud drains away.			    W.Z.I. Consulting
      We sit together, the mountain and me,		      +1.719.635.6099
         until only the mountain remains.   -- Li Po (701-762)

