Page 1 of 1

PIC (i8259a) - Polled mode IMR not returned

Posted: Mon Sep 04, 2023 10:47 am
by xolod79

Working on the core of one computer and using PIC - i8259a, taking it from the ao486 project encountered an error in its operation. The error manifests itself in POLLED polling mode of the PIC (I don't know if it is used in the IBM PC), in this mode the Interrupt Mask Register (IMR) is not returned.

assign io_readdata =
(polled) ? { interrupt_do, 4'd0, irq_value } :
(io_address == 1'b0 && read_reg_select == 1'b0) ? irr :
(io_address == 1'b0 && read_reg_select == 1'b1) ? isr :
imr;

I suggest changing to

assign io_readdata =
(polled == 1'b1 && io_address == 1'b0) ? { interrupt_do, 4'd0, irq_value } :
(io_address == 1'b0 && read_reg_select == 1'b0) ? irr :
(io_address == 1'b0 && read_reg_select == 1'b1) ? isr :
imr;


Re: PIC (i8259a) - Polled mode IMR not returned

Posted: Mon Sep 04, 2023 5:27 pm
by xolod79

Made a test core.