Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Many Myths are based on truth -- Spock, "The Way to Eden", stardate 5832.3


computers / comp.sys.transputer / Inmos B008 interrupts - do they work?

SubjectAuthor
* Inmos B008 interrupts - do they work?Tom Ivar Helbekkmo
`* Re: Inmos B008 interrupts - do they work?Mike B.
 `* Re: Inmos B008 interrupts - do they work?Tom Ivar Helbekkmo
  `* Re: Inmos B008 interrupts - do they work?Mike B.
   `- Re: Inmos B008 interrupts - do they work?Tom Ivar Helbekkmo

1
Inmos B008 interrupts - do they work?

<m25yy9lmwx.fsf@thuvia.hamartun.priv.no>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=34&group=comp.sys.transputer#34

  copy link   Newsgroups: comp.sys.transputer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: tih@hamartun.priv.no (Tom Ivar Helbekkmo)
Newsgroups: comp.sys.transputer
Subject: Inmos B008 interrupts - do they work?
Date: Sat, 19 Jun 2021 20:38:54 +0200
Lines: 40
Message-ID: <m25yy9lmwx.fsf@thuvia.hamartun.priv.no>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net MNgtrXftI9Yt2IUD0MLW2g6QpZQfFr9xCykysWy7FiUbDiqZU2
Cancel-Lock: sha1:vdEEMdgf+iqD09oo28QXbkjeS98= sha1:2ZOVZxLdfnkdtTnvLvVKJFgQFYI=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix)
 by: Tom Ivar Helbekkmo - Sat, 19 Jun 2021 18:38 UTC

Hi there!

I'm new to the Transputer community, although I've wanted to play with
them since I first read about them in 1986... :)

I recently got hold of an original Inmos B008 ISA board, and four T800
TRAM modules to mount on it. The host system is an old Pentium III
machine running MINIX 3.4. I've written a B004 driver for MINIX, and it
works fine - in polled mode:

luna.hamartun.priv.no$ ./ispy
Using /dev/link0 ispy 3.23
# Part rate Link# [ Link0 Link1 Link2 Link3 ] by Andy!
0 T805d-25 39k 0 [ HOST 1:1 3:1 ... ]
1 T2 -20 959k 1 [ ... 0:1 ... C004 ]
3 T800d-25 1.8M 1 [ ... 0:2 4:1 ... ]
4 T805d-25 1.8M 1 [ ... 3:2 5:1 ... ]
5 T800d-25 1.8M 1 [ ... 4:2 ... ... ]
luna.hamartun.priv.no$

The ispy running there is the one written in C by Andy Rabagliati; it
was a clean drop-in to MINIX, with just a little bit of editing to fit
the ioctl calls I have in my B004 driver.

My problem is that I'd like to make use of the extended functionality of
the B008 board. It supports delivering interrupts when the I/O channels
are ready, instead of the driver having to poll for them, and it also
supports DMA transfer. I've tried to extend my driver to be interrupt
driven when the board is a B008, but I can't make the board actually
generate any interrupts. I can't find any examples of interrupts being
used, either, on the net.

Am I barking up a dead tree here? Does anyone know if the interrupt
driven mode even works as documented on the B008? Is there a quirk that
I need to know about? Any help or hints would be appreciated!

-tih
--
Most people who graduate with CS degrees don't understand the significance
of Lisp. Lisp is the most important idea in computer science. --Alan Kay

Re: Inmos B008 interrupts - do they work?

<5dc09c0e-1952-443a-af48-5a51f743f088n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=35&group=comp.sys.transputer#35

  copy link   Newsgroups: comp.sys.transputer
X-Received: by 2002:ac8:6d15:: with SMTP id o21mr20407246qtt.54.1624222931697;
Sun, 20 Jun 2021 14:02:11 -0700 (PDT)
X-Received: by 2002:a9d:1444:: with SMTP id h62mr6713124oth.166.1624222931329;
Sun, 20 Jun 2021 14:02:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.niel.me!usenet.pasdenom.info!usenet-fr.net!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.transputer
Date: Sun, 20 Jun 2021 14:02:11 -0700 (PDT)
In-Reply-To: <m25yy9lmwx.fsf@thuvia.hamartun.priv.no>
Injection-Info: google-groups.googlegroups.com; posting-host=62.178.31.116; posting-account=SFOqlgkAAAAFnei08Ol39AT5SoPJtook
NNTP-Posting-Host: 62.178.31.116
References: <m25yy9lmwx.fsf@thuvia.hamartun.priv.no>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5dc09c0e-1952-443a-af48-5a51f743f088n@googlegroups.com>
Subject: Re: Inmos B008 interrupts - do they work?
From: michael_bruestle@yahoo.com (Mike B.)
Injection-Date: Sun, 20 Jun 2021 21:02:11 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mike B. - Sun, 20 Jun 2021 21:02 UTC

Hi Tom!

You have to enable the interrupts twice. One time in the STATUS registers (C012) and once in the INT_ENABLE.

