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

Bit0 & Bit1 of the Transputer Wptr query (cracked it!)

12 views
Skip to first unread message

Gavin Crate

unread,
Feb 6, 2010, 12:51:22 PM2/6/10
to
Hi Mike!

Regarding your posting:
http://groups.google.co.uk/group/comp.sys.transputer/browse_thread/thread/6243760919d4b425?hl=en#

Well here's the answer. The odd 0x00000008, 0x00000004, 0x00000008
cycling seen in your program is all due to the first gajw instruction.
There is a undocumented feature in early Inmos silicon (T414/T800).

As per Inmos datasheet - C coding:
temp = Areg;
Areg' = Wdesc & 0xfffffffc; /* Areg loaded with Wptr (word aligned)
*/
Wdesc' = (Areg & 0xfffffffe) | (Wdesc & 0x00000001);
Oreg' = 0;
Iptr' = NextInst

Well the actual real hardware (i.e. T414 / T800) is as follows - C
coding:
temp = Areg;
Areg' = Wdesc & 0xfffffffc; /* Areg loaded with Wptr (word aligned)
*/
Wdesc' = (Wdesc & 0x00000001) + temp;
Oreg' = 0;
Iptr' = NextInst

Hence in the real gajw instruction if the Areg bit 0 =1 then that
causes the fun and games! Normally the Areg (i.e. a new wptr) is word
aligned (lower two bits '00'). The Areg lsb = 1 causes a toggling of
the proc priority (low to high and high to low), since the original
Wdesc bit 0 (proc priority) is added to the Areg, before being
transferred into the updated Wdesc.

Hence, if you add the following code sequence you can toggle the proc
priority.

Ldc #1
gajw
gajw

If the transputer is executing a high priority task (Wdesc bit 0=0)
before the sequence, afterwards it wil be a low priority task (Wdesc
bit 0 = 1).

If the transputer is executing a low priority task (Wdesc bit 0=1)
before the sequence, afterwards it wil be a high priority task (Wdesc
bit 0 = 0).

I have included this gajw trick in the latest release of the emulator
- jserver v2.7 which can be found on my website:

http://sites.google.com/site/transputeremulator/


Glad to have been of help! ;-)

Regards

Gavin

Mike B.

unread,
Feb 6, 2010, 4:50:41 PM2/6/10
to
Hi Gavin!

> Glad to have been of help! ;-)

Kick-ass! That's the explanation - Great!!

Remains with two questions in my brain:

1) Whow did you discover this microcode speciality?
2) Does a real transputer really handle the current process (after a
switch from low to high) as a high priority process in case of
timeslicing?

Congratulation
Mike

0 new messages