Add irq status register

Upon receiving an interrupt, the corresponding bit in the interrupt
status register will be set and an IRQ will be raised for the CPU. The
cpu can then respond to the interrupt and clear the interrupt by writing
back to the interrupt status register.
This commit is contained in:
Byron Lathi
2022-03-14 13:16:09 -05:00
parent 26070313f4
commit e70fffb472
5 changed files with 126 additions and 4 deletions

View File

@@ -3,12 +3,14 @@ module addr_decode(
output logic ram_cs,
output logic rom_cs,
output logic hex_cs,
output logic uart_cs
output logic uart_cs,
output logic irq_cs
);
assign rom_cs = addr[15];
assign ram_cs = ~addr[15] && addr < 16'h7ff0;
assign hex_cs = addr >= 16'h7ff0 && addr < 16'h7ff4;
assign uart_cs = addr >= 16'h7ff4 && addr < 16'h7ff6;
assign irq_cs = addr == 16'h7fff;
endmodule