#define STATUS_IN ( BOARD_BASE + 0x2 )
#define STATUS_OUT ( BOARD_BASE + 0x3 )
#define INT_ENABLE ( BOARD_BASE + 0x13 )
> 0 T805d-25 39k 0 [ HOST 1:1 3:1 ... ]

39k ... that's horrible slow. Check you ISA IO settings in the BIOS.

Kind regards
Mike

Re: Inmos B008 interrupts - do they work?

<m2o8bzemyg.fsf@thuvia.hamartun.priv.no>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=37&group=comp.sys.transputer#37

  copy link   Newsgroups: comp.sys.transputer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: tih@hamartun.priv.no (Tom Ivar Helbekkmo)
Newsgroups: comp.sys.transputer
Subject: Re: Inmos B008 interrupts - do they work?
Date: Mon, 21 Jun 2021 08:44:23 +0200
Lines: 69
Message-ID: <m2o8bzemyg.fsf@thuvia.hamartun.priv.no>
References: <m25yy9lmwx.fsf@thuvia.hamartun.priv.no>
<5dc09c0e-1952-443a-af48-5a51f743f088n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net xFwNAf5norDPgiNM8LH+eAOUQBRhXejyPzFOnKcUHJYohLtqFq
Cancel-Lock: sha1:F279MPha7WudIaGB7WIwhL29SJA= sha1:mxhfq/NzwgdcsbDLLpwXJWyZkRc=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix)
 by: Tom Ivar Helbekkmo - Mon, 21 Jun 2021 06:44 UTC

"Mike B." <michael_bruestle@yahoo.com> writes:

> You have to enable the interrupts twice. One time in the STATUS
> registers (C012) and once in the INT_ENABLE.

Thanks, Mike! I just tried that -- still no luck.

Am I right in assuming that while the DMA interrupt enable bit will need
to be turned off and on again by the driver in order to enable it for
the next transaction, the input and output enables are automatically
cleared by reading or writing a byte, so they just need to be re-enabled
for the next round? This is what the manual seems to say, but I haven't
found any text that's really clear on these points.

Right now, following the "belt and suspenders" plan, this is what I do
in the interrupt handler (plus another, similar, block for the receiving
part, of course):

if (wlink_busy && (wbuf_read_offset != wbuf_write_offset)) {
sys_inb(B004_OSR, &b);
if (b & B004_READY) {
sys_outb(B004_OSR, B004_INT_DIS);
b008_intmask &= ~B008_OUTINT_ENA;
sys_outb(B008_INT, b008_intmask);
sys_outb(B004_ODR, wlinkbuf[wbuf_read_offset++]);
if (wbuf_read_offset == wbuf_write_offset) {
wlink_busy = 0;
} else {
b008_intmask |= B008_OUTINT_ENA;
sys_outb(B008_INT, b008_intmask);
sys_outb(B004_OSR, B004_INT_ENA);
}
}
}

I check whether I'm currently writing, then whether the output is ready.
If it is, I disable that interrupt (both ways), and write the next byte.
If that wasn't the last one, I re-enable the interrupt.

Actually, it just strikes me that doing things this way in MINIX may be
too slow for interrupt-per-byte communication with the transputers. The
sys_outb() calls use message passing through the microkernel between the
driver and the kernel proper, and I may just be too slow re-enabling.
Maybe do this polled, for now, ditch this part of the interrupt
handling, and start experimenting with DMA, instead?

Incidentally, is there a way for the driver to detect whether it's
talking to a B004 or a B008? The interrupt control register is,
according to the documentation for the older version of the B008 that I
have, write only, which seems to leave nothing the driver can depend on.

Maybe I can, just after the reset, when I know the output ready bit in
the OSR is 1, compare what happens when I enable the interrupt in the
OSR with and without the enabling bit in the B008 specific interrupt
control register set? If the B008 specific bit turns out to make a
difference, that must be the board I have... I'll give that a go.

>> 0 T805d-25 39k 0 [ HOST 1:1 3:1 ... ]
>
> 39k ... that's horrible slow. Check you ISA IO settings in the BIOS.

Yeah - I still have some usleep() delays in there that I probably don't
need, and some debug output to console. I should get better speeds once
I tidy up that stuff. Been too focused on figuring out interrupts... :)

-tih
--
Most people who graduate with CS degrees don't understand the significance
of Lisp. Lisp is the most important idea in computer science. --Alan Kay

Re: Inmos B008 interrupts - do they work?

<53f8e59c-20d1-406a-af4b-cfe4eefcbd32n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=38&group=comp.sys.transputer#38

  copy link   Newsgroups: comp.sys.transputer
