diff options
author | Scott Johnson <scott.johnson@arilinc.com> | 2021-09-22 14:14:55 -0700 |
---|---|---|
committer | Scott Johnson <scott.johnson@arilinc.com> | 2021-09-26 17:17:52 -0700 |
commit | 428c2aa1f074e8280fb9fc799e38c7289abc7c74 (patch) | |
tree | a74be16c535a7e8ee419879416cf8ab3059a8618 /riscv/csrs.h | |
parent | 7c17f36fece0f6be99e07fa52fcdf55ab3434458 (diff) | |
download | spike-428c2aa1f074e8280fb9fc799e38c7289abc7c74.zip spike-428c2aa1f074e8280fb9fc799e38c7289abc7c74.tar.gz spike-428c2aa1f074e8280fb9fc799e38c7289abc7c74.tar.bz2 |
Convert tdata2 to csr_t
Diffstat (limited to 'riscv/csrs.h')
-rw-r--r-- | riscv/csrs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/riscv/csrs.h b/riscv/csrs.h index f130d17..058fb42 100644 --- a/riscv/csrs.h +++ b/riscv/csrs.h @@ -516,5 +516,18 @@ class tdata1_csr_t: public csr_t { virtual bool unlogged_write(const reg_t val) noexcept override; }; +class tdata2_csr_t: public csr_t { + public: + tdata2_csr_t(processor_t* const proc, const reg_t addr, const size_t count); + virtual reg_t read() const noexcept override; + reg_t read(const size_t idx) const noexcept; + protected: + virtual bool unlogged_write(const reg_t val) noexcept override; + private: + std::vector<reg_t> vals; +}; + +typedef std::shared_ptr<tdata2_csr_t> tdata2_csr_t_p; + #endif |