|
|
1.1 root 1: //
2: // nono
1.1.1.3 ! root 3: // Copyright (C) 2020 nono project
! 4: // Licensed under nono-license.txt
1.1 root 5: //
6:
7: #pragma once
8:
9: #include "device.h"
1.1.1.3 ! root 10: #include <sys/time.h>
1.1 root 11:
12: class PlutoDevice
13: : public IODevice
14: {
1.1.1.3 ! root 15: using inherited = IODevice;
1.1 root 16: public:
17: PlutoDevice();
1.1.1.3 ! root 18: ~PlutoDevice() override;
1.1 root 19:
1.1.1.3 ! root 20: uint64 Read8(uint32 addr) override;
! 21: uint64 Read16(uint32 addr) override;
! 22: uint64 Read32(uint32 addr) override;
! 23: uint64 Write8(uint32 addr, uint32 data) override;
! 24: uint64 Write16(uint32 addr, uint32 data) override;
! 25: uint64 Peek8(uint32 addr) override;
1.1 root 26:
27: private:
1.1.1.3 ! root 28: // ROM
! 29: static const uint16 rom[];
! 30:
! 31: // ホストファイル起動
! 32: uint32 ROM_Load();
! 33:
! 34: // ベンチマーク
1.1 root 35: void write_8_benchmark(uint32 addr, uint32 data);
36: void benchmark_start(uint32 data);
37: void benchmark_end();
38: int m_count = 0;
39: int m_test_num = 0;
40: const char *m_test_name = NULL;
41: int m_inst_len = 0;
42: int m_inst_cycle = 0;
43: int m_start_addr = 0;
44: timeval m_start {};
45: timeval m_total {};
46: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.