pic.hh
来自「一个mips虚拟机非常好代码,使用C++来编写的,希望大家多学学,」· HH 代码 · 共 48 行
HH
48 行
#ifndef pic_hh_included#define pic_hh_included#include <inttypes.hh>#include <module.hh>#include <device.hh>#include <interruptsink.hh>#include <serial.hh>#include <checkpoint.hh>#include <simarg.hh>class U4600_PIC : public Module, public Device, public InterruptSink{private: static SerialType<U4600_PIC> type; UInt16 intr_pending; // Set of interrupts pending UInt16 intr_mask; // Set of interrupts enabled void check_interrupts(void);public: // Constructors, etc. U4600_PIC(const SimArgs& args); U4600_PIC(Checkpoint& cp); // Module interfaces. void reset(bool warm); // Serialization information. void checkpoint(Checkpoint& cp, bool parent = false) const; // Device access. ClockValue read(UInt64 addr, UInt64* buf, int size); ClockValue write(UInt64 addr, const UInt64* buf, int size); // Interrupt sink void deliver_interrupt(unsigned int irq); void clear_interrupt(unsigned int irq);};#endif // pic_hh_included
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?