PIC (i8259a) - Polled mode IMR not returned

xolod79
Core Developer
Posts: 38
Joined: Wed May 27, 2020 8:13 pm
Has thanked: 6 times
Been thanked: 35 times

PIC (i8259a) - Polled mode IMR not returned

Unread post 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;

xolod79
Core Developer
Posts: 38
Joined: Wed May 27, 2020 8:13 pm
Has thanked: 6 times
Been thanked: 35 times

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

Unread post by xolod79 »

Made a test core.

Attachments
ao486-pic_fix.zip
(1.86 MiB) Downloaded 86 times
Post Reply