From 1dc09ab41ae703a1f15be87cacab5e842cf1a09d Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Mon, 4 Mar 2019 15:30:11 +0100 Subject: Implemented interrupt delivery and processing for serial port. Signed-off-by: Pavel Pisa --- qtmips_machine/cop0state.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'qtmips_machine/cop0state.h') diff --git a/qtmips_machine/cop0state.h b/qtmips_machine/cop0state.h index 880dea2..649348e 100644 --- a/qtmips_machine/cop0state.h +++ b/qtmips_machine/cop0state.h @@ -61,6 +61,13 @@ public: COP0REGS_CNT, }; + enum StatusReg { + Status_IE = 0x00000001, + Status_EXL = 0x00000002, + Status_IntMask = 0x0000ff00, + Status_Int0 = 0x00000100, + }; + Cop0State(Core *core = nullptr); Cop0State(const Cop0State&); @@ -74,6 +81,12 @@ public: void reset(); // Reset all values to zero + bool core_interrupt_request(); + +public slots: + void set_interrupt_signal(uint irq_num, bool active); + void set_status_exl(bool value); + protected: void setup_core(Core *core); void update_execption_cause(enum ExceptionCause excause, bool in_delay_slot); -- cgit v1.2.3