21 return core_->is_commit_valid();
25 return core_->get_commit_pc();
29 return core_->get_commit_wdata();
33 return core_->get_commit_rd();
37 return core_->is_commit_wen();
40 [[nodiscard]]
inline uint32_t
get_reg_by_name(
const std::string& name)
const noexcept {
41 return core_->get_reg_by_name(name);
85 return this->is_end_ != other.is_end_;
89 return this->is_end_ == other.is_end_;
121template <
typename Range,
typename Action>
123 for (
auto state : range) {
状态代理 (Proxy Pattern)
定义 wrapper.hpp:13
bool is_commit_valid() const noexcept
定义 wrapper.hpp:20
uint8_t get_commit_rd() const noexcept
定义 wrapper.hpp:32
const Core * get_core() const noexcept
定义 wrapper.hpp:44
uint32_t get_commit_wdata() const noexcept
定义 wrapper.hpp:28
uint32_t get_commit_pc() const noexcept
定义 wrapper.hpp:24
CoreCommitState(const Core *core) noexcept
定义 wrapper.hpp:18
bool is_commit_wen() const noexcept
定义 wrapper.hpp:36
const Core * core_
定义 wrapper.hpp:15
uint32_t get_reg_by_name(const std::string &name) const noexcept
定义 wrapper.hpp:40
迭代器封装 (Iterator Pattern)
定义 wrapper.hpp:55
bool operator==(const CoreIterator &other) const noexcept
定义 wrapper.hpp:88
CoreIterator & operator++() noexcept
定义 wrapper.hpp:75
bool operator!=(const CoreIterator &other) const noexcept
定义 wrapper.hpp:84
CoreIterator(Core *core, bool is_end=false) noexcept
定义 wrapper.hpp:72
void advance() noexcept
定义 wrapper.hpp:60
Core * core_
定义 wrapper.hpp:57
CoreCommitState operator*() const noexcept
定义 wrapper.hpp:80
bool is_end_
定义 wrapper.hpp:58
CoreIterator end() const noexcept
定义 wrapper.hpp:110
CoreSimRange(Core *core) noexcept
定义 wrapper.hpp:104
Core * core_
定义 wrapper.hpp:101
CoreIterator begin() noexcept
定义 wrapper.hpp:106
CoreState
仿真核心 (Core) 的当前运行状态枚举
定义 core.hpp:10
@ RUNNING
核心正在正常运行并执行指令
定义 core.hpp:12
void run_simulation(Range &&range, Action &&action) noexcept
泛型主执行器 (Generic Algorithm)
定义 wrapper.hpp:122