Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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



On 2023-12-26 05:21, Mouse wrote:
(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.

Yes. And I would assume that the entered character have been read, and is not still pending in the input buffer. Because the polled I/O of the boot monitor is still reading the characters.

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.

Well. In which case it is not edge triggered. The int_req[] holds what interrups are "active". And if the value stored there is basically just the state from DONE && IE, then it's reflecting the level, not the edge.
Because then it shouldn't be cleared when DONE is cleared.

Think of int_req[] as the interrupt lines on a bus. One for each vector.

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

I actually think it's rather simple. What is feeling so complex about it?

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.

I sortof suspect there must have been something else you messed up, yes. The scenario you descibed would essentially have been a case of:

User entered a character. IE is set, and when DONE gets set, the interrupt request "line" gets active. However, the IPL of the processor is at a level where the interrupt is currently blocked. Boot monitor reads out the character, which clears DONE, and thus also clears the interrupt request "line". Boot monitor, or kernel, drops the IPL. No interrupt happens, because there are none pending.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index