diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-03-04 15:30:11 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-03-04 15:30:11 +0100 |
commit | 1dc09ab41ae703a1f15be87cacab5e842cf1a09d (patch) | |
tree | 392908ad6642e1ad5f9afa8c21998665a83534af /qtmips_machine/cop0state.h | |
parent | cd3a4b268a9b3d4d5436fee5de7967adb6f6e170 (diff) | |
download | qtmips-1dc09ab41ae703a1f15be87cacab5e842cf1a09d.tar.gz qtmips-1dc09ab41ae703a1f15be87cacab5e842cf1a09d.tar.bz2 qtmips-1dc09ab41ae703a1f15be87cacab5e842cf1a09d.zip |
Implemented interrupt delivery and processing for serial port.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine/cop0state.h')
-rw-r--r-- | qtmips_machine/cop0state.h | 13 |
1 files changed, 13 insertions, 0 deletions
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); |