X-Received: by 2002:a37:ac03:: with SMTP id e3mr23075485qkm.367.1624278588742;
Mon, 21 Jun 2021 05:29:48 -0700 (PDT)
X-Received: by 2002:aca:db46:: with SMTP id s67mr16318199oig.42.1624278588451;
Mon, 21 Jun 2021 05:29:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.transputer
Date: Mon, 21 Jun 2021 05:29:48 -0700 (PDT)
In-Reply-To: <m2o8bzemyg.fsf@thuvia.hamartun.priv.no>
Injection-Info: google-groups.googlegroups.com; posting-host=62.122.80.36; posting-account=SFOqlgkAAAAFnei08Ol39AT5SoPJtook
NNTP-Posting-Host: 62.122.80.36
References: <m25yy9lmwx.fsf@thuvia.hamartun.priv.no> <5dc09c0e-1952-443a-af48-5a51f743f088n@googlegroups.com>
<m2o8bzemyg.fsf@thuvia.hamartun.priv.no>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <53f8e59c-20d1-406a-af4b-cfe4eefcbd32n@googlegroups.com>
Subject: Re: Inmos B008 interrupts - do they work?
From: michael_bruestle@yahoo.com (Mike B.)
Injection-Date: Mon, 21 Jun 2021 12:29:48 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mike B. - Mon, 21 Jun 2021 12:29 UTC

Hi Tom

> " I just tried that -- still no luck.

After an Reset of the Root Transputer via +0x10 also the C012 will be reseted.
(from http://transputer.net/mg/b008ug/b008ug.html)

Reset initialises the IMS C012 to the following state: LinkOut is held low; the interrupt outputs InputInt
and OutputInt are held low; interrupts are disabled; D0-7 are high impedance.
(from http://transputer.net/ibooks/dsheets/c012.pdf)

So after the reset has been deactivated AND an safety delay from 100ms (INMOS recommendation) I would enable both C012 interrupts only once and control the interrupts only via the B008 interrupt register.

The C012 interrupt enable are not auto-reset in any other way.

For a first approach I would leave the Error & DMA interrupt disabled.

DMA Code sample can be found here http://transputer.net/mg/b008ug/b008ug.html (Appendix C). No clue if correct or useful.

> Incidentally, is there a way for the driver to detect whether it's
> talking to a B004 or a B008?

I think an auto-detect is useless. There are many other similar cards in the field, so let the user specify it.
Maybe (and this happens often) is a B008 used with only the C012 e.g. B004 parts for which reason ever.

Trying to understand you code snippet ...

I would stay in the loop (and read each available ready data) until an defined successive number (may be 1) of not ready are detected. After that I would enable the interrupt and continue in the ISR.
All in combination with the number of requested bytes.

Finally, it's may be possible to check the logic level of the OutputInt (as you said, which is 1 after reset) on the C012 with a simple logic tester and if that's ok also check the IRQ line.

-Mike

Re: Inmos B008 interrupts - do they work?

<m2zgvj9uno.fsf@thuvia.hamartun.priv.no>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=39&group=comp.sys.transputer#39

  copy link   Newsgroups: comp.sys.transputer
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: tih@hamartun.priv.no (Tom Ivar Helbekkmo)
Newsgroups: comp.sys.transputer
Subject: Re: Inmos B008 interrupts - do they work?
Date: Mon, 21 Jun 2021 16:09:15 +0200
Lines: 29
Message-ID: <m2zgvj9uno.fsf@thuvia.hamartun.priv.no>
References: <m25yy9lmwx.fsf@thuvia.hamartun.priv.no>
<5dc09c0e-1952-443a-af48-5a51f743f088n@googlegroups.com>
<m2o8bzemyg.fsf@thuvia.hamartun.priv.no>
<53f8e59c-20d1-406a-af4b-cfe4eefcbd32n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net iItb1x9qdkloHZVccRPeKQoOFup6kczXOux8kkwwcXhx7UqE7m
Cancel-Lock: sha1:ZlkuSFunsKz2JEaqg9Z9tsUPE7Q= sha1:Y6Iie5NFZxYrIIGnDuZGxrGbjqE=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix)
 by: Tom Ivar Helbekkmo - Mon, 21 Jun 2021 14:09 UTC

"Mike B." <michael_bruestle@yahoo.com> writes:

> So after the reset has been deactivated AND an safety delay from 100ms
> (INMOS recommendation) I would enable both C012 interrupts only once
> and control the interrupts only via the B008 interrupt register.

Sounds reasonable. I have code to do the "can I get the interrupt just
by enabling on the C012, or do I have to enable on the B008 as well?"
thing, to try to determine whether I'm talking to a B008, but since I
can't get interrupts, other than this one that happens just after I give
up, that hasn't led anywhere.

Anyway, I see that I can get 200kB/s out of the link running polled,
which is still slow, because I have to go two rounds of message passing
to the kernel and back for each byte transfered. I think I'll ignore
the C012 interrupts for now, and start looking into DMA instead. I want
to run Helios on this board, and I'll want all the bandwidth I can get
toward the host's file system. :)

> DMA Code sample can be found here
> http://transputer.net/mg/b008ug/b008ug.html (Appendix C). No clue if
> correct or useful.

Thanks - and thanks for the other links, too!

-tih
--
Most people who graduate with CS degrees don't understand the significance
of Lisp. Lisp is the most important idea in computer science. --Alan Kay

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor