⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rom.hh

📁 一个mips虚拟机非常好代码,使用C++来编写的,希望大家多学学,
💻 HH
字号:
#ifndef rom_hh_included#define rom_hh_included#include <clock.hh>#include <checkpoint.hh>#include <cpu.hh>#include <device.hh>#include <inttypes.hh>#include <module.hh>#include <serial.hh>#include <simarg.hh>class ROM    : public Module, public Device{private:    static SerialType<ROM> type;    // Configuration parameter cache.    const char* file_name;    ClockValue read_latency, write_latency;    // The clock frequency for which the cached values are valid.    ClockValue freq;    // Actual data array.    UInt32 size;    UInt64* data;public:    // Constructors, etc.    ROM(const SimArgs& args);    ROM(Checkpoint& cp);    ~ROM();    // 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);private:    // Conviguration data.    struct {	char* file_name;	int size;	int read_latency, write_latency;    } conf;};#endif // rom_hh_included

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -