add SystemC ISS factory
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include <iss/vm_types.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace sysc {
|
||||
template<typename PLAT>
|
||||
class sc_core_adapter : public PLAT, public sc_core_adapter_if {
|
||||
public:
|
||||
@ -25,6 +26,8 @@ public:
|
||||
sc_core_adapter(sysc::tgfs::core_complex *owner)
|
||||
: owner(owner) { }
|
||||
|
||||
iss::arch_if* get_arch_if() override { return this;}
|
||||
|
||||
void set_mhartid(unsigned id) override { PLAT::set_mhartid(id); }
|
||||
|
||||
uint32_t get_mode() override { return this->reg.PRIV; }
|
||||
@ -144,6 +147,5 @@ private:
|
||||
sysc::tgfs::core_complex *const owner;
|
||||
sc_core::sc_event wfi_evt;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#endif /* _SYSC_SC_CORE_ADAPTER_H_ */
|
||||
|
Reference in New Issue
Block a user