From: Yunsup Lee Date: Wed, 16 Oct 2013 21:27:12 +0000 (-0700) Subject: use reset virtual method X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da579c14c98f72bdc210ac7dc070ae85d6ce6d1e;p=riscv-isa-sim.git use reset virtual method --- diff --git a/hwacha/hwacha.cc b/hwacha/hwacha.cc index 61282d3..bd76f6b 100644 --- a/hwacha/hwacha.cc +++ b/hwacha/hwacha.cc @@ -17,7 +17,7 @@ void ut_state_t::reset() FPR.reset(); } -hwacha_t::hwacha_t() +void hwacha_t::reset() { ct_state.reset(); for (int i=0; i get_instructions(); + const char* name() { return "hwacha"; } + void reset(); + ct_state_t* get_ct_state() { return &ct_state; } ut_state_t* get_ut_state(int idx) { return &ut_state[idx]; } bool vf_active(); diff --git a/riscv/extension.h b/riscv/extension.h index 7e9bfe5..da42db9 100644 --- a/riscv/extension.h +++ b/riscv/extension.h @@ -12,10 +12,10 @@ class extension_t public: virtual std::vector get_instructions() = 0; virtual const char* name() = 0; + virtual void reset() {}; virtual ~extension_t(); void set_processor(processor_t* _p) { p = _p; } - virtual void reset() {}; protected: processor_t* p;