add hwacha exception support
[riscv-isa-sim.git] / hwacha / hwacha.h
index 0f4955be5bd54e183cc2ad277c4622cc8b972462..e48bf529cd2488c5fe8173800e637d4cfe9f3e7a 100644 (file)
@@ -13,6 +13,9 @@ struct ct_state_t
   uint32_t vl;
 
   reg_t vf_pc;
+
+  reg_t cause;
+  reg_t aux;
 };
 
 struct ut_state_t
@@ -34,6 +37,8 @@ public:
   ct_state_t* get_ct_state() { return &ct_state; }
   ut_state_t* get_ut_state(int idx) { return &ut_state[idx]; }
   bool vf_active();
+  void take_exception(reg_t, reg_t);
+  void clear_exception() { clear_interrupt(); }
 
 private:
   static const int max_uts = 2048;