Re: KA630: how does console I/O actually work?

Mouse <[email protected]>
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <[email protected]>
>> (Note that, unless I've totally misread the code, simh does the
>> equivalent of edge-triggered as well [for console SLU interrupts].)
> I just checked simh, and it appears to clear the interrupt pending as
> soon as the data register is read, which to me definitely means it's
> not edge triggered, but level triggered.

> Basically, the code looks like this:

Well, the code for reading RXDB, yes.

> int32 rxdb_rd (void)
> {
> int32 t = tti_unit.buf;                                 /* char + error */
> 
> if (tti_csr & CSR_DONE) {                               /* Input pending 
> ? */
>      tti_csr = tti_csr & ~CSR_DONE;                      /* clr done */
>      tti_unit.buf = tti_unit.buf & 0377;                 /* clr errors */
>      CLR_INT (TTI);
>      sim_activate_after_abs (&tti_unit, tti_unit.wait);  /* check soon 
> for more \
> input */
>      }
> return t;
> }

Right.

> Note the CLR_INT (TTI); in there.  Which will happen independent of
> if the CPU have picked up the interrupt or not.

But what does CLR_INT do?  It clears an element of int_req[], which I
was reading as the equivalent of the flipflop storing edge-triggered
interrupt triggering.

Hm, I think I see what you mean.  This is feeling unpleasantly complex.

I'll see how hard it is to switch my code back to a simple DONE&IE
level-triggered interrupt.  Perhaps I had something else wrong with the
code back when I tried that the first time.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		[email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.